@shopify/shop-minis-react 0.0.20 → 0.0.22

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 (216) hide show
  1. package/dist/_virtual/___vite-browser-external.js +7 -0
  2. package/dist/_virtual/___vite-browser-external.js.map +1 -0
  3. package/dist/_virtual/__vite-browser-external.js +5 -0
  4. package/dist/_virtual/__vite-browser-external.js.map +1 -0
  5. package/dist/_virtual/_commonjsHelpers.js +24 -4
  6. package/dist/_virtual/_commonjsHelpers.js.map +1 -1
  7. package/dist/_virtual/browser-index.js +8 -0
  8. package/dist/_virtual/browser-index.js.map +1 -0
  9. package/dist/_virtual/browser-index2.js +5 -0
  10. package/dist/_virtual/browser-index2.js.map +1 -0
  11. package/dist/_virtual/clock.js +6 -0
  12. package/dist/_virtual/clock.js.map +1 -0
  13. package/dist/_virtual/conventions.js +5 -0
  14. package/dist/_virtual/conventions.js.map +1 -0
  15. package/dist/_virtual/document.js +8 -0
  16. package/dist/_virtual/document.js.map +1 -0
  17. package/dist/_virtual/dom-parser.js +5 -0
  18. package/dist/_virtual/dom-parser.js.map +1 -0
  19. package/dist/_virtual/dom.js +5 -0
  20. package/dist/_virtual/dom.js.map +1 -0
  21. package/dist/_virtual/entities.js +5 -0
  22. package/dist/_virtual/entities.js.map +1 -0
  23. package/dist/_virtual/extends.js +5 -0
  24. package/dist/_virtual/extends.js.map +1 -0
  25. package/dist/_virtual/index10.js +5 -0
  26. package/dist/_virtual/index10.js.map +1 -0
  27. package/dist/_virtual/index11.js +5 -0
  28. package/dist/_virtual/index11.js.map +1 -0
  29. package/dist/_virtual/index2.js +5 -2
  30. package/dist/_virtual/index2.js.map +1 -1
  31. package/dist/_virtual/index3.js +5 -3
  32. package/dist/_virtual/index3.js.map +1 -1
  33. package/dist/_virtual/index5.js +6 -0
  34. package/dist/_virtual/index5.js.map +1 -0
  35. package/dist/_virtual/index6.js +6 -0
  36. package/dist/_virtual/index6.js.map +1 -0
  37. package/dist/_virtual/index7.js +5 -0
  38. package/dist/_virtual/index7.js.map +1 -0
  39. package/dist/_virtual/index8.js +5 -0
  40. package/dist/_virtual/index8.js.map +1 -0
  41. package/dist/_virtual/index9.js +5 -0
  42. package/dist/_virtual/index9.js.map +1 -0
  43. package/dist/_virtual/parse-sidx.js +8 -0
  44. package/dist/_virtual/parse-sidx.js.map +1 -0
  45. package/dist/_virtual/sax.js +5 -0
  46. package/dist/_virtual/sax.js.map +1 -0
  47. package/dist/_virtual/window.js +8 -0
  48. package/dist/_virtual/window.js.map +1 -0
  49. package/dist/components/atoms/video-player.js +121 -0
  50. package/dist/components/atoms/video-player.js.map +1 -0
  51. package/dist/components/commerce/merchant-card.js +236 -106
  52. package/dist/components/commerce/merchant-card.js.map +1 -1
  53. package/dist/hooks/storage/useImageUpload.js.map +1 -1
  54. package/dist/hooks/util/useErrorScreen.js.map +1 -1
  55. package/dist/hooks/util/useErrorToast.js.map +1 -1
  56. package/dist/index.js +205 -195
  57. package/dist/index.js.map +1 -1
  58. package/dist/mocks.js +114 -87
  59. package/dist/mocks.js.map +1 -1
  60. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/extends.js +20 -0
  61. package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/extends.js.map +1 -0
  62. package/dist/shop-minis-react/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
  63. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/byte-helpers.js +79 -0
  64. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/byte-helpers.js.map +1 -0
  65. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/codecs.js +102 -0
  66. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/codecs.js.map +1 -0
  67. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/containers.js +149 -0
  68. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/containers.js.map +1 -0
  69. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js +13 -0
  70. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js.map +1 -0
  71. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/ebml-helpers.js +77 -0
  72. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/ebml-helpers.js.map +1 -0
  73. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/id3-helpers.js +15 -0
  74. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/id3-helpers.js.map +1 -0
  75. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/media-groups.js +13 -0
  76. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/media-groups.js.map +1 -0
  77. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/media-types.js +7 -0
  78. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/media-types.js.map +1 -0
  79. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/mp4-helpers.js +31 -0
  80. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/mp4-helpers.js.map +1 -0
  81. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/nal-helpers.js +39 -0
  82. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/nal-helpers.js.map +1 -0
  83. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/resolve-url.js +14 -0
  84. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/resolve-url.js.map +1 -0
  85. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/stream.js +33 -0
  86. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/stream.js.map +1 -0
  87. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/http-handler.js +42 -0
  88. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/http-handler.js.map +1 -0
  89. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js +169 -0
  90. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js.map +1 -0
  91. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/interceptors.js +75 -0
  92. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/interceptors.js.map +1 -0
  93. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/retry.js +70 -0
  94. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/retry.js.map +1 -0
  95. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/conventions.js +124 -0
  96. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/conventions.js.map +1 -0
  97. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/dom-parser.js +151 -0
  98. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/dom-parser.js.map +1 -0
  99. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/dom.js +993 -0
  100. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/dom.js.map +1 -0
  101. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/entities.js +2146 -0
  102. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/entities.js.map +1 -0
  103. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js +14 -0
  104. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js.map +1 -0
  105. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/sax.js +346 -0
  106. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/sax.js.map +1 -0
  107. package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +308 -0
  108. package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js.map +1 -0
  109. package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +41 -0
  110. package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js.map +1 -0
  111. package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +53 -0
  112. package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js.map +1 -0
  113. package/dist/shop-minis-react/node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +157 -0
  114. package/dist/shop-minis-react/node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js.map +1 -0
  115. package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js +103 -0
  116. package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js.map +1 -0
  117. package/dist/shop-minis-react/node_modules/.pnpm/color@4.2.3/node_modules/color/index.js +269 -0
  118. package/dist/shop-minis-react/node_modules/.pnpm/color@4.2.3/node_modules/color/index.js.map +1 -0
  119. package/dist/shop-minis-react/node_modules/.pnpm/global@4.4.0/node_modules/global/document.js +13 -0
  120. package/dist/shop-minis-react/node_modules/.pnpm/global@4.4.0/node_modules/global/document.js.map +1 -0
  121. package/dist/shop-minis-react/node_modules/.pnpm/global@4.4.0/node_modules/global/window.js +12 -0
  122. package/dist/shop-minis-react/node_modules/.pnpm/global@4.4.0/node_modules/global/window.js.map +1 -0
  123. package/dist/shop-minis-react/node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js +10 -0
  124. package/dist/shop-minis-react/node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js.map +1 -0
  125. package/dist/shop-minis-react/node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js +18 -0
  126. package/dist/shop-minis-react/node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js.map +1 -0
  127. package/dist/shop-minis-react/node_modules/.pnpm/m3u8-parser@7.2.0/node_modules/m3u8-parser/dist/m3u8-parser.es.js +855 -0
  128. package/dist/shop-minis-react/node_modules/.pnpm/m3u8-parser@7.2.0/node_modules/m3u8-parser/dist/m3u8-parser.es.js.map +1 -0
  129. package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js +1102 -0
  130. package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js.map +1 -0
  131. package/dist/shop-minis-react/node_modules/.pnpm/mux.js@7.1.0/node_modules/mux.js/lib/tools/parse-sidx.js +32 -0
  132. package/dist/shop-minis-react/node_modules/.pnpm/mux.js@7.1.0/node_modules/mux.js/lib/tools/parse-sidx.js.map +1 -0
  133. package/dist/shop-minis-react/node_modules/.pnpm/mux.js@7.1.0/node_modules/mux.js/lib/utils/clock.js +34 -0
  134. package/dist/shop-minis-react/node_modules/.pnpm/mux.js@7.1.0/node_modules/mux.js/lib/utils/clock.js.map +1 -0
  135. package/dist/shop-minis-react/node_modules/.pnpm/mux.js@7.1.0/node_modules/mux.js/lib/utils/numbers.js +17 -0
  136. package/dist/shop-minis-react/node_modules/.pnpm/mux.js@7.1.0/node_modules/mux.js/lib/utils/numbers.js.map +1 -0
  137. package/dist/shop-minis-react/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js +1 -1
  138. package/dist/shop-minis-react/node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js +23 -0
  139. package/dist/shop-minis-react/node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js.map +1 -0
  140. package/dist/shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js +1 -1
  141. package/dist/shop-minis-react/node_modules/.pnpm/video.js@8.23.3/node_modules/video.js/dist/video.es.js +27824 -0
  142. package/dist/shop-minis-react/node_modules/.pnpm/video.js@8.23.3/node_modules/video.js/dist/video.es.js.map +1 -0
  143. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/browser-index.js +26 -0
  144. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/browser-index.js.map +1 -0
  145. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/vtt.js +802 -0
  146. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/vtt.js.map +1 -0
  147. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/vttcue.js +188 -0
  148. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/vttcue.js.map +1 -0
  149. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/vttregion.js +104 -0
  150. package/dist/shop-minis-react/node_modules/.pnpm/videojs-vtt.js@0.15.5/node_modules/videojs-vtt.js/lib/vttregion.js.map +1 -0
  151. package/dist/shop-minis-react.css +1 -1
  152. package/dist/utils/colors.js +6 -0
  153. package/dist/utils/colors.js.map +1 -0
  154. package/dist/utils/merchant-card.js +44 -0
  155. package/dist/utils/merchant-card.js.map +1 -0
  156. package/package.json +6 -2
  157. package/src/components/atoms/video-player.tsx +213 -0
  158. package/src/components/commerce/merchant-card.tsx +219 -49
  159. package/src/components/index.ts +2 -0
  160. package/src/hooks/storage/useImageUpload.ts +3 -2
  161. package/src/hooks/util/useErrorScreen.ts +2 -1
  162. package/src/hooks/util/useErrorToast.ts +2 -1
  163. package/src/mocks.ts +148 -16
  164. package/src/stories/MerchantCard.stories.tsx +63 -9
  165. package/src/utils/colors.ts +5 -0
  166. package/src/utils/index.ts +1 -0
  167. package/src/utils/merchant-card.ts +99 -0
  168. package/src/hooks/navigation/useCloseMini.doc.ts +0 -32
  169. package/src/hooks/navigation/useCloseMini.example.tsx +0 -7
  170. package/src/hooks/navigation/useDeeplink.doc.ts +0 -32
  171. package/src/hooks/navigation/useDeeplink.example.tsx +0 -7
  172. package/src/hooks/navigation/useShopNavigation.doc.ts +0 -32
  173. package/src/hooks/navigation/useShopNavigation.example.tsx +0 -29
  174. package/src/hooks/product/useCuratedProducts.doc.ts +0 -32
  175. package/src/hooks/product/useCuratedProducts.example.tsx +0 -10
  176. package/src/hooks/product/useProductList.doc.ts +0 -32
  177. package/src/hooks/product/useProductList.example.tsx +0 -9
  178. package/src/hooks/product/useProductListActions.doc.ts +0 -32
  179. package/src/hooks/product/useProductListActions.example.tsx +0 -57
  180. package/src/hooks/product/useProductLists.doc.ts +0 -32
  181. package/src/hooks/product/useProductLists.example.tsx +0 -9
  182. package/src/hooks/product/useProductSearch.doc.ts +0 -32
  183. package/src/hooks/product/useProductSearch.example.tsx +0 -13
  184. package/src/hooks/product/useRecommendedProducts.doc.ts +0 -32
  185. package/src/hooks/product/useRecommendedProducts.example.tsx +0 -7
  186. package/src/hooks/shop/useRecommendedShops.doc.ts +0 -32
  187. package/src/hooks/shop/useRecommendedShops.example.tsx +0 -7
  188. package/src/hooks/shop/useShop.doc.ts +0 -31
  189. package/src/hooks/shop/useShop.example.tsx +0 -7
  190. package/src/hooks/shop/useShopCartActions.doc.ts +0 -32
  191. package/src/hooks/shop/useShopCartActions.example.tsx +0 -28
  192. package/src/hooks/storage/useAsyncStorage.doc.ts +0 -32
  193. package/src/hooks/storage/useAsyncStorage.example.tsx +0 -30
  194. package/src/hooks/storage/useImageUpload.doc.ts +0 -32
  195. package/src/hooks/storage/useImageUpload.example.tsx +0 -20
  196. package/src/hooks/storage/useSecureStorage.doc.ts +0 -32
  197. package/src/hooks/storage/useSecureStorage.example.tsx +0 -23
  198. package/src/hooks/user/useBuyerAttributes.doc.ts +0 -32
  199. package/src/hooks/user/useBuyerAttributes.example.tsx +0 -14
  200. package/src/hooks/user/useCurrentUser.doc.ts +0 -31
  201. package/src/hooks/user/useCurrentUser.example.tsx +0 -7
  202. package/src/hooks/user/useFollowedShopsActions.doc.ts +0 -32
  203. package/src/hooks/user/useFollowedShopsActions.example.tsx +0 -18
  204. package/src/hooks/user/useOrders.doc.ts +0 -32
  205. package/src/hooks/user/useOrders.example.tsx +0 -7
  206. package/src/hooks/user/useRecentProducts.doc.ts +0 -32
  207. package/src/hooks/user/useRecentProducts.example.tsx +0 -13
  208. package/src/hooks/user/useSavedProducts.doc.ts +0 -32
  209. package/src/hooks/user/useSavedProducts.example.tsx +0 -13
  210. package/src/hooks/user/useSavedProductsActions.doc.ts +0 -32
  211. package/src/hooks/user/useSavedProductsActions.example.tsx +0 -30
  212. package/src/hooks/util/useErrorScreen.doc.ts +0 -32
  213. package/src/hooks/util/useErrorScreen.example.tsx +0 -16
  214. package/src/hooks/util/useErrorToast.doc.ts +0 -32
  215. package/src/hooks/util/useErrorToast.example.tsx +0 -15
  216. package/src/hooks/util/useImagePicker.example.tsx +0 -85
@@ -0,0 +1,993 @@
1
+ import { __exports as S } from "../../../../../../../../_virtual/dom.js";
2
+ import { __require as We } from "./conventions.js";
3
+ var Me;
4
+ function Ze() {
5
+ if (Me) return S;
6
+ Me = 1;
7
+ var ie = We(), v = ie.find, B = ie.NAMESPACE;
8
+ function Ue(e) {
9
+ return e !== "";
10
+ }
11
+ function Pe(e) {
12
+ return e ? e.split(/[\t\n\f\r ]+/).filter(Ue) : [];
13
+ }
14
+ function Be(e, t) {
15
+ return e.hasOwnProperty(t) || (e[t] = !0), e;
16
+ }
17
+ function oe(e) {
18
+ if (!e) return [];
19
+ var t = Pe(e);
20
+ return Object.keys(t.reduce(Be, {}));
21
+ }
22
+ function Ve(e) {
23
+ return function(t) {
24
+ return e && e.indexOf(t) !== -1;
25
+ };
26
+ }
27
+ function V(e, t) {
28
+ for (var n in e)
29
+ Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
30
+ }
31
+ function p(e, t) {
32
+ var n = e.prototype;
33
+ if (!(n instanceof t)) {
34
+ let r = function() {
35
+ };
36
+ r.prototype = t.prototype, r = new r(), V(n, r), e.prototype = n = r;
37
+ }
38
+ n.constructor != e && (typeof e != "function" && console.error("unknown Class:" + e), n.constructor = e);
39
+ }
40
+ var h = {}, E = h.ELEMENT_NODE = 1, b = h.ATTRIBUTE_NODE = 2, G = h.TEXT_NODE = 3, ae = h.CDATA_SECTION_NODE = 4, ue = h.ENTITY_REFERENCE_NODE = 5, ke = h.ENTITY_NODE = 6, se = h.PROCESSING_INSTRUCTION_NODE = 7, fe = h.COMMENT_NODE = 8, le = h.DOCUMENT_NODE = 9, ce = h.DOCUMENT_TYPE_NODE = 10, y = h.DOCUMENT_FRAGMENT_NODE = 11, je = h.NOTATION_NODE = 12, l = {}, f = {};
41
+ l.INDEX_SIZE_ERR = (f[1] = "Index size error", 1), l.DOMSTRING_SIZE_ERR = (f[2] = "DOMString size error", 2);
42
+ var m = l.HIERARCHY_REQUEST_ERR = (f[3] = "Hierarchy request error", 3);
43
+ l.WRONG_DOCUMENT_ERR = (f[4] = "Wrong document", 4), l.INVALID_CHARACTER_ERR = (f[5] = "Invalid character", 5), l.NO_DATA_ALLOWED_ERR = (f[6] = "No data allowed", 6), l.NO_MODIFICATION_ALLOWED_ERR = (f[7] = "No modification allowed", 7);
44
+ var pe = l.NOT_FOUND_ERR = (f[8] = "Not found", 8);
45
+ l.NOT_SUPPORTED_ERR = (f[9] = "Not supported", 9);
46
+ var he = l.INUSE_ATTRIBUTE_ERR = (f[10] = "Attribute in use", 10);
47
+ l.INVALID_STATE_ERR = (f[11] = "Invalid state", 11), l.SYNTAX_ERR = (f[12] = "Syntax error", 12), l.INVALID_MODIFICATION_ERR = (f[13] = "Invalid modification", 13), l.NAMESPACE_ERR = (f[14] = "Invalid namespace", 14), l.INVALID_ACCESS_ERR = (f[15] = "Invalid access", 15);
48
+ function s(e, t) {
49
+ if (t instanceof Error)
50
+ var n = t;
51
+ else
52
+ n = this, Error.call(this, f[e]), this.message = f[e], Error.captureStackTrace && Error.captureStackTrace(this, s);
53
+ return n.code = e, t && (this.message = this.message + ": " + t), n;
54
+ }
55
+ s.prototype = Error.prototype, V(l, s);
56
+ function g() {
57
+ }
58
+ g.prototype = {
59
+ /**
60
+ * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
61
+ * @standard level1
62
+ */
63
+ length: 0,
64
+ /**
65
+ * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
66
+ * @standard level1
67
+ * @param index unsigned long
68
+ * Index into the collection.
69
+ * @return Node
70
+ * The node at the indexth position in the NodeList, or null if that is not a valid index.
71
+ */
72
+ item: function(e) {
73
+ return e >= 0 && e < this.length ? this[e] : null;
74
+ },
75
+ toString: function(e, t) {
76
+ for (var n = [], r = 0; r < this.length; r++)
77
+ U(this[r], n, e, t);
78
+ return n.join("");
79
+ },
80
+ /**
81
+ * @private
82
+ * @param {function (Node):boolean} predicate
83
+ * @returns {Node[]}
84
+ */
85
+ filter: function(e) {
86
+ return Array.prototype.filter.call(this, e);
87
+ },
88
+ /**
89
+ * @private
90
+ * @param {Node} item
91
+ * @returns {number}
92
+ */
93
+ indexOf: function(e) {
94
+ return Array.prototype.indexOf.call(this, e);
95
+ }
96
+ };
97
+ function M(e, t) {
98
+ this._node = e, this._refresh = t, Q(this);
99
+ }
100
+ function Q(e) {
101
+ var t = e._node._inc || e._node.ownerDocument._inc;
102
+ if (e._inc !== t) {
103
+ var n = e._refresh(e._node);
104
+ if (Ce(e, "length", n.length), !e.$$length || n.length < e.$$length)
105
+ for (var r = n.length; r in e; r++)
106
+ Object.prototype.hasOwnProperty.call(e, r) && delete e[r];
107
+ V(n, e), e._inc = t;
108
+ }
109
+ }
110
+ M.prototype.item = function(e) {
111
+ return Q(this), this[e] || null;
112
+ }, p(M, g);
113
+ function X() {
114
+ }
115
+ function me(e, t) {
116
+ for (var n = e.length; n--; )
117
+ if (e[n] === t)
118
+ return n;
119
+ }
120
+ function Ne(e, t, n, r) {
121
+ if (r ? t[me(t, r)] = n : t[t.length++] = n, e) {
122
+ n.ownerElement = e;
123
+ var i = e.ownerDocument;
124
+ i && (r && Te(i, e, r), Le(i, e, n));
125
+ }
126
+ }
127
+ function Ee(e, t, n) {
128
+ var r = me(t, n);
129
+ if (r >= 0) {
130
+ for (var i = t.length - 1; r < i; )
131
+ t[r] = t[++r];
132
+ if (t.length = i, e) {
133
+ var o = e.ownerDocument;
134
+ o && (Te(o, e, n), n.ownerElement = null);
135
+ }
136
+ } else
137
+ throw new s(pe, new Error(e.tagName + "@" + n));
138
+ }
139
+ X.prototype = {
140
+ length: 0,
141
+ item: g.prototype.item,
142
+ getNamedItem: function(e) {
143
+ for (var t = this.length; t--; ) {
144
+ var n = this[t];
145
+ if (n.nodeName == e)
146
+ return n;
147
+ }
148
+ },
149
+ setNamedItem: function(e) {
150
+ var t = e.ownerElement;
151
+ if (t && t != this._ownerElement)
152
+ throw new s(he);
153
+ var n = this.getNamedItem(e.nodeName);
154
+ return Ne(this._ownerElement, this, e, n), n;
155
+ },
156
+ /* returns Node */
157
+ setNamedItemNS: function(e) {
158
+ var t = e.ownerElement, n;
159
+ if (t && t != this._ownerElement)
160
+ throw new s(he);
161
+ return n = this.getNamedItemNS(e.namespaceURI, e.localName), Ne(this._ownerElement, this, e, n), n;
162
+ },
163
+ /* returns Node */
164
+ removeNamedItem: function(e) {
165
+ var t = this.getNamedItem(e);
166
+ return Ee(this._ownerElement, this, t), t;
167
+ },
168
+ // raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
169
+ //for level2
170
+ removeNamedItemNS: function(e, t) {
171
+ var n = this.getNamedItemNS(e, t);
172
+ return Ee(this._ownerElement, this, n), n;
173
+ },
174
+ getNamedItemNS: function(e, t) {
175
+ for (var n = this.length; n--; ) {
176
+ var r = this[n];
177
+ if (r.localName == t && r.namespaceURI == e)
178
+ return r;
179
+ }
180
+ return null;
181
+ }
182
+ };
183
+ function ve() {
184
+ }
185
+ ve.prototype = {
186
+ /**
187
+ * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.
188
+ * The different implementations fairly diverged in what kind of features were reported.
189
+ * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.
190
+ *
191
+ * @deprecated It is deprecated and modern browsers return true in all cases.
192
+ *
193
+ * @param {string} feature
194
+ * @param {string} [version]
195
+ * @returns {boolean} always true
196
+ *
197
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN
198
+ * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core
199
+ * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard
200
+ */
201
+ hasFeature: function(e, t) {
202
+ return !0;
203
+ },
204
+ /**
205
+ * Creates an XML Document object of the specified type with its document element.
206
+ *
207
+ * __It behaves slightly different from the description in the living standard__:
208
+ * - There is no interface/class `XMLDocument`, it returns a `Document` instance.
209
+ * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.
210
+ * - this implementation is not validating names or qualified names
211
+ * (when parsing XML strings, the SAX parser takes care of that)
212
+ *
213
+ * @param {string|null} namespaceURI
214
+ * @param {string} qualifiedName
215
+ * @param {DocumentType=null} doctype
216
+ * @returns {Document}
217
+ *
218
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN
219
+ * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)
220
+ * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core
221
+ *
222
+ * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract
223
+ * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names
224
+ * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names
225
+ */
226
+ createDocument: function(e, t, n) {
227
+ var r = new j();
228
+ if (r.implementation = this, r.childNodes = new g(), r.doctype = n || null, n && r.appendChild(n), t) {
229
+ var i = r.createElementNS(e, t);
230
+ r.appendChild(i);
231
+ }
232
+ return r;
233
+ },
234
+ /**
235
+ * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
236
+ *
237
+ * __This behavior is slightly different from the in the specs__:
238
+ * - this implementation is not validating names or qualified names
239
+ * (when parsing XML strings, the SAX parser takes care of that)
240
+ *
241
+ * @param {string} qualifiedName
242
+ * @param {string} [publicId]
243
+ * @param {string} [systemId]
244
+ * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
245
+ * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
246
+ *
247
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN
248
+ * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core
249
+ * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard
250
+ *
251
+ * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract
252
+ * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names
253
+ * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names
254
+ */
255
+ createDocumentType: function(e, t, n) {
256
+ var r = new W();
257
+ return r.name = e, r.nodeName = e, r.publicId = t || "", r.systemId = n || "", r;
258
+ }
259
+ };
260
+ function a() {
261
+ }
262
+ a.prototype = {
263
+ firstChild: null,
264
+ lastChild: null,
265
+ previousSibling: null,
266
+ nextSibling: null,
267
+ attributes: null,
268
+ parentNode: null,
269
+ childNodes: null,
270
+ ownerDocument: null,
271
+ nodeValue: null,
272
+ namespaceURI: null,
273
+ prefix: null,
274
+ localName: null,
275
+ // Modified in DOM Level 2:
276
+ insertBefore: function(e, t) {
277
+ return z(this, e, t);
278
+ },
279
+ replaceChild: function(e, t) {
280
+ z(this, e, t, De), t && this.removeChild(t);
281
+ },
282
+ removeChild: function(e) {
283
+ return ye(this, e);
284
+ },
285
+ appendChild: function(e) {
286
+ return this.insertBefore(e, null);
287
+ },
288
+ hasChildNodes: function() {
289
+ return this.firstChild != null;
290
+ },
291
+ cloneNode: function(e) {
292
+ return re(this.ownerDocument || this, this, e);
293
+ },
294
+ // Modified in DOM Level 2:
295
+ normalize: function() {
296
+ for (var e = this.firstChild; e; ) {
297
+ var t = e.nextSibling;
298
+ t && t.nodeType == G && e.nodeType == G ? (this.removeChild(t), e.appendData(t.data)) : (e.normalize(), e = t);
299
+ }
300
+ },
301
+ // Introduced in DOM Level 2:
302
+ isSupported: function(e, t) {
303
+ return this.ownerDocument.implementation.hasFeature(e, t);
304
+ },
305
+ // Introduced in DOM Level 2:
306
+ hasAttributes: function() {
307
+ return this.attributes.length > 0;
308
+ },
309
+ /**
310
+ * Look up the prefix associated to the given namespace URI, starting from this node.
311
+ * **The default namespace declarations are ignored by this method.**
312
+ * See Namespace Prefix Lookup for details on the algorithm used by this method.
313
+ *
314
+ * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._
315
+ *
316
+ * @param {string | null} namespaceURI
317
+ * @returns {string | null}
318
+ * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix
319
+ * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo
320
+ * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix
321
+ * @see https://github.com/xmldom/xmldom/issues/322
322
+ */
323
+ lookupPrefix: function(e) {
324
+ for (var t = this; t; ) {
325
+ var n = t._nsMap;
326
+ if (n) {
327
+ for (var r in n)
328
+ if (Object.prototype.hasOwnProperty.call(n, r) && n[r] === e)
329
+ return r;
330
+ }
331
+ t = t.nodeType == b ? t.ownerDocument : t.parentNode;
332
+ }
333
+ return null;
334
+ },
335
+ // Introduced in DOM Level 3:
336
+ lookupNamespaceURI: function(e) {
337
+ for (var t = this; t; ) {
338
+ var n = t._nsMap;
339
+ if (n && Object.prototype.hasOwnProperty.call(n, e))
340
+ return n[e];
341
+ t = t.nodeType == b ? t.ownerDocument : t.parentNode;
342
+ }
343
+ return null;
344
+ },
345
+ // Introduced in DOM Level 3:
346
+ isDefaultNamespace: function(e) {
347
+ var t = this.lookupPrefix(e);
348
+ return t == null;
349
+ }
350
+ };
351
+ function de(e) {
352
+ return e == "<" && "&lt;" || e == ">" && "&gt;" || e == "&" && "&amp;" || e == '"' && "&quot;" || "&#" + e.charCodeAt() + ";";
353
+ }
354
+ V(h, a), V(h, a.prototype);
355
+ function k(e, t) {
356
+ if (t(e))
357
+ return !0;
358
+ if (e = e.firstChild)
359
+ do
360
+ if (k(e, t))
361
+ return !0;
362
+ while (e = e.nextSibling);
363
+ }
364
+ function j() {
365
+ this.ownerDocument = this;
366
+ }
367
+ function Le(e, t, n) {
368
+ e && e._inc++;
369
+ var r = n.namespaceURI;
370
+ r === B.XMLNS && (t._nsMap[n.prefix ? n.localName : ""] = n.value);
371
+ }
372
+ function Te(e, t, n, r) {
373
+ e && e._inc++;
374
+ var i = n.namespaceURI;
375
+ i === B.XMLNS && delete t._nsMap[n.prefix ? n.localName : ""];
376
+ }
377
+ function Z(e, t, n) {
378
+ if (e && e._inc) {
379
+ e._inc++;
380
+ var r = t.childNodes;
381
+ if (n)
382
+ r[r.length++] = n;
383
+ else {
384
+ for (var i = t.firstChild, o = 0; i; )
385
+ r[o++] = i, i = i.nextSibling;
386
+ r.length = o, delete r[r.length];
387
+ }
388
+ }
389
+ }
390
+ function ye(e, t) {
391
+ var n = t.previousSibling, r = t.nextSibling;
392
+ return n ? n.nextSibling = r : e.firstChild = r, r ? r.previousSibling = n : e.lastChild = n, t.parentNode = null, t.previousSibling = null, t.nextSibling = null, Z(e.ownerDocument, e), t;
393
+ }
394
+ function Ye(e) {
395
+ return e && (e.nodeType === a.DOCUMENT_NODE || e.nodeType === a.DOCUMENT_FRAGMENT_NODE || e.nodeType === a.ELEMENT_NODE);
396
+ }
397
+ function Ge(e) {
398
+ return e && (d(e) || J(e) || _(e) || e.nodeType === a.DOCUMENT_FRAGMENT_NODE || e.nodeType === a.COMMENT_NODE || e.nodeType === a.PROCESSING_INSTRUCTION_NODE);
399
+ }
400
+ function _(e) {
401
+ return e && e.nodeType === a.DOCUMENT_TYPE_NODE;
402
+ }
403
+ function d(e) {
404
+ return e && e.nodeType === a.ELEMENT_NODE;
405
+ }
406
+ function J(e) {
407
+ return e && e.nodeType === a.TEXT_NODE;
408
+ }
409
+ function ge(e, t) {
410
+ var n = e.childNodes || [];
411
+ if (v(n, d) || _(t))
412
+ return !1;
413
+ var r = v(n, _);
414
+ return !(t && r && n.indexOf(r) > n.indexOf(t));
415
+ }
416
+ function _e(e, t) {
417
+ var n = e.childNodes || [];
418
+ function r(o) {
419
+ return d(o) && o !== t;
420
+ }
421
+ if (v(n, r))
422
+ return !1;
423
+ var i = v(n, _);
424
+ return !(t && i && n.indexOf(i) > n.indexOf(t));
425
+ }
426
+ function Xe(e, t, n) {
427
+ if (!Ye(e))
428
+ throw new s(m, "Unexpected parent node type " + e.nodeType);
429
+ if (n && n.parentNode !== e)
430
+ throw new s(pe, "child not in parent");
431
+ if (
432
+ // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException.
433
+ !Ge(t) || // 5. If either `node` is a Text node and `parent` is a document,
434
+ // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0
435
+ // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)
436
+ // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException.
437
+ _(t) && e.nodeType !== a.DOCUMENT_NODE
438
+ )
439
+ throw new s(
440
+ m,
441
+ "Unexpected node type " + t.nodeType + " for parent node type " + e.nodeType
442
+ );
443
+ }
444
+ function ze(e, t, n) {
445
+ var r = e.childNodes || [], i = t.childNodes || [];
446
+ if (t.nodeType === a.DOCUMENT_FRAGMENT_NODE) {
447
+ var o = i.filter(d);
448
+ if (o.length > 1 || v(i, J))
449
+ throw new s(m, "More than one element or text in fragment");
450
+ if (o.length === 1 && !ge(e, n))
451
+ throw new s(m, "Element in fragment can not be inserted before doctype");
452
+ }
453
+ if (d(t) && !ge(e, n))
454
+ throw new s(m, "Only one element can be added and only after doctype");
455
+ if (_(t)) {
456
+ if (v(r, _))
457
+ throw new s(m, "Only one doctype is allowed");
458
+ var u = v(r, d);
459
+ if (n && r.indexOf(u) < r.indexOf(n))
460
+ throw new s(m, "Doctype can only be inserted before an element");
461
+ if (!n && u)
462
+ throw new s(m, "Doctype can not be appended since element is present");
463
+ }
464
+ }
465
+ function De(e, t, n) {
466
+ var r = e.childNodes || [], i = t.childNodes || [];
467
+ if (t.nodeType === a.DOCUMENT_FRAGMENT_NODE) {
468
+ var o = i.filter(d);
469
+ if (o.length > 1 || v(i, J))
470
+ throw new s(m, "More than one element or text in fragment");
471
+ if (o.length === 1 && !_e(e, n))
472
+ throw new s(m, "Element in fragment can not be inserted before doctype");
473
+ }
474
+ if (d(t) && !_e(e, n))
475
+ throw new s(m, "Only one element can be added and only after doctype");
476
+ if (_(t)) {
477
+ if (v(r, function(D) {
478
+ return _(D) && D !== n;
479
+ }))
480
+ throw new s(m, "Only one doctype is allowed");
481
+ var u = v(r, d);
482
+ if (n && r.indexOf(u) < r.indexOf(n))
483
+ throw new s(m, "Doctype can only be inserted before an element");
484
+ }
485
+ }
486
+ function z(e, t, n, r) {
487
+ Xe(e, t, n), e.nodeType === a.DOCUMENT_NODE && (r || ze)(e, t, n);
488
+ var i = t.parentNode;
489
+ if (i && i.removeChild(t), t.nodeType === y) {
490
+ var o = t.firstChild;
491
+ if (o == null)
492
+ return t;
493
+ var u = t.lastChild;
494
+ } else
495
+ o = u = t;
496
+ var N = n ? n.previousSibling : e.lastChild;
497
+ o.previousSibling = N, u.nextSibling = n, N ? N.nextSibling = o : e.firstChild = o, n == null ? e.lastChild = u : n.previousSibling = u;
498
+ do
499
+ o.parentNode = e;
500
+ while (o !== u && (o = o.nextSibling));
501
+ return Z(e.ownerDocument || e, e), t.nodeType == y && (t.firstChild = t.lastChild = null), t;
502
+ }
503
+ function $e(e, t) {
504
+ return t.parentNode && t.parentNode.removeChild(t), t.parentNode = e, t.previousSibling = e.lastChild, t.nextSibling = null, t.previousSibling ? t.previousSibling.nextSibling = t : e.firstChild = t, e.lastChild = t, Z(e.ownerDocument, e, t), t;
505
+ }
506
+ j.prototype = {
507
+ //implementation : null,
508
+ nodeName: "#document",
509
+ nodeType: le,
510
+ /**
511
+ * The DocumentType node of the document.
512
+ *
513
+ * @readonly
514
+ * @type DocumentType
515
+ */
516
+ doctype: null,
517
+ documentElement: null,
518
+ _inc: 1,
519
+ insertBefore: function(e, t) {
520
+ if (e.nodeType == y) {
521
+ for (var n = e.firstChild; n; ) {
522
+ var r = n.nextSibling;
523
+ this.insertBefore(n, t), n = r;
524
+ }
525
+ return e;
526
+ }
527
+ return z(this, e, t), e.ownerDocument = this, this.documentElement === null && e.nodeType === E && (this.documentElement = e), e;
528
+ },
529
+ removeChild: function(e) {
530
+ return this.documentElement == e && (this.documentElement = null), ye(this, e);
531
+ },
532
+ replaceChild: function(e, t) {
533
+ z(this, e, t, De), e.ownerDocument = this, t && this.removeChild(t), d(e) && (this.documentElement = e);
534
+ },
535
+ // Introduced in DOM Level 2:
536
+ importNode: function(e, t) {
537
+ return Ae(this, e, t);
538
+ },
539
+ // Introduced in DOM Level 2:
540
+ getElementById: function(e) {
541
+ var t = null;
542
+ return k(this.documentElement, function(n) {
543
+ if (n.nodeType == E && n.getAttribute("id") == e)
544
+ return t = n, !0;
545
+ }), t;
546
+ },
547
+ /**
548
+ * The `getElementsByClassName` method of `Document` interface returns an array-like object
549
+ * of all child elements which have **all** of the given class name(s).
550
+ *
551
+ * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.
552
+ *
553
+ *
554
+ * Warning: This is a live LiveNodeList.
555
+ * Changes in the DOM will reflect in the array as the changes occur.
556
+ * If an element selected by this array no longer qualifies for the selector,
557
+ * it will automatically be removed. Be aware of this for iteration purposes.
558
+ *
559
+ * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace
560
+ *
561
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
562
+ * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname
563
+ */
564
+ getElementsByClassName: function(e) {
565
+ var t = oe(e);
566
+ return new M(this, function(n) {
567
+ var r = [];
568
+ return t.length > 0 && k(n.documentElement, function(i) {
569
+ if (i !== n && i.nodeType === E) {
570
+ var o = i.getAttribute("class");
571
+ if (o) {
572
+ var u = e === o;
573
+ if (!u) {
574
+ var N = oe(o);
575
+ u = t.every(Ve(N));
576
+ }
577
+ u && r.push(i);
578
+ }
579
+ }
580
+ }), r;
581
+ });
582
+ },
583
+ //document factory method:
584
+ createElement: function(e) {
585
+ var t = new w();
586
+ t.ownerDocument = this, t.nodeName = e, t.tagName = e, t.localName = e, t.childNodes = new g();
587
+ var n = t.attributes = new X();
588
+ return n._ownerElement = t, t;
589
+ },
590
+ createDocumentFragment: function() {
591
+ var e = new F();
592
+ return e.ownerDocument = this, e.childNodes = new g(), e;
593
+ },
594
+ createTextNode: function(e) {
595
+ var t = new K();
596
+ return t.ownerDocument = this, t.appendData(e), t;
597
+ },
598
+ createComment: function(e) {
599
+ var t = new q();
600
+ return t.ownerDocument = this, t.appendData(e), t;
601
+ },
602
+ createCDATASection: function(e) {
603
+ var t = new H();
604
+ return t.ownerDocument = this, t.appendData(e), t;
605
+ },
606
+ createProcessingInstruction: function(e, t) {
607
+ var n = new te();
608
+ return n.ownerDocument = this, n.tagName = n.nodeName = n.target = e, n.nodeValue = n.data = t, n;
609
+ },
610
+ createAttribute: function(e) {
611
+ var t = new $();
612
+ return t.ownerDocument = this, t.name = e, t.nodeName = e, t.localName = e, t.specified = !0, t;
613
+ },
614
+ createEntityReference: function(e) {
615
+ var t = new ee();
616
+ return t.ownerDocument = this, t.nodeName = e, t;
617
+ },
618
+ // Introduced in DOM Level 2:
619
+ createElementNS: function(e, t) {
620
+ var n = new w(), r = t.split(":"), i = n.attributes = new X();
621
+ return n.childNodes = new g(), n.ownerDocument = this, n.nodeName = t, n.tagName = t, n.namespaceURI = e, r.length == 2 ? (n.prefix = r[0], n.localName = r[1]) : n.localName = t, i._ownerElement = n, n;
622
+ },
623
+ // Introduced in DOM Level 2:
624
+ createAttributeNS: function(e, t) {
625
+ var n = new $(), r = t.split(":");
626
+ return n.ownerDocument = this, n.nodeName = t, n.name = t, n.namespaceURI = e, n.specified = !0, r.length == 2 ? (n.prefix = r[0], n.localName = r[1]) : n.localName = t, n;
627
+ }
628
+ }, p(j, a);
629
+ function w() {
630
+ this._nsMap = {};
631
+ }
632
+ w.prototype = {
633
+ nodeType: E,
634
+ hasAttribute: function(e) {
635
+ return this.getAttributeNode(e) != null;
636
+ },
637
+ getAttribute: function(e) {
638
+ var t = this.getAttributeNode(e);
639
+ return t && t.value || "";
640
+ },
641
+ getAttributeNode: function(e) {
642
+ return this.attributes.getNamedItem(e);
643
+ },
644
+ setAttribute: function(e, t) {
645
+ var n = this.ownerDocument.createAttribute(e);
646
+ n.value = n.nodeValue = "" + t, this.setAttributeNode(n);
647
+ },
648
+ removeAttribute: function(e) {
649
+ var t = this.getAttributeNode(e);
650
+ t && this.removeAttributeNode(t);
651
+ },
652
+ //four real opeartion method
653
+ appendChild: function(e) {
654
+ return e.nodeType === y ? this.insertBefore(e, null) : $e(this, e);
655
+ },
656
+ setAttributeNode: function(e) {
657
+ return this.attributes.setNamedItem(e);
658
+ },
659
+ setAttributeNodeNS: function(e) {
660
+ return this.attributes.setNamedItemNS(e);
661
+ },
662
+ removeAttributeNode: function(e) {
663
+ return this.attributes.removeNamedItem(e.nodeName);
664
+ },
665
+ //get real attribute name,and remove it by removeAttributeNode
666
+ removeAttributeNS: function(e, t) {
667
+ var n = this.getAttributeNodeNS(e, t);
668
+ n && this.removeAttributeNode(n);
669
+ },
670
+ hasAttributeNS: function(e, t) {
671
+ return this.getAttributeNodeNS(e, t) != null;
672
+ },
673
+ getAttributeNS: function(e, t) {
674
+ var n = this.getAttributeNodeNS(e, t);
675
+ return n && n.value || "";
676
+ },
677
+ setAttributeNS: function(e, t, n) {
678
+ var r = this.ownerDocument.createAttributeNS(e, t);
679
+ r.value = r.nodeValue = "" + n, this.setAttributeNode(r);
680
+ },
681
+ getAttributeNodeNS: function(e, t) {
682
+ return this.attributes.getNamedItemNS(e, t);
683
+ },
684
+ getElementsByTagName: function(e) {
685
+ return new M(this, function(t) {
686
+ var n = [];
687
+ return k(t, function(r) {
688
+ r !== t && r.nodeType == E && (e === "*" || r.tagName == e) && n.push(r);
689
+ }), n;
690
+ });
691
+ },
692
+ getElementsByTagNameNS: function(e, t) {
693
+ return new M(this, function(n) {
694
+ var r = [];
695
+ return k(n, function(i) {
696
+ i !== n && i.nodeType === E && (e === "*" || i.namespaceURI === e) && (t === "*" || i.localName == t) && r.push(i);
697
+ }), r;
698
+ });
699
+ }
700
+ }, j.prototype.getElementsByTagName = w.prototype.getElementsByTagName, j.prototype.getElementsByTagNameNS = w.prototype.getElementsByTagNameNS, p(w, a);
701
+ function $() {
702
+ }
703
+ $.prototype.nodeType = b, p($, a);
704
+ function L() {
705
+ }
706
+ L.prototype = {
707
+ data: "",
708
+ substringData: function(e, t) {
709
+ return this.data.substring(e, e + t);
710
+ },
711
+ appendData: function(e) {
712
+ e = this.data + e, this.nodeValue = this.data = e, this.length = e.length;
713
+ },
714
+ insertData: function(e, t) {
715
+ this.replaceData(e, 0, t);
716
+ },
717
+ appendChild: function(e) {
718
+ throw new Error(f[m]);
719
+ },
720
+ deleteData: function(e, t) {
721
+ this.replaceData(e, t, "");
722
+ },
723
+ replaceData: function(e, t, n) {
724
+ var r = this.data.substring(0, e), i = this.data.substring(e + t);
725
+ n = r + n + i, this.nodeValue = this.data = n, this.length = n.length;
726
+ }
727
+ }, p(L, a);
728
+ function K() {
729
+ }
730
+ K.prototype = {
731
+ nodeName: "#text",
732
+ nodeType: G,
733
+ splitText: function(e) {
734
+ var t = this.data, n = t.substring(e);
735
+ t = t.substring(0, e), this.data = this.nodeValue = t, this.length = t.length;
736
+ var r = this.ownerDocument.createTextNode(n);
737
+ return this.parentNode && this.parentNode.insertBefore(r, this.nextSibling), r;
738
+ }
739
+ }, p(K, L);
740
+ function q() {
741
+ }
742
+ q.prototype = {
743
+ nodeName: "#comment",
744
+ nodeType: fe
745
+ }, p(q, L);
746
+ function H() {
747
+ }
748
+ H.prototype = {
749
+ nodeName: "#cdata-section",
750
+ nodeType: ae
751
+ }, p(H, L);
752
+ function W() {
753
+ }
754
+ W.prototype.nodeType = ce, p(W, a);
755
+ function Oe() {
756
+ }
757
+ Oe.prototype.nodeType = je, p(Oe, a);
758
+ function Se() {
759
+ }
760
+ Se.prototype.nodeType = ke, p(Se, a);
761
+ function ee() {
762
+ }
763
+ ee.prototype.nodeType = ue, p(ee, a);
764
+ function F() {
765
+ }
766
+ F.prototype.nodeName = "#document-fragment", F.prototype.nodeType = y, p(F, a);
767
+ function te() {
768
+ }
769
+ te.prototype.nodeType = se, p(te, a);
770
+ function Ie() {
771
+ }
772
+ Ie.prototype.serializeToString = function(e, t, n) {
773
+ return we.call(e, t, n);
774
+ }, a.prototype.toString = we;
775
+ function we(e, t) {
776
+ var n = [], r = this.nodeType == 9 && this.documentElement || this, i = r.prefix, o = r.namespaceURI;
777
+ if (o && i == null) {
778
+ var i = r.lookupPrefix(o);
779
+ if (i == null)
780
+ var u = [
781
+ { namespace: o, prefix: null }
782
+ //{namespace:uri,prefix:''}
783
+ ];
784
+ }
785
+ return U(this, n, e, t, u), n.join("");
786
+ }
787
+ function Re(e, t, n) {
788
+ var r = e.prefix || "", i = e.namespaceURI;
789
+ if (!i || r === "xml" && i === B.XML || i === B.XMLNS)
790
+ return !1;
791
+ for (var o = n.length; o--; ) {
792
+ var u = n[o];
793
+ if (u.prefix === r)
794
+ return u.namespace !== i;
795
+ }
796
+ return !0;
797
+ }
798
+ function ne(e, t, n) {
799
+ e.push(" ", t, '="', n.replace(/[<>&"\t\n\r]/g, de), '"');
800
+ }
801
+ function U(e, t, n, r, i) {
802
+ if (i || (i = []), r)
803
+ if (e = r(e), e) {
804
+ if (typeof e == "string") {
805
+ t.push(e);
806
+ return;
807
+ }
808
+ } else
809
+ return;
810
+ switch (e.nodeType) {
811
+ case E:
812
+ var o = e.attributes, u = o.length, c = e.firstChild, N = e.tagName;
813
+ n = B.isHTML(e.namespaceURI) || n;
814
+ var D = N;
815
+ if (!n && !e.prefix && e.namespaceURI) {
816
+ for (var I, O = 0; O < o.length; O++)
817
+ if (o.item(O).name === "xmlns") {
818
+ I = o.item(O).value;
819
+ break;
820
+ }
821
+ if (!I)
822
+ for (var R = i.length - 1; R >= 0; R--) {
823
+ var A = i[R];
824
+ if (A.prefix === "" && A.namespace === e.namespaceURI) {
825
+ I = A.namespace;
826
+ break;
827
+ }
828
+ }
829
+ if (I !== e.namespaceURI)
830
+ for (var R = i.length - 1; R >= 0; R--) {
831
+ var A = i[R];
832
+ if (A.namespace === e.namespaceURI) {
833
+ A.prefix && (D = A.prefix + ":" + N);
834
+ break;
835
+ }
836
+ }
837
+ }
838
+ t.push("<", D);
839
+ for (var C = 0; C < u; C++) {
840
+ var T = o.item(C);
841
+ T.prefix == "xmlns" ? i.push({ prefix: T.localName, namespace: T.value }) : T.nodeName == "xmlns" && i.push({ prefix: "", namespace: T.value });
842
+ }
843
+ for (var C = 0; C < u; C++) {
844
+ var T = o.item(C);
845
+ if (Re(T, n, i)) {
846
+ var x = T.prefix || "", Y = T.namespaceURI;
847
+ ne(t, x ? "xmlns:" + x : "xmlns", Y), i.push({ prefix: x, namespace: Y });
848
+ }
849
+ U(T, t, n, r, i);
850
+ }
851
+ if (N === D && Re(e, n, i)) {
852
+ var x = e.prefix || "", Y = e.namespaceURI;
853
+ ne(t, x ? "xmlns:" + x : "xmlns", Y), i.push({ prefix: x, namespace: Y });
854
+ }
855
+ if (c || n && !/^(?:meta|link|img|br|hr|input)$/i.test(N)) {
856
+ if (t.push(">"), n && /^script$/i.test(N))
857
+ for (; c; )
858
+ c.data ? t.push(c.data) : U(c, t, n, r, i.slice()), c = c.nextSibling;
859
+ else
860
+ for (; c; )
861
+ U(c, t, n, r, i.slice()), c = c.nextSibling;
862
+ t.push("</", D, ">");
863
+ } else
864
+ t.push("/>");
865
+ return;
866
+ case le:
867
+ case y:
868
+ for (var c = e.firstChild; c; )
869
+ U(c, t, n, r, i.slice()), c = c.nextSibling;
870
+ return;
871
+ case b:
872
+ return ne(t, e.name, e.value);
873
+ case G:
874
+ return t.push(
875
+ e.data.replace(/[<&>]/g, de)
876
+ );
877
+ case ae:
878
+ return t.push("<![CDATA[", e.data, "]]>");
879
+ case fe:
880
+ return t.push("<!--", e.data, "-->");
881
+ case ce:
882
+ var xe = e.publicId, P = e.systemId;
883
+ if (t.push("<!DOCTYPE ", e.name), xe)
884
+ t.push(" PUBLIC ", xe), P && P != "." && t.push(" ", P), t.push(">");
885
+ else if (P && P != ".")
886
+ t.push(" SYSTEM ", P, ">");
887
+ else {
888
+ var be = e.internalSubset;
889
+ be && t.push(" [", be, "]"), t.push(">");
890
+ }
891
+ return;
892
+ case se:
893
+ return t.push("<?", e.target, " ", e.data, "?>");
894
+ case ue:
895
+ return t.push("&", e.nodeName, ";");
896
+ //case ENTITY_NODE:
897
+ //case NOTATION_NODE:
898
+ default:
899
+ t.push("??", e.nodeName);
900
+ }
901
+ }
902
+ function Ae(e, t, n) {
903
+ var r;
904
+ switch (t.nodeType) {
905
+ case E:
906
+ r = t.cloneNode(!1), r.ownerDocument = e;
907
+ //var attrs = node2.attributes;
908
+ //var len = attrs.length;
909
+ //for(var i=0;i<len;i++){
910
+ //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
911
+ //}
912
+ case y:
913
+ break;
914
+ case b:
915
+ n = !0;
916
+ break;
917
+ }
918
+ if (r || (r = t.cloneNode(!1)), r.ownerDocument = e, r.parentNode = null, n)
919
+ for (var i = t.firstChild; i; )
920
+ r.appendChild(Ae(e, i, n)), i = i.nextSibling;
921
+ return r;
922
+ }
923
+ function re(e, t, n) {
924
+ var r = new t.constructor();
925
+ for (var i in t)
926
+ if (Object.prototype.hasOwnProperty.call(t, i)) {
927
+ var o = t[i];
928
+ typeof o != "object" && o != r[i] && (r[i] = o);
929
+ }
930
+ switch (t.childNodes && (r.childNodes = new g()), r.ownerDocument = e, r.nodeType) {
931
+ case E:
932
+ var u = t.attributes, N = r.attributes = new X(), D = u.length;
933
+ N._ownerElement = r;
934
+ for (var I = 0; I < D; I++)
935
+ r.setAttributeNode(re(e, u.item(I), !0));
936
+ break;
937
+ case b:
938
+ n = !0;
939
+ }
940
+ if (n)
941
+ for (var O = t.firstChild; O; )
942
+ r.appendChild(re(e, O, n)), O = O.nextSibling;
943
+ return r;
944
+ }
945
+ function Ce(e, t, n) {
946
+ e[t] = n;
947
+ }
948
+ try {
949
+ if (Object.defineProperty) {
950
+ let e = function(t) {
951
+ switch (t.nodeType) {
952
+ case E:
953
+ case y:
954
+ var n = [];
955
+ for (t = t.firstChild; t; )
956
+ t.nodeType !== 7 && t.nodeType !== 8 && n.push(e(t)), t = t.nextSibling;
957
+ return n.join("");
958
+ default:
959
+ return t.nodeValue;
960
+ }
961
+ };
962
+ Object.defineProperty(M.prototype, "length", {
963
+ get: function() {
964
+ return Q(this), this.$$length;
965
+ }
966
+ }), Object.defineProperty(a.prototype, "textContent", {
967
+ get: function() {
968
+ return e(this);
969
+ },
970
+ set: function(t) {
971
+ switch (this.nodeType) {
972
+ case E:
973
+ case y:
974
+ for (; this.firstChild; )
975
+ this.removeChild(this.firstChild);
976
+ (t || String(t)) && this.appendChild(this.ownerDocument.createTextNode(t));
977
+ break;
978
+ default:
979
+ this.data = t, this.value = t, this.nodeValue = t;
980
+ }
981
+ }
982
+ }), Ce = function(t, n, r) {
983
+ t["$$" + n] = r;
984
+ };
985
+ }
986
+ } catch {
987
+ }
988
+ return S.DocumentType = W, S.DOMException = s, S.DOMImplementation = ve, S.Element = w, S.Node = a, S.NodeList = g, S.XMLSerializer = Ie, S;
989
+ }
990
+ export {
991
+ Ze as __require
992
+ };
993
+ //# sourceMappingURL=dom.js.map