code: function /* 9.2.6 */$$core$$LookupSupportedLocales (availableLocales, requestedLocales) {
          var
              // 1. Let len be the number of elements in requestedLocales.
              len = requestedLocales.length,
              // 2. Let subset be a new empty List.
              subset = new $$core$$List(),
              // 3. Let k be 0.
              k = 0;
  
          // 4. Repeat while k < len
          while (k < len) {
              var
                  // a. Let locale be the element of requestedLocales at 0-origined list
                  //    position k.
                  locale = requestedLocales[k],
                  // b. Let noExtensionsLocale be the String value that is locale with all
                  //    Unicode locale extension sequences removed.
                  noExtensionsLocale = String(locale).replace($$core$$expUnicodeExSeq, ''),
                  // c. Let availableLocale be the result of calling the
                  //    BestAvailableLocale abstract operation (defined in 9.2.2) with
                  //    arguments availableLocales and noExtensionsLocale.
                  availableLocale = $$core$$BestAvailableLocale(availableLocales, noExtensionsLocale);
  
              // d. If availableLocale is not undefined, then append locale to the end of
              //    subset.
              if (availableLocale !== undefined)
                  $$core$$arrPush.call(subset, locale);
  
              // e. Increment k by 1.
              k++;
          }
  
          var
              // 5. Let subsetArray be a new Array object whose elements are the same
              //    values in the same order as the elements of subset.
              subsetArray = $$core$$arrSlice.call(subset);
  
          // 6. Return subsetArray.
          return subsetArray;
      }
docs: The LookupSupportedLocales abstract operation returns the subset of the
  provided BCP 47 language priority list requestedLocales for which
  availableLocales has a matching locale when using the BCP 47 Lookup algorithm.
  Locales appear in the same order in the returned list as in requestedLocales.
  The following steps are taken: