@credenza3/passport-sui 0.3.11 → 0.3.13

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 (81) hide show
  1. package/dist/{App-CU-m_00m.js → App-CRoROYqR.js} +18 -18
  2. package/dist/{App-CU-m_00m.js.map → App-CRoROYqR.js.map} +1 -1
  3. package/dist/{Button-Vr0EBbKT.js → Button-CspE17sk.js} +4 -4
  4. package/dist/{Button-Vr0EBbKT.js.map → Button-CspE17sk.js.map} +1 -1
  5. package/dist/{ButtonBack-BPcxV52q.js → ButtonBack-D6_lbwbk.js} +4 -4
  6. package/dist/{ButtonBack-BPcxV52q.js.map → ButtonBack-D6_lbwbk.js.map} +1 -1
  7. package/dist/{ButtonLink-Hg3svCIX.js → ButtonLink-B96Gruho.js} +3 -3
  8. package/dist/{ButtonLink-Hg3svCIX.js.map → ButtonLink-B96Gruho.js.map} +1 -1
  9. package/dist/{ConfirmAccount-vXS2W3q2.js → ConfirmAccount-C0zIIkbD.js} +9 -9
  10. package/dist/{ConfirmAccount-vXS2W3q2.js.map → ConfirmAccount-C0zIIkbD.js.map} +1 -1
  11. package/dist/{ContentHeader-P6Nd1MuL.js → ContentHeader-CQIVUr1t.js} +3 -3
  12. package/dist/{ContentHeader-P6Nd1MuL.js.map → ContentHeader-CQIVUr1t.js.map} +1 -1
  13. package/dist/{Error-D29Po_FZ.js → Error-fvg1wNmO.js} +5 -5
  14. package/dist/{Error-D29Po_FZ.js.map → Error-fvg1wNmO.js.map} +1 -1
  15. package/dist/{Input-4KDIY4ZB.js → Input-CZxdXpY0.js} +4 -4
  16. package/dist/{Input-4KDIY4ZB.js.map → Input-CZxdXpY0.js.map} +1 -1
  17. package/dist/{Label-dU_ElQRv.js → Label-DHg5Eopa.js} +3 -3
  18. package/dist/{Label-dU_ElQRv.js.map → Label-DHg5Eopa.js.map} +1 -1
  19. package/dist/{Loader-D6GW8BDi.js → Loader-C79ecQqT.js} +3 -3
  20. package/dist/{Loader-D6GW8BDi.js.map → Loader-C79ecQqT.js.map} +1 -1
  21. package/dist/{Login-D2goJX7p.js → Login-eVjfNMQ1.js} +9 -9
  22. package/dist/{Login-D2goJX7p.js.map → Login-eVjfNMQ1.js.map} +1 -1
  23. package/dist/{Logout-D6L5o12g.js → Logout-s_Mgra3X.js} +6 -6
  24. package/dist/{Logout-D6L5o12g.js.map → Logout-s_Mgra3X.js.map} +1 -1
  25. package/dist/{Nav-Nn-rfrwX.js → Nav-B9xHPNpC.js} +5 -5
  26. package/dist/{Nav-Nn-rfrwX.js.map → Nav-B9xHPNpC.js.map} +1 -1
  27. package/dist/{PassportId-DqKmvuNz.js → PassportId-DSqYz7Gh.js} +7 -7
  28. package/dist/{PassportId-DqKmvuNz.js.map → PassportId-DSqYz7Gh.js.map} +1 -1
  29. package/dist/Payment-BkLGQJI1.js +1177 -0
  30. package/dist/Payment-BkLGQJI1.js.map +1 -0
  31. package/dist/{PaymentResult-FXEXyOCu.js → PaymentResult-BNTHnUcb.js} +4 -4
  32. package/dist/{PaymentResult-FXEXyOCu.js.map → PaymentResult-BNTHnUcb.js.map} +1 -1
  33. package/dist/{Profile-ab0-gcxX.js → Profile-DffvewXa.js} +7 -7
  34. package/dist/{Profile-ab0-gcxX.js.map → Profile-DffvewXa.js.map} +1 -1
  35. package/dist/ProgressVideo-j-Lycq1p.js +118 -0
  36. package/dist/ProgressVideo-j-Lycq1p.js.map +1 -0
  37. package/dist/{ProgressVideo.service-CWrI-N1Z.js → ProgressVideo.service-C--WegA-.js} +2 -2
  38. package/dist/{ProgressVideo.service-CWrI-N1Z.js.map → ProgressVideo.service-C--WegA-.js.map} +1 -1
  39. package/dist/{RichAlert-DyaE1wo7.js → RichAlert-5m41r_H6.js} +5 -5
  40. package/dist/{RichAlert-DyaE1wo7.js.map → RichAlert-5m41r_H6.js.map} +1 -1
  41. package/dist/{Scanner-vt4sV3Rz.js → Scanner-C9yIgnwg.js} +80 -79
  42. package/dist/Scanner-C9yIgnwg.js.map +1 -0
  43. package/dist/{SendTokens-Dbrc5HxJ.js → SendTokens-BKMMCdSY.js} +124 -123
  44. package/dist/SendTokens-BKMMCdSY.js.map +1 -0
  45. package/dist/{Sign-Ds4GEue_.js → Sign-xpHeaqk3.js} +7 -7
  46. package/dist/{Sign-Ds4GEue_.js.map → Sign-xpHeaqk3.js.map} +1 -1
  47. package/dist/{Stripe.service-BUgN_1mD.js → Stripe.service-DRDw38wz.js} +3 -3
  48. package/dist/{Stripe.service-BUgN_1mD.js.map → Stripe.service-DRDw38wz.js.map} +1 -1
  49. package/dist/{UpdateProfile-BxkUlSkj.js → UpdateProfile-B-aPsV7h.js} +10 -10
  50. package/dist/{UpdateProfile-BxkUlSkj.js.map → UpdateProfile-B-aPsV7h.js.map} +1 -1
  51. package/dist/{UserInfo-Cs4E9tHX.js → UserInfo-Du0CRAQv.js} +4 -4
  52. package/dist/{UserInfo-Cs4E9tHX.js.map → UserInfo-Du0CRAQv.js.map} +1 -1
  53. package/dist/{Wallet-DGUV1WGq.js → Wallet-hwp7zHvS.js} +8 -8
  54. package/dist/{Wallet-DGUV1WGq.js.map → Wallet-hwp7zHvS.js.map} +1 -1
  55. package/dist/constants-ByF0HyKB.js +10 -0
  56. package/dist/constants-ByF0HyKB.js.map +1 -0
  57. package/dist/{each-DmbHM3bR.js → each-dQyu3w4k.js} +2 -2
  58. package/dist/{each-DmbHM3bR.js.map → each-dQyu3w4k.js.map} +1 -1
  59. package/dist/{html-B-crrhFB.js → html-DVImOVHa.js} +3 -3
  60. package/dist/{html-B-crrhFB.js.map → html-DVImOVHa.js.map} +1 -1
  61. package/dist/{index-BbBSOc9W.js → index-CwDtq0zH.js} +33 -37
  62. package/dist/{index-BbBSOc9W.js.map → index-CwDtq0zH.js.map} +1 -1
  63. package/dist/{index-client-UO2Oq7AI.js → index-client-DGe2j9ec.js} +2 -2
  64. package/dist/{index-client-UO2Oq7AI.js.map → index-client-DGe2j9ec.js.map} +1 -1
  65. package/dist/{input-d3TpzNag.js → input-BRTxrZmg.js} +2 -2
  66. package/dist/{input-d3TpzNag.js.map → input-BRTxrZmg.js.map} +1 -1
  67. package/dist/{legacy-DewULh04.js → legacy-D8zPmpUN.js} +2 -2
  68. package/dist/{legacy-DewULh04.js.map → legacy-D8zPmpUN.js.map} +1 -1
  69. package/dist/passport.es.js +2 -2
  70. package/dist/passport.umd.js +121 -121
  71. package/dist/passport.umd.js.map +1 -1
  72. package/dist/{socket-io-BEx5P5xa.js → socket-io-rskefv7G.js} +2 -2
  73. package/dist/{socket-io-BEx5P5xa.js.map → socket-io-rskefv7G.js.map} +1 -1
  74. package/dist/types/app/pages/payment/payment.constants.d.ts +0 -4
  75. package/package.json +1 -1
  76. package/dist/Payment-CQJlpazv.js +0 -1176
  77. package/dist/Payment-CQJlpazv.js.map +0 -1
  78. package/dist/ProgressVideo-asaS5Dw_.js +0 -121
  79. package/dist/ProgressVideo-asaS5Dw_.js.map +0 -1
  80. package/dist/Scanner-vt4sV3Rz.js.map +0 -1
  81. package/dist/SendTokens-Dbrc5HxJ.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateProfile-BxkUlSkj.js","sources":["../../ui/main/shared/inputs/select/Select.svelte","../../ui/main/shared/inputs/phone/PhoneInput.constants.ts","../../ui/main/shared/inputs/phone/PhoneInput.svelte","../../ui/main/update-profile/UpdateProfile.svelte","../src/app/pages/update-profile/UpdateProfile.svelte"],"sourcesContent":["<style>\n .simple {\n background-image: none;\n padding: 0 10px;\n text-align: center; \n }\n .simple:focus {\n background-image: none;\n }\n</style>\n\n<script lang=\"ts\">\n export let options: { value: string; name?: string }[]\n export let placeholder: string | undefined = undefined\n export let label: string | undefined = undefined\n export let selected: string | undefined = undefined\n export let onChange: undefined | ((...args: unknown[]) => unknown) = undefined\n export let simple: boolean = false\n export let disabled: boolean = false\n\n const handleChange = (e: Event) => {\n const target = e.target as HTMLSelectElement\n if (selected !== undefined) selected = target.value\n if (onChange) onChange(e)\n }\n</script>\n\n<div>\n {#if label}\n <label class=\"crtw-font-medium\" for=\"credenzaSelect\">{label}</label>\n {/if}\n <select\n class=\"crtw-w-full crtw-h-[53px] crtw-px-5 crtw-appearance-none crtw-text-base crtw-rounded crtw-border crtw-border-gray-300\n crtw-cursor-pointer crtw-text-gray-500 focus:crtw-outline-none focus:crtw-border-blue-900 focus:crtw-text-blue-900\n {simple ? 'simple' : ''}\"\n name=\"credenzaSelect\"\n on:change={handleChange}\n {disabled}\n >\n {#if placeholder}\n <option disabled={true} selected={!selected} hidden={true}>{placeholder}</option>\n {/if}\n {#each options as item}\n <option value={item.value} selected={selected === item.value}> {item.name ?? item.value} </option>\n {/each}\n </select>\n</div>\n","export const countryCodes = [\n { value: '+1', name: 'US/CA +1' },\n { value: '+49', name: 'DE +49' },\n { value: '+33', name: 'FR +33' },\n { value: '+44', name: 'UK +44' },\n { value: '+380', name: 'UA +380' },\n { value: '+48', name: 'PL +48' },\n { value: '+233', name: 'GH +233' },\n]\n","<script lang=\"ts\">\n import Select from '../select/Select.svelte'\n import Input from '../input/Input.svelte'\n import { PHONE_PATTERN, validate } from '../../../../../utils/lib/validation/validation'\n import { countryCodes } from './PhoneInput.constants'\n\n export let phone: string\n export let isValid: boolean = true\n export let disabled: boolean = false\n\n let selectedCountryCode: string = countryCodes[0].value\n let number: number | null\n\n if (phone) {\n for (const countryCode of countryCodes) {\n if (phone.indexOf(countryCode.value) === 0) {\n number = parseInt(phone.slice(countryCode.value.length))\n selectedCountryCode = countryCode.value\n break\n }\n }\n }\n\n $: {\n isValid = !number || validate(String(number), PHONE_PATTERN)\n isValid && selectedCountryCode && number ? (phone = selectedCountryCode + String(number).trim()) : ''\n }\n</script>\n\n<div class=\"crtw-flex crtw-justify-center crtw-flex-row\">\n <div class=\"crtw-w-40 crtw-mr-0.5\">\n <Select options={countryCodes} simple bind:selected={selectedCountryCode} {disabled} />\n </div>\n <Input\n type=\"number\"\n min=\"0\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n placeholder=\"Phone Number\"\n bind:value={number}\n name=\"phone\"\n {disabled}\n />\n</div>\n","<script lang=\"ts\">\n import Container from \"../shared/Container.svelte\";\n import Label from \"../shared/inputs/input/Label.svelte\";\n import Input from \"../shared/inputs/input/Input.svelte\";\n import ButtonBack from \"../shared/inputs/button-back/ButtonBack.svelte\";\n import Button from \"../shared/inputs/button/Button.svelte\";\n import PhoneInput from \"../shared/inputs/phone/PhoneInput.svelte\";\n\n export let name: string;\n export let email: string;\n export let phone: string;\n export let isSubmitDisabled: boolean;\n export let error: string | null;\n export let isEmailInputValid: boolean;\n export let options: {\n isExtendedRegistration: boolean | undefined;\n onProfileUpdate: () => void;\n onBackClick: () => void;\n shouldShowBackButton: boolean;\n isEmailChangeDisabled: boolean;\n isPhoneChangeDisabled: boolean;\n };\n\n let {\n isExtendedRegistration,\n onProfileUpdate,\n onBackClick,\n shouldShowBackButton,\n isEmailChangeDisabled,\n isPhoneChangeDisabled,\n } = options;\n</script>\n\n<Container class=\"crtw-flex crtw-justify-center crtw-flex-col crtw-gap-2.5\">\n <div class=\"crtw-flex crtw-flex-col\">\n <Label for=\"NameInput\"\n >First and last name\n {#if isExtendedRegistration}\n <span class=\"crtw-text-red-500\">*</span>\n {/if}\n </Label>\n <Input\n id=\"NameInput\"\n type=\"text\"\n placeholder=\"First and last name\"\n bind:value={name}\n name=\"name\"\n required={isExtendedRegistration}\n />\n </div>\n\n <div class=\"crtw-flex crtw-flex-col\">\n <Label for=\"EmailInput\"\n >Email address\n {#if isExtendedRegistration}\n <span class=\"crtw-text-red-500\">*</span>\n {/if}\n </Label>\n <Input\n id=\"EmailInput\"\n type=\"email\"\n bind:isValid={isEmailInputValid}\n placeholder=\"Email address\"\n bind:value={email}\n name=\"email\"\n disabled={isEmailChangeDisabled}\n />\n </div>\n\n <div class=\"crtw-flex crtw-flex-col\">\n <Label for=\"PhoneInput\">Phone number</Label>\n <PhoneInput bind:phone disabled={isPhoneChangeDisabled} />\n </div>\n\n <Button\n text=\"Update profile\"\n onClick={onProfileUpdate}\n disabled={isSubmitDisabled}\n />\n\n {#if error}\n <div class=\"crtw-text-xs crtw-text-[#990008]\">\n - {error}\n </div>\n {/if}\n\n {#if shouldShowBackButton}\n <div class=\"crtw-text-left crtw-mt-2.5 crtw-w-full\">\n <ButtonBack onClick={onBackClick} />\n </div>\n {/if}\n</Container>\n","<script lang=\"ts\">\n import { onDestroy } from 'svelte'\n import { get } from 'svelte/store'\n import { validate } from '@lib/validation/validation'\n import { fn, userStore, pageStore, forcedPageStore } from '@packages/stores'\n import { Pages } from '@packages/utils/enums'\n import { UpdateProfile } from '@packages/ui'\n import { type TUser } from '@packages/utils/types'\n import { configStore } from '@src/stores/config'\n\n const { updateProfile, close, toastAlert } = get(fn)\n\n let email: string\n let name: string\n let phone: string\n\n let currentUser: TUser\n\n let isEmailChangeDisabled: boolean\n let isPhoneChangeDisabled: boolean\n let isSubmitDisabled: boolean\n\n const unsubscribeUserStore = userStore.subscribe((user) => {\n if (!user) {\n forcedPageStore.set(null)\n close()\n return\n }\n\n name = user.name || ''\n email = user.email || ''\n phone = user.phone || ''\n currentUser = user\n\n const isSocialLoginType =\n user.login_type !== 'credentials' && user.login_type !== 'passwordless'\n isEmailChangeDisabled = !!user.pending?.email || isSocialLoginType\n isPhoneChangeDisabled = !!user.pending?.phone || isSocialLoginType\n })\n\n let isLoading = false\n let isEmailValid: boolean = false\n let isEmailInputValid: boolean = true\n let isNameValid: boolean = true\n let error: string = ''\n\n const executeProfileUpdate = async () => {\n isLoading = true\n error = ''\n try {\n const newData = {\n ...(currentUser.email !== email ? { email } : {}),\n ...(currentUser.name !== name ? { name } : {}),\n ...(currentUser.phone !== phone ? { phone } : {}),\n }\n const updatedUser = await updateProfile(newData)\n forcedPageStore.set(null)\n\n toastAlert(\n 'Account has been updated successfully. Email or phone should be confirmed by entering one-time code.',\n 'success',\n )\n const page = get(pageStore)\n if (!updatedUser?.pending?.phone && !updatedUser?.pending?.email && (!page || page === Pages.UPDATE_PROFILE))\n close()\n } catch (err) {\n const errorText = err?.message || 'Error while updating your account details.'\n toastAlert(errorText, 'failure')\n error = errorText\n }\n isLoading = false\n }\n\n $: {\n isEmailValid = validate(email)\n isEmailInputValid = !email || isEmailValid\n\n $configStore.auth?.extendedRegistration && (isNameValid = !!name)\n\n isSubmitDisabled = isLoading || !isEmailInputValid || !isNameValid\n }\n\n onDestroy(unsubscribeUserStore)\n</script>\n\n<UpdateProfile\n bind:error\n bind:name\n bind:email\n bind:phone\n bind:isSubmitDisabled\n bind:isEmailInputValid\n options={{\n isExtendedRegistration: $configStore.auth?.extendedRegistration,\n onProfileUpdate: executeProfileUpdate,\n onBackClick: () => forcedPageStore.set(null),\n shouldShowBackButton: $forcedPageStore === Pages.UPDATE_PROFILE,\n isEmailChangeDisabled,\n isPhoneChangeDisabled,\n }}\n/>\n"],"names":["options","$.prop","$$props","placeholder","label","selected","onChange","simple","disabled","handleChange","e","target","div","root","label_1","root_1","$$render","consequent","select","$.sibling","node","node_1","$.child","option","root_2","$.set_attribute","$.set_selected","consequent_1","$.each","node_2","item","option_1","root_3","$.get","$.untrack","$.reset","$.event","countryCodes","phone","selectedCountryCode","$.mutable_source","countryCode","number","isValid","validate","PHONE_PATTERN","div_1","Select","$$value","Input","name","email","isSubmitDisabled","error","isEmailInputValid","isExtendedRegistration","onProfileUpdate","onBackClick","shouldShowBackButton","isEmailChangeDisabled","isPhoneChangeDisabled","$.first_child","fragment_1","Label","span","node_3","span_1","root_5","node_5","div_2","node_6","PhoneInput","Button","node_8","__awaiter","thisArg","_arguments","P","generator","updateProfile","close","toastAlert","get","fn","currentUser","unsubscribeUserStore","userStore","user","forcedPageStore","$.set","isSocialLoginType","_a","_b","isLoading","isEmailValid","isNameValid","executeProfileUpdate","newData","updatedUser","page","pageStore","Pages","err","errorText","onDestroy","$.safe_get","UpdateProfile","$$anchor"],"mappings":";;;;;;;;;;;;;;;kBAWA;;;MAEaA,IAA2CC,EAAAC,GAAA,WAAA,EAA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,EAAA4D,CAAA,KAAA,CAAA5D,EAAAqB,CAAA,QAAAyC,CAAA,CAAA;AAAA;;;;;;;;+CA/ECpC,CAAwB,KAE1BC,CAAa;;;;;;;;AAmFnB,IAAA8C,GAAAC,GAAA;AAAA;;;UACA,QAAI;;;UAAJ,MAAI3D,GAAA;;;UACJ,OAAI;;;UAAJ,KAAIA,GAAA;;;UACJ,QAAI;;;UAAJ,MAAIA,GAAA;;;UACF,QAAC;;;UAAD,MAACA,GAAA;;;UACF,mBAAA;;;UAAA,iBAAAA,GAAA;;;;;;;;;;;;;;AAPG;"}
1
+ {"version":3,"file":"UpdateProfile-B-aPsV7h.js","sources":["../../ui/main/shared/inputs/select/Select.svelte","../../ui/main/shared/inputs/phone/PhoneInput.constants.ts","../../ui/main/shared/inputs/phone/PhoneInput.svelte","../../ui/main/update-profile/UpdateProfile.svelte","../src/app/pages/update-profile/UpdateProfile.svelte"],"sourcesContent":["<style>\n .simple {\n background-image: none;\n padding: 0 10px;\n text-align: center; \n }\n .simple:focus {\n background-image: none;\n }\n</style>\n\n<script lang=\"ts\">\n export let options: { value: string; name?: string }[]\n export let placeholder: string | undefined = undefined\n export let label: string | undefined = undefined\n export let selected: string | undefined = undefined\n export let onChange: undefined | ((...args: unknown[]) => unknown) = undefined\n export let simple: boolean = false\n export let disabled: boolean = false\n\n const handleChange = (e: Event) => {\n const target = e.target as HTMLSelectElement\n if (selected !== undefined) selected = target.value\n if (onChange) onChange(e)\n }\n</script>\n\n<div>\n {#if label}\n <label class=\"crtw-font-medium\" for=\"credenzaSelect\">{label}</label>\n {/if}\n <select\n class=\"crtw-w-full crtw-h-[53px] crtw-px-5 crtw-appearance-none crtw-text-base crtw-rounded crtw-border crtw-border-gray-300\n crtw-cursor-pointer crtw-text-gray-500 focus:crtw-outline-none focus:crtw-border-blue-900 focus:crtw-text-blue-900\n {simple ? 'simple' : ''}\"\n name=\"credenzaSelect\"\n on:change={handleChange}\n {disabled}\n >\n {#if placeholder}\n <option disabled={true} selected={!selected} hidden={true}>{placeholder}</option>\n {/if}\n {#each options as item}\n <option value={item.value} selected={selected === item.value}> {item.name ?? item.value} </option>\n {/each}\n </select>\n</div>\n","export const countryCodes = [\n { value: '+1', name: 'US/CA +1' },\n { value: '+49', name: 'DE +49' },\n { value: '+33', name: 'FR +33' },\n { value: '+44', name: 'UK +44' },\n { value: '+380', name: 'UA +380' },\n { value: '+48', name: 'PL +48' },\n { value: '+233', name: 'GH +233' },\n]\n","<script lang=\"ts\">\n import Select from '../select/Select.svelte'\n import Input from '../input/Input.svelte'\n import { PHONE_PATTERN, validate } from '../../../../../utils/lib/validation/validation'\n import { countryCodes } from './PhoneInput.constants'\n\n export let phone: string\n export let isValid: boolean = true\n export let disabled: boolean = false\n\n let selectedCountryCode: string = countryCodes[0].value\n let number: number | null\n\n if (phone) {\n for (const countryCode of countryCodes) {\n if (phone.indexOf(countryCode.value) === 0) {\n number = parseInt(phone.slice(countryCode.value.length))\n selectedCountryCode = countryCode.value\n break\n }\n }\n }\n\n $: {\n isValid = !number || validate(String(number), PHONE_PATTERN)\n isValid && selectedCountryCode && number ? (phone = selectedCountryCode + String(number).trim()) : ''\n }\n</script>\n\n<div class=\"crtw-flex crtw-justify-center crtw-flex-row\">\n <div class=\"crtw-w-40 crtw-mr-0.5\">\n <Select options={countryCodes} simple bind:selected={selectedCountryCode} {disabled} />\n </div>\n <Input\n type=\"number\"\n min=\"0\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n placeholder=\"Phone Number\"\n bind:value={number}\n name=\"phone\"\n {disabled}\n />\n</div>\n","<script lang=\"ts\">\n import Container from \"../shared/Container.svelte\";\n import Label from \"../shared/inputs/input/Label.svelte\";\n import Input from \"../shared/inputs/input/Input.svelte\";\n import ButtonBack from \"../shared/inputs/button-back/ButtonBack.svelte\";\n import Button from \"../shared/inputs/button/Button.svelte\";\n import PhoneInput from \"../shared/inputs/phone/PhoneInput.svelte\";\n\n export let name: string;\n export let email: string;\n export let phone: string;\n export let isSubmitDisabled: boolean;\n export let error: string | null;\n export let isEmailInputValid: boolean;\n export let options: {\n isExtendedRegistration: boolean | undefined;\n onProfileUpdate: () => void;\n onBackClick: () => void;\n shouldShowBackButton: boolean;\n isEmailChangeDisabled: boolean;\n isPhoneChangeDisabled: boolean;\n };\n\n let {\n isExtendedRegistration,\n onProfileUpdate,\n onBackClick,\n shouldShowBackButton,\n isEmailChangeDisabled,\n isPhoneChangeDisabled,\n } = options;\n</script>\n\n<Container class=\"crtw-flex crtw-justify-center crtw-flex-col crtw-gap-2.5\">\n <div class=\"crtw-flex crtw-flex-col\">\n <Label for=\"NameInput\"\n >First and last name\n {#if isExtendedRegistration}\n <span class=\"crtw-text-red-500\">*</span>\n {/if}\n </Label>\n <Input\n id=\"NameInput\"\n type=\"text\"\n placeholder=\"First and last name\"\n bind:value={name}\n name=\"name\"\n required={isExtendedRegistration}\n />\n </div>\n\n <div class=\"crtw-flex crtw-flex-col\">\n <Label for=\"EmailInput\"\n >Email address\n {#if isExtendedRegistration}\n <span class=\"crtw-text-red-500\">*</span>\n {/if}\n </Label>\n <Input\n id=\"EmailInput\"\n type=\"email\"\n bind:isValid={isEmailInputValid}\n placeholder=\"Email address\"\n bind:value={email}\n name=\"email\"\n disabled={isEmailChangeDisabled}\n />\n </div>\n\n <div class=\"crtw-flex crtw-flex-col\">\n <Label for=\"PhoneInput\">Phone number</Label>\n <PhoneInput bind:phone disabled={isPhoneChangeDisabled} />\n </div>\n\n <Button\n text=\"Update profile\"\n onClick={onProfileUpdate}\n disabled={isSubmitDisabled}\n />\n\n {#if error}\n <div class=\"crtw-text-xs crtw-text-[#990008]\">\n - {error}\n </div>\n {/if}\n\n {#if shouldShowBackButton}\n <div class=\"crtw-text-left crtw-mt-2.5 crtw-w-full\">\n <ButtonBack onClick={onBackClick} />\n </div>\n {/if}\n</Container>\n","<script lang=\"ts\">\n import { onDestroy } from 'svelte'\n import { get } from 'svelte/store'\n import { validate } from '@lib/validation/validation'\n import { fn, userStore, pageStore, forcedPageStore } from '@packages/stores'\n import { Pages } from '@packages/utils/enums'\n import { UpdateProfile } from '@packages/ui'\n import { type TUser } from '@packages/utils/types'\n import { configStore } from '@src/stores/config'\n\n const { updateProfile, close, toastAlert } = get(fn)\n\n let email: string\n let name: string\n let phone: string\n\n let currentUser: TUser\n\n let isEmailChangeDisabled: boolean\n let isPhoneChangeDisabled: boolean\n let isSubmitDisabled: boolean\n\n const unsubscribeUserStore = userStore.subscribe((user) => {\n if (!user) {\n forcedPageStore.set(null)\n close()\n return\n }\n\n name = user.name || ''\n email = user.email || ''\n phone = user.phone || ''\n currentUser = user\n\n const isSocialLoginType =\n user.login_type !== 'credentials' && user.login_type !== 'passwordless'\n isEmailChangeDisabled = !!user.pending?.email || isSocialLoginType\n isPhoneChangeDisabled = !!user.pending?.phone || isSocialLoginType\n })\n\n let isLoading = false\n let isEmailValid: boolean = false\n let isEmailInputValid: boolean = true\n let isNameValid: boolean = true\n let error: string = ''\n\n const executeProfileUpdate = async () => {\n isLoading = true\n error = ''\n try {\n const newData = {\n ...(currentUser.email !== email ? { email } : {}),\n ...(currentUser.name !== name ? { name } : {}),\n ...(currentUser.phone !== phone ? { phone } : {}),\n }\n const updatedUser = await updateProfile(newData)\n forcedPageStore.set(null)\n\n toastAlert(\n 'Account has been updated successfully. Email or phone should be confirmed by entering one-time code.',\n 'success',\n )\n const page = get(pageStore)\n if (!updatedUser?.pending?.phone && !updatedUser?.pending?.email && (!page || page === Pages.UPDATE_PROFILE))\n close()\n } catch (err) {\n const errorText = err?.message || 'Error while updating your account details.'\n toastAlert(errorText, 'failure')\n error = errorText\n }\n isLoading = false\n }\n\n $: {\n isEmailValid = validate(email)\n isEmailInputValid = !email || isEmailValid\n\n $configStore.auth?.extendedRegistration && (isNameValid = !!name)\n\n isSubmitDisabled = isLoading || !isEmailInputValid || !isNameValid\n }\n\n onDestroy(unsubscribeUserStore)\n</script>\n\n<UpdateProfile\n bind:error\n bind:name\n bind:email\n bind:phone\n bind:isSubmitDisabled\n bind:isEmailInputValid\n options={{\n isExtendedRegistration: $configStore.auth?.extendedRegistration,\n onProfileUpdate: executeProfileUpdate,\n onBackClick: () => forcedPageStore.set(null),\n shouldShowBackButton: $forcedPageStore === Pages.UPDATE_PROFILE,\n isEmailChangeDisabled,\n isPhoneChangeDisabled,\n }}\n/>\n"],"names":["options","$.prop","$$props","placeholder","label","selected","onChange","simple","disabled","handleChange","e","target","div","root","label_1","root_1","$$render","consequent","select","$.sibling","node","node_1","$.child","option","root_2","$.set_attribute","$.set_selected","consequent_1","$.each","node_2","item","option_1","root_3","$.get","$.untrack","$.reset","$.event","countryCodes","phone","selectedCountryCode","$.mutable_source","countryCode","number","isValid","validate","PHONE_PATTERN","div_1","Select","$$value","Input","name","email","isSubmitDisabled","error","isEmailInputValid","isExtendedRegistration","onProfileUpdate","onBackClick","shouldShowBackButton","isEmailChangeDisabled","isPhoneChangeDisabled","$.first_child","fragment_1","Label","span","node_3","span_1","root_5","node_5","div_2","node_6","PhoneInput","Button","node_8","__awaiter","thisArg","_arguments","P","generator","updateProfile","close","toastAlert","get","fn","currentUser","unsubscribeUserStore","userStore","user","forcedPageStore","$.set","isSocialLoginType","_a","_b","isLoading","isEmailValid","isNameValid","executeProfileUpdate","newData","updatedUser","page","pageStore","Pages","err","errorText","onDestroy","$.safe_get","UpdateProfile","$$anchor"],"mappings":";;;;;;;;;;;;;;;kBAWA;;;MAEaA,IAA2CC,EAAAC,GAAA,WAAA,EAAA,GAC3CC,4BAAqC,MAAA,GACrCC,sBAAwC,MAAA,GACxCC,yBAAmE,MAAA,GACnEC,yBAAuB,MAAA,GACvBC,uBAAyB,EAAA,GAE9BC,yBAA4B,EAAA;QAE5BC,KAAaC,MAAS;UAAEC,IAAWD,EAAA;AACnC,IAAAL,EAAQ,MAAA,UAAAA,EAAAM,EAAA,KAAA,GAAEL,EAAQ,KAAEA,EAAC,EAAAI,CAAA;AAAA,EAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;UAAA,iBAAAA,GAAA;;;;;;;;;;;;;;AAPG;"}
@@ -1,6 +1,6 @@
1
- import { c as J, p as K, h as M, f as x, i as u, r as m, b as v, d as N, u as O, t as b } from "./legacy-DewULh04.js";
2
- import { t as Q, n as j, D as z, m as I, v as L, o as R, w as i, E as a, C as c, z as d, x as n, y as w, r as T, l as W } from "./index-BbBSOc9W.js";
3
- import { a as X } from "./App-CU-m_00m.js";
1
+ import { c as J, p as K, h as M, f as x, i as u, r as m, b as v, d as N, u as O, t as b } from "./legacy-D8zPmpUN.js";
2
+ import { t as Q, n as j, D as z, m as I, v as L, o as R, w as i, E as a, C as c, z as d, x as n, y as w, r as T, l as W } from "./index-CwDtq0zH.js";
3
+ import { a as X } from "./App-CRoROYqR.js";
4
4
  var Y = x('<div class="crtw-w-full crtw-break-all"><p class="crtw-font-medium">User name:</p> <p class="crtw-text-sm"> </p></div>'), Z = x('<div class="crtw-w-full crtw-break-all"><p class="crtw-font-medium">Email address:</p> <p class="crtw-text-sm"><!></p></div>'), $ = x('<div class="crtw-w-full crtw-break-all"><p class="crtw-font-medium">Phone number:</p> <p class="crtw-text-sm"><!></p></div>'), aa = x('<div class="crtw-w-full crtw-break-all"><p class="crtw-font-medium">Logged in address:</p> <p class="crtw-text-sm"> </p></div>'), ea = x('<div class="crtw-w-full crtw-break-all"><p class="crtw-font-medium"> </p> <p class="crtw-text-sm"> </p></div>'), ta = x('<div class="crtw-flex crtw-justify-center crtw-flex-col crtw-items-start crtw-gap-[22px] crtw-w-full crtw-px-2.5 crtw-py-0"><!> <!> <!> <!> <!></div>');
5
5
  function ra(U, h) {
6
6
  if (new.target) return J({ component: ra, ...U });
@@ -101,4 +101,4 @@ function ra(U, h) {
101
101
  export {
102
102
  ra as U
103
103
  };
104
- //# sourceMappingURL=UserInfo-Cs4E9tHX.js.map
104
+ //# sourceMappingURL=UserInfo-Du0CRAQv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserInfo-Cs4E9tHX.js","sources":["../../ui/main/shared/UserInfo.svelte"],"sourcesContent":["<script lang=\"ts\">\n import { TUser } from \"../../../utils/types\";\n\n export let options: {\n storedValueAlias: string;\n balance?: string | null;\n userData: TUser | null;\n userAddress: Promise<string>;\n };\n\n let { storedValueAlias, userAddress } = options;\n $: balance = options.balance\n $: userData = options.userData\n</script>\n\n<div\n class=\"crtw-flex crtw-justify-center crtw-flex-col crtw-items-start crtw-gap-[22px] crtw-w-full crtw-px-2.5 crtw-py-0\"\n>\n {#if userData?.name}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">User name:</p>\n <p class=\"crtw-text-sm\">\n {userData.name}\n </p>\n </div>\n {/if}\n {#if userData?.email || userData?.pending?.email}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">Email address:</p>\n <p class=\"crtw-text-sm\">\n {#if userData?.email}\n {userData.email}\n {:else if userData?.pending?.email}\n {userData.pending?.email} (Unconfirmed)\n {/if}\n </p>\n </div>\n {/if}\n\n {#if userData?.phone || userData?.pending?.phone}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">Phone number:</p>\n <p class=\"crtw-text-sm\">\n {#if userData?.phone}\n {userData.phone}\n {:else if userData?.pending?.phone}\n {userData.pending?.phone} (Unconfirmed)\n {/if}\n </p>\n </div>\n {/if}\n\n {#await userAddress then address}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">Logged in address:</p>\n <p class=\"crtw-text-sm\">\n {address}\n </p>\n </div>\n {/await}\n \n\n {#if balance}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">{storedValueAlias} available:</p>\n <p class=\"crtw-text-sm\">{balance}</p>\n </div>\n {/if}\n</div>\n"],"names":["options","$.prop","$$props","storedValueAlias","userAddress","balance","userData","div","root","node","$.child","div_1","root_1","p","$$render","consequent","div_2","root_2","p_1","$.untrack","$.get","div_3","root_5","p_2","$.await","node_5","address","p_3","$.reset","$.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AA;kBAGKC,sBAAAA,GAAG,EAAA;MAAHA,CAAG,wBACCD,CAAO,CAAA,CAAA;;;;;;;;;;;;;;;;AAzChBE,SAAAA,EAAArB,CAAA,GAAAsB,EAAAC,GAAAvB,CAAA;AAFQ;"}
1
+ {"version":3,"file":"UserInfo-Du0CRAQv.js","sources":["../../ui/main/shared/UserInfo.svelte"],"sourcesContent":["<script lang=\"ts\">\n import { TUser } from \"../../../utils/types\";\n\n export let options: {\n storedValueAlias: string;\n balance?: string | null;\n userData: TUser | null;\n userAddress: Promise<string>;\n };\n\n let { storedValueAlias, userAddress } = options;\n $: balance = options.balance\n $: userData = options.userData\n</script>\n\n<div\n class=\"crtw-flex crtw-justify-center crtw-flex-col crtw-items-start crtw-gap-[22px] crtw-w-full crtw-px-2.5 crtw-py-0\"\n>\n {#if userData?.name}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">User name:</p>\n <p class=\"crtw-text-sm\">\n {userData.name}\n </p>\n </div>\n {/if}\n {#if userData?.email || userData?.pending?.email}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">Email address:</p>\n <p class=\"crtw-text-sm\">\n {#if userData?.email}\n {userData.email}\n {:else if userData?.pending?.email}\n {userData.pending?.email} (Unconfirmed)\n {/if}\n </p>\n </div>\n {/if}\n\n {#if userData?.phone || userData?.pending?.phone}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">Phone number:</p>\n <p class=\"crtw-text-sm\">\n {#if userData?.phone}\n {userData.phone}\n {:else if userData?.pending?.phone}\n {userData.pending?.phone} (Unconfirmed)\n {/if}\n </p>\n </div>\n {/if}\n\n {#await userAddress then address}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">Logged in address:</p>\n <p class=\"crtw-text-sm\">\n {address}\n </p>\n </div>\n {/await}\n \n\n {#if balance}\n <div class=\"crtw-w-full crtw-break-all\">\n <p class=\"crtw-font-medium\">{storedValueAlias} available:</p>\n <p class=\"crtw-text-sm\">{balance}</p>\n </div>\n {/if}\n</div>\n"],"names":["options","$.prop","$$props","storedValueAlias","userAddress","balance","userData","div","root","node","$.child","div_1","root_1","p","$$render","consequent","div_2","root_2","p_1","$.untrack","$.get","div_3","root_5","p_2","$.await","node_5","address","p_3","$.reset","$.append","$$anchor"],"mappings":";;;;kBAAA;;;;MAWeA,IAKbC,EAAAC,GAAA,WAAA,EAAA,KAEK,kBAAAC,GAAc,aAAAC,EAAA,IAAAJ,EAAA;;MAChBK,GAAUL,EAAO,EAAC,OAAK;AAAA;MAC5BM,GAAgBN,EAAK,EAAA,QAAW;AAAA;;;;;;;;;;;;AAGhC,MAAAO,IAAAC,GAAA,GAAAC,IAAAC,EAAAH,CAAA;;;UAIKI,IAAGC,EAAA,GAEDC,QAFFF,CAAG,GAAA,CAAA,SAEDE,GAAC,EAAA;QAADA,CAAC,KAFHF,CAAG,mBAPRL,cAUSA,CAAI,EAAA,IAAS,EAAA,CAAA,QAHjBK,CAAG;AAAA;;QAPRL,cAMOA,CAAQ,GAAE,IAAA,KAAAQ,EAAAC,CAAA;AAAA;;;;;UASjBC,IAAQC,EAAA,GAEFC,QAFNF,CAAQ,GAAA,CAAA,SAEFE,CAAA;;;;0BAjBNZ,cAmBOA,CAAU,EAAA,KAAQ,EAAA,CAAA;;;4BAnBzBA,iBAqBoB,SAAM,KAAQ;;;YArBlCA,qCAAAA,cAoBgBA,IAAY,SAAK,KAAS;;;QAHpCY,CAAA,KAFNF,CAAQ,QAARA,CAAQ;AAAA;;QAfRV,IAcAa,EAAA,MAAAC,EAAAd,CAAY,GAAA,SAAAc,EAAAd,CAAA,GAAA,SAAA,KAAA;;;;;;UAcZe,IAAQC,EAAA,GAEFC,QAFNF,CAAQ,GAAA,CAAA,SAEFE,CAAA;;;;0BA9BNjB,sBAgCsB,EAAA,CAAA;;;4BAhCtBA,cAkCSA,CAAO,EAAI,cAAc;;;YAlClCA,qCAAAA,cAiCgBA,IAAY,SAAK,KAAS;;;QAHpCiB,CAAA,KAFNF,CAAQ,QAARA,CAAQ;AAAA;;QA5BRf,IA2BAa,EAAA,MAAAC,EAAAd,CAAY,GAAA,SAAAc,EAAAd,CAAA,GAAA,SAAA,KAAA;;;;AAaZkB,EAAAA,EAAAC,GAAA,MAAArB,aAAAsB,MAAA;kBAGKC,sBAAAA,GAAG,EAAA;MAAHA,CAAG,wBACCD,CAAO,CAAA,CAAA;;;;;;;;;;;;;;;;AAzChBE,SAAAA,EAAArB,CAAA,GAAAsB,EAAAC,GAAAvB,CAAA;AAFQ;"}
@@ -1,10 +1,10 @@
1
- import { c as E, p as k, h as N, f as D, i as q, b as V, d as z, u as W, v as X, e as A, k as Z, r as F } from "./legacy-DewULh04.js";
2
- import { a as $ } from "./index-client-UO2Oq7AI.js";
3
- import { t as K, m as I, w as P, z as b, x as S, E as a, r as U, l as B, p as ee, y as G, C as te, D as y, n as re, v as ae, o as ne, F as j, I as O, K as se, bv as oe, W as le, N as H, O as L, L as ue, bw as ce } from "./index-BbBSOc9W.js";
4
- import { C as ie } from "./ContentHeader-P6Nd1MuL.js";
5
- import { B as Y } from "./Button-Vr0EBbKT.js";
6
- import { e as de, i as ve } from "./each-DmbHM3bR.js";
7
- import { b as fe } from "./input-d3TpzNag.js";
1
+ import { c as E, p as k, h as N, f as D, i as q, b as V, d as z, u as W, v as X, e as A, k as Z, r as F } from "./legacy-D8zPmpUN.js";
2
+ import { a as $ } from "./index-client-DGe2j9ec.js";
3
+ import { t as K, m as I, w as P, z as b, x as S, E as a, r as U, l as B, p as ee, y as G, C as te, D as y, n as re, v as ae, o as ne, F as j, I as O, K as se, bv as oe, W as le, N as H, O as L, L as ue, bw as ce } from "./index-CwDtq0zH.js";
4
+ import { C as ie } from "./ContentHeader-CQIVUr1t.js";
5
+ import { B as Y } from "./Button-CspE17sk.js";
6
+ import { e as de, i as ve } from "./each-dQyu3w4k.js";
7
+ import { b as fe } from "./input-BRTxrZmg.js";
8
8
  var me = D("<button> </button>"), ge = D('<div class="crtw-text-xs crtw-text-gray-400 crtw-mt-1"> </div>'), pe = D('<input class="crtw-appearance-none focus:crtw-outline-0 crtw-w-full crtw-h-9 crtw-mt-4 crtw-px-5 crtw-text-base crtw-border crtw-border-gray-300 crtw-rounded focus:crtw-border-blue-800 hover:crtw-bg-gray-100" type="number" min="1" max="100"/> <!>', 1), we = D('<div><div class="crtw-flex crtw-flex-col">Select amount <div class="crtw-inline-flex crtw-w-full" role="group"></div> <!></div></div>');
9
9
  function J(g, n) {
10
10
  if (new.target) return E({ component: J, ...g });
@@ -255,4 +255,4 @@ function _e(g, n) {
255
255
  export {
256
256
  _e as default
257
257
  };
258
- //# sourceMappingURL=Wallet-DGUV1WGq.js.map
258
+ //# sourceMappingURL=Wallet-hwp7zHvS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Wallet-DGUV1WGq.js","sources":["../../ui/main/wallet/ButtonGroup.svelte","../../ui/main/wallet/Wallet.svelte","../src/app/pages/wallet/Wallet.svelte"],"sourcesContent":["<script lang=\"ts\">\n export let selected: string | undefined = undefined\n export let minStoredValueToPurchase: number = 0\n export let maxStoredValueToPurchase: number = 100\n\n let isInputShown = false\n let active = selected\n\n const selectItems = [\n { value: '10', name: '10' },\n { value: '25', name: '25' },\n { value: '50', name: '50' },\n { value: 'CUSTOM', name: 'Custom' },\n ]\n const handleChangeButton = (value: string) => {\n active = value\n if (value === 'CUSTOM') {\n isInputShown = true\n selected = ''\n return\n }\n isInputShown = false\n selected = value\n }\n const handleChangeInput = (e: Event) => {\n const target = e.target as HTMLSelectElement | HTMLInputElement\n target.value = target.value.replace(/[,.-]/g, '')\n if (+target.value > maxStoredValueToPurchase) {\n selected = maxStoredValueToPurchase.toString()\n return\n }\n selected = target.value\n }\n</script>\n\n<div>\n <div class=\"crtw-flex crtw-flex-col\">\n Select amount\n <div class=\"crtw-inline-flex crtw-w-full\" role=\"group\">\n {#each selectItems as item}\n <button\n on:click={() => handleChangeButton(item.value)}\n class=\"crtw-w-full crtw-h-[30px] crtw-text-sm crtw-border hover:crtw-bg-gray-100 hover:crtw-text-blue-800 first:crtw-rounded-l last:crtw-rounded-r\"\n class:crtw-border-blue-800={item.value === active}\n class:crtw-z-10={item.value === active}\n >\n {item.name}\n </button>\n {/each}\n </div>\n {#if isInputShown}\n <input\n class=\"crtw-appearance-none focus:crtw-outline-0 crtw-w-full crtw-h-9 crtw-mt-4 crtw-px-5 crtw-text-base crtw-border crtw-border-gray-300 crtw-rounded focus:crtw-border-blue-800 hover:crtw-bg-gray-100\"\n type=\"number\"\n min=\"1\"\n max=\"100\"\n bind:value={selected}\n on:input={handleChangeInput}\n />\n {#if minStoredValueToPurchase}\n <div class=\"crtw-text-xs crtw-text-gray-400 crtw-mt-1\">\n Minimum purchase amount is {minStoredValueToPurchase}\n </div>\n {/if}\n {/if}\n </div>\n</div>\n","<script lang=\"ts\">\n import ContentHeader from \"../shared/ContentHeader.svelte\";\n import Button from \"../shared/inputs/button/Button.svelte\";\n import ButtonGroup from \"./ButtonGroup.svelte\";\n\n export let selected: string;\n export let options: {\n title: string;\n description: string;\n onSendClick: () => void;\n sendValueButtonText: string;\n isSendValueDisabled: boolean;\n onPaymentClick: () => void;\n minStoredValueToPurchase?: number;\n maxStoredValueToPurchase?: number;\n };\n\n let { title, description, onSendClick, sendValueButtonText, onPaymentClick, minStoredValueToPurchase = 0, maxStoredValueToPurchase = 100 } =\n options;\n\n $: isSendValueDisabled = options.isSendValueDisabled;\n</script>\n\n<div class=\"crtw-w-full crtw-px-2.5\">\n <ContentHeader text={title} {description} />\n <ButtonGroup bind:selected {minStoredValueToPurchase} {maxStoredValueToPurchase}/>\n <div class=\"crtw-h-4\" />\n <Button\n text=\"Confirm purchase\"\n disabled={!selected || (!!minStoredValueToPurchase && +selected < minStoredValueToPurchase)}\n onClick={onPaymentClick}\n />\n <div class=\"crtw-m-3.5\" />\n <Button\n onClick={onSendClick}\n text={sendValueButtonText}\n disabled={isSendValueDisabled}\n />\n</div>\n","<script lang=\"ts\">\n import { pageStore, pageOptsStore, fn, suiPackageStore } from '@packages/stores'\n import { Pages } from '@packages/utils/enums'\n import { Wallet } from '@packages/ui'\n import { onMount } from 'svelte'\n import { get } from 'svelte/store'\n import { getClientConfigByClientId } from '@lib/clients'\n import { configStore } from '@src/stores/config'\n\n const { getBalance } = get(fn)\n\n const { maxStoredValueToPurchase, minStoredValueToPurchase } = getClientConfigByClientId(get(configStore).clientId)\n\n let balance: string = ''\n\n onMount(async () => {\n balance = await getBalance()\n })\n\n let selected: string = '10'\n\n const goToPayment = () => {\n pageOptsStore.set({\n subtitle: `Purchase stored value`,\n payments: {\n credenzaStoredValue: {\n disabled: true,\n },\n },\n assets: [\n {\n packageId: get(suiPackageStore),\n type: 'cred',\n amount: +selected,\n },\n ],\n })\n pageStore.set(Pages.PAYMENT)\n }\n</script>\n\n<Wallet\n bind:selected\n options={{\n title: `buy stored value`,\n description: `Buy/Send stored value for purchases throughout this website.`,\n onSendClick: () => pageStore.set(Pages.SEND_TOKENS),\n sendValueButtonText: `Send stored value`,\n isSendValueDisabled: !balance,\n onPaymentClick: goToPayment,\n maxStoredValueToPurchase,\n minStoredValueToPurchase,\n }}\n/>\n"],"names":["selected","minStoredValueToPurchase","maxStoredValueToPurchase","isInputShown","active","handleChangeButton","value","$.set","handleChangeInput","target","div","root","div_1","div_2","selectItems","$.index","$$anchor","item","button","root_1","text","$.child","$.reset","classes","$.set_class","$.get","$.untrack","$.event","$.append","input","$.first_child","fragment","$.remove_input_defaults","node_1","$.sibling","div_3","root_3","$$render","consequent","$.bind_value","consequent_1","$.prop","$$props","options","title","description","onSendClick","sendValueButtonText","onPaymentClick","isSendValueDisabled","ContentHeader","node","__awaiter","thisArg","_arguments","P","generator","getBalance","get","fn","getClientConfigByClientId","configStore","balance","onMount","goToPayment","pageOptsStore","suiPackageStore","pageStore","Pages","Wallet"],"mappings":";;;;;;;;iBAAA;;;AAEa,MAAAA,yBAAoC,MAAA,GACpCC,yCAAsC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,EAAAuD,SAAoBL,GAAU;AAAA,EAE9B,CAAA,CAAA;AAIA,MAAAzD,MAAmB,IAAA;AAEjB,QAAAgE,IAAA,MAAA;AAEE,IAAAC,GAAmB,IAAI;AAAA,MAErB,UAAA;AAAA,MACJ,UAAA,EACE,qBAAU,EACV,UAAU,GAAA,EAAA;AAAA,MAGP,QAAA;AAAA;UAEH,WAAQP,EAAAQ,EAAA;AAAA,UACN,MAAA;AAAA,UACE,WAAAlE,CAAW;AAAA;;QAIdmE,EAAA,IAAAC,EAAA,OAAA;AAAA;;;;;;;;aAOA;AAAA,MACL,aAAS;AAAA,MACP,mBAAmBD,EAAM,IAAAC,EAAA,WAAA;AAAA,MACzB,qBAAkB;AAAA,MAClB,wBAAmBN,CAAU;AAAA,MAC7B,gBAAAE;AAAA,MACA,0BAAA9D;AAAA,MACA,0BAAAD;AAAA;AAVH,IAAAoE,EAAArD,GAAA;AAAA;;;;;;;;;;;;;AAFG;"}
1
+ {"version":3,"file":"Wallet-hwp7zHvS.js","sources":["../../ui/main/wallet/ButtonGroup.svelte","../../ui/main/wallet/Wallet.svelte","../src/app/pages/wallet/Wallet.svelte"],"sourcesContent":["<script lang=\"ts\">\n export let selected: string | undefined = undefined\n export let minStoredValueToPurchase: number = 0\n export let maxStoredValueToPurchase: number = 100\n\n let isInputShown = false\n let active = selected\n\n const selectItems = [\n { value: '10', name: '10' },\n { value: '25', name: '25' },\n { value: '50', name: '50' },\n { value: 'CUSTOM', name: 'Custom' },\n ]\n const handleChangeButton = (value: string) => {\n active = value\n if (value === 'CUSTOM') {\n isInputShown = true\n selected = ''\n return\n }\n isInputShown = false\n selected = value\n }\n const handleChangeInput = (e: Event) => {\n const target = e.target as HTMLSelectElement | HTMLInputElement\n target.value = target.value.replace(/[,.-]/g, '')\n if (+target.value > maxStoredValueToPurchase) {\n selected = maxStoredValueToPurchase.toString()\n return\n }\n selected = target.value\n }\n</script>\n\n<div>\n <div class=\"crtw-flex crtw-flex-col\">\n Select amount\n <div class=\"crtw-inline-flex crtw-w-full\" role=\"group\">\n {#each selectItems as item}\n <button\n on:click={() => handleChangeButton(item.value)}\n class=\"crtw-w-full crtw-h-[30px] crtw-text-sm crtw-border hover:crtw-bg-gray-100 hover:crtw-text-blue-800 first:crtw-rounded-l last:crtw-rounded-r\"\n class:crtw-border-blue-800={item.value === active}\n class:crtw-z-10={item.value === active}\n >\n {item.name}\n </button>\n {/each}\n </div>\n {#if isInputShown}\n <input\n class=\"crtw-appearance-none focus:crtw-outline-0 crtw-w-full crtw-h-9 crtw-mt-4 crtw-px-5 crtw-text-base crtw-border crtw-border-gray-300 crtw-rounded focus:crtw-border-blue-800 hover:crtw-bg-gray-100\"\n type=\"number\"\n min=\"1\"\n max=\"100\"\n bind:value={selected}\n on:input={handleChangeInput}\n />\n {#if minStoredValueToPurchase}\n <div class=\"crtw-text-xs crtw-text-gray-400 crtw-mt-1\">\n Minimum purchase amount is {minStoredValueToPurchase}\n </div>\n {/if}\n {/if}\n </div>\n</div>\n","<script lang=\"ts\">\n import ContentHeader from \"../shared/ContentHeader.svelte\";\n import Button from \"../shared/inputs/button/Button.svelte\";\n import ButtonGroup from \"./ButtonGroup.svelte\";\n\n export let selected: string;\n export let options: {\n title: string;\n description: string;\n onSendClick: () => void;\n sendValueButtonText: string;\n isSendValueDisabled: boolean;\n onPaymentClick: () => void;\n minStoredValueToPurchase?: number;\n maxStoredValueToPurchase?: number;\n };\n\n let { title, description, onSendClick, sendValueButtonText, onPaymentClick, minStoredValueToPurchase = 0, maxStoredValueToPurchase = 100 } =\n options;\n\n $: isSendValueDisabled = options.isSendValueDisabled;\n</script>\n\n<div class=\"crtw-w-full crtw-px-2.5\">\n <ContentHeader text={title} {description} />\n <ButtonGroup bind:selected {minStoredValueToPurchase} {maxStoredValueToPurchase}/>\n <div class=\"crtw-h-4\" />\n <Button\n text=\"Confirm purchase\"\n disabled={!selected || (!!minStoredValueToPurchase && +selected < minStoredValueToPurchase)}\n onClick={onPaymentClick}\n />\n <div class=\"crtw-m-3.5\" />\n <Button\n onClick={onSendClick}\n text={sendValueButtonText}\n disabled={isSendValueDisabled}\n />\n</div>\n","<script lang=\"ts\">\n import { pageStore, pageOptsStore, fn, suiPackageStore } from '@packages/stores'\n import { Pages } from '@packages/utils/enums'\n import { Wallet } from '@packages/ui'\n import { onMount } from 'svelte'\n import { get } from 'svelte/store'\n import { getClientConfigByClientId } from '@lib/clients'\n import { configStore } from '@src/stores/config'\n\n const { getBalance } = get(fn)\n\n const { maxStoredValueToPurchase, minStoredValueToPurchase } = getClientConfigByClientId(get(configStore).clientId)\n\n let balance: string = ''\n\n onMount(async () => {\n balance = await getBalance()\n })\n\n let selected: string = '10'\n\n const goToPayment = () => {\n pageOptsStore.set({\n subtitle: `Purchase stored value`,\n payments: {\n credenzaStoredValue: {\n disabled: true,\n },\n },\n assets: [\n {\n packageId: get(suiPackageStore),\n type: 'cred',\n amount: +selected,\n },\n ],\n })\n pageStore.set(Pages.PAYMENT)\n }\n</script>\n\n<Wallet\n bind:selected\n options={{\n title: `buy stored value`,\n description: `Buy/Send stored value for purchases throughout this website.`,\n onSendClick: () => pageStore.set(Pages.SEND_TOKENS),\n sendValueButtonText: `Send stored value`,\n isSendValueDisabled: !balance,\n onPaymentClick: goToPayment,\n maxStoredValueToPurchase,\n minStoredValueToPurchase,\n }}\n/>\n"],"names":["selected","minStoredValueToPurchase","maxStoredValueToPurchase","isInputShown","active","handleChangeButton","value","$.set","handleChangeInput","target","div","root","div_1","div_2","selectItems","$.index","$$anchor","item","button","root_1","text","$.child","$.reset","classes","$.set_class","$.get","$.untrack","$.event","$.append","input","$.first_child","fragment","$.remove_input_defaults","node_1","$.sibling","div_3","root_3","$$render","consequent","$.bind_value","consequent_1","$.prop","$$props","options","title","description","onSendClick","sendValueButtonText","onPaymentClick","isSendValueDisabled","ContentHeader","node","__awaiter","thisArg","_arguments","P","generator","getBalance","get","fn","getClientConfigByClientId","configStore","balance","onMount","goToPayment","pageOptsStore","suiPackageStore","p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AoB,EAAA;AAEpB,EAAAC,EAAS,MAAWX,EAAA,QAAA,QAAA,QAAA,aAAA;AAEpB7C,IAAAA,EAAAuD,SAAoBL,GAAU;AAAA,EAE9B,CAAA,CAAA;AAIA,MAAAzD,MAAmB,IAAA;AAEjB,QAAAgE,IAAA,MAAA;AAEE,IAAAC,GAAmB,IAAI;AAAA,MAErB,UAAA;AAAA,MACJ,UAAA,EACE,qBAAU,EACV,UAAU,GAAA,EAAA;AAAA,MAGP,QAAA;AAAA;UAEH,WAAQP,EAAAQ,EAAA;AAAA,UACN,MAAA;AAAA,UACE,WAAAlE,CAAW;AAAA;;QAIdmE,EAAA,IAAAC,EAAA,OAAA;AAAA;;;;;;;;aAOA;AAAA,MACL,aAAS;AAAA,MACP,mBAAmBD,EAAM,IAAAC,EAAA,WAAA;AAAA,MACzB,qBAAkB;AAAA,MAClB,wBAAmBN,CAAU;AAAA,MAC7B,gBAAAE;AAAA,MACA,0BAAA9D;AAAA,MACA,0BAAAD;AAAA;AAVH,IAAAoE,EAAArD,GAAA;AAAA;;;;;;;;;;;;;AAFG;"}
@@ -0,0 +1,10 @@
1
+ const c = {
2
+ src: "https://customer-bmztknkgqgwr6a86.cloudflarestream.com/b6057185863fe1c1ca2875dbf11ea447/watch",
3
+ embedded: !0
4
+ }, s = "We are processing your order..", r = (e) => `The scanned code ${e ? `"${e}"` : ""} can't be processed`;
5
+ export {
6
+ s as D,
7
+ r as N,
8
+ c as a
9
+ };
10
+ //# sourceMappingURL=constants-ByF0HyKB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-ByF0HyKB.js","sources":["../../utils/constants.ts"],"sourcesContent":["export const DEFAULT_TOKEN_ID = \"0\";\n\nexport const TRUSTED_FORWARDER =\n \"0xAebF6188EA36F166A15D9003a7F761122b695a70\".toLowerCase();\n\nexport const DEFAULT_PROGRESS_VIDEO = {\n src: \"https://customer-bmztknkgqgwr6a86.cloudflarestream.com/b6057185863fe1c1ca2875dbf11ea447/watch\",\n embedded: true,\n};\n\nexport const DEFAULT_LOADER_TITLE = \"We are processing your order..\";\nexport const NOT_VALID_PASSPORT_QR_CODE_MESSAGE = (value?: string) =>\n `The scanned code ${value ? `\"${value}\"` : \"\"} can't be processed`;"],"names":["DEFAULT_PROGRESS_VIDEO","DEFAULT_LOADER_TITLE","NOT_VALID_PASSPORT_QR_CODE_MESSAGE","value"],"mappings":"AAKO,MAAMA,IAAyB;AAAA,EACpC,KAAK;AAAA,EACL,UAAU;AACZ,GAEaC,IAAuB,kCACvBC,IAAqC,CAACC,MACjD,oBAAoBA,IAAQ,IAAIA,CAAK,MAAM,EAAE;"}
@@ -1,4 +1,4 @@
1
- import { s as O, h as H, ar as P, a4 as k, a as Q, b as y, E as Y, F as j, aL as ee, H as re, d as B, e as F, $ as M, a1 as ne, aG as ae, f as U, aI as fe, a2 as L, bU as ie, aK as le, bV as G, aE as V, aO as ue, g as X, m as se, bW as oe, bX as te, bY as ve, bZ as m, aJ as J, a3 as K, b_ as z, q as de, aA as ce, b$ as pe, c0 as _e, aD as he, ah as ge } from "./index-BbBSOc9W.js";
1
+ import { s as O, h as H, ar as P, a4 as k, a as Q, b as y, E as Y, F as j, aL as ee, H as re, d as B, e as F, $ as M, a1 as ne, aG as ae, f as U, aI as fe, a2 as L, bT as ie, aK as le, bU as G, aE as V, aO as ue, g as X, m as se, bV as oe, bW as te, bX as ve, bY as m, aJ as J, a3 as K, bZ as z, q as de, aA as ce, b_ as pe, b$ as _e, aD as he, ah as ge } from "./index-CwDtq0zH.js";
2
2
  function Ae(e, i) {
3
3
  return i;
4
4
  }
@@ -213,4 +213,4 @@ export {
213
213
  Ce as e,
214
214
  Ae as i
215
215
  };
216
- //# sourceMappingURL=each-DmbHM3bR.js.map
216
+ //# sourceMappingURL=each-dQyu3w4k.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"each-DmbHM3bR.js","sources":["../../../node_modules/.pnpm/svelte@5.50.2/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\n/** @import { Batch } from '../../reactivity/batch.js'; */\nimport {\n\tEACH_INDEX_REACTIVE,\n\tEACH_IS_ANIMATED,\n\tEACH_IS_CONTROLLED,\n\tEACH_ITEM_IMMUTABLE,\n\tEACH_ITEM_REACTIVE,\n\tHYDRATION_END,\n\tHYDRATION_START_ELSE\n} from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tshould_defer_append\n} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { source, mutable_source, internal_set } from '../../reactivity/sources.js';\nimport { array_from, is_array } from '../../../shared/utils.js';\nimport { BRANCH_EFFECT, COMMENT_NODE, EFFECT_OFFSCREEN, INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\nimport { current_batch } from '../../reactivity/batch.js';\nimport * as e from '../../errors.js';\n\n// When making substantive changes to this file, validate them with the each block stress test:\n// https://svelte.dev/playground/1972b2cf46564476ad8c8c6405b23b7b\n// This test also exists in this repo, as `packages/svelte/tests/manual/each-stress-test`\n\n/**\n * @param {any} _\n * @param {number} i\n */\nexport function index(_, i) {\n\treturn i;\n}\n\n/**\n * Pause multiple effects simultaneously, and coordinate their\n * subsequent destruction. Used in each blocks\n * @param {EachState} state\n * @param {Effect[]} to_destroy\n * @param {null | Node} controlled_anchor\n */\nfunction pause_effects(state, to_destroy, controlled_anchor) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = to_destroy.length;\n\n\t/** @type {EachOutroGroup} */\n\tvar group;\n\tvar remaining = to_destroy.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tlet effect = to_destroy[i];\n\n\t\tpause_effect(\n\t\t\teffect,\n\t\t\t() => {\n\t\t\t\tif (group) {\n\t\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\t\tgroup.done.add(effect);\n\n\t\t\t\t\tif (group.pending.size === 0) {\n\t\t\t\t\t\tvar groups = /** @type {Set<EachOutroGroup>} */ (state.outrogroups);\n\n\t\t\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\t\t\tgroups.delete(group);\n\n\t\t\t\t\t\tif (groups.size === 0) {\n\t\t\t\t\t\t\tstate.outrogroups = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tremaining -= 1;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}\n\n\tif (remaining === 0) {\n\t\t// If we're in a controlled each block (i.e. the block is the only child of an\n\t\t// element), and we are removing all items, _and_ there are no out transitions,\n\t\t// we can use the fast path — emptying the element and replacing the anchor\n\t\tvar fast_path = transitions.length === 0 && controlled_anchor !== null;\n\n\t\tif (fast_path) {\n\t\t\tvar anchor = /** @type {Element} */ (controlled_anchor);\n\t\t\tvar parent_node = /** @type {Element} */ (anchor.parentNode);\n\n\t\t\tclear_text_content(parent_node);\n\t\t\tparent_node.append(anchor);\n\n\t\t\tstate.items.clear();\n\t\t}\n\n\t\tdestroy_effects(to_destroy, !fast_path);\n\t} else {\n\t\tgroup = {\n\t\t\tpending: new Set(to_destroy),\n\t\t\tdone: new Set()\n\t\t};\n\n\t\t(state.outrogroups ??= new Set()).add(group);\n\t}\n}\n\n/**\n * @param {Effect[]} to_destroy\n * @param {boolean} remove_dom\n */\nfunction destroy_effects(to_destroy, remove_dom = true) {\n\t// TODO only destroy effects if no pending batch needs them. otherwise,\n\t// just re-add the `EFFECT_OFFSCREEN` flag\n\tfor (var i = 0; i < to_destroy.length; i++) {\n\t\tdestroy_effect(to_destroy[i], remove_dom);\n\t}\n}\n\n/** @type {TemplateNode} */\nvar offscreen_anchor;\n\n/**\n * @template V\n * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @param {(value: V, index: number) => any} get_key\n * @param {(anchor: Node, item: MaybeSource<V>, index: MaybeSource<number>) => void} render_fn\n * @param {null | ((anchor: Node) => void)} fallback_fn\n * @returns {void}\n */\nexport function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {\n\tvar anchor = node;\n\n\t/** @type {Map<any, EachItem>} */\n\tvar items = new Map();\n\n\tvar is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tanchor = hydrating\n\t\t\t? set_hydrate_node(get_first_child(parent_node))\n\t\t\t: parent_node.appendChild(create_text());\n\t}\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\t/** @type {Effect | null} */\n\tvar fallback = null;\n\n\t// TODO: ideally we could use derived for runes mode but because of the ability\n\t// to use a store which can be mutated, we can't do that here as mutating a store\n\t// will still result in the collection array being the same from the store\n\tvar each_array = derived_safe_equal(() => {\n\t\tvar collection = get_collection();\n\n\t\treturn is_array(collection) ? collection : collection == null ? [] : array_from(collection);\n\t});\n\n\t/** @type {V[]} */\n\tvar array;\n\n\tvar first_run = true;\n\n\tfunction commit() {\n\t\tstate.fallback = fallback;\n\t\treconcile(state, array, anchor, flags, get_key);\n\n\t\tif (fallback !== null) {\n\t\t\tif (array.length === 0) {\n\t\t\t\tif ((fallback.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback.f ^= EFFECT_OFFSCREEN;\n\t\t\t\t\tmove(fallback, null, anchor);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\t// TODO only null out if no pending batch needs it,\n\t\t\t\t\t// otherwise re-add `fallback.fragment` and move the\n\t\t\t\t\t// effect into it\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tvar effect = block(() => {\n\t\tarray = /** @type {V[]} */ (get(each_array));\n\t\tvar length = array.length;\n\n\t\t/** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tvar is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE;\n\n\t\t\tif (is_else !== (length === 0)) {\n\t\t\t\t// hydration mismatch — remove the server-rendered DOM and start over\n\t\t\t\tanchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\tvar keys = new Set();\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tfor (var index = 0; index < length; index += 1) {\n\t\t\tif (\n\t\t\t\thydrating &&\n\t\t\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t) {\n\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\tmismatch = true;\n\t\t\t\tset_hydrating(false);\n\t\t\t}\n\n\t\t\tvar value = array[index];\n\t\t\tvar key = get_key(value, index);\n\n\t\t\tvar item = first_run ? null : items.get(key);\n\n\t\t\tif (item) {\n\t\t\t\t// update before reconciliation, to trigger any async updates\n\t\t\t\tif (item.v) internal_set(item.v, value);\n\t\t\t\tif (item.i) internal_set(item.i, index);\n\n\t\t\t\tif (defer) {\n\t\t\t\t\tbatch.unskip_effect(item.e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem = create_item(\n\t\t\t\t\titems,\n\t\t\t\t\tfirst_run ? anchor : (offscreen_anchor ??= create_text()),\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t\trender_fn,\n\t\t\t\t\tflags,\n\t\t\t\t\tget_collection\n\t\t\t\t);\n\n\t\t\t\tif (!first_run) {\n\t\t\t\t\titem.e.f |= EFFECT_OFFSCREEN;\n\t\t\t\t}\n\n\t\t\t\titems.set(key, item);\n\t\t\t}\n\n\t\t\tkeys.add(key);\n\t\t}\n\n\t\tif (length === 0 && fallback_fn && !fallback) {\n\t\t\tif (first_run) {\n\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t} else {\n\t\t\t\tfallback = branch(() => fallback_fn((offscreen_anchor ??= create_text())));\n\t\t\t\tfallback.f |= EFFECT_OFFSCREEN;\n\t\t\t}\n\t\t}\n\n\t\tif (length > keys.size) {\n\t\t\tif (DEV) {\n\t\t\t\tvalidate_each_keys(array, get_key);\n\t\t\t} else {\n\t\t\t\t// in prod, the additional information isn't printed, so don't bother computing it\n\t\t\t\te.each_key_duplicate('', '', '');\n\t\t\t}\n\t\t}\n\n\t\t// remove excess nodes\n\t\tif (hydrating && length > 0) {\n\t\t\tset_hydrate_node(skip_nodes());\n\t\t}\n\n\t\tif (!first_run) {\n\t\t\tif (defer) {\n\t\t\t\tfor (const [key, item] of items) {\n\t\t\t\t\tif (!keys.has(key)) {\n\t\t\t\t\t\tbatch.skip_effect(item.e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbatch.oncommit(commit);\n\t\t\t\tbatch.ondiscard(() => {\n\t\t\t\t\t// TODO presumably we need to do something here?\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcommit();\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\t// When we mount the each block for the first time, the collection won't be\n\t\t// connected to this effect as the effect hasn't finished running yet and its deps\n\t\t// won't be assigned. However, it's possible that when reconciling the each block\n\t\t// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the\n\t\t// collection again can provide consistency to the reactive graph again as the deriveds\n\t\t// will now be `CLEAN`.\n\t\tget(each_array);\n\t});\n\n\t/** @type {EachState} */\n\tvar state = { effect, flags, items, outrogroups: null, fallback };\n\n\tfirst_run = false;\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Skip past any non-branch effects (which could be created with `createSubscriber`, for example) to find the next branch effect\n * @param {Effect | null} effect\n * @returns {Effect | null}\n */\nfunction skip_to_branch(effect) {\n\twhile (effect !== null && (effect.f & BRANCH_EFFECT) === 0) {\n\t\teffect = effect.next;\n\t}\n\treturn effect;\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {EachState} state\n * @param {Array<V>} array\n * @param {Element | Comment | Text} anchor\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @returns {void}\n */\nfunction reconcile(state, array, anchor, flags, get_key) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar current = skip_to_branch(state.effect.first);\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar seen;\n\n\t/** @type {Effect | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar to_animate;\n\n\t/** @type {Effect[]} */\n\tvar matched = [];\n\n\t/** @type {Effect[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {Effect | undefined} */\n\tvar effect;\n\n\t/** @type {number} */\n\tvar i;\n\n\tif (is_animated) {\n\t\tfor (i = 0; i < length; i += 1) {\n\t\t\tvalue = array[i];\n\t\t\tkey = get_key(value, i);\n\t\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\t\t// offscreen == coming in now, no animation in that case,\n\t\t\t// else this would happen https://github.com/sveltejs/svelte/issues/17181\n\t\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\teffect.nodes?.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(effect);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < length; i += 1) {\n\t\tvalue = array[i];\n\t\tkey = get_key(value, i);\n\n\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\tif (state.outrogroups !== null) {\n\t\t\tfor (const group of state.outrogroups) {\n\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\tgroup.done.delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) !== 0) {\n\t\t\teffect.f ^= EFFECT_OFFSCREEN;\n\n\t\t\tif (effect === current) {\n\t\t\t\tmove(effect, null, anchor);\n\t\t\t} else {\n\t\t\t\tvar next = prev ? prev.next : current;\n\n\t\t\t\tif (effect === state.effect.last) {\n\t\t\t\t\tstate.effect.last = effect.prev;\n\t\t\t\t}\n\n\t\t\t\tif (effect.prev) effect.prev.next = effect.next;\n\t\t\t\tif (effect.next) effect.next.prev = effect.prev;\n\t\t\t\tlink(state, prev, effect);\n\t\t\t\tlink(state, effect, next);\n\n\t\t\t\tmove(effect, next, anchor);\n\t\t\t\tprev = effect;\n\n\t\t\t\tmatched = [];\n\t\t\t\tstashed = [];\n\n\t\t\t\tcurrent = skip_to_branch(prev.next);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & INERT) !== 0) {\n\t\t\tresume_effect(effect);\n\t\t\tif (is_animated) {\n\t\t\t\teffect.nodes?.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif (effect !== current) {\n\t\t\tif (seen !== undefined && seen.has(effect)) {\n\t\t\t\tif (matched.length < stashed.length) {\n\t\t\t\t\t// more efficient to move later items to the front\n\t\t\t\t\tvar start = stashed[0];\n\t\t\t\t\tvar j;\n\n\t\t\t\t\tprev = start.prev;\n\n\t\t\t\t\tvar a = matched[0];\n\t\t\t\t\tvar b = matched[matched.length - 1];\n\n\t\t\t\t\tfor (j = 0; j < matched.length; j += 1) {\n\t\t\t\t\t\tmove(matched[j], start, anchor);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (j = 0; j < stashed.length; j += 1) {\n\t\t\t\t\t\tseen.delete(stashed[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlink(state, a.prev, b.next);\n\t\t\t\t\tlink(state, prev, a);\n\t\t\t\t\tlink(state, b, start);\n\n\t\t\t\t\tcurrent = start;\n\t\t\t\t\tprev = b;\n\t\t\t\t\ti -= 1;\n\n\t\t\t\t\tmatched = [];\n\t\t\t\t\tstashed = [];\n\t\t\t\t} else {\n\t\t\t\t\t// more efficient to move earlier items to the back\n\t\t\t\t\tseen.delete(effect);\n\t\t\t\t\tmove(effect, current, anchor);\n\n\t\t\t\t\tlink(state, effect.prev, effect.next);\n\t\t\t\t\tlink(state, effect, prev === null ? state.effect.first : prev.next);\n\t\t\t\t\tlink(state, prev, effect);\n\n\t\t\t\t\tprev = effect;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\twhile (current !== null && current !== effect) {\n\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = skip_to_branch(current.next);\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\tmatched.push(effect);\n\t\t}\n\n\t\tprev = effect;\n\t\tcurrent = skip_to_branch(effect.next);\n\t}\n\n\tif (state.outrogroups !== null) {\n\t\tfor (const group of state.outrogroups) {\n\t\t\tif (group.pending.size === 0) {\n\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\tstate.outrogroups?.delete(group);\n\t\t\t}\n\t\t}\n\n\t\tif (state.outrogroups.size === 0) {\n\t\t\tstate.outrogroups = null;\n\t\t}\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\t/** @type {Effect[]} */\n\t\tvar to_destroy = [];\n\n\t\tif (seen !== undefined) {\n\t\t\tfor (effect of seen) {\n\t\t\t\tif ((effect.f & INERT) === 0) {\n\t\t\t\t\tto_destroy.push(effect);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (current !== null) {\n\t\t\t// If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished\n\t\t\tif ((current.f & INERT) === 0 && current !== state.fallback) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\n\t\t\tcurrent = skip_to_branch(current.next);\n\t\t}\n\n\t\tvar destroy_length = to_destroy.length;\n\n\t\tif (destroy_length > 0) {\n\t\t\tvar controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;\n\n\t\t\tif (is_animated) {\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.measure();\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor);\n\t\t}\n\t}\n\n\tif (is_animated) {\n\t\tqueue_micro_task(() => {\n\t\t\tif (to_animate === undefined) return;\n\t\t\tfor (effect of to_animate) {\n\t\t\t\teffect.nodes?.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @template V\n * @param {Map<any, EachItem>} items\n * @param {Node} anchor\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source<V>, index: number | Value<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @returns {EachItem}\n */\nfunction create_item(items, anchor, value, key, index, render_fn, flags, get_collection) {\n\tvar v =\n\t\t(flags & EACH_ITEM_REACTIVE) !== 0\n\t\t\t? (flags & EACH_ITEM_IMMUTABLE) === 0\n\t\t\t\t? mutable_source(value, false, false)\n\t\t\t\t: source(value)\n\t\t\t: null;\n\n\tvar i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index) : null;\n\n\tif (DEV && v) {\n\t\t// For tracing purposes, we need to link the source signal we create with the\n\t\t// collection + index so that tracing works as intended\n\t\tv.trace = () => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[i?.v ?? index];\n\t\t};\n\t}\n\n\treturn {\n\t\tv,\n\t\ti,\n\t\te: branch(() => {\n\t\t\trender_fn(anchor, v ?? value, i ?? index, get_collection);\n\n\t\t\treturn () => {\n\t\t\t\titems.delete(key);\n\t\t\t};\n\t\t})\n\t};\n}\n\n/**\n * @param {Effect} effect\n * @param {Effect | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(effect, next, anchor) {\n\tif (!effect.nodes) return;\n\n\tvar node = effect.nodes.start;\n\tvar end = effect.nodes.end;\n\n\tvar dest =\n\t\tnext && (next.f & EFFECT_OFFSCREEN) === 0\n\t\t\t? /** @type {EffectNodes} */ (next.nodes).start\n\t\t\t: anchor;\n\n\twhile (node !== null) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\n\t\tif (node === end) {\n\t\t\treturn;\n\t\t}\n\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {Effect | null} prev\n * @param {Effect | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.effect.first = next;\n\t} else {\n\t\tprev.next = next;\n\t}\n\n\tif (next === null) {\n\t\tstate.effect.last = prev;\n\t} else {\n\t\tnext.prev = prev;\n\t}\n}\n\n/**\n * @param {Array<any>} array\n * @param {(item: any, index: number) => string} key_fn\n * @returns {void}\n */\nfunction validate_each_keys(array, key_fn) {\n\tconst keys = new Map();\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; i++) {\n\t\tconst key = key_fn(array[i], i);\n\n\t\tif (keys.has(key)) {\n\t\t\tconst a = String(keys.get(key));\n\t\t\tconst b = String(i);\n\n\t\t\t/** @type {string | null} */\n\t\t\tlet k = String(key);\n\t\t\tif (k.startsWith('[object ')) k = null;\n\n\t\t\te.each_key_duplicate(a, b, k);\n\t\t}\n\n\t\tkeys.set(key, i);\n\t}\n}\n"],"names":["index","_","pause_effects","state","to_destroy","controlled_anchor","transitions","length","group","remaining","i","effect","pause_effect","groups","destroy_effects","array_from","fast_path","anchor","parent_node","clear_text_content","remove_dom","destroy_effect","offscreen_anchor","each","node","flags","get_collection","get_key","render_fn","fallback_fn","items","is_controlled","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","each_array","derived_safe_equal","collection","is_array","array","first_run","commit","reconcile","EFFECT_OFFSCREEN","resume_effect","move","block","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","skip_nodes","set_hydrating","keys","batch","current_batch","defer","should_defer_append","hydrate_node","COMMENT_NODE","HYDRATION_END","value","key","item","internal_set","create_item","branch","e.each_key_duplicate","skip_to_branch","BRANCH_EFFECT","is_animated","EACH_IS_ANIMATED","current","seen","prev","to_animate","matched","stashed","next","link","INERT","start","j","a","b","destroy_length","queue_micro_task","v","EACH_ITEM_REACTIVE","EACH_ITEM_IMMUTABLE","mutable_source","source","EACH_INDEX_REACTIVE","end","dest","next_node","get_next_sibling"],"mappings":";AAoDO,SAASA,GAAMC,GAAG,GAAG;AAC3B,SAAO;AACR;AASA,SAASC,GAAcC,GAAOC,GAAYC,GAAmB;AAS5D,WAPIC,IAAc,CAAA,GACdC,IAASH,EAAW,QAGpBI,GACAC,IAAYL,EAAW,QAElBM,IAAI,GAAGA,IAAIH,GAAQG,KAAK;AAChC,QAAIC,IAASP,EAAWM,CAA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iB7E,CAAI;AAAA;AAGlE,UAFA2E,EAAK,OAAO3E,CAAI,GAEZA,MAAS0E;AACZ;AAGD,MAAA1E,IAAO4E;AAAA,IACR;AACD;AAOA,SAAShB,EAAKjF,GAAO4E,GAAMI,GAAM;AAChC,EAAIJ,MAAS,OACZ5E,EAAM,OAAO,QAAQgF,IAErBJ,EAAK,OAAOI,GAGTA,MAAS,OACZhF,EAAM,OAAO,OAAO4E,IAEpBI,EAAK,OAAOJ;AAEd;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"each-dQyu3w4k.js","sources":["../../../node_modules/.pnpm/svelte@5.50.2/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\n/** @import { Batch } from '../../reactivity/batch.js'; */\nimport {\n\tEACH_INDEX_REACTIVE,\n\tEACH_IS_ANIMATED,\n\tEACH_IS_CONTROLLED,\n\tEACH_ITEM_IMMUTABLE,\n\tEACH_ITEM_REACTIVE,\n\tHYDRATION_END,\n\tHYDRATION_START_ELSE\n} from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tshould_defer_append\n} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { source, mutable_source, internal_set } from '../../reactivity/sources.js';\nimport { array_from, is_array } from '../../../shared/utils.js';\nimport { BRANCH_EFFECT, COMMENT_NODE, EFFECT_OFFSCREEN, INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\nimport { current_batch } from '../../reactivity/batch.js';\nimport * as e from '../../errors.js';\n\n// When making substantive changes to this file, validate them with the each block stress test:\n// https://svelte.dev/playground/1972b2cf46564476ad8c8c6405b23b7b\n// This test also exists in this repo, as `packages/svelte/tests/manual/each-stress-test`\n\n/**\n * @param {any} _\n * @param {number} i\n */\nexport function index(_, i) {\n\treturn i;\n}\n\n/**\n * Pause multiple effects simultaneously, and coordinate their\n * subsequent destruction. Used in each blocks\n * @param {EachState} state\n * @param {Effect[]} to_destroy\n * @param {null | Node} controlled_anchor\n */\nfunction pause_effects(state, to_destroy, controlled_anchor) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = to_destroy.length;\n\n\t/** @type {EachOutroGroup} */\n\tvar group;\n\tvar remaining = to_destroy.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tlet effect = to_destroy[i];\n\n\t\tpause_effect(\n\t\t\teffect,\n\t\t\t() => {\n\t\t\t\tif (group) {\n\t\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\t\tgroup.done.add(effect);\n\n\t\t\t\t\tif (group.pending.size === 0) {\n\t\t\t\t\t\tvar groups = /** @type {Set<EachOutroGroup>} */ (state.outrogroups);\n\n\t\t\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\t\t\tgroups.delete(group);\n\n\t\t\t\t\t\tif (groups.size === 0) {\n\t\t\t\t\t\t\tstate.outrogroups = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tremaining -= 1;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}\n\n\tif (remaining === 0) {\n\t\t// If we're in a controlled each block (i.e. the block is the only child of an\n\t\t// element), and we are removing all items, _and_ there are no out transitions,\n\t\t// we can use the fast path — emptying the element and replacing the anchor\n\t\tvar fast_path = transitions.length === 0 && controlled_anchor !== null;\n\n\t\tif (fast_path) {\n\t\t\tvar anchor = /** @type {Element} */ (controlled_anchor);\n\t\t\tvar parent_node = /** @type {Element} */ (anchor.parentNode);\n\n\t\t\tclear_text_content(parent_node);\n\t\t\tparent_node.append(anchor);\n\n\t\t\tstate.items.clear();\n\t\t}\n\n\t\tdestroy_effects(to_destroy, !fast_path);\n\t} else {\n\t\tgroup = {\n\t\t\tpending: new Set(to_destroy),\n\t\t\tdone: new Set()\n\t\t};\n\n\t\t(state.outrogroups ??= new Set()).add(group);\n\t}\n}\n\n/**\n * @param {Effect[]} to_destroy\n * @param {boolean} remove_dom\n */\nfunction destroy_effects(to_destroy, remove_dom = true) {\n\t// TODO only destroy effects if no pending batch needs them. otherwise,\n\t// just re-add the `EFFECT_OFFSCREEN` flag\n\tfor (var i = 0; i < to_destroy.length; i++) {\n\t\tdestroy_effect(to_destroy[i], remove_dom);\n\t}\n}\n\n/** @type {TemplateNode} */\nvar offscreen_anchor;\n\n/**\n * @template V\n * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @param {(value: V, index: number) => any} get_key\n * @param {(anchor: Node, item: MaybeSource<V>, index: MaybeSource<number>) => void} render_fn\n * @param {null | ((anchor: Node) => void)} fallback_fn\n * @returns {void}\n */\nexport function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {\n\tvar anchor = node;\n\n\t/** @type {Map<any, EachItem>} */\n\tvar items = new Map();\n\n\tvar is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tanchor = hydrating\n\t\t\t? set_hydrate_node(get_first_child(parent_node))\n\t\t\t: parent_node.appendChild(create_text());\n\t}\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\t/** @type {Effect | null} */\n\tvar fallback = null;\n\n\t// TODO: ideally we could use derived for runes mode but because of the ability\n\t// to use a store which can be mutated, we can't do that here as mutating a store\n\t// will still result in the collection array being the same from the store\n\tvar each_array = derived_safe_equal(() => {\n\t\tvar collection = get_collection();\n\n\t\treturn is_array(collection) ? collection : collection == null ? [] : array_from(collection);\n\t});\n\n\t/** @type {V[]} */\n\tvar array;\n\n\tvar first_run = true;\n\n\tfunction commit() {\n\t\tstate.fallback = fallback;\n\t\treconcile(state, array, anchor, flags, get_key);\n\n\t\tif (fallback !== null) {\n\t\t\tif (array.length === 0) {\n\t\t\t\tif ((fallback.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback.f ^= EFFECT_OFFSCREEN;\n\t\t\t\t\tmove(fallback, null, anchor);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\t// TODO only null out if no pending batch needs it,\n\t\t\t\t\t// otherwise re-add `fallback.fragment` and move the\n\t\t\t\t\t// effect into it\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tvar effect = block(() => {\n\t\tarray = /** @type {V[]} */ (get(each_array));\n\t\tvar length = array.length;\n\n\t\t/** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tvar is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE;\n\n\t\t\tif (is_else !== (length === 0)) {\n\t\t\t\t// hydration mismatch — remove the server-rendered DOM and start over\n\t\t\t\tanchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\tvar keys = new Set();\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tfor (var index = 0; index < length; index += 1) {\n\t\t\tif (\n\t\t\t\thydrating &&\n\t\t\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t) {\n\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\tmismatch = true;\n\t\t\t\tset_hydrating(false);\n\t\t\t}\n\n\t\t\tvar value = array[index];\n\t\t\tvar key = get_key(value, index);\n\n\t\t\tvar item = first_run ? null : items.get(key);\n\n\t\t\tif (item) {\n\t\t\t\t// update before reconciliation, to trigger any async updates\n\t\t\t\tif (item.v) internal_set(item.v, value);\n\t\t\t\tif (item.i) internal_set(item.i, index);\n\n\t\t\t\tif (defer) {\n\t\t\t\t\tbatch.unskip_effect(item.e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem = create_item(\n\t\t\t\t\titems,\n\t\t\t\t\tfirst_run ? anchor : (offscreen_anchor ??= create_text()),\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t\trender_fn,\n\t\t\t\t\tflags,\n\t\t\t\t\tget_collection\n\t\t\t\t);\n\n\t\t\t\tif (!first_run) {\n\t\t\t\t\titem.e.f |= EFFECT_OFFSCREEN;\n\t\t\t\t}\n\n\t\t\t\titems.set(key, item);\n\t\t\t}\n\n\t\t\tkeys.add(key);\n\t\t}\n\n\t\tif (length === 0 && fallback_fn && !fallback) {\n\t\t\tif (first_run) {\n\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t} else {\n\t\t\t\tfallback = branch(() => fallback_fn((offscreen_anchor ??= create_text())));\n\t\t\t\tfallback.f |= EFFECT_OFFSCREEN;\n\t\t\t}\n\t\t}\n\n\t\tif (length > keys.size) {\n\t\t\tif (DEV) {\n\t\t\t\tvalidate_each_keys(array, get_key);\n\t\t\t} else {\n\t\t\t\t// in prod, the additional information isn't printed, so don't bother computing it\n\t\t\t\te.each_key_duplicate('', '', '');\n\t\t\t}\n\t\t}\n\n\t\t// remove excess nodes\n\t\tif (hydrating && length > 0) {\n\t\t\tset_hydrate_node(skip_nodes());\n\t\t}\n\n\t\tif (!first_run) {\n\t\t\tif (defer) {\n\t\t\t\tfor (const [key, item] of items) {\n\t\t\t\t\tif (!keys.has(key)) {\n\t\t\t\t\t\tbatch.skip_effect(item.e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbatch.oncommit(commit);\n\t\t\t\tbatch.ondiscard(() => {\n\t\t\t\t\t// TODO presumably we need to do something here?\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcommit();\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\t// When we mount the each block for the first time, the collection won't be\n\t\t// connected to this effect as the effect hasn't finished running yet and its deps\n\t\t// won't be assigned. However, it's possible that when reconciling the each block\n\t\t// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the\n\t\t// collection again can provide consistency to the reactive graph again as the deriveds\n\t\t// will now be `CLEAN`.\n\t\tget(each_array);\n\t});\n\n\t/** @type {EachState} */\n\tvar state = { effect, flags, items, outrogroups: null, fallback };\n\n\tfirst_run = false;\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Skip past any non-branch effects (which could be created with `createSubscriber`, for example) to find the next branch effect\n * @param {Effect | null} effect\n * @returns {Effect | null}\n */\nfunction skip_to_branch(effect) {\n\twhile (effect !== null && (effect.f & BRANCH_EFFECT) === 0) {\n\t\teffect = effect.next;\n\t}\n\treturn effect;\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {EachState} state\n * @param {Array<V>} array\n * @param {Element | Comment | Text} anchor\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @returns {void}\n */\nfunction reconcile(state, array, anchor, flags, get_key) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar current = skip_to_branch(state.effect.first);\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar seen;\n\n\t/** @type {Effect | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar to_animate;\n\n\t/** @type {Effect[]} */\n\tvar matched = [];\n\n\t/** @type {Effect[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {Effect | undefined} */\n\tvar effect;\n\n\t/** @type {number} */\n\tvar i;\n\n\tif (is_animated) {\n\t\tfor (i = 0; i < length; i += 1) {\n\t\t\tvalue = array[i];\n\t\t\tkey = get_key(value, i);\n\t\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\t\t// offscreen == coming in now, no animation in that case,\n\t\t\t// else this would happen https://github.com/sveltejs/svelte/issues/17181\n\t\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\teffect.nodes?.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(effect);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < length; i += 1) {\n\t\tvalue = array[i];\n\t\tkey = get_key(value, i);\n\n\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\tif (state.outrogroups !== null) {\n\t\t\tfor (const group of state.outrogroups) {\n\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\tgroup.done.delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) !== 0) {\n\t\t\teffect.f ^= EFFECT_OFFSCREEN;\n\n\t\t\tif (effect === current) {\n\t\t\t\tmove(effect, null, anchor);\n\t\t\t} else {\n\t\t\t\tvar next = prev ? prev.next : current;\n\n\t\t\t\tif (effect === state.effect.last) {\n\t\t\t\t\tstate.effect.last = effect.prev;\n\t\t\t\t}\n\n\t\t\t\tif (effect.prev) effect.prev.next = effect.next;\n\t\t\t\tif (effect.next) effect.next.prev = effect.prev;\n\t\t\t\tlink(state, prev, effect);\n\t\t\t\tlink(state, effect, next);\n\n\t\t\t\tmove(effect, next, anchor);\n\t\t\t\tprev = effect;\n\n\t\t\t\tmatched = [];\n\t\t\t\tstashed = [];\n\n\t\t\t\tcurrent = skip_to_branch(prev.next);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & INERT) !== 0) {\n\t\t\tresume_effect(effect);\n\t\t\tif (is_animated) {\n\t\t\t\teffect.nodes?.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif (effect !== current) {\n\t\t\tif (seen !== undefined && seen.has(effect)) {\n\t\t\t\tif (matched.length < stashed.length) {\n\t\t\t\t\t// more efficient to move later items to the front\n\t\t\t\t\tvar start = stashed[0];\n\t\t\t\t\tvar j;\n\n\t\t\t\t\tprev = start.prev;\n\n\t\t\t\t\tvar a = matched[0];\n\t\t\t\t\tvar b = matched[matched.length - 1];\n\n\t\t\t\t\tfor (j = 0; j < matched.length; j += 1) {\n\t\t\t\t\t\tmove(matched[j], start, anchor);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (j = 0; j < stashed.length; j += 1) {\n\t\t\t\t\t\tseen.delete(stashed[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlink(state, a.prev, b.next);\n\t\t\t\t\tlink(state, prev, a);\n\t\t\t\t\tlink(state, b, start);\n\n\t\t\t\t\tcurrent = start;\n\t\t\t\t\tprev = b;\n\t\t\t\t\ti -= 1;\n\n\t\t\t\t\tmatched = [];\n\t\t\t\t\tstashed = [];\n\t\t\t\t} else {\n\t\t\t\t\t// more efficient to move earlier items to the back\n\t\t\t\t\tseen.delete(effect);\n\t\t\t\t\tmove(effect, current, anchor);\n\n\t\t\t\t\tlink(state, effect.prev, effect.next);\n\t\t\t\t\tlink(state, effect, prev === null ? state.effect.first : prev.next);\n\t\t\t\t\tlink(state, prev, effect);\n\n\t\t\t\t\tprev = effect;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\twhile (current !== null && current !== effect) {\n\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = skip_to_branch(current.next);\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\tmatched.push(effect);\n\t\t}\n\n\t\tprev = effect;\n\t\tcurrent = skip_to_branch(effect.next);\n\t}\n\n\tif (state.outrogroups !== null) {\n\t\tfor (const group of state.outrogroups) {\n\t\t\tif (group.pending.size === 0) {\n\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\tstate.outrogroups?.delete(group);\n\t\t\t}\n\t\t}\n\n\t\tif (state.outrogroups.size === 0) {\n\t\t\tstate.outrogroups = null;\n\t\t}\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\t/** @type {Effect[]} */\n\t\tvar to_destroy = [];\n\n\t\tif (seen !== undefined) {\n\t\t\tfor (effect of seen) {\n\t\t\t\tif ((effect.f & INERT) === 0) {\n\t\t\t\t\tto_destroy.push(effect);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (current !== null) {\n\t\t\t// If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished\n\t\t\tif ((current.f & INERT) === 0 && current !== state.fallback) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\n\t\t\tcurrent = skip_to_branch(current.next);\n\t\t}\n\n\t\tvar destroy_length = to_destroy.length;\n\n\t\tif (destroy_length > 0) {\n\t\t\tvar controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;\n\n\t\t\tif (is_animated) {\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.measure();\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor);\n\t\t}\n\t}\n\n\tif (is_animated) {\n\t\tqueue_micro_task(() => {\n\t\t\tif (to_animate === undefined) return;\n\t\t\tfor (effect of to_animate) {\n\t\t\t\teffect.nodes?.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @template V\n * @param {Map<any, EachItem>} items\n * @param {Node} anchor\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source<V>, index: number | Value<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @returns {EachItem}\n */\nfunction create_item(items, anchor, value, key, index, render_fn, flags, get_collection) {\n\tvar v =\n\t\t(flags & EACH_ITEM_REACTIVE) !== 0\n\t\t\t? (flags & EACH_ITEM_IMMUTABLE) === 0\n\t\t\t\t? mutable_source(value, false, false)\n\t\t\t\t: source(value)\n\t\t\t: null;\n\n\tvar i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index) : null;\n\n\tif (DEV && v) {\n\t\t// For tracing purposes, we need to link the source signal we create with the\n\t\t// collection + index so that tracing works as intended\n\t\tv.trace = () => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[i?.v ?? index];\n\t\t};\n\t}\n\n\treturn {\n\t\tv,\n\t\ti,\n\t\te: branch(() => {\n\t\t\trender_fn(anchor, v ?? value, i ?? index, get_collection);\n\n\t\t\treturn () => {\n\t\t\t\titems.delete(key);\n\t\t\t};\n\t\t})\n\t};\n}\n\n/**\n * @param {Effect} effect\n * @param {Effect | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(effect, next, anchor) {\n\tif (!effect.nodes) return;\n\n\tvar node = effect.nodes.start;\n\tvar end = effect.nodes.end;\n\n\tvar dest =\n\t\tnext && (next.f & EFFECT_OFFSCREEN) === 0\n\t\t\t? /** @type {EffectNodes} */ (next.nodes).start\n\t\t\t: anchor;\n\n\twhile (node !== null) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\n\t\tif (node === end) {\n\t\t\treturn;\n\t\t}\n\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {Effect | null} prev\n * @param {Effect | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.effect.first = next;\n\t} else {\n\t\tprev.next = next;\n\t}\n\n\tif (next === null) {\n\t\tstate.effect.last = prev;\n\t} else {\n\t\tnext.prev = prev;\n\t}\n}\n\n/**\n * @param {Array<any>} array\n * @param {(item: any, index: number) => string} key_fn\n * @returns {void}\n */\nfunction validate_each_keys(array, key_fn) {\n\tconst keys = new Map();\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; i++) {\n\t\tconst key = key_fn(array[i], i);\n\n\t\tif (keys.has(key)) {\n\t\t\tconst a = String(keys.get(key));\n\t\t\tconst b = String(i);\n\n\t\t\t/** @type {string | null} */\n\t\t\tlet k = String(key);\n\t\t\tif (k.startsWith('[object ')) k = null;\n\n\t\t\te.each_key_duplicate(a, b, k);\n\t\t}\n\n\t\tkeys.set(key, i);\n\t}\n}\n"],"names":["index","_","pause_effects","state","to_destroy","controlled_anchor","transitions","length","group","remaining","i","effect","pause_effect","groups","destroy_effects","array_from","fast_path","anchor","parent_node","clear_text_content","remove_dom","destroy_effect","offscreen_anchor","each","node","flags","get_collection","get_key","render_fn","fallback_fn","items","is_controlled","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","each_array","derived_safe_equal","collection","is_array","array","first_run","commit","reconcile","EFFECT_OFFSCREEN","resume_effect","move","block","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","skip_nodes","set_hydrating","keys","batch","current_batch","defer","should_defer_append","hydrate_node","COMMENT_NODE","HYDRATION_END","value","key","item","internal_set","create_item","branch","e.each_key_duplicate","skip_to_branch","BRANCH_EFFECT","is_animated","EACH_IS_ANIMATED","current","seen","prev","to_animate","matched","stashed","next","link","INERT","start","j","a","b","destroy_length","queue_micro_task","v","EACH_ITEM_REACTIVE","EACH_ITEM_IMMUTABLE","mutable_source","source","EACH_INDEX_REACTIVE","end","dest","next_node","get_next_sibling"],"mappings":";AAoDO,SAASA,GAAMC,GAAG,GAAG;AAC3B,SAAO;AACR;AASA,SAASC,GAAcC,GAAOC,GAAYC,GAAmB;AAS5D,WAPIC,IAAc,CAAA,GACdC,IAASH,EAAW,QAGpBI,GACAC,IAAYL,EAAW,QAElBM,IAAI,GAAGA,IAAIH,GAAQG,KAAK;AAChC,QAAIC,IAASP,EAAWM,CAAC;AAEzB,IAAAE;AAAA,MACCD;AAAA,MACA,MAAM;AACL,YAAIH;AAIH,cAHAA,EAAM,QAAQ,OAAOG,CAAM,GAC3BH,EAAM,KAAK,IAAIG,CAAM,GAEjBH,EAAM,QAAQ,SAAS,GAAG;AAC7B,gBAAIK;AAAA;AAAA,cAA6CV,EAAM;AAAA;AAEvD,YAAAW,EAAgBC,EAAWP,EAAM,IAAI,CAAC,GACtCK,EAAO,OAAOL,CAAK,GAEfK,EAAO,SAAS,MACnBV,EAAM,cAAc;AAAA,UAEtB;AAAA;AAEA,UAAAM,KAAa;AAAA,MAEf;AAAA,MACA;AAAA,IACH;AAAA,EACC;AAEA,MAAIA,MAAc,GAAG;AAIpB,QAAIO,IAAYV,EAAY,WAAW,KAAKD,MAAsB;AAElE,QAAIW,GAAW;AACd,UAAIC;AAAA;AAAA,QAAiCZ;AAAA,SACjCa;AAAA;AAAA,QAAsCD,EAAO;AAAA;AAEjD,MAAAE,GAAmBD,CAAW,GAC9BA,EAAY,OAAOD,CAAM,GAEzBd,EAAM,MAAM,MAAK;AAAA,IAClB;AAEA,IAAAW,EAAgBV,GAAY,CAACY,CAAS;AAAA,EACvC;AACC,IAAAR,IAAQ;AAAA,MACP,SAAS,IAAI,IAAIJ,CAAU;AAAA,MAC3B,MAAM,oBAAI,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,EAAO,OACT3C,EAAUX,GAAQ2E,KAAK1B,GAAOxD,KAAKV,GAAO0B,CAAc,GAEjD,MAAM;AACZ,MAAAI,EAAM,OAAOqC,CAAG;AAAA,IACjB,EACA;AAAA,EACH;AACA;AAOA,SAASlB,EAAKtC,GAAQwE,GAAMlE,GAAQ;AACnC,MAAKN,EAAO;AAUZ,aARIa,IAAOb,EAAO,MAAM,OACpBuF,IAAMvF,EAAO,MAAM,KAEnBwF,IACHhB,MAASA,EAAK,IAAIpC,OAAsB;AAAA;AAAA,MACToC,EAAK,MAAO;AAAA,QACxClE,GAEGO,MAAS,QAAM;AACrB,UAAI4E;AAAA;AAAA,QAAyCC,GAAiB7E,CAAI;AAAA;AAGlE,UAFA2E,EAAK,OAAO3E,CAAI,GAEZA,MAAS0E;AACZ;AAGD,MAAA1E,IAAO4E;AAAA,IACR;AACD;AAOA,SAAShB,EAAKjF,GAAO4E,GAAMI,GAAM;AAChC,EAAIJ,MAAS,OACZ5E,EAAM,OAAO,QAAQgF,IAErBJ,EAAK,OAAOI,GAGTA,MAAS,OACZhF,EAAM,OAAO,OAAO4E,IAEpBI,EAAK,OAAOJ;AAEd;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
- import { y as u, h as d, a as _, a0 as y, bs as g, $ as h, a1 as p, aA as b, aH as w, aB as O, s as R, ar as t } from "./index-BbBSOc9W.js";
2
- import { y as m, z as E } from "./legacy-DewULh04.js";
1
+ import { y as u, h as d, a as _, a0 as y, bs as g, $ as h, a1 as p, aA as b, aH as w, aB as O, s as R, ar as t } from "./index-CwDtq0zH.js";
2
+ import { y as m, z as E } from "./legacy-D8zPmpUN.js";
3
3
  function A(c, v, i = !1, o = !1, N = !1) {
4
4
  var l = c, s = "";
5
5
  u(() => {
@@ -49,4 +49,4 @@ function A(c, v, i = !1, o = !1, N = !1) {
49
49
  export {
50
50
  A as h
51
51
  };
52
- //# sourceMappingURL=html-B-crrhFB.js.map
52
+ //# sourceMappingURL=html-DVImOVHa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"html-B-crrhFB.js","sources":["../../../node_modules/.pnpm/svelte@5.50.2/node_modules/svelte/src/internal/client/dom/blocks/html.js"],"sourcesContent":["/** @import { Effect, TemplateNode } from '#client' */\nimport { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';\nimport { remove_effect_dom, template_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\nimport { create_fragment_from_html } from '../reconciler.js';\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { get_first_child, get_next_sibling } from '../operations.js';\nimport { active_effect } from '../../runtime.js';\nimport { COMMENT_NODE } from '#client/constants';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string} get_value\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(node, get_value, svg = false, mathml = false, skip_warning = false) {\n\tvar anchor = node;\n\n\tvar value = '';\n\n\ttemplate_effect(() => {\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) hydrate_next();\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect.nodes !== null) {\n\t\t\tremove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));\n\t\t\teffect.nodes = null;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\tif (hydrating) {\n\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\n\t\t\t/** @type {TemplateNode | null} */\n\t\t\tvar next = hydrate_next();\n\t\t\tvar last = next;\n\n\t\t\twhile (\n\t\t\t\tnext !== null &&\n\t\t\t\t(next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')\n\t\t\t) {\n\t\t\t\tlast = next;\n\t\t\t\tnext = get_next_sibling(next);\n\t\t\t}\n\n\t\t\tif (next === null) {\n\t\t\t\tw.hydration_mismatch();\n\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t}\n\n\t\t\tif (DEV && !skip_warning) {\n\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t}\n\n\t\t\tassign_nodes(hydrate_node, last);\n\t\t\tanchor = set_hydrate_node(next);\n\t\t\treturn;\n\t\t}\n\n\t\tvar html = value + '';\n\t\tif (svg) html = `<svg>${html}</svg>`;\n\t\telse if (mathml) html = `<math>${html}</math>`;\n\n\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = create_fragment_from_html(html);\n\n\t\tif (svg || mathml) {\n\t\t\tnode = /** @type {Element} */ (get_first_child(node));\n\t\t}\n\n\t\tassign_nodes(\n\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t);\n\n\t\tif (svg || mathml) {\n\t\t\twhile (get_first_child(node)) {\n\t\t\t\tanchor.before(/** @type {TemplateNode} */ (get_first_child(node)));\n\t\t\t}\n\t\t} else {\n\t\t\tanchor.before(node);\n\t\t}\n\t});\n}\n"],"names":["html","node","get_value","svg","mathml","skip_warning","anchor","value","template_effect","effect","active_effect","hydrating","hydrate_next","remove_effect_dom","hydrate_node","next","last","COMMENT_NODE","get_next_sibling","w.hydration_mismatch","HYDRATION_ERROR","assign_nodes","set_hydrate_node","create_fragment_from_html","get_first_child"],"mappings":";;AA2CO,SAASA,EAAKC,GAAMC,GAAWC,IAAM,IAAOC,IAAS,IAAOC,IAAe,IAAO;AACxF,MAAIC,IAASL,GAETM,IAAQ;AAEZ,EAAAC,EAAgB,MAAM;AACrB,QAAIC;AAAA;AAAA,MAAgCC;AAAA;AAEpC,QAAIH,OAAWA,IAAQL,EAAS,KAAM,KAAK;AAC1C,MAAIS,KAAWC,EAAY;AAC3B;AAAA,IACD;AAOA,QALIH,EAAO,UAAU,SACpBI;AAAA,MAAkBJ,EAAO,MAAM;AAAA;AAAA,MAAoCA,EAAO,MAAM;AAAA,IAAG,GACnFA,EAAO,QAAQ,OAGZF,MAAU,IAEd;AAAA,UAAII,GAAW;AAGoB,QAACG,EAAc;AAMjD,iBAHIC,IAAOH,EAAY,GACnBI,IAAOD,GAGVA,MAAS,SACRA,EAAK,aAAaE;AAAA,QAAwCF,EAAM,SAAS;AAE1E,UAAAC,IAAOD,GACPA,IAAOG,EAAiBH,CAAI;AAG7B,YAAIA,MAAS;AACZI,gBAAAA,EAAoB,GACdC;AAOP,QAAAC,EAAaP,GAAcE,CAAI,GAC/BV,IAASgB,EAAiBP,CAAI;AAC9B;AAAA,MACD;AAEA,UAAIf,IAAOO,IAAQ;AACnB,MAAIJ,IAAKH,IAAO,QAAQA,CAAI,WACnBI,MAAQJ,IAAO,SAASA,CAAI;AAKrC,UAAIC,IAAOsB,EAA0BvB,CAAI;AAWzC,WATIG,KAAOC,OACVH;AAAA,MAA+BuB,EAAgBvB,CAAI,IAGpDoB;AAAA;AAAA,QAC8BG,EAAgBvB,CAAI;AAAA;AAAA,QACpBA,EAAK;AAAA,MACrC,GAEME,KAAOC;AACV,eAAOoB,EAAgBvB,CAAI;AAC1B,UAAAK,EAAO;AAAA;AAAA,YAAoCkB,EAAgBvB,CAAI;AAAA,UAAC;AAAA;AAGjE,QAAAK,EAAO,OAAOL,CAAI;AAAA;AAAA,EAEpB,CAAC;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"html-DVImOVHa.js","sources":["../../../node_modules/.pnpm/svelte@5.50.2/node_modules/svelte/src/internal/client/dom/blocks/html.js"],"sourcesContent":["/** @import { Effect, TemplateNode } from '#client' */\nimport { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';\nimport { remove_effect_dom, template_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\nimport { create_fragment_from_html } from '../reconciler.js';\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { get_first_child, get_next_sibling } from '../operations.js';\nimport { active_effect } from '../../runtime.js';\nimport { COMMENT_NODE } from '#client/constants';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string} get_value\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(node, get_value, svg = false, mathml = false, skip_warning = false) {\n\tvar anchor = node;\n\n\tvar value = '';\n\n\ttemplate_effect(() => {\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) hydrate_next();\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect.nodes !== null) {\n\t\t\tremove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));\n\t\t\teffect.nodes = null;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\tif (hydrating) {\n\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\n\t\t\t/** @type {TemplateNode | null} */\n\t\t\tvar next = hydrate_next();\n\t\t\tvar last = next;\n\n\t\t\twhile (\n\t\t\t\tnext !== null &&\n\t\t\t\t(next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')\n\t\t\t) {\n\t\t\t\tlast = next;\n\t\t\t\tnext = get_next_sibling(next);\n\t\t\t}\n\n\t\t\tif (next === null) {\n\t\t\t\tw.hydration_mismatch();\n\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t}\n\n\t\t\tif (DEV && !skip_warning) {\n\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t}\n\n\t\t\tassign_nodes(hydrate_node, last);\n\t\t\tanchor = set_hydrate_node(next);\n\t\t\treturn;\n\t\t}\n\n\t\tvar html = value + '';\n\t\tif (svg) html = `<svg>${html}</svg>`;\n\t\telse if (mathml) html = `<math>${html}</math>`;\n\n\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = create_fragment_from_html(html);\n\n\t\tif (svg || mathml) {\n\t\t\tnode = /** @type {Element} */ (get_first_child(node));\n\t\t}\n\n\t\tassign_nodes(\n\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t);\n\n\t\tif (svg || mathml) {\n\t\t\twhile (get_first_child(node)) {\n\t\t\t\tanchor.before(/** @type {TemplateNode} */ (get_first_child(node)));\n\t\t\t}\n\t\t} else {\n\t\t\tanchor.before(node);\n\t\t}\n\t});\n}\n"],"names":["html","node","get_value","svg","mathml","skip_warning","anchor","value","template_effect","effect","active_effect","hydrating","hydrate_next","remove_effect_dom","hydrate_node","next","last","COMMENT_NODE","get_next_sibling","w.hydration_mismatch","HYDRATION_ERROR","assign_nodes","set_hydrate_node","create_fragment_from_html","get_first_child"],"mappings":";;AA2CO,SAASA,EAAKC,GAAMC,GAAWC,IAAM,IAAOC,IAAS,IAAOC,IAAe,IAAO;AACxF,MAAIC,IAASL,GAETM,IAAQ;AAEZ,EAAAC,EAAgB,MAAM;AACrB,QAAIC;AAAA;AAAA,MAAgCC;AAAA;AAEpC,QAAIH,OAAWA,IAAQL,EAAS,KAAM,KAAK;AAC1C,MAAIS,KAAWC,EAAY;AAC3B;AAAA,IACD;AAOA,QALIH,EAAO,UAAU,SACpBI;AAAA,MAAkBJ,EAAO,MAAM;AAAA;AAAA,MAAoCA,EAAO,MAAM;AAAA,IAAG,GACnFA,EAAO,QAAQ,OAGZF,MAAU,IAEd;AAAA,UAAII,GAAW;AAGoB,QAACG,EAAc;AAMjD,iBAHIC,IAAOH,EAAY,GACnBI,IAAOD,GAGVA,MAAS,SACRA,EAAK,aAAaE;AAAA,QAAwCF,EAAM,SAAS;AAE1E,UAAAC,IAAOD,GACPA,IAAOG,EAAiBH,CAAI;AAG7B,YAAIA,MAAS;AACZI,gBAAAA,EAAoB,GACdC;AAOP,QAAAC,EAAaP,GAAcE,CAAI,GAC/BV,IAASgB,EAAiBP,CAAI;AAC9B;AAAA,MACD;AAEA,UAAIf,IAAOO,IAAQ;AACnB,MAAIJ,IAAKH,IAAO,QAAQA,CAAI,WACnBI,MAAQJ,IAAO,SAASA,C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