@nubjs/nub-linux-x64 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/bin/nub +0 -0
  2. package/package.json +1 -1
  3. package/runtime/addons/nub-native.node +0 -0
  4. package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +453 -0
  5. package/runtime/node_modules/@js-temporal/polyfill/LICENSE +13 -0
  6. package/runtime/node_modules/@js-temporal/polyfill/README.md +90 -0
  7. package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +2 -0
  8. package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +1 -0
  9. package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +2 -0
  10. package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +1 -0
  11. package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +2 -0
  12. package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +1 -0
  13. package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +1215 -0
  14. package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +1215 -0
  15. package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +8 -0
  16. package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +39 -0
  17. package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +2424 -0
  18. package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +7 -0
  19. package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +438 -0
  20. package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +93 -0
  21. package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +4973 -0
  22. package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +34 -0
  23. package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +43 -0
  24. package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +138 -0
  25. package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +242 -0
  26. package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +758 -0
  27. package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +162 -0
  28. package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +17 -0
  29. package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +96 -0
  30. package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +48 -0
  31. package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +212 -0
  32. package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +274 -0
  33. package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +110 -0
  34. package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +154 -0
  35. package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +157 -0
  36. package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +59 -0
  37. package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +341 -0
  38. package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +10 -0
  39. package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +149 -0
  40. package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +492 -0
  41. package/runtime/node_modules/@js-temporal/polyfill/package.json +143 -0
  42. package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +88 -0
  43. package/runtime/node_modules/@oxc-project/runtime/LICENSE +22 -0
  44. package/runtime/node_modules/@oxc-project/runtime/README.md +5 -0
  45. package/runtime/node_modules/@oxc-project/runtime/package.json +1066 -0
  46. package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +4 -0
  47. package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +4 -0
  48. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +9 -0
  49. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +236 -0
  50. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +184 -0
  51. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +191 -0
  52. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +222 -0
  53. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +133 -0
  54. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +124 -0
  55. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +6 -0
  56. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +4 -0
  57. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +5 -0
  58. package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +5 -0
  59. package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +5 -0
  60. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +24 -0
  61. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +45 -0
  62. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +26 -0
  63. package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +5 -0
  64. package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +7 -0
  65. package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +6 -0
  66. package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +4 -0
  67. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +10 -0
  68. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +4 -0
  69. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +7 -0
  70. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +4 -0
  71. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +5 -0
  72. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
  73. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +5 -0
  74. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +4 -0
  75. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +7 -0
  76. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +7 -0
  77. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +5 -0
  78. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +5 -0
  79. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +5 -0
  80. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +5 -0
  81. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +7 -0
  82. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +5 -0
  83. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +5 -0
  84. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +5 -0
  85. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +5 -0
  86. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +4 -0
  87. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +5 -0
  88. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
  89. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +7 -0
  90. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +7 -0
  91. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +5 -0
  92. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +4 -0
  93. package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +10 -0
  94. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +13 -0
  95. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +50 -0
  96. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +19 -0
  97. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +16 -0
  98. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +23 -0
  99. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +9 -0
  100. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +11 -0
  101. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +9 -0
  102. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +8 -0
  103. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +12 -0
  104. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +10 -0
  105. package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +28 -0
  106. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +4 -0
  107. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +4 -0
  108. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +9 -0
  109. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +236 -0
  110. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +184 -0
  111. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +191 -0
  112. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +222 -0
  113. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +133 -0
  114. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +124 -0
  115. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +6 -0
  116. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +4 -0
  117. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +5 -0
  118. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +5 -0
  119. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +5 -0
  120. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +24 -0
  121. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +45 -0
  122. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +26 -0
  123. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +5 -0
  124. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +7 -0
  125. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +6 -0
  126. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +4 -0
  127. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
  128. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +4 -0
  129. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +7 -0
  130. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +4 -0
  131. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
  132. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
  133. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +5 -0
  134. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +4 -0
  135. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
  136. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +7 -0
  137. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +5 -0
  138. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +5 -0
  139. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +5 -0
  140. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +5 -0
  141. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +7 -0
  142. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +5 -0
  143. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +5 -0
  144. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +5 -0
  145. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +5 -0
  146. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +4 -0
  147. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +5 -0
  148. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
  149. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
  150. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
  151. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +5 -0
  152. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +4 -0
  153. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +10 -0
  154. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +13 -0
  155. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +50 -0
  156. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
  157. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +16 -0
  158. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +21 -0
  159. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +7 -0
  160. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +9 -0
  161. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +9 -0
  162. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +8 -0
  163. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +12 -0
  164. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +10 -0
  165. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +28 -0
  166. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +10 -0
  167. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +11 -0
  168. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +6 -0
  169. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +4 -0
  170. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +27 -0
  171. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +14 -0
  172. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +5 -0
  173. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +9 -0
  174. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +4 -0
  175. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +4 -0
  176. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +6 -0
  177. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +27 -0
  178. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +8 -0
  179. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +9 -0
  180. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +4 -0
  181. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +28 -0
  182. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +22 -0
  183. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +9 -0
  184. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +4 -0
  185. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +4 -0
  186. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +4 -0
  187. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +4 -0
  188. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +4 -0
  189. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +14 -0
  190. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +23 -0
  191. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +13 -0
  192. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
  193. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +3 -0
  194. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +8 -0
  195. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +4 -0
  196. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +304 -0
  197. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +22 -0
  198. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +12 -0
  199. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +6 -0
  200. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +7 -0
  201. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +8 -0
  202. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +6 -0
  203. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +9 -0
  204. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +6 -0
  205. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +8 -0
  206. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
  207. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +4 -0
  208. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +6 -0
  209. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +2 -0
  210. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +8 -0
  211. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +8 -0
  212. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +12 -0
  213. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +7 -0
  214. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +10 -0
  215. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +10 -0
  216. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +9 -0
  217. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +12 -0
  218. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +59 -0
  219. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +69 -0
  220. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +27 -0
  221. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +51 -0
  222. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +4 -0
  223. package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +10 -0
  224. package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +11 -0
  225. package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +6 -0
  226. package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +4 -0
  227. package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +27 -0
  228. package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +14 -0
  229. package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +5 -0
  230. package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +9 -0
  231. package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +4 -0
  232. package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +4 -0
  233. package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +6 -0
  234. package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +27 -0
  235. package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +8 -0
  236. package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +9 -0
  237. package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +4 -0
  238. package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +28 -0
  239. package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +22 -0
  240. package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +9 -0
  241. package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +4 -0
  242. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +4 -0
  243. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +4 -0
  244. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +4 -0
  245. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +4 -0
  246. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +14 -0
  247. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +23 -0
  248. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +13 -0
  249. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +10 -0
  250. package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +8 -0
  251. package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +4 -0
  252. package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +304 -0
  253. package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +22 -0
  254. package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +12 -0
  255. package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +6 -0
  256. package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +7 -0
  257. package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +8 -0
  258. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +6 -0
  259. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +9 -0
  260. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +6 -0
  261. package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +8 -0
  262. package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +4 -0
  263. package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +4 -0
  264. package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +6 -0
  265. package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +2 -0
  266. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +8 -0
  267. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +8 -0
  268. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +12 -0
  269. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +7 -0
  270. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +10 -0
  271. package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +10 -0
  272. package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +9 -0
  273. package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +12 -0
  274. package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +59 -0
  275. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +69 -0
  276. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +27 -0
  277. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +51 -0
  278. package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +4 -0
  279. package/runtime/node_modules/@oxc-project/types/LICENSE +22 -0
  280. package/runtime/node_modules/@oxc-project/types/README.md +3 -0
  281. package/runtime/node_modules/@oxc-project/types/package.json +26 -0
  282. package/runtime/node_modules/@oxc-project/types/types.d.ts +1912 -0
  283. package/runtime/node_modules/@petamoriken/float16/LICENSE +21 -0
  284. package/runtime/node_modules/@petamoriken/float16/README.md +413 -0
  285. package/runtime/node_modules/@petamoriken/float16/browser/float16.js +1340 -0
  286. package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +1325 -0
  287. package/runtime/node_modules/@petamoriken/float16/index.d.ts +546 -0
  288. package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +546 -0
  289. package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +555 -0
  290. package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +25 -0
  291. package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +23 -0
  292. package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +16 -0
  293. package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +690 -0
  294. package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +52 -0
  295. package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +27 -0
  296. package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +111 -0
  297. package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +78 -0
  298. package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +18 -0
  299. package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +150 -0
  300. package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +84 -0
  301. package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +10 -0
  302. package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +16 -0
  303. package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +11 -0
  304. package/runtime/node_modules/@petamoriken/float16/package.json +115 -0
  305. package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +35 -0
  306. package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +1194 -0
  307. package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +86 -0
  308. package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +31 -0
  309. package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +173 -0
  310. package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +151 -0
  311. package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +22 -0
  312. package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +254 -0
  313. package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +137 -0
  314. package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +10 -0
  315. package/runtime/node_modules/@petamoriken/float16/src/index.mjs +7 -0
  316. package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +10 -0
  317. package/runtime/node_modules/get-tsconfig/LICENSE +21 -0
  318. package/runtime/node_modules/get-tsconfig/README.md +268 -0
  319. package/runtime/node_modules/get-tsconfig/dist/index.cjs +7 -0
  320. package/runtime/node_modules/get-tsconfig/dist/index.d.cts +2116 -0
  321. package/runtime/node_modules/get-tsconfig/dist/index.d.mts +2116 -0
  322. package/runtime/node_modules/get-tsconfig/dist/index.mjs +7 -0
  323. package/runtime/node_modules/get-tsconfig/package.json +46 -0
  324. package/runtime/node_modules/jsbi/LICENSE +176 -0
  325. package/runtime/node_modules/jsbi/README.md +173 -0
  326. package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +2 -0
  327. package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +1 -0
  328. package/runtime/node_modules/jsbi/dist/jsbi-umd.js +2 -0
  329. package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +1 -0
  330. package/runtime/node_modules/jsbi/dist/jsbi.mjs +2 -0
  331. package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +1 -0
  332. package/runtime/node_modules/jsbi/jsbi.d.ts +43 -0
  333. package/runtime/node_modules/jsbi/package.json +35 -0
  334. package/runtime/node_modules/oxc-parser/LICENSE +22 -0
  335. package/runtime/node_modules/oxc-parser/README.md +167 -0
  336. package/runtime/node_modules/oxc-parser/package.json +153 -0
  337. package/runtime/node_modules/oxc-parser/src-js/bindings.js +601 -0
  338. package/runtime/node_modules/oxc-parser/src-js/generated/constants.js +105 -0
  339. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js.js +5862 -0
  340. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js_range.js +6403 -0
  341. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts.js +6154 -0
  342. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts_range.js +6723 -0
  343. package/runtime/node_modules/oxc-parser/src-js/generated/lazy/constructors.js +13875 -0
  344. package/runtime/node_modules/oxc-parser/src-js/generated/lazy/type_ids.js +191 -0
  345. package/runtime/node_modules/oxc-parser/src-js/generated/lazy/walk.js +5810 -0
  346. package/runtime/node_modules/oxc-parser/src-js/generated/visit/keys.js +220 -0
  347. package/runtime/node_modules/oxc-parser/src-js/generated/visit/type_ids.js +177 -0
  348. package/runtime/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts +387 -0
  349. package/runtime/node_modules/oxc-parser/src-js/generated/visit/walk.js +2455 -0
  350. package/runtime/node_modules/oxc-parser/src-js/index.d.ts +312 -0
  351. package/runtime/node_modules/oxc-parser/src-js/index.js +108 -0
  352. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/common.js +301 -0
  353. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/eager.js +255 -0
  354. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy-common.js +11 -0
  355. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy.js +162 -0
  356. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/node-array.js +365 -0
  357. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/supported.js +52 -0
  358. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/visitor.js +127 -0
  359. package/runtime/node_modules/oxc-parser/src-js/visit/index.js +41 -0
  360. package/runtime/node_modules/oxc-parser/src-js/visit/visitor.js +405 -0
  361. package/runtime/node_modules/oxc-parser/src-js/wasm.js +13 -0
  362. package/runtime/node_modules/oxc-parser/src-js/webcontainer-fallback.cjs +21 -0
  363. package/runtime/node_modules/oxc-parser/src-js/wrap.js +57 -0
  364. package/runtime/node_modules/oxc-transform/LICENSE +22 -0
  365. package/runtime/node_modules/oxc-transform/README.md +84 -0
  366. package/runtime/node_modules/oxc-transform/browser.js +1 -0
  367. package/runtime/node_modules/oxc-transform/index.d.ts +658 -0
  368. package/runtime/node_modules/oxc-transform/index.js +598 -0
  369. package/runtime/node_modules/oxc-transform/package.json +114 -0
  370. package/runtime/node_modules/oxc-transform/webcontainer-fallback.cjs +21 -0
  371. package/runtime/node_modules/resolve-pkg-maps/LICENSE +21 -0
  372. package/runtime/node_modules/resolve-pkg-maps/README.md +216 -0
  373. package/runtime/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
  374. package/runtime/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
  375. package/runtime/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
  376. package/runtime/node_modules/resolve-pkg-maps/dist/index.mjs +1 -0
  377. package/runtime/node_modules/resolve-pkg-maps/package.json +42 -0
  378. package/runtime/node_modules/urlpattern-polyfill/LICENSE +19 -0
  379. package/runtime/node_modules/urlpattern-polyfill/README.md +242 -0
  380. package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +9 -0
  381. package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +49 -0
  382. package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +1 -0
  383. package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +1 -0
  384. package/runtime/node_modules/urlpattern-polyfill/index.cjs +7 -0
  385. package/runtime/node_modules/urlpattern-polyfill/index.js +7 -0
  386. package/runtime/node_modules/urlpattern-polyfill/package.json +149 -0
  387. package/runtime/version.mjs +1 -1
@@ -0,0 +1,242 @@
1
+ [![run-tests](https://github.com/kenchris/urlpattern-polyfill/actions/workflows/workflow.yml/badge.svg)](https://github.com/kenchris/urlpattern-polyfill/actions/workflows/workflow.yml)
2
+ [![npm (tag)](https://img.shields.io/npm/v/urlpattern-polyfill/latest?style=flat-square)](https://www.npmjs.com/package/urlpattern-polyfill)
3
+ ![GitHub](https://img.shields.io/github/license/kenchris/urlpattern-polyfill?style=flat-square)
4
+
5
+ URLPattern polyfills
6
+ ===
7
+
8
+ URLPattern is a new web API for matching URLs. Its intended to both provide a convenient API for web developers and to be usable in other web APIs that need to match URLs; e.g. service workers. The [explainer](https://github.com/wanderview/service-worker-scope-pattern-matching/blob/master/explainer.md) discusses the motivating use cases.
9
+
10
+ This is a polyfill for the [URLPattern API](https://wicg.github.io/urlpattern/) so that the feature is available in browsers that don't support it natively. This polyfill passes
11
+ the same web platform test suite.
12
+
13
+ How to load the polyfill
14
+ ---
15
+ The polyfill works in browsers (ESM module) and in Node.js either via import (ESM module) or via require (CJS module).
16
+
17
+ The polyfill will only be loaded if the URLPattern doesn't already exist on the global object, and in that case it will add it to the global object.
18
+
19
+ ## loading as ESM module
20
+
21
+ ```javascript
22
+ // Conditional ESM module loading (Node.js and browser)
23
+ // @ts-ignore: Property 'UrlPattern' does not exist
24
+ if (!globalThis.URLPattern) {
25
+ await import("urlpattern-polyfill");
26
+ }
27
+ /**
28
+ * The above is the recommended way to load the ESM module, as it only
29
+ * loads it on demand, thus when not natively supported by the runtime or
30
+ * already polyfilled.
31
+ */
32
+ import "urlpattern-polyfill";
33
+
34
+ /**
35
+ * In case you want to replace an existing implementation with the polyfill:
36
+ */
37
+ import {URLPattern} from "urlpattern-polyfill";
38
+ globalThis.URLPattern = URLPattern
39
+ ```
40
+
41
+ > ## Note:
42
+ > The line with `// @ts-ignore: Property 'UrlPattern' does not exist ` is needed in some environments because before you load the polyfill it might not be available, and the feature-check in the if statement gives an TypeScript error. The whole idea is that it loads when its not there.
43
+
44
+ ## loading as CommonJs module
45
+
46
+ ```javascript
47
+ // Conditional CJS module loading (Node.js)
48
+ if (!globalThis.URLPattern) {
49
+ require("urlpattern-polyfill");
50
+ }
51
+ /**
52
+ * The above is the recommended way to load the CommonJs module, as it only
53
+ * loads it on demand, thus when not natively supported by the runtime or
54
+ * already polyfilled.
55
+ */
56
+ require("urlpattern-polyfill");
57
+
58
+ /**
59
+ * In case you want to replace an existing implementation with the polyfill:
60
+ */
61
+ const {URLPattern} = require("urlpattern-polyfill");;
62
+ globalThis.URLPattern = URLPattern
63
+ ```
64
+
65
+ > ## Note:
66
+ > No matter how you load the polyfill, when there is no implementation in your environment, it will _always_ add it to the global object.
67
+
68
+ Basic example
69
+ ---
70
+
71
+ ```javascript
72
+ let p = new URLPattern({ pathname: '/foo/:name' });
73
+
74
+ let r = p.exec('https://example.com/foo/bar');
75
+ console.log(r.pathname.input); // "/foo/bar"
76
+ console.log(r.pathname.groups.name); // "bar"
77
+
78
+ let r2 = p.exec({ pathname: '/foo/baz' });
79
+ console.log(r2.pathname.groups.name); // "baz"
80
+ ```
81
+
82
+ Example of matching same-origin JPG or PNG requests
83
+ ---
84
+
85
+ ```javascript
86
+ // Match same-origin jpg or png URLs.
87
+ // Note: This uses a named group to make it easier to access
88
+ // the result later.
89
+ const p = new URLPattern({
90
+ pathname: '/*.:filetype(jpg|png)',
91
+ baseURL: self.location
92
+ });
93
+
94
+ for (let url in url_list) {
95
+ const r = p.exec(url);
96
+
97
+ // skip non-matches
98
+ if (!r) {
99
+ continue;
100
+ }
101
+
102
+ if (r.pathname.groups['filetype'] === 'jpg') {
103
+ // process jpg
104
+ } else if (r.pathname.groups['filetype'] === 'png') {
105
+ // process png
106
+ }
107
+ }
108
+ ```
109
+
110
+ The pattern in this case can be made simpler without the origin check by leaving off the baseURL.
111
+
112
+ ```javascript
113
+ // Match any URL ending with 'jpg' or 'png'.
114
+ const p = new URLPattern({ pathname: '/*.:filetype(jpg|png)' });
115
+ ```
116
+
117
+ Example of Short Form Support
118
+ ---
119
+ We are planning to also support a "short form" for initializing URLPattern objects.
120
+ This is supported by the polyfill but not yet by the Chromium implementation.
121
+
122
+ For example:
123
+
124
+ ```javascript
125
+ const p = new URLPattern("https://*.example.com/foo/*");
126
+ ```
127
+
128
+ Or:
129
+
130
+ ```javascript
131
+ const p = new URLPattern("foo/*", self.location);
132
+ ```
133
+
134
+ API reference
135
+ ===
136
+
137
+ API overview with typeScript type annotations is found below. Associated browser Web IDL can be found [here](https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/url_pattern/).
138
+
139
+ ```ts
140
+ type URLPatternInput = URLPatternInit | string;
141
+
142
+ class URLPattern {
143
+ constructor(init?: URLPatternInput, baseURL?: string);
144
+
145
+ test(input?: URLPatternInput, baseURL?: string): boolean;
146
+
147
+ exec(input?: URLPatternInput, baseURL?: string): URLPatternResult | null;
148
+
149
+ readonly protocol: string;
150
+ readonly username: string;
151
+ readonly password: string;
152
+ readonly hostname: string;
153
+ readonly port: string;
154
+ readonly pathname: string;
155
+ readonly search: string;
156
+ readonly hash: string;
157
+ }
158
+
159
+ interface URLPatternInit {
160
+ baseURL?: string;
161
+ username?: string;
162
+ password?: string;
163
+ protocol?: string;
164
+ hostname?: string;
165
+ port?: string;
166
+ pathname?: string;
167
+ search?: string;
168
+ hash?: string;
169
+ }
170
+
171
+ interface URLPatternResult {
172
+ inputs: [URLPatternInput];
173
+ protocol: URLPatternComponentResult;
174
+ username: URLPatternComponentResult;
175
+ password: URLPatternComponentResult;
176
+ hostname: URLPatternComponentResult;
177
+ port: URLPatternComponentResult;
178
+ pathname: URLPatternComponentResult;
179
+ search: URLPatternComponentResult;
180
+ hash: URLPatternComponentResult;
181
+ }
182
+
183
+ interface URLPatternComponentResult {
184
+ input: string;
185
+ groups: {
186
+ [key: string]: string | undefined;
187
+ };
188
+ }
189
+
190
+ ```
191
+
192
+ Pattern syntax
193
+ ===
194
+ The pattern syntax here is based on what is used in the popular path-to-regexp library.
195
+
196
+ * An understanding of a "divider" that separates segments of the string. For the pathname this is typically the `"/"` character.
197
+ * A regex group defined by an enclosed set of parentheses. Inside of the parentheses a general regex may be defined.
198
+ * A named group that matches characters until the next divider. The named group begins with a `":"` character and then a name. For example, `"/:foo/:bar"` has two named groups.
199
+ * A custom regex for a named group. In this case a set of parentheses with a regex immediately follows the named group; e.g. `"/:foo(.*)"` will override the default of matching to the next divider.
200
+ * A modifier may optionally follow a regex or named group. A modifier is a `"?"`, `"*"`, or `"+"` functions just as they do in regular expressions. When a group is optional or repeated and it's preceded by a divider then the divider is also optional or repeated. For example, `"/foo/:bar?"` will match `"/foo"`, `"/foo/"`, or `"/foo/baz"`. Escaping the divider will make it required instead.
201
+ * A way to greedily match characters, even across dividers, by using `"(.*)"` (so-called unnamed groups).
202
+
203
+
204
+ Currently we plan to have these known differences with path-to-regexp:
205
+
206
+ * No support for custom prefixes and suffixes.
207
+
208
+
209
+ Canonicalization
210
+ ===
211
+
212
+ URLs have a canonical form that is based on ASCII, meaning that [internationalized domain names](https://en.wikipedia.org/wiki/Internationalized_domain_name) (hostnames) also have a canonical ASCII based representation, and that other components such as `hash`, `search` and `pathname` are encoded using [percent encoding](https://en.wikipedia.org/wiki/Percent-encoding).
213
+
214
+ Currently `URLPattern` does not perform any encoding or normalization of the patterns. So a developer would need to URL encode unicode characters before passing the pattern into the constructor. Similarly, the constructor does not do things like flattening pathnames such as /foo/../bar to /bar. Currently the pattern must be written to target canonical URL output manually.
215
+
216
+ It does, however, perform these operations for `test()` and `exec()` input.
217
+
218
+ Encoding components can easily be done manually, but do not encoding the pattern syntax:
219
+
220
+ ```javascript
221
+ encodeURIComponent("?q=æøå")
222
+ // "%3Fq%3D%C3%A6%C3%B8%C3%A5"
223
+ ```
224
+
225
+ ```javascript
226
+ new URL("https://ølerlækkernårdetermit.dk").hostname
227
+ // "xn--lerlkkernrdetermit-dubo78a.dk"
228
+ ```
229
+
230
+ Breaking changes
231
+ ===
232
+ - V9.0.0 drops support for NodeJS 14 and lower. NodeJS 15 or higher is required. This is due to using private class fields, so we can have better optimalizations. There is _No_ change in functionality, but we were able to reduce the size of the polyfill by ~2.5KB (~13%), thanks to a pr #118 from @jimmywarting.
233
+
234
+ Learn more
235
+ ===
236
+
237
+ - [Explainer](https://github.com/wanderview/service-worker-scope-pattern-matching/blob/master/explainer.md)
238
+ - [Design Document](https://docs.google.com/document/d/17L6b3zlTHtyxQvOAvbK55gQOi5rrJLERwjt_sKXpzqc/edit#)
239
+
240
+ Reporting a security issue
241
+ ===
242
+ If you have information about a security issue or vulnerability with an Intel-maintained open source project on https://github.com/intel, please send an e-mail to secure@intel.com. Encrypt sensitive information using our PGP public key. For issues related to Intel products, please visit https://security-center.intel.com.
@@ -0,0 +1,9 @@
1
+ import type * as Types from "./types.js";
2
+ export { URLPattern } from "./types.js";
3
+
4
+ declare global {
5
+ class URLPattern extends Types.URLPattern {}
6
+ type URLPatternInit = Types.URLPatternInit;
7
+ type URLPatternResult = Types.URLPatternResult;
8
+ type URLPatternComponentResult = Types.URLPatternComponentResult;
9
+ }
@@ -0,0 +1,49 @@
1
+ export type URLPatternInput = URLPatternInit | string;
2
+
3
+ export declare class URLPattern {
4
+ constructor(init?: URLPatternInput, baseURL?: string);
5
+
6
+ test(input?: URLPatternInput, baseURL?: string): boolean;
7
+
8
+ exec(input?: URLPatternInput, baseURL?: string): URLPatternResult | null;
9
+
10
+ readonly protocol: string;
11
+ readonly username: string;
12
+ readonly password: string;
13
+ readonly hostname: string;
14
+ readonly port: string;
15
+ readonly pathname: string;
16
+ readonly search: string;
17
+ readonly hash: string;
18
+ }
19
+
20
+ interface URLPatternInit {
21
+ baseURL?: string;
22
+ username?: string;
23
+ password?: string;
24
+ protocol?: string;
25
+ hostname?: string;
26
+ port?: string;
27
+ pathname?: string;
28
+ search?: string;
29
+ hash?: string;
30
+ }
31
+
32
+ export interface URLPatternResult {
33
+ inputs: [URLPatternInput];
34
+ protocol: URLPatternComponentResult;
35
+ username: URLPatternComponentResult;
36
+ password: URLPatternComponentResult;
37
+ hostname: URLPatternComponentResult;
38
+ port: URLPatternComponentResult;
39
+ pathname: URLPatternComponentResult;
40
+ search: URLPatternComponentResult;
41
+ hash: URLPatternComponentResult;
42
+ }
43
+
44
+ export interface URLPatternComponentResult {
45
+ input: string;
46
+ groups: {
47
+ [key: string]: string | undefined;
48
+ };
49
+ }
@@ -0,0 +1 @@
1
+ "use strict";var U=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var Ee=Object.getOwnPropertyNames;var Oe=Object.prototype.hasOwnProperty;var a=(e,t)=>U(e,"name",{value:t,configurable:!0});var ke=(e,t)=>{for(var r in t)U(e,r,{get:t[r],enumerable:!0})},Te=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ee(t))!Oe.call(e,o)&&o!==r&&U(e,o,{get:()=>t[o],enumerable:!(n=Re(t,o))||n.enumerable});return e};var Ae=e=>Te(U({},"__esModule",{value:!0}),e);var He={};ke(He,{URLPattern:()=>M});module.exports=Ae(He);var P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,r,n,o,l,f){this.type=t,this.name=r,this.prefix=n,this.value=o,this.suffix=l,this.modifier=f}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};a(P,"Part");var ye=/[$_\p{ID_Start}]/u,we=/[$_\u200C\u200D\p{ID_Continue}]/u,F=".*";function Ce(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}a(Ce,"isASCII");function W(e,t=!1){let r=[],n=0;for(;n<e.length;){let o=e[n],l=a(function(f){if(!t)throw new TypeError(f);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"ErrorOrInvalid");if(o==="*"){r.push({type:"ASTERISK",index:n,value:e[n++]});continue}if(o==="+"||o==="?"){r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});continue}if(o==="\\"){r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if(o==="{"){r.push({type:"OPEN",index:n,value:e[n++]});continue}if(o==="}"){r.push({type:"CLOSE",index:n,value:e[n++]});continue}if(o===":"){let f="",s=n+1;for(;s<e.length;){let i=e.substr(s,1);if(s===n+1&&ye.test(i)||s!==n+1&&we.test(i)){f+=e[s++];continue}break}if(!f){l(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:f}),n=s;continue}if(o==="("){let f=1,s="",i=n+1,c=!1;if(e[i]==="?"){l(`Pattern cannot start with "?" at ${i}`);continue}for(;i<e.length;){if(!Ce(e[i],!1)){l(`Invalid character '${e[i]}' at ${i}.`),c=!0;break}if(e[i]==="\\"){s+=e[i++]+e[i++];continue}if(e[i]===")"){if(f--,f===0){i++;break}}else if(e[i]==="("&&(f++,e[i+1]!=="?")){l(`Capturing groups are not allowed at ${i}`),c=!0;break}s+=e[i++]}if(c)continue;if(f){l(`Unbalanced pattern at ${n}`);continue}if(!s){l(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:s}),n=i;continue}r.push({type:"CHAR",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}a(W,"lexer");function _(e,t={}){let r=W(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${x(t.delimiter)}]+?`,o=[],l=0,f=0,s="",i=new Set,c=a(u=>{if(f<r.length&&r[f].type===u)return r[f++].value},"tryConsume"),h=a(()=>c("OTHER_MODIFIER")??c("ASTERISK"),"tryConsumeModifier"),p=a(u=>{let d=c(u);if(d!==void 0)return d;let{type:g,index:y}=r[f];throw new TypeError(`Unexpected ${g} at ${y}, expected ${u}`)},"mustConsume"),A=a(()=>{let u="",d;for(;d=c("CHAR")??c("ESCAPED_CHAR");)u+=d;return u},"consumeText"),be=a(u=>u,"DefaultEncodePart"),N=t.encodePart||be,H="",v=a(u=>{H+=u},"appendToPendingFixedValue"),D=a(()=>{H.length&&(o.push(new P(3,"","",N(H),"",3)),H="")},"maybeAddPartFromPendingFixedValue"),Z=a((u,d,g,y,B)=>{let m=3;switch(B){case"?":m=1;break;case"*":m=0;break;case"+":m=2;break}if(!d&&!g&&m===3){v(u);return}if(D(),!d&&!g){if(!u)return;o.push(new P(3,"","",N(u),"",m));return}let S;g?g==="*"?S=F:S=g:S=n;let k=2;S===n?(k=1,S=""):S===F&&(k=0,S="");let E;if(d?E=d:g&&(E=l++),i.has(E))throw new TypeError(`Duplicate name '${E}'.`);i.add(E),o.push(new P(k,E,N(u),S,N(y),m))},"addPart");for(;f<r.length;){let u=c("CHAR"),d=c("NAME"),g=c("REGEX");if(!d&&!g&&(g=c("ASTERISK")),d||g){let m=u??"";t.prefixes.indexOf(m)===-1&&(v(m),m=""),D();let S=h();Z(m,d,g,"",S);continue}let y=u??c("ESCAPED_CHAR");if(y){v(y);continue}if(c("OPEN")){let m=A(),S=c("NAME"),k=c("REGEX");!S&&!k&&(k=c("ASTERISK"));let E=A();p("CLOSE");let Pe=h();Z(m,S,k,E,Pe);continue}D(),p("END")}return o}a(_,"parse");function x(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a(x,"escapeString");function q(e){return e&&e.ignoreCase?"ui":"u"}a(q,"flags");function J(e,t,r){return z(_(e,r),t,r)}a(J,"stringToRegexp");function T(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}a(T,"modifierToString");function z(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let s of e){if(s.type===3){s.modifier===3?n+=x(s.value):n+=`(?:${x(s.value)})${T(s.modifier)}`;continue}t&&t.push(s.name);let i=`[^${x(r.delimiter)}]+?`,c=s.value;if(s.type===1?c=i:s.type===0&&(c=F),!s.prefix.length&&!s.suffix.length){s.modifier===3||s.modifier===1?n+=`(${c})${T(s.modifier)}`:n+=`((?:${c})${T(s.modifier)})`;continue}if(s.modifier===3||s.modifier===1){n+=`(?:${x(s.prefix)}(${c})${x(s.suffix)})`,n+=T(s.modifier);continue}n+=`(?:${x(s.prefix)}`,n+=`((?:${c})(?:`,n+=x(s.suffix),n+=x(s.prefix),n+=`(?:${c}))*)${x(s.suffix)})`,s.modifier===0&&(n+="?")}let o=`[${x(r.endsWith)}]|$`,l=`[${x(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${l}?`),r.endsWith.length?n+=`(?=${o})`:n+="$",new RegExp(n,q(r));r.strict||(n+=`(?:${l}(?=${o}))?`);let f=!1;if(e.length){let s=e[e.length-1];s.type===3&&s.modifier===3&&(f=r.delimiter.indexOf(s)>-1)}return f||(n+=`(?=${l}|${o})`),new RegExp(n,q(r))}a(z,"partsToRegexp");var b={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Q={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ee={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function te(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}a(te,"isAbsolutePathname");function re(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}a(re,"maybeStripPrefix");function Le(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}a(Le,"maybeStripSuffix");function j(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}a(j,"treatAsIPv6Hostname");var ne=["ftp","file","http","https","ws","wss"];function $(e){if(!e)return!0;for(let t of ne)if(e.test(t))return!0;return!1}a($,"isSpecialScheme");function se(e,t){if(e=re(e,"#"),t||e==="")return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}a(se,"canonicalizeHash");function ie(e,t){if(e=re(e,"?"),t||e==="")return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}a(ie,"canonicalizeSearch");function ae(e,t){return t||e===""?e:j(e)?V(e):G(e)}a(ae,"canonicalizeHostname");function oe(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.password=e,r.password}a(oe,"canonicalizePassword");function ce(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.username=e,r.username}a(ce,"canonicalizeUsername");function le(e,t,r){if(r||e==="")return e;if(t&&!ne.includes(t))return new URL(`${t}:${e}`).pathname;let n=e[0]=="/";return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}a(le,"canonicalizePathname");function fe(e,t,r){return K(t)===e&&(e=""),r||e===""?e:Y(e)}a(fe,"canonicalizePort");function he(e,t){return e=Le(e,":"),t||e===""?e:w(e)}a(he,"canonicalizeProtocol");function K(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}a(K,"defaultPortForProtocol");function w(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}a(w,"protocolEncodeCallback");function ue(e){if(e==="")return e;let t=new URL("https://example.com");return t.username=e,t.username}a(ue,"usernameEncodeCallback");function de(e){if(e==="")return e;let t=new URL("https://example.com");return t.password=e,t.password}a(de,"passwordEncodeCallback");function G(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}a(G,"hostnameEncodeCallback");function V(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}a(V,"ipv6HostnameEncodeCallback");function Y(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}a(Y,"portEncodeCallback");function pe(e){if(e==="")return e;let t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}a(pe,"standardURLPathnameEncodeCallback");function ge(e){return e===""?e:new URL(`data:${e}`).pathname}a(ge,"pathURLPathnameEncodeCallback");function me(e){if(e==="")return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}a(me,"searchEncodeCallback");function Se(e){if(e==="")return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}a(Se,"hashEncodeCallback");var C=class{#i;#n=[];#t={};#e=0;#s=1;#l=0;#o=0;#d=0;#p=0;#g=!1;constructor(t){this.#i=t}get result(){return this.#t}parse(){for(this.#n=W(this.#i,!0);this.#e<this.#n.length;this.#e+=this.#s){if(this.#s=1,this.#n[this.#e].type==="END"){if(this.#o===0){this.#b(),this.#f()?this.#r(9,1):this.#h()?this.#r(8,1):this.#r(7,0);continue}else if(this.#o===2){this.#u(5);continue}this.#r(10,0);break}if(this.#d>0)if(this.#A())this.#d-=1;else continue;if(this.#T()){this.#d+=1;continue}switch(this.#o){case 0:this.#P()&&this.#u(1);break;case 1:if(this.#P()){this.#C();let t=7,r=1;this.#E()?(t=2,r=3):this.#g&&(t=2),this.#r(t,r)}break;case 2:this.#S()?this.#u(3):(this.#x()||this.#h()||this.#f())&&this.#u(5);break;case 3:this.#O()?this.#r(4,1):this.#S()&&this.#r(5,1);break;case 4:this.#S()&&this.#r(5,1);break;case 5:this.#y()?this.#p+=1:this.#w()&&(this.#p-=1),this.#k()&&!this.#p?this.#r(6,1):this.#x()?this.#r(7,0):this.#h()?this.#r(8,1):this.#f()&&this.#r(9,1);break;case 6:this.#x()?this.#r(7,0):this.#h()?this.#r(8,1):this.#f()&&this.#r(9,1);break;case 7:this.#h()?this.#r(8,1):this.#f()&&this.#r(9,1);break;case 8:this.#f()&&this.#r(9,1);break;case 9:break;case 10:break}}this.#t.hostname!==void 0&&this.#t.port===void 0&&(this.#t.port="")}#r(t,r){switch(this.#o){case 0:break;case 1:this.#t.protocol=this.#c();break;case 2:break;case 3:this.#t.username=this.#c();break;case 4:this.#t.password=this.#c();break;case 5:this.#t.hostname=this.#c();break;case 6:this.#t.port=this.#c();break;case 7:this.#t.pathname=this.#c();break;case 8:this.#t.search=this.#c();break;case 9:this.#t.hash=this.#c();break;case 10:break}this.#o!==0&&t!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(t)&&(this.#t.hostname??=""),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(t)&&(this.#t.pathname??=this.#g?"/":""),[1,2,3,4,5,6,7].includes(this.#o)&&t===9&&(this.#t.search??="")),this.#R(t,r)}#R(t,r){this.#o=t,this.#l=this.#e+r,this.#e+=r,this.#s=0}#b(){this.#e=this.#l,this.#s=0}#u(t){this.#b(),this.#o=t}#m(t){return t<0&&(t=this.#n.length-t),t<this.#n.length?this.#n[t]:this.#n[this.#n.length-1]}#a(t,r){let n=this.#m(t);return n.value===r&&(n.type==="CHAR"||n.type==="ESCAPED_CHAR"||n.type==="INVALID_CHAR")}#P(){return this.#a(this.#e,":")}#E(){return this.#a(this.#e+1,"/")&&this.#a(this.#e+2,"/")}#S(){return this.#a(this.#e,"@")}#O(){return this.#a(this.#e,":")}#k(){return this.#a(this.#e,":")}#x(){return this.#a(this.#e,"/")}#h(){if(this.#a(this.#e,"?"))return!0;if(this.#n[this.#e].value!=="?")return!1;let t=this.#m(this.#e-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}#f(){return this.#a(this.#e,"#")}#T(){return this.#n[this.#e].type=="OPEN"}#A(){return this.#n[this.#e].type=="CLOSE"}#y(){return this.#a(this.#e,"[")}#w(){return this.#a(this.#e,"]")}#c(){let t=this.#n[this.#e],r=this.#m(this.#l).index;return this.#i.substring(r,t.index)}#C(){let t={};Object.assign(t,b),t.encodePart=w;let r=J(this.#c(),void 0,t);this.#g=$(r)}};a(C,"Parser");var X=["protocol","username","password","hostname","port","pathname","search","hash"],O="*";function xe(e,t){if(typeof e!="string")throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:r.search!==""?r.search.substring(1,r.search.length):void 0,hash:r.hash!==""?r.hash.substring(1,r.hash.length):void 0}}a(xe,"extractValues");function R(e,t){return t?I(e):e}a(R,"processBaseURLString");function L(e,t,r){let n;if(typeof t.baseURL=="string")try{n=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=R(n.protocol.substring(0,n.protocol.length-1),r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=R(n.username,r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=R(n.password,r)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=R(n.hostname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=R(n.port,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=R(n.pathname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=R(n.search.substring(1,n.search.length),r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=R(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol=="string"&&(e.protocol=he(t.protocol,r)),typeof t.username=="string"&&(e.username=ce(t.username,r)),typeof t.password=="string"&&(e.password=oe(t.password,r)),typeof t.hostname=="string"&&(e.hostname=ae(t.hostname,r)),typeof t.port=="string"&&(e.port=fe(t.port,e.protocol,r)),typeof t.pathname=="string"){if(e.pathname=t.pathname,n&&!te(e.pathname,r)){let o=n.pathname.lastIndexOf("/");o>=0&&(e.pathname=R(n.pathname.substring(0,o+1),r)+e.pathname)}e.pathname=le(e.pathname,e.protocol,r)}return typeof t.search=="string"&&(e.search=ie(t.search,r)),typeof t.hash=="string"&&(e.hash=se(t.hash,r)),e}a(L,"applyInit");function I(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}a(I,"escapePatternString");function Ie(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a(Ie,"escapeRegexpString");function Ne(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=".*",n=`[^${Ie(t.delimiter)}]+?`,o=/[$_\u200C\u200D\p{ID_Continue}]/u,l="";for(let f=0;f<e.length;++f){let s=e[f];if(s.type===3){if(s.modifier===3){l+=I(s.value);continue}l+=`{${I(s.value)}}${T(s.modifier)}`;continue}let i=s.hasCustomName(),c=!!s.suffix.length||!!s.prefix.length&&(s.prefix.length!==1||!t.prefixes.includes(s.prefix)),h=f>0?e[f-1]:null,p=f<e.length-1?e[f+1]:null;if(!c&&i&&s.type===1&&s.modifier===3&&p&&!p.prefix.length&&!p.suffix.length)if(p.type===3){let A=p.value.length>0?p.value[0]:"";c=o.test(A)}else c=!p.hasCustomName();if(!c&&!s.prefix.length&&h&&h.type===3){let A=h.value[h.value.length-1];c=t.prefixes.includes(A)}c&&(l+="{"),l+=I(s.prefix),i&&(l+=`:${s.name}`),s.type===2?l+=`(${s.value})`:s.type===1?i||(l+=`(${n})`):s.type===0&&(!i&&(!h||h.type===3||h.modifier!==3||c||s.prefix!=="")?l+="*":l+=`(${r})`),s.type===1&&i&&s.suffix.length&&o.test(s.suffix[0])&&(l+="\\"),l+=I(s.suffix),c&&(l+="}"),s.modifier!==3&&(l+=T(s.modifier))}return l}a(Ne,"partsToPattern");var M=class{#i;#n={};#t={};#e={};#s={};#l=!1;constructor(t={},r,n){try{let o;if(typeof r=="string"?o=r:n=r,typeof t=="string"){let i=new C(t);if(i.parse(),t=i.result,o===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=o}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(o)throw new TypeError("parameter 1 is not of type 'string'.")}typeof n>"u"&&(n={ignoreCase:!1});let l={ignoreCase:n.ignoreCase===!0},f={pathname:O,protocol:O,username:O,password:O,hostname:O,port:O,search:O,hash:O};this.#i=L(f,t,!0),K(this.#i.protocol)===this.#i.port&&(this.#i.port="");let s;for(s of X){if(!(s in this.#i))continue;let i={},c=this.#i[s];switch(this.#t[s]=[],s){case"protocol":Object.assign(i,b),i.encodePart=w;break;case"username":Object.assign(i,b),i.encodePart=ue;break;case"password":Object.assign(i,b),i.encodePart=de;break;case"hostname":Object.assign(i,Q),j(c)?i.encodePart=V:i.encodePart=G;break;case"port":Object.assign(i,b),i.encodePart=Y;break;case"pathname":$(this.#n.protocol)?(Object.assign(i,ee,l),i.encodePart=pe):(Object.assign(i,b,l),i.encodePart=ge);break;case"search":Object.assign(i,b,l),i.encodePart=me;break;case"hash":Object.assign(i,b,l),i.encodePart=Se;break}try{this.#s[s]=_(c,i),this.#n[s]=z(this.#s[s],this.#t[s],i),this.#e[s]=Ne(this.#s[s],i),this.#l=this.#l||this.#s[s].some(h=>h.type===2)}catch{throw new TypeError(`invalid ${s} pattern '${this.#i[s]}'.`)}}}catch(o){throw new TypeError(`Failed to construct 'URLPattern': ${o.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(t={},r){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&r)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?n=L(n,t,!1):n=L(n,xe(t,r),!1)}catch{return!1}let o;for(o of X)if(!this.#n[o].exec(n[o]))return!1;return!0}exec(t={},r){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&r)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?n=L(n,t,!1):n=L(n,xe(t,r),!1)}catch{return null}let o={};r?o.inputs=[t,r]:o.inputs=[t];let l;for(l of X){let f=this.#n[l].exec(n[l]);if(!f)return null;let s={};for(let[i,c]of this.#t[l].entries())if(typeof c=="string"||typeof c=="number"){let h=f[i+1];s[c]=h}o[l]={input:n[l]??"",groups:s}}return o}static compareComponent(t,r,n){let o=a((i,c)=>{for(let h of["type","modifier","prefix","value","suffix"]){if(i[h]<c[h])return-1;if(i[h]===c[h])continue;return 1}return 0},"comparePart"),l=new P(3,"","","","",3),f=new P(0,"","","","",3),s=a((i,c)=>{let h=0;for(;h<Math.min(i.length,c.length);++h){let p=o(i[h],c[h]);if(p)return p}return i.length===c.length?0:o(i[h]??l,c[h]??l)},"comparePartList");return!r.#e[t]&&!n.#e[t]?0:r.#e[t]&&!n.#e[t]?s(r.#s[t],[f]):!r.#e[t]&&n.#e[t]?s([f],n.#s[t]):s(r.#s[t],n.#s[t])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#l}};a(M,"URLPattern");
@@ -0,0 +1 @@
1
+ var Pe=Object.defineProperty;var a=(e,t)=>Pe(e,"name",{value:t,configurable:!0});var P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,r,n,c,l,f){this.type=t,this.name=r,this.prefix=n,this.value=c,this.suffix=l,this.modifier=f}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};a(P,"Part");var Re=/[$_\p{ID_Start}]/u,Ee=/[$_\u200C\u200D\p{ID_Continue}]/u,v=".*";function Oe(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}a(Oe,"isASCII");function D(e,t=!1){let r=[],n=0;for(;n<e.length;){let c=e[n],l=a(function(f){if(!t)throw new TypeError(f);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"ErrorOrInvalid");if(c==="*"){r.push({type:"ASTERISK",index:n,value:e[n++]});continue}if(c==="+"||c==="?"){r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});continue}if(c==="\\"){r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if(c==="{"){r.push({type:"OPEN",index:n,value:e[n++]});continue}if(c==="}"){r.push({type:"CLOSE",index:n,value:e[n++]});continue}if(c===":"){let f="",s=n+1;for(;s<e.length;){let i=e.substr(s,1);if(s===n+1&&Re.test(i)||s!==n+1&&Ee.test(i)){f+=e[s++];continue}break}if(!f){l(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:f}),n=s;continue}if(c==="("){let f=1,s="",i=n+1,o=!1;if(e[i]==="?"){l(`Pattern cannot start with "?" at ${i}`);continue}for(;i<e.length;){if(!Oe(e[i],!1)){l(`Invalid character '${e[i]}' at ${i}.`),o=!0;break}if(e[i]==="\\"){s+=e[i++]+e[i++];continue}if(e[i]===")"){if(f--,f===0){i++;break}}else if(e[i]==="("&&(f++,e[i+1]!=="?")){l(`Capturing groups are not allowed at ${i}`),o=!0;break}s+=e[i++]}if(o)continue;if(f){l(`Unbalanced pattern at ${n}`);continue}if(!s){l(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:s}),n=i;continue}r.push({type:"CHAR",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}a(D,"lexer");function F(e,t={}){let r=D(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${x(t.delimiter)}]+?`,c=[],l=0,f=0,s="",i=new Set,o=a(u=>{if(f<r.length&&r[f].type===u)return r[f++].value},"tryConsume"),h=a(()=>o("OTHER_MODIFIER")??o("ASTERISK"),"tryConsumeModifier"),p=a(u=>{let d=o(u);if(d!==void 0)return d;let{type:g,index:y}=r[f];throw new TypeError(`Unexpected ${g} at ${y}, expected ${u}`)},"mustConsume"),A=a(()=>{let u="",d;for(;d=o("CHAR")??o("ESCAPED_CHAR");)u+=d;return u},"consumeText"),xe=a(u=>u,"DefaultEncodePart"),N=t.encodePart||xe,H="",$=a(u=>{H+=u},"appendToPendingFixedValue"),M=a(()=>{H.length&&(c.push(new P(3,"","",N(H),"",3)),H="")},"maybeAddPartFromPendingFixedValue"),X=a((u,d,g,y,Z)=>{let m=3;switch(Z){case"?":m=1;break;case"*":m=0;break;case"+":m=2;break}if(!d&&!g&&m===3){$(u);return}if(M(),!d&&!g){if(!u)return;c.push(new P(3,"","",N(u),"",m));return}let S;g?g==="*"?S=v:S=g:S=n;let k=2;S===n?(k=1,S=""):S===v&&(k=0,S="");let E;if(d?E=d:g&&(E=l++),i.has(E))throw new TypeError(`Duplicate name '${E}'.`);i.add(E),c.push(new P(k,E,N(u),S,N(y),m))},"addPart");for(;f<r.length;){let u=o("CHAR"),d=o("NAME"),g=o("REGEX");if(!d&&!g&&(g=o("ASTERISK")),d||g){let m=u??"";t.prefixes.indexOf(m)===-1&&($(m),m=""),M();let S=h();X(m,d,g,"",S);continue}let y=u??o("ESCAPED_CHAR");if(y){$(y);continue}if(o("OPEN")){let m=A(),S=o("NAME"),k=o("REGEX");!S&&!k&&(k=o("ASTERISK"));let E=A();p("CLOSE");let be=h();X(m,S,k,E,be);continue}M(),p("END")}return c}a(F,"parse");function x(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a(x,"escapeString");function B(e){return e&&e.ignoreCase?"ui":"u"}a(B,"flags");function q(e,t,r){return W(F(e,r),t,r)}a(q,"stringToRegexp");function T(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}a(T,"modifierToString");function W(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let s of e){if(s.type===3){s.modifier===3?n+=x(s.value):n+=`(?:${x(s.value)})${T(s.modifier)}`;continue}t&&t.push(s.name);let i=`[^${x(r.delimiter)}]+?`,o=s.value;if(s.type===1?o=i:s.type===0&&(o=v),!s.prefix.length&&!s.suffix.length){s.modifier===3||s.modifier===1?n+=`(${o})${T(s.modifier)}`:n+=`((?:${o})${T(s.modifier)})`;continue}if(s.modifier===3||s.modifier===1){n+=`(?:${x(s.prefix)}(${o})${x(s.suffix)})`,n+=T(s.modifier);continue}n+=`(?:${x(s.prefix)}`,n+=`((?:${o})(?:`,n+=x(s.suffix),n+=x(s.prefix),n+=`(?:${o}))*)${x(s.suffix)})`,s.modifier===0&&(n+="?")}let c=`[${x(r.endsWith)}]|$`,l=`[${x(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${l}?`),r.endsWith.length?n+=`(?=${c})`:n+="$",new RegExp(n,B(r));r.strict||(n+=`(?:${l}(?=${c}))?`);let f=!1;if(e.length){let s=e[e.length-1];s.type===3&&s.modifier===3&&(f=r.delimiter.indexOf(s)>-1)}return f||(n+=`(?=${l}|${c})`),new RegExp(n,B(r))}a(W,"partsToRegexp");var b={delimiter:"",prefixes:"",sensitive:!0,strict:!0},J={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Q={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ee(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}a(ee,"isAbsolutePathname");function te(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}a(te,"maybeStripPrefix");function ke(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}a(ke,"maybeStripSuffix");function _(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}a(_,"treatAsIPv6Hostname");var re=["ftp","file","http","https","ws","wss"];function U(e){if(!e)return!0;for(let t of re)if(e.test(t))return!0;return!1}a(U,"isSpecialScheme");function ne(e,t){if(e=te(e,"#"),t||e==="")return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}a(ne,"canonicalizeHash");function se(e,t){if(e=te(e,"?"),t||e==="")return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}a(se,"canonicalizeSearch");function ie(e,t){return t||e===""?e:_(e)?K(e):j(e)}a(ie,"canonicalizeHostname");function ae(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.password=e,r.password}a(ae,"canonicalizePassword");function oe(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.username=e,r.username}a(oe,"canonicalizeUsername");function ce(e,t,r){if(r||e==="")return e;if(t&&!re.includes(t))return new URL(`${t}:${e}`).pathname;let n=e[0]=="/";return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}a(ce,"canonicalizePathname");function le(e,t,r){return z(t)===e&&(e=""),r||e===""?e:G(e)}a(le,"canonicalizePort");function fe(e,t){return e=ke(e,":"),t||e===""?e:w(e)}a(fe,"canonicalizeProtocol");function z(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}a(z,"defaultPortForProtocol");function w(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}a(w,"protocolEncodeCallback");function he(e){if(e==="")return e;let t=new URL("https://example.com");return t.username=e,t.username}a(he,"usernameEncodeCallback");function ue(e){if(e==="")return e;let t=new URL("https://example.com");return t.password=e,t.password}a(ue,"passwordEncodeCallback");function j(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}a(j,"hostnameEncodeCallback");function K(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}a(K,"ipv6HostnameEncodeCallback");function G(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}a(G,"portEncodeCallback");function de(e){if(e==="")return e;let t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}a(de,"standardURLPathnameEncodeCallback");function pe(e){return e===""?e:new URL(`data:${e}`).pathname}a(pe,"pathURLPathnameEncodeCallback");function ge(e){if(e==="")return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}a(ge,"searchEncodeCallback");function me(e){if(e==="")return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}a(me,"hashEncodeCallback");var C=class{#i;#n=[];#t={};#e=0;#s=1;#l=0;#o=0;#d=0;#p=0;#g=!1;constructor(t){this.#i=t}get result(){return this.#t}parse(){for(this.#n=D(this.#i,!0);this.#e<this.#n.length;this.#e+=this.#s){if(this.#s=1,this.#n[this.#e].type==="END"){if(this.#o===0){this.#b(),this.#f()?this.#r(9,1):this.#h()?this.#r(8,1):this.#r(7,0);continue}else if(this.#o===2){this.#u(5);continue}this.#r(10,0);break}if(this.#d>0)if(this.#A())this.#d-=1;else continue;if(this.#T()){this.#d+=1;continue}switch(this.#o){case 0:this.#P()&&this.#u(1);break;case 1:if(this.#P()){this.#C();let t=7,r=1;this.#E()?(t=2,r=3):this.#g&&(t=2),this.#r(t,r)}break;case 2:this.#S()?this.#u(3):(this.#x()||this.#h()||this.#f())&&this.#u(5);break;case 3:this.#O()?this.#r(4,1):this.#S()&&this.#r(5,1);break;case 4:this.#S()&&this.#r(5,1);break;case 5:this.#y()?this.#p+=1:this.#w()&&(this.#p-=1),this.#k()&&!this.#p?this.#r(6,1):this.#x()?this.#r(7,0):this.#h()?this.#r(8,1):this.#f()&&this.#r(9,1);break;case 6:this.#x()?this.#r(7,0):this.#h()?this.#r(8,1):this.#f()&&this.#r(9,1);break;case 7:this.#h()?this.#r(8,1):this.#f()&&this.#r(9,1);break;case 8:this.#f()&&this.#r(9,1);break;case 9:break;case 10:break}}this.#t.hostname!==void 0&&this.#t.port===void 0&&(this.#t.port="")}#r(t,r){switch(this.#o){case 0:break;case 1:this.#t.protocol=this.#c();break;case 2:break;case 3:this.#t.username=this.#c();break;case 4:this.#t.password=this.#c();break;case 5:this.#t.hostname=this.#c();break;case 6:this.#t.port=this.#c();break;case 7:this.#t.pathname=this.#c();break;case 8:this.#t.search=this.#c();break;case 9:this.#t.hash=this.#c();break;case 10:break}this.#o!==0&&t!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(t)&&(this.#t.hostname??=""),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(t)&&(this.#t.pathname??=this.#g?"/":""),[1,2,3,4,5,6,7].includes(this.#o)&&t===9&&(this.#t.search??="")),this.#R(t,r)}#R(t,r){this.#o=t,this.#l=this.#e+r,this.#e+=r,this.#s=0}#b(){this.#e=this.#l,this.#s=0}#u(t){this.#b(),this.#o=t}#m(t){return t<0&&(t=this.#n.length-t),t<this.#n.length?this.#n[t]:this.#n[this.#n.length-1]}#a(t,r){let n=this.#m(t);return n.value===r&&(n.type==="CHAR"||n.type==="ESCAPED_CHAR"||n.type==="INVALID_CHAR")}#P(){return this.#a(this.#e,":")}#E(){return this.#a(this.#e+1,"/")&&this.#a(this.#e+2,"/")}#S(){return this.#a(this.#e,"@")}#O(){return this.#a(this.#e,":")}#k(){return this.#a(this.#e,":")}#x(){return this.#a(this.#e,"/")}#h(){if(this.#a(this.#e,"?"))return!0;if(this.#n[this.#e].value!=="?")return!1;let t=this.#m(this.#e-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}#f(){return this.#a(this.#e,"#")}#T(){return this.#n[this.#e].type=="OPEN"}#A(){return this.#n[this.#e].type=="CLOSE"}#y(){return this.#a(this.#e,"[")}#w(){return this.#a(this.#e,"]")}#c(){let t=this.#n[this.#e],r=this.#m(this.#l).index;return this.#i.substring(r,t.index)}#C(){let t={};Object.assign(t,b),t.encodePart=w;let r=q(this.#c(),void 0,t);this.#g=U(r)}};a(C,"Parser");var V=["protocol","username","password","hostname","port","pathname","search","hash"],O="*";function Se(e,t){if(typeof e!="string")throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:r.search!==""?r.search.substring(1,r.search.length):void 0,hash:r.hash!==""?r.hash.substring(1,r.hash.length):void 0}}a(Se,"extractValues");function R(e,t){return t?I(e):e}a(R,"processBaseURLString");function L(e,t,r){let n;if(typeof t.baseURL=="string")try{n=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=R(n.protocol.substring(0,n.protocol.length-1),r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=R(n.username,r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=R(n.password,r)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=R(n.hostname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=R(n.port,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=R(n.pathname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=R(n.search.substring(1,n.search.length),r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=R(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol=="string"&&(e.protocol=fe(t.protocol,r)),typeof t.username=="string"&&(e.username=oe(t.username,r)),typeof t.password=="string"&&(e.password=ae(t.password,r)),typeof t.hostname=="string"&&(e.hostname=ie(t.hostname,r)),typeof t.port=="string"&&(e.port=le(t.port,e.protocol,r)),typeof t.pathname=="string"){if(e.pathname=t.pathname,n&&!ee(e.pathname,r)){let c=n.pathname.lastIndexOf("/");c>=0&&(e.pathname=R(n.pathname.substring(0,c+1),r)+e.pathname)}e.pathname=ce(e.pathname,e.protocol,r)}return typeof t.search=="string"&&(e.search=se(t.search,r)),typeof t.hash=="string"&&(e.hash=ne(t.hash,r)),e}a(L,"applyInit");function I(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}a(I,"escapePatternString");function Te(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}a(Te,"escapeRegexpString");function Ae(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=".*",n=`[^${Te(t.delimiter)}]+?`,c=/[$_\u200C\u200D\p{ID_Continue}]/u,l="";for(let f=0;f<e.length;++f){let s=e[f];if(s.type===3){if(s.modifier===3){l+=I(s.value);continue}l+=`{${I(s.value)}}${T(s.modifier)}`;continue}let i=s.hasCustomName(),o=!!s.suffix.length||!!s.prefix.length&&(s.prefix.length!==1||!t.prefixes.includes(s.prefix)),h=f>0?e[f-1]:null,p=f<e.length-1?e[f+1]:null;if(!o&&i&&s.type===1&&s.modifier===3&&p&&!p.prefix.length&&!p.suffix.length)if(p.type===3){let A=p.value.length>0?p.value[0]:"";o=c.test(A)}else o=!p.hasCustomName();if(!o&&!s.prefix.length&&h&&h.type===3){let A=h.value[h.value.length-1];o=t.prefixes.includes(A)}o&&(l+="{"),l+=I(s.prefix),i&&(l+=`:${s.name}`),s.type===2?l+=`(${s.value})`:s.type===1?i||(l+=`(${n})`):s.type===0&&(!i&&(!h||h.type===3||h.modifier!==3||o||s.prefix!=="")?l+="*":l+=`(${r})`),s.type===1&&i&&s.suffix.length&&c.test(s.suffix[0])&&(l+="\\"),l+=I(s.suffix),o&&(l+="}"),s.modifier!==3&&(l+=T(s.modifier))}return l}a(Ae,"partsToPattern");var Y=class{#i;#n={};#t={};#e={};#s={};#l=!1;constructor(t={},r,n){try{let c;if(typeof r=="string"?c=r:n=r,typeof t=="string"){let i=new C(t);if(i.parse(),t=i.result,c===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=c}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(c)throw new TypeError("parameter 1 is not of type 'string'.")}typeof n>"u"&&(n={ignoreCase:!1});let l={ignoreCase:n.ignoreCase===!0},f={pathname:O,protocol:O,username:O,password:O,hostname:O,port:O,search:O,hash:O};this.#i=L(f,t,!0),z(this.#i.protocol)===this.#i.port&&(this.#i.port="");let s;for(s of V){if(!(s in this.#i))continue;let i={},o=this.#i[s];switch(this.#t[s]=[],s){case"protocol":Object.assign(i,b),i.encodePart=w;break;case"username":Object.assign(i,b),i.encodePart=he;break;case"password":Object.assign(i,b),i.encodePart=ue;break;case"hostname":Object.assign(i,J),_(o)?i.encodePart=K:i.encodePart=j;break;case"port":Object.assign(i,b),i.encodePart=G;break;case"pathname":U(this.#n.protocol)?(Object.assign(i,Q,l),i.encodePart=de):(Object.assign(i,b,l),i.encodePart=pe);break;case"search":Object.assign(i,b,l),i.encodePart=ge;break;case"hash":Object.assign(i,b,l),i.encodePart=me;break}try{this.#s[s]=F(o,i),this.#n[s]=W(this.#s[s],this.#t[s],i),this.#e[s]=Ae(this.#s[s],i),this.#l=this.#l||this.#s[s].some(h=>h.type===2)}catch{throw new TypeError(`invalid ${s} pattern '${this.#i[s]}'.`)}}}catch(c){throw new TypeError(`Failed to construct 'URLPattern': ${c.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(t={},r){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&r)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?n=L(n,t,!1):n=L(n,Se(t,r),!1)}catch{return!1}let c;for(c of V)if(!this.#n[c].exec(n[c]))return!1;return!0}exec(t={},r){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&r)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?n=L(n,t,!1):n=L(n,Se(t,r),!1)}catch{return null}let c={};r?c.inputs=[t,r]:c.inputs=[t];let l;for(l of V){let f=this.#n[l].exec(n[l]);if(!f)return null;let s={};for(let[i,o]of this.#t[l].entries())if(typeof o=="string"||typeof o=="number"){let h=f[i+1];s[o]=h}c[l]={input:n[l]??"",groups:s}}return c}static compareComponent(t,r,n){let c=a((i,o)=>{for(let h of["type","modifier","prefix","value","suffix"]){if(i[h]<o[h])return-1;if(i[h]===o[h])continue;return 1}return 0},"comparePart"),l=new P(3,"","","","",3),f=new P(0,"","","","",3),s=a((i,o)=>{let h=0;for(;h<Math.min(i.length,o.length);++h){let p=c(i[h],o[h]);if(p)return p}return i.length===o.length?0:c(i[h]??l,o[h]??l)},"comparePartList");return!r.#e[t]&&!n.#e[t]?0:r.#e[t]&&!n.#e[t]?s(r.#s[t],[f]):!r.#e[t]&&n.#e[t]?s([f],n.#s[t]):s(r.#s[t],n.#s[t])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#l}};a(Y,"URLPattern");export{Y as URLPattern};
@@ -0,0 +1,7 @@
1
+ const { URLPattern } = require("./dist/urlpattern.cjs");
2
+
3
+ module.exports = { URLPattern };
4
+
5
+ if (!globalThis.URLPattern) {
6
+ globalThis.URLPattern = URLPattern;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { URLPattern } from "./dist/urlpattern.js";
2
+
3
+ export { URLPattern };
4
+
5
+ if (!globalThis.URLPattern) {
6
+ globalThis.URLPattern = URLPattern;
7
+ }
@@ -0,0 +1,149 @@
1
+ {
2
+ "name": "urlpattern-polyfill",
3
+ "version": "10.1.0",
4
+ "description": "Polyfill for the URLPattern API",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/kenchris/urlpattern-polyfill"
8
+ },
9
+ "type": "module",
10
+ "main": "./index.cjs",
11
+ "module": "./index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ "./urlpattern": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/urlpattern.js",
17
+ "require": "./dist/urlpattern.cjs"
18
+ },
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./index.js",
22
+ "require": "./index.cjs"
23
+ }
24
+ },
25
+ "tags": [
26
+ "url",
27
+ "urlpattern",
28
+ "url-pattern",
29
+ "browser",
30
+ "node",
31
+ "polyfill",
32
+ "w3c",
33
+ "wicg"
34
+ ],
35
+ "files": [
36
+ "dist",
37
+ "index.js",
38
+ "index.cjs"
39
+ ],
40
+ "devDependencies": {
41
+ "@ava/typescript": "^4.0.0",
42
+ "ava": "^5.3.0",
43
+ "esbuild": "^0.17.19",
44
+ "rimraf": "^5.0.1",
45
+ "typescript": "^5.1.3",
46
+ "wireit": "^0.9.5"
47
+ },
48
+ "ava": {
49
+ "files": [
50
+ "test/**/*",
51
+ "!test/wpt"
52
+ ],
53
+ "typescript": {
54
+ "rewritePaths": {
55
+ "src/": "dist/"
56
+ },
57
+ "compile": false
58
+ }
59
+ },
60
+ "scripts": {
61
+ "build": "wireit",
62
+ "sync-wpt": "wireit",
63
+ "test": "wireit",
64
+ "manual-test": "wireit",
65
+ "publish-dev": "wireit",
66
+ "publish-patch": "wireit",
67
+ "publish-major": "wireit"
68
+ },
69
+ "wireit": {
70
+ "build:esm": {
71
+ "command": "esbuild --bundle --format=esm src/url-pattern.ts --outfile=dist/urlpattern.js --minify --keep-names --target=es2022",
72
+ "output": [
73
+ "dist/urlpattern.js"
74
+ ],
75
+ "files": [
76
+ "src/**/*"
77
+ ]
78
+ },
79
+ "build:cjs": {
80
+ "command": "esbuild --bundle --format=cjs src/url-pattern.ts --outfile=dist/urlpattern.cjs --minify --keep-names --target=es2022",
81
+ "output": [
82
+ "dist/urlpattern.cjs"
83
+ ],
84
+ "files": [
85
+ "src/**/*"
86
+ ]
87
+ },
88
+ "copyTypeFiles": {
89
+ "command": "cp ./src/index.d.ts ./src/types.d.ts ./dist",
90
+ "output": [
91
+ "dist/index.d.ts",
92
+ "dist/types.d.ts"
93
+ ],
94
+ "dependencies": [
95
+ "build:esm",
96
+ "build:cjs"
97
+ ]
98
+ },
99
+ "build": {
100
+ "dependencies": [
101
+ "copyTypeFiles"
102
+ ]
103
+ },
104
+ "prepFakeNodeModules": {
105
+ "command": "rm -rf node_modules/urlpattern-polyfill; ln -s $(pwd) node_modules/urlpattern-polyfill"
106
+ },
107
+ "sync-wpt": {
108
+ "command": "cd test && wget http://wpt.live/urlpattern/resources/urlpatterntestdata.json && wget http://wpt.live/urlpattern/resources/urlpattern-compare-test-data.json"
109
+ },
110
+ "test": {
111
+ "command": "ava --timeout=60s",
112
+ "watch": "test/**/*",
113
+ "files": [
114
+ "test/**/*"
115
+ ],
116
+ "dependencies": [
117
+ "prepFakeNodeModules",
118
+ "build"
119
+ ]
120
+ },
121
+ "manual-test": {
122
+ "command": "npx http-server -o /index.html -p 4203",
123
+ "dependencies": [
124
+ "test"
125
+ ]
126
+ },
127
+ "publish-dev": {
128
+ "command": "VERSION=${npm_package_version%-*}-dev.`git rev-parse --short HEAD` && npm version --no-git-tag-version $VERSION && npm publish --tag dev",
129
+ "dependencies": [
130
+ "test"
131
+ ]
132
+ },
133
+ "publish-patch": {
134
+ "command": "npm version patch && npm publish",
135
+ "dependencies": [
136
+ "test"
137
+ ]
138
+ },
139
+ "publish-major": {
140
+ "command": "npm version major && npm publish",
141
+ "dependencies": [
142
+ "test"
143
+ ]
144
+ }
145
+ },
146
+ "author": "",
147
+ "license": "MIT",
148
+ "dependencies": {}
149
+ }
@@ -9,4 +9,4 @@
9
9
  // previously lived as a literal inside preload.mjs, which `make version` patched,
10
10
  // while the worker carried a hand-maintained "…-compat" copy that `make version`
11
11
  // never touched — a latent staleness bug this module closes.)
12
- export const NUB_VERSION = "0.0.7";
12
+ export const NUB_VERSION = "0.0.8";