@cirkay-eng/cirkay-components 0.7.2 → 0.7.5

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 (251) hide show
  1. package/dist/base/magic/MagicAPI.d.ts.map +1 -1
  2. package/dist/base/magic/MagicAPI.js +5 -3
  3. package/dist/base/magic/MagicAPI.js.map +1 -1
  4. package/dist/base/n3xus/N3xusAPI.d.ts +8 -5
  5. package/dist/base/n3xus/N3xusAPI.d.ts.map +1 -1
  6. package/dist/base/n3xus/N3xusAPI.js +112 -49
  7. package/dist/base/n3xus/N3xusAPI.js.map +1 -1
  8. package/dist/base/n3xus/types.d.ts +68 -25
  9. package/dist/base/n3xus/types.d.ts.map +1 -1
  10. package/dist/base/n3xus/types.js +1 -0
  11. package/dist/base/n3xus/types.js.map +1 -1
  12. package/dist/components/connected/connected.d.ts +33 -0
  13. package/dist/components/connected/connected.d.ts.map +1 -0
  14. package/dist/components/connected/connected.js +592 -0
  15. package/dist/components/connected/connected.js.map +1 -0
  16. package/dist/components/connected/index.d.ts +8 -0
  17. package/dist/components/connected/index.d.ts.map +1 -0
  18. package/dist/components/connected/index.js +6 -0
  19. package/dist/components/connected/index.js.map +1 -0
  20. package/dist/components/error-screen/error-screen.d.ts +4 -3
  21. package/dist/components/error-screen/error-screen.d.ts.map +1 -1
  22. package/dist/components/error-screen/error-screen.js +6 -11
  23. package/dist/components/error-screen/error-screen.js.map +1 -1
  24. package/dist/components/error-screen/index.d.ts +6 -1
  25. package/dist/components/error-screen/index.d.ts.map +1 -1
  26. package/dist/components/error-screen/index.js +6 -0
  27. package/dist/components/error-screen/index.js.map +1 -0
  28. package/dist/components/fan-pass-claim/fan-pass-claim.d.ts +35 -14
  29. package/dist/components/fan-pass-claim/fan-pass-claim.d.ts.map +1 -1
  30. package/dist/components/fan-pass-claim/fan-pass-claim.js +836 -316
  31. package/dist/components/fan-pass-claim/fan-pass-claim.js.map +1 -1
  32. package/dist/components/fan-pass-claim/index.d.ts +8 -2
  33. package/dist/components/fan-pass-claim/index.d.ts.map +1 -1
  34. package/dist/components/fan-pass-claim/index.js +6 -0
  35. package/dist/components/fan-pass-claim/index.js.map +1 -0
  36. package/dist/components/fan-pass-claim/types.d.ts +7 -0
  37. package/dist/components/fan-pass-claim/types.d.ts.map +1 -1
  38. package/dist/components/fan-pass-claim/types.js +9 -1
  39. package/dist/components/fan-pass-claim/types.js.map +1 -1
  40. package/dist/components/fan-pass-unlock/fan-pass-unlock.d.ts +31 -17
  41. package/dist/components/fan-pass-unlock/fan-pass-unlock.d.ts.map +1 -1
  42. package/dist/components/fan-pass-unlock/fan-pass-unlock.js +541 -198
  43. package/dist/components/fan-pass-unlock/fan-pass-unlock.js.map +1 -1
  44. package/dist/components/fan-pass-unlock/index.d.ts +8 -2
  45. package/dist/components/fan-pass-unlock/index.d.ts.map +1 -1
  46. package/dist/components/fan-pass-unlock/index.js +6 -0
  47. package/dist/components/fan-pass-unlock/index.js.map +1 -0
  48. package/dist/components/frame/frame.d.ts +1 -0
  49. package/dist/components/frame/frame.d.ts.map +1 -1
  50. package/dist/components/frame/frame.js +103 -37
  51. package/dist/components/frame/frame.js.map +1 -1
  52. package/dist/components/frame/index.d.ts +6 -1
  53. package/dist/components/frame/index.d.ts.map +1 -1
  54. package/dist/components/frame/index.js +6 -0
  55. package/dist/components/frame/index.js.map +1 -0
  56. package/dist/components/index.d.ts +6 -3
  57. package/dist/components/index.d.ts.map +1 -1
  58. package/dist/components/index.js +11 -3
  59. package/dist/components/index.js.map +1 -1
  60. package/dist/components/login/index.d.ts +6 -1
  61. package/dist/components/login/index.d.ts.map +1 -1
  62. package/dist/components/login/index.js +6 -0
  63. package/dist/components/login/index.js.map +1 -0
  64. package/dist/components/login/login.d.ts +3 -3
  65. package/dist/components/login/login.d.ts.map +1 -1
  66. package/dist/components/login/login.js +98 -47
  67. package/dist/components/login/login.js.map +1 -1
  68. package/dist/components/login/types.d.ts +4 -0
  69. package/dist/components/login/types.d.ts.map +1 -1
  70. package/dist/components/mobile-pass/index.d.ts +8 -0
  71. package/dist/components/mobile-pass/index.d.ts.map +1 -0
  72. package/dist/components/mobile-pass/index.js +6 -0
  73. package/dist/components/mobile-pass/index.js.map +1 -0
  74. package/dist/components/mobile-pass/mobile-pass.d.ts +20 -0
  75. package/dist/components/mobile-pass/mobile-pass.d.ts.map +1 -0
  76. package/dist/components/mobile-pass/mobile-pass.js +150 -0
  77. package/dist/components/mobile-pass/mobile-pass.js.map +1 -0
  78. package/dist/constants/apis.d.ts.map +1 -1
  79. package/dist/constants/apis.js +0 -1
  80. package/dist/constants/apis.js.map +1 -1
  81. package/dist/constants/components.d.ts +1 -1
  82. package/dist/constants/components.d.ts.map +1 -1
  83. package/dist/constants/components.js +1 -1
  84. package/dist/controllers/LoginController.d.ts +35 -5
  85. package/dist/controllers/LoginController.d.ts.map +1 -1
  86. package/dist/controllers/LoginController.js +46 -29
  87. package/dist/controllers/LoginController.js.map +1 -1
  88. package/dist/docs/error-screen/designTokens.d.ts +1 -3
  89. package/dist/docs/error-screen/designTokens.d.ts.map +1 -1
  90. package/dist/docs/fan-pass-claim/designTokens.d.ts.map +1 -1
  91. package/dist/docs/fan-pass-claim/fan-pass-claim.stories.d.ts +1 -1
  92. package/dist/docs/fan-pass-claim/fan-pass-claim.stories.d.ts.map +1 -1
  93. package/dist/docs/fan-pass-unlock/designTokens.d.ts.map +1 -1
  94. package/dist/docs/fan-pass-unlock/fan-pass-unlock.stories.d.ts +1 -1
  95. package/dist/docs/fan-pass-unlock/fan-pass-unlock.stories.d.ts.map +1 -1
  96. package/dist/docs/login/designTokens.d.ts +1 -3
  97. package/dist/docs/login/designTokens.d.ts.map +1 -1
  98. package/dist/docs/login/login.stories.d.ts +1 -1
  99. package/dist/docs/login/login.stories.d.ts.map +1 -1
  100. package/dist/docs/mobile-pass/designTokens.d.ts +3 -0
  101. package/dist/docs/mobile-pass/designTokens.d.ts.map +1 -0
  102. package/dist/docs/mobile-pass/mobile-pass.stories.d.ts +6 -0
  103. package/dist/docs/mobile-pass/mobile-pass.stories.d.ts.map +1 -0
  104. package/dist/events/claim.d.ts +5 -4
  105. package/dist/events/claim.d.ts.map +1 -1
  106. package/dist/events/claim.js +2 -2
  107. package/dist/events/claim.js.map +1 -1
  108. package/dist/events/login.d.ts +11 -4
  109. package/dist/events/login.d.ts.map +1 -1
  110. package/dist/events/login.js +5 -4
  111. package/dist/events/login.js.map +1 -1
  112. package/dist/events/unlock.d.ts +16 -2
  113. package/dist/events/unlock.d.ts.map +1 -1
  114. package/dist/events/unlock.js +4 -2
  115. package/dist/events/unlock.js.map +1 -1
  116. package/dist/internal/CirkayElement.d.ts.map +1 -1
  117. package/dist/internal/CirkayElement.js +0 -2
  118. package/dist/internal/CirkayElement.js.map +1 -1
  119. package/dist/node_modules/.pnpm/@magic-sdk_provider@28.20.0_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js +10 -0
  120. package/dist/node_modules/.pnpm/@magic-sdk_provider@28.20.0_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js.map +1 -0
  121. package/dist/node_modules/.pnpm/@magic-sdk_provider@29.0.6_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js +10 -0
  122. package/dist/node_modules/.pnpm/@magic-sdk_provider@29.0.6_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js.map +1 -0
  123. package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.0/node_modules/@magic-sdk/types/dist/es/index.js +4 -0
  124. package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.0/node_modules/@magic-sdk/types/dist/es/index.js.map +1 -0
  125. package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.2/node_modules/@magic-sdk/types/dist/es/index.js +4 -0
  126. package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.2/node_modules/@magic-sdk/types/dist/es/index.js.map +1 -0
  127. package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.2_rollup@4.29.1_tslib@2.8.1_typescript@5.7.2 → @rollup_plugin-typescript@12.1.2_rollup@4.34.6_tslib@2.8.1_typescript@5.7.3}/node_modules/tslib/tslib.es6.js.map +1 -1
  128. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.34.8_tslib@2.8.1_typescript@5.7.3/node_modules/tslib/tslib.es6.js +31 -0
  129. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.34.8_tslib@2.8.1_typescript@5.7.3/node_modules/tslib/tslib.es6.js.map +1 -0
  130. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.40.1_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js +31 -0
  131. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.40.1_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js.map +1 -0
  132. package/dist/node_modules/.pnpm/magic-sdk@28.21.1/node_modules/magic-sdk/dist/es/index.js +9 -0
  133. package/dist/node_modules/.pnpm/magic-sdk@28.21.1/node_modules/magic-sdk/dist/es/index.js.map +1 -0
  134. package/dist/node_modules/.pnpm/magic-sdk@29.0.6/node_modules/magic-sdk/dist/es/index.js +9 -0
  135. package/dist/node_modules/.pnpm/magic-sdk@29.0.6/node_modules/magic-sdk/dist/es/index.js.map +1 -0
  136. package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/normalize.js +169 -0
  137. package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/normalize.js.map +1 -0
  138. package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/querySelectorDeep.js +161 -0
  139. package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/querySelectorDeep.js.map +1 -0
  140. package/dist/utils/helpers.d.ts +26 -2
  141. package/dist/utils/helpers.d.ts.map +1 -1
  142. package/dist/utils/helpers.js +65 -7
  143. package/dist/utils/helpers.js.map +1 -1
  144. package/package.json +24 -17
  145. package/dist/_virtual/_commonjsHelpers.js +0 -6
  146. package/dist/_virtual/_commonjsHelpers.js.map +0 -1
  147. package/dist/_virtual/index.js +0 -8
  148. package/dist/_virtual/index.js.map +0 -1
  149. package/dist/node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js +0 -182
  150. package/dist/node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js.map +0 -1
  151. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/adapters.js +0 -82
  152. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/adapters.js.map +0 -1
  153. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/fetch.js +0 -230
  154. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/fetch.js.map +0 -1
  155. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/xhr.js +0 -200
  156. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/xhr.js.map +0 -1
  157. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js +0 -87
  158. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js.map +0 -1
  159. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CancelToken.js +0 -134
  160. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CancelToken.js.map +0 -1
  161. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CanceledError.js +0 -24
  162. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CanceledError.js.map +0 -1
  163. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/isCancel.js +0 -6
  164. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/isCancel.js.map +0 -1
  165. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/Axios.js +0 -232
  166. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/Axios.js.map +0 -1
  167. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosError.js +0 -102
  168. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosError.js.map +0 -1
  169. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosHeaders.js +0 -301
  170. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosHeaders.js.map +0 -1
  171. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/InterceptorManager.js +0 -70
  172. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/InterceptorManager.js.map +0 -1
  173. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/buildFullPath.js +0 -22
  174. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/buildFullPath.js.map +0 -1
  175. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/dispatchRequest.js +0 -82
  176. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/dispatchRequest.js.map +0 -1
  177. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/mergeConfig.js +0 -107
  178. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/mergeConfig.js.map +0 -1
  179. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/settle.js +0 -28
  180. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/settle.js.map +0 -1
  181. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/transformData.js +0 -29
  182. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/transformData.js.map +0 -1
  183. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/index.js +0 -160
  184. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/index.js.map +0 -1
  185. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/transitional.js +0 -8
  186. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/transitional.js.map +0 -1
  187. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/env/data.js +0 -4
  188. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/env/data.js.map +0 -1
  189. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -57
  190. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/AxiosURLSearchParams.js.map +0 -1
  191. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -72
  192. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/HttpStatusCode.js.map +0 -1
  193. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/bind.js +0 -8
  194. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/bind.js.map +0 -1
  195. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/buildURL.js +0 -70
  196. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/buildURL.js.map +0 -1
  197. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/combineURLs.js +0 -16
  198. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/combineURLs.js.map +0 -1
  199. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/composeSignals.js +0 -49
  200. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/composeSignals.js.map +0 -1
  201. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/cookies.js +0 -44
  202. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/cookies.js.map +0 -1
  203. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/formDataToJSON.js +0 -94
  204. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/formDataToJSON.js.map +0 -1
  205. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -16
  206. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAbsoluteURL.js.map +0 -1
  207. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAxiosError.js +0 -15
  208. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAxiosError.js.map +0 -1
  209. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -17
  210. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isURLSameOrigin.js.map +0 -1
  211. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/null.js +0 -5
  212. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/null.js.map +0 -1
  213. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseHeaders.js +0 -56
  214. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseHeaders.js.map +0 -1
  215. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseProtocol.js +0 -7
  216. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseProtocol.js.map +0 -1
  217. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/progressEventReducer.js +0 -47
  218. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/progressEventReducer.js.map +0 -1
  219. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/resolveConfig.js +0 -59
  220. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/resolveConfig.js.map +0 -1
  221. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/speedometer.js +0 -54
  222. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/speedometer.js.map +0 -1
  223. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/spread.js +0 -29
  224. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/spread.js.map +0 -1
  225. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/throttle.js +0 -45
  226. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/throttle.js.map +0 -1
  227. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toFormData.js +0 -216
  228. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toFormData.js.map +0 -1
  229. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
  230. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toURLEncodedForm.js.map +0 -1
  231. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/trackStream.js +0 -89
  232. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/trackStream.js.map +0 -1
  233. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/validator.js +0 -100
  234. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/validator.js.map +0 -1
  235. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -4
  236. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/Blob.js.map +0 -1
  237. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -4
  238. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/FormData.js.map +0 -1
  239. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -6
  240. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js.map +0 -1
  241. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/index.js +0 -16
  242. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/index.js.map +0 -1
  243. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/common/utils.js +0 -46
  244. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/common/utils.js.map +0 -1
  245. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/index.js +0 -10
  246. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/index.js.map +0 -1
  247. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/utils.js +0 -761
  248. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/utils.js.map +0 -1
  249. package/dist/utils/settings.js +0 -7
  250. package/dist/utils/settings.js.map +0 -1
  251. /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.2_rollup@4.29.1_tslib@2.8.1_typescript@5.7.2 → @rollup_plugin-typescript@12.1.2_rollup@4.34.6_tslib@2.8.1_typescript@5.7.3}/node_modules/tslib/tslib.es6.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"querySelectorDeep.js","sources":["../../../../../../../../../node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/querySelectorDeep.js"],"sourcesContent":["import { normalizeSelector } from './normalize';\n\n/**\n* Finds first matching elements on the page that may be in a shadow root using a complex selector of n-depth\n*\n* Don't have to specify all shadow roots to button, tree is travered to find the correct element\n*\n* Example querySelectorAllDeep('downloads-item:nth-child(4) #remove');\n*\n* Example should work on chrome://downloads outputting the remove button inside of a download card component\n*\n* Example find first active download link element querySelectorDeep('#downloads-list .is-active a[href^=\"https://\"]');\n*\n* Another example querySelectorAllDeep('#downloads-list div#title-area + a');\ne.g.\n*/\nexport function querySelectorAllDeep(selector, root = document, allElements = null) {\n return _querySelectorDeep(selector, true, root, allElements);\n}\n\nexport function querySelectorDeep(selector, root = document, allElements = null) {\n return _querySelectorDeep(selector, false, root, allElements);\n}\n\nfunction _querySelectorDeep(selector, findMany, root, allElements = null) {\n selector = normalizeSelector(selector);\n let lightElement = root.querySelector(selector);\n\n if (document.head.createShadowRoot || document.head.attachShadow) {\n // no need to do any special if selector matches something specific in light-dom\n if (!findMany && lightElement) {\n return lightElement;\n }\n\n // split on commas because those are a logical divide in the operation\n const selectionsToMake = splitByCharacterUnlessQuoted(selector, ',');\n\n return selectionsToMake.reduce((acc, minimalSelector) => {\n // if not finding many just reduce the first match\n if (!findMany && acc) {\n return acc;\n }\n // do best to support complex selectors and split the query\n const splitSelector = splitByCharacterUnlessQuoted(minimalSelector\n //remove white space at start of selector\n .replace(/^\\s+/g, '')\n .replace(/\\s*([>+~]+)\\s*/g, '$1'), ' ')\n // filter out entry white selectors\n .filter((entry) => !!entry)\n // convert \"a > b\" to [\"a\", \"b\"]\n .map((entry) => splitByCharacterUnlessQuoted(entry, '>'));\n\n const possibleElementsIndex = splitSelector.length - 1;\n const lastSplitPart = splitSelector[possibleElementsIndex][splitSelector[possibleElementsIndex].length - 1];\n const possibleElements = collectAllElementsDeep(lastSplitPart, root, allElements);\n const findElements = findMatchingElement(splitSelector, possibleElementsIndex, root);\n if (findMany) {\n acc = acc.concat(possibleElements.filter(findElements));\n return acc;\n } else {\n acc = possibleElements.find(findElements);\n return acc || null;\n }\n }, findMany ? [] : null);\n\n\n } else {\n if (!findMany) {\n return lightElement;\n } else {\n return root.querySelectorAll(selector);\n }\n }\n\n}\n\nfunction findMatchingElement(splitSelector, possibleElementsIndex, root) {\n return (element) => {\n let position = possibleElementsIndex;\n let parent = element;\n let foundElement = false;\n while (parent && !isDocumentNode(parent)) {\n let foundMatch = true;\n if (splitSelector[position].length === 1) {\n foundMatch = parent.matches(splitSelector[position]);\n } else {\n // selector is in the format \"a > b\"\n // make sure a few parents match in order\n const reversedParts = ([]).concat(splitSelector[position]).reverse();\n let newParent = parent;\n for (const part of reversedParts) {\n if (!newParent || !newParent.matches(part)) {\n foundMatch = false;\n break;\n }\n newParent = findParentOrHost(newParent, root);\n }\n }\n\n if (foundMatch && position === 0) {\n foundElement = true;\n break;\n }\n if (foundMatch) {\n position--;\n }\n parent = findParentOrHost(parent, root);\n }\n return foundElement;\n };\n\n}\n\nfunction splitByCharacterUnlessQuoted(selector, character) {\n return selector.match(/\\\\?.|^$/g).reduce((p, c) => {\n if (c === '\"' && !p.sQuote) {\n p.quote ^= 1;\n p.a[p.a.length - 1] += c;\n } else if (c === '\\'' && !p.quote) {\n p.sQuote ^= 1;\n p.a[p.a.length - 1] += c;\n\n } else if (!p.quote && !p.sQuote && c === character) {\n p.a.push('');\n } else {\n p.a[p.a.length - 1] += c;\n }\n return p;\n }, { a: [''] }).a;\n}\n\n/**\n * Checks if the node is a document node or not.\n * @param {Node} node\n * @returns {node is Document | DocumentFragment}\n */\nfunction isDocumentNode(node) {\n return node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.DOCUMENT_NODE;\n}\n\nfunction findParentOrHost(element, root) {\n const parentNode = element.parentNode;\n return (parentNode && parentNode.host && parentNode.nodeType === 11) ? parentNode.host : parentNode === root ? null : parentNode;\n}\n\n/**\n * Finds all elements on the page, inclusive of those within shadow roots.\n * @param {string=} selector Simple selector to filter the elements by. e.g. 'a', 'div.main'\n * @return {!Array<string>} List of anchor hrefs.\n * @author ebidel@ (Eric Bidelman)\n * License Apache-2.0\n */\nexport function collectAllElementsDeep(selector = null, root, cachedElements = null) {\n let allElements = [];\n\n if (cachedElements) {\n allElements = cachedElements;\n } else {\n const findAllElements = function(nodes) {\n for (let i = 0; i < nodes.length; i++) {\n const el = nodes[i];\n allElements.push(el);\n // If the element has a shadow root, dig deeper.\n if (el.shadowRoot) {\n findAllElements(el.shadowRoot.querySelectorAll('*'));\n }\n }\n };\n if(root.shadowRoot) {\n findAllElements(root.shadowRoot.querySelectorAll('*'));\n }\n findAllElements(root.querySelectorAll('*'));\n }\n\n return selector ? allElements.filter(el => el.matches(selector)) : allElements;\t}\n\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,WAAW,GAAG,IAAI,EAAE;AACpF,IAAI,OAAO,kBAAkB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC;AAChE;;AAMA,SAAS,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,EAAE;AAC1E,IAAI,QAAQ,GAAG,iBAAiB,CAAC,QAAQ,CAAC;AAC1C,IAAuB,IAAI,CAAC,aAAa,CAAC,QAAQ;;AAElD,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,gBAAgB,IAAI,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE;;AAMtE;AACA,QAAQ,MAAM,gBAAgB,GAAG,4BAA4B,CAAC,QAAQ,EAAE,GAAG,CAAC;;AAE5E,QAAQ,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,eAAe,KAAK;AAKjE;AACA,YAAY,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAC/D;AACA,qBAAqB,OAAO,CAAC,OAAO,EAAE,EAAE;AACxC,qBAA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xB,QAAQ,WAAW,GAAG,cAAc;AACpC,KAAK,MAAM;AACX,QAAQ,MAAM,eAAe,GAAG,SAAS,KAAK,EAAE;AAChD,YAAY,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACnD,gBAAgB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;AACnC,gBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;AACpC;AACA,gBAAgB,IAAI,EAAE,CAAC,UAAU,EAAE;AACnC,oBAAoB,eAAe,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACxE;AACA;AACA,SAAS;AACT,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE;AAC5B,YAAY,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAClE;AACA,QAAQ,eAAe,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACnD;;AAEA,IAAI,OAAO,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,WAAW,CAAC;;;;","x_google_ignoreList":[0]}
@@ -1,5 +1,29 @@
1
+ import { MobilePassData } from '../base/n3xus/types';
2
+ export type FpSession = {
3
+ issueTS: number;
4
+ token: string;
5
+ didToken: string;
6
+ apiKey: string;
7
+ mobilePass?: Array<MobilePassData> | null;
8
+ };
1
9
  export declare const getErrorMessage: (error: unknown) => string;
2
- export declare const getStoredSession: () => string | null;
3
- export declare const setStoredSession: (session: string) => void;
10
+ export declare const getLatestSession: (apiKey: string) => FpSession | null;
11
+ export declare const addSession: (session: FpSession) => void;
12
+ export declare const domainToHandle: (url: string) => string | null;
4
13
  export declare const clearStoredSession: () => void;
14
+ export declare const sessionKey: string;
15
+ export type LogoSet = {
16
+ large: {
17
+ src: string;
18
+ };
19
+ medium: {
20
+ src: string;
21
+ };
22
+ small: {
23
+ src: string;
24
+ };
25
+ alt: string;
26
+ };
27
+ export declare const preloadLogos: (logos: LogoSet) => void;
28
+ export declare const detectMobilePlatform: () => string;
5
29
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAuDA,eAAO,MAAM,eAAe,UAAW,OAAO,KAAG,MAEhD,CAAA;AAOD,eAAO,MAAM,gBAAgB,QAAO,MAAM,GAAG,IAO5C,CAAA;AAQD,eAAO,MAAM,gBAAgB,YAAa,MAAM,KAAG,IAMlD,CAAA;AAUD,eAAO,MAAM,kBAAkB,QAAO,IAMrC,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAYpD,MAAM,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;CACzC,CAAA;AA8CD,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,MAEhD,CAAA;AAOD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,SAAS,GAAG,IAoB7D,CAAA;AASD,eAAO,MAAM,UAAU,GAAI,SAAS,SAAS,KAAG,IAgB/C,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,KAAI,MAAM,kBAQxC,CAAA;AAUD,eAAO,MAAM,kBAAkB,QAAO,IAMrC,CAAA;AAED,eAAO,MAAM,UAAU,QAA2E,CAAA;AAKlG,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,MAAM,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,KAAK,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;CACZ,CAAA;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,SAgB1C,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAO,MAoBvC,CAAC"}
@@ -19,31 +19,89 @@ const toErrorWithMessage = (maybeError) => {
19
19
  const getErrorMessage = (error) => {
20
20
  return toErrorWithMessage(error).message;
21
21
  };
22
- const getStoredSession = () => {
22
+ const getLatestSession = (apiKey) => {
23
23
  try {
24
- return sessionStorage.getItem(FAN_PASS_SESSION_STORAGE_KEY);
24
+ const sessions = sessionStorage.getItem(sessionKey);
25
+ if (!sessions)
26
+ return null;
27
+ const parsedSessions = JSON.parse(sessions);
28
+ if (!Array.isArray(parsedSessions) || parsedSessions.length === 0)
29
+ return null;
30
+ const matchingSessions = parsedSessions
31
+ .filter(session => session.apiKey === apiKey)
32
+ .sort((a, b) => b.issueTS - a.issueTS);
33
+ return matchingSessions.length > 0 ? matchingSessions[0] : null;
25
34
  }
26
35
  catch (error) {
27
36
  console.error(getErrorMessage(error));
37
+ return null;
28
38
  }
29
- return null;
30
39
  };
31
- const setStoredSession = (session) => {
40
+ const addSession = (session) => {
32
41
  try {
33
- sessionStorage.setItem(FAN_PASS_SESSION_STORAGE_KEY, session);
42
+ const key = sessionKey;
43
+ const sessions = sessionStorage.getItem(key);
44
+ if (sessions) {
45
+ const parsedSessions = JSON.parse(sessions);
46
+ const updatedData = parsedSessions.map((obj) => obj.apiKey === session.apiKey ? session : obj);
47
+ sessionStorage.setItem(key, JSON.stringify(updatedData));
48
+ }
49
+ else {
50
+ sessionStorage.setItem(key, JSON.stringify([session]));
51
+ }
34
52
  }
35
53
  catch (error) {
36
54
  console.error(getErrorMessage(error));
37
55
  }
38
56
  };
57
+ const domainToHandle = (url) => {
58
+ try {
59
+ const domain = new URL(url).hostname.replace(/\./g, "");
60
+ return domain;
61
+ }
62
+ catch (error) {
63
+ console.error("Invalid URL:", error);
64
+ return null;
65
+ }
66
+ };
39
67
  const clearStoredSession = () => {
40
68
  try {
41
- sessionStorage.removeItem(FAN_PASS_SESSION_STORAGE_KEY);
69
+ sessionStorage.removeItem(sessionKey);
42
70
  }
43
71
  catch (error) {
44
72
  console.error(getErrorMessage(error));
45
73
  }
46
74
  };
75
+ const sessionKey = `${FAN_PASS_SESSION_STORAGE_KEY}${domainToHandle(window.location.href)}`;
76
+ const preloadLogos = (logos) => {
77
+ try {
78
+ if (typeof logos === 'object') {
79
+ Object.keys(logos).forEach((key) => {
80
+ if (typeof logos[key] === 'object' &&
81
+ logos[key] && 'src' in logos[key]) {
82
+ const img = new Image();
83
+ img.src = logos[key].src;
84
+ }
85
+ });
86
+ }
87
+ }
88
+ catch (error) {
89
+ console.warn('Error loading logo images', error);
90
+ }
91
+ };
92
+ const detectMobilePlatform = () => {
93
+ const userAgent = navigator.userAgent || navigator.vendor || ('opera' in window && window.opera);
94
+ if (/iPhone|iPod/i.test(userAgent)) {
95
+ return 'iOS Phone';
96
+ }
97
+ if (/iPad/i.test(userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) {
98
+ return 'iOS Tablet';
99
+ }
100
+ if (/Android/i.test(userAgent)) {
101
+ return /mobile/i.test(userAgent) ? 'Android Phone' : 'Android Tablet';
102
+ }
103
+ return 'Other';
104
+ };
47
105
 
48
- export { clearStoredSession, getErrorMessage, getStoredSession, setStoredSession };
106
+ export { addSession, clearStoredSession, detectMobilePlatform, domainToHandle, getErrorMessage, getLatestSession, preloadLogos, sessionKey };
49
107
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../src/utils/helpers.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAiBA,MAAM,kBAA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AAA,OAAO,YAAY;;AAIvB,IAAA,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AAC5B,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,eAAe,GAAG,gBAAgB;;AAIzE,IAAA,OAAO,OAAO;AAClB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirkay-eng/cirkay-components",
3
- "version": "0.7.2",
3
+ "version": "0.7.5",
4
4
  "type": "module",
5
5
  "module": "./dist/components/index.js",
6
6
  "types": "dist/components/index.d.ts",
@@ -9,25 +9,32 @@
9
9
  ],
10
10
  "exports": {
11
11
  ".": "./dist/components/index.js",
12
- "./fan-pass-connect": "./dist/components/fan-pass-connect/fan-pass-connect.js",
13
- "./discord-bot-install": "./dist/components/discord-bot-install/discord-bot-install.js"
14
- },
15
- "devDependencies": {
16
- "@magic-ext/oauth": "^22.16.0",
17
- "@magic-sdk/types": "^24.0.4",
18
- "@pushengineering/push-web-components": "^3.4.5",
19
- "@rollup/plugin-commonjs": "^28.0.2",
20
- "lit": "^3.1.4"
21
- },
22
- "dependencies": {
23
- "axios": "^1.7.7",
24
- "axios-rate-limit": "^1.4.0",
25
- "magic-sdk": "^28.17.0"
12
+ "./fan-pass-unlock": "./dist/components/fan-pass-unlock/index.js",
13
+ "./fan-pass-claim": "./dist/components/fan-pass-claim/index.js",
14
+ "./mobile-pass": "./dist/components/mobile-pass/index.js",
15
+ "./login-events": "./dist/events/login.js",
16
+ "./unlock-events": "./dist/events/unlock.js",
17
+ "./getLatestSession": "./dist/utils/helpers.js"
26
18
  },
27
19
  "scripts": {
28
20
  "fan-pass:serve": "storybook dev -p 6007",
29
21
  "fan-pass:build:lib": "rollup -c",
30
22
  "fan-pass:build:watch": "rollup -c --watch",
31
- "fan-pass:build:docs": "storybook build"
23
+ "fan-pass:build:docs": "storybook build",
24
+ "fan-pass:manifest": "cem analyze --litelement --outdir dist"
25
+ },
26
+ "devDependencies": {
27
+ "@custom-elements-manifest/analyzer": "^0.10.3",
28
+ "@magic-sdk/types": "^24.18.2",
29
+ "@types/query-selector-shadow-dom": "^1.0.4",
30
+ "@pushengineering/push-web-components": "^3.4.47",
31
+ "custom-element-vs-code-integration": "^1.4.1",
32
+ "lit": "^3.3.0"
33
+ },
34
+ "dependencies": {
35
+ "@magic-ext/oauth": "^23.0.7",
36
+ "magic-sdk": "^29.0.6",
37
+ "mobile-device-detect": "^0.4.3",
38
+ "query-selector-shadow-dom": "^1.0.1"
32
39
  }
33
- }
40
+ }
@@ -1,6 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- export { getDefaultExportFromCjs };
6
- //# sourceMappingURL=_commonjsHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,8 +0,0 @@
1
- import { getDefaultExportFromCjs } from './_commonjsHelpers.js';
2
- import { __require as requireSrc } from '../node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js';
3
-
4
- var srcExports = requireSrc();
5
- var rateLimit = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
6
-
7
- export { rateLimit as default };
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,182 +0,0 @@
1
- var src;
2
- var hasRequiredSrc;
3
-
4
- function requireSrc () {
5
- if (hasRequiredSrc) return src;
6
- hasRequiredSrc = 1;
7
- function AxiosRateLimit (axios) {
8
- this.queue = [];
9
- this.timeslotRequests = 0;
10
-
11
- this.interceptors = {
12
- request: null,
13
- response: null
14
- };
15
-
16
- this.handleRequest = this.handleRequest.bind(this);
17
- this.handleResponse = this.handleResponse.bind(this);
18
-
19
- this.enable(axios);
20
- }
21
-
22
- AxiosRateLimit.prototype.getMaxRPS = function () {
23
- var perSeconds = (this.perMilliseconds / 1000);
24
- return this.maxRequests / perSeconds
25
- };
26
-
27
- AxiosRateLimit.prototype.getQueue = function () {
28
- return this.queue
29
- };
30
-
31
- AxiosRateLimit.prototype.setMaxRPS = function (rps) {
32
- this.setRateLimitOptions({
33
- maxRequests: rps,
34
- perMilliseconds: 1000
35
- });
36
- };
37
-
38
- AxiosRateLimit.prototype.setRateLimitOptions = function (options) {
39
- if (options.maxRPS) {
40
- this.setMaxRPS(options.maxRPS);
41
- } else {
42
- this.perMilliseconds = options.perMilliseconds;
43
- this.maxRequests = options.maxRequests;
44
- }
45
- };
46
-
47
- AxiosRateLimit.prototype.enable = function (axios) {
48
- function handleError (error) {
49
- return Promise.reject(error)
50
- }
51
-
52
- this.interceptors.request = axios.interceptors.request.use(
53
- this.handleRequest,
54
- handleError
55
- );
56
- this.interceptors.response = axios.interceptors.response.use(
57
- this.handleResponse,
58
- handleError
59
- );
60
- };
61
-
62
- /*
63
- * from axios library (dispatchRequest.js:11)
64
- * @param config
65
- */
66
- function throwIfCancellationRequested (config) {
67
- if (config.cancelToken) {
68
- config.cancelToken.throwIfRequested();
69
- }
70
- }
71
-
72
- AxiosRateLimit.prototype.handleRequest = function (request) {
73
- return new Promise(function (resolve, reject) {
74
- this.push({
75
- /*
76
- * rejects a cancelled request and returns request has been resolved or not
77
- * @returns {boolean}
78
- */
79
- resolve: function () {
80
- try {
81
- throwIfCancellationRequested(request);
82
- } catch (error) {
83
- reject(error);
84
- return false
85
- }
86
- resolve(request);
87
- return true
88
- }
89
- });
90
- }.bind(this))
91
- };
92
-
93
- AxiosRateLimit.prototype.handleResponse = function (response) {
94
- this.shift();
95
- return response
96
- };
97
-
98
- AxiosRateLimit.prototype.push = function (requestHandler) {
99
- this.queue.push(requestHandler);
100
- this.shiftInitial();
101
- };
102
-
103
- AxiosRateLimit.prototype.shiftInitial = function () {
104
- setTimeout(function () { return this.shift() }.bind(this), 0);
105
- };
106
-
107
- AxiosRateLimit.prototype.shift = function () {
108
- if (!this.queue.length) return
109
- if (this.timeslotRequests === this.maxRequests) {
110
- if (this.timeoutId && typeof this.timeoutId.ref === 'function') {
111
- this.timeoutId.ref();
112
- }
113
-
114
- return
115
- }
116
-
117
- var queued = this.queue.shift();
118
- var resolved = queued.resolve();
119
-
120
- if (this.timeslotRequests === 0) {
121
- this.timeoutId = setTimeout(function () {
122
- this.timeslotRequests = 0;
123
- this.shift();
124
- }.bind(this), this.perMilliseconds);
125
-
126
- if (typeof this.timeoutId.unref === 'function') {
127
- if (this.queue.length === 0) this.timeoutId.unref();
128
- }
129
- }
130
-
131
- if (!resolved) {
132
- this.shift(); // rejected request --> shift another request
133
- return
134
- }
135
-
136
- this.timeslotRequests += 1;
137
- };
138
-
139
- /**
140
- * Apply rate limit to axios instance.
141
- *
142
- * @example
143
- * import axios from 'axios';
144
- * import rateLimit from 'axios-rate-limit';
145
- *
146
- * // sets max 2 requests per 1 second, other will be delayed
147
- * // note maxRPS is a shorthand for perMilliseconds: 1000, and it takes precedence
148
- * // if specified both with maxRequests and perMilliseconds
149
- * const http = rateLimit(axios.create(), { maxRequests: 2, perMilliseconds: 1000, maxRPS: 2 })
150
- * http.getMaxRPS() // 2
151
- * http.get('https://example.com/api/v1/users.json?page=1') // will perform immediately
152
- * http.get('https://example.com/api/v1/users.json?page=2') // will perform immediately
153
- * http.get('https://example.com/api/v1/users.json?page=3') // will perform after 1 second from the first one
154
- * http.setMaxRPS(3)
155
- * http.getMaxRPS() // 3
156
- * http.setRateLimitOptions({ maxRequests: 6, perMilliseconds: 150 }) // same options as constructor
157
- *
158
- * @param {Object} axios axios instance
159
- * @param {Object} options options for rate limit, available for live update
160
- * @param {Number} options.maxRequests max requests to perform concurrently in given amount of time.
161
- * @param {Number} options.perMilliseconds amount of time to limit concurrent requests.
162
- * @returns {Object} axios instance with interceptors added
163
- */
164
- function axiosRateLimit (axios, options) {
165
- var rateLimitInstance = new AxiosRateLimit(axios);
166
- rateLimitInstance.setRateLimitOptions(options);
167
-
168
- axios.getQueue = AxiosRateLimit.prototype.getQueue.bind(rateLimitInstance);
169
- axios.getMaxRPS = AxiosRateLimit.prototype.getMaxRPS.bind(rateLimitInstance);
170
- axios.setMaxRPS = AxiosRateLimit.prototype.setMaxRPS.bind(rateLimitInstance);
171
- axios.setRateLimitOptions = AxiosRateLimit.prototype.setRateLimitOptions
172
- .bind(rateLimitInstance);
173
-
174
- return axios
175
- }
176
-
177
- src = axiosRateLimit;
178
- return src;
179
- }
180
-
181
- export { requireSrc as __require };
182
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../../node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js"],"sourcesContent":["function AxiosRateLimit (axios) {\n this.queue = []\n this.timeslotRequests = 0\n\n this.interceptors = {\n request: null,\n response: null\n }\n\n this.handleRequest = this.handleRequest.bind(this)\n this.handleResponse = this.handleResponse.bind(this)\n\n this.enable(axios)\n}\n\nAxiosRateLimit.prototype.getMaxRPS = function () {\n var perSeconds = (this.perMilliseconds / 1000)\n return this.maxRequests / perSeconds\n}\n\nAxiosRateLimit.prototype.getQueue = function () {\n return this.queue\n}\n\nAxiosRateLimit.prototype.setMaxRPS = function (rps) {\n this.setRateLimitOptions({\n maxRequests: rps,\n perMilliseconds: 1000\n })\n}\n\nAxiosRateLimit.prototype.setRateLimitOptions = function (options) {\n if (options.maxRPS) {\n this.setMaxRPS(options.maxRPS)\n } else {\n this.perMilliseconds = options.perMilliseconds\n this.maxRequests = options.maxRequests\n }\n}\n\nAxiosRateLimit.prototype.enable = function (axios) {\n function handleError (error) {\n return Promise.reject(error)\n }\n\n this.interceptors.request = axios.interceptors.request.use(\n this.handleRequest,\n handleError\n )\n this.interceptors.response = axios.interceptors.response.use(\n this.handleResponse,\n handleError\n )\n}\n\n/*\n * from axios library (dispatchRequest.js:11)\n * @param config\n */\nfunction throwIfCancellationRequested (config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested()\n }\n}\n\nAxiosRateLimit.prototype.handleRequest = function (request) {\n return new Promise(function (resolve, reject) {\n this.push({\n /*\n * rejects a cancelled request and returns request has been resolved or not\n * @returns {boolean}\n */\n resolve: function () {\n try {\n throwIfCancellationRequested(request)\n } catch (error) {\n reject(error)\n return false\n }\n resolve(request)\n return true\n }\n })\n }.bind(this))\n}\n\nAxiosRateLimit.prototype.handleResponse = function (response) {\n this.shift()\n return response\n}\n\nAxiosRateLimit.prototype.push = function (requestHandler) {\n this.queue.push(requestHandler)\n this.shiftInitial()\n}\n\nAxiosRateLimit.prototype.shiftInitial = function () {\n setTimeout(function () { return this.shift() }.bind(this), 0)\n}\n\nAxiosRateLimit.prototype.shift = function () {\n if (!this.queue.length) return\n if (this.timeslotRequests === this.maxRequests) {\n if (this.timeoutId && typeof this.timeoutId.ref === 'function') {\n this.timeoutId.ref()\n }\n\n return\n }\n\n var queued = this.queue.shift()\n var resolved = queued.resolve()\n\n if (this.timeslotRequests === 0) {\n this.timeoutId = setTimeout(function () {\n this.timeslotRequests = 0\n this.shift()\n }.bind(this), this.perMilliseconds)\n\n if (typeof this.timeoutId.unref === 'function') {\n if (this.queue.length === 0) this.timeoutId.unref()\n }\n }\n\n if (!resolved) {\n this.shift() // rejected request --> shift another request\n return\n }\n\n this.timeslotRequests += 1\n}\n\n/**\n * Apply rate limit to axios instance.\n *\n * @example\n * import axios from 'axios';\n * import rateLimit from 'axios-rate-limit';\n *\n * // sets max 2 requests per 1 second, other will be delayed\n * // note maxRPS is a shorthand for perMilliseconds: 1000, and it takes precedence\n * // if specified both with maxRequests and perMilliseconds\n * const http = rateLimit(axios.create(), { maxRequests: 2, perMilliseconds: 1000, maxRPS: 2 })\n* http.getMaxRPS() // 2\n * http.get('https://example.com/api/v1/users.json?page=1') // will perform immediately\n * http.get('https://example.com/api/v1/users.json?page=2') // will perform immediately\n * http.get('https://example.com/api/v1/users.json?page=3') // will perform after 1 second from the first one\n * http.setMaxRPS(3)\n * http.getMaxRPS() // 3\n * http.setRateLimitOptions({ maxRequests: 6, perMilliseconds: 150 }) // same options as constructor\n *\n * @param {Object} axios axios instance\n * @param {Object} options options for rate limit, available for live update\n * @param {Number} options.maxRequests max requests to perform concurrently in given amount of time.\n * @param {Number} options.perMilliseconds amount of time to limit concurrent requests.\n * @returns {Object} axios instance with interceptors added\n */\nfunction axiosRateLimit (axios, options) {\n var rateLimitInstance = new AxiosRateLimit(axios)\n rateLimitInstance.setRateLimitOptions(options)\n\n axios.getQueue = AxiosRateLimit.prototype.getQueue.bind(rateLimitInstance)\n axios.getMaxRPS = AxiosRateLimit.prototype.getMaxRPS.bind(rateLimitInstance)\n axios.setMaxRPS = AxiosRateLimit.prototype.setMaxRPS.bind(rateLimitInstance)\n axios.setRateLimitOptions = AxiosRateLimit.prototype.setRateLimitOptions\n .bind(rateLimitInstance)\n\n return axios\n}\n\nmodule.exports = axiosRateLimit\n"],"names":[],"mappings":";;;;;;CAAA,SAAS,cAAc,EAAE,KAAK,EAAE;GAC9B,IAAI,CAAC,KAAK,GAAG;GACb,IAAI,CAAC,gBAAgB,GAAG;;GAExB,IAAI,CAAC,YAAY,GAAG;KAClB,OAAO,EAAE,IAAI;AACjB,KAAI,QAAQ,EAAE;AACd;;GAEE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI;GACjD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI;;AAErD,GAAE,IAAI,CAAC,MAAM,CAAC,KAAK;AACnB;;AAEA,CAAA,cAAc,CAAC,SAAS,CAAC,SAAS,GAAG,YAAY;AACjD,GAAE,IAAI,UAAU,IAAI,IAAI,CAAC,eAAe,GAAG,IAAI;AAC/C,GAAE,OAAO,IAAI,CAAC,WAAW,GAAG;AAC5B;;AAEA,CAAA,cA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- import utils from '../utils.js';
2
- import httpAdapter from '../helpers/null.js';
3
- import xhrAdapter from './xhr.js';
4
- import fetchAdapter from './fetch.js';
5
- import AxiosError from '../core/AxiosError.js';
6
-
7
- const knownAdapters = {
8
- http: httpAdapter,
9
- xhr: xhrAdapter,
10
- fetch: fetchAdapter
11
- };
12
-
13
- utils.forEach(knownAdapters, (fn, value) => {
14
- if (fn) {
15
- try {
16
- Object.defineProperty(fn, 'name', {value});
17
- } catch (e) {
18
- // eslint-disable-next-line no-empty
19
- }
20
- Object.defineProperty(fn, 'adapterName', {value});
21
- }
22
- });
23
-
24
- const renderReason = (reason) => `- ${reason}`;
25
-
26
- const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
27
-
28
- var adapters = {
29
- getAdapter: (adapters) => {
30
- adapters = utils.isArray(adapters) ? adapters : [adapters];
31
-
32
- const {length} = adapters;
33
- let nameOrAdapter;
34
- let adapter;
35
-
36
- const rejectedReasons = {};
37
-
38
- for (let i = 0; i < length; i++) {
39
- nameOrAdapter = adapters[i];
40
- let id;
41
-
42
- adapter = nameOrAdapter;
43
-
44
- if (!isResolvedHandle(nameOrAdapter)) {
45
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
46
-
47
- if (adapter === undefined) {
48
- throw new AxiosError(`Unknown adapter '${id}'`);
49
- }
50
- }
51
-
52
- if (adapter) {
53
- break;
54
- }
55
-
56
- rejectedReasons[id || '#' + i] = adapter;
57
- }
58
-
59
- if (!adapter) {
60
-
61
- const reasons = Object.entries(rejectedReasons)
62
- .map(([id, state]) => `adapter ${id} ` +
63
- (state === false ? 'is not supported by the environment' : 'is not available in the build')
64
- );
65
-
66
- let s = length ?
67
- (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
68
- 'as no adapter specified';
69
-
70
- throw new AxiosError(
71
- `There is no suitable adapter to dispatch the request ` + s,
72
- 'ERR_NOT_SUPPORT'
73
- );
74
- }
75
-
76
- return adapter;
77
- },
78
- adapters: knownAdapters
79
- };
80
-
81
- export { adapters as default };
82
- //# sourceMappingURL=adapters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapters.js","sources":["../../../../../../../../../../node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/adapters.js"],"sourcesContent":["import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` +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