docs: function updateStylingMap(context, classes, styles) {
      var classNames = EMPTY_ARR;
      var applyAllClasses = false;
      var ignoreAllClassUpdates = false;
      // each time a string-based value pops up then it shouldn't require a deep
      // check of what's changed.
      if (typeof classes == 'string') {
          var cachedClassString = context[5 /* CachedCssClassString */];
          if (cachedClassString && cachedClassString === classes) {
              ignoreAllClassUpdates = true;
          }
          else {
              context[5 /* CachedCssClassString */] = classes;
              classNames = classes.split(/\s+/);
              // this boolean is used to avoid having to create a key/value map of `true` values
              // since a classname string implies that all those classes are added
              applyAllClasses = true;
          }
      }
      else {
          classNames = classes ? Object.keys(classes) : EMPTY_ARR;
          context[5 /* CachedCssClassString */] = null;
      }
      classes = (classes || EMPTY_OBJ);
      var styleProps = styles ? Object.keys(styles) : EMPTY_ARR;
      styles = styles || EMPTY_OBJ;
      var classesStartIndex = styleProps.length;
      var multiStartIndex = getMultiStartIndex(context);
      var dirty = false;
      var ctxIndex = multiStartIndex;
      var propIndex = 0;
      var propLimit = styleProps.length + classNames.length;
      // the main loop here will try and figure out how the shape of the provided
      // styles differ with respect to the context. Later if the context/styles/classes
      // are off-balance then they will be dealt in another loop after this one
      while (ctxIndex < context.length && propIndex < propLimit) {
          var isClassBased_2 = propIndex >= classesStartIndex;
          // when there is a cache-hit for a string-based class then we should
          // avoid doing any work diffing any of the changes
          if (!ignoreAllClassUpdates || !isClassBased_2) {
              var adjustedPropIndex = isClassBased_2 ? propIndex - classesStartIndex : propIndex;
              var newProp = isClassBased_2 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
              var newValue = isClassBased_2 ? (applyAllClasses ? true : classes[newProp]) : styles[newProp];
              var prop = getProp(context, ctxIndex);
              if (prop === newProp) {
                  var value = getValue(context, ctxIndex);
                  var flag = getPointers(context, ctxIndex);
                  if (hasValueChanged(flag, value, newValue)) {
                      setValue(context, ctxIndex, newValue);
                      var initialValue = getInitialValue(context, flag);
                      // there is no point in setting this to dirty if the previously
                      // rendered value was being referenced by the initial style (or null)
                      if (initialValue !== newValue) {
                          setDirty(context, ctxIndex, true);
                          dirty = true;
                      }
                  }
              }
              else {
                  var indexOfEntry = findEntryPositionByProp(context, newProp, ctxIndex);
                  if (indexOfEntry > 0) {
                      // it was found at a later point ... just swap the values
                      var valueToCompare = getValue(context, indexOfEntry);
                      var flagToCompare = getPointers(context, indexOfEntry);
                      swapMultiContextEntries(context, ctxIndex, indexOfEntry);
                      if (valueToCompare !== newValue) {
                          var initialValue = getInitialValue(context, flagToCompare);
                          setValue(context, ctxIndex, newValue);
                          if (initialValue !== newValue) {
                              setDirty(context, ctxIndex, true);
                              dirty = true;
                          }
                      }
                  }
                  else {
                      // we only care to do this if the insertion is in the middle
                      var newFlag = prepareInitialFlag(newProp, isClassBased_2, getStyleSanitizer(context));
                      insertNewMultiProperty(context, ctxIndex, isClassBased_2, newProp, newFlag, newValue);
                      dirty = true;
                  }
              }
          }
          ctxIndex += 3 /* Size */;
          propIndex++;
      }
      // this means that there are left-over values in the context that
      // were not included in the provided styles/classes and in this
      // case the  goal is to "remove" them from the context (by nullifying)
      while (ctxIndex < context.length) {
          var flag = getPointers(context, ctxIndex);
          var isClassBased_3 = (flag & 2 /* Class */) === 2 /* Class */;
          if (ignoreAllClassUpdates && isClassBased_3)
              break;
          var value = getValue(context, ctxIndex);
          var doRemoveValue = valueExists(value, isClassBased_3);
          if (doRemoveValue) {
              setDirty(context, ctxIndex, true);
              setValue(context, ctxIndex, null);
              dirty = true;
          }
          ctxIndex += 3 /* Size */;
      }
      // this means that there are left-over properties in the context that
      // were not detected in the context during the loop above. In that
      // case we want to add the new entries into the list
      var sanitizer = getStyleSanitizer(context);
      while (propIndex < propLimit) {
          var isClassBased_4 = propIndex >= classesStartIndex;
          if (ignoreAllClassUpdates && isClassBased_4)
              break;
          var adjustedPropIndex = isClassBased_4 ? propIndex - classesStartIndex : propIndex;
          var prop = isClassBased_4 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
          var value = isClassBased_4 ? (applyAllClasses ? true : classes[prop]) : styles[prop];
          var flag = prepareInitialFlag(prop, isClassBased_4, sanitizer) | 1 /* Dirty */;
          context.push(flag, prop, value);
          propIndex++;
          dirty = true;
      }
      if (dirty) {
          setContextDirty(context, true);
      }
  }