altcha 2.3.0 → 3.0.0-beta.1
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.
- package/LICENSE.txt +1 -1
- package/README.md +149 -204
- package/dist/external/altcha.css +1 -0
- package/dist/external/altcha.js +6681 -0
- package/dist/external/altcha.min.js +1 -0
- package/dist/external/altcha.umd.cjs +6687 -0
- package/dist/external/altcha.umd.min.cjs +1 -0
- package/dist/external/index.d.ts +1 -0
- package/dist/i18n/419.d.ts +1 -0
- package/dist/i18n/af.d.ts +1 -0
- package/dist/i18n/af.js +22 -0
- package/dist/i18n/af.umd.cjs +27 -0
- package/dist/i18n/africa.d.ts +1 -0
- package/{dist_i18n → dist/i18n}/africa.js +52 -97
- package/dist/i18n/africa.umd.cjs +159 -0
- package/dist/i18n/all.d.ts +1 -0
- package/{dist_i18n → dist/i18n}/all.js +465 -299
- package/dist/i18n/all.umd.cjs +1325 -0
- package/dist/i18n/am.d.ts +1 -0
- package/dist/i18n/am.js +22 -0
- package/dist/i18n/am.umd.cjs +27 -0
- package/dist/i18n/americas.d.ts +1 -0
- package/{dist_i18n → dist/i18n}/americas.js +24 -85
- package/dist/i18n/americas.umd.cjs +71 -0
- package/dist/i18n/ar.d.ts +1 -0
- package/dist/i18n/ar.js +22 -0
- package/dist/i18n/ar.umd.cjs +27 -0
- package/dist/i18n/asia.d.ts +1 -0
- package/{dist_i18n → dist/i18n}/asia.js +177 -158
- package/dist/i18n/asia.umd.cjs +511 -0
- package/dist/i18n/az.d.ts +1 -0
- package/dist/i18n/az.js +22 -0
- package/dist/i18n/az.umd.cjs +27 -0
- package/dist/i18n/be.d.ts +1 -0
- package/dist/i18n/be.js +22 -0
- package/dist/i18n/be.umd.cjs +27 -0
- package/dist/i18n/bg.d.ts +1 -0
- package/dist/i18n/bg.js +22 -0
- package/dist/i18n/bg.umd.cjs +27 -0
- package/dist/i18n/bn.d.ts +1 -0
- package/dist/i18n/bn.js +22 -0
- package/dist/i18n/bn.umd.cjs +27 -0
- package/dist/i18n/br.d.ts +1 -0
- package/dist/i18n/bs.d.ts +1 -0
- package/dist/i18n/bs.js +22 -0
- package/dist/i18n/bs.umd.cjs +27 -0
- package/dist/i18n/ca.d.ts +1 -0
- package/dist/i18n/ca.js +22 -0
- package/dist/i18n/ca.umd.cjs +27 -0
- package/dist/i18n/cn.d.ts +1 -0
- package/dist/i18n/cs.d.ts +1 -0
- package/dist/i18n/cs.js +22 -0
- package/dist/i18n/cs.umd.cjs +27 -0
- package/dist/i18n/da.d.ts +1 -0
- package/dist/i18n/da.js +22 -0
- package/dist/i18n/da.umd.cjs +27 -0
- package/dist/i18n/de.d.ts +1 -0
- package/dist/i18n/de.js +22 -0
- package/dist/i18n/de.umd.cjs +27 -0
- package/dist/i18n/el.d.ts +1 -0
- package/dist/i18n/el.js +22 -0
- package/dist/i18n/el.umd.cjs +27 -0
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.js +22 -0
- package/dist/i18n/en.umd.cjs +27 -0
- package/dist/i18n/es-419.js +22 -0
- package/dist/i18n/es-419.umd.cjs +27 -0
- package/dist/i18n/es-es.js +22 -0
- package/dist/i18n/es-es.umd.cjs +27 -0
- package/dist/i18n/es.d.ts +1 -0
- package/dist/i18n/et.d.ts +1 -0
- package/dist/i18n/et.js +22 -0
- package/dist/i18n/et.umd.cjs +27 -0
- package/dist/i18n/eu.d.ts +1 -0
- package/dist/i18n/eu.js +22 -0
- package/dist/i18n/eu.umd.cjs +27 -0
- package/dist/i18n/europe.d.ts +1 -0
- package/{dist_i18n → dist/i18n}/europe.js +283 -209
- package/dist/i18n/europe.umd.cjs +819 -0
- package/dist/i18n/fa.d.ts +1 -0
- package/dist/i18n/fa.js +22 -0
- package/dist/i18n/fa.umd.cjs +27 -0
- package/dist/i18n/fi.d.ts +1 -0
- package/dist/i18n/fi.js +22 -0
- package/dist/i18n/fi.umd.cjs +27 -0
- package/dist/i18n/fr-ca.js +22 -0
- package/dist/i18n/fr-ca.umd.cjs +27 -0
- package/dist/i18n/fr-fr.js +22 -0
- package/dist/i18n/fr-fr.umd.cjs +27 -0
- package/dist/i18n/fr.d.ts +1 -0
- package/dist/i18n/ga.d.ts +1 -0
- package/dist/i18n/ga.js +22 -0
- package/dist/i18n/ga.umd.cjs +27 -0
- package/dist/i18n/he.d.ts +1 -0
- package/dist/i18n/he.js +22 -0
- package/dist/i18n/he.umd.cjs +27 -0
- package/dist/i18n/hi.d.ts +1 -0
- package/dist/i18n/hi.js +22 -0
- package/dist/i18n/hi.umd.cjs +27 -0
- package/dist/i18n/hr.d.ts +1 -0
- package/dist/i18n/hr.js +22 -0
- package/dist/i18n/hr.umd.cjs +27 -0
- package/dist/i18n/hu.d.ts +1 -0
- package/dist/i18n/hu.js +22 -0
- package/dist/i18n/hu.umd.cjs +27 -0
- package/dist/i18n/hy.d.ts +1 -0
- package/dist/i18n/hy.js +22 -0
- package/dist/i18n/hy.umd.cjs +27 -0
- package/dist/i18n/id.d.ts +1 -0
- package/dist/i18n/id.js +22 -0
- package/dist/i18n/id.umd.cjs +27 -0
- package/dist/i18n/is.d.ts +1 -0
- package/dist/i18n/is.js +22 -0
- package/dist/i18n/is.umd.cjs +27 -0
- package/dist/i18n/it.d.ts +1 -0
- package/dist/i18n/it.js +22 -0
- package/dist/i18n/it.umd.cjs +27 -0
- package/dist/i18n/ja.d.ts +1 -0
- package/dist/i18n/ja.js +22 -0
- package/dist/i18n/ja.umd.cjs +27 -0
- package/dist/i18n/ka.d.ts +1 -0
- package/dist/i18n/ka.js +22 -0
- package/dist/i18n/ka.umd.cjs +27 -0
- package/dist/i18n/kk.d.ts +1 -0
- package/dist/i18n/kk.js +22 -0
- package/dist/i18n/kk.umd.cjs +27 -0
- package/dist/i18n/ko.d.ts +1 -0
- package/dist/i18n/ko.js +22 -0
- package/dist/i18n/ko.umd.cjs +27 -0
- package/dist/i18n/lb.d.ts +1 -0
- package/dist/i18n/lb.js +22 -0
- package/dist/i18n/lb.umd.cjs +27 -0
- package/dist/i18n/lt.d.ts +1 -0
- package/dist/i18n/lt.js +22 -0
- package/dist/i18n/lt.umd.cjs +27 -0
- package/dist/i18n/lv.d.ts +1 -0
- package/dist/i18n/lv.js +22 -0
- package/dist/i18n/lv.umd.cjs +27 -0
- package/dist/i18n/me.d.ts +1 -0
- package/dist/i18n/me.js +22 -0
- package/dist/i18n/me.umd.cjs +27 -0
- package/dist/i18n/mk.d.ts +1 -0
- package/dist/i18n/mk.js +22 -0
- package/dist/i18n/mk.umd.cjs +27 -0
- package/dist/i18n/mr.d.ts +1 -0
- package/dist/i18n/mr.js +22 -0
- package/dist/i18n/mr.umd.cjs +27 -0
- package/dist/i18n/mt.d.ts +1 -0
- package/dist/i18n/mt.js +22 -0
- package/dist/i18n/mt.umd.cjs +27 -0
- package/dist/i18n/nb.d.ts +1 -0
- package/dist/i18n/nb.js +22 -0
- package/dist/i18n/nb.umd.cjs +27 -0
- package/dist/i18n/nl.d.ts +1 -0
- package/dist/i18n/nl.js +22 -0
- package/dist/i18n/nl.umd.cjs +27 -0
- package/dist/i18n/pl.d.ts +1 -0
- package/dist/i18n/pl.js +22 -0
- package/dist/i18n/pl.umd.cjs +27 -0
- package/dist/i18n/pt-br.js +22 -0
- package/dist/i18n/pt-br.umd.cjs +27 -0
- package/dist/i18n/pt-pt.js +22 -0
- package/dist/i18n/pt-pt.umd.cjs +27 -0
- package/dist/i18n/pt.d.ts +1 -0
- package/dist/i18n/ro.d.ts +1 -0
- package/dist/i18n/ro.js +22 -0
- package/dist/i18n/ro.umd.cjs +27 -0
- package/dist/i18n/ru.d.ts +1 -0
- package/dist/i18n/ru.js +22 -0
- package/dist/i18n/ru.umd.cjs +27 -0
- package/dist/i18n/sk.d.ts +1 -0
- package/dist/i18n/sk.js +22 -0
- package/dist/i18n/sk.umd.cjs +27 -0
- package/dist/i18n/sl.d.ts +1 -0
- package/dist/i18n/sl.js +22 -0
- package/dist/i18n/sl.umd.cjs +27 -0
- package/dist/i18n/sq.d.ts +1 -0
- package/dist/i18n/sq.js +22 -0
- package/dist/i18n/sq.umd.cjs +27 -0
- package/dist/i18n/sr.d.ts +1 -0
- package/dist/i18n/sr.js +22 -0
- package/dist/i18n/sr.umd.cjs +27 -0
- package/dist/i18n/sv.d.ts +1 -0
- package/dist/i18n/sv.js +22 -0
- package/dist/i18n/sv.umd.cjs +27 -0
- package/dist/i18n/sw.d.ts +1 -0
- package/dist/i18n/sw.js +22 -0
- package/dist/i18n/sw.umd.cjs +27 -0
- package/dist/i18n/ta.d.ts +1 -0
- package/dist/i18n/ta.js +22 -0
- package/dist/i18n/ta.umd.cjs +27 -0
- package/dist/i18n/te.d.ts +1 -0
- package/dist/i18n/te.js +22 -0
- package/dist/i18n/te.umd.cjs +27 -0
- package/dist/i18n/th.d.ts +1 -0
- package/dist/i18n/th.js +22 -0
- package/dist/i18n/th.umd.cjs +27 -0
- package/dist/i18n/tk.d.ts +1 -0
- package/dist/i18n/tk.js +22 -0
- package/dist/i18n/tk.umd.cjs +27 -0
- package/dist/i18n/tr.d.ts +1 -0
- package/dist/i18n/tr.js +22 -0
- package/dist/i18n/tr.umd.cjs +27 -0
- package/dist/i18n/tw.d.ts +1 -0
- package/dist/i18n/uk.d.ts +1 -0
- package/dist/i18n/uk.js +22 -0
- package/dist/i18n/uk.umd.cjs +27 -0
- package/dist/i18n/ur.d.ts +1 -0
- package/dist/i18n/ur.js +22 -0
- package/dist/i18n/ur.umd.cjs +27 -0
- package/dist/i18n/uz.d.ts +1 -0
- package/dist/i18n/uz.js +22 -0
- package/dist/i18n/uz.umd.cjs +27 -0
- package/dist/i18n/vi.d.ts +1 -0
- package/dist/i18n/vi.js +22 -0
- package/dist/i18n/vi.umd.cjs +27 -0
- package/dist/i18n/yo.d.ts +1 -0
- package/dist/i18n/yo.js +22 -0
- package/dist/i18n/yo.umd.cjs +27 -0
- package/dist/i18n/zh-cn.js +22 -0
- package/dist/i18n/zh-cn.umd.cjs +27 -0
- package/dist/i18n/zh-tw.js +22 -0
- package/dist/i18n/zh-tw.umd.cjs +27 -0
- package/dist/lib/index.d.ts +143 -0
- package/dist/lib/index.js +1344 -0
- package/dist/lib/index.min.js +1 -0
- package/dist/lib/index.umd.cjs +1348 -0
- package/dist/lib/index.umd.min.cjs +1 -0
- package/dist/main/altcha.i18n.js +8389 -0
- package/dist/main/altcha.i18n.min.js +1 -0
- package/dist/main/altcha.i18n.umd.cjs +8392 -0
- package/dist/main/altcha.i18n.umd.min.cjs +1 -0
- package/dist/main/altcha.js +7069 -0
- package/dist/main/altcha.min.js +1 -0
- package/dist/main/altcha.umd.cjs +7072 -0
- package/dist/main/altcha.umd.min.cjs +1 -0
- package/dist/plugins/obfuscation.plugin.d.ts +1 -0
- package/dist/plugins/obfuscation.plugin.js +320 -0
- package/dist/plugins/obfuscation.plugin.min.js +1 -0
- package/dist/plugins/obfuscation.plugin.umd.cjs +325 -0
- package/dist/plugins/obfuscation.plugin.umd.min.cjs +1 -0
- package/dist/themes/aqua.css +19 -0
- package/dist/themes/aqua.min.css +1 -0
- package/dist/themes/business.css +15 -0
- package/dist/themes/business.min.css +1 -0
- package/dist/themes/caramel.css +19 -0
- package/dist/themes/caramel.min.css +1 -0
- package/dist/themes/cupcake.css +16 -0
- package/dist/themes/cupcake.min.css +1 -0
- package/dist/themes/cyberpunk.css +24 -0
- package/dist/themes/cyberpunk.min.css +1 -0
- package/dist/themes/lime.css +13 -0
- package/dist/themes/lime.min.css +1 -0
- package/dist/themes/wireframe.css +17 -0
- package/dist/themes/wireframe.min.css +1 -0
- package/dist/types/generic.d.ts +25 -0
- package/dist/types/generic.js +1 -0
- package/dist/types/global.d.ts +5 -0
- package/dist/types/global.js +1 -0
- package/dist/types/index.d.ts +352 -0
- package/dist/types/index.js +23 -0
- package/dist/types/jsx.d.ts +13 -0
- package/dist/types/jsx.js +1 -0
- package/dist/types/react.d.ts +35 -0
- package/dist/types/react.js +1 -0
- package/dist/types/svelte.d.ts +26 -0
- package/dist/types/svelte.js +1 -0
- package/dist/workers/argon2id.js +786 -0
- package/dist/workers/pbkdf2.js +166 -0
- package/dist/workers/scrypt.js +739 -0
- package/dist/workers/sha.js +160 -0
- package/package.json +115 -81
- package/dist/altcha.d.ts +0 -183
- package/dist/altcha.i18n.d.ts +0 -183
- package/dist/altcha.i18n.js +0 -4182
- package/dist/altcha.i18n.umd.js +0 -4
- package/dist/altcha.js +0 -3105
- package/dist/altcha.umd.cjs +0 -4
- package/dist_external/altcha.css +0 -1
- package/dist_external/altcha.d.ts +0 -183
- package/dist_external/altcha.js +0 -3075
- package/dist_external/altcha.umd.cjs +0 -3
- package/dist_external/worker.js +0 -1
- package/dist_i18n/af.d.ts +0 -1
- package/dist_i18n/af.js +0 -94
- package/dist_i18n/af.umd.cjs +0 -1
- package/dist_i18n/africa.d.ts +0 -1
- package/dist_i18n/africa.umd.cjs +0 -1
- package/dist_i18n/all.d.ts +0 -1
- package/dist_i18n/all.umd.cjs +0 -1
- package/dist_i18n/am.d.ts +0 -1
- package/dist_i18n/am.js +0 -94
- package/dist_i18n/am.umd.cjs +0 -1
- package/dist_i18n/americas.d.ts +0 -1
- package/dist_i18n/americas.umd.cjs +0 -1
- package/dist_i18n/ar.d.ts +0 -1
- package/dist_i18n/ar.js +0 -94
- package/dist_i18n/ar.umd.cjs +0 -1
- package/dist_i18n/asia.d.ts +0 -1
- package/dist_i18n/asia.umd.cjs +0 -1
- package/dist_i18n/az.d.ts +0 -1
- package/dist_i18n/az.js +0 -94
- package/dist_i18n/az.umd.cjs +0 -1
- package/dist_i18n/be.d.ts +0 -1
- package/dist_i18n/be.js +0 -94
- package/dist_i18n/be.umd.cjs +0 -1
- package/dist_i18n/bg.d.ts +0 -1
- package/dist_i18n/bg.js +0 -94
- package/dist_i18n/bg.umd.cjs +0 -1
- package/dist_i18n/bn.d.ts +0 -1
- package/dist_i18n/bn.js +0 -94
- package/dist_i18n/bn.umd.cjs +0 -1
- package/dist_i18n/bs.d.ts +0 -1
- package/dist_i18n/bs.js +0 -94
- package/dist_i18n/bs.umd.cjs +0 -1
- package/dist_i18n/ca.d.ts +0 -1
- package/dist_i18n/ca.js +0 -94
- package/dist_i18n/ca.umd.cjs +0 -1
- package/dist_i18n/cs.d.ts +0 -1
- package/dist_i18n/cs.js +0 -94
- package/dist_i18n/cs.umd.cjs +0 -1
- package/dist_i18n/da.d.ts +0 -1
- package/dist_i18n/da.js +0 -94
- package/dist_i18n/da.umd.cjs +0 -1
- package/dist_i18n/de.d.ts +0 -1
- package/dist_i18n/de.js +0 -94
- package/dist_i18n/de.umd.cjs +0 -1
- package/dist_i18n/el.d.ts +0 -1
- package/dist_i18n/el.js +0 -94
- package/dist_i18n/el.umd.cjs +0 -1
- package/dist_i18n/en.d.ts +0 -1
- package/dist_i18n/en.js +0 -94
- package/dist_i18n/en.umd.cjs +0 -1
- package/dist_i18n/es-419.d.ts +0 -1
- package/dist_i18n/es-419.js +0 -94
- package/dist_i18n/es-419.umd.cjs +0 -1
- package/dist_i18n/es-es.d.ts +0 -1
- package/dist_i18n/es-es.js +0 -94
- package/dist_i18n/es-es.umd.cjs +0 -1
- package/dist_i18n/et.d.ts +0 -1
- package/dist_i18n/et.js +0 -94
- package/dist_i18n/et.umd.cjs +0 -1
- package/dist_i18n/eu.d.ts +0 -1
- package/dist_i18n/eu.js +0 -94
- package/dist_i18n/eu.umd.cjs +0 -1
- package/dist_i18n/europe.d.ts +0 -1
- package/dist_i18n/europe.umd.cjs +0 -1
- package/dist_i18n/fa.d.ts +0 -1
- package/dist_i18n/fa.js +0 -94
- package/dist_i18n/fa.umd.cjs +0 -1
- package/dist_i18n/fi.d.ts +0 -1
- package/dist_i18n/fi.js +0 -94
- package/dist_i18n/fi.umd.cjs +0 -1
- package/dist_i18n/fr-ca.d.ts +0 -1
- package/dist_i18n/fr-ca.js +0 -94
- package/dist_i18n/fr-ca.umd.cjs +0 -1
- package/dist_i18n/fr-fr.d.ts +0 -1
- package/dist_i18n/fr-fr.js +0 -94
- package/dist_i18n/fr-fr.umd.cjs +0 -1
- package/dist_i18n/ga.d.ts +0 -1
- package/dist_i18n/ga.js +0 -94
- package/dist_i18n/ga.umd.cjs +0 -1
- package/dist_i18n/he.d.ts +0 -1
- package/dist_i18n/he.js +0 -94
- package/dist_i18n/he.umd.cjs +0 -1
- package/dist_i18n/hi.d.ts +0 -1
- package/dist_i18n/hi.js +0 -94
- package/dist_i18n/hi.umd.cjs +0 -1
- package/dist_i18n/hr.d.ts +0 -1
- package/dist_i18n/hr.js +0 -94
- package/dist_i18n/hr.umd.cjs +0 -1
- package/dist_i18n/hu.d.ts +0 -1
- package/dist_i18n/hu.js +0 -94
- package/dist_i18n/hu.umd.cjs +0 -1
- package/dist_i18n/hy.d.ts +0 -1
- package/dist_i18n/hy.js +0 -94
- package/dist_i18n/hy.umd.cjs +0 -1
- package/dist_i18n/id.d.ts +0 -1
- package/dist_i18n/id.js +0 -94
- package/dist_i18n/id.umd.cjs +0 -1
- package/dist_i18n/is.d.ts +0 -1
- package/dist_i18n/is.js +0 -94
- package/dist_i18n/is.umd.cjs +0 -1
- package/dist_i18n/it.d.ts +0 -1
- package/dist_i18n/it.js +0 -94
- package/dist_i18n/it.umd.cjs +0 -1
- package/dist_i18n/ja.d.ts +0 -1
- package/dist_i18n/ja.js +0 -94
- package/dist_i18n/ja.umd.cjs +0 -1
- package/dist_i18n/ka.d.ts +0 -1
- package/dist_i18n/ka.js +0 -94
- package/dist_i18n/ka.umd.cjs +0 -1
- package/dist_i18n/kk.d.ts +0 -1
- package/dist_i18n/kk.js +0 -94
- package/dist_i18n/kk.umd.cjs +0 -1
- package/dist_i18n/ko.d.ts +0 -1
- package/dist_i18n/ko.js +0 -94
- package/dist_i18n/ko.umd.cjs +0 -1
- package/dist_i18n/lb.d.ts +0 -1
- package/dist_i18n/lb.js +0 -94
- package/dist_i18n/lb.umd.cjs +0 -1
- package/dist_i18n/lt.d.ts +0 -1
- package/dist_i18n/lt.js +0 -94
- package/dist_i18n/lt.umd.cjs +0 -1
- package/dist_i18n/lv.d.ts +0 -1
- package/dist_i18n/lv.js +0 -94
- package/dist_i18n/lv.umd.cjs +0 -1
- package/dist_i18n/me.d.ts +0 -1
- package/dist_i18n/me.js +0 -94
- package/dist_i18n/me.umd.cjs +0 -1
- package/dist_i18n/mk.d.ts +0 -1
- package/dist_i18n/mk.js +0 -94
- package/dist_i18n/mk.umd.cjs +0 -1
- package/dist_i18n/mr.d.ts +0 -1
- package/dist_i18n/mr.js +0 -94
- package/dist_i18n/mr.umd.cjs +0 -1
- package/dist_i18n/mt.d.ts +0 -1
- package/dist_i18n/mt.js +0 -94
- package/dist_i18n/mt.umd.cjs +0 -1
- package/dist_i18n/nb.d.ts +0 -1
- package/dist_i18n/nb.js +0 -95
- package/dist_i18n/nb.umd.cjs +0 -1
- package/dist_i18n/nl.d.ts +0 -1
- package/dist_i18n/nl.js +0 -94
- package/dist_i18n/nl.umd.cjs +0 -1
- package/dist_i18n/pl.d.ts +0 -1
- package/dist_i18n/pl.js +0 -94
- package/dist_i18n/pl.umd.cjs +0 -1
- package/dist_i18n/pt-br.d.ts +0 -1
- package/dist_i18n/pt-br.js +0 -94
- package/dist_i18n/pt-br.umd.cjs +0 -1
- package/dist_i18n/pt-pt.d.ts +0 -1
- package/dist_i18n/pt-pt.js +0 -94
- package/dist_i18n/pt-pt.umd.cjs +0 -1
- package/dist_i18n/ro.d.ts +0 -1
- package/dist_i18n/ro.js +0 -94
- package/dist_i18n/ro.umd.cjs +0 -1
- package/dist_i18n/ru.d.ts +0 -1
- package/dist_i18n/ru.js +0 -94
- package/dist_i18n/ru.umd.cjs +0 -1
- package/dist_i18n/sk.d.ts +0 -1
- package/dist_i18n/sk.js +0 -94
- package/dist_i18n/sk.umd.cjs +0 -1
- package/dist_i18n/sl.d.ts +0 -1
- package/dist_i18n/sl.js +0 -94
- package/dist_i18n/sl.umd.cjs +0 -1
- package/dist_i18n/sq.d.ts +0 -1
- package/dist_i18n/sq.js +0 -94
- package/dist_i18n/sq.umd.cjs +0 -1
- package/dist_i18n/sr.d.ts +0 -1
- package/dist_i18n/sr.js +0 -94
- package/dist_i18n/sr.umd.cjs +0 -1
- package/dist_i18n/sv.d.ts +0 -1
- package/dist_i18n/sv.js +0 -94
- package/dist_i18n/sv.umd.cjs +0 -1
- package/dist_i18n/sw.d.ts +0 -1
- package/dist_i18n/sw.js +0 -94
- package/dist_i18n/sw.umd.cjs +0 -1
- package/dist_i18n/ta.d.ts +0 -1
- package/dist_i18n/ta.js +0 -94
- package/dist_i18n/ta.umd.cjs +0 -1
- package/dist_i18n/te.d.ts +0 -1
- package/dist_i18n/te.js +0 -94
- package/dist_i18n/te.umd.cjs +0 -1
- package/dist_i18n/th.d.ts +0 -1
- package/dist_i18n/th.js +0 -94
- package/dist_i18n/th.umd.cjs +0 -1
- package/dist_i18n/tk.d.ts +0 -1
- package/dist_i18n/tk.js +0 -94
- package/dist_i18n/tk.umd.cjs +0 -1
- package/dist_i18n/tr.d.ts +0 -1
- package/dist_i18n/tr.js +0 -94
- package/dist_i18n/tr.umd.cjs +0 -1
- package/dist_i18n/uk.d.ts +0 -1
- package/dist_i18n/uk.js +0 -94
- package/dist_i18n/uk.umd.cjs +0 -1
- package/dist_i18n/ur.d.ts +0 -1
- package/dist_i18n/ur.js +0 -94
- package/dist_i18n/ur.umd.cjs +0 -1
- package/dist_i18n/uz.d.ts +0 -1
- package/dist_i18n/uz.js +0 -94
- package/dist_i18n/uz.umd.cjs +0 -1
- package/dist_i18n/vi.d.ts +0 -1
- package/dist_i18n/vi.js +0 -94
- package/dist_i18n/vi.umd.cjs +0 -1
- package/dist_i18n/yo.d.ts +0 -1
- package/dist_i18n/yo.js +0 -94
- package/dist_i18n/yo.umd.cjs +0 -1
- package/dist_i18n/zh-cn.d.ts +0 -1
- package/dist_i18n/zh-cn.js +0 -94
- package/dist_i18n/zh-cn.umd.cjs +0 -1
- package/dist_i18n/zh-tw.d.ts +0 -1
- package/dist_i18n/zh-tw.js +0 -94
- package/dist_i18n/zh-tw.umd.cjs +0 -1
package/dist/altcha.js
DELETED
|
@@ -1,3105 +0,0 @@
|
|
|
1
|
-
const Yn = `(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,l=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=l;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const l="AES-GCM",o=new AbortController,a=Date.now(),s=async()=>{for(let i=n;i<=r;i+=1){if(o.signal.aborted||!c||!u)return null;try{const f=await crypto.subtle.decrypt({name:l,iv:g(i)},c,u);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,u=null;try{u=h(e);const i=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",i,l,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}let y;onmessage=async e=>{const{type:t,payload:r,start:n,max:l}=e.data;let o=null;if(t==="abort")y?.abort(),y=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:s}=r||{};o=await m(s,a,l,n)}else{const{algorithm:a,challenge:s,salt:c}=r||{};o=w(s,c,a,l,n)}y=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
|
|
2
|
-
`, Dn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Yn], { type: "text/javascript;charset=utf-8" });
|
|
3
|
-
function Ni(e) {
|
|
4
|
-
let t;
|
|
5
|
-
try {
|
|
6
|
-
if (t = Dn && (self.URL || self.webkitURL).createObjectURL(Dn), !t) throw "";
|
|
7
|
-
const r = new Worker(t, {
|
|
8
|
-
name: e?.name
|
|
9
|
-
});
|
|
10
|
-
return r.addEventListener("error", () => {
|
|
11
|
-
(self.URL || self.webkitURL).revokeObjectURL(t);
|
|
12
|
-
}), r;
|
|
13
|
-
} catch {
|
|
14
|
-
return new Worker(
|
|
15
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(Yn),
|
|
16
|
-
{
|
|
17
|
-
name: e?.name
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const Li = "5";
|
|
23
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Li);
|
|
24
|
-
const Pi = 1, Oi = 4, Fi = 8, Mi = 16, Vi = 1, Ui = 2, Mr = "[", Zn = "[!", zn = "]", bt = {}, ae = Symbol(), ji = "http://www.w3.org/1999/xhtml", Nn = !1;
|
|
25
|
-
function Jn(e) {
|
|
26
|
-
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
27
|
-
}
|
|
28
|
-
var Kn = Array.isArray, qi = Array.prototype.indexOf, Bi = Array.from, or = Object.keys, Mt = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, Hi = Object.getOwnPropertyDescriptors, Gi = Object.prototype, Wi = Array.prototype, Xn = Object.getPrototypeOf, Ln = Object.isExtensible;
|
|
29
|
-
const yt = () => {
|
|
30
|
-
};
|
|
31
|
-
function Qn(e) {
|
|
32
|
-
for (var t = 0; t < e.length; t++)
|
|
33
|
-
e[t]();
|
|
34
|
-
}
|
|
35
|
-
function Yi(e, t, r = !1) {
|
|
36
|
-
return e === void 0 ? r ? (
|
|
37
|
-
/** @type {() => V} */
|
|
38
|
-
t()
|
|
39
|
-
) : (
|
|
40
|
-
/** @type {V} */
|
|
41
|
-
t
|
|
42
|
-
) : e;
|
|
43
|
-
}
|
|
44
|
-
const me = 2, eo = 4, fr = 8, Vr = 16, De = 32, it = 64, ir = 128, fe = 256, ar = 512, le = 1024, Ie = 2048, at = 4096, wt = 8192, dr = 16384, Zi = 32768, Ur = 65536, zi = 1 << 19, to = 1 << 20, Sr = 1 << 21, Ot = Symbol("$state"), ro = Symbol("legacy props"), Ji = Symbol("");
|
|
45
|
-
function Ki(e) {
|
|
46
|
-
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
47
|
-
}
|
|
48
|
-
function Xi() {
|
|
49
|
-
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
50
|
-
}
|
|
51
|
-
function Qi(e) {
|
|
52
|
-
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
53
|
-
}
|
|
54
|
-
function ea() {
|
|
55
|
-
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
56
|
-
}
|
|
57
|
-
function ta() {
|
|
58
|
-
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
59
|
-
}
|
|
60
|
-
function ra(e) {
|
|
61
|
-
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
62
|
-
}
|
|
63
|
-
function na() {
|
|
64
|
-
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
65
|
-
}
|
|
66
|
-
function oa() {
|
|
67
|
-
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
68
|
-
}
|
|
69
|
-
function ia() {
|
|
70
|
-
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
71
|
-
}
|
|
72
|
-
function hr(e) {
|
|
73
|
-
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
74
|
-
}
|
|
75
|
-
let O = !1;
|
|
76
|
-
function _t(e) {
|
|
77
|
-
O = e;
|
|
78
|
-
}
|
|
79
|
-
let P;
|
|
80
|
-
function Ue(e) {
|
|
81
|
-
if (e === null)
|
|
82
|
-
throw hr(), bt;
|
|
83
|
-
return P = e;
|
|
84
|
-
}
|
|
85
|
-
function Et() {
|
|
86
|
-
return Ue(
|
|
87
|
-
/** @type {TemplateNode} */
|
|
88
|
-
/* @__PURE__ */ Be(P)
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
function Z(e) {
|
|
92
|
-
if (O) {
|
|
93
|
-
if (/* @__PURE__ */ Be(P) !== null)
|
|
94
|
-
throw hr(), bt;
|
|
95
|
-
P = e;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function aa() {
|
|
99
|
-
for (var e = 0, t = P; ; ) {
|
|
100
|
-
if (t.nodeType === 8) {
|
|
101
|
-
var r = (
|
|
102
|
-
/** @type {Comment} */
|
|
103
|
-
t.data
|
|
104
|
-
);
|
|
105
|
-
if (r === zn) {
|
|
106
|
-
if (e === 0) return t;
|
|
107
|
-
e -= 1;
|
|
108
|
-
} else (r === Mr || r === Zn) && (e += 1);
|
|
109
|
-
}
|
|
110
|
-
var o = (
|
|
111
|
-
/** @type {TemplateNode} */
|
|
112
|
-
/* @__PURE__ */ Be(t)
|
|
113
|
-
);
|
|
114
|
-
t.remove(), t = o;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
let la = !1;
|
|
118
|
-
function Me(e) {
|
|
119
|
-
if (typeof e != "object" || e === null || Ot in e)
|
|
120
|
-
return e;
|
|
121
|
-
const t = Xn(e);
|
|
122
|
-
if (t !== Gi && t !== Wi)
|
|
123
|
-
return e;
|
|
124
|
-
var r = /* @__PURE__ */ new Map(), o = Kn(e), l = /* @__PURE__ */ N(0), a = $, s = (c) => {
|
|
125
|
-
var f = $;
|
|
126
|
-
Re(a);
|
|
127
|
-
var d = c();
|
|
128
|
-
return Re(f), d;
|
|
129
|
-
};
|
|
130
|
-
return o && r.set("length", /* @__PURE__ */ N(
|
|
131
|
-
/** @type {any[]} */
|
|
132
|
-
e.length
|
|
133
|
-
)), new Proxy(
|
|
134
|
-
/** @type {any} */
|
|
135
|
-
e,
|
|
136
|
-
{
|
|
137
|
-
defineProperty(c, f, d) {
|
|
138
|
-
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && na();
|
|
139
|
-
var m = r.get(f);
|
|
140
|
-
return m === void 0 ? (m = s(() => /* @__PURE__ */ N(d.value)), r.set(f, m)) : b(
|
|
141
|
-
m,
|
|
142
|
-
s(() => Me(d.value))
|
|
143
|
-
), !0;
|
|
144
|
-
},
|
|
145
|
-
deleteProperty(c, f) {
|
|
146
|
-
var d = r.get(f);
|
|
147
|
-
if (d === void 0)
|
|
148
|
-
f in c && (r.set(
|
|
149
|
-
f,
|
|
150
|
-
s(() => /* @__PURE__ */ N(ae))
|
|
151
|
-
), Ir(l));
|
|
152
|
-
else {
|
|
153
|
-
if (o && typeof f == "string") {
|
|
154
|
-
var m = (
|
|
155
|
-
/** @type {Source<number>} */
|
|
156
|
-
r.get("length")
|
|
157
|
-
), v = Number(f);
|
|
158
|
-
Number.isInteger(v) && v < m.v && b(m, v);
|
|
159
|
-
}
|
|
160
|
-
b(d, ae), Ir(l);
|
|
161
|
-
}
|
|
162
|
-
return !0;
|
|
163
|
-
},
|
|
164
|
-
get(c, f, d) {
|
|
165
|
-
if (f === Ot)
|
|
166
|
-
return e;
|
|
167
|
-
var m = r.get(f), v = f in c;
|
|
168
|
-
if (m === void 0 && (!v || rt(c, f)?.writable) && (m = s(() => /* @__PURE__ */ N(Me(v ? c[f] : ae))), r.set(f, m)), m !== void 0) {
|
|
169
|
-
var _ = i(m);
|
|
170
|
-
return _ === ae ? void 0 : _;
|
|
171
|
-
}
|
|
172
|
-
return Reflect.get(c, f, d);
|
|
173
|
-
},
|
|
174
|
-
getOwnPropertyDescriptor(c, f) {
|
|
175
|
-
var d = Reflect.getOwnPropertyDescriptor(c, f);
|
|
176
|
-
if (d && "value" in d) {
|
|
177
|
-
var m = r.get(f);
|
|
178
|
-
m && (d.value = i(m));
|
|
179
|
-
} else if (d === void 0) {
|
|
180
|
-
var v = r.get(f), _ = v?.v;
|
|
181
|
-
if (v !== void 0 && _ !== ae)
|
|
182
|
-
return {
|
|
183
|
-
enumerable: !0,
|
|
184
|
-
configurable: !0,
|
|
185
|
-
value: _,
|
|
186
|
-
writable: !0
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
return d;
|
|
190
|
-
},
|
|
191
|
-
has(c, f) {
|
|
192
|
-
if (f === Ot)
|
|
193
|
-
return !0;
|
|
194
|
-
var d = r.get(f), m = d !== void 0 && d.v !== ae || Reflect.has(c, f);
|
|
195
|
-
if (d !== void 0 || S !== null && (!m || rt(c, f)?.writable)) {
|
|
196
|
-
d === void 0 && (d = s(() => /* @__PURE__ */ N(m ? Me(c[f]) : ae)), r.set(f, d));
|
|
197
|
-
var v = i(d);
|
|
198
|
-
if (v === ae)
|
|
199
|
-
return !1;
|
|
200
|
-
}
|
|
201
|
-
return m;
|
|
202
|
-
},
|
|
203
|
-
set(c, f, d, m) {
|
|
204
|
-
var v = r.get(f), _ = f in c;
|
|
205
|
-
if (o && f === "length")
|
|
206
|
-
for (var w = d; w < /** @type {Source<number>} */
|
|
207
|
-
v.v; w += 1) {
|
|
208
|
-
var F = r.get(w + "");
|
|
209
|
-
F !== void 0 ? b(F, ae) : w in c && (F = s(() => /* @__PURE__ */ N(ae)), r.set(w + "", F));
|
|
210
|
-
}
|
|
211
|
-
v === void 0 ? (!_ || rt(c, f)?.writable) && (v = s(() => /* @__PURE__ */ N(void 0)), b(
|
|
212
|
-
v,
|
|
213
|
-
s(() => Me(d))
|
|
214
|
-
), r.set(f, v)) : (_ = v.v !== ae, b(
|
|
215
|
-
v,
|
|
216
|
-
s(() => Me(d))
|
|
217
|
-
));
|
|
218
|
-
var M = Reflect.getOwnPropertyDescriptor(c, f);
|
|
219
|
-
if (M?.set && M.set.call(m, d), !_) {
|
|
220
|
-
if (o && typeof f == "string") {
|
|
221
|
-
var U = (
|
|
222
|
-
/** @type {Source<number>} */
|
|
223
|
-
r.get("length")
|
|
224
|
-
), I = Number(f);
|
|
225
|
-
Number.isInteger(I) && I >= U.v && b(U, I + 1);
|
|
226
|
-
}
|
|
227
|
-
Ir(l);
|
|
228
|
-
}
|
|
229
|
-
return !0;
|
|
230
|
-
},
|
|
231
|
-
ownKeys(c) {
|
|
232
|
-
i(l);
|
|
233
|
-
var f = Reflect.ownKeys(c).filter((v) => {
|
|
234
|
-
var _ = r.get(v);
|
|
235
|
-
return _ === void 0 || _.v !== ae;
|
|
236
|
-
});
|
|
237
|
-
for (var [d, m] of r)
|
|
238
|
-
m.v !== ae && !(d in c) && f.push(d);
|
|
239
|
-
return f;
|
|
240
|
-
},
|
|
241
|
-
setPrototypeOf() {
|
|
242
|
-
oa();
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
function Ir(e, t = 1) {
|
|
248
|
-
b(e, e.v + t);
|
|
249
|
-
}
|
|
250
|
-
var Pn, no, oo, io;
|
|
251
|
-
function Tr() {
|
|
252
|
-
if (Pn === void 0) {
|
|
253
|
-
Pn = window, no = /Firefox/.test(navigator.userAgent);
|
|
254
|
-
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
255
|
-
oo = rt(t, "firstChild").get, io = rt(t, "nextSibling").get, Ln(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Ln(r) && (r.__t = void 0);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
function vr(e = "") {
|
|
259
|
-
return document.createTextNode(e);
|
|
260
|
-
}
|
|
261
|
-
// @__NO_SIDE_EFFECTS__
|
|
262
|
-
function ve(e) {
|
|
263
|
-
return oo.call(e);
|
|
264
|
-
}
|
|
265
|
-
// @__NO_SIDE_EFFECTS__
|
|
266
|
-
function Be(e) {
|
|
267
|
-
return io.call(e);
|
|
268
|
-
}
|
|
269
|
-
function z(e, t) {
|
|
270
|
-
if (!O)
|
|
271
|
-
return /* @__PURE__ */ ve(e);
|
|
272
|
-
var r = (
|
|
273
|
-
/** @type {TemplateNode} */
|
|
274
|
-
/* @__PURE__ */ ve(P)
|
|
275
|
-
);
|
|
276
|
-
return r === null && (r = P.appendChild(vr())), Ue(r), r;
|
|
277
|
-
}
|
|
278
|
-
function Nt(e, t) {
|
|
279
|
-
if (!O) {
|
|
280
|
-
var r = (
|
|
281
|
-
/** @type {DocumentFragment} */
|
|
282
|
-
/* @__PURE__ */ ve(
|
|
283
|
-
/** @type {Node} */
|
|
284
|
-
e
|
|
285
|
-
)
|
|
286
|
-
);
|
|
287
|
-
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Be(r) : r;
|
|
288
|
-
}
|
|
289
|
-
return P;
|
|
290
|
-
}
|
|
291
|
-
function J(e, t = 1, r = !1) {
|
|
292
|
-
let o = O ? P : e;
|
|
293
|
-
for (var l; t--; )
|
|
294
|
-
l = o, o = /** @type {TemplateNode} */
|
|
295
|
-
/* @__PURE__ */ Be(o);
|
|
296
|
-
if (!O)
|
|
297
|
-
return o;
|
|
298
|
-
var a = o?.nodeType;
|
|
299
|
-
if (r && a !== 3) {
|
|
300
|
-
var s = vr();
|
|
301
|
-
return o === null ? l?.after(s) : o.before(s), Ue(s), s;
|
|
302
|
-
}
|
|
303
|
-
return Ue(o), /** @type {TemplateNode} */
|
|
304
|
-
o;
|
|
305
|
-
}
|
|
306
|
-
function sa(e) {
|
|
307
|
-
e.textContent = "";
|
|
308
|
-
}
|
|
309
|
-
function ao(e) {
|
|
310
|
-
return e === this.v;
|
|
311
|
-
}
|
|
312
|
-
function lo(e, t) {
|
|
313
|
-
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
314
|
-
}
|
|
315
|
-
function jr(e) {
|
|
316
|
-
return !lo(e, this.v);
|
|
317
|
-
}
|
|
318
|
-
// @__NO_SIDE_EFFECTS__
|
|
319
|
-
function gr(e) {
|
|
320
|
-
var t = me | Ie, r = $ !== null && ($.f & me) !== 0 ? (
|
|
321
|
-
/** @type {Derived} */
|
|
322
|
-
$
|
|
323
|
-
) : null;
|
|
324
|
-
return S === null || r !== null && (r.f & fe) !== 0 ? t |= fe : S.f |= to, {
|
|
325
|
-
ctx: ne,
|
|
326
|
-
deps: null,
|
|
327
|
-
effects: null,
|
|
328
|
-
equals: ao,
|
|
329
|
-
f: t,
|
|
330
|
-
fn: e,
|
|
331
|
-
reactions: null,
|
|
332
|
-
rv: 0,
|
|
333
|
-
v: (
|
|
334
|
-
/** @type {V} */
|
|
335
|
-
null
|
|
336
|
-
),
|
|
337
|
-
wv: 0,
|
|
338
|
-
parent: r ?? S
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
// @__NO_SIDE_EFFECTS__
|
|
342
|
-
function Lt(e) {
|
|
343
|
-
const t = /* @__PURE__ */ gr(e);
|
|
344
|
-
return wo(t), t;
|
|
345
|
-
}
|
|
346
|
-
// @__NO_SIDE_EFFECTS__
|
|
347
|
-
function ua(e) {
|
|
348
|
-
const t = /* @__PURE__ */ gr(e);
|
|
349
|
-
return t.equals = jr, t;
|
|
350
|
-
}
|
|
351
|
-
function so(e) {
|
|
352
|
-
var t = e.effects;
|
|
353
|
-
if (t !== null) {
|
|
354
|
-
e.effects = null;
|
|
355
|
-
for (var r = 0; r < t.length; r += 1)
|
|
356
|
-
je(
|
|
357
|
-
/** @type {Effect} */
|
|
358
|
-
t[r]
|
|
359
|
-
);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
function ca(e) {
|
|
363
|
-
for (var t = e.parent; t !== null; ) {
|
|
364
|
-
if ((t.f & me) === 0)
|
|
365
|
-
return (
|
|
366
|
-
/** @type {Effect} */
|
|
367
|
-
t
|
|
368
|
-
);
|
|
369
|
-
t = t.parent;
|
|
370
|
-
}
|
|
371
|
-
return null;
|
|
372
|
-
}
|
|
373
|
-
function uo(e) {
|
|
374
|
-
var t, r = S;
|
|
375
|
-
qe(ca(e));
|
|
376
|
-
try {
|
|
377
|
-
so(e), t = ko(e);
|
|
378
|
-
} finally {
|
|
379
|
-
qe(r);
|
|
380
|
-
}
|
|
381
|
-
return t;
|
|
382
|
-
}
|
|
383
|
-
function co(e) {
|
|
384
|
-
var t = uo(e), r = (Ve || (e.f & fe) !== 0) && e.deps !== null ? at : le;
|
|
385
|
-
_e(e, r), e.equals(t) || (e.v = t, e.wv = xo());
|
|
386
|
-
}
|
|
387
|
-
function fa(e) {
|
|
388
|
-
S === null && $ === null && Qi(), $ !== null && ($.f & fe) !== 0 && S === null && Xi(), qt && Ki();
|
|
389
|
-
}
|
|
390
|
-
function da(e, t) {
|
|
391
|
-
var r = t.last;
|
|
392
|
-
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
393
|
-
}
|
|
394
|
-
function lt(e, t, r, o = !0) {
|
|
395
|
-
var l = S, a = {
|
|
396
|
-
ctx: ne,
|
|
397
|
-
deps: null,
|
|
398
|
-
nodes_start: null,
|
|
399
|
-
nodes_end: null,
|
|
400
|
-
f: e | Ie,
|
|
401
|
-
first: null,
|
|
402
|
-
fn: t,
|
|
403
|
-
last: null,
|
|
404
|
-
next: null,
|
|
405
|
-
parent: l,
|
|
406
|
-
prev: null,
|
|
407
|
-
teardown: null,
|
|
408
|
-
transitions: null,
|
|
409
|
-
wv: 0
|
|
410
|
-
};
|
|
411
|
-
if (r)
|
|
412
|
-
try {
|
|
413
|
-
Wr(a), a.f |= Zi;
|
|
414
|
-
} catch (f) {
|
|
415
|
-
throw je(a), f;
|
|
416
|
-
}
|
|
417
|
-
else t !== null && mr(a);
|
|
418
|
-
var s = r && a.deps === null && a.first === null && a.nodes_start === null && a.teardown === null && (a.f & (to | ir)) === 0;
|
|
419
|
-
if (!s && o && (l !== null && da(a, l), $ !== null && ($.f & me) !== 0)) {
|
|
420
|
-
var c = (
|
|
421
|
-
/** @type {Derived} */
|
|
422
|
-
$
|
|
423
|
-
);
|
|
424
|
-
(c.effects ??= []).push(a);
|
|
425
|
-
}
|
|
426
|
-
return a;
|
|
427
|
-
}
|
|
428
|
-
function qr(e) {
|
|
429
|
-
const t = lt(fr, null, !1);
|
|
430
|
-
return _e(t, le), t.teardown = e, t;
|
|
431
|
-
}
|
|
432
|
-
function Dr(e) {
|
|
433
|
-
fa();
|
|
434
|
-
var t = S !== null && (S.f & De) !== 0 && ne !== null && !ne.m;
|
|
435
|
-
if (t) {
|
|
436
|
-
var r = (
|
|
437
|
-
/** @type {ComponentContext} */
|
|
438
|
-
ne
|
|
439
|
-
);
|
|
440
|
-
(r.e ??= []).push({
|
|
441
|
-
fn: e,
|
|
442
|
-
effect: S,
|
|
443
|
-
reaction: $
|
|
444
|
-
});
|
|
445
|
-
} else {
|
|
446
|
-
var o = Br(e);
|
|
447
|
-
return o;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
function ha(e) {
|
|
451
|
-
const t = lt(it, e, !0);
|
|
452
|
-
return () => {
|
|
453
|
-
je(t);
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
function va(e) {
|
|
457
|
-
const t = lt(it, e, !0);
|
|
458
|
-
return (r = {}) => new Promise((o) => {
|
|
459
|
-
r.outro ? Lr(t, () => {
|
|
460
|
-
je(t), o(void 0);
|
|
461
|
-
}) : (je(t), o(void 0));
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
function Br(e) {
|
|
465
|
-
return lt(eo, e, !1);
|
|
466
|
-
}
|
|
467
|
-
function Hr(e) {
|
|
468
|
-
return lt(fr, e, !0);
|
|
469
|
-
}
|
|
470
|
-
function Ce(e, t = [], r = gr) {
|
|
471
|
-
const o = t.map(r);
|
|
472
|
-
return fo(() => e(...o.map(i)));
|
|
473
|
-
}
|
|
474
|
-
function fo(e, t = 0) {
|
|
475
|
-
return lt(fr | Vr | t, e, !0);
|
|
476
|
-
}
|
|
477
|
-
function Nr(e, t = !0) {
|
|
478
|
-
return lt(fr | De, e, !0, t);
|
|
479
|
-
}
|
|
480
|
-
function ho(e) {
|
|
481
|
-
var t = e.teardown;
|
|
482
|
-
if (t !== null) {
|
|
483
|
-
const r = qt, o = $;
|
|
484
|
-
Fn(!0), Re(null);
|
|
485
|
-
try {
|
|
486
|
-
t.call(null);
|
|
487
|
-
} finally {
|
|
488
|
-
Fn(r), Re(o);
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
function vo(e, t = !1) {
|
|
493
|
-
var r = e.first;
|
|
494
|
-
for (e.first = e.last = null; r !== null; ) {
|
|
495
|
-
var o = r.next;
|
|
496
|
-
(r.f & it) !== 0 ? r.parent = null : je(r, t), r = o;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
function ga(e) {
|
|
500
|
-
for (var t = e.first; t !== null; ) {
|
|
501
|
-
var r = t.next;
|
|
502
|
-
(t.f & De) === 0 && je(t), t = r;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
function je(e, t = !0) {
|
|
506
|
-
var r = !1;
|
|
507
|
-
(t || (e.f & zi) !== 0) && e.nodes_start !== null && (go(
|
|
508
|
-
e.nodes_start,
|
|
509
|
-
/** @type {TemplateNode} */
|
|
510
|
-
e.nodes_end
|
|
511
|
-
), r = !0), vo(e, t && !r), cr(e, 0), _e(e, dr);
|
|
512
|
-
var o = e.transitions;
|
|
513
|
-
if (o !== null)
|
|
514
|
-
for (const a of o)
|
|
515
|
-
a.stop();
|
|
516
|
-
ho(e);
|
|
517
|
-
var l = e.parent;
|
|
518
|
-
l !== null && l.first !== null && po(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
|
|
519
|
-
}
|
|
520
|
-
function go(e, t) {
|
|
521
|
-
for (; e !== null; ) {
|
|
522
|
-
var r = e === t ? null : (
|
|
523
|
-
/** @type {TemplateNode} */
|
|
524
|
-
/* @__PURE__ */ Be(e)
|
|
525
|
-
);
|
|
526
|
-
e.remove(), e = r;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
function po(e) {
|
|
530
|
-
var t = e.parent, r = e.prev, o = e.next;
|
|
531
|
-
r !== null && (r.next = o), o !== null && (o.prev = r), t !== null && (t.first === e && (t.first = o), t.last === e && (t.last = r));
|
|
532
|
-
}
|
|
533
|
-
function Lr(e, t) {
|
|
534
|
-
var r = [];
|
|
535
|
-
mo(e, r, !0), pa(r, () => {
|
|
536
|
-
je(e), t && t();
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
function pa(e, t) {
|
|
540
|
-
var r = e.length;
|
|
541
|
-
if (r > 0) {
|
|
542
|
-
var o = () => --r || t();
|
|
543
|
-
for (var l of e)
|
|
544
|
-
l.out(o);
|
|
545
|
-
} else
|
|
546
|
-
t();
|
|
547
|
-
}
|
|
548
|
-
function mo(e, t, r) {
|
|
549
|
-
if ((e.f & wt) === 0) {
|
|
550
|
-
if (e.f ^= wt, e.transitions !== null)
|
|
551
|
-
for (const s of e.transitions)
|
|
552
|
-
(s.is_global || r) && t.push(s);
|
|
553
|
-
for (var o = e.first; o !== null; ) {
|
|
554
|
-
var l = o.next, a = (o.f & Ur) !== 0 || (o.f & De) !== 0;
|
|
555
|
-
mo(o, t, a ? r : !1), o = l;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
function On(e) {
|
|
560
|
-
_o(e, !0);
|
|
561
|
-
}
|
|
562
|
-
function _o(e, t) {
|
|
563
|
-
if ((e.f & wt) !== 0) {
|
|
564
|
-
e.f ^= wt, (e.f & le) === 0 && (e.f ^= le), Bt(e) && (_e(e, Ie), mr(e));
|
|
565
|
-
for (var r = e.first; r !== null; ) {
|
|
566
|
-
var o = r.next, l = (r.f & Ur) !== 0 || (r.f & De) !== 0;
|
|
567
|
-
_o(r, l ? t : !1), r = o;
|
|
568
|
-
}
|
|
569
|
-
if (e.transitions !== null)
|
|
570
|
-
for (const a of e.transitions)
|
|
571
|
-
(a.is_global || t) && a.in();
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
const ma = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
|
|
575
|
-
let Vt = [], Ut = [];
|
|
576
|
-
function bo() {
|
|
577
|
-
var e = Vt;
|
|
578
|
-
Vt = [], Qn(e);
|
|
579
|
-
}
|
|
580
|
-
function yo() {
|
|
581
|
-
var e = Ut;
|
|
582
|
-
Ut = [], Qn(e);
|
|
583
|
-
}
|
|
584
|
-
function Gr(e) {
|
|
585
|
-
Vt.length === 0 && queueMicrotask(bo), Vt.push(e);
|
|
586
|
-
}
|
|
587
|
-
function _a(e) {
|
|
588
|
-
Ut.length === 0 && ma(yo), Ut.push(e);
|
|
589
|
-
}
|
|
590
|
-
function ba() {
|
|
591
|
-
Vt.length > 0 && bo(), Ut.length > 0 && yo();
|
|
592
|
-
}
|
|
593
|
-
let tr = !1, lr = !1, sr = null, nt = !1, qt = !1;
|
|
594
|
-
function Fn(e) {
|
|
595
|
-
qt = e;
|
|
596
|
-
}
|
|
597
|
-
let Ft = [];
|
|
598
|
-
let $ = null, ke = !1;
|
|
599
|
-
function Re(e) {
|
|
600
|
-
$ = e;
|
|
601
|
-
}
|
|
602
|
-
let S = null;
|
|
603
|
-
function qe(e) {
|
|
604
|
-
S = e;
|
|
605
|
-
}
|
|
606
|
-
let Te = null;
|
|
607
|
-
function wo(e) {
|
|
608
|
-
$ !== null && $.f & Sr && (Te === null ? Te = [e] : Te.push(e));
|
|
609
|
-
}
|
|
610
|
-
let re = null, ce = 0, he = null;
|
|
611
|
-
function ya(e) {
|
|
612
|
-
he = e;
|
|
613
|
-
}
|
|
614
|
-
let Eo = 1, ur = 0, Ve = !1;
|
|
615
|
-
function xo() {
|
|
616
|
-
return ++Eo;
|
|
617
|
-
}
|
|
618
|
-
function Bt(e) {
|
|
619
|
-
var t = e.f;
|
|
620
|
-
if ((t & Ie) !== 0)
|
|
621
|
-
return !0;
|
|
622
|
-
if ((t & at) !== 0) {
|
|
623
|
-
var r = e.deps, o = (t & fe) !== 0;
|
|
624
|
-
if (r !== null) {
|
|
625
|
-
var l, a, s = (t & ar) !== 0, c = o && S !== null && !Ve, f = r.length;
|
|
626
|
-
if (s || c) {
|
|
627
|
-
var d = (
|
|
628
|
-
/** @type {Derived} */
|
|
629
|
-
e
|
|
630
|
-
), m = d.parent;
|
|
631
|
-
for (l = 0; l < f; l++)
|
|
632
|
-
a = r[l], (s || !a?.reactions?.includes(d)) && (a.reactions ??= []).push(d);
|
|
633
|
-
s && (d.f ^= ar), c && m !== null && (m.f & fe) === 0 && (d.f ^= fe);
|
|
634
|
-
}
|
|
635
|
-
for (l = 0; l < f; l++)
|
|
636
|
-
if (a = r[l], Bt(
|
|
637
|
-
/** @type {Derived} */
|
|
638
|
-
a
|
|
639
|
-
) && co(
|
|
640
|
-
/** @type {Derived} */
|
|
641
|
-
a
|
|
642
|
-
), a.wv > e.wv)
|
|
643
|
-
return !0;
|
|
644
|
-
}
|
|
645
|
-
(!o || S !== null && !Ve) && _e(e, le);
|
|
646
|
-
}
|
|
647
|
-
return !1;
|
|
648
|
-
}
|
|
649
|
-
function wa(e, t) {
|
|
650
|
-
for (var r = t; r !== null; ) {
|
|
651
|
-
if ((r.f & ir) !== 0)
|
|
652
|
-
try {
|
|
653
|
-
r.fn(e);
|
|
654
|
-
return;
|
|
655
|
-
} catch {
|
|
656
|
-
r.f ^= ir;
|
|
657
|
-
}
|
|
658
|
-
r = r.parent;
|
|
659
|
-
}
|
|
660
|
-
throw tr = !1, e;
|
|
661
|
-
}
|
|
662
|
-
function Mn(e) {
|
|
663
|
-
return (e.f & dr) === 0 && (e.parent === null || (e.parent.f & ir) === 0);
|
|
664
|
-
}
|
|
665
|
-
function pr(e, t, r, o) {
|
|
666
|
-
if (tr) {
|
|
667
|
-
if (r === null && (tr = !1), Mn(t))
|
|
668
|
-
throw e;
|
|
669
|
-
return;
|
|
670
|
-
}
|
|
671
|
-
if (r !== null && (tr = !0), wa(e, t), Mn(t))
|
|
672
|
-
throw e;
|
|
673
|
-
}
|
|
674
|
-
function Co(e, t, r = !0) {
|
|
675
|
-
var o = e.reactions;
|
|
676
|
-
if (o !== null)
|
|
677
|
-
for (var l = 0; l < o.length; l++) {
|
|
678
|
-
var a = o[l];
|
|
679
|
-
Te?.includes(e) || ((a.f & me) !== 0 ? Co(
|
|
680
|
-
/** @type {Derived} */
|
|
681
|
-
a,
|
|
682
|
-
t,
|
|
683
|
-
!1
|
|
684
|
-
) : t === a && (r ? _e(a, Ie) : (a.f & le) !== 0 && _e(a, at), mr(
|
|
685
|
-
/** @type {Effect} */
|
|
686
|
-
a
|
|
687
|
-
)));
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
function ko(e) {
|
|
691
|
-
var t = re, r = ce, o = he, l = $, a = Ve, s = Te, c = ne, f = ke, d = e.f;
|
|
692
|
-
re = /** @type {null | Value[]} */
|
|
693
|
-
null, ce = 0, he = null, Ve = (d & fe) !== 0 && (ke || !nt || $ === null), $ = (d & (De | it)) === 0 ? e : null, Te = null, Vn(e.ctx), ke = !1, ur++, e.f |= Sr;
|
|
694
|
-
try {
|
|
695
|
-
var m = (
|
|
696
|
-
/** @type {Function} */
|
|
697
|
-
(0, e.fn)()
|
|
698
|
-
), v = e.deps;
|
|
699
|
-
if (re !== null) {
|
|
700
|
-
var _;
|
|
701
|
-
if (cr(e, ce), v !== null && ce > 0)
|
|
702
|
-
for (v.length = ce + re.length, _ = 0; _ < re.length; _++)
|
|
703
|
-
v[ce + _] = re[_];
|
|
704
|
-
else
|
|
705
|
-
e.deps = v = re;
|
|
706
|
-
if (!Ve)
|
|
707
|
-
for (_ = ce; _ < v.length; _++)
|
|
708
|
-
(v[_].reactions ??= []).push(e);
|
|
709
|
-
} else v !== null && ce < v.length && (cr(e, ce), v.length = ce);
|
|
710
|
-
if (To() && he !== null && !ke && v !== null && (e.f & (me | at | Ie)) === 0)
|
|
711
|
-
for (_ = 0; _ < /** @type {Source[]} */
|
|
712
|
-
he.length; _++)
|
|
713
|
-
Co(
|
|
714
|
-
he[_],
|
|
715
|
-
/** @type {Effect} */
|
|
716
|
-
e
|
|
717
|
-
);
|
|
718
|
-
return l !== null && l !== e && (ur++, he !== null && (o === null ? o = he : o.push(.../** @type {Source[]} */
|
|
719
|
-
he))), m;
|
|
720
|
-
} finally {
|
|
721
|
-
re = t, ce = r, he = o, $ = l, Ve = a, Te = s, Vn(c), ke = f, e.f ^= Sr;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
function Ea(e, t) {
|
|
725
|
-
let r = t.reactions;
|
|
726
|
-
if (r !== null) {
|
|
727
|
-
var o = qi.call(r, e);
|
|
728
|
-
if (o !== -1) {
|
|
729
|
-
var l = r.length - 1;
|
|
730
|
-
l === 0 ? r = t.reactions = null : (r[o] = r[l], r.pop());
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
r === null && (t.f & me) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
734
|
-
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
735
|
-
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
736
|
-
(re === null || !re.includes(t)) && (_e(t, at), (t.f & (fe | ar)) === 0 && (t.f ^= ar), so(
|
|
737
|
-
/** @type {Derived} **/
|
|
738
|
-
t
|
|
739
|
-
), cr(
|
|
740
|
-
/** @type {Derived} **/
|
|
741
|
-
t,
|
|
742
|
-
0
|
|
743
|
-
));
|
|
744
|
-
}
|
|
745
|
-
function cr(e, t) {
|
|
746
|
-
var r = e.deps;
|
|
747
|
-
if (r !== null)
|
|
748
|
-
for (var o = t; o < r.length; o++)
|
|
749
|
-
Ea(e, r[o]);
|
|
750
|
-
}
|
|
751
|
-
function Wr(e) {
|
|
752
|
-
var t = e.f;
|
|
753
|
-
if ((t & dr) === 0) {
|
|
754
|
-
_e(e, le);
|
|
755
|
-
var r = S, o = ne, l = nt;
|
|
756
|
-
S = e, nt = !0;
|
|
757
|
-
try {
|
|
758
|
-
(t & Vr) !== 0 ? ga(e) : vo(e), ho(e);
|
|
759
|
-
var a = ko(e);
|
|
760
|
-
e.teardown = typeof a == "function" ? a : null, e.wv = Eo;
|
|
761
|
-
var s = e.deps, c;
|
|
762
|
-
Nn && la && e.f & Ie;
|
|
763
|
-
} catch (f) {
|
|
764
|
-
pr(f, e, r, o || e.ctx);
|
|
765
|
-
} finally {
|
|
766
|
-
nt = l, S = r;
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
function xa() {
|
|
771
|
-
try {
|
|
772
|
-
ea();
|
|
773
|
-
} catch (e) {
|
|
774
|
-
if (sr !== null)
|
|
775
|
-
pr(e, sr, null);
|
|
776
|
-
else
|
|
777
|
-
throw e;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
function Ao() {
|
|
781
|
-
var e = nt;
|
|
782
|
-
try {
|
|
783
|
-
var t = 0;
|
|
784
|
-
for (nt = !0; Ft.length > 0; ) {
|
|
785
|
-
t++ > 1e3 && xa();
|
|
786
|
-
var r = Ft, o = r.length;
|
|
787
|
-
Ft = [];
|
|
788
|
-
for (var l = 0; l < o; l++) {
|
|
789
|
-
var a = ka(r[l]);
|
|
790
|
-
Ca(a);
|
|
791
|
-
}
|
|
792
|
-
jt.clear();
|
|
793
|
-
}
|
|
794
|
-
} finally {
|
|
795
|
-
lr = !1, nt = e, sr = null;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
function Ca(e) {
|
|
799
|
-
var t = e.length;
|
|
800
|
-
if (t !== 0)
|
|
801
|
-
for (var r = 0; r < t; r++) {
|
|
802
|
-
var o = e[r];
|
|
803
|
-
if ((o.f & (dr | wt)) === 0)
|
|
804
|
-
try {
|
|
805
|
-
Bt(o) && (Wr(o), o.deps === null && o.first === null && o.nodes_start === null && (o.teardown === null ? po(o) : o.fn = null));
|
|
806
|
-
} catch (l) {
|
|
807
|
-
pr(l, o, null, o.ctx);
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
function mr(e) {
|
|
812
|
-
lr || (lr = !0, queueMicrotask(Ao));
|
|
813
|
-
for (var t = sr = e; t.parent !== null; ) {
|
|
814
|
-
t = t.parent;
|
|
815
|
-
var r = t.f;
|
|
816
|
-
if ((r & (it | De)) !== 0) {
|
|
817
|
-
if ((r & le) === 0) return;
|
|
818
|
-
t.f ^= le;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
Ft.push(t);
|
|
822
|
-
}
|
|
823
|
-
function ka(e) {
|
|
824
|
-
for (var t = [], r = e; r !== null; ) {
|
|
825
|
-
var o = r.f, l = (o & (De | it)) !== 0, a = l && (o & le) !== 0;
|
|
826
|
-
if (!a && (o & wt) === 0) {
|
|
827
|
-
if ((o & eo) !== 0)
|
|
828
|
-
t.push(r);
|
|
829
|
-
else if (l)
|
|
830
|
-
r.f ^= le;
|
|
831
|
-
else
|
|
832
|
-
try {
|
|
833
|
-
Bt(r) && Wr(r);
|
|
834
|
-
} catch (f) {
|
|
835
|
-
pr(f, r, null, r.ctx);
|
|
836
|
-
}
|
|
837
|
-
var s = r.first;
|
|
838
|
-
if (s !== null) {
|
|
839
|
-
r = s;
|
|
840
|
-
continue;
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
var c = r.parent;
|
|
844
|
-
for (r = r.next; r === null && c !== null; )
|
|
845
|
-
r = c.next, c = c.parent;
|
|
846
|
-
}
|
|
847
|
-
return t;
|
|
848
|
-
}
|
|
849
|
-
function E(e) {
|
|
850
|
-
for (var t; ; ) {
|
|
851
|
-
if (ba(), Ft.length === 0)
|
|
852
|
-
return (
|
|
853
|
-
/** @type {T} */
|
|
854
|
-
t
|
|
855
|
-
);
|
|
856
|
-
lr = !0, Ao();
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
async function Rr() {
|
|
860
|
-
await Promise.resolve(), E();
|
|
861
|
-
}
|
|
862
|
-
function i(e) {
|
|
863
|
-
var t = e.f, r = (t & me) !== 0;
|
|
864
|
-
if ($ !== null && !ke) {
|
|
865
|
-
if (!Te?.includes(e)) {
|
|
866
|
-
var o = $.deps;
|
|
867
|
-
e.rv < ur && (e.rv = ur, re === null && o !== null && o[ce] === e ? ce++ : re === null ? re = [e] : (!Ve || !re.includes(e)) && re.push(e));
|
|
868
|
-
}
|
|
869
|
-
} else if (r && /** @type {Derived} */
|
|
870
|
-
e.deps === null && /** @type {Derived} */
|
|
871
|
-
e.effects === null) {
|
|
872
|
-
var l = (
|
|
873
|
-
/** @type {Derived} */
|
|
874
|
-
e
|
|
875
|
-
), a = l.parent;
|
|
876
|
-
a !== null && (a.f & fe) === 0 && (l.f ^= fe);
|
|
877
|
-
}
|
|
878
|
-
return r && (l = /** @type {Derived} */
|
|
879
|
-
e, Bt(l) && co(l)), qt && jt.has(e) ? jt.get(e) : e.v;
|
|
880
|
-
}
|
|
881
|
-
function ot(e) {
|
|
882
|
-
var t = ke;
|
|
883
|
-
try {
|
|
884
|
-
return ke = !0, e();
|
|
885
|
-
} finally {
|
|
886
|
-
ke = t;
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
const Aa = -7169;
|
|
890
|
-
function _e(e, t) {
|
|
891
|
-
e.f = e.f & Aa | t;
|
|
892
|
-
}
|
|
893
|
-
const jt = /* @__PURE__ */ new Map();
|
|
894
|
-
function Io(e, t) {
|
|
895
|
-
var r = {
|
|
896
|
-
f: 0,
|
|
897
|
-
// TODO ideally we could skip this altogether, but it causes type errors
|
|
898
|
-
v: e,
|
|
899
|
-
reactions: null,
|
|
900
|
-
equals: ao,
|
|
901
|
-
rv: 0,
|
|
902
|
-
wv: 0
|
|
903
|
-
};
|
|
904
|
-
return r;
|
|
905
|
-
}
|
|
906
|
-
// @__NO_SIDE_EFFECTS__
|
|
907
|
-
function N(e, t) {
|
|
908
|
-
const r = Io(e);
|
|
909
|
-
return wo(r), r;
|
|
910
|
-
}
|
|
911
|
-
// @__NO_SIDE_EFFECTS__
|
|
912
|
-
function Yr(e, t = !1) {
|
|
913
|
-
const r = Io(e);
|
|
914
|
-
return t || (r.equals = jr), r;
|
|
915
|
-
}
|
|
916
|
-
function b(e, t, r = !1) {
|
|
917
|
-
$ !== null && !ke && To() && ($.f & (me | Vr)) !== 0 && !Te?.includes(e) && ia();
|
|
918
|
-
let o = r ? Me(t) : t;
|
|
919
|
-
return Ia(e, o);
|
|
920
|
-
}
|
|
921
|
-
function Ia(e, t) {
|
|
922
|
-
if (!e.equals(t)) {
|
|
923
|
-
var r = e.v;
|
|
924
|
-
qt ? jt.set(e, t) : jt.set(e, r), e.v = t, (e.f & me) !== 0 && ((e.f & Ie) !== 0 && uo(
|
|
925
|
-
/** @type {Derived} */
|
|
926
|
-
e
|
|
927
|
-
), _e(e, (e.f & fe) === 0 ? le : at)), e.wv = xo(), Ro(e, Ie), S !== null && (S.f & le) !== 0 && (S.f & (De | it)) === 0 && (he === null ? ya([e]) : he.push(e));
|
|
928
|
-
}
|
|
929
|
-
return t;
|
|
930
|
-
}
|
|
931
|
-
function Ro(e, t) {
|
|
932
|
-
var r = e.reactions;
|
|
933
|
-
if (r !== null)
|
|
934
|
-
for (var o = r.length, l = 0; l < o; l++) {
|
|
935
|
-
var a = r[l], s = a.f;
|
|
936
|
-
(s & Ie) === 0 && (_e(a, t), (s & (le | fe)) !== 0 && ((s & me) !== 0 ? Ro(
|
|
937
|
-
/** @type {Derived} */
|
|
938
|
-
a,
|
|
939
|
-
at
|
|
940
|
-
) : mr(
|
|
941
|
-
/** @type {Effect} */
|
|
942
|
-
a
|
|
943
|
-
)));
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
let ne = null;
|
|
947
|
-
function Vn(e) {
|
|
948
|
-
ne = e;
|
|
949
|
-
}
|
|
950
|
-
function $o(e, t = !1, r) {
|
|
951
|
-
var o = ne = {
|
|
952
|
-
p: ne,
|
|
953
|
-
c: null,
|
|
954
|
-
d: !1,
|
|
955
|
-
e: null,
|
|
956
|
-
m: !1,
|
|
957
|
-
s: e,
|
|
958
|
-
x: null,
|
|
959
|
-
l: null
|
|
960
|
-
};
|
|
961
|
-
qr(() => {
|
|
962
|
-
o.d = !0;
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
function So(e) {
|
|
966
|
-
const t = ne;
|
|
967
|
-
if (t !== null) {
|
|
968
|
-
e !== void 0 && (t.x = e);
|
|
969
|
-
const s = t.e;
|
|
970
|
-
if (s !== null) {
|
|
971
|
-
var r = S, o = $;
|
|
972
|
-
t.e = null;
|
|
973
|
-
try {
|
|
974
|
-
for (var l = 0; l < s.length; l++) {
|
|
975
|
-
var a = s[l];
|
|
976
|
-
qe(a.effect), Re(a.reaction), Br(a.fn);
|
|
977
|
-
}
|
|
978
|
-
} finally {
|
|
979
|
-
qe(r), Re(o);
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
ne = t.p, t.m = !0;
|
|
983
|
-
}
|
|
984
|
-
return e || /** @type {T} */
|
|
985
|
-
{};
|
|
986
|
-
}
|
|
987
|
-
function To() {
|
|
988
|
-
return !0;
|
|
989
|
-
}
|
|
990
|
-
const Ra = ["touchstart", "touchmove"];
|
|
991
|
-
function $a(e) {
|
|
992
|
-
return Ra.includes(e);
|
|
993
|
-
}
|
|
994
|
-
function Sa(e, t) {
|
|
995
|
-
if (t) {
|
|
996
|
-
const r = document.body;
|
|
997
|
-
e.autofocus = !0, Gr(() => {
|
|
998
|
-
document.activeElement === r && e.focus();
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
let Un = !1;
|
|
1003
|
-
function Do() {
|
|
1004
|
-
Un || (Un = !0, document.addEventListener(
|
|
1005
|
-
"reset",
|
|
1006
|
-
(e) => {
|
|
1007
|
-
Promise.resolve().then(() => {
|
|
1008
|
-
if (!e.defaultPrevented)
|
|
1009
|
-
for (
|
|
1010
|
-
const t of
|
|
1011
|
-
/**@type {HTMLFormElement} */
|
|
1012
|
-
e.target.elements
|
|
1013
|
-
)
|
|
1014
|
-
t.__on_r?.();
|
|
1015
|
-
});
|
|
1016
|
-
},
|
|
1017
|
-
// In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
|
|
1018
|
-
{ capture: !0 }
|
|
1019
|
-
));
|
|
1020
|
-
}
|
|
1021
|
-
function No(e) {
|
|
1022
|
-
var t = $, r = S;
|
|
1023
|
-
Re(null), qe(null);
|
|
1024
|
-
try {
|
|
1025
|
-
return e();
|
|
1026
|
-
} finally {
|
|
1027
|
-
Re(t), qe(r);
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
function Ta(e, t, r, o = r) {
|
|
1031
|
-
e.addEventListener(t, () => No(r));
|
|
1032
|
-
const l = e.__on_r;
|
|
1033
|
-
l ? e.__on_r = () => {
|
|
1034
|
-
l(), o(!0);
|
|
1035
|
-
} : e.__on_r = () => o(!0), Do();
|
|
1036
|
-
}
|
|
1037
|
-
const Lo = /* @__PURE__ */ new Set(), Pr = /* @__PURE__ */ new Set();
|
|
1038
|
-
function Da(e, t, r, o = {}) {
|
|
1039
|
-
function l(a) {
|
|
1040
|
-
if (o.capture || Pt.call(t, a), !a.cancelBubble)
|
|
1041
|
-
return No(() => r?.call(this, a));
|
|
1042
|
-
}
|
|
1043
|
-
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Gr(() => {
|
|
1044
|
-
t.addEventListener(e, l, o);
|
|
1045
|
-
}) : t.addEventListener(e, l, o), l;
|
|
1046
|
-
}
|
|
1047
|
-
function Fe(e, t, r, o, l) {
|
|
1048
|
-
var a = { capture: o, passive: l }, s = Da(e, t, r, a);
|
|
1049
|
-
(t === document.body || t === window || t === document) && qr(() => {
|
|
1050
|
-
t.removeEventListener(e, s, a);
|
|
1051
|
-
});
|
|
1052
|
-
}
|
|
1053
|
-
function Na(e) {
|
|
1054
|
-
for (var t = 0; t < e.length; t++)
|
|
1055
|
-
Lo.add(e[t]);
|
|
1056
|
-
for (var r of Pr)
|
|
1057
|
-
r(e);
|
|
1058
|
-
}
|
|
1059
|
-
function Pt(e) {
|
|
1060
|
-
var t = this, r = (
|
|
1061
|
-
/** @type {Node} */
|
|
1062
|
-
t.ownerDocument
|
|
1063
|
-
), o = e.type, l = e.composedPath?.() || [], a = (
|
|
1064
|
-
/** @type {null | Element} */
|
|
1065
|
-
l[0] || e.target
|
|
1066
|
-
), s = 0, c = e.__root;
|
|
1067
|
-
if (c) {
|
|
1068
|
-
var f = l.indexOf(c);
|
|
1069
|
-
if (f !== -1 && (t === document || t === /** @type {any} */
|
|
1070
|
-
window)) {
|
|
1071
|
-
e.__root = t;
|
|
1072
|
-
return;
|
|
1073
|
-
}
|
|
1074
|
-
var d = l.indexOf(t);
|
|
1075
|
-
if (d === -1)
|
|
1076
|
-
return;
|
|
1077
|
-
f <= d && (s = f);
|
|
1078
|
-
}
|
|
1079
|
-
if (a = /** @type {Element} */
|
|
1080
|
-
l[s] || e.target, a !== t) {
|
|
1081
|
-
Mt(e, "currentTarget", {
|
|
1082
|
-
configurable: !0,
|
|
1083
|
-
get() {
|
|
1084
|
-
return a || r;
|
|
1085
|
-
}
|
|
1086
|
-
});
|
|
1087
|
-
var m = $, v = S;
|
|
1088
|
-
Re(null), qe(null);
|
|
1089
|
-
try {
|
|
1090
|
-
for (var _, w = []; a !== null; ) {
|
|
1091
|
-
var F = a.assignedSlot || a.parentNode || /** @type {any} */
|
|
1092
|
-
a.host || null;
|
|
1093
|
-
try {
|
|
1094
|
-
var M = a["__" + o];
|
|
1095
|
-
if (M != null && (!/** @type {any} */
|
|
1096
|
-
a.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1097
|
-
// -> the target could not have been disabled because it emits the event in the first place
|
|
1098
|
-
e.target === a))
|
|
1099
|
-
if (Kn(M)) {
|
|
1100
|
-
var [U, ...I] = M;
|
|
1101
|
-
U.apply(a, [e, ...I]);
|
|
1102
|
-
} else
|
|
1103
|
-
M.call(a, e);
|
|
1104
|
-
} catch (ee) {
|
|
1105
|
-
_ ? w.push(ee) : _ = ee;
|
|
1106
|
-
}
|
|
1107
|
-
if (e.cancelBubble || F === t || F === null)
|
|
1108
|
-
break;
|
|
1109
|
-
a = F;
|
|
1110
|
-
}
|
|
1111
|
-
if (_) {
|
|
1112
|
-
for (let ee of w)
|
|
1113
|
-
queueMicrotask(() => {
|
|
1114
|
-
throw ee;
|
|
1115
|
-
});
|
|
1116
|
-
throw _;
|
|
1117
|
-
}
|
|
1118
|
-
} finally {
|
|
1119
|
-
e.__root = t, delete e.currentTarget, Re(m), qe(v);
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
function Zr(e) {
|
|
1124
|
-
var t = document.createElement("template");
|
|
1125
|
-
return t.innerHTML = e, t.content;
|
|
1126
|
-
}
|
|
1127
|
-
function Ae(e, t) {
|
|
1128
|
-
var r = (
|
|
1129
|
-
/** @type {Effect} */
|
|
1130
|
-
S
|
|
1131
|
-
);
|
|
1132
|
-
r.nodes_start === null && (r.nodes_start = e, r.nodes_end = t);
|
|
1133
|
-
}
|
|
1134
|
-
// @__NO_SIDE_EFFECTS__
|
|
1135
|
-
function be(e, t) {
|
|
1136
|
-
var r = (t & Vi) !== 0, o = (t & Ui) !== 0, l, a = !e.startsWith("<!>");
|
|
1137
|
-
return () => {
|
|
1138
|
-
if (O)
|
|
1139
|
-
return Ae(P, null), P;
|
|
1140
|
-
l === void 0 && (l = Zr(a ? e : "<!>" + e), r || (l = /** @type {Node} */
|
|
1141
|
-
/* @__PURE__ */ ve(l)));
|
|
1142
|
-
var s = (
|
|
1143
|
-
/** @type {TemplateNode} */
|
|
1144
|
-
o || no ? document.importNode(l, !0) : l.cloneNode(!0)
|
|
1145
|
-
);
|
|
1146
|
-
if (r) {
|
|
1147
|
-
var c = (
|
|
1148
|
-
/** @type {TemplateNode} */
|
|
1149
|
-
/* @__PURE__ */ ve(s)
|
|
1150
|
-
), f = (
|
|
1151
|
-
/** @type {TemplateNode} */
|
|
1152
|
-
s.lastChild
|
|
1153
|
-
);
|
|
1154
|
-
Ae(c, f);
|
|
1155
|
-
} else
|
|
1156
|
-
Ae(s, s);
|
|
1157
|
-
return s;
|
|
1158
|
-
};
|
|
1159
|
-
}
|
|
1160
|
-
// @__NO_SIDE_EFFECTS__
|
|
1161
|
-
function _r(e, t, r = "svg") {
|
|
1162
|
-
var o = !e.startsWith("<!>"), l = `<${r}>${o ? e : "<!>" + e}</${r}>`, a;
|
|
1163
|
-
return () => {
|
|
1164
|
-
if (O)
|
|
1165
|
-
return Ae(P, null), P;
|
|
1166
|
-
if (!a) {
|
|
1167
|
-
var s = (
|
|
1168
|
-
/** @type {DocumentFragment} */
|
|
1169
|
-
Zr(l)
|
|
1170
|
-
), c = (
|
|
1171
|
-
/** @type {Element} */
|
|
1172
|
-
/* @__PURE__ */ ve(s)
|
|
1173
|
-
);
|
|
1174
|
-
a = /** @type {Element} */
|
|
1175
|
-
/* @__PURE__ */ ve(c);
|
|
1176
|
-
}
|
|
1177
|
-
var f = (
|
|
1178
|
-
/** @type {TemplateNode} */
|
|
1179
|
-
a.cloneNode(!0)
|
|
1180
|
-
);
|
|
1181
|
-
return Ae(f, f), f;
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
function Xt() {
|
|
1185
|
-
if (O)
|
|
1186
|
-
return Ae(P, null), P;
|
|
1187
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), r = vr();
|
|
1188
|
-
return e.append(t, r), Ae(t, r), e;
|
|
1189
|
-
}
|
|
1190
|
-
function B(e, t) {
|
|
1191
|
-
if (O) {
|
|
1192
|
-
S.nodes_end = P, Et();
|
|
1193
|
-
return;
|
|
1194
|
-
}
|
|
1195
|
-
e !== null && e.before(
|
|
1196
|
-
/** @type {Node} */
|
|
1197
|
-
t
|
|
1198
|
-
);
|
|
1199
|
-
}
|
|
1200
|
-
function La(e, t) {
|
|
1201
|
-
var r = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1202
|
-
r !== (e.__t ??= e.nodeValue) && (e.__t = r, e.nodeValue = r + "");
|
|
1203
|
-
}
|
|
1204
|
-
function Po(e, t) {
|
|
1205
|
-
return Oo(e, t);
|
|
1206
|
-
}
|
|
1207
|
-
function Pa(e, t) {
|
|
1208
|
-
Tr(), t.intro = t.intro ?? !1;
|
|
1209
|
-
const r = t.target, o = O, l = P;
|
|
1210
|
-
try {
|
|
1211
|
-
for (var a = (
|
|
1212
|
-
/** @type {TemplateNode} */
|
|
1213
|
-
/* @__PURE__ */ ve(r)
|
|
1214
|
-
); a && (a.nodeType !== 8 || /** @type {Comment} */
|
|
1215
|
-
a.data !== Mr); )
|
|
1216
|
-
a = /** @type {TemplateNode} */
|
|
1217
|
-
/* @__PURE__ */ Be(a);
|
|
1218
|
-
if (!a)
|
|
1219
|
-
throw bt;
|
|
1220
|
-
_t(!0), Ue(
|
|
1221
|
-
/** @type {Comment} */
|
|
1222
|
-
a
|
|
1223
|
-
), Et();
|
|
1224
|
-
const s = Oo(e, { ...t, anchor: a });
|
|
1225
|
-
if (P === null || P.nodeType !== 8 || /** @type {Comment} */
|
|
1226
|
-
P.data !== zn)
|
|
1227
|
-
throw hr(), bt;
|
|
1228
|
-
return _t(!1), /** @type {Exports} */
|
|
1229
|
-
s;
|
|
1230
|
-
} catch (s) {
|
|
1231
|
-
if (s === bt)
|
|
1232
|
-
return t.recover === !1 && ta(), Tr(), sa(r), _t(!1), Po(e, t);
|
|
1233
|
-
throw s;
|
|
1234
|
-
} finally {
|
|
1235
|
-
_t(o), Ue(l);
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
const pt = /* @__PURE__ */ new Map();
|
|
1239
|
-
function Oo(e, { target: t, anchor: r, props: o = {}, events: l, context: a, intro: s = !0 }) {
|
|
1240
|
-
Tr();
|
|
1241
|
-
var c = /* @__PURE__ */ new Set(), f = (v) => {
|
|
1242
|
-
for (var _ = 0; _ < v.length; _++) {
|
|
1243
|
-
var w = v[_];
|
|
1244
|
-
if (!c.has(w)) {
|
|
1245
|
-
c.add(w);
|
|
1246
|
-
var F = $a(w);
|
|
1247
|
-
t.addEventListener(w, Pt, { passive: F });
|
|
1248
|
-
var M = pt.get(w);
|
|
1249
|
-
M === void 0 ? (document.addEventListener(w, Pt, { passive: F }), pt.set(w, 1)) : pt.set(w, M + 1);
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
};
|
|
1253
|
-
f(Bi(Lo)), Pr.add(f);
|
|
1254
|
-
var d = void 0, m = va(() => {
|
|
1255
|
-
var v = r ?? t.appendChild(vr());
|
|
1256
|
-
return Nr(() => {
|
|
1257
|
-
if (a) {
|
|
1258
|
-
$o({});
|
|
1259
|
-
var _ = (
|
|
1260
|
-
/** @type {ComponentContext} */
|
|
1261
|
-
ne
|
|
1262
|
-
);
|
|
1263
|
-
_.c = a;
|
|
1264
|
-
}
|
|
1265
|
-
l && (o.$$events = l), O && Ae(
|
|
1266
|
-
/** @type {TemplateNode} */
|
|
1267
|
-
v,
|
|
1268
|
-
null
|
|
1269
|
-
), d = e(v, o) || {}, O && (S.nodes_end = P), a && So();
|
|
1270
|
-
}), () => {
|
|
1271
|
-
for (var _ of c) {
|
|
1272
|
-
t.removeEventListener(_, Pt);
|
|
1273
|
-
var w = (
|
|
1274
|
-
/** @type {number} */
|
|
1275
|
-
pt.get(_)
|
|
1276
|
-
);
|
|
1277
|
-
--w === 0 ? (document.removeEventListener(_, Pt), pt.delete(_)) : pt.set(_, w);
|
|
1278
|
-
}
|
|
1279
|
-
Pr.delete(f), v !== r && v.parentNode?.removeChild(v);
|
|
1280
|
-
};
|
|
1281
|
-
});
|
|
1282
|
-
return Or.set(d, m), d;
|
|
1283
|
-
}
|
|
1284
|
-
let Or = /* @__PURE__ */ new WeakMap();
|
|
1285
|
-
function Oa(e, t) {
|
|
1286
|
-
const r = Or.get(e);
|
|
1287
|
-
return r ? (Or.delete(e), r(t)) : Promise.resolve();
|
|
1288
|
-
}
|
|
1289
|
-
function K(e, t, [r, o] = [0, 0]) {
|
|
1290
|
-
O && r === 0 && Et();
|
|
1291
|
-
var l = e, a = null, s = null, c = ae, f = r > 0 ? Ur : 0, d = !1;
|
|
1292
|
-
const m = (_, w = !0) => {
|
|
1293
|
-
d = !0, v(w, _);
|
|
1294
|
-
}, v = (_, w) => {
|
|
1295
|
-
if (c === (c = _)) return;
|
|
1296
|
-
let F = !1;
|
|
1297
|
-
if (O && o !== -1) {
|
|
1298
|
-
if (r === 0) {
|
|
1299
|
-
const U = (
|
|
1300
|
-
/** @type {Comment} */
|
|
1301
|
-
l.data
|
|
1302
|
-
);
|
|
1303
|
-
U === Mr ? o = 0 : U === Zn ? o = 1 / 0 : (o = parseInt(U.substring(1)), o !== o && (o = c ? 1 / 0 : -1));
|
|
1304
|
-
}
|
|
1305
|
-
const M = o > r;
|
|
1306
|
-
!!c === M && (l = aa(), Ue(l), _t(!1), F = !0, o = -1);
|
|
1307
|
-
}
|
|
1308
|
-
c ? (a ? On(a) : w && (a = Nr(() => w(l))), s && Lr(s, () => {
|
|
1309
|
-
s = null;
|
|
1310
|
-
})) : (s ? On(s) : w && (s = Nr(() => w(l, [r + 1, o]))), a && Lr(a, () => {
|
|
1311
|
-
a = null;
|
|
1312
|
-
})), F && _t(!0);
|
|
1313
|
-
};
|
|
1314
|
-
fo(() => {
|
|
1315
|
-
d = !1, t(m), d || v(null, null);
|
|
1316
|
-
}, f), O && (l = P);
|
|
1317
|
-
}
|
|
1318
|
-
function tt(e, t, r = !1, o = !1, l = !1) {
|
|
1319
|
-
var a = e, s = "";
|
|
1320
|
-
Ce(() => {
|
|
1321
|
-
var c = (
|
|
1322
|
-
/** @type {Effect} */
|
|
1323
|
-
S
|
|
1324
|
-
);
|
|
1325
|
-
if (s === (s = t() ?? "")) {
|
|
1326
|
-
O && Et();
|
|
1327
|
-
return;
|
|
1328
|
-
}
|
|
1329
|
-
if (c.nodes_start !== null && (go(
|
|
1330
|
-
c.nodes_start,
|
|
1331
|
-
/** @type {TemplateNode} */
|
|
1332
|
-
c.nodes_end
|
|
1333
|
-
), c.nodes_start = c.nodes_end = null), s !== "") {
|
|
1334
|
-
if (O) {
|
|
1335
|
-
P.data;
|
|
1336
|
-
for (var f = Et(), d = f; f !== null && (f.nodeType !== 8 || /** @type {Comment} */
|
|
1337
|
-
f.data !== ""); )
|
|
1338
|
-
d = f, f = /** @type {TemplateNode} */
|
|
1339
|
-
/* @__PURE__ */ Be(f);
|
|
1340
|
-
if (f === null)
|
|
1341
|
-
throw hr(), bt;
|
|
1342
|
-
Ae(P, d), a = Ue(f);
|
|
1343
|
-
return;
|
|
1344
|
-
}
|
|
1345
|
-
var m = s + "";
|
|
1346
|
-
r ? m = `<svg>${m}</svg>` : o && (m = `<math>${m}</math>`);
|
|
1347
|
-
var v = Zr(m);
|
|
1348
|
-
if ((r || o) && (v = /** @type {Element} */
|
|
1349
|
-
/* @__PURE__ */ ve(v)), Ae(
|
|
1350
|
-
/** @type {TemplateNode} */
|
|
1351
|
-
/* @__PURE__ */ ve(v),
|
|
1352
|
-
/** @type {TemplateNode} */
|
|
1353
|
-
v.lastChild
|
|
1354
|
-
), r || o)
|
|
1355
|
-
for (; /* @__PURE__ */ ve(v); )
|
|
1356
|
-
a.before(
|
|
1357
|
-
/** @type {Node} */
|
|
1358
|
-
/* @__PURE__ */ ve(v)
|
|
1359
|
-
);
|
|
1360
|
-
else
|
|
1361
|
-
a.before(v);
|
|
1362
|
-
}
|
|
1363
|
-
});
|
|
1364
|
-
}
|
|
1365
|
-
function Fa(e, t, r, o, l) {
|
|
1366
|
-
O && Et();
|
|
1367
|
-
var a = t.$$slots?.[r], s = !1;
|
|
1368
|
-
a === !0 && (a = t.children, s = !0), a === void 0 || a(e, s ? () => o : o);
|
|
1369
|
-
}
|
|
1370
|
-
const jn = [...`
|
|
1371
|
-
\r\f \v\uFEFF`];
|
|
1372
|
-
function Ma(e, t, r) {
|
|
1373
|
-
var o = "" + e;
|
|
1374
|
-
if (r) {
|
|
1375
|
-
for (var l in r)
|
|
1376
|
-
if (r[l])
|
|
1377
|
-
o = o ? o + " " + l : l;
|
|
1378
|
-
else if (o.length)
|
|
1379
|
-
for (var a = l.length, s = 0; (s = o.indexOf(l, s)) >= 0; ) {
|
|
1380
|
-
var c = s + a;
|
|
1381
|
-
(s === 0 || jn.includes(o[s - 1])) && (c === o.length || jn.includes(o[c])) ? o = (s === 0 ? "" : o.substring(0, s)) + o.substring(c + 1) : s = c;
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
return o === "" ? null : o;
|
|
1385
|
-
}
|
|
1386
|
-
function Va(e, t, r, o, l, a) {
|
|
1387
|
-
var s = e.__className;
|
|
1388
|
-
if (O || s !== r || s === void 0) {
|
|
1389
|
-
var c = Ma(r, o, a);
|
|
1390
|
-
(!O || c !== e.getAttribute("class")) && (c == null ? e.removeAttribute("class") : e.className = c), e.__className = r;
|
|
1391
|
-
} else if (a && l !== a)
|
|
1392
|
-
for (var f in a) {
|
|
1393
|
-
var d = !!a[f];
|
|
1394
|
-
(l == null || d !== !!l[f]) && e.classList.toggle(f, d);
|
|
1395
|
-
}
|
|
1396
|
-
return a;
|
|
1397
|
-
}
|
|
1398
|
-
const Ua = Symbol("is custom element"), ja = Symbol("is html");
|
|
1399
|
-
function qn(e) {
|
|
1400
|
-
if (O) {
|
|
1401
|
-
var t = !1, r = () => {
|
|
1402
|
-
if (!t) {
|
|
1403
|
-
if (t = !0, e.hasAttribute("value")) {
|
|
1404
|
-
var o = e.value;
|
|
1405
|
-
R(e, "value", null), e.value = o;
|
|
1406
|
-
}
|
|
1407
|
-
if (e.hasAttribute("checked")) {
|
|
1408
|
-
var l = e.checked;
|
|
1409
|
-
R(e, "checked", null), e.checked = l;
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
};
|
|
1413
|
-
e.__on_r = r, _a(r), Do();
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
function qa(e, t) {
|
|
1417
|
-
var r = Fo(e);
|
|
1418
|
-
r.value === (r.value = // treat null and undefined the same for the initial value
|
|
1419
|
-
t ?? void 0) || // @ts-expect-error
|
|
1420
|
-
// `progress` elements always need their value set when it's `0`
|
|
1421
|
-
e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
|
|
1422
|
-
}
|
|
1423
|
-
function R(e, t, r, o) {
|
|
1424
|
-
var l = Fo(e);
|
|
1425
|
-
O && (l[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || l[t] !== (l[t] = r) && (t === "loading" && (e[Ji] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ba(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
1426
|
-
}
|
|
1427
|
-
function Fo(e) {
|
|
1428
|
-
return (
|
|
1429
|
-
/** @type {Record<string | symbol, unknown>} **/
|
|
1430
|
-
// @ts-expect-error
|
|
1431
|
-
e.__attributes ??= {
|
|
1432
|
-
[Ua]: e.nodeName.includes("-"),
|
|
1433
|
-
[ja]: e.namespaceURI === ji
|
|
1434
|
-
}
|
|
1435
|
-
);
|
|
1436
|
-
}
|
|
1437
|
-
var Bn = /* @__PURE__ */ new Map();
|
|
1438
|
-
function Ba(e) {
|
|
1439
|
-
var t = Bn.get(e.nodeName);
|
|
1440
|
-
if (t) return t;
|
|
1441
|
-
Bn.set(e.nodeName, t = []);
|
|
1442
|
-
for (var r, o = e, l = Element.prototype; l !== o; ) {
|
|
1443
|
-
r = Hi(o);
|
|
1444
|
-
for (var a in r)
|
|
1445
|
-
r[a].set && t.push(a);
|
|
1446
|
-
o = Xn(o);
|
|
1447
|
-
}
|
|
1448
|
-
return t;
|
|
1449
|
-
}
|
|
1450
|
-
function Ha(e, t, r = t) {
|
|
1451
|
-
Ta(e, "change", (o) => {
|
|
1452
|
-
var l = o ? e.defaultChecked : e.checked;
|
|
1453
|
-
r(l);
|
|
1454
|
-
}), // If we are hydrating and the value has since changed,
|
|
1455
|
-
// then use the update value from the input instead.
|
|
1456
|
-
(O && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
|
|
1457
|
-
ot(t) == null) && r(e.checked), Hr(() => {
|
|
1458
|
-
var o = t();
|
|
1459
|
-
e.checked = !!o;
|
|
1460
|
-
});
|
|
1461
|
-
}
|
|
1462
|
-
function Hn(e, t) {
|
|
1463
|
-
return e === t || e?.[Ot] === t;
|
|
1464
|
-
}
|
|
1465
|
-
function Qt(e = {}, t, r, o) {
|
|
1466
|
-
return Br(() => {
|
|
1467
|
-
var l, a;
|
|
1468
|
-
return Hr(() => {
|
|
1469
|
-
l = a, a = [], ot(() => {
|
|
1470
|
-
e !== r(...a) && (t(e, ...a), l && Hn(r(...l), e) && t(null, ...l));
|
|
1471
|
-
});
|
|
1472
|
-
}), () => {
|
|
1473
|
-
Gr(() => {
|
|
1474
|
-
a && Hn(r(...a), e) && t(null, ...a);
|
|
1475
|
-
});
|
|
1476
|
-
};
|
|
1477
|
-
}), e;
|
|
1478
|
-
}
|
|
1479
|
-
function Mo(e) {
|
|
1480
|
-
ne === null && Jn(), Dr(() => {
|
|
1481
|
-
const t = ot(e);
|
|
1482
|
-
if (typeof t == "function") return (
|
|
1483
|
-
/** @type {() => void} */
|
|
1484
|
-
t
|
|
1485
|
-
);
|
|
1486
|
-
});
|
|
1487
|
-
}
|
|
1488
|
-
function Ga(e) {
|
|
1489
|
-
ne === null && Jn(), Mo(() => () => ot(e));
|
|
1490
|
-
}
|
|
1491
|
-
function Vo(e, t, r) {
|
|
1492
|
-
if (e == null)
|
|
1493
|
-
return t(void 0), yt;
|
|
1494
|
-
const o = ot(
|
|
1495
|
-
() => e.subscribe(
|
|
1496
|
-
t,
|
|
1497
|
-
// @ts-expect-error
|
|
1498
|
-
r
|
|
1499
|
-
)
|
|
1500
|
-
);
|
|
1501
|
-
return o.unsubscribe ? () => o.unsubscribe() : o;
|
|
1502
|
-
}
|
|
1503
|
-
const mt = [];
|
|
1504
|
-
function Wa(e, t = yt) {
|
|
1505
|
-
let r = null;
|
|
1506
|
-
const o = /* @__PURE__ */ new Set();
|
|
1507
|
-
function l(c) {
|
|
1508
|
-
if (lo(e, c) && (e = c, r)) {
|
|
1509
|
-
const f = !mt.length;
|
|
1510
|
-
for (const d of o)
|
|
1511
|
-
d[1](), mt.push(d, e);
|
|
1512
|
-
if (f) {
|
|
1513
|
-
for (let d = 0; d < mt.length; d += 2)
|
|
1514
|
-
mt[d][0](mt[d + 1]);
|
|
1515
|
-
mt.length = 0;
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
function a(c) {
|
|
1520
|
-
l(c(
|
|
1521
|
-
/** @type {T} */
|
|
1522
|
-
e
|
|
1523
|
-
));
|
|
1524
|
-
}
|
|
1525
|
-
function s(c, f = yt) {
|
|
1526
|
-
const d = [c, f];
|
|
1527
|
-
return o.add(d), o.size === 1 && (r = t(l, a) || yt), c(
|
|
1528
|
-
/** @type {T} */
|
|
1529
|
-
e
|
|
1530
|
-
), () => {
|
|
1531
|
-
o.delete(d), o.size === 0 && r && (r(), r = null);
|
|
1532
|
-
};
|
|
1533
|
-
}
|
|
1534
|
-
return { set: l, update: a, subscribe: s };
|
|
1535
|
-
}
|
|
1536
|
-
function rr(e) {
|
|
1537
|
-
let t;
|
|
1538
|
-
return Vo(e, (r) => t = r)(), t;
|
|
1539
|
-
}
|
|
1540
|
-
let er = !1, Fr = Symbol();
|
|
1541
|
-
function Ya(e, t, r) {
|
|
1542
|
-
const o = r[t] ??= {
|
|
1543
|
-
store: null,
|
|
1544
|
-
source: /* @__PURE__ */ Yr(void 0),
|
|
1545
|
-
unsubscribe: yt
|
|
1546
|
-
};
|
|
1547
|
-
if (o.store !== e && !(Fr in r))
|
|
1548
|
-
if (o.unsubscribe(), o.store = e ?? null, e == null)
|
|
1549
|
-
o.source.v = void 0, o.unsubscribe = yt;
|
|
1550
|
-
else {
|
|
1551
|
-
var l = !0;
|
|
1552
|
-
o.unsubscribe = Vo(e, (a) => {
|
|
1553
|
-
l ? o.source.v = a : b(o.source, a);
|
|
1554
|
-
}), l = !1;
|
|
1555
|
-
}
|
|
1556
|
-
return e && Fr in r ? rr(e) : i(o.source);
|
|
1557
|
-
}
|
|
1558
|
-
function Za() {
|
|
1559
|
-
const e = {};
|
|
1560
|
-
function t() {
|
|
1561
|
-
qr(() => {
|
|
1562
|
-
for (var r in e)
|
|
1563
|
-
e[r].unsubscribe();
|
|
1564
|
-
Mt(e, Fr, {
|
|
1565
|
-
enumerable: !1,
|
|
1566
|
-
value: !0
|
|
1567
|
-
});
|
|
1568
|
-
});
|
|
1569
|
-
}
|
|
1570
|
-
return [e, t];
|
|
1571
|
-
}
|
|
1572
|
-
function za(e) {
|
|
1573
|
-
var t = er;
|
|
1574
|
-
try {
|
|
1575
|
-
return er = !1, [e(), er];
|
|
1576
|
-
} finally {
|
|
1577
|
-
er = t;
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
function Gn(e) {
|
|
1581
|
-
return e.ctx?.d ?? !1;
|
|
1582
|
-
}
|
|
1583
|
-
function x(e, t, r, o) {
|
|
1584
|
-
var l = (r & Pi) !== 0, a = !0, s = (r & Fi) !== 0, c = (r & Mi) !== 0, f = !1, d;
|
|
1585
|
-
s ? [d, f] = za(() => (
|
|
1586
|
-
/** @type {V} */
|
|
1587
|
-
e[t]
|
|
1588
|
-
)) : d = /** @type {V} */
|
|
1589
|
-
e[t];
|
|
1590
|
-
var m = Ot in e || ro in e, v = s && (rt(e, t)?.set ?? (m && t in e && ((j) => e[t] = j))) || void 0, _ = (
|
|
1591
|
-
/** @type {V} */
|
|
1592
|
-
o
|
|
1593
|
-
), w = !0, F = !1, M = () => (F = !0, w && (w = !1, c ? _ = ot(
|
|
1594
|
-
/** @type {() => V} */
|
|
1595
|
-
o
|
|
1596
|
-
) : _ = /** @type {V} */
|
|
1597
|
-
o), _);
|
|
1598
|
-
d === void 0 && o !== void 0 && (v && a && ra(), d = M(), v && v(d));
|
|
1599
|
-
var U;
|
|
1600
|
-
if (U = () => {
|
|
1601
|
-
var j = (
|
|
1602
|
-
/** @type {V} */
|
|
1603
|
-
e[t]
|
|
1604
|
-
);
|
|
1605
|
-
return j === void 0 ? M() : (w = !0, F = !1, j);
|
|
1606
|
-
}, (r & Oi) === 0)
|
|
1607
|
-
return U;
|
|
1608
|
-
if (v) {
|
|
1609
|
-
var I = e.$$legacy;
|
|
1610
|
-
return function(j, se) {
|
|
1611
|
-
return arguments.length > 0 ? ((!se || I || f) && v(se ? U() : j), j) : U();
|
|
1612
|
-
};
|
|
1613
|
-
}
|
|
1614
|
-
var ee = !1, $e = /* @__PURE__ */ Yr(d), X = /* @__PURE__ */ gr(() => {
|
|
1615
|
-
var j = U(), se = i($e);
|
|
1616
|
-
return ee ? (ee = !1, se) : $e.v = j;
|
|
1617
|
-
});
|
|
1618
|
-
return s && i(X), l || (X.equals = jr), function(j, se) {
|
|
1619
|
-
if (arguments.length > 0) {
|
|
1620
|
-
const He = se ? i(X) : s ? Me(j) : j;
|
|
1621
|
-
if (!X.equals(He)) {
|
|
1622
|
-
if (ee = !0, b($e, He), F && _ !== void 0 && (_ = He), Gn(X))
|
|
1623
|
-
return j;
|
|
1624
|
-
ot(() => i(X));
|
|
1625
|
-
}
|
|
1626
|
-
return j;
|
|
1627
|
-
}
|
|
1628
|
-
return Gn(X) ? X.v : i(X);
|
|
1629
|
-
};
|
|
1630
|
-
}
|
|
1631
|
-
function Ja(e) {
|
|
1632
|
-
return new Ka(e);
|
|
1633
|
-
}
|
|
1634
|
-
class Ka {
|
|
1635
|
-
/** @type {any} */
|
|
1636
|
-
#t;
|
|
1637
|
-
/** @type {Record<string, any>} */
|
|
1638
|
-
#e;
|
|
1639
|
-
/**
|
|
1640
|
-
* @param {ComponentConstructorOptions & {
|
|
1641
|
-
* component: any;
|
|
1642
|
-
* }} options
|
|
1643
|
-
*/
|
|
1644
|
-
constructor(t) {
|
|
1645
|
-
var r = /* @__PURE__ */ new Map(), o = (a, s) => {
|
|
1646
|
-
var c = /* @__PURE__ */ Yr(s);
|
|
1647
|
-
return r.set(a, c), c;
|
|
1648
|
-
};
|
|
1649
|
-
const l = new Proxy(
|
|
1650
|
-
{ ...t.props || {}, $$events: {} },
|
|
1651
|
-
{
|
|
1652
|
-
get(a, s) {
|
|
1653
|
-
return i(r.get(s) ?? o(s, Reflect.get(a, s)));
|
|
1654
|
-
},
|
|
1655
|
-
has(a, s) {
|
|
1656
|
-
return s === ro ? !0 : (i(r.get(s) ?? o(s, Reflect.get(a, s))), Reflect.has(a, s));
|
|
1657
|
-
},
|
|
1658
|
-
set(a, s, c) {
|
|
1659
|
-
return b(r.get(s) ?? o(s, c), c), Reflect.set(a, s, c);
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
);
|
|
1663
|
-
this.#e = (t.hydrate ? Pa : Po)(t.component, {
|
|
1664
|
-
target: t.target,
|
|
1665
|
-
anchor: t.anchor,
|
|
1666
|
-
props: l,
|
|
1667
|
-
context: t.context,
|
|
1668
|
-
intro: t.intro ?? !1,
|
|
1669
|
-
recover: t.recover
|
|
1670
|
-
}), (!t?.props?.$$host || t.sync === !1) && E(), this.#t = l.$$events;
|
|
1671
|
-
for (const a of Object.keys(this.#e))
|
|
1672
|
-
a === "$set" || a === "$destroy" || a === "$on" || Mt(this, a, {
|
|
1673
|
-
get() {
|
|
1674
|
-
return this.#e[a];
|
|
1675
|
-
},
|
|
1676
|
-
/** @param {any} value */
|
|
1677
|
-
set(s) {
|
|
1678
|
-
this.#e[a] = s;
|
|
1679
|
-
},
|
|
1680
|
-
enumerable: !0
|
|
1681
|
-
});
|
|
1682
|
-
this.#e.$set = /** @param {Record<string, any>} next */
|
|
1683
|
-
(a) => {
|
|
1684
|
-
Object.assign(l, a);
|
|
1685
|
-
}, this.#e.$destroy = () => {
|
|
1686
|
-
Oa(this.#e);
|
|
1687
|
-
};
|
|
1688
|
-
}
|
|
1689
|
-
/** @param {Record<string, any>} props */
|
|
1690
|
-
$set(t) {
|
|
1691
|
-
this.#e.$set(t);
|
|
1692
|
-
}
|
|
1693
|
-
/**
|
|
1694
|
-
* @param {string} event
|
|
1695
|
-
* @param {(...args: any[]) => any} callback
|
|
1696
|
-
* @returns {any}
|
|
1697
|
-
*/
|
|
1698
|
-
$on(t, r) {
|
|
1699
|
-
this.#t[t] = this.#t[t] || [];
|
|
1700
|
-
const o = (...l) => r.call(this, ...l);
|
|
1701
|
-
return this.#t[t].push(o), () => {
|
|
1702
|
-
this.#t[t] = this.#t[t].filter(
|
|
1703
|
-
/** @param {any} fn */
|
|
1704
|
-
(l) => l !== o
|
|
1705
|
-
);
|
|
1706
|
-
};
|
|
1707
|
-
}
|
|
1708
|
-
$destroy() {
|
|
1709
|
-
this.#e.$destroy();
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
let Uo;
|
|
1713
|
-
typeof HTMLElement == "function" && (Uo = class extends HTMLElement {
|
|
1714
|
-
/** The Svelte component constructor */
|
|
1715
|
-
$$ctor;
|
|
1716
|
-
/** Slots */
|
|
1717
|
-
$$s;
|
|
1718
|
-
/** @type {any} The Svelte component instance */
|
|
1719
|
-
$$c;
|
|
1720
|
-
/** Whether or not the custom element is connected */
|
|
1721
|
-
$$cn = !1;
|
|
1722
|
-
/** @type {Record<string, any>} Component props data */
|
|
1723
|
-
$$d = {};
|
|
1724
|
-
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1725
|
-
$$r = !1;
|
|
1726
|
-
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1727
|
-
$$p_d = {};
|
|
1728
|
-
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1729
|
-
$$l = {};
|
|
1730
|
-
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1731
|
-
$$l_u = /* @__PURE__ */ new Map();
|
|
1732
|
-
/** @type {any} The managed render effect for reflecting attributes */
|
|
1733
|
-
$$me;
|
|
1734
|
-
/**
|
|
1735
|
-
* @param {*} $$componentCtor
|
|
1736
|
-
* @param {*} $$slots
|
|
1737
|
-
* @param {*} use_shadow_dom
|
|
1738
|
-
*/
|
|
1739
|
-
constructor(e, t, r) {
|
|
1740
|
-
super(), this.$$ctor = e, this.$$s = t, r && this.attachShadow({ mode: "open" });
|
|
1741
|
-
}
|
|
1742
|
-
/**
|
|
1743
|
-
* @param {string} type
|
|
1744
|
-
* @param {EventListenerOrEventListenerObject} listener
|
|
1745
|
-
* @param {boolean | AddEventListenerOptions} [options]
|
|
1746
|
-
*/
|
|
1747
|
-
addEventListener(e, t, r) {
|
|
1748
|
-
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
1749
|
-
const o = this.$$c.$on(e, t);
|
|
1750
|
-
this.$$l_u.set(t, o);
|
|
1751
|
-
}
|
|
1752
|
-
super.addEventListener(e, t, r);
|
|
1753
|
-
}
|
|
1754
|
-
/**
|
|
1755
|
-
* @param {string} type
|
|
1756
|
-
* @param {EventListenerOrEventListenerObject} listener
|
|
1757
|
-
* @param {boolean | AddEventListenerOptions} [options]
|
|
1758
|
-
*/
|
|
1759
|
-
removeEventListener(e, t, r) {
|
|
1760
|
-
if (super.removeEventListener(e, t, r), this.$$c) {
|
|
1761
|
-
const o = this.$$l_u.get(t);
|
|
1762
|
-
o && (o(), this.$$l_u.delete(t));
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
async connectedCallback() {
|
|
1766
|
-
if (this.$$cn = !0, !this.$$c) {
|
|
1767
|
-
let e = function(o) {
|
|
1768
|
-
return (l) => {
|
|
1769
|
-
const a = document.createElement("slot");
|
|
1770
|
-
o !== "default" && (a.name = o), B(l, a);
|
|
1771
|
-
};
|
|
1772
|
-
};
|
|
1773
|
-
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1774
|
-
return;
|
|
1775
|
-
const t = {}, r = Xa(this);
|
|
1776
|
-
for (const o of this.$$s)
|
|
1777
|
-
o in r && (o === "default" && !this.$$d.children ? (this.$$d.children = e(o), t.default = !0) : t[o] = e(o));
|
|
1778
|
-
for (const o of this.attributes) {
|
|
1779
|
-
const l = this.$$g_p(o.name);
|
|
1780
|
-
l in this.$$d || (this.$$d[l] = nr(l, o.value, this.$$p_d, "toProp"));
|
|
1781
|
-
}
|
|
1782
|
-
for (const o in this.$$p_d)
|
|
1783
|
-
!(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
|
|
1784
|
-
this.$$c = Ja({
|
|
1785
|
-
component: this.$$ctor,
|
|
1786
|
-
target: this.shadowRoot || this,
|
|
1787
|
-
props: {
|
|
1788
|
-
...this.$$d,
|
|
1789
|
-
$$slots: t,
|
|
1790
|
-
$$host: this
|
|
1791
|
-
}
|
|
1792
|
-
}), this.$$me = ha(() => {
|
|
1793
|
-
Hr(() => {
|
|
1794
|
-
this.$$r = !0;
|
|
1795
|
-
for (const o of or(this.$$c)) {
|
|
1796
|
-
if (!this.$$p_d[o]?.reflect) continue;
|
|
1797
|
-
this.$$d[o] = this.$$c[o];
|
|
1798
|
-
const l = nr(
|
|
1799
|
-
o,
|
|
1800
|
-
this.$$d[o],
|
|
1801
|
-
this.$$p_d,
|
|
1802
|
-
"toAttribute"
|
|
1803
|
-
);
|
|
1804
|
-
l == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, l);
|
|
1805
|
-
}
|
|
1806
|
-
this.$$r = !1;
|
|
1807
|
-
});
|
|
1808
|
-
});
|
|
1809
|
-
for (const o in this.$$l)
|
|
1810
|
-
for (const l of this.$$l[o]) {
|
|
1811
|
-
const a = this.$$c.$on(o, l);
|
|
1812
|
-
this.$$l_u.set(l, a);
|
|
1813
|
-
}
|
|
1814
|
-
this.$$l = {};
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
1818
|
-
// and setting attributes through setAttribute etc, this is helpful
|
|
1819
|
-
/**
|
|
1820
|
-
* @param {string} attr
|
|
1821
|
-
* @param {string} _oldValue
|
|
1822
|
-
* @param {string} newValue
|
|
1823
|
-
*/
|
|
1824
|
-
attributeChangedCallback(e, t, r) {
|
|
1825
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] = nr(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
1826
|
-
}
|
|
1827
|
-
disconnectedCallback() {
|
|
1828
|
-
this.$$cn = !1, Promise.resolve().then(() => {
|
|
1829
|
-
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
1830
|
-
});
|
|
1831
|
-
}
|
|
1832
|
-
/**
|
|
1833
|
-
* @param {string} attribute_name
|
|
1834
|
-
*/
|
|
1835
|
-
$$g_p(e) {
|
|
1836
|
-
return or(this.$$p_d).find(
|
|
1837
|
-
(t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
|
|
1838
|
-
) || e;
|
|
1839
|
-
}
|
|
1840
|
-
});
|
|
1841
|
-
function nr(e, t, r, o) {
|
|
1842
|
-
const l = r[e]?.type;
|
|
1843
|
-
if (t = l === "Boolean" && typeof t != "boolean" ? t != null : t, !o || !r[e])
|
|
1844
|
-
return t;
|
|
1845
|
-
if (o === "toAttribute")
|
|
1846
|
-
switch (l) {
|
|
1847
|
-
case "Object":
|
|
1848
|
-
case "Array":
|
|
1849
|
-
return t == null ? null : JSON.stringify(t);
|
|
1850
|
-
case "Boolean":
|
|
1851
|
-
return t ? "" : null;
|
|
1852
|
-
case "Number":
|
|
1853
|
-
return t ?? null;
|
|
1854
|
-
default:
|
|
1855
|
-
return t;
|
|
1856
|
-
}
|
|
1857
|
-
else
|
|
1858
|
-
switch (l) {
|
|
1859
|
-
case "Object":
|
|
1860
|
-
case "Array":
|
|
1861
|
-
return t && JSON.parse(t);
|
|
1862
|
-
case "Boolean":
|
|
1863
|
-
return t;
|
|
1864
|
-
// conversion already handled above
|
|
1865
|
-
case "Number":
|
|
1866
|
-
return t != null ? +t : t;
|
|
1867
|
-
default:
|
|
1868
|
-
return t;
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
function Xa(e) {
|
|
1872
|
-
const t = {};
|
|
1873
|
-
return e.childNodes.forEach((r) => {
|
|
1874
|
-
t[
|
|
1875
|
-
/** @type {Element} node */
|
|
1876
|
-
r.slot || "default"
|
|
1877
|
-
] = !0;
|
|
1878
|
-
}), t;
|
|
1879
|
-
}
|
|
1880
|
-
function Qa(e, t, r, o, l, a) {
|
|
1881
|
-
let s = class extends Uo {
|
|
1882
|
-
constructor() {
|
|
1883
|
-
super(e, r, l), this.$$p_d = t;
|
|
1884
|
-
}
|
|
1885
|
-
static get observedAttributes() {
|
|
1886
|
-
return or(t).map(
|
|
1887
|
-
(c) => (t[c].attribute || c).toLowerCase()
|
|
1888
|
-
);
|
|
1889
|
-
}
|
|
1890
|
-
};
|
|
1891
|
-
return or(t).forEach((c) => {
|
|
1892
|
-
Mt(s.prototype, c, {
|
|
1893
|
-
get() {
|
|
1894
|
-
return this.$$c && c in this.$$c ? this.$$c[c] : this.$$d[c];
|
|
1895
|
-
},
|
|
1896
|
-
set(f) {
|
|
1897
|
-
f = nr(c, f, t), this.$$d[c] = f;
|
|
1898
|
-
var d = this.$$c;
|
|
1899
|
-
if (d) {
|
|
1900
|
-
var m = rt(d, c)?.get;
|
|
1901
|
-
m ? d[c] = f : d.$set({ [c]: f });
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
});
|
|
1905
|
-
}), o.forEach((c) => {
|
|
1906
|
-
Mt(s.prototype, c, {
|
|
1907
|
-
get() {
|
|
1908
|
-
return this.$$c?.[c];
|
|
1909
|
-
}
|
|
1910
|
-
});
|
|
1911
|
-
}), e.element = /** @type {any} */
|
|
1912
|
-
s, s;
|
|
1913
|
-
}
|
|
1914
|
-
const jo = new TextEncoder();
|
|
1915
|
-
function el(e) {
|
|
1916
|
-
return [...new Uint8Array(e)].map((t) => t.toString(16).padStart(2, "0")).join("");
|
|
1917
|
-
}
|
|
1918
|
-
async function tl(e, t = "SHA-256", r = 1e5) {
|
|
1919
|
-
const o = Date.now().toString(16);
|
|
1920
|
-
e || (e = Math.round(Math.random() * r));
|
|
1921
|
-
const l = await qo(o, e, t);
|
|
1922
|
-
return {
|
|
1923
|
-
algorithm: t,
|
|
1924
|
-
challenge: l,
|
|
1925
|
-
salt: o,
|
|
1926
|
-
signature: ""
|
|
1927
|
-
};
|
|
1928
|
-
}
|
|
1929
|
-
async function qo(e, t, r) {
|
|
1930
|
-
if (typeof crypto > "u" || !("subtle" in crypto) || !("digest" in crypto.subtle))
|
|
1931
|
-
throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");
|
|
1932
|
-
return el(
|
|
1933
|
-
await crypto.subtle.digest(
|
|
1934
|
-
r.toUpperCase(),
|
|
1935
|
-
jo.encode(e + t)
|
|
1936
|
-
)
|
|
1937
|
-
);
|
|
1938
|
-
}
|
|
1939
|
-
function rl(e, t, r = "SHA-256", o = 1e6, l = 0) {
|
|
1940
|
-
const a = new AbortController(), s = Date.now();
|
|
1941
|
-
return {
|
|
1942
|
-
promise: (async () => {
|
|
1943
|
-
for (let f = l; f <= o; f += 1) {
|
|
1944
|
-
if (a.signal.aborted)
|
|
1945
|
-
return null;
|
|
1946
|
-
if (await qo(t, f, r) === e)
|
|
1947
|
-
return {
|
|
1948
|
-
number: f,
|
|
1949
|
-
took: Date.now() - s
|
|
1950
|
-
};
|
|
1951
|
-
}
|
|
1952
|
-
return null;
|
|
1953
|
-
})(),
|
|
1954
|
-
controller: a
|
|
1955
|
-
};
|
|
1956
|
-
}
|
|
1957
|
-
function Wn() {
|
|
1958
|
-
try {
|
|
1959
|
-
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1960
|
-
} catch {
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
function nl(e) {
|
|
1964
|
-
const t = atob(e), r = new Uint8Array(t.length);
|
|
1965
|
-
for (let o = 0; o < t.length; o++)
|
|
1966
|
-
r[o] = t.charCodeAt(o);
|
|
1967
|
-
return r;
|
|
1968
|
-
}
|
|
1969
|
-
function ol(e, t = 12) {
|
|
1970
|
-
const r = new Uint8Array(t);
|
|
1971
|
-
for (let o = 0; o < t; o++)
|
|
1972
|
-
r[o] = e % 256, e = Math.floor(e / 256);
|
|
1973
|
-
return r;
|
|
1974
|
-
}
|
|
1975
|
-
async function il(e, t = "", r = 1e6, o = 0) {
|
|
1976
|
-
const l = "AES-GCM", a = new AbortController(), s = Date.now(), c = async () => {
|
|
1977
|
-
for (let m = o; m <= r; m += 1) {
|
|
1978
|
-
if (a.signal.aborted || !f || !d)
|
|
1979
|
-
return null;
|
|
1980
|
-
try {
|
|
1981
|
-
const v = await crypto.subtle.decrypt(
|
|
1982
|
-
{
|
|
1983
|
-
name: l,
|
|
1984
|
-
iv: ol(m)
|
|
1985
|
-
},
|
|
1986
|
-
f,
|
|
1987
|
-
d
|
|
1988
|
-
);
|
|
1989
|
-
if (v)
|
|
1990
|
-
return {
|
|
1991
|
-
clearText: new TextDecoder().decode(v),
|
|
1992
|
-
took: Date.now() - s
|
|
1993
|
-
};
|
|
1994
|
-
} catch {
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
return null;
|
|
1998
|
-
};
|
|
1999
|
-
let f = null, d = null;
|
|
2000
|
-
try {
|
|
2001
|
-
d = nl(e);
|
|
2002
|
-
const m = await crypto.subtle.digest(
|
|
2003
|
-
"SHA-256",
|
|
2004
|
-
jo.encode(t)
|
|
2005
|
-
);
|
|
2006
|
-
f = await crypto.subtle.importKey(
|
|
2007
|
-
"raw",
|
|
2008
|
-
m,
|
|
2009
|
-
l,
|
|
2010
|
-
!1,
|
|
2011
|
-
["decrypt"]
|
|
2012
|
-
);
|
|
2013
|
-
} catch {
|
|
2014
|
-
return {
|
|
2015
|
-
promise: Promise.reject(),
|
|
2016
|
-
controller: a
|
|
2017
|
-
};
|
|
2018
|
-
}
|
|
2019
|
-
return {
|
|
2020
|
-
promise: c(),
|
|
2021
|
-
controller: a
|
|
2022
|
-
};
|
|
2023
|
-
}
|
|
2024
|
-
var y = /* @__PURE__ */ ((e) => (e.CODE = "code", e.ERROR = "error", e.VERIFIED = "verified", e.VERIFYING = "verifying", e.UNVERIFIED = "unverified", e.EXPIRED = "expired", e))(y || {}), Q = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.READY = "ready", e))(Q || {});
|
|
2025
|
-
globalThis.altchaPlugins = globalThis.altchaPlugins || [];
|
|
2026
|
-
globalThis.altchaI18n = globalThis.altchaI18n || {
|
|
2027
|
-
get: (e) => rr(globalThis.altchaI18n.store)[e],
|
|
2028
|
-
set: (e, t) => {
|
|
2029
|
-
Object.assign(rr(globalThis.altchaI18n.store), {
|
|
2030
|
-
[e]: t
|
|
2031
|
-
}), globalThis.altchaI18n.store.set(rr(globalThis.altchaI18n.store));
|
|
2032
|
-
},
|
|
2033
|
-
store: Wa({})
|
|
2034
|
-
};
|
|
2035
|
-
const al = {
|
|
2036
|
-
ariaLinkLabel: "Visit Altcha.org",
|
|
2037
|
-
enterCode: "Enter code",
|
|
2038
|
-
enterCodeAria: "Enter code you hear. Press Space to play audio.",
|
|
2039
|
-
error: "Verification failed. Try again later.",
|
|
2040
|
-
expired: "Verification expired. Try again.",
|
|
2041
|
-
footer: 'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',
|
|
2042
|
-
getAudioChallenge: "Get an audio challenge",
|
|
2043
|
-
label: "I'm not a robot",
|
|
2044
|
-
loading: "Loading...",
|
|
2045
|
-
reload: "Reload",
|
|
2046
|
-
verify: "Verify",
|
|
2047
|
-
verificationRequired: "Verification required!",
|
|
2048
|
-
verified: "Verified",
|
|
2049
|
-
verifying: "Verifying...",
|
|
2050
|
-
waitAlert: "Verifying... please wait."
|
|
2051
|
-
};
|
|
2052
|
-
globalThis.altchaI18n.set("en", al);
|
|
2053
|
-
const $r = (e, t) => {
|
|
2054
|
-
let r = /* @__PURE__ */ ua(() => Yi(t?.(), 24));
|
|
2055
|
-
var o = cl();
|
|
2056
|
-
Ce(() => {
|
|
2057
|
-
R(o, "width", i(r)), R(o, "height", i(r));
|
|
2058
|
-
}), B(e, o);
|
|
2059
|
-
};
|
|
2060
|
-
function ll(e, t) {
|
|
2061
|
-
e.code === "Space" && (e.preventDefault(), e.stopImmediatePropagation(), t());
|
|
2062
|
-
}
|
|
2063
|
-
function sl(e, t) {
|
|
2064
|
-
e.preventDefault(), t();
|
|
2065
|
-
}
|
|
2066
|
-
function ul(e, t, r, o, l, a, s, c) {
|
|
2067
|
-
[
|
|
2068
|
-
y.UNVERIFIED,
|
|
2069
|
-
y.ERROR,
|
|
2070
|
-
y.EXPIRED,
|
|
2071
|
-
y.CODE
|
|
2072
|
-
].includes(i(t)) ? r() !== !1 && i(o)?.reportValidity() === !1 ? b(l, !1) : a() ? s() : c() : b(l, !0);
|
|
2073
|
-
}
|
|
2074
|
-
var cl = /* @__PURE__ */ _r('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'), fl = /* @__PURE__ */ be('<input type="hidden">'), dl = /* @__PURE__ */ be('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'), hl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'), vl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'), gl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'), pl = /* @__PURE__ */ be('<button type="button" class="altcha-code-challenge-audio"><!></button>'), ml = /* @__PURE__ */ be("<audio hidden autoplay><source></audio>"), _l = /* @__PURE__ */ be('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'), bl = /* @__PURE__ */ be("<div><!></div>"), yl = /* @__PURE__ */ be("<div><!></div>"), wl = /* @__PURE__ */ be('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'), El = /* @__PURE__ */ be('<div class="altcha-footer"><div><!></div></div>'), xl = /* @__PURE__ */ be('<div class="altcha-anchor-arrow"></div>'), Cl = /* @__PURE__ */ be('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>', 1);
|
|
2075
|
-
function kl(e, t) {
|
|
2076
|
-
$o(t, !0);
|
|
2077
|
-
const [r, o] = Za(), l = () => Ya(Wo, "$altchaI18nStore", r);
|
|
2078
|
-
let a = x(t, "auto", 7, void 0), s = x(t, "blockspam", 7, void 0), c = x(t, "challengeurl", 7, void 0), f = x(t, "challengejson", 7, void 0), d = x(t, "credentials", 7, void 0), m = x(t, "customfetch", 7, void 0), v = x(t, "debug", 7, !1), _ = x(t, "delay", 7, 0), w = x(t, "disableautofocus", 7, !1), F = x(t, "refetchonexpire", 7, !0), M = x(t, "disablerefetchonexpire", 23, () => !F()), U = x(t, "expire", 7, void 0), I = x(t, "floating", 7, void 0), ee = x(t, "floatinganchor", 7, void 0), $e = x(t, "floatingoffset", 7, void 0), X = x(t, "floatingpersist", 7, !1), j = x(t, "hidefooter", 7, !1), se = x(t, "hidelogo", 7, !1), He = x(t, "id", 7, void 0), Ht = x(t, "language", 7, void 0), Ge = x(t, "name", 7, "altcha"), We = x(t, "maxnumber", 7, 1e6), xt = x(t, "mockerror", 7, !1), Ne = x(t, "obfuscated", 7, void 0), ge = x(t, "overlay", 7, void 0), Ct = x(t, "overlaycontent", 7, void 0), Gt = x(t, "plugins", 7, void 0), Ye = x(t, "sentinel", 7, void 0), ye = x(t, "spamfilter", 7, !1), st = x(t, "strings", 7, void 0), de = x(t, "test", 7, !1), te = x(t, "verifyurl", 7, void 0), ut = x(t, "workers", 23, () => Math.min(16, navigator.hardwareConcurrency || 8)), kt = x(t, "workerurl", 7, void 0);
|
|
2079
|
-
const { altchaI18n: Go } = globalThis, Wo = Go.store, zr = ["SHA-256", "SHA-384", "SHA-512"], Yo = "https://altcha.org/", Le = (n, u) => {
|
|
2080
|
-
t.$$host.dispatchEvent(new CustomEvent(n, { detail: u }));
|
|
2081
|
-
}, Jr = document.documentElement.lang?.split("-")?.[0], br = /* @__PURE__ */ Lt(() => c() && new URL(c(), location.origin).host.endsWith(".altcha.org") && !!c()?.includes("apiKey=ckey_")), Wt = /* @__PURE__ */ Lt(() => f() ? fn(f()) : void 0), Zo = /* @__PURE__ */ Lt(() => st() ? fn(st()) : {}), L = /* @__PURE__ */ Lt(() => ({
|
|
2082
|
-
...Qr(l()),
|
|
2083
|
-
...i(Zo)
|
|
2084
|
-
})), Kr = /* @__PURE__ */ Lt(() => `${He() || Ge()}_checkbox_${Math.round(Math.random() * 1e8)}`);
|
|
2085
|
-
let Ze = /* @__PURE__ */ N(null), At = /* @__PURE__ */ N(!1), G = /* @__PURE__ */ N(null), k = /* @__PURE__ */ N(Me(y.UNVERIFIED)), V = /* @__PURE__ */ N(void 0), It = /* @__PURE__ */ N(null), Pe = /* @__PURE__ */ N(null), ue = /* @__PURE__ */ N(null), yr = /* @__PURE__ */ N(null), ct = /* @__PURE__ */ N(null), T = /* @__PURE__ */ N(null), Rt = /* @__PURE__ */ N(null), ze = /* @__PURE__ */ N(null), we = null, W = /* @__PURE__ */ N(null), Je = /* @__PURE__ */ N(!1), Oe = [], wr = /* @__PURE__ */ N(!1), Ee = /* @__PURE__ */ N(null);
|
|
2086
|
-
Dr(() => {
|
|
2087
|
-
li(i(ze));
|
|
2088
|
-
}), Dr(() => {
|
|
2089
|
-
si(i(k));
|
|
2090
|
-
}), Ga(() => {
|
|
2091
|
-
zo(), b(Rt, null), i(T) && (i(T).removeEventListener("submit", an), i(T).removeEventListener("reset", ln), i(T).removeEventListener("focusin", on), b(T, null)), we && (clearTimeout(we), we = null), document.removeEventListener("click", rn), document.removeEventListener("scroll", nn), window.removeEventListener("resize", cn);
|
|
2092
|
-
}), Mo(() => {
|
|
2093
|
-
A("mounted", "2.2.4"), A("workers", ut()), Qo(), A("plugins", Oe.length ? Oe.map((n) => n.constructor.pluginName).join(", ") : "none"), de() && A("using test mode"), U() && xr(U()), a() !== void 0 && A("auto", a()), I() !== void 0 && gn(I()), b(T, i(V)?.closest("form"), !0), i(T) && (i(T).addEventListener("submit", an, { capture: !0 }), i(T).addEventListener("reset", ln), (a() === "onfocus" || X() === "focus") && i(T).addEventListener("focusin", on)), ge() && pn(!0), a() === "onload" && (Ne() ? $t() : Se()), i(br) && (j() || se()) && A("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
|
|
2094
|
-
Le("load");
|
|
2095
|
-
});
|
|
2096
|
-
});
|
|
2097
|
-
function Yt(n, u) {
|
|
2098
|
-
return btoa(JSON.stringify({
|
|
2099
|
-
algorithm: n.algorithm,
|
|
2100
|
-
challenge: n.challenge,
|
|
2101
|
-
number: u.number,
|
|
2102
|
-
salt: n.salt,
|
|
2103
|
-
signature: n.signature,
|
|
2104
|
-
test: de() ? !0 : void 0,
|
|
2105
|
-
took: u.took
|
|
2106
|
-
}));
|
|
2107
|
-
}
|
|
2108
|
-
function zo() {
|
|
2109
|
-
for (const n of Oe)
|
|
2110
|
-
n.destroy();
|
|
2111
|
-
}
|
|
2112
|
-
function Xr() {
|
|
2113
|
-
c() && !M() && i(k) === y.VERIFIED ? Se() : Ke(y.EXPIRED, i(L).expired);
|
|
2114
|
-
}
|
|
2115
|
-
async function Jo() {
|
|
2116
|
-
if (xt())
|
|
2117
|
-
throw A("mocking error"), new Error("Mocked error.");
|
|
2118
|
-
if (i(Wt))
|
|
2119
|
-
return A("using provided json data"), dn(i(Wt).salt), i(Wt);
|
|
2120
|
-
if (de())
|
|
2121
|
-
return A("generating test challenge", { test: de() }), tl(typeof de() != "boolean" ? +de() : void 0);
|
|
2122
|
-
{
|
|
2123
|
-
if (!c() && i(T)) {
|
|
2124
|
-
const g = i(T).getAttribute("action");
|
|
2125
|
-
g?.includes("/form/") && c(g + "/altcha");
|
|
2126
|
-
}
|
|
2127
|
-
if (!c())
|
|
2128
|
-
throw new Error("Attribute challengeurl not set.");
|
|
2129
|
-
A("fetching challenge from", c());
|
|
2130
|
-
const n = {
|
|
2131
|
-
credentials: typeof d() == "boolean" ? "include" : d(),
|
|
2132
|
-
headers: ye() !== !1 ? { "x-altcha-spam-filter": "1" } : {}
|
|
2133
|
-
}, u = await Er()(c(), n);
|
|
2134
|
-
if (!u || !(u instanceof Response))
|
|
2135
|
-
throw new Error("Custom fetch function did not return a response.");
|
|
2136
|
-
if (u.status !== 200)
|
|
2137
|
-
throw new Error(`Server responded with ${u.status}.`);
|
|
2138
|
-
const h = u.headers.get("X-Altcha-Config"), p = await u.json();
|
|
2139
|
-
if (dn(p.salt), h)
|
|
2140
|
-
try {
|
|
2141
|
-
const g = JSON.parse(h);
|
|
2142
|
-
g && typeof g == "object" && (g.verifyurl && !g.verifyurl.startsWith("fn:") && (g.verifyurl = tn(g.verifyurl)), bn(g));
|
|
2143
|
-
} catch (g) {
|
|
2144
|
-
A("unable to configure from X-Altcha-Config", g);
|
|
2145
|
-
}
|
|
2146
|
-
return p;
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
function Ko(n) {
|
|
2150
|
-
const u = i(T)?.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
2151
|
-
return u?.value?.slice(u.value.indexOf("@")) || void 0;
|
|
2152
|
-
}
|
|
2153
|
-
function Er() {
|
|
2154
|
-
let n = fetch;
|
|
2155
|
-
if (m())
|
|
2156
|
-
if (A("using customfetch"), typeof m() == "string") {
|
|
2157
|
-
if (n = globalThis[m()] || null, !n)
|
|
2158
|
-
throw new Error(`Custom fetch function not found: ${m()}`);
|
|
2159
|
-
} else
|
|
2160
|
-
n = m();
|
|
2161
|
-
return n;
|
|
2162
|
-
}
|
|
2163
|
-
function Qr(n, u = [
|
|
2164
|
-
Ht() || "",
|
|
2165
|
-
document.documentElement.lang || "",
|
|
2166
|
-
...navigator.languages
|
|
2167
|
-
]) {
|
|
2168
|
-
const h = Object.keys(n).map((g) => g.toLowerCase()), p = u.reduce(
|
|
2169
|
-
(g, C) => (C = C.toLowerCase(), g || (n[C] ? C : null) || h.find((D) => C.split("-")[0] === D.split("-")[0]) || null),
|
|
2170
|
-
null
|
|
2171
|
-
);
|
|
2172
|
-
return n[p || "en"];
|
|
2173
|
-
}
|
|
2174
|
-
function Xo() {
|
|
2175
|
-
return ye() === "ipAddress" ? {
|
|
2176
|
-
blockedCountries: void 0,
|
|
2177
|
-
classifier: void 0,
|
|
2178
|
-
disableRules: void 0,
|
|
2179
|
-
email: !1,
|
|
2180
|
-
expectedCountries: void 0,
|
|
2181
|
-
expectedLanguages: void 0,
|
|
2182
|
-
fields: !1,
|
|
2183
|
-
ipAddress: void 0,
|
|
2184
|
-
text: void 0,
|
|
2185
|
-
timeZone: void 0
|
|
2186
|
-
} : typeof ye() == "object" ? ye() : {
|
|
2187
|
-
blockedCountries: void 0,
|
|
2188
|
-
classifier: void 0,
|
|
2189
|
-
disableRules: void 0,
|
|
2190
|
-
email: void 0,
|
|
2191
|
-
expectedCountries: void 0,
|
|
2192
|
-
expectedLanguages: void 0,
|
|
2193
|
-
fields: void 0,
|
|
2194
|
-
ipAddress: void 0,
|
|
2195
|
-
text: void 0,
|
|
2196
|
-
timeZone: void 0
|
|
2197
|
-
};
|
|
2198
|
-
}
|
|
2199
|
-
function en(n) {
|
|
2200
|
-
return [
|
|
2201
|
-
...i(T)?.querySelectorAll(n?.length ? n.map((h) => `input[name="${h}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])') || []
|
|
2202
|
-
].reduce(
|
|
2203
|
-
(h, p) => {
|
|
2204
|
-
const g = p.name, C = p.value;
|
|
2205
|
-
return g && C && (h[g] = /\n/.test(C) ? C.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
2206
|
-
`) : C), h;
|
|
2207
|
-
},
|
|
2208
|
-
{}
|
|
2209
|
-
);
|
|
2210
|
-
}
|
|
2211
|
-
function tn(n, u) {
|
|
2212
|
-
const h = new URL(c() || location.origin), p = new URL(n, h);
|
|
2213
|
-
if (p.search || (p.search = h.search), u)
|
|
2214
|
-
for (const g in u)
|
|
2215
|
-
u[g] !== void 0 && u[g] !== null && p.searchParams.set(g, u[g]);
|
|
2216
|
-
return p.toString();
|
|
2217
|
-
}
|
|
2218
|
-
function Qo() {
|
|
2219
|
-
const n = Gt() !== void 0 ? Gt().split(",") : void 0;
|
|
2220
|
-
for (const u of globalThis.altchaPlugins)
|
|
2221
|
-
(!n || n.includes(u.pluginName)) && Oe.push(new u({
|
|
2222
|
-
el: i(V),
|
|
2223
|
-
clarify: $t,
|
|
2224
|
-
dispatch: Le,
|
|
2225
|
-
getConfiguration: yn,
|
|
2226
|
-
getFloatingAnchor: wn,
|
|
2227
|
-
getState: En,
|
|
2228
|
-
log: A,
|
|
2229
|
-
reset: Ke,
|
|
2230
|
-
solve: _n,
|
|
2231
|
-
setState: xe,
|
|
2232
|
-
setFloatingAnchor: xn,
|
|
2233
|
-
verify: Se
|
|
2234
|
-
}));
|
|
2235
|
-
}
|
|
2236
|
-
function A(...n) {
|
|
2237
|
-
(v() || n.some((u) => u instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Ge()}]`, ...n);
|
|
2238
|
-
}
|
|
2239
|
-
function ei() {
|
|
2240
|
-
b(W, Q.PAUSED, !0);
|
|
2241
|
-
}
|
|
2242
|
-
function ti(n) {
|
|
2243
|
-
b(W, Q.ERROR, !0);
|
|
2244
|
-
}
|
|
2245
|
-
function ri() {
|
|
2246
|
-
b(W, Q.READY, !0);
|
|
2247
|
-
}
|
|
2248
|
-
function ni() {
|
|
2249
|
-
b(W, Q.LOADING, !0);
|
|
2250
|
-
}
|
|
2251
|
-
function oi() {
|
|
2252
|
-
b(W, Q.PLAYING, !0);
|
|
2253
|
-
}
|
|
2254
|
-
function ii() {
|
|
2255
|
-
b(W, Q.PAUSED, !0);
|
|
2256
|
-
}
|
|
2257
|
-
function ai(n) {
|
|
2258
|
-
if (n.preventDefault(), n.stopPropagation(), i(G)) {
|
|
2259
|
-
const u = new FormData(n.target), h = String(u.get("code"));
|
|
2260
|
-
if (te()?.startsWith("fn:")) {
|
|
2261
|
-
const p = te().replace(/^fn:/, "");
|
|
2262
|
-
if (A(`calling ${p} function instead of verifyurl`), !(p in globalThis))
|
|
2263
|
-
throw new Error(`Global function "${p}" is undefined.`);
|
|
2264
|
-
return globalThis[p]({
|
|
2265
|
-
challenge: i(G).challenge,
|
|
2266
|
-
code: h,
|
|
2267
|
-
solution: i(G).solution
|
|
2268
|
-
});
|
|
2269
|
-
}
|
|
2270
|
-
b(Je, !0), hn(Yt(i(G).challenge, i(G).solution), h).then(({ reason: p, verified: g }) => {
|
|
2271
|
-
g ? (b(G, null), xe(y.VERIFIED), A("verified"), Rr().then(() => {
|
|
2272
|
-
i(yr)?.focus(), Le("verified", { payload: i(Ee) }), a() === "onsubmit" ? vn(i(Rt)) : ge() && St();
|
|
2273
|
-
})) : (Ke(), b(ze, p || "Verification failed", !0));
|
|
2274
|
-
}).catch((p) => {
|
|
2275
|
-
b(G, null), xe(y.ERROR, p), A("sentinel verification failed:", p);
|
|
2276
|
-
}).finally(() => {
|
|
2277
|
-
b(Je, !1);
|
|
2278
|
-
});
|
|
2279
|
-
}
|
|
2280
|
-
}
|
|
2281
|
-
function rn(n) {
|
|
2282
|
-
const u = n.target;
|
|
2283
|
-
I() && u && !i(V).contains(u) && (i(k) === y.VERIFIED && X() === !1 || i(k) === y.VERIFIED && X() === "focus" && !i(T)?.matches(":focus-within") || a() === "off" && i(k) === y.UNVERIFIED) && St();
|
|
2284
|
-
}
|
|
2285
|
-
function nn() {
|
|
2286
|
-
I() && i(k) !== y.UNVERIFIED && Tt();
|
|
2287
|
-
}
|
|
2288
|
-
function li(n) {
|
|
2289
|
-
for (const u of Oe)
|
|
2290
|
-
typeof u.onErrorChange == "function" && u.onErrorChange(i(ze));
|
|
2291
|
-
}
|
|
2292
|
-
function on(n) {
|
|
2293
|
-
i(k) === y.UNVERIFIED ? Se() : I() && X() === "focus" && i(k) === y.VERIFIED && Zt();
|
|
2294
|
-
}
|
|
2295
|
-
function an(n) {
|
|
2296
|
-
n.target?.hasAttribute("data-code-challenge-form") || (b(Rt, n.submitter, !0), i(T) && a() === "onsubmit" ? (i(Rt)?.blur(), i(k) === y.UNVERIFIED ? (n.preventDefault(), n.stopPropagation(), Se().then(() => {
|
|
2297
|
-
vn(i(Rt));
|
|
2298
|
-
})) : i(k) !== y.VERIFIED && (n.preventDefault(), n.stopPropagation(), i(k) === y.VERIFYING && sn())) : i(T) && I() && a() === "off" && i(k) === y.UNVERIFIED && (n.preventDefault(), n.stopPropagation(), Zt()));
|
|
2299
|
-
}
|
|
2300
|
-
function ln() {
|
|
2301
|
-
Ke();
|
|
2302
|
-
}
|
|
2303
|
-
function sn() {
|
|
2304
|
-
i(k) === y.VERIFYING && i(L).waitAlert && alert(i(L).waitAlert);
|
|
2305
|
-
}
|
|
2306
|
-
function un() {
|
|
2307
|
-
i(Pe) ? i(Pe).paused ? (i(Pe).currentTime = 0, i(Pe).play()) : i(Pe).pause() : (b(wr, !0), requestAnimationFrame(() => {
|
|
2308
|
-
i(Pe)?.play();
|
|
2309
|
-
}));
|
|
2310
|
-
}
|
|
2311
|
-
function si(n) {
|
|
2312
|
-
for (const u of Oe)
|
|
2313
|
-
typeof u.onStateChange == "function" && u.onStateChange(i(k));
|
|
2314
|
-
I() && i(k) !== y.UNVERIFIED && requestAnimationFrame(() => {
|
|
2315
|
-
Tt();
|
|
2316
|
-
}), b(At, i(k) === y.VERIFIED), ge() && i(ue) && (i(k) !== y.UNVERIFIED ? Zt() : St());
|
|
2317
|
-
}
|
|
2318
|
-
function cn() {
|
|
2319
|
-
I() && Tt();
|
|
2320
|
-
}
|
|
2321
|
-
function fn(n) {
|
|
2322
|
-
return JSON.parse(n);
|
|
2323
|
-
}
|
|
2324
|
-
function dn(n) {
|
|
2325
|
-
const u = new URLSearchParams(n.split("?")?.[1]), h = u.get("expires") || u.get("expire");
|
|
2326
|
-
if (h) {
|
|
2327
|
-
const p = new Date(+h * 1e3), g = isNaN(p.getTime()) ? 0 : p.getTime() - Date.now();
|
|
2328
|
-
g > 0 && xr(g);
|
|
2329
|
-
} else we && (clearTimeout(we), we = null);
|
|
2330
|
-
}
|
|
2331
|
-
async function ui(n) {
|
|
2332
|
-
if (!te())
|
|
2333
|
-
throw new Error("Attribute verifyurl not set.");
|
|
2334
|
-
A("requesting server verification from", te());
|
|
2335
|
-
const u = { payload: n };
|
|
2336
|
-
if (ye() !== !1) {
|
|
2337
|
-
const {
|
|
2338
|
-
blockedCountries: g,
|
|
2339
|
-
classifier: C,
|
|
2340
|
-
disableRules: D,
|
|
2341
|
-
email: H,
|
|
2342
|
-
expectedLanguages: q,
|
|
2343
|
-
expectedCountries: oe,
|
|
2344
|
-
fields: ie,
|
|
2345
|
-
ipAddress: Qe,
|
|
2346
|
-
text: dt,
|
|
2347
|
-
timeZone: et
|
|
2348
|
-
} = Xo();
|
|
2349
|
-
u.blockedCountries = g, u.classifier = C, u.disableRules = D, u.email = H === !1 ? void 0 : Ko(H), u.expectedCountries = oe, u.expectedLanguages = q || (Jr ? [Jr] : void 0), u.fields = ie === !1 ? void 0 : en(ie), u.ipAddress = Qe === !1 ? void 0 : Qe || "auto", u.text = dt, u.timeZone = et === !1 ? void 0 : et || Wn();
|
|
2350
|
-
}
|
|
2351
|
-
const h = await Er()(te(), {
|
|
2352
|
-
body: JSON.stringify(u),
|
|
2353
|
-
headers: { "content-type": "application/json" },
|
|
2354
|
-
method: "POST"
|
|
2355
|
-
});
|
|
2356
|
-
if (!h || !(h instanceof Response))
|
|
2357
|
-
throw new Error("Custom fetch function did not return a response.");
|
|
2358
|
-
if (h.status !== 200)
|
|
2359
|
-
throw new Error(`Server responded with ${h.status}.`);
|
|
2360
|
-
const p = await h.json();
|
|
2361
|
-
if (p?.payload && b(Ee, p.payload, !0), Le("serververification", p), s() && p.classification === "BAD")
|
|
2362
|
-
throw new Error("SpamFilter returned negative classification.");
|
|
2363
|
-
}
|
|
2364
|
-
async function hn(n, u) {
|
|
2365
|
-
if (!te())
|
|
2366
|
-
throw new Error("Attribute verifyurl not set.");
|
|
2367
|
-
A("requesting sentinel verification from", te());
|
|
2368
|
-
const h = { code: u, payload: n };
|
|
2369
|
-
Ye() && (h.fields = Ye().fields ? en() : void 0, h.timeZone = Ye().timeZone ? Wn() : void 0);
|
|
2370
|
-
const p = await Er()(te(), {
|
|
2371
|
-
body: JSON.stringify(h),
|
|
2372
|
-
headers: { "content-type": "application/json" },
|
|
2373
|
-
method: "POST"
|
|
2374
|
-
});
|
|
2375
|
-
if (!p || !(p instanceof Response))
|
|
2376
|
-
throw new Error("Fetch function did not return a response.");
|
|
2377
|
-
if (p.status !== 200)
|
|
2378
|
-
throw new Error(`Server responded with ${p.status}.`);
|
|
2379
|
-
const g = await p.json();
|
|
2380
|
-
return g?.payload && b(Ee, g.payload, !0), Le("sentinelverification", g), g;
|
|
2381
|
-
}
|
|
2382
|
-
function vn(n) {
|
|
2383
|
-
i(T) && "requestSubmit" in i(T) ? i(T).requestSubmit(n) : i(T)?.reportValidity() && (n ? n.click() : i(T).submit());
|
|
2384
|
-
}
|
|
2385
|
-
function xr(n) {
|
|
2386
|
-
A("expire", n), we && (clearTimeout(we), we = null), n < 1 ? Xr() : we = setTimeout(Xr, n);
|
|
2387
|
-
}
|
|
2388
|
-
function gn(n) {
|
|
2389
|
-
A("floating", n), I() !== n && (i(V).style.left = "", i(V).style.top = ""), I(n === !0 || n === "" ? "auto" : n === !1 || n === "false" ? void 0 : I()), I() ? (a() || a("onsubmit"), document.addEventListener("scroll", nn), document.addEventListener("click", rn), window.addEventListener("resize", cn)) : a() === "onsubmit" && a(void 0);
|
|
2390
|
-
}
|
|
2391
|
-
function pn(n) {
|
|
2392
|
-
if (A("overlay", n), ge(n), n) {
|
|
2393
|
-
if (a() || a("onsubmit"), i(ue) && i(V).parentElement && i(ue).replaceWith(i(V).parentElement), i(V)?.parentElement?.parentElement) {
|
|
2394
|
-
b(ue, document.createElement("div"), !0), i(V).parentElement.parentElement.appendChild(i(ue));
|
|
2395
|
-
const u = document.createElement("div"), h = document.createElement("button");
|
|
2396
|
-
h.type = "button", h.innerHTML = "×", h.addEventListener("click", (p) => {
|
|
2397
|
-
p.preventDefault(), Ke();
|
|
2398
|
-
}), i(ue).classList.add("altcha-overlay-backdrop"), h.classList.add("altcha-overlay-close-button"), u.classList.add("altcha-overlay"), i(ue).append(u), u.append(h), Ct() && u.append(...document.querySelectorAll(Ct())), u.append(i(V).parentElement);
|
|
2399
|
-
}
|
|
2400
|
-
} else i(ue) && i(V).parentElement && (i(ue).replaceWith(i(V).parentElement), i(V).style.display = "block");
|
|
2401
|
-
}
|
|
2402
|
-
function mn(n) {
|
|
2403
|
-
if (!n.algorithm)
|
|
2404
|
-
throw new Error("Invalid challenge. Property algorithm is missing.");
|
|
2405
|
-
if (n.signature === void 0)
|
|
2406
|
-
throw new Error("Invalid challenge. Property signature is missing.");
|
|
2407
|
-
if (!zr.includes(n.algorithm.toUpperCase()))
|
|
2408
|
-
throw new Error(`Unknown algorithm value. Allowed values: ${zr.join(", ")}`);
|
|
2409
|
-
if (!n.challenge || n.challenge.length < 40)
|
|
2410
|
-
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
2411
|
-
if (!n.salt || n.salt.length < 10)
|
|
2412
|
-
throw new Error("Salt is too short. Min. 10 chars.");
|
|
2413
|
-
}
|
|
2414
|
-
async function _n(n) {
|
|
2415
|
-
let u = null, h = null;
|
|
2416
|
-
if ("Worker" in window) {
|
|
2417
|
-
try {
|
|
2418
|
-
u = ci(n, n.maxNumber || n.maxnumber || We()), b(Ze, u.controller, !0), h = await u.promise;
|
|
2419
|
-
} catch (p) {
|
|
2420
|
-
A(p);
|
|
2421
|
-
} finally {
|
|
2422
|
-
b(Ze, null);
|
|
2423
|
-
}
|
|
2424
|
-
if (h === null || h?.number !== void 0 || "obfuscated" in n)
|
|
2425
|
-
return { data: n, solution: h };
|
|
2426
|
-
}
|
|
2427
|
-
if ("obfuscated" in n) {
|
|
2428
|
-
const p = await il(n.obfuscated, n.key, n.maxNumber || n.maxnumber);
|
|
2429
|
-
return { data: n, solution: await p.promise };
|
|
2430
|
-
}
|
|
2431
|
-
u = rl(n.challenge, n.salt, n.algorithm, n.maxNumber || n.maxnumber || We()), b(Ze, u.controller, !0);
|
|
2432
|
-
try {
|
|
2433
|
-
h = await u.promise;
|
|
2434
|
-
} catch (p) {
|
|
2435
|
-
A(p);
|
|
2436
|
-
} finally {
|
|
2437
|
-
b(Ze, null);
|
|
2438
|
-
}
|
|
2439
|
-
return { data: n, solution: h };
|
|
2440
|
-
}
|
|
2441
|
-
function ci(n, u = typeof de() == "number" ? de() : n.maxNumber || n.maxnumber || We(), h = Math.ceil(ut())) {
|
|
2442
|
-
const p = new AbortController(), g = [];
|
|
2443
|
-
h = Math.min(16, u, Math.max(1, h));
|
|
2444
|
-
for (let H = 0; H < h; H++)
|
|
2445
|
-
g.push(altchaCreateWorker(kt()));
|
|
2446
|
-
const C = Math.ceil(u / h);
|
|
2447
|
-
return { promise: (async () => {
|
|
2448
|
-
const H = await Promise.all(g.map((q, oe) => {
|
|
2449
|
-
const ie = oe * C;
|
|
2450
|
-
return p.signal.addEventListener("abort", () => {
|
|
2451
|
-
q.postMessage({ type: "abort" });
|
|
2452
|
-
}), new Promise((Qe) => {
|
|
2453
|
-
q.addEventListener("message", (dt) => {
|
|
2454
|
-
if (dt.data)
|
|
2455
|
-
for (const et of g)
|
|
2456
|
-
et !== q && et.postMessage({ type: "abort" });
|
|
2457
|
-
Qe(dt.data);
|
|
2458
|
-
}), q.postMessage({
|
|
2459
|
-
payload: n,
|
|
2460
|
-
max: ie + C,
|
|
2461
|
-
start: ie,
|
|
2462
|
-
type: "work"
|
|
2463
|
-
});
|
|
2464
|
-
});
|
|
2465
|
-
}));
|
|
2466
|
-
for (const q of g)
|
|
2467
|
-
q.terminate();
|
|
2468
|
-
return H.find((q) => !!q) || null;
|
|
2469
|
-
})(), controller: p };
|
|
2470
|
-
}
|
|
2471
|
-
async function $t() {
|
|
2472
|
-
if (!Ne()) {
|
|
2473
|
-
xe(y.ERROR);
|
|
2474
|
-
return;
|
|
2475
|
-
}
|
|
2476
|
-
const n = Oe.find((u) => u.constructor.pluginName === "obfuscation");
|
|
2477
|
-
if (!n || !("clarify" in n)) {
|
|
2478
|
-
xe(y.ERROR), A("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
|
|
2479
|
-
return;
|
|
2480
|
-
}
|
|
2481
|
-
if ("clarify" in n && typeof n.clarify == "function")
|
|
2482
|
-
return n.clarify();
|
|
2483
|
-
}
|
|
2484
|
-
function bn(n) {
|
|
2485
|
-
n.obfuscated !== void 0 && Ne(n.obfuscated), n.auto !== void 0 && (a(n.auto), a() === "onload" && (Ne() ? $t() : Se())), n.blockspam !== void 0 && s(!!n.blockspam), n.customfetch !== void 0 && m(n.customfetch), n.floatinganchor !== void 0 && ee(n.floatinganchor), n.delay !== void 0 && _(n.delay), n.floatingoffset !== void 0 && $e(n.floatingoffset), n.floating !== void 0 && gn(n.floating), n.expire !== void 0 && (xr(n.expire), U(n.expire)), n.challenge && (f(typeof n.challenge == "string" ? n.challenge : JSON.stringify(n.challenge)), mn(i(Wt))), n.challengeurl !== void 0 && c(n.challengeurl), n.debug !== void 0 && v(!!n.debug), n.hidefooter !== void 0 && j(!!n.hidefooter), n.hidelogo !== void 0 && se(!!n.hidelogo), n.language !== void 0 && st(Qr(l(), [n.language])), n.maxnumber !== void 0 && We(+n.maxnumber), n.mockerror !== void 0 && xt(!!n.mockerror), n.name !== void 0 && Ge(n.name), n.overlaycontent !== void 0 && Ct(n.overlaycontent), n.overlay !== void 0 && pn(n.overlay), n.refetchonexpire !== void 0 && M(!n.refetchonexpire), n.disablerefetchonexpire !== void 0 && M(!n.disablerefetchonexpire), n.sentinel !== void 0 && typeof n.sentinel == "object" && Ye(n.sentinel), n.spamfilter !== void 0 && ye(typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && st(typeof n.strings == "string" ? n.strings : JSON.stringify(n.strings)), n.test !== void 0 && de(typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && te(n.verifyurl), n.workers !== void 0 && ut(+n.workers), n.workerurl !== void 0 && kt(n.workerurl);
|
|
2486
|
-
}
|
|
2487
|
-
function yn() {
|
|
2488
|
-
return {
|
|
2489
|
-
auto: a(),
|
|
2490
|
-
blockspam: s(),
|
|
2491
|
-
challengeurl: c(),
|
|
2492
|
-
debug: v(),
|
|
2493
|
-
delay: _(),
|
|
2494
|
-
disableautofocus: w(),
|
|
2495
|
-
disablerefetchonexpire: M(),
|
|
2496
|
-
expire: U(),
|
|
2497
|
-
floating: I(),
|
|
2498
|
-
floatinganchor: ee(),
|
|
2499
|
-
floatingoffset: $e(),
|
|
2500
|
-
hidefooter: j(),
|
|
2501
|
-
hidelogo: se(),
|
|
2502
|
-
name: Ge(),
|
|
2503
|
-
maxnumber: We(),
|
|
2504
|
-
mockerror: xt(),
|
|
2505
|
-
obfuscated: Ne(),
|
|
2506
|
-
overlay: ge(),
|
|
2507
|
-
refetchonexpire: !M(),
|
|
2508
|
-
spamfilter: ye(),
|
|
2509
|
-
strings: i(L),
|
|
2510
|
-
test: de(),
|
|
2511
|
-
verifyurl: te(),
|
|
2512
|
-
workers: ut(),
|
|
2513
|
-
workerurl: kt()
|
|
2514
|
-
};
|
|
2515
|
-
}
|
|
2516
|
-
function wn() {
|
|
2517
|
-
return i(ct);
|
|
2518
|
-
}
|
|
2519
|
-
function fi(n) {
|
|
2520
|
-
return Oe.find((u) => u.constructor.pluginName === n);
|
|
2521
|
-
}
|
|
2522
|
-
function En() {
|
|
2523
|
-
return i(k);
|
|
2524
|
-
}
|
|
2525
|
-
function St() {
|
|
2526
|
-
i(V).style.display = "none", ge() && i(ue) && (i(ue).style.display = "none");
|
|
2527
|
-
}
|
|
2528
|
-
function Tt(n = 20) {
|
|
2529
|
-
if (i(V))
|
|
2530
|
-
if (i(ct) || b(ct, (ee() ? document.querySelector(ee()) : i(T)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || i(T), !0), i(ct)) {
|
|
2531
|
-
const u = parseInt($e(), 10) || 12, h = i(ct).getBoundingClientRect(), p = i(V).getBoundingClientRect(), g = document.documentElement.clientHeight, C = document.documentElement.clientWidth, D = I() === "auto" ? h.bottom + p.height + u + n > g : I() === "top", H = Math.max(n, Math.min(C - n - p.width, h.left + h.width / 2 - p.width / 2));
|
|
2532
|
-
if (D ? i(V).style.top = `${h.top - (p.height + u)}px` : i(V).style.top = `${h.bottom + u}px`, i(V).style.left = `${H}px`, i(V).setAttribute("data-floating", D ? "top" : "bottom"), i(It)) {
|
|
2533
|
-
const q = i(It).getBoundingClientRect();
|
|
2534
|
-
i(It).style.left = h.left - H + h.width / 2 - q.width / 2 + "px";
|
|
2535
|
-
}
|
|
2536
|
-
} else
|
|
2537
|
-
A("unable to find floating anchor element");
|
|
2538
|
-
}
|
|
2539
|
-
function Ke(n = y.UNVERIFIED, u = null) {
|
|
2540
|
-
i(Ze) && (i(Ze).abort(), b(Ze, null)), b(At, !1), b(Ee, null), b(G, null), b(wr, !1), b(W, null), xe(n, u);
|
|
2541
|
-
}
|
|
2542
|
-
function xn(n) {
|
|
2543
|
-
b(ct, n, !0);
|
|
2544
|
-
}
|
|
2545
|
-
function xe(n, u = null) {
|
|
2546
|
-
b(k, n, !0), b(ze, u, !0), Le("statechange", {
|
|
2547
|
-
payload: i(Ee),
|
|
2548
|
-
state: i(k)
|
|
2549
|
-
});
|
|
2550
|
-
}
|
|
2551
|
-
function Zt() {
|
|
2552
|
-
i(V).style.display = "block", I() && Tt(), ge() && i(ue) && (i(ue).style.display = "flex");
|
|
2553
|
-
}
|
|
2554
|
-
async function Se() {
|
|
2555
|
-
return Ke(y.VERIFYING), await new Promise((n) => setTimeout(n, _() || 0)), Jo().then((n) => (mn(n), A("challenge", n), _n(n))).then(({ data: n, solution: u }) => {
|
|
2556
|
-
if (A("solution", u), !u || n && "challenge" in n && !("clearText" in u)) {
|
|
2557
|
-
if (u?.number !== void 0 && "challenge" in n)
|
|
2558
|
-
if (te() && "codeChallenge" in n)
|
|
2559
|
-
["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(document.activeElement?.tagName || "") && w() === !1 && document.activeElement.blur(), b(G, { challenge: n, solution: u }, !0);
|
|
2560
|
-
else {
|
|
2561
|
-
if (te() && Ye() !== void 0)
|
|
2562
|
-
return hn(Yt(n, u));
|
|
2563
|
-
if (te())
|
|
2564
|
-
return ui(Yt(n, u));
|
|
2565
|
-
b(Ee, Yt(n, u), !0), A("payload", i(Ee));
|
|
2566
|
-
}
|
|
2567
|
-
else if (i(k) !== y.EXPIRED)
|
|
2568
|
-
throw A("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
2569
|
-
}
|
|
2570
|
-
}).then(() => {
|
|
2571
|
-
i(G) ? (xe(y.CODE), Rr().then(() => {
|
|
2572
|
-
Le("code", { codeChallenge: i(G) });
|
|
2573
|
-
})) : i(Ee) && (xe(y.VERIFIED), A("verified"), Rr().then(() => {
|
|
2574
|
-
Le("verified", { payload: i(Ee) }), ge() && St();
|
|
2575
|
-
}));
|
|
2576
|
-
}).catch((n) => {
|
|
2577
|
-
A(n), xe(y.ERROR, n.message);
|
|
2578
|
-
});
|
|
2579
|
-
}
|
|
2580
|
-
var Cn = Cl(), kn = Nt(Cn);
|
|
2581
|
-
Fa(kn, t, "default", {});
|
|
2582
|
-
var ft = J(kn, 2), Cr = z(ft), zt = z(Cr);
|
|
2583
|
-
let An;
|
|
2584
|
-
var In = z(zt);
|
|
2585
|
-
{
|
|
2586
|
-
var di = (n) => {
|
|
2587
|
-
$r(n);
|
|
2588
|
-
};
|
|
2589
|
-
K(In, (n) => {
|
|
2590
|
-
i(k) === y.VERIFYING && n(di);
|
|
2591
|
-
});
|
|
2592
|
-
}
|
|
2593
|
-
var Xe = J(In, 2);
|
|
2594
|
-
qn(Xe), Xe.__change = [
|
|
2595
|
-
ul,
|
|
2596
|
-
k,
|
|
2597
|
-
ye,
|
|
2598
|
-
T,
|
|
2599
|
-
At,
|
|
2600
|
-
Ne,
|
|
2601
|
-
$t,
|
|
2602
|
-
Se
|
|
2603
|
-
], Qt(Xe, (n) => b(yr, n), () => i(yr)), Z(zt);
|
|
2604
|
-
var Jt = J(zt, 2), hi = z(Jt);
|
|
2605
|
-
{
|
|
2606
|
-
var vi = (n) => {
|
|
2607
|
-
var u = Xt(), h = Nt(u);
|
|
2608
|
-
tt(h, () => i(L).verified), B(n, u);
|
|
2609
|
-
}, gi = (n, u) => {
|
|
2610
|
-
{
|
|
2611
|
-
var h = (g) => {
|
|
2612
|
-
var C = Xt(), D = Nt(C);
|
|
2613
|
-
tt(D, () => i(L).verifying), B(g, C);
|
|
2614
|
-
}, p = (g, C) => {
|
|
2615
|
-
{
|
|
2616
|
-
var D = (q) => {
|
|
2617
|
-
var oe = Xt(), ie = Nt(oe);
|
|
2618
|
-
tt(ie, () => i(L).verificationRequired), B(q, oe);
|
|
2619
|
-
}, H = (q) => {
|
|
2620
|
-
var oe = Xt(), ie = Nt(oe);
|
|
2621
|
-
tt(ie, () => i(L).label), B(q, oe);
|
|
2622
|
-
};
|
|
2623
|
-
K(
|
|
2624
|
-
g,
|
|
2625
|
-
(q) => {
|
|
2626
|
-
i(k) === y.CODE ? q(D) : q(H, !1);
|
|
2627
|
-
},
|
|
2628
|
-
C
|
|
2629
|
-
);
|
|
2630
|
-
}
|
|
2631
|
-
};
|
|
2632
|
-
K(
|
|
2633
|
-
n,
|
|
2634
|
-
(g) => {
|
|
2635
|
-
i(k) === y.VERIFYING ? g(h) : g(p, !1);
|
|
2636
|
-
},
|
|
2637
|
-
u
|
|
2638
|
-
);
|
|
2639
|
-
}
|
|
2640
|
-
};
|
|
2641
|
-
K(hi, (n) => {
|
|
2642
|
-
i(k) === y.VERIFIED ? n(vi) : n(gi, !1);
|
|
2643
|
-
});
|
|
2644
|
-
}
|
|
2645
|
-
Z(Jt);
|
|
2646
|
-
var Rn = J(Jt, 2);
|
|
2647
|
-
{
|
|
2648
|
-
var pi = (n) => {
|
|
2649
|
-
var u = fl();
|
|
2650
|
-
qn(u), Ce(() => {
|
|
2651
|
-
R(u, "name", Ge()), qa(u, i(Ee));
|
|
2652
|
-
}), B(n, u);
|
|
2653
|
-
};
|
|
2654
|
-
K(Rn, (n) => {
|
|
2655
|
-
i(k) === y.VERIFIED && n(pi);
|
|
2656
|
-
});
|
|
2657
|
-
}
|
|
2658
|
-
var $n = J(Rn, 2);
|
|
2659
|
-
{
|
|
2660
|
-
var mi = (n) => {
|
|
2661
|
-
var u = dl(), h = z(u);
|
|
2662
|
-
R(h, "href", Yo), Z(u), Ce(() => R(h, "aria-label", i(L).ariaLinkLabel)), B(n, u);
|
|
2663
|
-
};
|
|
2664
|
-
K($n, (n) => {
|
|
2665
|
-
(se() !== !0 || i(br)) && n(mi);
|
|
2666
|
-
});
|
|
2667
|
-
}
|
|
2668
|
-
var _i = J($n, 2);
|
|
2669
|
-
{
|
|
2670
|
-
var bi = (n) => {
|
|
2671
|
-
var u = _l(), h = J(z(u), 2), p = z(h), g = J(p, 2);
|
|
2672
|
-
Sa(g, !w()), g.__keydown = [
|
|
2673
|
-
ll,
|
|
2674
|
-
un
|
|
2675
|
-
];
|
|
2676
|
-
var C = J(g, 2), D = z(C), H = z(D);
|
|
2677
|
-
{
|
|
2678
|
-
var q = (pe) => {
|
|
2679
|
-
var Y = pl();
|
|
2680
|
-
Y.__click = un;
|
|
2681
|
-
var Kt = z(Y);
|
|
2682
|
-
{
|
|
2683
|
-
var Dt = (ht) => {
|
|
2684
|
-
$r(ht, () => 20);
|
|
2685
|
-
}, Ii = (ht, Ri) => {
|
|
2686
|
-
{
|
|
2687
|
-
var $i = (vt) => {
|
|
2688
|
-
var kr = hl();
|
|
2689
|
-
B(vt, kr);
|
|
2690
|
-
}, Si = (vt, kr) => {
|
|
2691
|
-
{
|
|
2692
|
-
var Ti = (gt) => {
|
|
2693
|
-
var Ar = vl();
|
|
2694
|
-
B(gt, Ar);
|
|
2695
|
-
}, Di = (gt) => {
|
|
2696
|
-
var Ar = gl();
|
|
2697
|
-
B(gt, Ar);
|
|
2698
|
-
};
|
|
2699
|
-
K(
|
|
2700
|
-
vt,
|
|
2701
|
-
(gt) => {
|
|
2702
|
-
i(W) === Q.PLAYING ? gt(Ti) : gt(Di, !1);
|
|
2703
|
-
},
|
|
2704
|
-
kr
|
|
2705
|
-
);
|
|
2706
|
-
}
|
|
2707
|
-
};
|
|
2708
|
-
K(
|
|
2709
|
-
ht,
|
|
2710
|
-
(vt) => {
|
|
2711
|
-
i(W) === Q.ERROR ? vt($i) : vt(Si, !1);
|
|
2712
|
-
},
|
|
2713
|
-
Ri
|
|
2714
|
-
);
|
|
2715
|
-
}
|
|
2716
|
-
};
|
|
2717
|
-
K(Kt, (ht) => {
|
|
2718
|
-
i(W) === Q.LOADING ? ht(Dt) : ht(Ii, !1);
|
|
2719
|
-
});
|
|
2720
|
-
}
|
|
2721
|
-
Z(Y), Ce(() => {
|
|
2722
|
-
R(Y, "title", i(L).getAudioChallenge), Y.disabled = i(W) === Q.LOADING || i(W) === Q.ERROR || i(Je), R(Y, "aria-label", i(W) === Q.LOADING ? i(L).loading : i(L).getAudioChallenge);
|
|
2723
|
-
}), B(pe, Y);
|
|
2724
|
-
};
|
|
2725
|
-
K(H, (pe) => {
|
|
2726
|
-
i(G).challenge.codeChallenge.audio && pe(q);
|
|
2727
|
-
});
|
|
2728
|
-
}
|
|
2729
|
-
var oe = J(H, 2);
|
|
2730
|
-
oe.__click = [sl, Se], Z(D);
|
|
2731
|
-
var ie = J(D, 2), Qe = z(ie);
|
|
2732
|
-
{
|
|
2733
|
-
var dt = (pe) => {
|
|
2734
|
-
$r(pe, () => 16);
|
|
2735
|
-
};
|
|
2736
|
-
K(Qe, (pe) => {
|
|
2737
|
-
i(Je) && pe(dt);
|
|
2738
|
-
});
|
|
2739
|
-
}
|
|
2740
|
-
var et = J(Qe);
|
|
2741
|
-
Z(ie), Z(C);
|
|
2742
|
-
var ki = J(C, 2);
|
|
2743
|
-
{
|
|
2744
|
-
var Ai = (pe) => {
|
|
2745
|
-
var Y = ml(), Kt = z(Y);
|
|
2746
|
-
Z(Y), Qt(Y, (Dt) => b(Pe, Dt), () => i(Pe)), Ce((Dt) => R(Kt, "src", Dt), [
|
|
2747
|
-
() => tn(i(G).challenge.codeChallenge.audio, { language: Ht() })
|
|
2748
|
-
]), Fe("loadstart", Y, ni), Fe("canplay", Y, ri), Fe("pause", Y, ii), Fe("playing", Y, oi), Fe("ended", Y, ei), Fe("error", Kt, ti), B(pe, Y);
|
|
2749
|
-
};
|
|
2750
|
-
K(ki, (pe) => {
|
|
2751
|
-
i(G).challenge.codeChallenge.audio && i(wr) && pe(Ai);
|
|
2752
|
-
});
|
|
2753
|
-
}
|
|
2754
|
-
Z(h), Z(u), Ce(() => {
|
|
2755
|
-
R(u, "aria-label", i(L).verificationRequired), R(p, "src", i(G).challenge.codeChallenge.image), R(g, "minlength", i(G).challenge.codeChallenge.length || 1), R(g, "maxlength", i(G).challenge.codeChallenge.length), R(g, "placeholder", i(L).enterCode), R(g, "aria-label", i(W) === Q.LOADING ? i(L).loading : i(W) === Q.PLAYING ? "" : i(L).enterCodeAria), R(g, "aria-live", i(W) ? "assertive" : "polite"), R(g, "aria-busy", i(W) === Q.LOADING), g.disabled = i(Je), R(oe, "aria-label", i(L).reload), R(oe, "title", i(L).reload), oe.disabled = i(Je), ie.disabled = i(Je), R(ie, "aria-label", i(L).verify), La(et, ` ${i(L).verify ?? ""}`);
|
|
2756
|
-
}), Fe("submit", h, ai, !0), B(n, u);
|
|
2757
|
-
};
|
|
2758
|
-
K(_i, (n) => {
|
|
2759
|
-
i(G)?.challenge.codeChallenge && n(bi);
|
|
2760
|
-
});
|
|
2761
|
-
}
|
|
2762
|
-
Z(Cr);
|
|
2763
|
-
var Sn = J(Cr, 2);
|
|
2764
|
-
{
|
|
2765
|
-
var yi = (n) => {
|
|
2766
|
-
var u = wl(), h = J(z(u), 2);
|
|
2767
|
-
{
|
|
2768
|
-
var p = (C) => {
|
|
2769
|
-
var D = bl(), H = z(D);
|
|
2770
|
-
tt(H, () => i(L).expired), Z(D), Ce(() => R(D, "title", i(ze))), B(C, D);
|
|
2771
|
-
}, g = (C) => {
|
|
2772
|
-
var D = yl(), H = z(D);
|
|
2773
|
-
tt(H, () => i(L).error), Z(D), Ce(() => R(D, "title", i(ze))), B(C, D);
|
|
2774
|
-
};
|
|
2775
|
-
K(h, (C) => {
|
|
2776
|
-
i(k) === y.EXPIRED ? C(p) : C(g, !1);
|
|
2777
|
-
});
|
|
2778
|
-
}
|
|
2779
|
-
Z(u), B(n, u);
|
|
2780
|
-
};
|
|
2781
|
-
K(Sn, (n) => {
|
|
2782
|
-
(i(ze) || i(k) === y.EXPIRED) && n(yi);
|
|
2783
|
-
});
|
|
2784
|
-
}
|
|
2785
|
-
var Tn = J(Sn, 2);
|
|
2786
|
-
{
|
|
2787
|
-
var wi = (n) => {
|
|
2788
|
-
var u = El(), h = z(u), p = z(h);
|
|
2789
|
-
tt(p, () => i(L).footer), Z(h), Z(u), B(n, u);
|
|
2790
|
-
};
|
|
2791
|
-
K(Tn, (n) => {
|
|
2792
|
-
i(L).footer && (j() !== !0 || i(br)) && n(wi);
|
|
2793
|
-
});
|
|
2794
|
-
}
|
|
2795
|
-
var Ei = J(Tn, 2);
|
|
2796
|
-
{
|
|
2797
|
-
var xi = (n) => {
|
|
2798
|
-
var u = xl();
|
|
2799
|
-
Qt(u, (h) => b(It, h), () => i(It)), B(n, u);
|
|
2800
|
-
};
|
|
2801
|
-
K(Ei, (n) => {
|
|
2802
|
-
I() && n(xi);
|
|
2803
|
-
});
|
|
2804
|
-
}
|
|
2805
|
-
Z(ft), Qt(ft, (n) => b(V, n), () => i(V)), Ce(
|
|
2806
|
-
(n) => {
|
|
2807
|
-
R(ft, "data-state", i(k)), R(ft, "data-floating", I()), R(ft, "data-overlay", ge()), An = Va(zt, 1, "altcha-checkbox", null, An, n), R(Xe, "id", i(Kr)), Xe.required = a() !== "onsubmit" && (!I() || a() !== "off"), R(Jt, "for", i(Kr));
|
|
2808
|
-
},
|
|
2809
|
-
[
|
|
2810
|
-
() => ({
|
|
2811
|
-
"altcha-checkbox-verifying": i(k) === y.VERIFYING
|
|
2812
|
-
})
|
|
2813
|
-
]
|
|
2814
|
-
), Fe("invalid", Xe, sn), Ha(Xe, () => i(At), (n) => b(At, n)), B(e, Cn);
|
|
2815
|
-
var Ci = So({
|
|
2816
|
-
clarify: $t,
|
|
2817
|
-
configure: bn,
|
|
2818
|
-
getConfiguration: yn,
|
|
2819
|
-
getFloatingAnchor: wn,
|
|
2820
|
-
getPlugin: fi,
|
|
2821
|
-
getState: En,
|
|
2822
|
-
hide: St,
|
|
2823
|
-
repositionFloating: Tt,
|
|
2824
|
-
reset: Ke,
|
|
2825
|
-
setFloatingAnchor: xn,
|
|
2826
|
-
setState: xe,
|
|
2827
|
-
show: Zt,
|
|
2828
|
-
verify: Se,
|
|
2829
|
-
get auto() {
|
|
2830
|
-
return a();
|
|
2831
|
-
},
|
|
2832
|
-
set auto(n = void 0) {
|
|
2833
|
-
a(n), E();
|
|
2834
|
-
},
|
|
2835
|
-
get blockspam() {
|
|
2836
|
-
return s();
|
|
2837
|
-
},
|
|
2838
|
-
set blockspam(n = void 0) {
|
|
2839
|
-
s(n), E();
|
|
2840
|
-
},
|
|
2841
|
-
get challengeurl() {
|
|
2842
|
-
return c();
|
|
2843
|
-
},
|
|
2844
|
-
set challengeurl(n = void 0) {
|
|
2845
|
-
c(n), E();
|
|
2846
|
-
},
|
|
2847
|
-
get challengejson() {
|
|
2848
|
-
return f();
|
|
2849
|
-
},
|
|
2850
|
-
set challengejson(n = void 0) {
|
|
2851
|
-
f(n), E();
|
|
2852
|
-
},
|
|
2853
|
-
get credentials() {
|
|
2854
|
-
return d();
|
|
2855
|
-
},
|
|
2856
|
-
set credentials(n = void 0) {
|
|
2857
|
-
d(n), E();
|
|
2858
|
-
},
|
|
2859
|
-
get customfetch() {
|
|
2860
|
-
return m();
|
|
2861
|
-
},
|
|
2862
|
-
set customfetch(n = void 0) {
|
|
2863
|
-
m(n), E();
|
|
2864
|
-
},
|
|
2865
|
-
get debug() {
|
|
2866
|
-
return v();
|
|
2867
|
-
},
|
|
2868
|
-
set debug(n = !1) {
|
|
2869
|
-
v(n), E();
|
|
2870
|
-
},
|
|
2871
|
-
get delay() {
|
|
2872
|
-
return _();
|
|
2873
|
-
},
|
|
2874
|
-
set delay(n = 0) {
|
|
2875
|
-
_(n), E();
|
|
2876
|
-
},
|
|
2877
|
-
get disableautofocus() {
|
|
2878
|
-
return w();
|
|
2879
|
-
},
|
|
2880
|
-
set disableautofocus(n = !1) {
|
|
2881
|
-
w(n), E();
|
|
2882
|
-
},
|
|
2883
|
-
get refetchonexpire() {
|
|
2884
|
-
return F();
|
|
2885
|
-
},
|
|
2886
|
-
set refetchonexpire(n = !0) {
|
|
2887
|
-
F(n), E();
|
|
2888
|
-
},
|
|
2889
|
-
get disablerefetchonexpire() {
|
|
2890
|
-
return M();
|
|
2891
|
-
},
|
|
2892
|
-
set disablerefetchonexpire(n = !F) {
|
|
2893
|
-
M(n), E();
|
|
2894
|
-
},
|
|
2895
|
-
get expire() {
|
|
2896
|
-
return U();
|
|
2897
|
-
},
|
|
2898
|
-
set expire(n = void 0) {
|
|
2899
|
-
U(n), E();
|
|
2900
|
-
},
|
|
2901
|
-
get floating() {
|
|
2902
|
-
return I();
|
|
2903
|
-
},
|
|
2904
|
-
set floating(n = void 0) {
|
|
2905
|
-
I(n), E();
|
|
2906
|
-
},
|
|
2907
|
-
get floatinganchor() {
|
|
2908
|
-
return ee();
|
|
2909
|
-
},
|
|
2910
|
-
set floatinganchor(n = void 0) {
|
|
2911
|
-
ee(n), E();
|
|
2912
|
-
},
|
|
2913
|
-
get floatingoffset() {
|
|
2914
|
-
return $e();
|
|
2915
|
-
},
|
|
2916
|
-
set floatingoffset(n = void 0) {
|
|
2917
|
-
$e(n), E();
|
|
2918
|
-
},
|
|
2919
|
-
get floatingpersist() {
|
|
2920
|
-
return X();
|
|
2921
|
-
},
|
|
2922
|
-
set floatingpersist(n = !1) {
|
|
2923
|
-
X(n), E();
|
|
2924
|
-
},
|
|
2925
|
-
get hidefooter() {
|
|
2926
|
-
return j();
|
|
2927
|
-
},
|
|
2928
|
-
set hidefooter(n = !1) {
|
|
2929
|
-
j(n), E();
|
|
2930
|
-
},
|
|
2931
|
-
get hidelogo() {
|
|
2932
|
-
return se();
|
|
2933
|
-
},
|
|
2934
|
-
set hidelogo(n = !1) {
|
|
2935
|
-
se(n), E();
|
|
2936
|
-
},
|
|
2937
|
-
get id() {
|
|
2938
|
-
return He();
|
|
2939
|
-
},
|
|
2940
|
-
set id(n = void 0) {
|
|
2941
|
-
He(n), E();
|
|
2942
|
-
},
|
|
2943
|
-
get language() {
|
|
2944
|
-
return Ht();
|
|
2945
|
-
},
|
|
2946
|
-
set language(n = void 0) {
|
|
2947
|
-
Ht(n), E();
|
|
2948
|
-
},
|
|
2949
|
-
get name() {
|
|
2950
|
-
return Ge();
|
|
2951
|
-
},
|
|
2952
|
-
set name(n = "altcha") {
|
|
2953
|
-
Ge(n), E();
|
|
2954
|
-
},
|
|
2955
|
-
get maxnumber() {
|
|
2956
|
-
return We();
|
|
2957
|
-
},
|
|
2958
|
-
set maxnumber(n = 1e6) {
|
|
2959
|
-
We(n), E();
|
|
2960
|
-
},
|
|
2961
|
-
get mockerror() {
|
|
2962
|
-
return xt();
|
|
2963
|
-
},
|
|
2964
|
-
set mockerror(n = !1) {
|
|
2965
|
-
xt(n), E();
|
|
2966
|
-
},
|
|
2967
|
-
get obfuscated() {
|
|
2968
|
-
return Ne();
|
|
2969
|
-
},
|
|
2970
|
-
set obfuscated(n = void 0) {
|
|
2971
|
-
Ne(n), E();
|
|
2972
|
-
},
|
|
2973
|
-
get overlay() {
|
|
2974
|
-
return ge();
|
|
2975
|
-
},
|
|
2976
|
-
set overlay(n = void 0) {
|
|
2977
|
-
ge(n), E();
|
|
2978
|
-
},
|
|
2979
|
-
get overlaycontent() {
|
|
2980
|
-
return Ct();
|
|
2981
|
-
},
|
|
2982
|
-
set overlaycontent(n = void 0) {
|
|
2983
|
-
Ct(n), E();
|
|
2984
|
-
},
|
|
2985
|
-
get plugins() {
|
|
2986
|
-
return Gt();
|
|
2987
|
-
},
|
|
2988
|
-
set plugins(n = void 0) {
|
|
2989
|
-
Gt(n), E();
|
|
2990
|
-
},
|
|
2991
|
-
get sentinel() {
|
|
2992
|
-
return Ye();
|
|
2993
|
-
},
|
|
2994
|
-
set sentinel(n = void 0) {
|
|
2995
|
-
Ye(n), E();
|
|
2996
|
-
},
|
|
2997
|
-
get spamfilter() {
|
|
2998
|
-
return ye();
|
|
2999
|
-
},
|
|
3000
|
-
set spamfilter(n = !1) {
|
|
3001
|
-
ye(n), E();
|
|
3002
|
-
},
|
|
3003
|
-
get strings() {
|
|
3004
|
-
return st();
|
|
3005
|
-
},
|
|
3006
|
-
set strings(n = void 0) {
|
|
3007
|
-
st(n), E();
|
|
3008
|
-
},
|
|
3009
|
-
get test() {
|
|
3010
|
-
return de();
|
|
3011
|
-
},
|
|
3012
|
-
set test(n = !1) {
|
|
3013
|
-
de(n), E();
|
|
3014
|
-
},
|
|
3015
|
-
get verifyurl() {
|
|
3016
|
-
return te();
|
|
3017
|
-
},
|
|
3018
|
-
set verifyurl(n = void 0) {
|
|
3019
|
-
te(n), E();
|
|
3020
|
-
},
|
|
3021
|
-
get workers() {
|
|
3022
|
-
return ut();
|
|
3023
|
-
},
|
|
3024
|
-
set workers(n = Math.min(16, navigator.hardwareConcurrency || 8)) {
|
|
3025
|
-
ut(n), E();
|
|
3026
|
-
},
|
|
3027
|
-
get workerurl() {
|
|
3028
|
-
return kt();
|
|
3029
|
-
},
|
|
3030
|
-
set workerurl(n = void 0) {
|
|
3031
|
-
kt(n), E();
|
|
3032
|
-
}
|
|
3033
|
-
});
|
|
3034
|
-
return o(), Ci;
|
|
3035
|
-
}
|
|
3036
|
-
Na(["change", "keydown", "click"]);
|
|
3037
|
-
customElements.define("altcha-widget", Qa(
|
|
3038
|
-
kl,
|
|
3039
|
-
{
|
|
3040
|
-
blockspam: { type: "Boolean" },
|
|
3041
|
-
debug: { type: "Boolean" },
|
|
3042
|
-
delay: { type: "Number" },
|
|
3043
|
-
disableautofocus: { type: "Boolean" },
|
|
3044
|
-
disablerefetchonexpire: { type: "Boolean" },
|
|
3045
|
-
expire: { type: "Number" },
|
|
3046
|
-
floatingoffset: { type: "Number" },
|
|
3047
|
-
hidefooter: { type: "Boolean" },
|
|
3048
|
-
hidelogo: { type: "Boolean" },
|
|
3049
|
-
maxnumber: { type: "Number" },
|
|
3050
|
-
mockerror: { type: "Boolean" },
|
|
3051
|
-
refetchonexpire: { type: "Boolean" },
|
|
3052
|
-
test: { type: "Boolean" },
|
|
3053
|
-
workers: { type: "Number" },
|
|
3054
|
-
auto: {},
|
|
3055
|
-
challengeurl: {},
|
|
3056
|
-
challengejson: {},
|
|
3057
|
-
credentials: {},
|
|
3058
|
-
customfetch: {},
|
|
3059
|
-
floating: {},
|
|
3060
|
-
floatinganchor: {},
|
|
3061
|
-
floatingpersist: {},
|
|
3062
|
-
id: {},
|
|
3063
|
-
language: {},
|
|
3064
|
-
name: {},
|
|
3065
|
-
obfuscated: {},
|
|
3066
|
-
overlay: {},
|
|
3067
|
-
overlaycontent: {},
|
|
3068
|
-
plugins: {},
|
|
3069
|
-
sentinel: {},
|
|
3070
|
-
spamfilter: {},
|
|
3071
|
-
strings: {},
|
|
3072
|
-
verifyurl: {},
|
|
3073
|
-
workerurl: {}
|
|
3074
|
-
},
|
|
3075
|
-
["default"],
|
|
3076
|
-
[
|
|
3077
|
-
"clarify",
|
|
3078
|
-
"configure",
|
|
3079
|
-
"getConfiguration",
|
|
3080
|
-
"getFloatingAnchor",
|
|
3081
|
-
"getPlugin",
|
|
3082
|
-
"getState",
|
|
3083
|
-
"hide",
|
|
3084
|
-
"repositionFloating",
|
|
3085
|
-
"reset",
|
|
3086
|
-
"setFloatingAnchor",
|
|
3087
|
-
"setState",
|
|
3088
|
-
"show",
|
|
3089
|
-
"verify"
|
|
3090
|
-
],
|
|
3091
|
-
!1
|
|
3092
|
-
));
|
|
3093
|
-
const Bo = '@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';
|
|
3094
|
-
function Ho(e, t = "__altcha-css") {
|
|
3095
|
-
if (!document.getElementById(t)) {
|
|
3096
|
-
const r = document.createElement("style");
|
|
3097
|
-
r.id = t, r.textContent = e, document.head.appendChild(r);
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
globalThis.altchaCreateWorker = (e) => e ? new Worker(new URL(e)) : new Ni();
|
|
3101
|
-
Ho(Bo);
|
|
3102
|
-
Ho(Bo);
|
|
3103
|
-
export {
|
|
3104
|
-
kl as Altcha
|
|
3105
|
-
};
|