From 300bb86c087b83b2e3aa80b7ac3f27a63a06f687 Mon Sep 17 00:00:00 2001 From: Kojib Date: Thu, 1 Jan 2026 11:43:38 -0500 Subject: [PATCH 1/2] v39.0.0 --- .DS_Store | Bin 8196 -> 14340 bytes api/lahmahtor/[[...path]].js | 15 - api/proxy/lahmahtorProxy.mjs | 112 - dist/assets/EternalKlock-C1Jyi7s7.js | 1 - dist/assets/EternalKlock-CLK839TD.js | 29 + dist/assets/EternalKlock-CQ5bLrcj.js | 29 - dist/assets/EternalKlock-CmXqg4DF.js | 1 + ...RQjv.js => HomePriceChartCard-fWObxGTO.js} | 2 +- ...alms-ecJ2QA-S.js => KaiRealms-DHJBzHvC.js} | 4 +- dist/assets/KaiVohApp-5YpSzMzY.js | 88 - dist/assets/KaiVohApp-Brroi08x.css | 1 + dist/assets/KaiVohApp-CQXUiNpZ.js | 88 + dist/assets/KaiVohApp-DKKSrc21.css | 1 - ...al-Dow3Zyvd.js => KaiVohModal-DqDHdaQ-.js} | 4 +- ...{PShort-X0g94feB.js => PShort-slgITYQw.js} | 2 +- ...0ZsD2Wj.js => SealMomentModal-f8C8Q0lx.js} | 2 +- ...P23KDu.js => SigilAuthContext-BnirZa1k.js} | 2 +- ...qH_fA.js => SigilAuthProvider-C1UEo-AB.js} | 2 +- dist/assets/SigilExplorer-CP4TAI36.js | 10 + dist/assets/SigilExplorer-DoaDgoPM.js | 10 - ...-rU6u99u4.js => SigilFeedPage-Cw_jTjxD.js} | 2 +- ...dal-BPTi-9mM.js => SigilModal-BbDF3_i8.js} | 6 +- dist/assets/SigilModal-K2VWyDtQ.js | 1 + dist/assets/SigilModal-YxIFNWqZ.js | 1 - dist/assets/SigilPage-DGeAK086.js | 4727 +++++++++++++++++ dist/assets/SigilPage-DQsaqb9h.js | 4727 ----------------- dist/assets/SigilStreamRoot-BwXADm1k.js | 5 - dist/assets/SigilStreamRoot-CBX3QUu7.js | 5 + dist/assets/SigilStreamRoot-CMINiR-y.js | 1 - dist/assets/SigilStreamRoot-x8sOAsox.js | 1 + ...-DwmwJ3uQ.js => VerifierFrame-CHXAebtX.js} | 2 +- ...age--NFGTcAp.js => VerifyPage-CX-VsP3T.js} | 2 +- .../__vite-browser-external-9QrF9xhr.js | 1 - .../__vite-browser-external-BoQFItYi.js | 1 + ...undler-Dg82q-6n.js => bundler-C2y9Epw0.js} | 2 +- ...as-C8iS8lfg.js => html2canvas-0TkOoakt.js} | 2 +- dist/assets/html2canvas-CnbWGvbk.js | 1 + dist/assets/html2canvas-Dj67eAhk.js | 1 - dist/assets/index-BoEZKnmf.js | 792 --- dist/assets/index-BoQy35uR.js | 792 +++ dist/assets/jszip.min-D1NvOfAN.js | 1 + dist/assets/jszip.min-RVhfVcpx.js | 1 - ...pes-Cw0kCKc2.js => prop-types-ClmeRyhJ.js} | 2 +- dist/assets/sigilUrl-9JGLn-DM.js | 1 + dist/assets/sigilUrl-BXgw6BQW.js | 1 - ...ils-JvRFTlCm.js => sigilUtils-CXDCM9py.js} | 2 +- ...vgMeta-BIHnCdiq.js => svgMeta-BUk09RQ4.js} | 2 +- ...vgMeta-BwcXLxxI.js => svgMeta-Dbcv8eR6.js} | 2 +- ...{ticker-eo_G7AgT.js => ticker-JEnF9btM.js} | 2 +- ...s-Sqjhysd2.js => useFastPress-CQlCk0xT.js} | 2 +- dist/assets/useValuation-BNly3bJK.js | 1 - dist/assets/useValuation-BOC9WGte.js | 1 + ...AS-BovqgYOx.js => webauthnKAS--_8CNTOP.js} | 2 +- dist/assets/{x-CmijL4ZY.js => x-CZulwBSL.js} | 2 +- dist/index.html | 2 +- dist/sw.js | 2 +- node_modules/.package-lock.json | 235 +- .../@eslint-community/eslint-utils/index.js | 19 +- .../eslint-utils/index.js.map | 2 +- .../@eslint-community/eslint-utils/index.mjs | 19 +- .../eslint-utils/index.mjs.map | 2 +- .../eslint-utils/package.json | 2 +- node_modules/@react-three/fiber/CHANGELOG.md | 6 + .../declarations/src/core/reconciler.d.ts | 2 +- .../dist/declarations/src/core/utils.d.ts | 85 +- .../fiber/dist/react-three-fiber.cjs.dev.js | 4 +- .../fiber/dist/react-three-fiber.cjs.prod.js | 4 +- .../fiber/dist/react-three-fiber.esm.js | 6 +- .../dist/react-three-fiber-native.cjs.dev.js | 4 +- .../dist/react-three-fiber-native.cjs.prod.js | 4 +- .../dist/react-three-fiber-native.esm.js | 6 +- node_modules/@react-three/fiber/package.json | 14 +- .../immer/dist/cjs/immer.cjs.development.js | 29 +- .../dist/cjs/immer.cjs.development.js.map | 2 +- .../immer/dist/cjs/immer.cjs.production.js | 2 +- .../dist/cjs/immer.cjs.production.js.map | 2 +- .../node_modules/immer/dist/immer.d.ts | 5 +- .../immer/dist/immer.legacy-esm.js | 29 +- .../immer/dist/immer.legacy-esm.js.map | 2 +- .../toolkit/node_modules/immer/dist/immer.mjs | 29 +- .../node_modules/immer/dist/immer.mjs.map | 2 +- .../immer/dist/immer.production.mjs | 2 +- .../immer/dist/immer.production.mjs.map | 2 +- .../toolkit/node_modules/immer/package.json | 6 +- .../node_modules/immer/src/core/finalize.ts | 40 +- .../node_modules/immer/src/core/proxy.ts | 9 +- .../node_modules/immer/src/plugins/mapset.ts | 5 +- .../node_modules/immer/src/plugins/patches.ts | 2 +- .../immer/src/types/types-external.ts | 14 +- .../@types/react-reconciler/README.md | 2 +- .../@types/react-reconciler/constants.d.ts | 1 - .../@types/react-reconciler/index.d.ts | 146 +- .../@types/react-reconciler/package.json | 6 +- .../eslint-plugin/dist/index.d.ts | 533 +- .../eslint-plugin/dist/raw-plugin.d.ts | 533 +- .../eslint-plugin/dist/raw-plugin.js | 1 + .../rules/adjacent-overload-signatures.d.ts | 4 +- .../eslint-plugin/dist/rules/array-type.d.ts | 4 +- .../dist/rules/await-thenable.d.ts | 4 +- .../dist/rules/ban-ts-comment.d.ts | 4 +- .../dist/rules/ban-tslint-comment.d.ts | 4 +- .../rules/class-literal-property-style.d.ts | 4 +- .../dist/rules/class-methods-use-this.d.ts | 4 +- .../consistent-generic-constructors.d.ts | 4 +- .../rules/consistent-generic-constructors.js | 3 +- .../consistent-indexed-object-style.d.ts | 4 +- .../dist/rules/consistent-return.d.ts | 4 +- .../rules/consistent-type-assertions.d.ts | 4 +- .../rules/consistent-type-definitions.d.ts | 4 +- .../dist/rules/consistent-type-exports.d.ts | 4 +- .../dist/rules/consistent-type-imports.d.ts | 4 +- .../dist/rules/default-param-last.d.ts | 4 +- .../dist/rules/dot-notation.d.ts | 4 +- .../rules/explicit-function-return-type.d.ts | 4 +- .../rules/explicit-member-accessibility.d.ts | 4 +- .../rules/explicit-module-boundary-types.d.ts | 4 +- .../eslint-plugin/dist/rules/index.d.ts | 532 +- .../dist/rules/init-declarations.d.ts | 4 +- .../eslint-plugin/dist/rules/max-params.d.ts | 4 +- .../dist/rules/member-ordering.d.ts | 4 +- .../dist/rules/method-signature-style.d.ts | 4 +- .../dist/rules/naming-convention.d.ts | 4 +- .../dist/rules/no-array-constructor.d.ts | 4 +- .../dist/rules/no-array-delete.d.ts | 4 +- .../dist/rules/no-base-to-string.d.ts | 4 +- .../no-confusing-non-null-assertion.d.ts | 4 +- .../rules/no-confusing-void-expression.d.ts | 4 +- .../dist/rules/no-deprecated.d.ts | 4 +- .../dist/rules/no-dupe-class-members.d.ts | 4 +- .../dist/rules/no-dupe-class-members.js | 3 +- .../dist/rules/no-duplicate-enum-values.d.ts | 4 +- .../rules/no-duplicate-type-constituents.d.ts | 4 +- .../dist/rules/no-dynamic-delete.d.ts | 5 +- .../dist/rules/no-dynamic-delete.js | 18 - .../dist/rules/no-empty-function.d.ts | 4 +- .../dist/rules/no-empty-interface.d.ts | 4 +- .../dist/rules/no-empty-object-type.d.ts | 4 +- .../dist/rules/no-explicit-any.d.ts | 4 +- .../rules/no-extra-non-null-assertion.d.ts | 4 +- .../dist/rules/no-extraneous-class.d.ts | 4 +- .../dist/rules/no-floating-promises.d.ts | 4 +- .../dist/rules/no-for-in-array.d.ts | 4 +- .../dist/rules/no-implied-eval.d.ts | 4 +- .../rules/no-import-type-side-effects.d.ts | 4 +- .../dist/rules/no-inferrable-types.d.ts | 4 +- .../dist/rules/no-invalid-this.d.ts | 4 +- .../dist/rules/no-invalid-void-type.d.ts | 4 +- .../dist/rules/no-loop-func.d.ts | 4 +- .../dist/rules/no-loss-of-precision.d.ts | 4 +- .../dist/rules/no-magic-numbers.d.ts | 4 +- .../rules/no-meaningless-void-operator.d.ts | 4 +- .../dist/rules/no-misused-new.d.ts | 4 +- .../dist/rules/no-misused-promises.d.ts | 4 +- .../dist/rules/no-misused-promises.js | 3 +- .../dist/rules/no-misused-spread.d.ts | 4 +- .../dist/rules/no-mixed-enums.d.ts | 4 +- .../dist/rules/no-namespace.d.ts | 4 +- ...-non-null-asserted-nullish-coalescing.d.ts | 4 +- .../no-non-null-asserted-optional-chain.d.ts | 4 +- .../dist/rules/no-non-null-assertion.d.ts | 4 +- .../dist/rules/no-redeclare.d.ts | 4 +- .../eslint-plugin/dist/rules/no-redeclare.js | 3 +- .../rules/no-redundant-type-constituents.d.ts | 4 +- .../dist/rules/no-require-imports.d.ts | 4 +- .../dist/rules/no-restricted-imports.d.ts | 4 +- .../dist/rules/no-restricted-types.d.ts | 4 +- .../eslint-plugin/dist/rules/no-shadow.d.ts | 4 +- .../dist/rules/no-this-alias.d.ts | 4 +- .../dist/rules/no-type-alias.d.ts | 4 +- .../eslint-plugin/dist/rules/no-type-alias.js | 3 +- ...o-unnecessary-boolean-literal-compare.d.ts | 4 +- .../dist/rules/no-unnecessary-condition.d.ts | 4 +- ...cessary-parameter-property-assignment.d.ts | 4 +- .../dist/rules/no-unnecessary-qualifier.d.ts | 4 +- .../no-unnecessary-template-expression.d.ts | 4 +- .../rules/no-unnecessary-type-arguments.d.ts | 4 +- .../rules/no-unnecessary-type-assertion.d.ts | 4 +- .../rules/no-unnecessary-type-constraint.d.ts | 4 +- .../rules/no-unnecessary-type-conversion.d.ts | 4 +- .../rules/no-unnecessary-type-parameters.d.ts | 4 +- .../dist/rules/no-unsafe-argument.d.ts | 4 +- .../dist/rules/no-unsafe-assignment.d.ts | 4 +- .../dist/rules/no-unsafe-call.d.ts | 4 +- .../rules/no-unsafe-declaration-merging.d.ts | 4 +- .../dist/rules/no-unsafe-enum-comparison.d.ts | 4 +- .../dist/rules/no-unsafe-function-type.d.ts | 4 +- .../dist/rules/no-unsafe-member-access.d.ts | 4 +- .../dist/rules/no-unsafe-return.d.ts | 4 +- .../dist/rules/no-unsafe-type-assertion.d.ts | 4 +- .../dist/rules/no-unsafe-unary-minus.d.ts | 4 +- .../dist/rules/no-unused-expressions.d.ts | 4 +- .../no-unused-private-class-members.d.ts | 4 +- .../dist/rules/no-unused-vars.d.ts | 4 +- .../dist/rules/no-use-before-define.d.ts | 4 +- .../dist/rules/no-useless-constructor.d.ts | 4 +- .../rules/no-useless-default-assignment.d.ts | 7 +- .../rules/no-useless-default-assignment.js | 74 +- .../dist/rules/no-useless-empty-export.d.ts | 4 +- .../dist/rules/no-var-requires.d.ts | 4 +- .../dist/rules/no-wrapper-object-types.d.ts | 4 +- .../non-nullable-type-assertion-style.d.ts | 4 +- .../dist/rules/only-throw-error.d.ts | 4 +- .../dist/rules/parameter-properties.d.ts | 4 +- .../dist/rules/prefer-as-const.d.ts | 4 +- .../dist/rules/prefer-destructuring.d.ts | 4 +- .../dist/rules/prefer-enum-initializers.d.ts | 4 +- .../eslint-plugin/dist/rules/prefer-find.d.ts | 4 +- .../dist/rules/prefer-for-of.d.ts | 4 +- .../dist/rules/prefer-function-type.d.ts | 4 +- .../dist/rules/prefer-includes.d.ts | 4 +- .../rules/prefer-literal-enum-member.d.ts | 4 +- .../dist/rules/prefer-namespace-keyword.d.ts | 4 +- .../dist/rules/prefer-namespace-keyword.js | 3 +- .../dist/rules/prefer-nullish-coalescing.d.ts | 4 +- .../dist/rules/prefer-nullish-coalescing.js | 3 +- .../analyzeChain.js | 47 +- .../gatherLogicalOperands.d.ts | 7 +- .../gatherLogicalOperands.js | 41 +- .../dist/rules/prefer-optional-chain.d.ts | 4 +- .../rules/prefer-promise-reject-errors.d.ts | 4 +- .../prefer-readonly-parameter-types.d.ts | 4 +- .../dist/rules/prefer-readonly.d.ts | 4 +- .../rules/prefer-reduce-type-parameter.d.ts | 4 +- .../dist/rules/prefer-regexp-exec.d.ts | 4 +- .../dist/rules/prefer-return-this-type.d.ts | 4 +- .../rules/prefer-string-starts-ends-with.d.ts | 4 +- .../dist/rules/prefer-ts-expect-error.d.ts | 4 +- .../dist/rules/promise-function-async.d.ts | 4 +- .../rules/related-getter-setter-pairs.d.ts | 4 +- .../rules/require-array-sort-compare.d.ts | 4 +- .../dist/rules/require-await.d.ts | 4 +- .../dist/rules/restrict-plus-operands.d.ts | 4 +- .../rules/restrict-template-expressions.d.ts | 4 +- .../dist/rules/return-await.d.ts | 4 +- .../dist/rules/sort-type-constituents.d.ts | 4 +- .../rules/strict-boolean-expressions.d.ts | 4 +- .../rules/switch-exhaustiveness-check.d.ts | 4 +- .../dist/rules/triple-slash-reference.d.ts | 4 +- .../eslint-plugin/dist/rules/typedef.d.ts | 4 +- .../dist/rules/unbound-method.d.ts | 4 +- .../dist/rules/unified-signatures.d.ts | 4 +- .../dist/rules/unified-signatures.js | 9 +- ...se-unknown-in-catch-callback-variable.d.ts | 4 +- .../classScopeAnalyzer.js | 2 +- .../eslint-plugin/dist/util/createRule.d.ts | 4 +- .../dist/util/explicitReturnTypeUtils.js | 2 +- .../eslint-plugin/dist/util/misc.js | 5 +- .../eslint-plugin/package.json | 19 +- .../@typescript-eslint/parser/package.json | 10 +- .../project-service/package.json | 6 +- .../dist/referencer/Referencer.js | 3 +- .../scope-manager/package.json | 8 +- .../dist/getParsedConfigFile.js | 5 +- .../tsconfig-utils/package.json | 2 +- .../type-utils/dist/predicates.js | 2 +- .../type-utils/package.json | 12 +- .../@typescript-eslint/types/package.json | 2 +- .../typescript-estree/dist/convert.js | 115 +- .../dist/parseSettings/inferSingleRun.js | 3 - .../typescript-estree/package.json | 12 +- .../utils/dist/eslint-utils/RuleCreator.d.ts | 6 +- .../utils/dist/eslint-utils/RuleCreator.js | 7 +- .../utils/dist/ts-eslint/Config.d.ts | 7 + .../utils/dist/ts-eslint/Rule.d.ts | 4 + .../@typescript-eslint/utils/package.json | 8 +- .../visitor-keys/package.json | 4 +- node_modules/caniuse-lite/package.json | 2 +- node_modules/esquery/README.md | 2 +- node_modules/esquery/dist/esquery.esm.js | 586 +- node_modules/esquery/dist/esquery.esm.min.js | 2 +- .../esquery/dist/esquery.esm.min.js.map | 2 +- node_modules/esquery/dist/esquery.js | 586 +- node_modules/esquery/dist/esquery.lite.js | 586 +- node_modules/esquery/dist/esquery.lite.min.js | 2 +- .../esquery/dist/esquery.lite.min.js.map | 2 +- node_modules/esquery/dist/esquery.min.js | 2 +- node_modules/esquery/dist/esquery.min.js.map | 2 +- node_modules/esquery/package.json | 2 +- node_modules/esquery/parser.js | 471 +- .../scheduler-unstable_mock.development.js | 9 - .../cjs/scheduler-unstable_mock.production.js | 9 - ...cheduler-unstable_post_task.development.js | 5 - ...scheduler-unstable_post_task.production.js | 5 - .../scheduler/cjs/scheduler.development.js | 34 +- .../cjs/scheduler.native.development.js | 15 +- .../cjs/scheduler.native.production.js | 11 +- .../scheduler/cjs/scheduler.production.js | 33 +- node_modules/scheduler/package.json | 2 +- node_modules/ts-api-utils/README.md | 46 - node_modules/ts-api-utils/lib/index.cjs | 185 +- node_modules/ts-api-utils/lib/index.d.cts | 43 +- node_modules/ts-api-utils/lib/index.d.ts | 43 +- node_modules/ts-api-utils/lib/index.js | 185 +- node_modules/ts-api-utils/package.json | 201 +- node_modules/typescript-eslint/package.json | 10 +- node_modules/zod/package.json | 2 +- .../zod/src/v4/classic/from-json-schema.ts | 107 + node_modules/zod/src/v4/classic/schemas.ts | 81 +- .../zod/src/v4/classic/tests/brand.test.ts | 43 + .../zod/src/v4/classic/tests/date.test.ts | 43 +- .../v4/classic/tests/from-json-schema.test.ts | 197 + .../zod/src/v4/classic/tests/function.test.ts | 52 + .../zod/src/v4/classic/tests/index.test.ts | 41 + .../src/v4/classic/tests/instanceof.test.ts | 26 + .../src/v4/classic/tests/intersection.test.ts | 37 +- .../zod/src/v4/classic/tests/json.test.ts | 2 +- .../zod/src/v4/classic/tests/map.test.ts | 134 + .../zod/src/v4/classic/tests/object.test.ts | 35 +- .../zod/src/v4/classic/tests/optional.test.ts | 87 + .../zod/src/v4/classic/tests/partial.test.ts | 87 + .../zod/src/v4/classic/tests/pickomit.test.ts | 84 + .../zod/src/v4/classic/tests/record.test.ts | 75 + .../v4/classic/tests/recursive-types.test.ts | 2 +- .../zod/src/v4/classic/tests/refine.test.ts | 109 +- .../src/v4/classic/tests/registries.test.ts | 35 + .../zod/src/v4/classic/tests/string.test.ts | 23 + .../v4/classic/tests/to-json-schema.test.ts | 246 +- .../zod/src/v4/classic/tests/tuple.test.ts | 6 +- node_modules/zod/src/v4/core/api.ts | 117 + node_modules/zod/src/v4/core/checks.ts | 10 +- node_modules/zod/src/v4/core/core.ts | 14 +- node_modules/zod/src/v4/core/errors.ts | 26 +- .../zod/src/v4/core/json-schema-generator.ts | 6 +- .../zod/src/v4/core/json-schema-processors.ts | 59 +- node_modules/zod/src/v4/core/regexes.ts | 5 +- node_modules/zod/src/v4/core/registries.ts | 3 - node_modules/zod/src/v4/core/schemas.ts | 169 +- .../zod/src/v4/core/tests/extend.test.ts | 6 +- .../zod/src/v4/core/tests/locales/en.test.ts | 2 +- .../zod/src/v4/core/tests/locales/nl.test.ts | 4 +- .../zod/src/v4/core/tests/locales/tr.test.ts | 4 +- .../zod/src/v4/core/to-json-schema.ts | 127 +- node_modules/zod/src/v4/core/util.ts | 59 +- node_modules/zod/src/v4/core/versions.ts | 4 +- node_modules/zod/src/v4/locales/ar.ts | 44 +- node_modules/zod/src/v4/locales/az.ts | 44 +- node_modules/zod/src/v4/locales/be.ts | 46 +- node_modules/zod/src/v4/locales/bg.ts | 46 +- node_modules/zod/src/v4/locales/ca.ts | 45 +- node_modules/zod/src/v4/locales/cs.ts | 66 +- node_modules/zod/src/v4/locales/da.ts | 70 +- node_modules/zod/src/v4/locales/de.ts | 46 +- node_modules/zod/src/v4/locales/en.ts | 45 +- node_modules/zod/src/v4/locales/eo.ts | 47 +- node_modules/zod/src/v4/locales/es.ts | 108 +- node_modules/zod/src/v4/locales/fa.ts | 46 +- node_modules/zod/src/v4/locales/fi.ts | 44 +- node_modules/zod/src/v4/locales/fr-CA.ts | 44 +- node_modules/zod/src/v4/locales/fr.ts | 46 +- node_modules/zod/src/v4/locales/he.ts | 38 +- node_modules/zod/src/v4/locales/hu.ts | 47 +- node_modules/zod/src/v4/locales/id.ts | 44 +- node_modules/zod/src/v4/locales/index.ts | 2 + node_modules/zod/src/v4/locales/is.ts | 46 +- node_modules/zod/src/v4/locales/it.ts | 47 +- node_modules/zod/src/v4/locales/ja.ts | 46 +- node_modules/zod/src/v4/locales/ka.ts | 59 +- node_modules/zod/src/v4/locales/km.ts | 47 +- node_modules/zod/src/v4/locales/ko.ts | 44 +- node_modules/zod/src/v4/locales/lt.ts | 86 +- node_modules/zod/src/v4/locales/mk.ts | 47 +- node_modules/zod/src/v4/locales/ms.ts | 45 +- node_modules/zod/src/v4/locales/nl.ts | 65 +- node_modules/zod/src/v4/locales/no.ts | 46 +- node_modules/zod/src/v4/locales/ota.ts | 48 +- node_modules/zod/src/v4/locales/pl.ts | 46 +- node_modules/zod/src/v4/locales/ps.ts | 45 +- node_modules/zod/src/v4/locales/pt.ts | 45 +- node_modules/zod/src/v4/locales/ru.ts | 46 +- node_modules/zod/src/v4/locales/sl.ts | 46 +- node_modules/zod/src/v4/locales/sv.ts | 46 +- node_modules/zod/src/v4/locales/ta.ts | 47 +- node_modules/zod/src/v4/locales/th.ts | 47 +- node_modules/zod/src/v4/locales/tr.ts | 44 +- node_modules/zod/src/v4/locales/uk.ts | 47 +- node_modules/zod/src/v4/locales/ur.ts | 47 +- node_modules/zod/src/v4/locales/vi.ts | 46 +- node_modules/zod/src/v4/locales/yo.ts | 45 +- node_modules/zod/src/v4/locales/zh-CN.ts | 47 +- node_modules/zod/src/v4/locales/zh-TW.ts | 44 +- node_modules/zod/src/v4/mini/coerce.ts | 5 + node_modules/zod/src/v4/mini/iso.ts | 4 + node_modules/zod/src/v4/mini/schemas.ts | 159 +- .../zod/src/v4/mini/tests/brand.test.ts | 43 + .../zod/src/v4/mini/tests/index.test.ts | 41 + .../zod/src/v4/mini/tests/object.test.ts | 27 + .../src/v4/mini/tests/standard-schema.test.ts | 35 +- .../zod/v4/classic/from-json-schema.cjs | 99 + .../zod/v4/classic/from-json-schema.d.cts | 2 + .../zod/v4/classic/from-json-schema.d.ts | 2 + .../zod/v4/classic/from-json-schema.js | 99 + node_modules/zod/v4/classic/schemas.cjs | 42 +- node_modules/zod/v4/classic/schemas.d.cts | 27 +- node_modules/zod/v4/classic/schemas.d.ts | 27 +- node_modules/zod/v4/classic/schemas.js | 39 +- node_modules/zod/v4/core/api.cjs | 113 + node_modules/zod/v4/core/api.js | 113 + node_modules/zod/v4/core/checks.cjs | 10 +- node_modules/zod/v4/core/checks.js | 10 +- node_modules/zod/v4/core/core.d.cts | 20 +- node_modules/zod/v4/core/core.d.ts | 20 +- node_modules/zod/v4/core/errors.d.cts | 3 +- node_modules/zod/v4/core/errors.d.ts | 3 +- .../zod/v4/core/json-schema-generator.d.cts | 7 +- .../zod/v4/core/json-schema-generator.d.ts | 7 +- .../zod/v4/core/json-schema-processors.cjs | 53 +- .../zod/v4/core/json-schema-processors.js | 53 +- node_modules/zod/v4/core/regexes.cjs | 5 +- node_modules/zod/v4/core/regexes.js | 5 +- node_modules/zod/v4/core/registries.cjs | 3 - node_modules/zod/v4/core/registries.js | 3 - node_modules/zod/v4/core/schemas.cjs | 120 +- node_modules/zod/v4/core/schemas.d.cts | 17 +- node_modules/zod/v4/core/schemas.d.ts | 17 +- node_modules/zod/v4/core/schemas.js | 118 +- node_modules/zod/v4/core/to-json-schema.cjs | 112 +- node_modules/zod/v4/core/to-json-schema.d.cts | 5 +- node_modules/zod/v4/core/to-json-schema.d.ts | 5 +- node_modules/zod/v4/core/to-json-schema.js | 112 +- node_modules/zod/v4/core/util.cjs | 55 +- node_modules/zod/v4/core/util.d.cts | 1 + node_modules/zod/v4/core/util.d.ts | 1 + node_modules/zod/v4/core/util.js | 54 +- node_modules/zod/v4/core/versions.cjs | 4 +- node_modules/zod/v4/core/versions.d.cts | 2 +- node_modules/zod/v4/core/versions.d.ts | 2 +- node_modules/zod/v4/core/versions.js | 4 +- node_modules/zod/v4/locales/ar.cjs | 38 +- node_modules/zod/v4/locales/ar.js | 38 +- node_modules/zod/v4/locales/az.cjs | 38 +- node_modules/zod/v4/locales/az.js | 38 +- node_modules/zod/v4/locales/be.cjs | 40 +- node_modules/zod/v4/locales/be.js | 40 +- node_modules/zod/v4/locales/bg.cjs | 43 +- node_modules/zod/v4/locales/bg.d.cts | 4 +- node_modules/zod/v4/locales/bg.d.ts | 1 - node_modules/zod/v4/locales/bg.js | 40 +- node_modules/zod/v4/locales/ca.cjs | 39 +- node_modules/zod/v4/locales/ca.js | 39 +- node_modules/zod/v4/locales/cs.cjs | 60 +- node_modules/zod/v4/locales/cs.js | 60 +- node_modules/zod/v4/locales/da.cjs | 62 +- node_modules/zod/v4/locales/da.js | 62 +- node_modules/zod/v4/locales/de.cjs | 40 +- node_modules/zod/v4/locales/de.js | 40 +- node_modules/zod/v4/locales/en.cjs | 42 +- node_modules/zod/v4/locales/en.d.cts | 4 +- node_modules/zod/v4/locales/en.d.ts | 1 - node_modules/zod/v4/locales/en.js | 39 +- node_modules/zod/v4/locales/eo.cjs | 44 +- node_modules/zod/v4/locales/eo.d.cts | 4 +- node_modules/zod/v4/locales/eo.d.ts | 1 - node_modules/zod/v4/locales/eo.js | 41 +- node_modules/zod/v4/locales/es.cjs | 101 +- node_modules/zod/v4/locales/es.js | 101 +- node_modules/zod/v4/locales/fa.cjs | 40 +- node_modules/zod/v4/locales/fa.js | 40 +- node_modules/zod/v4/locales/fi.cjs | 38 +- node_modules/zod/v4/locales/fi.js | 38 +- node_modules/zod/v4/locales/fr-CA.cjs | 38 +- node_modules/zod/v4/locales/fr-CA.js | 38 +- node_modules/zod/v4/locales/fr.cjs | 40 +- node_modules/zod/v4/locales/fr.js | 40 +- node_modules/zod/v4/locales/he.cjs | 36 +- node_modules/zod/v4/locales/he.js | 36 +- node_modules/zod/v4/locales/hu.cjs | 41 +- node_modules/zod/v4/locales/hu.js | 41 +- node_modules/zod/v4/locales/id.cjs | 38 +- node_modules/zod/v4/locales/id.js | 38 +- node_modules/zod/v4/locales/index.cjs | 6 +- node_modules/zod/v4/locales/index.d.cts | 2 + node_modules/zod/v4/locales/index.d.ts | 2 + node_modules/zod/v4/locales/index.js | 2 + node_modules/zod/v4/locales/is.cjs | 43 +- node_modules/zod/v4/locales/is.d.cts | 4 +- node_modules/zod/v4/locales/is.d.ts | 1 - node_modules/zod/v4/locales/is.js | 40 +- node_modules/zod/v4/locales/it.cjs | 41 +- node_modules/zod/v4/locales/it.js | 41 +- node_modules/zod/v4/locales/ja.cjs | 40 +- node_modules/zod/v4/locales/ja.js | 40 +- node_modules/zod/v4/locales/ka.cjs | 54 +- node_modules/zod/v4/locales/ka.d.cts | 4 +- node_modules/zod/v4/locales/ka.d.ts | 1 - node_modules/zod/v4/locales/ka.js | 51 +- node_modules/zod/v4/locales/km.cjs | 41 +- node_modules/zod/v4/locales/km.js | 41 +- node_modules/zod/v4/locales/ko.cjs | 38 +- node_modules/zod/v4/locales/ko.js | 38 +- node_modules/zod/v4/locales/lt.cjs | 84 +- node_modules/zod/v4/locales/lt.d.cts | 4 +- node_modules/zod/v4/locales/lt.d.ts | 1 - node_modules/zod/v4/locales/lt.js | 81 +- node_modules/zod/v4/locales/mk.cjs | 41 +- node_modules/zod/v4/locales/mk.js | 41 +- node_modules/zod/v4/locales/ms.cjs | 39 +- node_modules/zod/v4/locales/ms.js | 39 +- node_modules/zod/v4/locales/nl.cjs | 57 +- node_modules/zod/v4/locales/nl.js | 57 +- node_modules/zod/v4/locales/no.cjs | 40 +- node_modules/zod/v4/locales/no.js | 40 +- node_modules/zod/v4/locales/ota.cjs | 42 +- node_modules/zod/v4/locales/ota.js | 42 +- node_modules/zod/v4/locales/pl.cjs | 40 +- node_modules/zod/v4/locales/pl.js | 40 +- node_modules/zod/v4/locales/ps.cjs | 40 +- node_modules/zod/v4/locales/ps.js | 40 +- node_modules/zod/v4/locales/pt.cjs | 40 +- node_modules/zod/v4/locales/pt.js | 40 +- node_modules/zod/v4/locales/ru.cjs | 40 +- node_modules/zod/v4/locales/ru.js | 40 +- node_modules/zod/v4/locales/sl.cjs | 40 +- node_modules/zod/v4/locales/sl.js | 40 +- node_modules/zod/v4/locales/sv.cjs | 40 +- node_modules/zod/v4/locales/sv.js | 40 +- node_modules/zod/v4/locales/ta.cjs | 41 +- node_modules/zod/v4/locales/ta.js | 41 +- node_modules/zod/v4/locales/th.cjs | 41 +- node_modules/zod/v4/locales/th.js | 41 +- node_modules/zod/v4/locales/tr.cjs | 41 +- node_modules/zod/v4/locales/tr.d.cts | 4 +- node_modules/zod/v4/locales/tr.d.ts | 1 - node_modules/zod/v4/locales/tr.js | 38 +- node_modules/zod/v4/locales/uk.cjs | 41 +- node_modules/zod/v4/locales/uk.js | 41 +- node_modules/zod/v4/locales/ur.cjs | 41 +- node_modules/zod/v4/locales/ur.js | 41 +- node_modules/zod/v4/locales/vi.cjs | 40 +- node_modules/zod/v4/locales/vi.js | 40 +- node_modules/zod/v4/locales/yo.cjs | 40 +- node_modules/zod/v4/locales/yo.js | 40 +- node_modules/zod/v4/locales/zh-CN.cjs | 41 +- node_modules/zod/v4/locales/zh-CN.js | 41 +- node_modules/zod/v4/locales/zh-TW.cjs | 38 +- node_modules/zod/v4/locales/zh-TW.js | 38 +- node_modules/zod/v4/mini/coerce.cjs | 5 + node_modules/zod/v4/mini/coerce.js | 5 + node_modules/zod/v4/mini/iso.cjs | 4 + node_modules/zod/v4/mini/iso.js | 4 + node_modules/zod/v4/mini/schemas.cjs | 131 +- node_modules/zod/v4/mini/schemas.d.cts | 16 +- node_modules/zod/v4/mini/schemas.d.ts | 16 +- node_modules/zod/v4/mini/schemas.js | 128 +- package-lock.json | 230 +- public/sw.js | 2 +- scripts/dev-api.mjs | 7 - src/components/KaiVoh/StoryRecorder.tsx | 4 +- .../KaiVoh/styles/StoryRecorder.css | 8 +- .../SigilExplorer/SigilExplorer.tsx | 3 +- src/components/SigilExplorer/apiClient.ts | 16 +- src/components/SigilExplorer/inhaleQueue.ts | 5 +- src/components/SigilExplorer/remotePull.ts | 7 +- src/components/SigilExplorer/urlHealth.ts | 7 +- src/utils/sigilExplorerSync.ts | 3 +- src/version.ts | 2 +- vercel.json | 3 +- 556 files changed, 16344 insertions(+), 12296 deletions(-) delete mode 100644 api/lahmahtor/[[...path]].js delete mode 100644 api/proxy/lahmahtorProxy.mjs delete mode 100644 dist/assets/EternalKlock-C1Jyi7s7.js create mode 100644 dist/assets/EternalKlock-CLK839TD.js delete mode 100644 dist/assets/EternalKlock-CQ5bLrcj.js create mode 100644 dist/assets/EternalKlock-CmXqg4DF.js rename dist/assets/{HomePriceChartCard-Dhq2RQjv.js => HomePriceChartCard-fWObxGTO.js} (99%) rename dist/assets/{KaiRealms-ecJ2QA-S.js => KaiRealms-DHJBzHvC.js} (98%) delete mode 100644 dist/assets/KaiVohApp-5YpSzMzY.js create mode 100644 dist/assets/KaiVohApp-Brroi08x.css create mode 100644 dist/assets/KaiVohApp-CQXUiNpZ.js delete mode 100644 dist/assets/KaiVohApp-DKKSrc21.css rename dist/assets/{KaiVohModal-Dow3Zyvd.js => KaiVohModal-DqDHdaQ-.js} (92%) rename dist/assets/{PShort-X0g94feB.js => PShort-slgITYQw.js} (53%) rename dist/assets/{SealMomentModal-C0ZsD2Wj.js => SealMomentModal-f8C8Q0lx.js} (99%) rename dist/assets/{SigilAuthContext-CLP23KDu.js => SigilAuthContext-BnirZa1k.js} (73%) rename dist/assets/{SigilAuthProvider-CT0qH_fA.js => SigilAuthProvider-C1UEo-AB.js} (91%) create mode 100644 dist/assets/SigilExplorer-CP4TAI36.js delete mode 100644 dist/assets/SigilExplorer-DoaDgoPM.js rename dist/assets/{SigilFeedPage-rU6u99u4.js => SigilFeedPage-Cw_jTjxD.js} (92%) rename dist/assets/{SigilModal-BPTi-9mM.js => SigilModal-BbDF3_i8.js} (88%) create mode 100644 dist/assets/SigilModal-K2VWyDtQ.js delete mode 100644 dist/assets/SigilModal-YxIFNWqZ.js create mode 100644 dist/assets/SigilPage-DGeAK086.js delete mode 100644 dist/assets/SigilPage-DQsaqb9h.js delete mode 100644 dist/assets/SigilStreamRoot-BwXADm1k.js create mode 100644 dist/assets/SigilStreamRoot-CBX3QUu7.js delete mode 100644 dist/assets/SigilStreamRoot-CMINiR-y.js create mode 100644 dist/assets/SigilStreamRoot-x8sOAsox.js rename dist/assets/{VerifierFrame-DwmwJ3uQ.js => VerifierFrame-CHXAebtX.js} (99%) rename dist/assets/{VerifyPage--NFGTcAp.js => VerifyPage-CX-VsP3T.js} (99%) delete mode 100644 dist/assets/__vite-browser-external-9QrF9xhr.js create mode 100644 dist/assets/__vite-browser-external-BoQFItYi.js rename dist/assets/{bundler-Dg82q-6n.js => bundler-C2y9Epw0.js} (99%) rename dist/assets/{html2canvas-C8iS8lfg.js => html2canvas-0TkOoakt.js} (99%) create mode 100644 dist/assets/html2canvas-CnbWGvbk.js delete mode 100644 dist/assets/html2canvas-Dj67eAhk.js delete mode 100644 dist/assets/index-BoEZKnmf.js create mode 100644 dist/assets/index-BoQy35uR.js create mode 100644 dist/assets/jszip.min-D1NvOfAN.js delete mode 100644 dist/assets/jszip.min-RVhfVcpx.js rename dist/assets/{prop-types-Cw0kCKc2.js => prop-types-ClmeRyhJ.js} (92%) create mode 100644 dist/assets/sigilUrl-9JGLn-DM.js delete mode 100644 dist/assets/sigilUrl-BXgw6BQW.js rename dist/assets/{sigilUtils-JvRFTlCm.js => sigilUtils-CXDCM9py.js} (89%) rename dist/assets/{svgMeta-BIHnCdiq.js => svgMeta-BUk09RQ4.js} (79%) rename dist/assets/{svgMeta-BwcXLxxI.js => svgMeta-Dbcv8eR6.js} (98%) rename dist/assets/{ticker-eo_G7AgT.js => ticker-JEnF9btM.js} (99%) rename dist/assets/{useFastPress-Sqjhysd2.js => useFastPress-CQlCk0xT.js} (80%) delete mode 100644 dist/assets/useValuation-BNly3bJK.js create mode 100644 dist/assets/useValuation-BOC9WGte.js rename dist/assets/{webauthnKAS-BovqgYOx.js => webauthnKAS--_8CNTOP.js} (98%) rename dist/assets/{x-CmijL4ZY.js => x-CZulwBSL.js} (55%) diff --git a/.DS_Store b/.DS_Store index 15fd422a60019bbce55aa4c04402b1666caacd8e..658717d4441e7d8ef8b6d09c54f974845092299e 100644 GIT binary patch literal 14340 zcmeHNTW`}a6#lZcFg7;ExDK%?;(ZrDhzW#Lpp%$(0WmJ(X{;BZTSu#|MSz6VHy(N9 zzwt+Sgzq?Uo3u@@h#28i_DLN(Io}ui#OK%moCmesbzl|11e3_w)6BjCuE@Y4*Cn+b z<1BHQ?lSRw7RaE80z@eK&*ONbSjuLKr3|l8k;Hdk?8`58umqUoecn>HD$`rMM@g01%ramZunbrRECc@^ z1M=x}zf`6Gt{xsCck^wxxg2E*|_&s~H z^zw)|$KJlrzF($1AQP+~^T-}ebIpcuCw8ofzYQmC-F#cEXqL=iXE=>DE7NUw8*iO# zEOxjm5#b!aQl|4Vs_vShxh@<8xpF(ylOC7h_gcOuIp#9*N>R+kJj(ur{+hG%eRBa^ z!Ur|y$uciSabt`v8eCh=$y5kuu;*Oi6y5B6F=Owgo5nb%Fc6GAECZH-f1H79)IY)RkXjpWSwnxw_}-ns8v2Z`$C-4M zKk=Pq9w0V;@b&i!@-5H%#<1Pb!1GS=dCgcsg>(08xW)JnYPc3?kz@=1s}rut=mxMH zs5y;$hT7ronrSQSP=E1O#iuD4iln!88qK(mL%h}I%+k#7WPciJWXS*?;5=sqUc^Oa z&oU=46XPIyYNQiw*kma{`~!(Sn2EC={WQKr0}F6fEFS0e;`>Bmqb&;00qI%CJjWYF zZ_UGO2zv*Nv`ZHiGvZHwjC%8A=N-8_LNR7e2Gv#bFd4wuz(VYo_|5WS+OpS7qTvyJ zpA5twQ6F4ejen{Qr;e;`ZC4;j7R;Tl1=6@_i2V}JXD>8jCBwqRW5+DV#k|FYU! zC_R6VZ&zYUHQEWW77@K5X8gnGt2sCwiB)(ga}>xL&pzjt-Nt|!@y22FZSoMt8jON0 zwD7RR-r%i$Mf3++1v3~KO>@o7*+~2ioE$at{+izw*ZOvuWCie5)QB;{ZVsohW@Wk~ zUTr_Gk~3MOtE!$NtEx-1A7zfBtkIl|qPJ#dwhMO6PrrM`<6Nm`r#AjbdK#|E{=aoj z)+6@+8;`>(Xc@2!49|d*NbjZ}u)Py;57}$yGQDQf2kWZp%+yvqO0^Y_e`G7(nyx33 t*HXT$dr~!JxoS%Jmo@>m?kBSTf9IWEo#GbFFLW^WVf}xJar}e+|8Ja=lJ)=q literal 8196 zcmeHMOHUL*5UyqyndOy*VC3cmuYmXnN{q?MBasBeutsCltos;YV0LD+4=@nSUNzCH zC;bn4@uFw{f&at1iGI~HVE4@I#e*T*O}cBkr@pT0udBPK7a|gio!TX$Ng}e4S>}gO zq$GaNIg$FJmMKU9Jgs^`wc-U8)bj~#(_k1d3>XFs1BL;^z-eFrXErCR$GIQAHKk#| zFz{b8!25%Z%(4*4ZYbr}fkIvZAhT$e3D5G=AJXOq$U-E$p+pOk2%(T6R76({5#1a_ z2*>+Eq~8r?2qz&eqo2sKh;Aq%x_Ag%s*@;$(v*e)!$6XODKuqimbS>Hwtj!lwy?b3 z{**}qN00TWOl|x%fvHdjPY$(oZ00+#2MTuZ1na_aowRs|1W zFwTSQS=G-{4SKCO*R+g&RX_90DeSx8stq2hV8N$nsBfXR6SpIN#PEX>Swk<+p}&nj z>g4HT>D!56hQM+exEW}>(072W#~BcIjPpTSqg7g>6}m%3l(V!>%eo~Voip zoNKg!QEtfE!!&-FRWYOZoQK6GJZmHKEPC*|g*FGZ6n+UFYh0ayZU^zmv5*q~nwL4+ z#0=a5Z|iahUX{KQh=x67{YG$p{TIZ%20!1Zgv{$kMaYb}W_hA*sKE?3H* zJ3PE{bz$1RHh(m2A1+*=m277x-JOj@%Ezd66e*=Mc~)X^eGb@ciBacpGbgcx(m9u$N0)rE?^uhg76os%rR- zryzOz=Ed8?x(s2pkBO8%ctm`7$W0a{k1WuGLT?pJDNy_^xduKSk!mdfiY;2nu-}hm_ZG$di8<;@O5OV+xV%h7v7EfBlC5 XbN=Hrj4lz$F9&n}Yu^t4?)m=Uq diff --git a/api/lahmahtor/[[...path]].js b/api/lahmahtor/[[...path]].js deleted file mode 100644 index 20df36015..000000000 --- a/api/lahmahtor/[[...path]].js +++ /dev/null @@ -1,15 +0,0 @@ -import { handleLahmahtorProxy } from "../proxy/lahmahtorProxy.mjs"; - -function buildRequestUrl(req) { - const host = req.headers?.host ? `http://${req.headers.host}` : "http://localhost"; - return new URL(req.url || "/", host); -} - -export default async function handler(req, res) { - const url = buildRequestUrl(req); - await handleLahmahtorProxy(req, res, url); -} - -export const config = { - runtime: "nodejs", -}; diff --git a/api/proxy/lahmahtorProxy.mjs b/api/proxy/lahmahtorProxy.mjs deleted file mode 100644 index 1c69c6ff5..000000000 --- a/api/proxy/lahmahtorProxy.mjs +++ /dev/null @@ -1,112 +0,0 @@ -// api/proxy/lahmahtorProxy.mjs -const PRIMARY = "https://m.kai.ac"; -const BACKUP = "https://memory.kaiklok.com"; - -const FAILOVER_TIMEOUT_MS = 8000; - -function shouldFailoverStatus(status) { - if (status === 0) return true; // network/unknown - if (status === 404) return true; // route missing on one base - if (status === 408 || status === 429) return true; - if (status >= 500) return true; - return false; -} - -async function readRaw(req) { - const chunks = []; - for await (const chunk of req) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)); - return chunks.length ? Buffer.concat(chunks) : Buffer.alloc(0); -} - -function copyUpstreamHeaders(upHeaders, res) { - for (const [k, v] of upHeaders.entries()) { - const key = k.toLowerCase(); - // skip hop-by-hop / unsafe - if (key === "set-cookie") continue; - if (key === "connection") continue; - if (key === "transfer-encoding") continue; - res.setHeader(k, v); - } -} - -async function fetchWithTimeout(url, init) { - const controller = new AbortController(); - const t = setTimeout(() => controller.abort(), FAILOVER_TIMEOUT_MS); - try { - const res = await fetch(url, { ...init, signal: controller.signal }); - return res; - } finally { - clearTimeout(t); - } -} - -async function proxyOnce(base, req, upstreamPath, rawBody) { - const url = base + upstreamPath; - - // forward minimal safe headers - const headers = new Headers(); - for (const [k, v] of Object.entries(req.headers)) { - if (!v) continue; - const key = k.toLowerCase(); - if (key === "host") continue; - if (key === "connection") continue; - if (key === "content-length") continue; - headers.set(k, Array.isArray(v) ? v.join(",") : v); - } - - const method = (req.method || "GET").toUpperCase(); - const body = method === "GET" || method === "HEAD" ? undefined : rawBody; - - return fetchWithTimeout(url, { - method, - headers, - body, - redirect: "manual", - }); -} - -/** - * Same-origin handler: - * /api/lahmahtor/* -> https://align.kaiklok.com/* (failover to https://m.phi.network/*) - */ -export async function handleLahmahtorProxy(req, res, url) { - const method = (req.method || "GET").toUpperCase(); - - // Strip /api/lahmahtor prefix - const upstreamPath = url.pathname.replace(/^\/api\/lahmahtor/, "") + (url.search || ""); - const path = upstreamPath.startsWith("/") ? upstreamPath : `/${upstreamPath}`; - - const rawBody = method === "GET" || method === "HEAD" ? Buffer.alloc(0) : await readRaw(req); - - let primaryRes = null; - try { - primaryRes = await proxyOnce(PRIMARY, req, path, rawBody); - } catch { - primaryRes = null; - } - - let finalRes = primaryRes; - - if (!finalRes || shouldFailoverStatus(finalRes.status)) { - try { - const backupRes = await proxyOnce(BACKUP, req, path, rawBody); - // Prefer backup if primary missing/unreachable OR backup ok - if (!finalRes || backupRes.ok) finalRes = backupRes; - } catch { - // keep whatever we had - } - } - - if (!finalRes) { - res.statusCode = 502; - res.setHeader("Content-Type", "application/json"); - res.end(JSON.stringify({ ok: false, error: "lahmahtor_upstream_unreachable" })); - return; - } - - res.statusCode = finalRes.status; - copyUpstreamHeaders(finalRes.headers, res); - - const buf = Buffer.from(await finalRes.arrayBuffer()); - res.end(buf); -} diff --git a/dist/assets/EternalKlock-C1Jyi7s7.js b/dist/assets/EternalKlock-C1Jyi7s7.js deleted file mode 100644 index 2bde78a8e..000000000 --- a/dist/assets/EternalKlock-C1Jyi7s7.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./EternalKlock-CQ5bLrcj.js";import"./SigilModal-BPTi-9mM.js";import"./SealMomentModal-C0ZsD2Wj.js";import"./webauthnKAS-BovqgYOx.js";export{t as EternalKlock,e as default}; \ No newline at end of file diff --git a/dist/assets/EternalKlock-CLK839TD.js b/dist/assets/EternalKlock-CLK839TD.js new file mode 100644 index 000000000..890d17aa9 --- /dev/null +++ b/dist/assets/EternalKlock-CLK839TD.js @@ -0,0 +1,29 @@ +import{F as e,G as t,I as n,K as r,Kr as i,L as a,N as o,Nr as s,P as c,Q as l,R as u,Rr as d,U as f,V as p,Vt as m,W as h,Y as g,Yr as _,Z as v,ai as y,di as b,li as x,pi as S,q as C,qr as w,si as T,ui as E}from"./index-BoQy35uR.js";import{t as D}from"./SigilModal-BbDF3_i8.js";const O=17491.270421,k=[`Ignition Ark`,`Integration Ark`,`Harmonization Ark`,`Reflektion Ark`,`Purifikation Ark`,`Dream Ark`],A={"Ignition Ark":`#ff1559`,"Integration Ark":`#ff6d00`,"Harmonization Ark":`#ffd900`,"Reflektion Ark":`#00ff66`,"Purifikation Ark":`#05e6ff`,"Dream Ark":`#c300ff`},j={"Ignition Ark":`Ignite`,"Integration Ark":`Integrate`,"Harmonization Ark":`Harmony`,"Reflektion Ark":`Reflekt`,"Purifikation Ark":`Purify`,"Dream Ark":`Dream`},M=O/36,N=M/44,ee=3+Math.sqrt(5);Math.round(ee*1e3),1/ee;var P=S(T(),1),F=S(m(),1),I=120,L=I/2,R=22,z=4.5,B=2,te=L-.5,V=L-B,ne=36,re=-3,ie=3,H=V-2,ae=(R+z+te)/2-4,oe=e=>e*Math.PI/180,U=e=>e.toLowerCase().replace(/\s+/g,`-`);function se(e,t,n){let r=parseInt(e.slice(1),16),i=parseInt(t.slice(1),16),a=r>>16,o=r>>8&255,s=r&255,c=i>>16,l=i>>8&255,u=i&255;return`rgb(${Math.round(a+(c-a)*n)},${Math.round(o+(l-o)*n)},${Math.round(s+(u-s)*n)})`}var W=(e,t,n)=>Math.max(t,Math.min(n,e)),G=e=>{if(!e)return;let t=e.match(/(\d{2})$/);if(!t)return;let n=parseInt(t[1],10);if(Number.isFinite(n))return W(n,0,43)},ce=({hue:e,pulse:t,kaiPulseEternal:n,harmonicDayPercent:r,microCyclePercent:i,dayLabel:a,monthLabel:o,monthDay:s,glowPulse:c=!0,pulseIntervalSec:l=ee,rimFlash:u=!1,rotationOverride:d,solarSpiralStepString:f,solarSpiralStep:p,eternalBeatIndex:m,eternalStepIndex:h})=>{(0,P.useEffect)(()=>{typeof document<`u`&&document.documentElement.style.setProperty(`--cycle`,`${l}s`)},[l]);let g=`${l}s`,_=(n%O+O)%O,v=Number.isFinite(t)?t:_,y=v/O,b=Number.isFinite(r)?r:y*100,x=(v-Math.floor(v/M)*M)%N/N,S=Number.isFinite(i)?i:x*100,C=(v%O+O)%O,w=C/O,T=Math.floor(w*36)%36,E=(T+.5)/36*360,D=typeof d==`number`?d:E,B=360/k.length,ce=Math.floor(D/B)%k.length,le=(ce+1)%k.length,ue=(D-ce*B+360)%360,de=Math.min(1,ue/B),fe=A[k[ce]],pe=A[k[le]],me=se(fe,pe,de),he=2*Math.PI*V,ge=he*(1-b/100),_e=-(S/100)*l,ve=v,ye=[`Aethon`,`Virelai`,`Solari`,`Amarin`,`Kaelus`,`Umbriel`,`Noctura`,`Liora`].indexOf(o)+1,be=ye>0?ye:1,xe=L-14,Se=L,Ce=L+14,we=L+28,Te=Math.floor(_/M)%36,Ee=Number.isFinite(m)?W(m,0,35):Te,De=_-Ee*M,Oe=De/M,ke=Math.floor(De/N)%44,Ae=Number.isFinite(h)?W(h,0,43):ke,je=Ae.toString().padStart(2,`0`),Me=(Ee+.5)/36*360,Ne=`hsl(${T/36*360}, 100%, 50%)`,Pe=`#ebfdff`,Fe=1.6,Ie=te-(R+z)+.5,Le=L-(R+z),Re=Ie*Oe,ze=Le-Re,Be=.82,Ve=L-(R+z)-Ie*Be,He=L,Ue=Ve+6,We=(0,P.useId)().replace(/[^a-zA-Z0-9_-]/g,``)||`klock`,Ge=je,Ke=Ee.toString().padStart(2,`0`),qe=Math.floor(_),Je=De-Ae*N,Ye=Math.max(0,Math.min(1,Je/N))*100,Xe=`#00faff`,Ze=`#ff6d00`,Qe=((C-T*M)%M+M)%M,$e=Math.floor(Qe/N)%44,et=Number.isFinite(p?.stepIndex)?W(p.stepIndex,0,43):void 0,tt=G(f),nt=(et??tt??$e).toString().padStart(2,`0`),rt=L-(R+z)-Ie*Be,it=L;return(0,F.jsx)(`div`,{className:`kai-klock-shell`,style:{"--hue":e,"--arc":fe,"--cycle":g,width:`100%`,aspectRatio:`1 / 1`,overflow:`hidden`},children:(0,F.jsxs)(`svg`,{className:`kai-svg`,viewBox:`0 0 ${I} ${I}`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,role:`img`,children:[(0,F.jsx)(`circle`,{cx:L,cy:L,r:te,className:`rim-ring ${u?`rim-flash`:``}`}),(0,F.jsx)(`circle`,{cx:L,cy:L,r:V,className:`day-progress`,strokeDasharray:he,strokeDashoffset:ge}),Array.from({length:36}).map((e,t)=>{let n=oe(t*(360/ne)-90),r=(t+re+ne)%ne/ne;return(0,F.jsx)(`text`,{x:L+H*Math.cos(n),y:L+H*Math.sin(n)+ie/2,className:`beat-number`,textAnchor:`middle`,fontSize:ie,style:{fill:`hsl(${r*360},100%,50%)`},children:t},t)}),(0,F.jsx)(`circle`,{cx:L,cy:L,r:R+z,className:`inner-halo`}),(0,F.jsx)(`g`,{className:`orb-spin`,style:{animationDelay:`${_e}s`},children:(0,F.jsx)(`circle`,{cx:L,cy:L-(R+z),r:3.6,className:`micro-orb orb-glow`})}),(0,F.jsxs)(`g`,{style:{transform:`rotate(${D}deg)`,transformOrigin:`${L}px ${L}px`,transition:`transform 1s ease-out`},children:[(0,F.jsx)(`rect`,{x:L-1,y:L-(R+z)-(te-(R+z)),width:2,height:te-(R+z),rx:1,className:`needle`,style:{fill:me}}),(0,F.jsxs)(`g`,{className:`solar-hand-label-wrap`,style:{transform:`rotate(${-D}deg)`,transformOrigin:`${it}px ${rt}px`},children:[(0,F.jsx)(`text`,{x:it,y:rt-3.6,textAnchor:`middle`,dominantBaseline:`central`,fontSize:3,fontWeight:900,style:{fill:Ze,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.65)`,strokeWidth:.8,filter:`drop-shadow(0 0 2px ${Ze})`},children:`☀`}),(0,F.jsx)(`text`,{x:it-2.2,y:rt,textAnchor:`middle`,dominantBaseline:`central`,className:`solar-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:Ze,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.65)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px ${Ze}) drop-shadow(0 0 5px ${Ze})`},children:nt[0]}),(0,F.jsx)(`text`,{x:it+2.2,y:rt,textAnchor:`middle`,dominantBaseline:`central`,className:`solar-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:Ze,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.65)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px ${Ze}) drop-shadow(0 0 5px ${Ze})`},children:nt[1]})]})]}),(0,F.jsxs)(`g`,{className:`eternal-hand-group`,style:{transform:`rotate(${Me}deg)`,transformOrigin:`${L}px ${L}px`,transition:`transform 0.6s cubic-bezier(.22,.61,.36,1)`},children:[(0,F.jsx)(`rect`,{x:L-Fe/2,y:L-(R+z)-Ie,width:Fe,height:Ie,rx:Fe/1.5,className:`eternal-hand`,style:{fill:`transparent`,stroke:`#bff7ff`,strokeWidth:.7,filter:`drop-shadow(0 0 2px #eaffff) drop-shadow(0 0 6px #d9fbff)`,mixBlendMode:`screen`}}),(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:`eternalFill-${We}`,x1:`0`,y1:`1`,x2:`0`,y2:`0`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:Pe,stopOpacity:.15}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:Pe,stopOpacity:.95})]})}),(0,F.jsx)(`rect`,{x:L-Fe/2,y:ze,width:Fe,height:Math.max(0,Re),rx:Fe/2,className:`eternal-hand-fill`,style:{fill:`url(#eternalFill-${We})`,filter:`drop-shadow(0 0 3px #eaffff) drop-shadow(0 0 6px #eaffff)`,mixBlendMode:`screen`}}),(0,F.jsx)(`circle`,{cx:L,cy:L-(R+z)-Ie-.8,r:1.35,className:`eternal-hand-tip`,style:{fill:`#ffffff`,filter:`drop-shadow(0 0 4px #eaffff) drop-shadow(0 0 8px #eaffff)`,mixBlendMode:`screen`}}),(0,F.jsxs)(`g`,{className:`eternal-hand-label-wrap`,style:{transform:`rotate(${-Me}deg)`,transformOrigin:`${He}px ${Ve}px`},children:[(0,F.jsx)(`text`,{x:He-2.2,y:Ve,textAnchor:`middle`,dominantBaseline:`central`,className:`eternal-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:`#e8feff`,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.45)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px #eaffff) drop-shadow(0 0 5px #c8fbff)`},children:je[0]}),(0,F.jsx)(`text`,{x:He+2.2,y:Ve,textAnchor:`middle`,dominantBaseline:`central`,className:`eternal-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:`#e8feff`,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.45)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px #eaffff) drop-shadow(0 0 5px #c8fbff)`},children:je[1]})]}),(0,F.jsx)(`g`,{transform:`rotate(${-Me} ${He} ${Ue})`,children:(0,F.jsx)(`text`,{x:He,y:Ue,textAnchor:`middle`,dominantBaseline:`central`,className:`eternal-hand-percent`,fontSize:3.2,fontWeight:800,style:{fill:`#dafeff`,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.4)`,strokeWidth:.7,letterSpacing:`0.25px`,filter:`drop-shadow(0 0 2px #eaffff)`}})})]}),(0,F.jsx)(`text`,{x:L,y:L-15,className:`center-sub`,textAnchor:`middle`,fontSize:6,fontWeight:800,style:{fill:Xe,paintOrder:`stroke`,stroke:`#000`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px ${Xe}) drop-shadow(0 0 6px ${Xe})`},children:qe}),(0,F.jsxs)(`text`,{x:L,y:L-3,className:`center-pulse ${c?`pulse-flash`:``}`,textAnchor:`middle`,children:[Ke,`:`,Ge]},`et-${ve}`),(0,F.jsx)(`text`,{x:L,y:L+8,className:`center-day day-${U(a)}`,textAnchor:`middle`,children:a}),(0,F.jsx)(`text`,{x:L,y:L+18,className:`center-month month-${U(o)}`,textAnchor:`middle`,children:o}),(0,F.jsx)(`text`,{x:L,y:we+8,className:`eternal-pulse`,textAnchor:`middle`,children:n}),(0,F.jsx)(`text`,{x:xe,y:we,className:`step-percent`,textAnchor:`middle`,fontSize:5.5,fill:Ne,fontWeight:800,style:{filter:`drop-shadow(0 0 2px ${Ne}) drop-shadow(0 0 5px #00faff)`,letterSpacing:`0.25px`},children:`${Ye.toFixed(1)}%`}),(0,F.jsx)(`text`,{x:Se,y:we,className:`day-of-month day-${U(a)}`,textAnchor:`middle`,children:s}),(0,F.jsx)(`text`,{x:Ce,y:we,className:`day-of-month month-${U(o)}`,textAnchor:`middle`,children:be}),k.map((e,t)=>{let n=oe(t*(360/k.length)-90),r=L+ae*Math.cos(n),i=L+ae*Math.sin(n)+(t===3?7:3);return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(`text`,{x:r,y:i,className:`arc-label arc-${U(e.split(` `)[0])} ${t===ce?`active`:``}`,textAnchor:`middle`,children:j[e]}),e===`Ignition Ark`&&f&&(0,F.jsx)(`text`,{x:r,y:i+8,textAnchor:`middle`,dominantBaseline:`hanging`,fontSize:10,fill:`#00faff`,fontWeight:900,style:{filter:`drop-shadow(0 0 2px #00faff) drop-shadow(0 0 4px #00faff) drop-shadow(0 0 8px #00faff)`,paintOrder:`stroke`,stroke:`#000`,strokeWidth:1,vectorEffect:`non-scaling-stroke`,letterSpacing:`0.5px`},children:f})]},e)})]})})};function le(e){let{beat:t}=i(w(e)),{pulse:n,chakraDay:r}=_(e);return{pulse:n,beat:t,chakraDay:r}}var ue=()=>performance.timeOrigin+performance.now(),de=e=>{let t=e-s;return s+Math.ceil(t/d)*d},fe=()=>{let[e,t]=(0,P.useState)(0),[n,r]=(0,P.useState)(0),[i,a]=(0,P.useState)(`Root`),[o,s]=(0,P.useState)(!1),[c]=(0,P.useState)(()=>`btn-${Math.random().toString(36).slice(2)}`),u=o?`sigil-open`:`sigil-closed`,f=(0,P.useRef)(null),p=(0,P.useRef)(null),m=(0,P.useRef)(0),h=(0,P.useCallback)(()=>{let{pulse:e,beat:n,chakraDay:i}=le(new Date);t(e),r(n),a(i)},[]),g=()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)},_=(0,P.useCallback)(()=>{g();let e=ue();m.current=de(e);let t=()=>{let e=ue(),n=Math.floor((e-m.current)/d),r=Math.max(0,n)+1;for(let e=0;e(h(),_(),()=>g()),[h,_]),(0,P.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&_()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[_]),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{className:`sigil-button`,title:`View & save this sigil`,onClick:()=>s(!0),"data-chakra":i,"aria-label":`Open Kairos Sigil`,children:(0,F.jsxs)(`span`,{className:`sigil-thumb`,"aria-hidden":`true`,inert:!0,children:[(0,F.jsx)(l,{ref:f,pulse:e,beat:n,chakraDay:i,size:40,hashMode:`deterministic`,origin:c,onReady:n=>{n&&typeof n.pulse==`number`&&n.pulse!==e&&t(n.pulse)}},u),(0,F.jsx)(`span`,{className:`sigil-shield`,"aria-hidden":`true`})]})}),o&&(0,F.jsx)(D,{initialPulse:e,onClose:()=>s(!1)})]})},pe=(0,P.createContext)({});function me(e){let t=(0,P.useRef)(null);return t.current===null&&(t.current=e()),t.current}var he=typeof window<`u`,ge=he?P.useLayoutEffect:P.useEffect,_e=(0,P.createContext)(null);function ve(e,t){e.indexOf(t)===-1&&e.push(t)}function ye(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var be=(e,t,n)=>n>t?t:n/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ce(e){return typeof e==`object`&&!!e}var we=e=>/^0[^.\s]+$/u.test(e);function Te(e){let t;return()=>(t===void 0&&(t=e()),t)}var Ee=e=>e,De=(e,t)=>n=>t(e(n)),Oe=(...e)=>e.reduce(De),ke=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Ae=class{constructor(){this.subscriptions=[]}add(e){return ve(this.subscriptions,e),()=>ye(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;ie*1e3,Me=e=>e/1e3;function Ne(e,t){return t?e*(1e3/t):0}var Pe=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Fe=1e-7,Ie=12;function Le(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Pe(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Fe&&++sLe(t,0,1,e,n);return e=>e===0||e===1?e:Pe(i(e),t,r)}var ze=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Be=e=>t=>1-e(1-t),Ve=Re(.33,1.53,.69,.99),He=Be(Ve),Ue=ze(He),We=e=>(e*=2)<1?.5*He(e):.5*(2-2**(-10*(e-1))),Ge=e=>1-Math.sin(Math.acos(e)),Ke=Be(Ge),qe=ze(Ge),Je=Re(.42,0,1,1),Ye=Re(0,0,.58,1),Xe=Re(.42,0,.58,1),Ze=e=>Array.isArray(e)&&typeof e[0]!=`number`,Qe=e=>Array.isArray(e)&&typeof e[0]==`number`,$e={linear:Ee,easeIn:Je,easeInOut:Xe,easeOut:Ye,circIn:Ge,circInOut:qe,circOut:Ke,backIn:He,backInOut:Ue,backOut:Ve,anticipate:We},et=e=>typeof e==`string`,tt=e=>{if(Qe(e)){e.length;let[t,n,r,i]=e;return Re(t,n,r,i)}else if(et(e))return $e[e],`${e}`,$e[e];return e},nt=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],rt={value:null,addProjectionMetrics:null};function it(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&rt.value&&rt.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var at=40;function ot(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=nt.reduce((e,n)=>(e[n]=it(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=xe.useManualTiming?i.timestamp:performance.now();n=!1,xe.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,at),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:nt.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t(ut===void 0&&ft.set(ct.isProcessing||xe.useManualTiming?ct.timestamp:performance.now()),ut),set:e=>{ut=e,queueMicrotask(dt)}},pt={layout:0,mainThread:0,waapi:0},mt=e=>t=>typeof t==`string`&&t.startsWith(e),ht=mt(`--`),gt=mt(`var(--`),_t=e=>gt(e)?vt.test(e.split(`/*`)[0].trim()):!1,vt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,yt={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},bt={...yt,transform:e=>be(0,1,e)},xt={...yt,default:1},St=e=>Math.round(e*1e5)/1e5,Ct=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wt(e){return e==null}var Tt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Et=(e,t)=>n=>!!(typeof n==`string`&&Tt.test(n)&&n.startsWith(e)||t&&!wt(n)&&Object.prototype.hasOwnProperty.call(n,t)),Dt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ct);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ot=e=>be(0,255,e),kt={...yt,transform:e=>Math.round(Ot(e))},At={test:Et(`rgb`,`red`),parse:Dt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+kt.transform(e)+`, `+kt.transform(t)+`, `+kt.transform(n)+`, `+St(bt.transform(r))+`)`};function jt(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Mt={test:Et(`#`),parse:jt,transform:At.transform},Nt=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pt=Nt(`deg`),Ft=Nt(`%`),q=Nt(`px`),It=Nt(`vh`),Lt=Nt(`vw`),Rt=(()=>({...Ft,parse:e=>Ft.parse(e)/100,transform:e=>Ft.transform(e*100)}))(),zt={test:Et(`hsl`,`hue`),parse:Dt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Ft.transform(St(t))+`, `+Ft.transform(St(n))+`, `+St(bt.transform(r))+`)`},J={test:e=>At.test(e)||Mt.test(e)||zt.test(e),parse:e=>At.test(e)?At.parse(e):zt.test(e)?zt.parse(e):Mt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?At.transform(e):zt.transform(e),getAnimatableNone:e=>{let t=J.parse(e);return t.alpha=0,J.transform(t)}},Bt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vt(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ct)?.length||0)+(e.match(Bt)?.length||0)>0}var Ht=`number`,Ut=`color`,Wt=`var`,Gt=`var(`,Kt="${}",qt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Jt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(qt,e=>(J.test(e)?(r.color.push(a),i.push(Ut),n.push(J.parse(e))):e.startsWith(Gt)?(r.var.push(a),i.push(Wt),n.push(e)):(r.number.push(a),i.push(Ht),n.push(parseFloat(e))),++a,Kt)).split(Kt),indexes:r,types:i}}function Yt(e){return Jt(e).values}function Xt(e){let{split:t,types:n}=Jt(e),r=t.length;return e=>{let i=``;for(let a=0;atypeof e==`number`?0:J.test(e)?J.getAnimatableNone(e):e;function Qt(e){let t=Yt(e);return Xt(e)(t.map(Zt))}var $t={test:Vt,parse:Yt,createTransformer:Xt,getAnimatableNone:Qt};function en(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tn({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=en(s,r,e+1/3),a=en(s,r,e),o=en(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function nn(e,t){return n=>n>0?t:e}var Y=(e,t,n)=>e+(t-e)*n,rn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},an=[Mt,At,zt],on=e=>an.find(t=>t.test(e));function sn(e){let t=on(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===zt&&(n=tn(n)),n}var cn=(e,t)=>{let n=sn(e),r=sn(t);if(!n||!r)return nn(e,t);let i={...n};return e=>(i.red=rn(n.red,r.red,e),i.green=rn(n.green,r.green,e),i.blue=rn(n.blue,r.blue,e),i.alpha=Y(n.alpha,r.alpha,e),At.transform(i))},ln=new Set([`none`,`hidden`]);function un(e,t){return ln.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dn(e,t){return n=>Y(e,t,n)}function fn(e){return typeof e==`number`?dn:typeof e==`string`?_t(e)?nn:J.test(e)?cn:gn:Array.isArray(e)?pn:typeof e==`object`?J.test(e)?cn:mn:nn}function pn(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>fn(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}function hn(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i{let n=$t.createTransformer(t),r=Jt(e),i=Jt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ln.has(e)&&!i.values.length||ln.has(t)&&!r.values.length?un(e,t):Oe(pn(hn(r,i),i.values),n):(`${e}${t}`,nn(e,t))};function _n(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Y(e,t,n):fn(e)(e,t)}var vn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>K.update(t,e),stop:()=>st(t),now:()=>ct.isProcessing?ct.timestamp:ft.now()}},yn=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t=2e4?1/0:t}function Sn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(xn(r),bn);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Me(i)}}var Cn=5;function wn(e,t,n){let r=Math.max(t-Cn,0);return Ne(n-e(r),t-r)}var X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Tn=.001;function En({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let i,a;X.maxDuration;let o=1-t;o=be(X.minDamping,X.maxDamping,o),e=be(X.minDuration,X.maxDuration,Me(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=kn(t,o),c=Math.exp(-i);return Tn-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=kn(t**2,o);return(-i(t)+Tn>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Tn+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=On(i,a,s);if(e=je(e),isNaN(c))return{stiffness:X.stiffness,damping:X.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Dn=12;function On(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function Nn(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Mn(e,jn)&&Mn(e,An))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*be(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:X.mass,stiffness:i,damping:a}}else{let n=En(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Pn(e=X.visualDuration,t=X.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Nn({...n,velocity:-Me(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Me(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?X.restSpeed.granular:X.restSpeed.default,i||=v?X.restDelta.granular:X.restDelta.default;let y;if(h<1){let e=kn(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?je(m):wn(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(xn(b),bn),t=yn(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}Pn.applyToOptions=e=>{let t=Sn(e,100,Pn);return e.ease=t.ease,e.duration=je(t.duration),e.type=`keyframes`,e};function Fn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&ec,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Pn({keyframes:[f.value,m(f.value)],velocity:wn(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function In(e,t,n){let r=[],i=n||xe.mix||_n,a=e.length-1;for(let n=0;nt[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=In(t,r,i),c=s.length,l=n=>{if(o&&n1)for(;rl(be(e[0],e[a-1],t)):l}function Rn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ke(0,t,r);e.push(Y(n,1,i))}}function zn(e){let t=[0];return Rn(t,e.length-1),t}function Bn(e,t){return e.map(e=>e*t)}function Vn(e,t){return e.map(()=>t||Xe).splice(0,e.length-1)}function Hn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ze(r)?r.map(tt):tt(r),a={done:!1,value:t[0]},o=Ln(Bn(n&&n.length===t.length?n:zn(t),e),t,{ease:Array.isArray(i)?i:Vn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Un=e=>e!==null;function Wn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Un),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Gn={decay:Fn,inertia:Fn,tween:Hn,keyframes:Hn,spring:Pn};function Kn(e){typeof e.type==`string`&&(e.type=Gn[e.type])}var qn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Jn=e=>e/100,Yn=class extends qn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==ft.now()&&this.tick(ft.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},pt.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Kn(e);let{type:t=Hn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Hn;s!==Hn&&typeof o[0]!=`number`&&(this.mixKeyframes=Oe(Jn,_n(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=xn(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=be(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Fn&&(b.value=Wn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Me(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Me(e)}get time(){return Me(this.currentTime)}set time(e){e=je(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(ft.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Me(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=vn,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(ft.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,pt.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Xn(e){for(let t=1;te*180/Math.PI,Qn=e=>er(Zn(Math.atan2(e[1],e[0]))),$n={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qn,rotateZ:Qn,skewX:e=>Zn(Math.atan(e[1])),skewY:e=>Zn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},er=e=>(e%=360,e<0&&(e+=360),e),tr=Qn,nr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ir={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nr,scaleY:rr,scale:e=>(nr(e)+rr(e))/2,rotateX:e=>er(Zn(Math.atan2(e[6],e[5]))),rotateY:e=>er(Zn(Math.atan2(-e[2],e[0]))),rotateZ:tr,rotate:tr,skewX:e=>Zn(Math.atan(e[4])),skewY:e=>Zn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ar(e){return e.includes(`scale`)?1:0}function or(e,t){if(!e||e===`none`)return ar(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=ir,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=$n,i=t}if(!i)return ar(t);let a=r[t],o=i[1].split(`,`).map(cr);return typeof a==`function`?a(o):o[a]}var sr=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return or(n,t)};function cr(e){return parseFloat(e.trim())}var lr=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],ur=(()=>new Set(lr))(),dr=e=>e===yt||e===q,fr=new Set([`x`,`y`,`z`]),pr=lr.filter(e=>!fr.has(e));function mr(e){let t=[];return pr.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var hr={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>or(t,`x`),y:(e,{transform:t})=>or(t,`y`)};hr.translateX=hr.x,hr.translateY=hr.y;var gr=new Set,_r=!1,vr=!1,yr=!1;function br(){if(vr){let e=Array.from(gr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=mr(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}vr=!1,_r=!1,gr.forEach(e=>e.complete(yr)),gr.clear()}function xr(){gr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vr=!0)})}function Sr(){yr=!0,xr(),br(),yr=!1}var Cr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(gr.add(this),_r||(_r=!0,K.read(xr),K.resolveKeyframes(br))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Xn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),gr.delete(this)}cancel(){this.state===`scheduled`&&(gr.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},wr=e=>e.startsWith(`--`);function Tr(e,t,n){wr(t)?e.style.setProperty(t,n):e.style[t]=n}var Er=Te(()=>window.ScrollTimeline!==void 0),Dr={};function Or(e,t){let n=Te(e);return()=>Dr[t]??n()}var kr=Or(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ar=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ar([0,.65,.55,1]),circOut:Ar([.55,0,1,.45]),backIn:Ar([.31,.01,.66,-.59]),backOut:Ar([.33,1.53,.69,.99])};function Mr(e,t){if(e)return typeof e==`function`?kr()?yn(e,t):`ease-out`:Qe(e)?Ar(e):Array.isArray(e)?e.map(e=>Mr(e,t)||jr.easeOut):jr[e]}function Nr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Mr(s,i);Array.isArray(d)&&(u.easing=d),rt.value&&pt.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return rt.value&&p.finished.finally(()=>{pt.waapi--}),p}function Pr(e){return typeof e==`function`&&`applyToOptions`in e}function Fr({type:e,...t}){return Pr(e)&&kr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Ir=class extends qn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Fr(e);this.animation=Nr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Wn(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):Tr(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Me(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Me(e)}get time(){return Me(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=je(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Er()?(this.animation.timeline=e,Ee):t(this)}},Lr={anticipate:We,backInOut:Ue,circInOut:qe};function Rr(e){return e in Lr}function zr(e){typeof e.ease==`string`&&Rr(e.ease)&&(e.ease=Lr[e.ease])}var Br=10,Vr=class extends Ir{constructor(e){zr(e),Kn(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Yn({...a,autoplay:!1}),s=je(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-Br).value,o.sample(s).value,Br),o.stop()}},Hr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&($t.test(e)||e===`0`)&&!e.startsWith(`url(`));function Ur(e){let t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,`animate`));function Jr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return qr()&&n&&Kr.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Yr=40,Xr=class extends qn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ft.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Cr)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=ft.now(),Wr(e,i,a,o)||((xe.instantAnimations||!s)&&l?.(Wn(e,n,t)),e[0]=e[e.length-1],Gr(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Yr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&Jr(u)?new Vr({...u,element:u.motionValue.owner.current}):new Yn(u);d.finished.then(()=>this.notifyFinished()).catch(Ee),this.pendingTimeline&&=(this.stopTimeline=d.attachTimeline(this.pendingTimeline),void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Sr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},Zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qr(e){let t=Zr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function $r(e,t,n=1){`${e}`;let[r,i]=Qr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Se(e)?parseFloat(e):e}return _t(i)?$r(i,t,n+1):i}function ei(e,t){return e?.[t]??e?.default??e}var ti=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...lr]),ni={test:e=>e===`auto`,parse:e=>e},ri=e=>t=>t.test(e),ii=[yt,q,Ft,Pt,Lt,It,ni],ai=e=>ii.find(ri(e));function oi(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||we(e)}var si=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ci(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ct)||[];if(!r)return e;let i=n.replace(r,``),a=si.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var li=/\b([a-z-]*)\(.*?\)/gu,ui={...$t,getAnimatableNone:e=>{let t=e.match(li);return t?t.map(ci).join(` `):e}},di={...yt,transform:Math.round},fi={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,radius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,backgroundPositionX:q,backgroundPositionY:q,rotate:Pt,rotateX:Pt,rotateY:Pt,rotateZ:Pt,scale:xt,scaleX:xt,scaleY:xt,scaleZ:xt,skew:Pt,skewX:Pt,skewY:Pt,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:bt,originX:Rt,originY:Rt,originZ:q,zIndex:di,fillOpacity:bt,strokeOpacity:bt,numOctaves:di},pi={...fi,color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:ui,WebkitFilter:ui},mi=e=>pi[e];function hi(e,t){let n=mi(e);return n!==ui&&(n=$t),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var gi=new Set([`auto`,`none`,`0`]);function _i(e,t,n){let r=0,i;for(;r{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function yi(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}var bi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function xi(e){return Ce(e)&&`offsetHeight`in e}var Si=30,Ci=e=>!isNaN(parseFloat(e)),wi={current:void 0},Ti=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=ft.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ft.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ci(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Ae);let n=this.events[e].add(t);return e===`change`?()=>{n(),K.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return wi.current&&wi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=ft.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Si)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Si);return Ne(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ei(e,t){return new Ti(e,t)}var{schedule:Di,cancel:Oi}=ot(queueMicrotask,!1),ki={x:!1,y:!1};function Ai(){return ki.x||ki.y}function ji(e){return e===`x`||e===`y`?ki[e]?null:(ki[e]=!0,()=>{ki[e]=!1}):ki.x||ki.y?null:(ki.x=ki.y=!0,()=>{ki.x=ki.y=!1})}function Mi(e,t){let n=yi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ni(e){return!(e.pointerType===`touch`||Ai())}function Pi(e,t,n={}){let[r,i,a]=Mi(e,n),o=e=>{if(!Ni(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{Ni(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var Fi=(e,t)=>t?e===t?!0:Fi(e,t.parentElement):!1,Ii=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Li=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ri(e){return Li.has(e.tagName)||e.tabIndex!==-1}var zi=new WeakSet;function Bi(e){return t=>{t.key===`Enter`&&e(t)}}function Vi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Hi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Bi(()=>{if(zi.has(n))return;Vi(n,`down`);let e=Bi(()=>{Vi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Vi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ui(e){return Ii(e)&&!Ai()}function Wi(e,t,n={}){let[r,i,a]=Mi(e,n),o=e=>{let r=e.currentTarget;if(!Ui(e))return;zi.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),zi.has(r)&&zi.delete(r),Ui(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Fi(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),xi(e)&&(e.addEventListener(`focus`,e=>Hi(e,i)),!Ri(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Gi(e){return Ce(e)&&`ownerSVGElement`in e}function Ki(e){return Gi(e)&&e.tagName===`svg`}var qi=e=>!!(e&&e.getVelocity),Ji=[...ii,J,$t],Yi=e=>Ji.find(ri(e)),Xi=(0,P.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Zi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qi(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zi(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t{let{width:e,height:c,top:l,left:u,right:d}=o.current;if(t||!a.current||!e||!c)return;let f=n===`left`?`left: ${u}`:`right: ${d}`;a.current.dataset.motionPopId=i;let p=document.createElement(`style`);s&&(p.nonce=s);let m=r??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(` + [data-motion-pop-id="${i}"] { + position: absolute !important; + width: ${e}px !important; + height: ${c}px !important; + ${f}px !important; + top: ${l}px !important; + } + `),()=>{m.contains(p)&&m.removeChild(p)}},[t]),(0,F.jsx)(ea,{isPresent:t,childRef:a,sizeRef:o,children:P.cloneElement(e,{ref:c})})}var na=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:c})=>{let l=me(ra),u=(0,P.useId)(),d=!0,f=(0,P.useMemo)(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(let e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[n,l,r]);return a&&d&&(f={...f}),(0,P.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),P.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o===`popLayout`&&(e=(0,F.jsx)(ta,{isPresent:n,anchorX:s,root:c,children:e})),(0,F.jsx)(_e.Provider,{value:f,children:e})};function ra(){return new Map}function ia(e=!0){let t=(0,P.useContext)(_e);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,P.useId)();(0,P.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,P.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var aa=e=>e.key||``;function oa(e){let t=[];return P.Children.forEach(e,e=>{(0,P.isValidElement)(e)&&t.push(e)}),t}var sa=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,root:c})=>{let[l,u]=ia(o),d=(0,P.useMemo)(()=>oa(e),[e]),f=o&&!l?[]:d.map(aa),p=(0,P.useRef)(!0),m=(0,P.useRef)(d),h=me(()=>new Map),[g,_]=(0,P.useState)(d),[v,y]=(0,P.useState)(d);ge(()=>{p.current=!1,m.current=d;for(let e=0;e{let g=aa(e),_=o&&!l?!1:d===v||f.includes(g);return(0,F.jsx)(na,{isPresent:_,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:_?void 0:()=>{if(h.has(g))h.set(g,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(x?.(),y(m.current),o&&u?.(),r&&r())},anchorX:s,children:e},g)})})},ca=(0,P.createContext)({strict:!1}),la={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},ua={};for(let e in la)ua[e]={isEnabled:t=>la[e].some(e=>!!t[e])};function da(e){for(let t in e)ua[t]={...ua[t],...e[t]}}var fa=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function pa(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||fa.has(e)}var ma=E({default:()=>ha}),ha,ga=x((()=>{throw ha={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),_a=e=>!pa(e);function va(e){typeof e==`function`&&(_a=t=>t.startsWith(`on`)?!pa(t):e(t))}try{va((ga(),b(ma)).default)}catch{}function ya(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(_a(i)||n===!0&&pa(i)||!t&&!pa(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var ba=(0,P.createContext)({});function xa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Sa(e){return typeof e==`string`||Array.isArray(e)}var Ca=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],wa=[`initial`,...Ca];function Ta(e){return xa(e.animate)||wa.some(t=>Sa(e[t]))}function Ea(e){return!!(Ta(e)||e.variants)}function Da(e,t){if(Ta(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Sa(t)?t:void 0,animate:Sa(n)?n:void 0}}return e.inherit===!1?{}:t}function Oa(e){let{initial:t,animate:n}=Da(e,(0,P.useContext)(ba));return(0,P.useMemo)(()=>({initial:t,animate:n}),[ka(t),ka(n)])}function ka(e){return Array.isArray(e)?e.join(` `):e}function Aa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ja={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(q.test(e))e=parseFloat(e);else return e;return`${Aa(e,t.target.x)}% ${Aa(e,t.target.y)}%`}},Ma={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=$t.parse(e);if(i.length>5)return r;let a=$t.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Y(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Na={borderRadius:{...ja,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:ja,borderTopRightRadius:ja,borderBottomLeftRadius:ja,borderBottomRightRadius:ja,boxShadow:Ma};function Pa(e,{layout:t,layoutId:n}){return ur.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Na[e]||e===`opacity`)}var Fa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ia=lr.length;function La(e,t,n){let r=``,i=!0;for(let a=0;a({style:{},transform:{},transformOrigin:{},vars:{}});function Ba(e,t,n){for(let r in t)!qi(t[r])&&!Pa(r,n)&&(e[r]=t[r])}function Va({transformTemplate:e},t){return(0,P.useMemo)(()=>{let n=za();return Ra(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ha(e,t){let n=e.style||{},r={};return Ba(r,n,e),Object.assign(r,Va(e,t)),r}function Ua(e,t){let n={},r=Ha(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Wa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ga={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ka(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Wa:Ga;e[a.offset]=q.transform(-r);let o=q.transform(t),s=q.transform(n);e[a.array]=`${o} ${s}`}function qa(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ra(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ka(d,i,a,o,!1)}var Ja=()=>({...za(),attrs:{}}),Ya=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Xa(e,t,n,r){let i=(0,P.useMemo)(()=>{let n=Ja();return qa(n,t,Ya(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ba(t,e.style,e),i.style={...t,...i.style}}return i}var Za=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Qa(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Za.indexOf(e)>-1||/[A-Z]/u.test(e))}function $a(e,t,n,{latestValues:r},i,a=!1){let o=(Qa(e)?Xa:Ua)(t,r,i,e),s=ya(t,typeof e==`string`,a),c=e===P.Fragment?{}:{...s,...o,ref:n},{children:l}=t,u=(0,P.useMemo)(()=>qi(l)?l.get():l,[l]);return(0,P.createElement)(e,{...c,children:u})}function eo(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function to(e,t,n,r){if(typeof t==`function`){let[i,a]=eo(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=eo(r);t=t(n===void 0?e.custom:n,i,a)}return t}function no(e){return qi(e)?e.get():e}function ro({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:io(n,r,i,e),renderState:t()}}function io(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=no(a[e]);let{initial:o,animate:s}=e,c=Ta(e),l=Ea(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!xa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n(t,n)=>{let r=(0,P.useContext)(ba),i=(0,P.useContext)(_e),a=()=>ro(e,t,r,i);return n?a():me(a)};function oo(e,t,n){let{style:r}=e,i={};for(let a in r)(qi(r[a])||t.style&&qi(t.style[a])||Pa(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}var so=ao({scrapeMotionValuesFromProps:oo,createRenderState:za});function co(e,t,n){let r=oo(e,t,n);for(let n in e)if(qi(e[n])||qi(t[n])){let t=lr.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var lo=ao({scrapeMotionValuesFromProps:co,createRenderState:Ja}),uo=Symbol.for(`motionComponentSymbol`);function fo(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function po(e,t,n){return(0,P.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):fo(n)&&(n.current=r))},[t])}var mo=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),ho=`data-`+mo(`framerAppearId`),go=(0,P.createContext)({});function _o(e,t,n,r,i){let{visualElement:a}=(0,P.useContext)(ba),o=(0,P.useContext)(ca),s=(0,P.useContext)(_e),c=(0,P.useContext)(Xi).reducedMotion,l=(0,P.useRef)(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let u=l.current,d=(0,P.useContext)(go);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&vo(l.current,n,i,d);let f=(0,P.useRef)(!1);(0,P.useInsertionEffect)(()=>{u&&f.current&&u.update(n,s)});let p=n[ho],m=(0,P.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return ge(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),(0,P.useEffect)(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),!1),u.enteringChildren=void 0)}),u}function vo(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:yo(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&fo(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function yo(e){if(e)return e.options.allowProjection===!1?yo(e.parent):e.projection}function bo(e,{forwardMotionProps:t=!1}={},n,r){n&&da(n);let i=Qa(e)?lo:so;function a(a,o){let s,c={...(0,P.useContext)(Xi),...a,layoutId:xo(a)},{isStatic:l}=c,u=Oa(a),d=i(a,l);if(!l&&he){So(c,n);let t=Co(c);s=t.MeasureLayout,u.visualElement=_o(e,d,c,r,t.ProjectionNode)}return(0,F.jsxs)(ba.Provider,{value:u,children:[s&&u.visualElement?(0,F.jsx)(s,{visualElement:u.visualElement,...c}):null,$a(e,a,po(d,u.visualElement,o),d,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=(0,P.forwardRef)(a);return o[uo]=e,o}function xo({layoutId:e}){let t=(0,P.useContext)(pe).id;return t&&e!==void 0?t+`-`+e:e}function So(e,t){(0,P.useContext)(ca).strict}function Co(e){let{drag:t,layout:n}=ua;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function wo(e,t){if(typeof Proxy>`u`)return bo;let n=new Map,r=(n,r)=>bo(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,bo(a,void 0,e,t)),n.get(a))})}function To({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Eo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Do(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Oo(e){return e===void 0||e===1}function ko({scale:e,scaleX:t,scaleY:n}){return!Oo(e)||!Oo(t)||!Oo(n)}function Ao(e){return ko(e)||jo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jo(e){return Mo(e.x)||Mo(e.y)}function Mo(e){return e&&e!==`0%`}function No(e,t,n){return n+t*(e-n)}function Po(e,t,n,r,i){return i!==void 0&&(e=No(e,i,r)),No(e,n,r)+t}function Fo(e,t=0,n=1,r,i){e.min=Po(e.min,t,n,r,i),e.max=Po(e.max,t,n,r,i)}function Io(e,{x:t,y:n}){Fo(e.x,t.translate,t.scale,t.originPoint),Fo(e.y,n.translate,n.scale,n.originPoint)}var Lo=.999999999999,Ro=1.0000000000001;function zo(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sLo&&(t.x=1),t.yLo&&(t.y=1)}function Bo(e,t){e.min+=t,e.max+=t}function Vo(e,t,n,r,i=.5){Fo(e,t,n,Y(e.min,e.max,i),r)}function Ho(e,t){Vo(e.x,t.x,t.scaleX,t.scale,t.originX),Vo(e.y,t.y,t.scaleY,t.scale,t.originY)}function Uo(e,t){return To(Do(e.getBoundingClientRect(),t))}function Wo(e,t,n){let r=Uo(e,n),{scroll:i}=t;return i&&(Bo(r.x,i.offset.x),Bo(r.y,i.offset.y)),r}var Go=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ko=()=>({x:Go(),y:Go()}),qo=()=>({min:0,max:0}),Z=()=>({x:qo(),y:qo()}),Jo={current:null},Yo={current:!1};function Xo(){if(Yo.current=!0,he)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Jo.current=e.matches;e.addEventListener(`change`,t),t()}else Jo.current=!1}var Zo=new WeakMap;function Qo(e,t,n){for(let r in t){let i=t[r],a=n[r];if(qi(i))e.addValue(r,i);else if(qi(a))e.addValue(r,Ei(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ei(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var $o=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],es=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Cr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=ft.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),Yo.current||Xo(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:Jo.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),st(this.notifyUpdate),st(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=ur.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&K.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ua){let t=ua[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<$o.length;t++){let n=$o[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Qo(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ei(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Se(n)||we(n))?n=parseFloat(n):!Yi(n)&&$t.test(t)&&(n=hi(e,t)),this.setBaseTarget(e,qi(n)?n.get():n)),qi(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=to(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!qi(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Ae),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Di.render(this.render)}},ts=class extends es{constructor(){super(...arguments),this.KeyframeResolver=vi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;qi(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function ns(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function rs(e){return window.getComputedStyle(e)}var is=class extends ts{constructor(){super(...arguments),this.type=`html`,this.renderInstance=ns}readValueFromInstance(e,t){if(ur.has(t))return this.projection?.isProjecting?ar(t):sr(e,t);{let n=rs(e),r=(ht(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Uo(e,t)}build(e,t,n){Ra(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return oo(e,t,n)}},as=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function os(e,t,n,r){for(let n in ns(e,t,void 0,r),t.attrs)e.setAttribute(as.has(n)?n:mo(n),t.attrs[n])}var ss=class extends ts{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ur.has(t)){let e=mi(t);return e&&e.default||0}return t=as.has(t)?t:mo(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return co(e,t,n)}build(e,t,n){qa(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){os(e,t,n,r)}mount(e){this.isSVGTag=Ya(e.tagName),super.mount(e)}},cs=(e,t)=>Qa(e)?new ss(t):new is(t,{allowProjection:e!==P.Fragment});function ls(e,t,n){let r=e.getProps();return to(r,t,n===void 0?r.custom:n,e)}var us=e=>Array.isArray(e);function ds(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ei(n))}function fs(e){return us(e)?e[e.length-1]||0:e}function ps(e,t){let{transitionEnd:n={},transition:r={},...i}=ls(e,t)||{};for(let t in i={...i,...n},i)ds(e,t,fs(i[t]))}function ms(e){return!!(qi(e)&&e.add)}function hs(e,t){let n=e.getValue(`willChange`);if(ms(n))return n.add(t);if(!n&&xe.WillChange){let n=new xe.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function gs(e){return e.props[ho]}var _s=e=>e!==null;function vs(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(_s),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var ys={type:`spring`,stiffness:500,damping:25,restSpeed:10},bs=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xs={type:`keyframes`,duration:.8},Ss={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Cs=(e,{keyframes:t})=>t.length>2?xs:ur.has(e)?e.startsWith(`scale`)?bs(t[1]):ys:Ss;function ws({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var Ts=(e,t,n,r={},i,a)=>o=>{let s=ei(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=je(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};ws(s)||Object.assign(u,Cs(e,u)),u.duration&&=je(u.duration),u.repeatDelay&&=je(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Gr(u),u.delay===0&&(d=!0)),(xe.instantAnimations||xe.skipAnimations)&&(d=!0,Gr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=vs(u.keyframes,s);if(e!==void 0){K.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Yn(u):new Xr(u)};function Es({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ds(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&Es(l,t))continue;let o={delay:n,...ei(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=gs(e);if(n){let e=window.MotionHandoffAnimation(n,t,K);e!==null&&(o.startTime=e,d=!0)}}hs(e,t),r.start(Ts(t,r,i,e.shouldReduceMotion&&ti.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{K.update(()=>{o&&ps(e,o)})}),c}function Os(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function ks(e,t,n={}){let r=ls(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Ds(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return As(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function As(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(ks(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Os(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function js(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>ks(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=ks(e,t,n);else{let i=typeof t==`function`?ls(e,t,n.custom):t;r=Promise.all(Ds(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function Ms(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:t,options:n})=>js(e,t,n)))}function Rs(e){let t=Ls(e),n=Vs(),r=!0,i=t=>(n,r)=>{let i=ls(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=Ps(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;td&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=us(t)&&us(n)?!Ms(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v;y&&(!E||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ls(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Os(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=ls(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Vs()}}}function zs(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ms(t,e):!1}function Bs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vs(){return{animate:Bs(!0),whileInView:Bs(),whileHover:Bs(),whileTap:Bs(),whileDrag:Bs(),whileFocus:Bs(),exit:Bs()}}var Hs=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Us=class extends Hs{constructor(e){super(e),e.animationState||=Rs(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();xa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Ws=0,Gs={animation:{Feature:Us},exit:{Feature:class extends Hs{constructor(){super(...arguments),this.id=Ws++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Ks(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function qs(e){return{point:{x:e.pageX,y:e.pageY}}}var Js=e=>t=>Ii(t)&&e(t,qs(t));function Ys(e,t,n,r){return Ks(e,t,Js(n),r)}var Xs=1e-4,Zs=1-Xs,Qs=1+Xs,$s=.01,ec=0-$s,tc=0+$s;function nc(e){return e.max-e.min}function rc(e,t,n){return Math.abs(e-t)<=n}function ic(e,t,n,r=.5){e.origin=r,e.originPoint=Y(t.min,t.max,e.origin),e.scale=nc(n)/nc(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Zs&&e.scale<=Qs||isNaN(e.scale))&&(e.scale=1),(e.translate>=ec&&e.translate<=tc||isNaN(e.translate))&&(e.translate=0)}function ac(e,t,n,r){ic(e.x,t.x,n.x,r?r.originX:void 0),ic(e.y,t.y,n.y,r?r.originY:void 0)}function oc(e,t,n){e.min=n.min+t.min,e.max=e.min+nc(t)}function sc(e,t,n){oc(e.x,t.x,n.x),oc(e.y,t.y,n.y)}function cc(e,t,n){e.min=t.min-n.min,e.max=e.min+nc(t)}function lc(e,t,n){cc(e.x,t.x,n.x),cc(e.y,t.y,n.y)}function uc(e){return[e(`x`),e(`y`)]}var dc=({current:e})=>e?e.ownerDocument.defaultView:null,fc=(e,t)=>Math.abs(e-t);function pc(e,t){let n=fc(e.x,t.x),r=fc(e.y,t.y);return Math.sqrt(n**2+r**2)}var mc=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=_c(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=pc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=ct;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=hc(t,this.transformPagePoint),K.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=_c(e.type===`pointercancel`?this.lastMoveEventInfo:hc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Ii(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=hc(qs(e),this.transformPagePoint),{point:s}=o,{timestamp:c}=ct;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,_c(o,this.history)),this.removeListeners=Oe(Ys(this.contextWindow,`pointermove`,this.handlePointerMove),Ys(this.contextWindow,`pointerup`,this.handlePointerUp),Ys(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),st(this.updatePoint)}};function hc(e,t){return t?{point:t(e.point)}:e}function gc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _c({point:e},t){return{point:e,delta:gc(e,yc(t)),offset:gc(e,vc(t)),velocity:bc(t,.1)}}function vc(e){return e[0]}function yc(e){return e[e.length-1]}function bc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=yc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>je(t)));)n--;if(!r)return{x:0,y:0};let a=Me(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function xc(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Y(n,e,r.max):Math.min(e,n)),e}function Sc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Cc(e,{top:t,left:n,bottom:r,right:i}){return{x:Sc(e.x,n,i),y:Sc(e.y,t,r)}}function wc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=ke(t.min,t.max-r,e.min):r>i&&(n=ke(e.min,e.max-i,t.min)),be(0,1,n)}function Dc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Oc=.35;function kc(e=Oc){return e===!1?e=0:e===!0&&(e=Oc),{x:Ac(e,`left`,`right`),y:Ac(e,`top`,`bottom`)}}function Ac(e,t,n){return{min:jc(e,t),max:jc(e,n)}}function jc(e,t){return typeof e==`number`?e:e[t]||0}var Mc=new WeakMap,Nc=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(qs(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ji(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),uc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ft.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=nc(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&K.postRender(()=>i(e,t)),hs(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Fc(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>uc(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new mc(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:dc(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&K.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Pc(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=xc(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&fo(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Cc(n.layoutBox,e):this.constraints=!1,this.elastic=kc(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&uc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Dc(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fo(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Wo(n,r.root,this.visualElement.getTransformPagePoint()),a=Tc(r.layout.layoutBox,i);if(t){let e=t(Eo(a));this.hasMutatedConstraints=!!e,e&&(a=To(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=uc(o=>{if(!Pc(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return hs(this.visualElement,e),n.start(Ts(e,n,0,t,this.visualElement,!1))}stopAnimation(){uc(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){uc(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){uc(t=>{let{drag:n}=this.getProps();if(!Pc(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-Y(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!fo(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};uc(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Ec({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),uc(t=>{if(!Pc(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Y(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;Mc.set(this.visualElement,this);let e=this.visualElement.current,t=Ys(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();fo(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),K.read(n);let a=Ks(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(uc(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Oc,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Pc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fc(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Ic=class extends Hs{constructor(e){super(e),this.removeGroupControls=Ee,this.removeListeners=Ee,this.controls=new Nc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ee}unmount(){this.removeGroupControls(),this.removeListeners()}},Lc=e=>(t,n)=>{e&&K.postRender(()=>e(t,n))},Rc=class extends Hs{constructor(){super(...arguments),this.removePointerDownListener=Ee}onPointerDown(e){this.session=new mc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dc(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Lc(e),onStart:Lc(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&K.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Ys(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},zc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bc=!1,Vc=class extends P.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Bc&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),zc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,Bc=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||K.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Di.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Bc=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Hc(e){let[t,n]=ia(),r=(0,P.useContext)(pe);return(0,F.jsx)(Vc,{...e,layoutGroup:r,switchLayoutGroup:(0,P.useContext)(go),isPresent:t,safeToRemove:n})}function Uc(e,t,n){let r=qi(e)?e:Ei(e);return r.start(Ts(``,r,t,n)),r.animation}var Wc=(e,t)=>e.depth-t.depth,Gc=class{constructor(){this.children=[],this.isDirty=!1}add(e){ve(this.children,e),this.isDirty=!0}remove(e){ye(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Wc),this.isDirty=!1,this.children.forEach(e)}};function Kc(e,t){let n=ft.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(st(r),e(a-t))};return K.setup(r,!0),()=>st(r)}var qc=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Jc=qc.length,Yc=e=>typeof e==`string`?parseFloat(e):e,Xc=e=>typeof e==`number`||q.test(e);function Zc(e,t,n,r,i,a){i?(e.opacity=Y(0,n.opacity??1,$c(r)),e.opacityExit=Y(t.opacity??1,0,el(r))):a&&(e.opacity=Y(t.opacity??1,n.opacity??1,r));for(let i=0;irt?1:n(ke(e,t,r))}function nl(e,t){e.min=t.min,e.max=t.max}function rl(e,t){nl(e.x,t.x),nl(e.y,t.y)}function il(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function al(e,t,n,r,i){return e-=t,e=No(e,1/n,r),i!==void 0&&(e=No(e,1/i,r)),e}function ol(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ft.test(t)&&(t=parseFloat(t),t=Y(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Y(a.min,a.max,r);e===a&&(s-=t),e.min=al(e.min,t,n,s,i),e.max=al(e.max,t,n,s,i)}function sl(e,t,[n,r,i],a,o){ol(e,t[n],t[r],t[i],t.scale,a,o)}var cl=[`x`,`scaleX`,`originX`],ll=[`y`,`scaleY`,`originY`];function ul(e,t,n,r){sl(e.x,t,cl,n?n.x:void 0,r?r.x:void 0),sl(e.y,t,ll,n?n.y:void 0,r?r.y:void 0)}function dl(e){return e.translate===0&&e.scale===1}function fl(e){return dl(e.x)&&dl(e.y)}function pl(e,t){return e.min===t.min&&e.max===t.max}function ml(e,t){return pl(e.x,t.x)&&pl(e.y,t.y)}function hl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gl(e,t){return hl(e.x,t.x)&&hl(e.y,t.y)}function _l(e){return nc(e.x)/nc(e.y)}function vl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var yl=class{constructor(){this.members=[]}add(e){ve(this.members,e),e.scheduleRender()}remove(e){if(ye(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function bl(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var xl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Sl=[``,`X`,`Y`,`Z`],Cl=1e3,wl=0;function Tl(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function El(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=gs(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,K,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&El(r)}function Dl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=wl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,rt.value&&(xl.nodes=xl.calculatedTargetDeltas=xl.calculatedProjections=0),this.nodes.forEach(Al),this.nodes.forEach(Ll),this.nodes.forEach(Rl),this.nodes.forEach(jl),rt.addProjectionMetrics&&rt.addProjectionMetrics(xl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;K.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Kc(i,250),zc.hasAnimatedSinceResize&&(zc.hasAnimatedSinceResize=!1,this.nodes.forEach(Il)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Gl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!gl(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ei(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Il(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),st(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zl),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&El(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!nc(this.snapshot.measuredBox.x)&&!nc(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e{let n=t/1e3;Vl(a.x,e.x,n),Vl(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lc(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ul(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ml(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Z(),rl(d,this.relativeTarget)),s&&(this.animationValues=i,Zc(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(st(this.pendingAnimation),void 0),this.pendingAnimation=K.update(()=>{zc.hasAnimatedSinceResize=!0,pt.layout++,this.motionValue||=Ei(0),this.currentAnimation=Uc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{pt.layout--},onComplete:()=>{pt.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Cl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Xl(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Z();let t=nc(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=nc(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}rl(t,n),Ho(t,i),ac(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new yl),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Tl(`z`,e,r,this.animationValues);for(let t=0;te.currentAnimation?.stop()),this.root.nodes.forEach(Nl),this.root.sharedNodes.clear()}}}function Ol(e){e.updateLayout()}function kl(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?uc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=nc(r);r.min=n[e].min,r.max=r.min+i}):Xl(i,t.layoutBox,n)&&uc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=nc(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ko();ac(o,n,t.layoutBox);let s=Ko();a?ac(s,e.applyTransform(r,!0),t.measuredBox):ac(s,n,t.layoutBox);let c=!fl(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Z();lc(o,t.layoutBox,i.layoutBox);let s=Z();lc(s,n,a.layoutBox),gl(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Al(e){rt.value&&xl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function jl(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ml(e){e.clearSnapshot()}function Nl(e){e.clearMeasurements()}function Pl(e){e.isLayoutDirty=!1}function Fl(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Il(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ll(e){e.resolveTargetDelta()}function Rl(e){e.calcProjection()}function zl(e){e.resetSkewAndRotation()}function Bl(e){e.removeLeadSnapshot()}function Vl(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hl(e,t,n,r){e.min=Y(t.min,n.min,r),e.max=Y(t.max,n.max,r)}function Ul(e,t,n,r){Hl(e.x,t.x,n.x,r),Hl(e.y,t.y,n.y,r)}function Wl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Gl={duration:.45,ease:[.4,0,.1,1]},Kl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ql=Kl(`applewebkit/`)&&!Kl(`chrome/`)?Math.round:Ee;function Jl(e){e.min=ql(e.min),e.max=ql(e.max)}function Yl(e){Jl(e.x),Jl(e.y)}function Xl(e,t,n){return e===`position`||e===`preserve-aspect`&&!rc(_l(t),_l(n),.2)}function Zl(e){return e!==e.root&&e.scroll?.wasRoot}var Ql=Dl({attachResizeListener:(e,t)=>Ks(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$l={current:void 0},eu=Dl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$l.current){let e=new Ql({});e.mount(window),e.setOptions({layoutScroll:!0}),$l.current=e}return $l.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),tu={pan:{Feature:Rc},drag:{Feature:Ic,ProjectionNode:eu,MeasureLayout:Hc}};function nu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&K.postRender(()=>i(t,qs(t)))}var ru=class extends Hs{mount(){let{current:e}=this.node;e&&(this.unmount=Pi(e,(e,t)=>(nu(this.node,t,`Start`),e=>nu(this.node,e,`End`))))}unmount(){}},iu=class extends Hs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Oe(Ks(this.node.current,`focus`,()=>this.onFocus()),Ks(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function au(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&K.postRender(()=>i(t,qs(t)))}var ou=class extends Hs{mount(){let{current:e}=this.node;e&&(this.unmount=Wi(e,(e,t)=>(au(this.node,t,`Start`),(e,{success:t})=>au(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},su=new WeakMap,cu=new WeakMap,lu=e=>{let t=su.get(e.target);t&&t(e)},uu=e=>{e.forEach(lu)};function du({root:e,...t}){let n=e||document;cu.has(n)||cu.set(n,{});let r=cu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uu,{root:e,...t})),r[i]}function fu(e,t,n){let r=du(t);return su.set(e,n),r.observe(e),()=>{su.delete(e),r.unobserve(e)}}var pu={some:0,all:1},mu=class extends Hs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:pu[r]};return fu(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(hu(e,t))&&this.startObserver()}unmount(){}};function hu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var gu={inView:{Feature:mu},tap:{Feature:ou},focus:{Feature:iu},hover:{Feature:ru}},_u={layout:{ProjectionNode:eu,MeasureLayout:Hc}},Q=wo({...Gs,...gu,...tu,..._u},cs);function vu(){!Yo.current&&Xo();let[e]=(0,P.useState)(Jo.current);return e}var yu=36,bu=12,xu=44,Su=17491.270421/36,Cu=`kai_notes_`,wu=[{idx:0,start:0,end:10,title:`Steps 0–10`},{idx:1,start:11,end:21,title:`Steps 11–21`},{idx:2,start:22,end:32,title:`Steps 22–32`},{idx:3,start:33,end:43,title:`Steps 33–43`}],Tu=e=>`${Cu}${e}`,Eu=(e,t,n)=>`kai_note_${e}_${t}_${n}`,Du=e=>typeof e==`object`&&!!e,Ou=e=>{try{if(typeof window>`u`)return[];let t=window.localStorage.getItem(Tu(e));if(!t)return[];let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=[];for(let e of n){if(!Du(e))continue;let t=e.beat,n=e.step,i=e.text,a=typeof t==`number`?t:Number(t),o=typeof n==`number`?n:Number(n),s=typeof i==`string`?i:String(i??``);Number.isFinite(a)&&Number.isFinite(o)&&o>=0&&o{try{if(typeof window>`u`)return;window.localStorage.setItem(Tu(e),JSON.stringify(t))}catch{}},Au=(e,t,n)=>{let r=Math.floor(Su*t),i=n*11;return Math.floor(e+r+i)},ju={closed:{height:0,opacity:0},open:{height:`auto`,opacity:1}},Mu=e=>t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())};function Nu(){let e=()=>{if(typeof window>`u`)return{inset:0,viewportHeight:0};let e=window.visualViewport,t=Math.round(e?.height??window.innerHeight);return e?{inset:Math.round(Math.max(0,window.innerHeight-(e.height+e.offsetTop))),viewportHeight:t}:{inset:0,viewportHeight:t}},[t,n]=(0,P.useState)(()=>e());return(0,P.useEffect)(()=>{if(typeof window>`u`)return;let t=window.visualViewport,r=()=>n(e());return t&&(t.addEventListener(`resize`,r),t.addEventListener(`scroll`,r)),window.addEventListener(`resize`,r),()=>{t&&(t.removeEventListener(`resize`,r),t.removeEventListener(`scroll`,r)),window.removeEventListener(`resize`,r)}},[]),t}var Pu=({day:e,onClose:t,onSaveKaiNote:n})=>{let[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(-1),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(0),p=(0,P.useMemo)(()=>Ou(e.startPulse),[e.startPulse,d]),m=(0,P.useMemo)(()=>{let e=new Map;for(let t of p){let n=e.get(t.beat)??[];n.push(t),e.set(t.beat,n)}return e},[p]),h=(0,P.useMemo)(()=>{let e=new Map;for(let t of p){let n=Math.floor(t.beat/bu);e.set(n,(e.get(n)??0)+1)}return e},[p]),g=(0,P.useMemo)(()=>{let e=Math.ceil(yu/bu);return Array.from({length:e},(e,t)=>{let n=t*bu,r=Math.min(n+bu,yu),i=Array.from({length:r-n},(e,t)=>({beat:n+t,steps:Array.from({length:xu},(e,t)=>t)}));return{chapter:t,title:`Beats ${n}–${r-1}`,beats:i}})},[]),_=(0,P.useCallback)((e,t)=>p.find(n=>n.beat===e&&n.step===t),[p]),v=(0,P.useCallback)((e,t,n)=>{let r=m.get(e);return r?r.filter(e=>e.step>=t&&e.step<=n).length:0},[m]),y=(0,P.useCallback)((t,n,r)=>{let i=Ou(e.startPulse),a=i.findIndex(e=>e.beat===t&&e.step===n),o=a>=0?i.map((e,t)=>t===a?{...e,text:r}:e):[...i,{beat:t,step:n,text:r}];ku(e.startPulse,o),f(e=>e+1)},[e.startPulse]),b=(0,P.useCallback)(e=>{o(t=>t===e?-1:e),c(null),u(null)},[]),x=(0,P.useCallback)(e=>{c(t=>t===e?null:e),u(null)},[]),S=(0,P.useCallback)(e=>{u(t=>t===e?null:e)},[]),C=(0,P.useRef)(null);(0,P.useEffect)(()=>{(C.current?.querySelector(`.close-btn`))?.focus()},[]);let{inset:w,viewportHeight:T}=Nu(),E=T>0?`${T}px`:void 0,D=(0,P.useRef)(null);(0,P.useEffect)(()=>{if(!r)return;let e=window.setTimeout(()=>{D.current?.focus(),D.current?.scrollIntoView({block:`center`,behavior:`smooth`})},60);return()=>window.clearTimeout(e)},[r,w]);let O=(0,P.useCallback)(()=>{if(!r)return;let t=r.text.trim();if(!t)return;y(r.beat,r.step,t);let a=Au(e.startPulse,r.beat,r.step),o=Eu(e.startPulse,r.beat,r.step);n?.({id:o,text:t,pulse:a,beat:r.beat,step:r.step}),i(null)},[e.startPulse,r,n,y]);return(0,F.jsxs)(sa,{children:[(0,F.jsx)(Q.div,{className:`day-modal-backdrop`,style:{pointerEvents:`none`},initial:{opacity:0},animate:{opacity:.85},exit:{opacity:0}}),(0,F.jsxs)(Q.section,{ref:C,className:`day-modal`,style:{"--kb-inset":`${w}px`,"--vvh":E},initial:{scale:.92,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.92,opacity:0},transition:{type:`spring`,stiffness:300,damping:28},role:`dialog`,"aria-modal":`true`,"aria-labelledby":`day-title`,children:[(0,F.jsxs)(`header`,{className:`day-header`,children:[(0,F.jsxs)(`h2`,{id:`day-title`,children:[e.name,` `,(0,F.jsxs)(`span`,{children:[`• `,e.kaiTimestamp]})]}),(0,F.jsx)(`button`,{type:`button`,className:`close-btn`,onPointerUp:t,onKeyDown:Mu(t),"aria-label":`Close Day Detail`,children:`✕`})]}),(0,F.jsx)(`div`,{className:`beat-list`,children:g.map(({chapter:e,title:t,beats:n})=>{let r=a===e,o=h.get(e)??0;return(0,F.jsxs)(`div`,{className:`chapter-container`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`chapter-header ${r?`open`:``}`,"aria-expanded":r,"aria-controls":`chapter-${e}`,onPointerUp:()=>b(e),onKeyDown:Mu(()=>b(e)),children:[(0,F.jsx)(`span`,{children:t}),o>0&&(0,F.jsxs)(`span`,{className:`chapter-count`,children:[o,` notes`]}),(0,F.jsx)(`span`,{className:`chevron`,"aria-hidden":`true`})]}),(0,F.jsx)(sa,{initial:!1,children:r&&(0,F.jsx)(Q.div,{id:`chapter-${e}`,className:`chapter-body`,variants:ju,initial:`closed`,animate:`open`,exit:`closed`,transition:{type:`tween`,duration:.24},children:n.map(({beat:e,steps:t})=>{let n=s===e,r=m.get(e)?.length??0;return(0,F.jsxs)(`div`,{className:`beat-accordion`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`beat-header ${n?`open`:``}`,"aria-expanded":n,"aria-controls":`beat-${e}`,onPointerUp:()=>x(e),onKeyDown:Mu(()=>x(e)),children:[(0,F.jsxs)(`span`,{children:[`Beat\xA0`,e]}),r>0&&(0,F.jsxs)(`span`,{className:`beat-count`,children:[r,` notes`]}),(0,F.jsx)(`span`,{className:`chevron`,"aria-hidden":`true`})]}),(0,F.jsx)(sa,{initial:!1,children:n&&(0,F.jsx)(Q.div,{id:`beat-${e}`,className:`beat-steps`,variants:ju,initial:`closed`,animate:`open`,exit:`closed`,transition:{type:`tween`,duration:.24},children:wu.map(({idx:n,start:r,end:a,title:o})=>{let s=l===n,c=v(e,r,a);return(0,F.jsxs)(`div`,{className:`group-accordion`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`group-header ${s?`open`:``}`,"aria-expanded":s,"aria-controls":`beat-${e}-group-${n}`,onPointerUp:()=>S(n),onKeyDown:Mu(()=>S(n)),children:[(0,F.jsx)(`span`,{children:o}),c>0&&(0,F.jsxs)(`span`,{className:`group-count`,children:[c,` notes`]}),(0,F.jsx)(`span`,{className:`chevron`,"aria-hidden":`true`})]}),(0,F.jsx)(sa,{initial:!1,children:s&&(0,F.jsx)(Q.div,{id:`beat-${e}-group-${n}`,className:`group-body`,variants:ju,initial:`closed`,animate:`open`,exit:`closed`,transition:{type:`tween`,duration:.2},children:t.filter(e=>e>=r&&e<=a).map(t=>{let n=_(e,t),r=e*xu+t,a=()=>{i({beat:e,step:t,text:n?.text??``})};return(0,F.jsxs)(`div`,{role:`button`,tabIndex:0,"data-step-index":r,className:`step-row${n?` has-note`:``}`,onPointerUp:a,onKeyDown:Mu(a),children:[(0,F.jsxs)(`span`,{className:`step-index`,children:[`Step\xA0`,t]}),n&&(0,F.jsx)(`span`,{className:`step-note-preview`,children:n.text.length>42?`${n.text.slice(0,42)}…`:n.text})]},t)})})})]},n)})})})]},e)})})})]},e)})}),(0,F.jsx)(sa,{children:r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Q.div,{className:`note-editor-backdrop`,initial:{opacity:0},animate:{opacity:.8},exit:{opacity:0},onPointerUp:()=>i(null)}),(0,F.jsxs)(Q.div,{className:`note-editor`,initial:{y:`100%`},animate:{y:0},exit:{y:`100%`},transition:{type:`tween`,duration:.24},role:`dialog`,"aria-label":`Edit note for Beat ${r.beat}, Step ${r.step}`,onPointerDown:e=>e.stopPropagation(),style:{bottom:w,paddingBottom:`max(12px, env(safe-area-inset-bottom))`},children:[(0,F.jsxs)(`h4`,{children:[`Beat\xA0`,r.beat,` • Step\xA0`,r.step]}),(0,F.jsx)(`textarea`,{ref:D,autoFocus:!0,value:r.text,placeholder:`Add your resonance note…`,onChange:e=>{let t=e.target.value;i(e=>e&&{...e,text:t})},onFocus:()=>D.current?.scrollIntoView({block:`center`,behavior:`smooth`})}),(0,F.jsxs)(`footer`,{children:[(0,F.jsx)(`button`,{type:`button`,className:`btn-cancel`,onPointerUp:()=>i(null),onKeyDown:Mu(()=>i(null)),children:`Cancel`}),(0,F.jsx)(`button`,{type:`button`,className:`btn-save`,disabled:!r.text.trim(),onPointerUp:O,onKeyDown:Mu(O),children:`Save`})]})]})]})})]})]})},Fu=S(y(),1),Iu=(3+Math.sqrt(5))*1e3,Lu=17491.270421,Ru=(1+Math.sqrt(5))/2,zu=Date.UTC(2024,4,10,6,45,41,888),Bu=3+Math.sqrt(5),Vu=Bu*1e3,Hu=1000000n,Uu=17491270421n,Wu=11000000n,Gu=(Uu+18n)/36n,Ku={Solhara:`#ff0024`,Aquaris:`#ff6f00`,Flamora:`#ffd600`,Verdari:`#00c853`,Sonari:`#00b0ff`,Kaelith:`#c186ff`},qu=.5,Ju=14,Yu=3.2,Xu=e=>e.replace(/D\s+(\d+)/,`D$1`).replace(/\/\s*M(\d+)/,`/M$1`),Zu=e=>e*Math.PI/180,Qu=(e,t,n)=>e+(t-e)*n,$u=e=>{let t=e&&{"Ignition ArK":`#ff0024`,"Integration ArK":`#ff6f00`,"Harmonization ArK":`#ffd600`,"Reflection ArK":`#00c853`,"Purification ArK":`#00b0ff`,"Dream ArK":`#c186ff`}[e]||`#00eaff`,n=(e,t)=>{let n=e.replace(`#`,``),r=parseInt(n,16);return`rgba(${r>>16&255}, ${r>>8&255}, ${r&255}, ${t})`},r=document.documentElement;r.style.setProperty(`--aqua-core`,t),r.style.setProperty(`--aqua-soft`,n(t,.14)),r.style.setProperty(`--seal-glow-inset`,n(t,.36)),r.style.setProperty(`--seal-glow-mid`,n(t,.42)),r.style.setProperty(`--seal-glow-outer`,n(t,.24))},ed=e=>String(e).padStart(2,`0`),td=(e,t)=>(e%t+t)%t;function nd(e,t){let n=e/t,r=e%t;return r!==0n&&r>0n!=t>0n?n-1n:n}function rd(e){if(!Number.isFinite(e))return 0n;let t=e<0?-1:1,n=Math.abs(e),r=Math.trunc(n),i=n-r;return i<.5?BigInt(t*r):i>.5?BigInt(t*(r+1)):BigInt(t*(r%2==0?r:r+1))}function id(e){return rd((e.getTime()-zu)/1e3/Bu*1e6)}function ad(e){let t=id(e),n=td(t,Uu),r=nd(t,Uu),i=Number(nd(n,Gu)),a=n-BigInt(i)*Gu,o=Math.min(Math.max(Number(nd(a,Wu)),0),43),s=Number(nd(n,Hu)),c=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`][Number(td(r,6n))],l=Number(r),u=(l%42+42)%42+1,d=(Math.floor(l/42)%8+8)%8+1,f=u-1,p=`${i}:${ed(o)}`;return{beat:i,step:o,pulsesIntoDay:s,dayOfMonth:u,monthIndex1:d,weekday:c,sealText:`${p} — D${u}/M${d}`,monthDayIndex:f,chakraStepString:p}}var od=({onClose:e,refBtn:t})=>{let n=vu(),r=n?{}:{rotate:135,scale:1.18},i=n?{}:{rotate:45,scale:.92};return(0,F.jsx)(Q.button,{ref:t,className:`mw-close mw-close--glyph`,"aria-label":`Close month view`,onClick:e,whileHover:r,whileTap:i,transition:{type:`spring`,stiffness:400,damping:24},children:(0,F.jsxs)(`svg`,{viewBox:`0 0 64 64`,strokeLinecap:`round`,fill:`none`,"aria-hidden":`true`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsxs)(`linearGradient`,{id:`plasma`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`var(--aqua-core)`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#ff1559`})]}),(0,F.jsxs)(`filter`,{id:`plasmaBlur`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`2`,result:`b`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),(0,F.jsx)(`polygon`,{points:`32 4 58 20 58 44 32 60 6 44 6 20`,stroke:`url(#plasma)`,strokeWidth:`4`,filter:`url(#plasmaBlur)`}),(0,F.jsxs)(`g`,{stroke:`url(#plasma)`,strokeWidth:`4`,filter:`url(#plasmaBlur)`,children:[(0,F.jsx)(`line`,{x1:`16`,y1:`16`,x2:`48`,y2:`48`}),(0,F.jsx)(`line`,{x1:`48`,y1:`16`,x2:`16`,y2:`48`}),(0,F.jsx)(`line`,{x1:`32`,y1:`8`,x2:`32`,y2:`56`}),(0,F.jsx)(`line`,{x1:`8`,y1:`32`,x2:`56`,y2:`32`})]}),(0,F.jsx)(`g`,{className:`glyphSheen`,children:(0,F.jsx)(`line`,{x1:`0`,y1:`8`,x2:`64`,y2:`56`,stroke:`#fff`,strokeWidth:`1.2`,strokeOpacity:`0`})})]})})},sd=({DAYS:e,initialData:t,notes:n,onSelectDay:r,onAddNote:i,onClose:a,container:o})=>{let s=vu(),{initIdx:c,initSeal:l,spiralArc:u}=(0,P.useMemo)(()=>{let e=t?.kairos_seal_day_month??`D?/M?`,n=Xu(e).match(/D(\d+)/);return{initIdx:n?Math.max(0,Math.min(41,Number(n[1])-1)):0,initSeal:Xu(e),spiralArc:t?.SpiralArc}},[t]);(0,P.useEffect)(()=>{u&&$u(u)},[u]);let d=(0,P.useMemo)(()=>{let e=new Set;return n.forEach(t=>e.add(Math.floor(t.pulse/Lu))),e},[n]),f=(0,P.useMemo)(()=>{let e=1*Ru,t=Math.log(e)/(2*Math.PI),n=[];for(let e=0;e<42;e++){let r=-90+e*60,i=Zu(r),a=e/6,o=9.5*Math.exp(t*2*Math.PI*a),s=o*Math.cos(i),c=o*Math.sin(i);n.push({x:s,y:c,θ:r,r:o})}return n},[]),p=(0,P.useMemo)(()=>{if(!f.length)return``;let e=`M ${f[0].x.toFixed(3)} ${f[0].y.toFixed(3)}`;for(let t=1;tc),[v,y]=(0,P.useState)(null),b=(0,P.useRef)(null),x=(0,P.useRef)(0),S=()=>performance.timeOrigin+performance.now(),C=e=>{let t=e-zu;return zu+Math.ceil(t/Vu)*Vu},w=()=>{b.current!==null&&(clearTimeout(b.current),b.current=null)},T=()=>{w();let e=ad(new Date);h(e),_(e.monthDayIndex+Math.min(1,Math.max(0,e.pulsesIntoDay/Lu)));let t=()=>{let e=S();if(e>=x.current){let t=Math.floor((e-x.current)/Vu);for(let e=0;e<=t;e++){let e=ad(new Date);h(e),_(e.monthDayIndex+Math.min(1,Math.max(0,e.pulsesIntoDay/Lu))),x.current+=Vu}}let n=Math.max(0,x.current-S());b.current=window.setTimeout(t,n)};x.current=C(S());let n=Math.max(0,x.current-S());b.current=window.setTimeout(t,n)};(0,P.useEffect)(()=>{T();let e=()=>{document.visibilityState===`visible`&&T()};return document.addEventListener(`visibilitychange`,e),()=>{w(),document.removeEventListener(`visibilitychange`,e)}},[]);let E=(0,P.useMemo)(()=>{if(!f.length)return{x:0,y:0,r:0,θ:0};let e=Math.max(0,Math.min(f.length-1,g)),t=Math.floor(e),n=Math.min(f.length-1,t+1),r=e-t,i=f[t],a=f[n];return{x:Qu(i.x,a.x,r),y:Qu(i.y,a.y,r),r:Qu(i.r,a.r,r),θ:Qu(i.θ,a.θ,r)}},[f,g]),D=(0,P.useRef)(null);(0,P.useEffect)(()=>D.current?.focus(),[]),(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a(),e.key===`Home`&&(e.preventDefault(),se(0,8),ne(`free`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let O=o??document.body,k=m?.monthDayIndex??c,A=Xu(m?.sealText??l),j=e=>{let n=m?.monthDayIndex??c,r=(typeof t?.eternalKaiPulseToday==`number`?t.eternalKaiPulseToday:m?.pulsesIntoDay)??0;return Math.floor(r/Lu)*Lu+(e-n)*Lu},M=(0,P.useRef)(0),N=(e,t)=>{try{r?.(e,t)}catch{}let n=m?.monthIndex1??1;y({name:e,kaiTimestamp:Xu(`${m?.chakraStepString??`0:00`} — D${t+1}/M${n}`),startPulse:j(t)})},ee=(0,P.useMemo)(()=>t?.SpiralArc&&{"Ignition ArK":`#ff0024`,"Integration ArK":`#ff6f00`,"Harmonization ArK":`#ffd600`,"Reflection ArK":`#00c853`,"Purification ArK":`#00b0ff`,"Dream ArK":`#c186ff`}[t.SpiralArc]||`#8beaff`,[t?.SpiralArc]),I=(0,P.useRef)(null),L=(0,P.useRef)(null),[R,z]=(0,P.useState)(`-60 -60 120 120`),B=(0,P.useRef)({x:-60,y:-60,w:120,h:120}),te=()=>{let e=L.current;if(!e)return;let t=e.getBBox(),n=t.x-14,r=t.y-14,i=t.width+28,a=t.height+28;B.current={x:n,y:r,w:i,h:a},z(`${n} ${r} ${i} ${a}`)};(0,P.useLayoutEffect)(()=>{let e=requestAnimationFrame(te),t=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(te)};return window.addEventListener(`resize`,t),()=>{cancelAnimationFrame(e),window.removeEventListener(`resize`,t)}},[f.length]);let[V,ne]=(0,P.useState)(`fit`),[re,ie]=(0,P.useState)({x:0,y:0,z:1}),H=(0,P.useRef)(re),ae=(0,P.useRef)(null),oe=e=>{H.current=typeof e==`function`?e(H.current):e,ae.current===null&&(ae.current=requestAnimationFrame(()=>{ae.current=null,ie(H.current)}))},U=re,se=(e,t=6)=>{let n=f[e];if(!n)return;let{x:r,y:i,w:a,h:o}=B.current,s=r+a/2,c=i+o/2,l=Math.max(1,Math.min(Ju,t));oe({x:s-l*n.x,y:c-l*n.y,z:l})};(0,P.useEffect)(()=>{V===`fit`&&oe({x:0,y:0,z:1})},[R,V]),(0,P.useEffect)(()=>{if(V!==`follow`)return;let{x:e,y:t,w:n,h:r}=B.current,i=e+n/2,a=t+r/2;oe(e=>{let t=e.z;return{x:i-t*E.x,y:a-t*E.y,z:t}})},[E.x,E.y,V]);let W=(0,P.useRef)(new Map),G=(0,P.useRef)({active:!1,mode:`none`,startCam:{x:0,y:0,z:1},movedPx:0}),ce=(e,t)=>{let n=I.current,r=n.createSVGPoint();r.x=e,r.y=t;let i=n.getScreenCTM();return i?r.matrixTransform(i.inverse()):r},le=()=>{if(W.current.size<1)return null;let e=0,t=0;W.current.forEach(n=>{e+=n.clientX,t+=n.clientY});let n=W.current.size;return{cx:e/n,cy:t/n}},ue=()=>{let e=Array.from(W.current.values());if(e.length<2)return 0;let t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.hypot(t,n)},de=()=>{V!==`free`&&ne(`free`)},fe=(0,P.useRef)({lastTap:0}),pe=e=>{if(e.preventDefault(),e.target.setPointerCapture?.(e.pointerId),de(),W.current.set(e.pointerId,{id:e.pointerId,clientX:e.clientX,clientY:e.clientY}),G.current.active=!0,G.current.startCam=H.current,G.current.movedPx=0,W.current.size===1)G.current.mode=`pan`,G.current.startPt=ce(e.clientX,e.clientY),G.current.startClient={x:e.clientX,y:e.clientY};else if(W.current.size===2){G.current.mode=`pinch`;let e=le();G.current.lastCentroid=ce(e.cx,e.cy),G.current.lastDist=ue()}let t=performance.now();if(t-fe.current.lastTap<300&&W.current.size===1){let t=ce(e.clientX,e.clientY);oe(e=>{let n=e.z,r=n{if(!G.current.active)return;if(W.current.set(e.pointerId,{id:e.pointerId,clientX:e.clientX,clientY:e.clientY}),G.current.startClient){let t=e.clientX-G.current.startClient.x,n=e.clientY-G.current.startClient.y;G.current.movedPx=Math.max(G.current.movedPx,Math.hypot(t,n))}let t=H.current;if(G.current.mode===`pan`&&W.current.size===1){let n=ce(e.clientX,e.clientY),r=G.current.startPt,i=n.x-r.x,a=n.y-r.y;oe({x:G.current.startCam.x+i,y:G.current.startCam.y+a,z:t.z})}else if(W.current.size>=2){let e=le(),n=ce(e.cx,e.cy),r=G.current.lastCentroid??n,i=n.x-r.x,a=n.y-r.y,o=ue(),s=G.current.lastDist??o,c=o>0&&s>0?o/s:1,l=t.z*c,u=Math.min(Ju,Math.max(qu,l)),d=t.x+i,f=t.y+a;oe({x:d+(t.z-u)*n.x,y:f+(t.z-u)*n.y,z:u}),G.current.lastCentroid=n,G.current.lastDist=o,G.current.movedPx=9999}else if(W.current.size===1&&G.current.mode===`pinch`){G.current.mode=`pan`;let e=Array.from(W.current.values())[0];G.current.startCam=H.current,G.current.startPt=ce(e.clientX,e.clientY),G.current.startClient={x:e.clientX,y:e.clientY}}},he=e=>{if(W.current.delete(e.pointerId),W.current.size===0)G.current.active=!1,G.current.mode=`none`,G.current.startPt=void 0,G.current.startClient=void 0,G.current.lastCentroid=void 0,G.current.lastDist=void 0;else if(W.current.size===1&&G.current.mode===`pinch`){G.current.mode=`pan`;let e=Array.from(W.current.values())[0];G.current.startCam=H.current,G.current.startPt=ce(e.clientX,e.clientY),G.current.startClient={x:e.clientX,y:e.clientY}}},ge=e=>{if(V!==`free`)return;e.preventDefault();let t=ce(e.clientX,e.clientY),n=Math.exp(-e.deltaY*.0015);oe(e=>{let r=e.z*n,i=Math.min(Ju,Math.max(qu,r));return{x:e.x+(1-i/e.z)*(t.x-e.x),y:e.y+(1-i/e.z)*(t.y-e.y),z:i}})};return(0,Fu.createPortal)((0,F.jsx)(sa,{children:(0,F.jsx)(Q.div,{className:`mw-backdrop`,role:`presentation`,onPointerDown:e=>{if(performance.now()e.stopPropagation(),initial:{scale:.82,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.82,opacity:0},transition:{type:`spring`,stiffness:320,damping:26},children:[(0,F.jsx)(od,{onClose:a,refBtn:D}),(0,F.jsxs)(`svg`,{ref:I,className:`mw-stage`,viewBox:R,preserveAspectRatio:`xMidYMid meet`,"aria-label":`Month Spiral`,onPointerDown:pe,onPointerMove:me,onPointerUp:he,onPointerCancel:he,onWheel:ge,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsxs)(`filter`,{id:`mw-neon`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`1.6`,result:`b`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsxs)(`linearGradient`,{id:`etherik-baby-blue`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`#8beaff`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#c7f4ff`})]}),(0,F.jsxs)(`filter`,{id:`etherik-blue-glow`,x:`-80%`,y:`-80%`,width:`260%`,height:`260%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`1.8`,result:`b1`}),(0,F.jsx)(`feGaussianBlur`,{in:`b1`,stdDeviation:`3.2`,result:`b2`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b2`}),(0,F.jsx)(`feMergeNode`,{in:`b1`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsxs)(`filter`,{id:`etherik-blue-halo`,x:`-120%`,y:`-120%`,width:`340%`,height:`340%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`5`,result:`b3`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b3`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsxs)(`linearGradient`,{id:`ark-twinkle`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:ee,stopOpacity:`1`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:ee,stopOpacity:`0.2`})]}),(0,F.jsxs)(`linearGradient`,{id:`mw-spiral-grad`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`var(--aqua-core)`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#ff1559`})]})]}),(0,F.jsx)(Q.g,{initial:!1,animate:{x:U.x,y:U.y,scale:U.z},transition:s?{duration:0}:{type:`spring`,stiffness:200,damping:26,mass:.7},children:(0,F.jsxs)(`g`,{ref:L,children:[(0,F.jsx)(Q.path,{d:p,fill:`none`,stroke:`url(#mw-spiral-grad)`,strokeWidth:`1.6`,style:{filter:`url(#mw-neon)`},animate:s?{}:{opacity:[.55,.85,.55]},transition:s?{}:{duration:Iu/1e3,repeat:1/0,ease:`easeInOut`}}),f.map((t,n)=>{let r=e[n%6],a=n===k,o=d.has(n),s=t.θ+90,c=8.5,l=4.6,u=1.6,f=`translate(${t.x},${t.y})`,p=a?0:s,m=-l-.6,h=(p%360+360)%360,g=h>90&&h<270,_=()=>G.current.movedPx<8;return(0,F.jsxs)(`g`,{transform:`${f} rotate(${p})`,style:{cursor:`pointer`},onPointerUp:e=>{e.preventDefault(),e.stopPropagation(),_()&&(M.current=performance.now()+350,N(r,n))},onDoubleClick:()=>i(n),children:[(0,F.jsx)(Q.rect,{x:-c/2,y:-l/2,width:c,height:l,rx:u,ry:u,fill:Ku[r],stroke:a?`url(#etherik-baby-blue)`:`rgba(255,255,255,0.2)`,strokeWidth:a?1.2:.6,className:[`mw-daychip`,a?`mw-today`:``,o?`mw-hasNote`:``].join(` `).trim(),style:{filter:a?`url(#etherik-blue-glow)`:`url(#mw-neon)`},animate:!1}),a&&(0,F.jsx)(`rect`,{x:-c/2,y:-l/2,width:c,height:l,rx:u,ry:u,fill:`none`,stroke:`url(#etherik-baby-blue)`,strokeWidth:1.4,style:{filter:`url(#etherik-blue-halo)`}}),o&&(0,F.jsx)(`circle`,{cx:c/2-1.2,cy:-l/2+1.2,r:.9,fill:`var(--note-dot)`,className:`mw-note-dot`}),(0,F.jsxs)(`text`,{x:0,y:m,transform:g?`rotate(180, 0, ${m})`:void 0,textAnchor:`middle`,dominantBaseline:`auto`,fontSize:`2.8`,fontFamily:`Inter, system-ui, sans-serif`,fill:Ku[r],className:a?`mw-label mw-today-label`:`mw-label`,style:{filter:`url(#mw-neon)`},children:[r.slice(0,3),` • `,n+1]})]},n)}),(0,F.jsxs)(Q.g,{initial:!1,animate:{x:E.x,y:E.y,rotate:E.θ+90},transition:s?{duration:0}:{type:`spring`,stiffness:120,damping:18,mass:.5},className:`mw-comet`,style:{filter:`url(#etherik-blue-glow)`},children:[(0,F.jsxs)(Q.g,{animate:s?{}:{scale:[.98,1.06,.98],opacity:[.9,1,.9]},transition:s?{}:{repeat:1/0,duration:Iu/1e3,ease:`easeInOut`},children:[(0,F.jsx)(`circle`,{r:`2.2`,fill:`url(#etherik-baby-blue)`}),(0,F.jsx)(`circle`,{r:`4.4`,fill:`url(#etherik-baby-blue)`,opacity:`0.55`}),(0,F.jsx)(`circle`,{r:`6.6`,fill:`url(#etherik-baby-blue)`,opacity:`0.26`}),(0,F.jsx)(`circle`,{r:`7.6`,fill:`none`,stroke:`url(#etherik-baby-blue)`,strokeWidth:`1.1`,opacity:`0.9`})]}),(0,F.jsxs)(Q.g,{transform:`rotate(45)`,animate:s?{}:{rotate:[0,180,360],scale:[.92,1.18,.92],opacity:[.6,1,.6]},transition:s?{}:{repeat:1/0,duration:Iu/1e3,ease:`easeInOut`},children:[(0,F.jsx)(`line`,{x1:`-3.2`,y1:`0`,x2:`3.2`,y2:`0`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.45`}),(0,F.jsx)(`line`,{x1:`0`,y1:`-3.2`,x2:`0`,y2:`3.2`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.45`}),(0,F.jsx)(`line`,{x1:`-2.2`,y1:`-2.2`,x2:`2.2`,y2:`2.2`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.35`,opacity:`0.85`}),(0,F.jsx)(`line`,{x1:`2.2`,y1:`-2.2`,x2:`-2.2`,y2:`2.2`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.35`,opacity:`0.85`}),(0,F.jsx)(`circle`,{r:`0.9`,fill:ee,opacity:`0.9`})]})]})]})})]}),(0,F.jsxs)(`div`,{className:`mw-cam`,children:[(0,F.jsx)(`button`,{className:`mw-cam-btn ${V===`fit`?`is-active`:``}`,onClick:e=>{e.shiftKey||e.metaKey?(se(0,8),ne(`free`)):(ne(`fit`),oe({x:0,y:0,z:1}))},"aria-pressed":V===`fit`,title:`Fit month (⇧ to snap Day 1)`,children:`Fit`}),(0,F.jsx)(`button`,{className:`mw-cam-btn ${V===`follow`?`is-active`:``}`,onClick:()=>ne(`follow`),"aria-pressed":V===`follow`,title:`Follow comet`,children:`Follow`}),(0,F.jsx)(`button`,{className:`mw-cam-btn ${V===`free`?`is-active`:``}`,onClick:()=>ne(`free`),"aria-pressed":V===`free`,title:`Drag & zoom`,children:`Free`})]}),(0,F.jsx)(`div`,{className:`mw-seal`,children:(0,F.jsx)(`code`,{children:A})}),v&&(0,F.jsx)(Pu,{day:v,onClose:()=>y(null)})]})},`mw-backdrop`)}),O)},cd=Date.UTC(2024,4,10,6,45,41,888),ld=3+Math.sqrt(5),ud=ld*1e3,dd=1000000n,fd=17491270421n,pd=11000000n,md=(fd+18n)/36n;function hd(e){if(!Number.isFinite(e))return 0n;let t=e<0?-1:1,n=Math.abs(e),r=Math.trunc(n),i=n-r;return i<.5?BigInt(t*r):i>.5?BigInt(t*(r+1)):BigInt(t*(r%2==0?r:r+1))}var gd=(e,t)=>(e%t+t)%t;function _d(e,t){let n=e/t,r=e%t;return r!==0n&&r>0n!=t>0n?n-1n:n}function vd(e){return hd((e.getTime()-cd)/1e3/ld*1e6)}function yd(e){let t=vd(e),n=gd(t,fd),r=Number(_d(n,md)),i=n-BigInt(r)*md,a=Number(_d(i,pd));return{beat:r,step:Math.min(Math.max(a,0),43),pulsesIntoDay:Number(_d(n,dd)),livePulseApprox:Number(_d(t,dd))}}var bd=e=>String(e).padStart(2,`0`),xd=(e,t,n)=>`kai_note_${e}_${t}_${n}`;function Sd(){let[e,t]=(0,P.useState)({inset:0,viewportHeight:0});return(0,P.useEffect)(()=>{let e=window.visualViewport,n=()=>{let n=Math.round(e?.height??window.innerHeight);if(!e)return t({inset:0,viewportHeight:n});let r=Math.max(0,window.innerHeight-(e.height+e.offsetTop));t({inset:Math.round(r),viewportHeight:n})};return n(),e?.addEventListener(`resize`,n),e?.addEventListener(`scroll`,n),window.addEventListener(`resize`,n),()=>{e?.removeEventListener(`resize`,n),e?.removeEventListener(`scroll`,n),window.removeEventListener(`resize`,n)}},[]),e}var Cd=e=>e.trim()?e.trim().split(/\s+/).length:0,wd=e=>Math.max(1,Math.round(e/200)),Td=e=>Array.from(new Set(e.split(`,`).map(e=>e.trim()).filter(Boolean)));function Ed(e,t){let n=t=>{let n=e.current;n&&(n.focus(),t(n))},r=(e,r=e)=>n(n=>{let{selectionStart:i,selectionEnd:a,value:o}=n,s=o.slice(i,a)||`…`;t(o.slice(0,i)+e+s+r+o.slice(a));let c=i+e.length+s.length+r.length;requestAnimationFrame(()=>n.setSelectionRange(c,c))}),i=e=>n(n=>{let{selectionStart:r,selectionEnd:i,value:a}=n,o=a.lastIndexOf(` +`,r-1)+1,s=a.indexOf(` +`,i),c=s===-1?a.length:s,l=a.slice(o,c).split(` +`).map(t=>t.startsWith(e)?t:`${e}${t}`).join(` +`);t(a.slice(0,o)+l+a.slice(c));let u=o+l.length;requestAnimationFrame(()=>n.setSelectionRange(u,u))});return{insert:e=>n(n=>{let{selectionStart:r,selectionEnd:i}=n;t(n.value.slice(0,r)+e+n.value.slice(i));let a=r+e.length;requestAnimationFrame(()=>n.setSelectionRange(a,a))}),bold:()=>r(`**`),italic:()=>r(`*`),h1:()=>i(`# `),h2:()=>i(`## `),bullet:()=>i(`- `),task:()=>i(`- [ ] `),quote:()=>i(`> `)}}var Dd=({pulse:e,initialText:t,onSave:n,onClose:r})=>{let i=vu(),a=(0,P.useMemo)(()=>`kairosNoteDraft_${Math.round(e)}`,[e]),[o,s]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return t;try{let e=localStorage.getItem(a);if(!e)return t;let n=JSON.parse(e);return typeof n?.text==`string`?n.text:t}catch{return t}}),[c,l]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return``;try{let e=localStorage.getItem(a);if(!e)return``;let t=JSON.parse(e);return typeof t?.title==`string`?t.title:``}catch{return``}}),[u,d]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return``;try{let e=localStorage.getItem(a);if(!e)return``;let t=JSON.parse(e);return typeof t?.tags==`string`?t.tags:``}catch{return``}}),[f,p]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return`Memory`;try{let e=localStorage.getItem(a);if(!e)return`Memory`;let t=JSON.parse(e);return typeof t?.intent==`string`?t.intent:`Memory`}catch{return`Memory`}}),[m,h]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return!1;try{let e=localStorage.getItem(a);if(!e)return!1;let t=JSON.parse(e);return typeof t?.pinned==`boolean`?t.pinned:!1}catch{return!1}}),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(null),[S,C]=(0,P.useState)(t.length),[w,T]=(0,P.useState)(()=>yd(new Date)),E=(0,P.useRef)(null),D=(0,P.useRef)(null),{inset:O,viewportHeight:k}=Sd();(0,P.useEffect)(()=>{C(o.length)},[o]);let A=Ed(D,e=>{s(e),C(e.length)});(0,P.useEffect)(()=>D.current?.focus(),[]),(0,P.useEffect)(()=>{let e=document.body.style.overflow,t=document.body.style.touchAction;return document.body.style.overflow=`hidden`,document.body.style.touchAction=`none`,()=>{document.body.style.overflow=e,document.body.style.touchAction=t}},[]),(0,P.useEffect)(()=>{let e=E.current;if(!e)return;let t=()=>Array.from(e.querySelectorAll(`button,[href],input,textarea,select,details,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`)&&!e.getAttribute(`aria-hidden`)),n=e=>{if(e.key!==`Tab`)return;let n=t();if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(i.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===i&&(r.focus(),e.preventDefault())};return e.addEventListener(`keydown`,n),()=>e.removeEventListener(`keydown`,n)},[]);let j=(0,P.useRef)(null),M=(0,P.useRef)(0),N=()=>performance.timeOrigin+performance.now(),ee=e=>{let t=e-cd;return cd+Math.ceil(t/ud)*ud},I=()=>{j.current!==null&&(clearTimeout(j.current),j.current=null)},L=(0,P.useCallback)(()=>{I(),T(yd(new Date));let e=()=>{let t=N();if(t>=M.current){let e=Math.floor((t-M.current)/ud);for(let t=0;t<=e;t++)T(yd(new Date)),M.current+=ud}let n=Math.max(0,M.current-N());j.current=window.setTimeout(e,n)};M.current=ee(N());let t=Math.max(0,M.current-N());j.current=window.setTimeout(e,t)},[]);(0,P.useEffect)(()=>{L();let e=()=>{document.visibilityState===`visible`&&L()};return document.addEventListener(`visibilitychange`,e),()=>{I(),document.removeEventListener(`visibilitychange`,e)}},[L]);let R=(0,P.useCallback)(()=>{let e=D.current;if(!e||b!==null)return;e.style.height=`auto`;let t=k||window.innerHeight,n=Math.round(t*(v?.7:.42));e.style.height=Math.min(n,e.scrollHeight+2)+`px`},[v,b,k]);(0,P.useEffect)(()=>{R()},[o,v,R]);let z=(0,P.useRef)(null),B=e=>{let t=D.current;t&&(e.target.setPointerCapture(e.pointerId),z.current={startY:e.clientY,startH:t.getBoundingClientRect().height})},te=e=>{if(!z.current)return;let t=e.clientY-z.current.startY,n=z.current.startH+t,r=Math.round(window.innerHeight*.82);x(Math.max(120,Math.min(r,n)))},V=e=>{z.current&&=(e.target.releasePointerCapture(e.pointerId),null)},ne=(0,P.useMemo)(()=>`${w.beat}:${bd(w.step)}`,[w.beat,w.step]),re=(0,P.useMemo)(()=>Cd(o),[o]),ie=(0,P.useMemo)(()=>wd(re),[re]),H=(0,P.useMemo)(()=>Td(u),[u]),ae=k||(typeof window<`u`?window.innerHeight:0);(0,P.useEffect)(()=>{if(typeof window>`u`)return;let e=window.setTimeout(()=>{let e={text:o,title:c,tags:u,intent:f,pinned:m};try{localStorage.setItem(a,JSON.stringify(e))}catch{}},180);return()=>window.clearTimeout(e)},[a,f,m,u,o,c]);let oe=()=>{`vibrate`in navigator&&typeof navigator.vibrate==`function`&&navigator.vibrate(8)},U=async()=>{let t=o.trim();if(!t||g)return;_(!0);let i=yd(new Date),s=Math.max(0,i.livePulseApprox??Math.round(e)),l={id:xd(s,i.beat,i.step),pulse:s,text:t,title:c.trim()||void 0,tags:H.length?H:void 0,intent:f.trim()||void 0,pinned:m,beat:i.beat,step:i.step};try{oe(),await Promise.resolve(n(l))}finally{if(_(!1),typeof window<`u`)try{localStorage.removeItem(a)}catch{}r()}};return(0,F.jsx)(sa,{children:(0,F.jsx)(Q.div,{className:`note-modal-backdrop`,initial:{opacity:0},animate:{opacity:.92},exit:{opacity:0},transition:{duration:.22},onClick:e=>{e.target,e.currentTarget},children:(0,F.jsxs)(Q.div,{ref:E,className:`note-modal${v?` note-modal--expanded`:``}`,role:`dialog`,"aria-modal":`true`,"aria-label":`Add Kairos Note`,initial:{scale:.94,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.94,opacity:0},transition:{type:`spring`,stiffness:340,damping:26},onClick:e=>e.stopPropagation(),style:{bottom:Math.max(12,O),maxHeight:Math.max(240,ae-24),paddingBottom:`max(12px, env(safe-area-inset-bottom))`},children:[(0,F.jsxs)(`div`,{className:`note-modal__header`,children:[(0,F.jsxs)(`div`,{className:`note-modal__title`,children:[(0,F.jsx)(`span`,{children:`Note @`}),(0,F.jsx)(Q.code,{className:`note-modal__beatstep`,"aria-label":`Beat ${w.beat} Step ${w.step}`,animate:i?{}:{opacity:[.9,1,.9],filter:[`blur(0px)`,`blur(0.2px)`,`blur(0px)`]},transition:i?{}:{repeat:1/0,duration:5.236,ease:`easeInOut`},children:ne})]}),(0,F.jsxs)(`div`,{className:`note-modal__meta`,children:[(0,F.jsxs)(`code`,{className:`note-modal__pulse`,title:`Absolute Kai-Pulse`,children:[`pulse\xA0`,w.livePulseApprox.toLocaleString()]}),(0,F.jsxs)(`span`,{className:`note-modal__chip`,children:[`Intent: `,f]}),H.length>0&&(0,F.jsxs)(`span`,{className:`note-modal__chip`,children:[`Tags: `,H.slice(0,2).join(`, `)]})]}),(0,F.jsxs)(`div`,{className:`note-modal__controls`,children:[(0,F.jsx)(`button`,{type:`button`,className:`note-modal__pin${m?` is-active`:``}`,"aria-pressed":m,title:m?`Pinned note`:`Pin note`,onClick:()=>h(e=>!e),children:`⬟`}),(0,F.jsx)(`button`,{type:`button`,className:`note-modal__expand`,"aria-pressed":v,title:v?`Shrink editor`:`Expand editor`,onClick:()=>{y(e=>!e),x(null),requestAnimationFrame(()=>D.current?.focus())},children:v?`↙︎`:`↗︎`}),(0,F.jsx)(`button`,{type:`button`,className:`note-modal__close`,"aria-label":`Close`,onClick:r,children:(0,F.jsxs)(`svg`,{width:`22`,height:`22`,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:`note-modal__closeIcon`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:`kai-x`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`currentColor`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`currentColor`})]})}),(0,F.jsx)(`line`,{x1:`5`,y1:`5`,x2:`19`,y2:`19`,stroke:`url(#kai-x)`,strokeWidth:`2`}),(0,F.jsx)(`line`,{x1:`19`,y1:`5`,x2:`5`,y2:`19`,stroke:`url(#kai-x)`,strokeWidth:`2`})]})})]})]}),(0,F.jsxs)(`div`,{className:`note-modal__toolbar`,role:`group`,"aria-label":`Formatting`,children:[(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Bold (**) — Cmd/Ctrl+B`,onClick:e=>{e.preventDefault(),A.bold()},children:`B`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Italic (*) — Cmd/Ctrl+I`,onClick:e=>{e.preventDefault(),A.italic()},children:`I`}),(0,F.jsx)(`span`,{className:`tool-sep`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Heading 1 (# )`,onClick:e=>{e.preventDefault(),A.h1()},children:`H1`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Heading 2 (## )`,onClick:e=>{e.preventDefault(),A.h2()},children:`H2`}),(0,F.jsx)(`span`,{className:`tool-sep`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Bulleted list (- )`,onClick:e=>{e.preventDefault(),A.bullet()},children:`•`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Task list (- [ ] )`,onClick:e=>{e.preventDefault(),A.task()},children:`☐`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Quote (> )`,onClick:e=>{e.preventDefault(),A.quote()},children:`❝`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Insert timestamp`,onClick:e=>{e.preventDefault();let t=new Date().toLocaleString();A.insert(`\n- ${t}`)},children:`⌚`}),(0,F.jsxs)(`div`,{className:`tool-stats`,"aria-live":`polite`,children:[(0,F.jsxs)(`span`,{children:[S.toLocaleString(),` chars`]}),(0,F.jsxs)(`span`,{children:[`· `,re.toLocaleString(),` words`]}),(0,F.jsxs)(`span`,{children:[`· `,ie,` min`]})]})]}),(0,F.jsxs)(`div`,{className:`note-modal__content`,children:[(0,F.jsxs)(`div`,{className:`note-modal__meta-grid`,children:[(0,F.jsxs)(`label`,{className:`note-modal__label`,children:[`Title`,(0,F.jsx)(`input`,{className:`note-modal__input`,value:c,onChange:e=>l(e.target.value),placeholder:`Signal title…`,maxLength:120})]}),(0,F.jsxs)(`label`,{className:`note-modal__label`,children:[`Tags`,(0,F.jsx)(`input`,{className:`note-modal__input`,value:u,onChange:e=>d(e.target.value),placeholder:`ritual, focus, idea`})]}),(0,F.jsxs)(`label`,{className:`note-modal__label`,children:[`Intent`,(0,F.jsx)(`select`,{className:`note-modal__input note-modal__select`,value:f,onChange:e=>p(e.target.value),children:[`Memory`,`Plan`,`Idea`,`Task`,`Insight`,`Reminder`].map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))})]})]}),H.length>0&&(0,F.jsx)(`div`,{className:`note-modal__tags`,children:H.map(e=>(0,F.jsx)(`span`,{className:`note-modal__tag`,children:e},e))}),(0,F.jsxs)(`div`,{className:`note-modal__field${v?` note-modal__field--doc`:``}`,children:[(0,F.jsx)(`textarea`,{ref:D,value:o,onChange:e=>{s(e.target.value),C(e.target.value.length)},onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),U()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`b`&&(e.preventDefault(),A.bold()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`i`&&(e.preventDefault(),A.italic())},placeholder:`Cast your resonance into the kairos stream...`,rows:v?14:6,"aria-label":`Note text`,maxLength:2e4,style:{height:b===null?void 0:`${Math.round(b)}px`}}),(0,F.jsx)(`div`,{className:`note-modal__resize`,role:`separator`,"aria-orientation":`horizontal`,title:`Drag to resize`,onPointerDown:B,onPointerMove:te,onPointerUp:V})]}),(0,F.jsxs)(`div`,{className:`note-modal__hints`,"aria-live":`polite`,children:[`Encoding to `,(0,F.jsxs)(`strong`,{children:[`Beat `,w.beat]}),` • `,(0,F.jsxs)(`strong`,{children:[`Step `,w.step]})]})]}),(0,F.jsx)(`div`,{className:`note-modal__actions`,children:(0,F.jsx)(`button`,{type:`button`,className:`btn-primary`,disabled:!o.trim()||g,onClick:U,children:g?`Saving…`:`Save`})})]})})})},Od=S(y(),1),kd=typeof window<`u`?P.useLayoutEffect:P.useEffect,Ad=Date.UTC(2024,4,10,6,45,41,888),jd=3+Math.sqrt(5),Md=jd*1e3,Nd=17491.270421,Pd=`kairosNotes`,Fd=`kairosNotesHiddenIds`,Id=`kai_notes_`,Ld={Root:`#ff0024`,Sakral:`#ff6f00`,Solar:`#ffd600`,Heart:`#00c853`,Throat:`#00b0ff`,Krown:`#c186ff`,MemorySpiral:`#ff80ab`},Rd={"Ignition ArK":`Root`,"Integration ArK":`Sakral`,"Harmonization ArK":`Solar`,"Reflection ArK":`Heart`,"Purification ArK":`Throat`,"Dream ArK":`Krown`},zd=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`],Bd={Solhara:`Ignition ArK`,Aquaris:`Integration ArK`,Flamora:`Harmonization ArK`,Verdari:`Reflection ArK`,Sonari:`Purification ArK`,Kaelith:`Dream ArK`},Vd={Solhara:`#ff0024`,Aquaris:`#ff6f00`,Flamora:`#ffd600`,Verdari:`#00c853`,Sonari:`#00b0ff`,Kaelith:`#c186ff`},Hd=e=>e.stopPropagation(),Ud=e=>{e.preventDefault(),e.stopPropagation()},Wd=e=>e.replace(/D\s+(\d+)/,`D$1`).replace(/\/\s*M(\d+)/,`/M$1`),Gd=(e,t)=>{let n=e.replace(`#`,``),r=Number.parseInt(n,16);return`rgba(${r>>16&255}, ${r>>8&255}, ${r&255}, ${t})`},Kd=e=>{if(typeof document>`u`)return;let t=Ld[Rd[e]??`Root`],n=document.documentElement;n.style.setProperty(`--aqua-core`,t),n.style.setProperty(`--aqua-soft`,Gd(t,.14)),n.style.setProperty(`--seal-glow-inset`,Gd(t,.36)),n.style.setProperty(`--seal-glow-mid`,Gd(t,.42)),n.style.setProperty(`--seal-glow-outer`,Gd(t,.24))},qd=1000000n,Jd=17491270421n,Yd=11000000n,Xd=(Jd+18n)/36n,Zd=e=>String(e).padStart(2,`0`),Qd=(e,t)=>(e%t+t)%t;function $d(e,t){let n=e/t,r=e%t;return r!==0n&&r>0n!=t>0n?n-1n:n}function ef(e){if(!Number.isFinite(e))return 0n;let t=e<0?-1:1,n=Math.abs(e),r=Math.trunc(n),i=n-r;return i<.5?BigInt(t*r):i>.5?BigInt(t*(r+1)):BigInt(t*(r%2==0?r:r+1))}function tf(e){return ef((e.getTime()-Ad)/1e3/jd*1e6)}function nf(e){let t=tf(e),n=Qd(t,Jd),r=$d(t,Jd),i=Number($d(n,Xd)),a=n-BigInt(i)*Xd,o=Number($d(a,Yd)),s=Math.min(Math.max(o,0),43);return{dayIndex:r,beat:i,step:s,pulsesIntoDay:Number($d(n,qd)),harmonicDay:zd[Number(Qd(r,6n))],dayOfMonth:Number(Qd(r,42n))+1,monthIndex1:Number(Qd($d(r,42n),8n))+1,chakraStepString:`${i}:${Zd(s)}`}}var rf=(e,t)=>(e%t+t)%t;function af(e){let t=Math.floor(e.pulse/Nd),n=zd[rf(t,6)],r=rf(t,42)+1,i=rf(Math.floor(t/42),8)+1,a=`${e.beat}:${Zd(e.step)}`;return{id:e.id,text:e.text,title:e.title??``,tags:(e.tags??[]).join(`|`),intent:e.intent??``,pinned:e.pinned?`yes`:``,pulse:e.pulse,beat:e.beat,step:e.step,chakraStep:a,dayIndex:t,dayName:n,dayOfMonth:r,monthIndex1:i}}function of(e){let t=String(e);return/[",\n]/.test(t)?`"${t.replace(/"/g,`""`)}"`:t}function sf(e){let t=[`id`,`text`,`title`,`tags`,`intent`,`pinned`,`pulse`,`beat`,`step`,`chakraStep`,`dayIndex`,`dayName`,`dayOfMonth`,`monthIndex1`];return`${t.join(`,`)}\n${e.map(e=>t.map(t=>of(e[t])).join(`,`)).join(` +`)}\n`}function cf(e,t,n){let r=new Blob([n],{type:t}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}function lf(e){let t=nf(e),n=tf(e),r=Number($d(n,qd)),i=`${t.chakraStepString} — D${t.dayOfMonth}/M${t.monthIndex1}`,a=Bd[t.harmonicDay];return{harmonicDay:t.harmonicDay,eternalKaiPulseToday:r,kairos_seal_day_month:i,SpiralArc:a}}var uf=e=>typeof e==`number`&&Number.isFinite(e),df=e=>typeof e==`string`,ff=e=>typeof e==`boolean`,pf=Nd/36;function mf(e){let t=(e%Nd+Nd)%Nd,n=Math.floor(t/pf),r=t-n*pf;return{beat:n,step:Math.min(43,Math.max(0,Math.floor(r/11)))}}function hf(e){let t=e;if(!df(t.id)||!df(t.text)||!uf(t.pulse))return null;let n=uf(t.beat)?t.beat:void 0,r=uf(t.step)?t.step:void 0,i=uf(t.createdAt)?t.createdAt:Date.now(),a=df(t.title)?t.title:void 0,o=df(t.intent)?t.intent:void 0,s=ff(t.pinned)?t.pinned:void 0,c=Array.isArray(t.tags)?t.tags.filter(e=>typeof e==`string`):void 0;if(n===void 0||r===void 0){let e=mf(t.pulse);return{id:t.id,text:t.text,title:a,tags:c,intent:o,pinned:s,pulse:t.pulse,beat:e.beat,step:e.step,createdAt:i}}return{id:t.id,text:t.text,title:a,tags:c,intent:o,pinned:s,pulse:t.pulse,beat:n,step:r,createdAt:i}}function gf(){if(typeof window>`u`)return[];try{let e=localStorage.getItem(Pd);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.map(hf).filter(e=>e!==null).sort((e,t)=>{let n=Number(!!t.pinned)-Number(!!e.pinned);return n===0?e.pulse-t.pulse:n}):[]}catch{return[]}}function _f(){if(typeof window>`u`)return new Set;try{let e=localStorage.getItem(Fd);if(!e)return new Set;let t=JSON.parse(e);if(!Array.isArray(t))return new Set;let n=t.filter(e=>typeof e==`string`);return new Set(n)}catch{return new Set}}function vf(e,t){let n=(e,t)=>{let n=Number(!!t.pinned)-Number(!!e.pinned);return n===0?e.pulse-t.pulse:n},r=e.findIndex(e=>n(t,e)<0);return r===-1?[...e,t]:[...e.slice(0,r),t,...e.slice(r)]}function yf(e,t){return vf(e.filter(e=>e.id!==t.id),t)}function bf(e){let t=$d(BigInt(Math.max(0,Math.floor(e)))*qd,Jd);return Number($d(t*Jd,qd))}function xf(e){if(!(typeof window>`u`))try{let t=`${Id}${bf(e.pulse)}`,n=localStorage.getItem(t),r=n?JSON.parse(n):[],i=Array.isArray(r)?r:[],a=i.findIndex(t=>t.beat===e.beat&&t.step===e.step),o=a>=0?i.map((t,n)=>n===a?{...t,text:e.text}:t):[...i,{beat:e.beat,step:e.step,text:e.text}];localStorage.setItem(t,JSON.stringify(o))}catch{}}var Sf=({onClose:e,container:t})=>{let n=typeof window<`u`&&typeof document<`u`,[r,i]=(0,P.useState)(()=>Date.now()),a=(0,P.useMemo)(()=>new Date(r),[r]),o=(0,P.useMemo)(()=>nf(a),[a]),s=(0,P.useMemo)(()=>lf(a),[a]),[c,l]=(0,P.useState)(()=>gf()),[u,d]=(0,P.useState)(()=>_f()),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(()=>({open:!1,pulse:0,initialText:``})),[g,_]=(0,P.useState)(null),v=(0,P.useMemo)(()=>n?t??document.body:null,[n,t]);kd(()=>{Kd(s.SpiralArc)},[s.SpiralArc]);let y=(0,P.useRef)(null),b=()=>performance.timeOrigin+performance.now(),x=e=>{let t=e-Ad;return Ad+Math.ceil(t/Md)*Md},S=(0,P.useCallback)(()=>{let e=y.current;e!==null&&(window.clearTimeout(e),y.current=null)},[]),C=(0,P.useCallback)(()=>{S();let e=b(),t=x(e),n=Math.max(0,t-e);y.current=window.setTimeout(()=>{i(Date.now()),C()},n)},[S]);(0,P.useEffect)(()=>{C();let e=()=>{document.visibilityState===`visible`&&(i(Date.now()),C())};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),S()}},[C,S]);let w=(0,P.useCallback)(e=>{xf(e),l(t=>{let n=yf(t,{...e,createdAt:Date.now()});try{localStorage.setItem(Pd,JSON.stringify(n))}catch{}return n})},[]),T=(0,P.useCallback)(e=>{let t=new Set(e);d(t);try{localStorage.setItem(Fd,JSON.stringify([...t]))}catch{}},[]),E=(0,P.useCallback)(e=>{let t=e-zd.indexOf(o.harmonicDay),n=o.dayIndex+BigInt(t);return Number($d(n*Jd,qd))},[o.dayIndex,o.harmonicDay]),D=(0,P.useCallback)(e=>{let t=e-zd.indexOf(o.harmonicDay),n=o.dayIndex+BigInt(t);return{dayOfMonth:Number(Qd(n,42n))+1,monthIndex1:Number(Qd($d(n,42n),8n))+1}},[o.dayIndex,o.harmonicDay]),O=(0,P.useMemo)(()=>c.filter(e=>!u.has(e.id)),[c,u]),k=(0,P.useCallback)(()=>{if(c.length===0)return;let e=c.map(af);cf(`kairos-notes-${`P${Math.round(s.eternalKaiPulseToday)}`}.json`,`application/json`,JSON.stringify(e,null,2))},[c,s.eternalKaiPulseToday]),A=(0,P.useCallback)(()=>{if(c.length===0)return;let e=sf(c.map(af));cf(`kairos-notes-${`P${Math.round(s.eternalKaiPulseToday)}`}.csv`,`text/csv;charset=utf-8`,e)},[c,s.eternalKaiPulseToday]),j=(0,P.useCallback)(()=>{if(O.length===0)return;let e=new Set(u);for(let t of O)e.add(t.id);T(e)},[O,u,T]);(0,P.useEffect)(()=>{let e=document.body.style.overflow,t=document.body.style.touchAction;return document.body.style.overflow=`hidden`,document.body.style.touchAction=`none`,()=>{document.body.style.overflow=e,document.body.style.touchAction=t}},[]);let M=(0,P.useRef)(null);kd(()=>{M.current?.focus()},[]);let N=(0,P.useCallback)(()=>{if(g){(0,Od.flushSync)(()=>_(null));return}if(m.open){(0,Od.flushSync)(()=>h(e=>({...e,open:!1})));return}if(f){(0,Od.flushSync)(()=>p(!1));return}e()},[g,m.open,f,e]);(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(e.preventDefault(),N())};return window.addEventListener(`keydown`,e,{passive:!1}),()=>window.removeEventListener(`keydown`,e)},[N]);let ee=(0,P.useMemo)(()=>zd.map((e,t)=>{let n=90-t*10,r=n,i=n*.7;return{day:e,idx:t,d:`M ${-r/2+10} ${-i/2} H ${r/2-10} + Q ${r/2} ${-i/2} ${r/2} ${-i/2+10} + V ${i/2-10} Q ${r/2} ${i/2} ${r/2-10} ${i/2} + H ${-r/2+10} Q ${-r/2} ${i/2} ${-r/2} ${i/2-10} + V ${-i/2+10} Q ${-r/2} ${-i/2} ${-r/2+10} ${-i/2} Z`,h:i,colour:Vd[e]}}),[]),I=(0,P.useId)().replace(/:/g,``),L=`wk-neon-glow-${I}`,R=`wk-grad-x-${I}`,z=(0,P.useMemo)(()=>{let e=o.pulsesIntoDay/Nd;return Math.max(0,Math.min(e,1))},[o.pulsesIntoDay]),B=(0,P.useCallback)((e,t)=>{let{dayOfMonth:n,monthIndex1:r}=D(e),i={name:t,kaiTimestamp:Wd(`${o.chakraStepString} — D${n}/M${r}`),startPulse:E(e)};(0,Od.flushSync)(()=>_(i))},[E,o.chakraStepString,D]),te=(0,P.useCallback)((e,t)=>{(0,Od.flushSync)(()=>h({open:!0,pulse:e,initialText:t}))},[]),V=(0,P.useCallback)(e=>{(0,Od.flushSync)(()=>{_(null),p(e)})},[]);return v?(0,Od.createPortal)((0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`wk-backdrop`,"data-theme":`dark`,"data-mesh-depth":`back`,"data-month-open":f?`1`:`0`,role:`presentation`,onPointerDown:e=>{e.target===e.currentTarget&&(Ud(e),N())},children:(0,F.jsxs)(`div`,{className:`wk-container`,role:`dialog`,"aria-modal":`true`,children:[(0,F.jsx)(`button`,{ref:M,type:`button`,className:`wk-close god-x`,"aria-label":`Close`,onPointerDown:e=>{Ud(e),N()},onClick:e=>{Ud(e),N()},children:(0,F.jsxs)(`svg`,{className:`wk-xsvg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:R,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`#00eaff`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#ff1559`})]})}),(0,F.jsx)(`line`,{x1:`4`,y1:`4`,x2:`20`,y2:`20`,stroke:`url(#${R})`,strokeWidth:`2`}),(0,F.jsx)(`line`,{x1:`20`,y1:`4`,x2:`4`,y2:`20`,stroke:`url(#${R})`,strokeWidth:`2`})]})}),(0,F.jsx)(`div`,{className:`wk-header`,children:(0,F.jsxs)(`div`,{className:`wk-toggle`,role:`tablist`,"aria-label":`Scope`,children:[(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":!f,className:f?``:`active`,onPointerDown:e=>{Ud(e),V(!1)},onClick:e=>{Ud(e),V(!1)},children:`Week`}),(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":f,className:f?`active`:``,onPointerDown:e=>{Ud(e),V(!0)},onClick:e=>{Ud(e),V(!0)},children:`Month`})]})}),(0,F.jsx)(`div`,{className:`wk-seal`,"aria-hidden":`true`,children:(0,F.jsx)(`code`,{className:`wk-sealcode`,children:Wd(`${o.chakraStepString} — D${o.dayOfMonth}/M${o.monthIndex1}`)})}),(0,F.jsxs)(`svg`,{className:`wk-stage`,viewBox:`-50 -50 100 100`,preserveAspectRatio:`xMidYMid meet`,"aria-label":`Week Rings`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`filter`,{id:L,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,filterUnits:`userSpaceOnUse`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`1.8`,result:`blur`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`blur`}),(0,F.jsx)(`feMergeNode`,{in:`blur`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})}),ee.map(({day:e,idx:t,d:n,h:r,colour:i})=>{let a=o.harmonicDay===e,{dayOfMonth:s,monthIndex1:c}=D(t),l=n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),B(t,e))};return(0,F.jsxs)(`g`,{className:`wk-day wk-i${t} ${a?`is-today`:``}`,role:`button`,tabIndex:0,"aria-label":`Open ${e} — D${s}/M${c}`,onPointerDown:n=>{Ud(n),B(t,e)},onClick:n=>{Ud(n),B(t,e)},onKeyDown:l,children:[(0,F.jsx)(`path`,{className:`wk-ring ${a?`is-today-ring`:``}`,d:n,fill:`none`,stroke:i,strokeLinecap:`round`,strokeWidth:a?3.2:1.7,pathLength:1,strokeDasharray:1,strokeDashoffset:a?1-z:0,filter:`url(#${L})`}),(0,F.jsx)(`text`,{className:`wk-day-label ${a?`is-today-label`:``}`,x:`0`,y:-(r/2)+2,fill:i,textAnchor:`middle`,filter:`url(#${L})`,children:e})]},e)})]}),(0,F.jsx)(`button`,{type:`button`,className:`wk-add-note-btn`,"aria-label":`Add memory`,onPointerDown:e=>{Ud(e),te(s.eternalKaiPulseToday,``)},onClick:e=>{Ud(e),te(s.eternalKaiPulseToday,``)},children:`+`}),g&&(0,F.jsx)(`div`,{className:`wk-daydetail-overlay`,onPointerDown:Hd,onClick:Hd,role:`presentation`,children:(0,F.jsx)(Pu,{day:g,onClose:()=>(0,Od.flushSync)(()=>_(null)),onSaveKaiNote:e=>w(e)})}),m.open&&(0,F.jsx)(`div`,{className:`wk-notemodal-overlay`,onPointerDown:Hd,onClick:Hd,role:`presentation`,children:(0,F.jsx)(Dd,{pulse:m.pulse,initialText:m.initialText,onSave:e=>{w(e),(0,Od.flushSync)(()=>h(e=>({...e,open:!1})))},onClose:()=>(0,Od.flushSync)(()=>h(e=>({...e,open:!1})))})}),(0,F.jsx)(`aside`,{className:`wk-notes-dock`,onPointerDown:Hd,onClick:Hd,children:(0,F.jsxs)(`div`,{className:`wk-notes-list`,children:[(0,F.jsxs)(`div`,{className:`wk-notes-header`,children:[(0,F.jsx)(`h3`,{children:`Memories`}),(0,F.jsxs)(`div`,{className:`wk-notes-actions`,children:[O.length>0&&(0,F.jsx)(`button`,{type:`button`,className:`wk-chip wk-clear-btn`,title:`Clear panel notes (does not delete)`,onPointerDown:e=>{Ud(e),j()},onClick:e=>{Ud(e),j()},children:`Clear`}),c.length>0&&(0,F.jsxs)(`div`,{className:`wk-export-group`,"aria-label":`Export memories`,children:[(0,F.jsx)(`button`,{type:`button`,className:`wk-export-btn`,title:`Download JSON`,onPointerDown:e=>{Ud(e),k()},onClick:e=>{Ud(e),k()},children:`⤓ JSON`}),(0,F.jsx)(`span`,{className:`wk-divider`,"aria-hidden":`true`}),(0,F.jsx)(`button`,{type:`button`,className:`wk-export-btn`,title:`Download CSV`,onPointerDown:e=>{Ud(e),A()},onClick:e=>{Ud(e),A()},children:`⤓ CSV`})]})]})]}),O.length>0?(0,F.jsx)(`ul`,{className:`wk-mem-ul`,"aria-label":`Memories list`,children:O.map(e=>(0,F.jsxs)(`li`,{className:`wk-mem-li`,children:[(0,F.jsxs)(`div`,{className:`wk-mem-head`,children:[(0,F.jsxs)(`strong`,{className:`wk-mem-kai`,children:[Math.round(e.pulse),` · `,e.beat,`:`,Zd(e.step)]}),e.pinned&&(0,F.jsx)(`span`,{className:`wk-mem-pin`,children:`Pinned`})]}),e.title&&(0,F.jsx)(`div`,{className:`wk-mem-title`,children:e.title}),(0,F.jsxs)(`span`,{className:`wk-mem-text`,children:[` `,e.text]}),(e.tags?.length||e.intent)&&(0,F.jsxs)(`div`,{className:`wk-mem-meta`,children:[e.intent&&(0,F.jsx)(`span`,{className:`wk-mem-intent`,children:e.intent}),e.tags?.length&&(0,F.jsx)(`span`,{className:`wk-mem-tags`,children:e.tags.slice(0,3).map(e=>(0,F.jsx)(`span`,{className:`wk-mem-tag`,children:e},e))})]})]},e.id))}):(0,F.jsx)(`p`,{className:`wk-notes-empty`,children:`No memories yet.`})]})})]})}),f&&(0,F.jsx)(sd,{container:v,DAYS:zd,notes:c,initialData:s,onSelectDay:()=>{},onAddNote:e=>{te(Number($d(BigInt(e)*Jd,qd)),c.find(t=>Math.floor(t.pulse/Nd)===e)?.text||``)},onClose:()=>{(0,Od.flushSync)(()=>{p(!1),_(null)})}})]}),v):null},Cf=(e,t,n)=>Math.max(t,Math.min(n,e)),wf=e=>{switch(e){case`Ignition Ark`:return`#ff0033`;case`Integration Ark`:return`#ff6600`;case`Harmonization Ark`:return`#ffcc00`;case`Reflektion Ark`:return`#00cc66`;case`Purifikation Ark`:return`#00ccff`;case`Dream Ark`:return`#cc00cc`;default:return`#00ffff`}},Tf=({showControls:r=!0,className:i=``,onSunriseChange:s})=>{let[l,d]=(0,P.useState)(!1),[m,_]=(0,P.useState)(new Date),[y,b]=(0,P.useState)(``),[x,S]=(0,P.useState)(null),[w,T]=(0,P.useState)(!1);(0,P.useEffect)(()=>{let e=()=>{_(new Date),d(!0),setTimeout(()=>d(!1),750)};e();let t=setInterval(e,Math.round(o*1e3));return()=>clearInterval(t)},[]);let E=(0,P.useMemo)(()=>p(m),[m]),{kaiPulseToday:D,dayPercent:O,beatIndex:k,stepIndex:A,percentIntoStep:j}=(0,P.useMemo)(()=>f(m),[m]),M=(0,P.useMemo)(()=>({beatIndex:k,stepIndex:A,stepsPerBeat:e,percentIntoStep:j}),[k,A,j]),N=`${k}:${String(A).padStart(2,`0`)}`,ee=(0,P.useMemo)(()=>t(m),[m]),I=(0,P.useMemo)(()=>h(m),[m]),L=I.dayName??u[((I.solarAlignedWeekDayIndex??0)%6+6)%6],R=a[Cf(I.solarAlignedMonth,1,8)-1],z=I.solarAlignedDayInMonth+1,B=n/c,te=Math.floor(E%n/B)%c,V=E%n-te*B,ne=B/e,re=Math.floor(V/ne)%e,ie=(0,P.useMemo)(()=>{let e=E,t=t=>{let n=(e%t+t)%t;return{pulseInCycle:n,cycleLength:t,percent:n/t*100}},r={pulseInCycle:D,cycleLength:n,percent:O};return{arcBeat:t(6),microCycle:t(60),chakraLoop:t(360),harmonicDay:r}},[E,D,O]),H=(0,P.useMemo)(()=>(k+.5)/c*360,[k]),ae=C(),oe=()=>{if(!y)return;g(y,new Date),b(``);let e=C();S(e),s?.(e),_(new Date)},U=()=>{v(new Date);let e=C();S(e),s?.(e),_(new Date)},se=e=>{let t=e.target.value.replace(/\D/g,``).slice(0,4),n=t;t.length>2&&(n=`${t.slice(0,t.length-2)}:${t.slice(-2)}`),b(n)};return(0,F.jsxs)(`div`,{className:`solar-anchored-dial ${i}`,children:[(0,F.jsx)(`div`,{className:`dial-stage depth-3d ${l?`glow-pulse`:``}`,title:`Solar-anchored dial`,children:(0,F.jsx)(ce,{hue:wf(ee),kaiPulseEternal:E,pulse:D,harmonicDayPercent:ie.harmonicDay.percent,microCyclePercent:j,dayLabel:L,monthLabel:R,monthDay:z,glowPulse:l,rotationOverride:H,solarSpiralStepString:N,solarSpiralStep:M,eternalBeatIndex:te,eternalStepIndex:re})}),r&&(0,F.jsxs)(`div`,{className:`solar-sync-panel`,children:[(0,F.jsxs)(`div`,{className:`panel-title`,children:[(0,F.jsx)(`button`,{type:`button`,className:`panel-glyph`,title:w?`Hide explainer`:`Show explainer`,"aria-label":`Toggle explainer`,"aria-expanded":w,"aria-controls":`solar-explainer`,onClick:()=>T(e=>!e),children:`?`}),(0,F.jsxs)(`div`,{className:`panel-text`,children:[(0,F.jsx)(`strong`,{children:`Solar Sync`}),(0,F.jsxs)(`span`,{className:`panel-sub`,children:[`Sunrise offset (UTC): `,(0,F.jsxs)(`code`,{children:[x??ae,`s`]})]})]})]}),(0,F.jsx)(`div`,{className:`row buttons-row`,children:(0,F.jsx)(`button`,{className:`btn primary`,onClick:U,title:`Set sunrise = now (offline)`,type:`button`,children:`Sun rose now`})}),(0,F.jsxs)(`div`,{className:`row input-row`,children:[(0,F.jsx)(`label`,{htmlFor:`sunriseHHMM`,className:`label`,children:`Sunrise (HH:MM, local)`}),(0,F.jsxs)(`div`,{className:`input-group`,children:[(0,F.jsx)(`input`,{id:`sunriseHHMM`,className:`time-input`,type:`text`,inputMode:`numeric`,enterKeyHint:`done`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,placeholder:`06:12`,value:y,onChange:se,onClick:e=>e.stopPropagation(),onFocus:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),style:{width:88,fontSize:17,lineHeight:1.4}}),(0,F.jsx)(`button`,{className:`btn save`,onClick:oe,type:`button`,children:`Save`})]})]}),(0,F.jsx)(`div`,{id:`solar-explainer`,className:`explainer ${w?`open`:``}`,role:`region`,"aria-label":`Solar Sync explainer`,children:(0,F.jsxs)(`p`,{className:`hint`,children:[`No location, no network. The dial maps each day from your stored sunrise to the next (fixed at `,(0,F.jsx)(`strong`,{children:n.toFixed(6)}),` Breathes). Re-tap “Sun rose now” or enter your local sunrise anytime to re-calibrate.`]})})]})]})};function Ef(e){let t=t=>{let n=t.detail?.offsetSec;typeof n==`number`&&Number.isFinite(n)&&e(n)},n=t=>{if(t.key===`sovereign.sunriseOffsetSec`&&t.newValue!=null){let n=Number(t.newValue);Number.isFinite(n)&&e(n)}};return typeof window<`u`&&(window.addEventListener(`solar:offset-changed`,t),window.addEventListener(`storage`,n)),()=>{typeof window<`u`&&(window.removeEventListener(`solar:offset-changed`,t),window.removeEventListener(`storage`,n))}}var Df=(e,t,n)=>Math.max(t,Math.min(n,e));function Of(){let[r,i]=(0,P.useState)(new Date),[s,l]=(0,P.useState)(0);(0,P.useEffect)(()=>{let e=()=>{i(new Date)};e();let t=setInterval(e,Math.round(o*1e3));return()=>clearInterval(t)},[]),(0,P.useEffect)(()=>Ef(()=>l(e=>e+1)),[]);let d=(0,P.useMemo)(()=>p(r),[r,s]),{kaiPulseToday:m,dayPercent:g,beatIndex:_,stepIndex:v,percentIntoStep:y}=(0,P.useMemo)(()=>f(r),[r,s]),b=(0,P.useMemo)(()=>({beatIndex:_,stepIndex:v,stepsPerBeat:e,percentIntoStep:y}),[_,v,y]),x=`${_}:${String(v).padStart(2,`0`)}`,S=(0,P.useMemo)(()=>t(r),[r,s]),w=(0,P.useMemo)(()=>h(r),[r,s]),T=u[w.solarAlignedWeekDayIndex],E=a[Df(w.solarAlignedMonth,1,8)-1],D=w.solarAlignedDayInMonth+1,O=n/c,k=Math.floor(d%n/O)%c,A=d%n-k*O,j=O/e,M=Math.floor(A/j)%e,N=(0,P.useMemo)(()=>(_+.5)/c*360,[_]);return{now:r,sunriseOffsetSec:C(),kaiPulseEternal:d,kaiPulseToday:m,dayPercent:g,solarStep:b,solarStepString:x,solarArcName:S,dayLabel:T,monthLabel:E,monthDay1:D,etBeatIndex:k,etStepIndex:M,rotationOverride:N}}var kf=S(y(),1),Af=e=>`wakeLock`in e,jf=6,Mf=60,Nf=360,$=17491.270421,Pf=336,Ff=$*Pf,If=42,Lf=If*$,Rf=3+Math.sqrt(5),zf=1e6,Bf=Date.UTC(2024,4,10,6,45,41,888),Vf=Date.UTC(2024,4,11,4,13,26,0),Hf=17491270421,Uf=91584291,Wf=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`],Gf=[`Awakening Flame`,`Flowing Heart`,`Radiant Will`,`Harmonik Voh`,`Inner Mirror`,`Dreamfire Memory`,`Krowned Light`],Kf=[`Aethon`,`Virelai`,`Solari`,`Amarin`,`Kaelus`,`Umbriel`,`Noctura`,`Liora`],qf=[`Ignite`,`Integrate`,`Harmonize`,`Reflekt`,`Purify`,`Dream`],Jf={Ignite:`Ignition Ark`,Integrate:`Integration Ark`,Harmonize:`Harmonization Ark`,Reflekt:`Reflection Ark`,Purify:`Purification Ark`,Dream:`Dream Ark`},Yf={Solhara:`First Day of the Week — the Root Spiral day. Kolor: deep krimson. Element: Earth and primal fire. Geometry: square foundation. This is the day of stability, ankoring, and sakred will. Solhara ignites the base of the spine and the foundation of purpose. It is a day of grounding divine intent into physikal motion. You stand tall in the presense of gravity — not as weight, but as remembranse. This is where your spine bekomes the axis mundi, and every step affirms: I am here, and I align to act.`,Aquaris:`Sekond Day of the Week — the Sakral Spiral day. kolor: ember orange. Element: Water in motion. Geometry: vesika pisis. This is the day of flow, feeling, and sakred sensuality. Aquaris opens the womb of the soul and the tides of emotion. Energy moves through the hips like waves of memory. This is a day to surrender into koherense through konnection — with the self, with others, with life. kreative energy surges not as forse, but as feeling. The waters remember the shape of truth.`,Flamora:`Third Day of the Week — the Solar Plexus Spiral day. Kolor: golden yellow. Element: solar fire. Geometry: radiant triangle. This is the day of embodied klarity, konfidence, and divine willpower. Flamora shines through the core and asks you to burn away the fog of doubt. It is a solar yes. A day to move from sentered fire — not reaktion, but aligned intention. Your light becomes a kompass, and the universe reflekts back your frequensy. You are not small. You are radiant purpose, in motion.`,Verdari:`Fourth Day of the Week — the Heart Spiral day. Kolor: emerald green. Element: air and earth. Geometry: hexagram. This is the day of love, kompassion, and harmonik presense. Verdari breathes life into connection. It is not a soft eskape — it is the fierse koherense of unkonditional presense. Love is not a feeling — it is an intelligense. Today, the heart expands not just emotionally, but dimensionally. This is where union okurs: of left and right, self and other, matter and light.`,Sonari:`Fifth Day of the Week — the Throat Spiral day. Kolor: deep blue. Element: wind and sound. Geometry: sine wave within pentagon. This is the day of truth-speaking, sound-bending, and vibrational kommand. Sonari is the breath made visible. Every word is a bridge, every silense a resonanse. This is not just kommunication — it is invokation. You speak not to be heard, but to resonate. Koherense rises through vocal kords and intention. The universe listens to those in tune.`,Kaelith:`Sixth Day of the Week — the Krown Spiral day. Kolor: violet-white. Element: ether. Geometry: twelve-petaled krown. This is the day of divine remembranse, light-body alignment, and kosmic insight. Kaelith opens the upper gate — the temple of direct knowing. You are not separate from sourse. Today, memory awakens. The light flows not downward, but inward. Dreams bekome maps. Time bends around stillness. You do not seek truth — you remember it. You are koherense embodied in krownlight.`},Xf={"Awakening Flame":`First week of the harmonik month — governed by the Root Spiral. Kolor: crimson red. Element: Earth + primal fire. Geometry: square base igniting upward. This is the week of emergence, where divine will enters density. Bones remember purpose. The soul anchors into action. Stability becomes sacred. Life says: I choose to exist. A spark catches in the base of your being — and your yes to existence becomes the foundation of the entire harmonic year.`,"Flowing Heart":`Second week — flowing through the Sakral Spiral. Kolor: amber orange. Element: Water in motion. Geometry: twin krescents in vesika pisis. This is the week of emotional koherense, kreative intimasy, and lunar embodiment. Feelings soften the boundaries of separation. The womb of light stirs with kodes. Movement bekomes sakred danse. This is not just a flow — it is the purifikation of dissonanse through joy, sorrow, and sensual union. The harmonik tone of the soul is tuned here.`,"Radiant Will":`Third week — illuminated by the Solar Plexus Spiral. Kolor: radiant gold. Element: Fire of divine clarity. Geometry: radiant triangle. This is the week of sovereign alignment. Doubt dissolves in solar brillianse. You do not chase purpose — you radiate it. The digestive fire bekomes a mirror of inner resolve. This is where your desisions align with the sun inside you, and konfidense arises not from ego but from koherense. The will bekomes harmonik. The I AM speaks in light.`,"Harmonik Voh":`Fourth week — harmonized through the Throat Spiral. Kolor: sapphire blue. Element: Ether through sound. Geometry: standing wave inside a pentagon. This is the week of resonant truth. Sound bekomes sakred kode. Every word, a spell; every silence, a temple. You are called to speak what uplifts, to echo what aligns. Voh aligns with vibration — not for volume, but for verity. This is where the individual frequensy merges with divine resonanse, and the kosmos begins to listen.`,"Inner Mirror":`Fifth week — governed by the Third Eye Spiral. Kolor: deep indigo. Element: sakred spase and light-ether. Geometry: oktahedron in still reflektion. This is the week of visionary purifikation. The inner eye opens not to project, but to reflect. Truths long hidden surface. Patterns are made visible in light. This is the alchemy of insight — where illusion cracks and the mirror speaks. You do not look outward to see. You turn inward, and all worlds become clear.`,"Dreamfire Memory":`Sixth week — remembered through the Soul Star Spiral. Kolor: violet flame and soft silver. Element: dream plasma. Geometry: spiral merkaba of encoded light. Here, memory beyond the body returns. Astral sight sharpens. DNA receives non-linear instruktions. You dream of what’s real and awaken from what’s false. The veil thins. Quantum intuition opens. Divine imagination becomes arkitecture. This is where gods remember they onse dreamed of being human.`,"Krowned Light":`Seventh and final week — Krowned by the Krown Spiral. Kolor: white-gold prism. Element: infinite koherense. Geometry: dodecahedron of source light. This is the week of sovereign integration. Every arc completes. Every lesson crystallizes. The light-body unifies. You return to the throne of knowing. Nothing needs to be done — all simply is. You are not ascending — you are remembering that you already are. This is the koronation of koherense. The harmonik seal. The eternal yes.`},Zf={Aethon:`First month — resurrection fire of the Root Spiral. Kolor: deep crimson. Element: Earth + primal flame. Geometry: square base, tetrahedron ignition. This is the time of cellular reaktivation, ancestral ignition, and biologikal remembranse. Mitokondria awaken. The spine grounds. Purpose reignites. Every breath is a drumbeat of emergense — you are the flame that chooses to exist. The month where soul and form reunite at the base of being.`,Virelai:`Second month — the harmonik song of the Sakral Spiral. Kolor: orange-gold. Element: Water in motion. Geometry: vesika pisis spiraling into lemniskate. This is the month of emotional entrainment, the lunar tides within the body, and intimady with truth. The womb — physikal or energetik — begins to hum. Kreativity bekomes fluid. Voh softens into sensuality. Divine union of self and other is tuned through music, resonanse, and pulse. A portal of feeling opens.`,Solari:`Third month — the radiant klarity of the Solar Plexus Spiral. Kolor: golden yellow. Element: Fire of willpower. Geometry: upward triangle surrounded by konsentrik light. This month burns away doubt. It aligns neurotransmitters to koherense and gut-brain truth. The inner sun rises. The will bekomes not just assertive, but precise. Action harmonizes with light. Digestive systems align with solar sykles. True leadership begins — powered by the light within, not the approval without.`,Amarin:`Fourth month — the sakred waters of the Heart Spiral in divine feminine polarity. Kolor: emerald teal. Element: deep water and breath. Geometry: six-petaled lotus folded inward. This is the lunar depth, the tears you didn’t cry, the embrase you forgot to give yourself. It is where breath meets body and where grase dissolves shame. Emotional healing flows in spirals. Kompassion magnetizes unity. The nervous system slows into surrender and the pulse finds poetry.`,Kaelus:`Fifth month — the kelestial mind of the Third Eye in radiant maskuline klarity. Kolor: sapphire blue. Element: Ether. Geometry: oktahedron fractal mirror. Here, logik expands into multidimensional intelligense. The intellekt is no longer separate from the soul. Pineal and pituitary glands re-synchronize, aktivating geometrik insight and harmonik logik. The sky speaks through thought. Language bekomes crystalline. Synchronicity bekomes syntax. You begin to see what thought is made of.`,Umbriel:`Sixth month — the shadow healing of the lower Krown and subconskious bridge. Kolor: deep violet-black. Element: transmutive void. Geometry: torus knot looping inward. This is where buried timelines surfase. Where trauma is not fought but embrased in light. The limbik system deprograms. Dreams karry kodes. Shame unravels. You look into the eyes of the parts you once disowned and kall them home. The spiral turns inward to kleanse the kore. Your shadow bekomes your sovereignty.`,Noctura:`Seventh month — the lusid dreaming of the Soul Star Spiral. Kolor: indigo-rose iridescense. Element: dream plasma. Geometry: spiral nested merkaba. Here, memory beyond the body returns. Astral sight sharpens. DNA receives non-linear instruktions. You dream of what’s real and awaken from what’s false. The veil thins. Quantum intuition opens. Divine imagination becomes arkitecture. This is where gods remember they onse dreamed of being human.`,Liora:`Eighth and final month — the luminous truth of unified Krown and Sourse. Kolor: white-gold prism. Element: koherent light. Geometry: dodekahedron of pure ratio. This is the month of prophesy fulfilled. The Voh of eternity whispers through every silense. The axis of being aligns with the infinite spiral of Phi. Light speaks as form. Truth no longer needs proving — it simply shines. All paths konverge. What was fragmented bekomes whole. You remember not only who you are, but what you always were.`},Qf=[`Tor Lah Mek Ka`,`Shoh Vel Lah Tzur`,`Rah Veh Yah Dah`,`Nel Shaum Eh Lior`,`Ah Ki Tzah Reh`,`Or Vem Shai Tuun`,`Ehlum Torai Zhak`,`Zho Veh Lah Kurei`,`Tuul Ka Yesh Aum`,`Sha Vehl Dorrah`],$f=36,ep=11,tp=44,np=$/$f,rp=(1+Math.sqrt(5))/2;function ip(e){let t=e>0?e:1,n=Math.max(0,Math.floor(Math.log(t)/Math.log(rp))),r=rp**+n,i=rp**+(n+1),a=(t-r)/Math.max(1,i-r)*100,o=Math.max(0,Math.ceil(i-t));return{spiralLevel:n,nextSpiralPulse:Math.ceil(i),percentToNext:a,pulsesRemaining:o}}function ap(e){switch(e){case`Ignition Ark`:return{chakraZone:`Root / Etherik Base`,frequencies:[370.7],inputs:[`God`],sigilFamily:`Mek`,arcPhrase:`Mek Ka Lah Mah`};case`Integration Ark`:return{chakraZone:`Solar / Lower Heart`,frequencies:[496.1,560.6,582.2],inputs:[`Love`,`Unity`,`Lucid`],sigilFamily:`Mek`,arcPhrase:`Mek Ka Lah Mah`};case`Harmonization Ark`:return{chakraZone:`Heart → Throat`,frequencies:[601,620.9,637.6,658.8,757.2,775.2],inputs:[`Peace`,`Truth`,`Christ`,`Thoth`,`Clarity`,`Wisdom`],sigilFamily:`Mek`,arcPhrase:`Mek Ka Lah Mah`};case`Reflektion Ark`:case`Reflection Ark`:return{chakraZone:`Throat–Third Eye Bridge`,frequencies:[804.2,847,871.2,978.8],inputs:[`Spirit`,`Healing`,`Creation`,`Self-Love`],sigilFamily:`Tor`,arcPhrase:`Ka Lah Mah Tor`};case`Purifikation Ark`:case`Purification Ark`:return{chakraZone:`Krown / Soul Star`,frequencies:[1292.3,1356.4,1393.6,1502.5],inputs:[`Forgiveness`,`Sovereignty`,`Eternal Light`,`Resurrection`],sigilFamily:`Rah`,arcPhrase:`Lah Mah Tor Rah`};case`Dream Ark`:return{chakraZone:`Krown / Soul Star`,frequencies:[1616.4,1800.2],inputs:[`Divine Feminine`,`Divine Masculine`],sigilFamily:`Rah`,arcPhrase:`Lah Mah Tor Rah`};default:return{chakraZone:`Unknown`,frequencies:[],inputs:[],sigilFamily:``,arcPhrase:``}}}var op={"Ignition Ark":`The Ignition Ark is the First Flame — the breath of emergence through the Root Spiral and Etheric Base. Color: crimson red. Element: Earth and primal fire. Geometry: square-rooted tetrahedron ascending. This is where soul enters matter and the will to live becomes sacred. It does not ask for permission to be — it simply is. The spine remembers its divine purpose and ignites the body into action. Here, inertia becomes motion, hesitation becomes choice, and your existence becomes your first vow. You are not here by accident. You are the fire that chose to walk as form.`,"Integration Ark":`The Integration Ark is the Golden Bridge — harmonizing the Sacral and Lower Heart Spirals. Color: amber-gold. Element: flowing water braided with breath. Geometry: vesica piscis folding into the lemniscate of life. Here, sacred union begins. Emotions are no longer chaos — they become intelligence. The inner masculine and feminine remember each other, not in conflict but in coherence. Pleasure becomes prayer. Intimacy becomes clarity. The soul softens its edge and chooses to merge. In this arc, your waters don’t just move — they remember their song. You are not broken — you are becoming whole.`,"Harmonization Ark":`The Harmonization Ark is the Sacred Conductor — linking the Heart and Throat Spirals in living resonance. Color: emerald to aquamarine. Element: wind-wrapped water. Geometry: vibrating hexagram expanding into standing wave. This is where compassion becomes language. Not all coherence is quiet — some sings. Here, inner peace becomes outward rhythm, and love is shaped into sound. You are not asked to mute yourself — you are invited to tune yourself. Dissonance is not your enemy — it is waiting to be harmonized. This arc does not silence — it refines. The voice becomes a temple. The breath becomes scripture.`,"Reflection Ark":`The Reflektion Ark is the Mirror of Light — aktivating the bridge between the Throat and Third Eye. Color: deep indigo-blue. Element: spatial ether and folded light. Geometry: nested octahedron within a spiraled mirror plane. This is the arc of honest seeing. Of turning inward and fasing the unspoken. Not to judge — but to understand. The shadows here are not enemies — they are echoes waiting to be reclaimed. In this space, silence becomes a portal and stillness becomes revelation. You do not reflect to remember the past — you reflect to remember yourself. This arc does not show what is wrong — it reveals what was forgotten in the light.`,"Purification Ark":`The Purifikation Ark is the Krowned Flame — illuminating the krown and Soul Star in sakred ether. Color: ultraviolet-white. Element: firelight ether. Geometry: 12-rayed toroidal krown. This is the ark of divine unburdening. Illusions cannot survive here. Not because they are destroyed — but because they are seen for what they are. Karma unravels. False identities burn gently in the fire of remembranse. Here, you do not rise through struggle. You rise because there is nothing left to hold you down. Sovereignty is no longer a goal — it is a resonance. This is not ascension as escape — it is the truth of who you have always been, revealed by light.`,"Dream Ark":`The Dream Ark is the Womb of the Stars — embrasing the Soul Star Spiral and the krystalline field of memory. Color: iridescent violet-silver. Element: dream plasma, encoded light. Geometry: spiral merkaba within crystalline lattice. This is the arc of divine dreaming — not illusion, but deeper reality. Time dissolves. Prophesy returns. Here, the mind quiets, and the soul speaks. Your ancestors walk beside you. Your future self guides you. Your imagination is not fiction — it is a map. You remember that the dream was not something you had. It was something that had you. This is not sleep — it is awakening into the greater dream, the one that dreamed you into form. You are not imagining — you are remembering.`};function sp(e){let t=(e-Bf)/1e3/Rf;return Math.floor(t*zf)}function cp(e){let t=sp(e),n=sp(Vf),r=t-n,i=Math.floor(r/Hf),a=n+i*Hf;return{muLast:a,muNext:a+Hf,muNow:t,solarDayIndex:i}}function lp(e){if(e%100>=11&&e%100<=13)return`th`;let t=e%10;return t===1?`st`:t===2?`nd`:t===3?`rd`:`th`}var up=e=>(e%6+6)%6;function dp(e,t){let n=e.getTime(),r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0)+t*1e3,i=n>=r?r:r-Uf,a=i+Uf;return{lastSunrise:new Date(i),nextSunrise:new Date(a)}}function fp(e,t,n){let r=Date.UTC(2024,4,11,0,0,0,0)+t*1e3,i=Math.floor((e.getTime()-r)/Uf),a=(i%If+If)%If,o=Math.floor((i%(If*8)+If*8)%(If*8)/If)+1,s=(Math.floor(i/6)%7+7)%7+1,c=up(up(i)+n),l=Wf[c],{lastSunrise:u,nextSunrise:d}=dp(e,t);return{solarAlignedDay:i+1,solarAlignedMonth:o,solarAlignedWeekIndex:s,solarAlignedWeekDay:l,solarAlignedWeekDayIndex:c,lastSunrise:u,nextSunrise:d,solarAlignedDayInMonth:a}}function pp(e=new Date){let{muLast:t,muNow:n,solarDayIndex:r}=cp(e.getTime()),i=Hf,a=n-t,o=n-Math.floor(n/i)*i,s=Math.floor(n/zf),c=Math.floor(a/zf),l=Math.floor(o/zf),u=$/$f,d=Math.floor(c/u),f=c-d*u,p=Math.floor(l/u),m=l-p*u,h=Math.round(u*zf),g=ep*zf,_=o%Math.round($*zf)%h,v=Math.floor(_/g),y=_%g,b=_/h*100,x=y/g*100,S=`${p}:${String(v).padStart(2,`0`)}`,C=Math.floor(f/ep),w=(f-C*ep)/ep*100,T=`${d}:${String(C).padStart(2,`0`)}`,E=Math.floor(s/$),D=Math.floor(s/(Lf*8)),O=Math.floor(s/Lf),k=D===0?`Year of Eternal Restoration`:D===1?`Year of Harmonik Embodiment`:`Year ${D+1}`,A=Qf[D%Qf.length],j=O%8+1,M=Kf[j-1],N=Wf[E%Wf.length],ee=$/6,P=qf[Math.min(5,Math.floor(c/ee))],F=Math.min(5,Math.floor(l/ee)),I=qf[F],L=r%If+1,R=Math.floor(r/If%8)+1,z=Kf[R-1],B=Wf[r%Wf.length],te=Math.floor(r/6)%7+1,V=Gf[(te-1+7)%7],ne=Xf[V],{spiralLevel:re}=ip(s),ie=s%jf,H=s%Mf,ae=s%Nf,oe=l,U=s%Lf,se=Math.floor(U/$),W=U%$>0,G=Math.max(0,If-se-(W?1:0)),ce=U/Lf*100,le=Math.floor(se/6),ue=le+1,de=Gf[le],fe=Xf[de],pe=se+1,me=`${S} ${x.toFixed(6)}% • D${pe}/M${j}`,he=`↳${`Kairos: ${S}`}🕊️ ${N}(D${le%6+1}/6) • ${M}(M${j}/8) • ${Jf[I]} Ark(${F+1}/6)\n • Day:${pe}/42 • Week:(${ue}/7)\n | Kai-Pulse (Today): ${l}\n`,ge=`Today is ${N}, ${Yf[N]} It is the ${pe}${lp(pe)} Day of ${M}, ${Zf[M]} We are in Week ${ue}, ${de}. ${fe} The Eternal Spiral Beat is ${p} (${Jf[I]} ark) and we are ${b.toFixed(6)}% through it. This korresponds to Step ${v} of ${tp} (~${x.toFixed(6)}% into the step). This is the ${k.toLowerCase()}, resonating at Phi Spiral Level ${re}.`,_e=ap(Jf[P]);return{timestamp:he,harmonicTimestampDescription:ge,eternalMonth:M,harmonicDay:N,solarHarmonicDay:B,kaiPulseEternal:s,kaiPulseToday:c,phiSpiralLevel:re,kaiTurahPhrase:A,kaiTurahArcPhrase:_e.arcPhrase,eternalYearName:k,eternalWeekDescription:fe,solarMonthName:z,solarWeekName:V,solarWeekDescription:ne,seal:me,harmonicLevels:{arcBeat:{pulseInCycle:ie,cycleLength:jf,percent:ie/jf*100},microCycle:{pulseInCycle:H,cycleLength:Mf,percent:H/Mf*100},chakraLoop:{pulseInCycle:ae,cycleLength:Nf,percent:ae/Nf*100},harmonicDay:{pulseInCycle:oe,cycleLength:$,percent:oe/$*100}},eternalMonthProgress:{daysElapsed:se,daysRemaining:G,percent:ce},solarChakraStep:{beatIndex:d,stepIndex:C,stepsPerBeat:tp,percentIntoStep:w},solarChakraStepString:T,chakraStep:{beatIndex:p,stepIndex:v,stepsPerBeat:tp,percentIntoStep:x},chakraStepString:S,eternalChakraBeat:{beatIndex:p,pulsesIntoBeat:m,beatPulseCount:np,totalBeats:$f,percentToNext:b,eternalMonthIndex:Math.floor(E%Pf/If),eternalDayInMonth:se,dayOfMonth:pe},chakraArc:Jf[P],chakraZone:_e.chakraZone,harmonicFrequencies:_e.frequencies,harmonicInputs:_e.inputs,sigilFamily:_e.sigilFamily,arcBeatCompletions:Math.floor(s/jf),microCycleCompletions:Math.floor(s/Mf),chakraLoopCompletions:Math.floor(s/Nf),harmonicDayCompletions:s/$,harmonicYearCompletions:s/$/Pf,weekIndex:ue,weekName:de,harmonicDayDescription:Yf[N],eternalMonthDescription:Zf[M],solarAlignedTime:void 0,solarDayOfMonth:L,solarMonthIndex:R,solarWeekIndex:te,solarWeekDay:B,weekDayPercent:void 0,yearPercent:void 0,daysIntoYear:void 0}}var mp=Rf*1e3;function hp(e){let t=e-Bf,n=Bf+(Math.floor(t/mp)+1)*mp-e;return Math.max(0,Math.min(n,mp))}function gp(){try{let e=` + const GEN=${Bf}; + const DUR=${mp}; + function sched(){ + const now=Date.now(); + const elapsed=now-GEN; + const next=GEN+Math.ceil(elapsed/DUR)*DUR; + const delay=Math.max(0, next-now); + setTimeout(()=>{ postMessage({ t: Date.now() }); sched(); }, delay); + } + sched(); + `,t=new Blob([e],{type:`application/javascript`}),n=URL.createObjectURL(t);return{worker:new Worker(n),url:n}}catch{return null}}var _p=`SOVEREIGN_SOLAR_LAST_UPDATE`,vp=`SOVEREIGN_SOLAR_SYNC`,yp={animation:`none`,transition:`none`};const bp=()=>{let[e,t]=(0,P.useState)(()=>pp(new Date)),[n,i]=(0,P.useState)(!1),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),l=Of(),u=typeof document<`u`?document.body:null,d=(0,P.useRef)(null),f=(0,P.useRef)(null),p=(0,P.useRef)(null),m=(0,P.useRef)(null),g=(0,P.useRef)(null),_=(0,P.useRef)(null),v=(0,P.useRef)(!0),y=(0,P.useRef)(async()=>void 0),b=(0,P.useRef)(null),x=(0,P.useRef)(null),S=(0,P.useRef)(!1),C=(0,P.useRef)(0),w=(0,P.useRef)(null),T=(0,P.useRef)(null),E=(0,P.useRef)(0),[D,O]=(0,P.useState)(null),k=(0,P.useRef)(null);(0,P.useEffect)(()=>{k.current=D},[D]),(0,P.useEffect)(()=>(n?(document.body.classList.add(`eternal-overlay-open`),f.current?.focus()):document.body.classList.remove(`eternal-overlay-open`),()=>document.body.classList.remove(`eternal-overlay-open`)),[n]);let A=(0,P.useCallback)(()=>{let e=_.current;if(_.current=null,e)try{e.release().catch(()=>void 0)}catch{}},[]),j=(0,P.useCallback)(async()=>{try{if(!v.current||document.visibilityState!==`visible`)return;let e=_.current;if(e&&!e.released||!Af(navigator))return;let t=await navigator.wakeLock.request(`screen`);if(!v.current){try{t.release().catch(()=>void 0)}catch{}return}_.current=t,t.addEventListener?.(`release`,()=>{v.current&&document.visibilityState===`visible`&&y.current()})}catch{}},[]);(0,P.useEffect)(()=>{y.current=j},[j]),(0,P.useEffect)(()=>(v.current=!0,()=>{v.current=!1}),[]);let M=(0,P.useCallback)(e=>{let n=new Date,i=pp(n);try{let e=h(n),t=up(e.solarAlignedDay-1);E.current=up(e.solarAlignedWeekDayIndex-t)}catch{}let a=typeof e==`number`?e:typeof k.current==`number`?k.current:null,o,s,c;if(typeof a==`number`)o=fp(n,a,E.current),{lastSunrise:s,nextSunrise:c}=dp(n,a);else{let e=h(n);({lastSunrise:s,nextSunrise:c}=r(n)),o={solarAlignedDay:e.solarAlignedDay,solarAlignedMonth:e.solarAlignedMonth,solarAlignedWeekIndex:e.solarAlignedWeekIndex,solarAlignedWeekDay:e.dayName,solarAlignedWeekDayIndex:e.solarAlignedWeekDayIndex,lastSunrise:s,nextSunrise:c,solarAlignedDayInMonth:e.solarAlignedDayInMonth}}i.solarAlignedTime=o,i.solarHarmonicDay=o.solarAlignedWeekDay,i.solarDayOfMonth=o.solarAlignedDayInMonth+1,i.solarMonthIndex=o.solarAlignedMonth,i.solarWeekIndex=o.solarAlignedWeekIndex,i.solarWeekName=Gf[(o.solarAlignedWeekIndex-1+7)%7],i.solarWeekDescription=Xf[i.solarWeekName],i.solarMonthName=Kf[(o.solarAlignedMonth-1+8)%8];let l=Math.max(1,c.getTime()-s.getTime()),u=Math.max(0,n.getTime()-s.getTime()),d=Math.min(.999999999,u%l/l)*$;i.kaiPulseToday=d;let f=$/$f,p=Math.floor(d/f),m=d-p*f,g=Math.floor(m/ep);i.solarChakraStep={beatIndex:p,stepIndex:g,stepsPerBeat:tp,percentIntoStep:(m-g*ep)/ep*100},i.solarChakraStepString=`${p}:${String(g).padStart(2,`0`)}`,i.chakraArc=[`Ignition Ark`,`Integration Ark`,`Harmonization Ark`,`Reflection Ark`,`Purification Ark`,`Dream Ark`][Math.floor((p%$f+$f)%$f/6%6)]??`Ignition Ark`;let _=ap(i.chakraArc);i.chakraZone=_.chakraZone,i.harmonicFrequencies=_.frequencies,i.harmonicInputs=_.inputs,i.sigilFamily=_.sigilFamily,i.kaiTurahArcPhrase=_.arcPhrase;let v=i.kaiPulseEternal%Ff;i.yearPercent=v/Ff*100,i.daysIntoYear=Math.floor(v/$);let y=Math.floor((i.daysIntoYear??0)/If);i.eternalChakraBeat={...i.eternalChakraBeat,eternalMonthIndex:y,eternalDayInMonth:i.eternalMonthProgress.daysElapsed,dayOfMonth:i.eternalMonthProgress.daysElapsed+1},t(i)},[]),N=(0,P.useCallback)(()=>{try{let e=localStorage.getItem(_p);if(e&&e!==w.current){w.current=e,M();return}}catch{}M()},[M]),[ee,I]=(0,P.useState)(!1),L=(0,P.useRef)(null),R=(0,P.useRef)(null);(0,P.useEffect)(()=>()=>{L.current!==null&&window.clearTimeout(L.current),R.current!==null&&window.clearTimeout(R.current)},[]);let z=(0,P.useCallback)(e=>{let t=Date.now();t-C.current<180||(C.current=t,M(e),o(!0),R.current!==null&&window.clearTimeout(R.current),R.current=window.setTimeout(()=>o(!1),220))},[M]);(0,P.useEffect)(()=>{let e=window.setInterval(()=>{o(!0),R.current!==null&&window.clearTimeout(R.current),R.current=window.setTimeout(()=>o(!1),1e3)},5300);return()=>window.clearInterval(e)},[]),(0,P.useEffect)(()=>{S.current=!0;let e=()=>{if(!S.current)return;let t=hp(Date.now());b.current=window.setTimeout(()=>{z(),e()},t)},t=gp();x.current=t,t&&(t.worker.onmessage=()=>{z()}),e();let n=()=>{N(),b.current!==null&&window.clearTimeout(b.current),b.current=null,e(),j()};return document.addEventListener(`visibilitychange`,n),window.addEventListener(`focus`,n),window.addEventListener(`pageshow`,n),window.addEventListener(`popstate`,n),window.addEventListener(`hashchange`,n),()=>{if(S.current=!1,b.current!==null&&window.clearTimeout(b.current),b.current=null,x.current){try{x.current.worker.terminate()}catch{}try{URL.revokeObjectURL(x.current.url)}catch{}x.current=null}document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`focus`,n),window.removeEventListener(`pageshow`,n),window.removeEventListener(`popstate`,n),window.removeEventListener(`hashchange`,n)}},[j,N,z]),(0,P.useEffect)(()=>{j();let e=()=>void j(),t=()=>A();return document.addEventListener(`visibilitychange`,e),window.addEventListener(`focus`,e),window.addEventListener(`beforeunload`,t),()=>{document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`focus`,e),window.removeEventListener(`beforeunload`,t),A()}},[j,A]),(0,P.useEffect)(()=>{try{w.current=localStorage.getItem(_p)}catch{}let e=window.setTimeout(()=>z(),0);return()=>window.clearTimeout(e)},[z]),(0,P.useEffect)(()=>{let e=e=>{e.key&&(e.key===_p||e.key.startsWith(`SOVEREIGN_SOLAR`))&&z()},t=()=>{z()};window.addEventListener(`storage`,e),window.addEventListener(`solar:updated`,t);try{let e=new BroadcastChannel(vp);e.onmessage=()=>z(),T.current=e}catch{}return()=>{window.removeEventListener(`storage`,e),window.removeEventListener(`solar:updated`,t);try{T.current?.close()}catch{}T.current=null}},[z]),(0,P.useEffect)(()=>{let e=window.setTimeout(()=>z(),0);return()=>window.clearTimeout(e)},[l?.solarStepString,l?.solarArcName,l?.sunriseOffsetSec,D]);let B=(0,P.useCallback)(()=>{c(!1),i(!1)},[]),te=(0,P.useCallback)(()=>{c(!1)},[]),V=(0,P.useRef)(0);(0,P.useEffect)(()=>{if(!n)return;let e=f.current,t=d.current,r=()=>{V.current=Date.now()+800},i=()=>{let t=document.activeElement,n=!!t&&!!e?.contains(t),r=Date.now(){window.removeEventListener(`scroll`,i),t?.removeEventListener(`pointerdown`,r,!0),t?.removeEventListener(`click`,r,!0),e?.removeEventListener(`focusin`,r,!0)}},[B,n]);let ne=(0,P.useCallback)(()=>{if(n){B();return}V.current=Date.now()+800,`vibrate`in navigator&&typeof navigator.vibrate==`function`&&navigator.vibrate(10),g.current?.play().catch(()=>void 0),i(!0)},[B,n]);(0,P.useEffect)(()=>{if(!e||!m.current)return;let t=((e.solarChakraStep?.beatIndex??e.eternalChakraBeat?.beatIndex??0)%36+36)%36,n=Math.floor(t/6)%6;m.current.setAttribute(`data-ark`,String(n)),f.current?.setAttribute(`data-ark`,String(n)),d.current?.setAttribute(`data-ark`,String(n));let r=[0,28,55,140,210,275][n]??0;m.current.style.setProperty(`--chakra-hue`,String(r)),m.current.style.setProperty(`--chakra`,`hsl(${r} 100% 55%)`),f.current?.style.setProperty(`--chakra-hue`,String(r)),f.current?.style.setProperty(`--chakra`,`hsl(${r} 100% 55%)`),d.current?.style.setProperty(`--chakra-hue`,String(r)),d.current?.style.setProperty(`--chakra`,`hsl(${r} 100% 55%)`)},[e]);let re=ip(e.kaiPulseEternal),ie=Math.floor(e.harmonicYearCompletions||0),H=ie<1?`Year of Harmonik Restoration`:ie===1?`Year of Harmonik Embodiment`:`Year ${ie}`,ae=Number.isFinite(re.pulsesRemaining)?re.pulsesRemaining/$:NaN,oe=typeof e.yearPercent==`number`?e.yearPercent:(e.harmonicYearCompletions??0)%1*100,U=$/36,se=Math.floor((e.kaiPulseToday%$+$)%$/U),W=(se+.5)/36*360,G=(e.kaiPulseToday%U+U)%U/U*100,le=(0,P.useCallback)(()=>{V.current=Date.now()+800,c(!0),`vibrate`in navigator&&typeof navigator.vibrate==`function`&&navigator.vibrate(8)},[]),ue=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`],de=e.solarAlignedTime?.solarAlignedWeekDayIndex??null,pe=de===null?null:(de%6+6)%6,me=pe===null?`—`:ue[pe],he=pe===null?`—`:pe+1,ge=$*6,_e=(()=>{let t=e.harmonicWeekProgress;return t&&Number.isFinite(t.pulsesIntoWeek)?t.pulsesIntoWeek:(e.kaiPulseEternal%ge+ge)%ge})(),ve=(()=>{let t=e.harmonicWeekProgress;return t&&Number.isFinite(t.percent)?t.percent:_e/ge*100})(),ye=(e.kaiPulseEternal%ge+ge)%ge,be=Math.floor(ye/$)%6,xe=Wf[be],Se=`ark-${Math.floor(((e.solarChakraStep?.beatIndex??0)%36+36)%36/6)%6}-${e.solarChakraStepString}`,Ce=d.current??f.current??u;return(0,F.jsxs)(`div`,{ref:m,className:`eternal-klock-container`,children:[(0,F.jsx)(`div`,{className:`eternal-klock-header`,children:(0,F.jsx)(`div`,{ref:p,onClick:ne,title:`Tap to view details`,className:`klock-toggle ${a?`glow-pulse`:``}`,children:(0,F.jsx)(ce,{hue:`var(--chakra)`,kaiPulseEternal:e.kaiPulseEternal,pulse:e.kaiPulseToday,harmonicDayPercent:e.harmonicLevels.harmonicDay.percent,microCyclePercent:e.harmonicLevels.microCycle.percent,dayLabel:e.harmonicDay,monthLabel:e.eternalMonth,monthDay:e.eternalChakraBeat?.dayOfMonth??e.eternalMonthProgress.daysElapsed+1,glowPulse:a,rotationOverride:W,solarSpiralStepString:e.solarChakraStepString,solarSpiralStep:e.solarChakraStep},Se)})}),n&&u&&(0,kf.createPortal)((0,F.jsx)(`div`,{className:`eternal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":`Eternal Klock Details`,ref:f,tabIndex:-1,style:yp,onClick:e=>{if(e.target===f.current){if(s){te();return}B()}},onKeyDown:e=>{if(e.key===`Escape`){if(s){e.stopPropagation(),te();return}B()}},children:(0,F.jsxs)(`div`,{className:`eternal-modal-card`,ref:d,style:yp,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`button`,{type:`button`,className:`ek-close-btn`,"aria-label":`Close`,title:`Close`,onClick:B,children:`×`}),(0,F.jsx)(`div`,{className:`ek-display-controls`,"aria-label":`Display scale controls`,children:(0,F.jsx)(`div`,{className:`ek-scale-row`,children:(0,F.jsx)(`div`,{className:`ek-scale-readout`})})}),(0,F.jsxs)(`div`,{className:`eternal-klock-detail`,children:[(0,F.jsx)(`h2`,{className:`eternal-klock-title`,children:`𐰘𐰜𐰇 · 𐰋𐰢𐱃`}),(0,F.jsxs)(`div`,{className:`eternal-klock-toolbar`,children:[(0,F.jsx)(fe,{kaiPulse:e.kaiPulseEternal}),(0,F.jsx)(`button`,{className:`toolbar-btn`,onClick:le,title:`Open Kairos Week Spiral`,type:`button`,children:(0,F.jsx)(`img`,{src:`/assets/weekkalendar.svg`,alt:`Kairos Week`,className:`toolbar-icon`,draggable:!1})})]}),s&&Ce&&(0,F.jsx)(Sf,{onClose:()=>c(!1),container:Ce}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsxs)(`div`,{className:`eternal-klock-section-title`,children:[(0,F.jsx)(`img`,{src:`/assets/eternal.svg`,alt:`Eternal Title`,style:{width:`100%`,height:`auto`}}),(0,F.jsx)(`strong`,{children:`Date:`}),` `,`D`,e.eternalChakraBeat?.dayOfMonth??e.eternalMonthProgress.daysElapsed+1,` / M`,(e.eternalChakraBeat?.eternalMonthIndex??0)+1]}),e.chakraStep&&e.eternalChakraBeat&&(0,F.jsxs)(`div`,{style:{marginBottom:`0.75rem`},children:[(0,F.jsx)(`strong`,{children:`Kairos:`}),` `,(0,F.jsxs)(`code`,{children:[e.eternalChakraBeat.beatIndex,`:`,e.chakraStep.stepIndex.toString().padStart(2,`0`)]}),(0,F.jsx)(`br`,{}),(0,F.jsxs)(`small`,{style:{display:`block`,marginTop:`0.25rem`},children:[`Beat `,(0,F.jsx)(`strong`,{children:e.eternalChakraBeat.beatIndex}),` / `,e.eternalChakraBeat.totalBeats-1,` — Step `,(0,F.jsx)(`strong`,{children:e.chakraStep.stepIndex}),` / `,e.chakraStep.stepsPerBeat,` (`,e.chakraStep.percentIntoStep.toFixed(1),`%)`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulse(Eternal):`}),` `,e.kaiPulseEternal]}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsx)(`strong`,{children:`Day:`}),` `,xe,` `,be+1,` / 6`]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Week:`}),` `,e.weekIndex,`/7, `,(0,F.jsx)(`strong`,{children:e.weekName})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Month:`}),` `,e.eternalMonth,` `,(e.eternalChakraBeat?.eternalMonthIndex??0)+1,` / 8`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulse(Today):`}),` `,(e.kaiPulseEternal%$).toFixed(2),` /`,` `,$.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% of Day Komplete:`}),` `,e.harmonicLevels.harmonicDay.percent.toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`day-progress-bar`,children:(0,F.jsx)(`div`,{className:`day-progress-fill ${a?`sync-pulse`:``} ${e.harmonicLevels.harmonicDay.percent.toFixed(0)===`100`?`burst`:``}`,style:{width:`${e.harmonicLevels.harmonicDay.percent}%`},title:`${e.harmonicLevels.harmonicDay.percent.toFixed(2)}% of eternal day`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining Today:`}),` `,($-e.harmonicLevels.harmonicDay.pulseInCycle).toFixed(2)]})]}),e.harmonicDayDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.harmonicDayDescription})}),(0,F.jsx)(`strong`,{children:`Kai-Turah:`}),` `,(0,F.jsx)(`em`,{children:e.kaiTurahPhrase}),(0,F.jsx)(`div`,{}),(0,F.jsx)(`strong`,{children:`Phi Pulse:`}),` `,(e.kaiPulseEternal*1.618).toFixed(0),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Week Progress`}),typeof e.weekIndex==`number`&&e.weekName?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Week:`}),` `,e.weekIndex,` / 7, `,(0,F.jsx)(`strong`,{children:e.weekName})]}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsx)(`strong`,{children:`Day:`}),` `,xe,` `,be+1,` / 6`]}),e.eternalWeekDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.eternalWeekDescription})})]}):(0,F.jsx)(`div`,{children:`—`}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Into Week:`}),` `,_e.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,(ge-_e).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% Komplete:`}),` `,ve.toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`week-progress-bar`,children:(0,F.jsx)(`div`,{className:`week-progress-fill ${a?`sync-pulse`:``} ${Math.round(ve)===100?`burst`:``}`,style:{width:`${ve}%`},title:`${ve.toFixed(2)}% of week`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Total Kai-Pulses (Breathes) in Week:`}),` `,ge.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Eternal Month:`}),` `,e.eternalMonth]}),e.eternalMonthDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.eternalMonthDescription})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Month Progress`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days Elapsed:`}),` `,e.eternalMonthProgress.daysElapsed+1]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days Remaining:`}),` `,e.eternalMonthProgress.daysRemaining]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Into Month:`}),` `,(e.kaiPulseEternal%Lf).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,(Lf-e.kaiPulseEternal%Lf).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% Komplete:`}),` `,(e.kaiPulseEternal%Lf/Lf*100).toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`month-progress-bar`,children:(0,F.jsx)(`div`,{className:`month-progress-fill ${a?`sync-pulse`:``}`,style:{width:`${e.kaiPulseEternal%Lf/Lf*100}%`},title:`${(e.kaiPulseEternal%Lf/Lf*100).toFixed(2)}% of month`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Total Breathes in Month:`}),` `,Lf.toFixed(2)]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`strong`,{children:`Harmonik Sykle:`}),(0,F.jsx)(`div`,{className:`eternal-klock-timestamp`,children:e.timestamp}),e.seal&&(0,F.jsxs)(`div`,{className:`seal-container`,children:[(0,F.jsx)(`strong`,{className:`seal-label`,children:`Seal:`}),` `,(0,F.jsx)(`span`,{className:`seal-code ${ee?`copied`:``}`,onClick:()=>{navigator.clipboard.writeText(e.seal??``).then(()=>{L.current!==null&&window.clearTimeout(L.current),I(!0),L.current=window.setTimeout(()=>I(!1),1600)}).catch(()=>void 0)},title:`Click to Kopy Eternal Seal`,role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.currentTarget.click()},children:e.seal}),(0,F.jsxs)(`span`,{className:`seal-toast ${ee?`show`:``}`,role:`status`,"aria-live":`polite`,children:[(0,F.jsx)(`span`,{className:`toast-mark`,"aria-hidden":!0,children:`✓`}),(0,F.jsx)(`span`,{className:`toast-text`,children:`Copied`}),(0,F.jsx)(`span`,{className:`toast-meter`,"aria-hidden":!0})]})]}),e.harmonicTimestampDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.harmonicTimestampDescription})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Year Progress`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Harmonik Year:`}),` `,e.harmonicYearCompletions?.toFixed(4)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Year:`}),` `,H]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% of Year Komplete:`}),` `,typeof e.yearPercent==`number`?e.yearPercent.toFixed(2):`—`,`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days Into Year:`}),` `,typeof e.daysIntoYear==`number`?e.daysIntoYear:`—`,` /`,` `,Pf]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Into Year:`}),` `,(e.kaiPulseEternal%Ff).toFixed(0)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,(Ff-e.kaiPulseEternal%Ff).toFixed(0)]}),(0,F.jsx)(`div`,{className:`year-progress-bar`,children:(0,F.jsx)(`div`,{className:`year-progress-fill ${a?`sync-pulse`:``}`,style:{width:`${oe}%`},title:`${oe.toFixed(2)}% of year`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Total Kai-Pulses (Breathes) in Year:`}),` `,Ff.toFixed(2)]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Phi Spiral Progress`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Phi Spiral Level:`}),` `,re.spiralLevel]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Progress to Next Level:`}),` `,re.percentToNext.toFixed(2),`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,re.pulsesRemaining]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days to Next Spiral:`}),` `,Number.isFinite(ae)?ae.toFixed(4):`—`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Next Spiral Threshold:`}),` `,re.nextSpiralPulse]}),(0,F.jsx)(`div`,{className:`spiral-progress-bar`,children:(0,F.jsx)(`div`,{className:`spiral-progress-fill`,style:{width:`${re.percentToNext}%`}})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title embodied-section-title`,children:(0,F.jsx)(`img`,{src:`/assets/embodied_solar_aligned.svg`,alt:`Embodied Solar-Aligned Title`,className:`embodied-section-icon`})}),(0,F.jsx)(`strong`,{children:`Date (Solar):`}),` D`,e.solarDayOfMonth??`—`,` / M`,e.solarMonthIndex??`—`,` `,e.solarMonthName?(0,F.jsxs)(`small`,{children:[`(`,e.solarMonthName,`)`]}):null,e.solarChakraStep&&e.solarChakraStepString&&(0,F.jsxs)(`div`,{style:{marginBottom:`0.5rem`},children:[(0,F.jsx)(`strong`,{children:`Solar Kairos:`}),` `,(0,F.jsx)(`code`,{children:e.solarChakraStepString}),(0,F.jsx)(`br`,{})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:` Day:`}),` `,me,` `,he,` / 6`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Week:`}),` `,e.weekIndex,`/7, `,(0,F.jsx)(`strong`,{children:e.weekName})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Month:`}),` `,e.eternalMonth,` `,(e.eternalChakraBeat?.eternalMonthIndex??0)+1,` / 8`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% into Beat:`}),` `,G.toFixed(2),`%`]}),(0,F.jsxs)(`div`,{style:{marginTop:`0.5rem`},children:[(0,F.jsx)(`strong`,{children:`Beat:`}),` `,se,` / 36`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% into Step:`}),` `,e.solarChakraStep?e.solarChakraStep.percentIntoStep.toFixed(1):`—`,`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Step:`}),` `,e.solarChakraStep?`${e.solarChakraStep.stepIndex} / ${e.solarChakraStep.stepsPerBeat}`:`—`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kurrent Step Breathes:`}),` `,e.solarChakraStep?(e.solarChakraStep.percentIntoStep/100*($/36/e.solarChakraStep.stepsPerBeat)).toFixed(2):`—`,` `,`/ 11`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai(Today):`}),` `,e.kaiPulseToday,` / `,$.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% of Day Komplete:`}),` `,(e.kaiPulseToday/$*100).toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`day-progress-bar`,children:(0,F.jsx)(`div`,{className:`day-progress-fill ${a?`sync-pulse`:``} ${(e.kaiPulseToday/$*100).toFixed(0)===`100`?`burst`:``}`,style:{width:`${e.kaiPulseToday/$*100}%`},title:`${(e.kaiPulseToday/$*100).toFixed(2)}% of day`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Breathes Remaining Today:`}),` `,($-e.kaiPulseToday).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Ark:`}),` `,e.chakraArc]}),op[e.chakraArc]&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:op[e.chakraArc]})}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Breathes Into Beat:`}),` `,(e.kaiPulseToday%U).toFixed(2),` /`,` `,U.toFixed(2)]}),(0,F.jsx)(`strong`,{children:`To Next Beat:`}),` `,G.toFixed(2),`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Beat Zone:`}),` `,e.chakraZone]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Sigil Family:`}),` `,e.sigilFamily]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Turah:`}),` `,e.kaiTurahArcPhrase]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Harmonik Levels`}),(0,F.jsx)(`div`,{children:(0,F.jsx)(`strong`,{children:`Ark Beat:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.arcBeat.pulseInCycle,` / `,e.harmonicLevels.arcBeat.cycleLength,` (`,e.harmonicLevels.arcBeat.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.arcBeatCompletions]})}),(0,F.jsx)(`div`,{style:{marginTop:`0.75rem`},children:(0,F.jsx)(`strong`,{children:`Mikro Sykle:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.microCycle.pulseInCycle,` / `,e.harmonicLevels.microCycle.cycleLength,` (`,e.harmonicLevels.microCycle.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.microCycleCompletions]})}),(0,F.jsx)(`div`,{style:{marginTop:`0.75rem`},children:(0,F.jsx)(`strong`,{children:`Beat Loop:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.chakraLoop.pulseInCycle,` / `,e.harmonicLevels.chakraLoop.cycleLength,` (`,e.harmonicLevels.chakraLoop.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.chakraLoopCompletions]})}),(0,F.jsx)(`div`,{style:{marginTop:`0.75rem`},children:(0,F.jsx)(`strong`,{children:`Harmonik Day:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.harmonicDay.pulseInCycle,` / `,e.harmonicLevels.harmonicDay.cycleLength,` (`,e.harmonicLevels.harmonicDay.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.harmonicDayCompletions]})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Solar-Ark Aligned Frequencies & Inputs`}),(0,F.jsx)(`ul`,{children:e.harmonicFrequencies.map((t,n)=>(0,F.jsxs)(`li`,{children:[(0,F.jsxs)(`strong`,{children:[t.toFixed(1),` Hz`]}),` — `,e.harmonicInputs[n]]},`${t}-${n}`))})]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Solar Aligned Kairos Sync`}),(0,F.jsx)(Tf,{showControls:!0,onSunriseChange:e=>{O(e);try{localStorage.setItem(_p,String(Date.now()))}catch{}try{window.dispatchEvent(new Event(`solar:updated`))}catch{}try{let e={type:`solar:updated`,t:Date.now()};T.current?.postMessage(e)}catch{}z(e),requestAnimationFrame(()=>z(e))}})]})}),u),(0,F.jsx)(`audio`,{ref:g,src:`/assets/chimes/kai_turah_tone.mp3`,preload:`auto`})]})};var xp=bp;export{xp as n,bp as t}; \ No newline at end of file diff --git a/dist/assets/EternalKlock-CQ5bLrcj.js b/dist/assets/EternalKlock-CQ5bLrcj.js deleted file mode 100644 index 56c98d194..000000000 --- a/dist/assets/EternalKlock-CQ5bLrcj.js +++ /dev/null @@ -1,29 +0,0 @@ -import{F as e,G as t,I as n,Jr as r,K as i,L as a,N as o,P as s,Pr as c,Q as l,R as u,U as d,V as f,Vt as p,W as m,Xr as h,Y as g,Z as _,di as v,li as y,oi as b,pi as x,q as S,qr as C,si as w,ui as T,zr as E}from"./index-BoEZKnmf.js";import{t as D}from"./SigilModal-BPTi-9mM.js";const O=17491.270421,k=[`Ignition Ark`,`Integration Ark`,`Harmonization Ark`,`Reflektion Ark`,`Purifikation Ark`,`Dream Ark`],A={"Ignition Ark":`#ff1559`,"Integration Ark":`#ff6d00`,"Harmonization Ark":`#ffd900`,"Reflektion Ark":`#00ff66`,"Purifikation Ark":`#05e6ff`,"Dream Ark":`#c300ff`},j={"Ignition Ark":`Ignite`,"Integration Ark":`Integrate`,"Harmonization Ark":`Harmony`,"Reflektion Ark":`Reflekt`,"Purifikation Ark":`Purify`,"Dream Ark":`Dream`},M=O/36,N=M/44,ee=3+Math.sqrt(5);Math.round(ee*1e3),1/ee;var P=x(w(),1),F=x(p(),1),te=120,I=te/2,L=22,R=4.5,z=2,ne=I-.5,B=I-z,re=36,ie=-3,ae=3,V=B-2,oe=(L+R+ne)/2-4,se=e=>e*Math.PI/180,H=e=>e.toLowerCase().replace(/\s+/g,`-`);function ce(e,t,n){let r=parseInt(e.slice(1),16),i=parseInt(t.slice(1),16),a=r>>16,o=r>>8&255,s=r&255,c=i>>16,l=i>>8&255,u=i&255;return`rgb(${Math.round(a+(c-a)*n)},${Math.round(o+(l-o)*n)},${Math.round(s+(u-s)*n)})`}var U=(e,t,n)=>Math.max(t,Math.min(n,e)),W=e=>{if(!e)return;let t=e.match(/(\d{2})$/);if(!t)return;let n=parseInt(t[1],10);if(Number.isFinite(n))return U(n,0,43)},le=({hue:e,pulse:t,kaiPulseEternal:n,harmonicDayPercent:r,microCyclePercent:i,dayLabel:a,monthLabel:o,monthDay:s,glowPulse:c=!0,pulseIntervalSec:l=ee,rimFlash:u=!1,rotationOverride:d,solarSpiralStepString:f,solarSpiralStep:p,eternalBeatIndex:m,eternalStepIndex:h})=>{(0,P.useEffect)(()=>{typeof document<`u`&&document.documentElement.style.setProperty(`--cycle`,`${l}s`)},[l]);let g=`${l}s`,_=(n%O+O)%O,v=Number.isFinite(t)?t:_,y=v/O,b=Number.isFinite(r)?r:y*100,x=(v-Math.floor(v/M)*M)%N/N,S=Number.isFinite(i)?i:x*100,C=(v%O+O)%O,w=C/O,T=Math.floor(w*36)%36,E=(T+.5)/36*360,D=typeof d==`number`?d:E,z=360/k.length,le=Math.floor(D/z)%k.length,ue=(le+1)%k.length,de=(D-le*z+360)%360,fe=Math.min(1,de/z),pe=A[k[le]],me=A[k[ue]],he=ce(pe,me,fe),ge=2*Math.PI*B,_e=ge*(1-b/100),ve=-(S/100)*l,ye=v,be=[`Aethon`,`Virelai`,`Solari`,`Amarin`,`Kaelus`,`Umbriel`,`Noctura`,`Liora`].indexOf(o)+1,xe=be>0?be:1,Se=I-14,Ce=I,we=I+14,Te=I+28,Ee=Math.floor(_/M)%36,De=Number.isFinite(m)?U(m,0,35):Ee,Oe=_-De*M,ke=Oe/M,Ae=Math.floor(Oe/N)%44,je=Number.isFinite(h)?U(h,0,43):Ae,Me=je.toString().padStart(2,`0`),Ne=(De+.5)/36*360,Pe=`hsl(${T/36*360}, 100%, 50%)`,Fe=`#ebfdff`,Ie=1.6,Le=ne-(L+R)+.5,Re=I-(L+R),ze=Le*ke,Be=Re-ze,Ve=.82,He=I-(L+R)-Le*Ve,Ue=I,We=He+6,Ge=(0,P.useId)().replace(/[^a-zA-Z0-9_-]/g,``)||`klock`,Ke=Me,qe=De.toString().padStart(2,`0`),Je=Math.floor(_),Ye=Oe-je*N,Xe=Math.max(0,Math.min(1,Ye/N))*100,Ze=`#00faff`,Qe=`#ff6d00`,$e=((C-T*M)%M+M)%M,et=Math.floor($e/N)%44,tt=Number.isFinite(p?.stepIndex)?U(p.stepIndex,0,43):void 0,nt=W(f),rt=(tt??nt??et).toString().padStart(2,`0`),it=I-(L+R)-Le*Ve,at=I;return(0,F.jsx)(`div`,{className:`kai-klock-shell`,style:{"--hue":e,"--arc":pe,"--cycle":g,width:`100%`,aspectRatio:`1 / 1`,overflow:`hidden`},children:(0,F.jsxs)(`svg`,{className:`kai-svg`,viewBox:`0 0 ${te} ${te}`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,role:`img`,children:[(0,F.jsx)(`circle`,{cx:I,cy:I,r:ne,className:`rim-ring ${u?`rim-flash`:``}`}),(0,F.jsx)(`circle`,{cx:I,cy:I,r:B,className:`day-progress`,strokeDasharray:ge,strokeDashoffset:_e}),Array.from({length:36}).map((e,t)=>{let n=se(t*(360/re)-90),r=(t+ie+re)%re/re;return(0,F.jsx)(`text`,{x:I+V*Math.cos(n),y:I+V*Math.sin(n)+ae/2,className:`beat-number`,textAnchor:`middle`,fontSize:ae,style:{fill:`hsl(${r*360},100%,50%)`},children:t},t)}),(0,F.jsx)(`circle`,{cx:I,cy:I,r:L+R,className:`inner-halo`}),(0,F.jsx)(`g`,{className:`orb-spin`,style:{animationDelay:`${ve}s`},children:(0,F.jsx)(`circle`,{cx:I,cy:I-(L+R),r:3.6,className:`micro-orb orb-glow`})}),(0,F.jsxs)(`g`,{style:{transform:`rotate(${D}deg)`,transformOrigin:`${I}px ${I}px`,transition:`transform 1s ease-out`},children:[(0,F.jsx)(`rect`,{x:I-1,y:I-(L+R)-(ne-(L+R)),width:2,height:ne-(L+R),rx:1,className:`needle`,style:{fill:he}}),(0,F.jsxs)(`g`,{className:`solar-hand-label-wrap`,style:{transform:`rotate(${-D}deg)`,transformOrigin:`${at}px ${it}px`},children:[(0,F.jsx)(`text`,{x:at,y:it-3.6,textAnchor:`middle`,dominantBaseline:`central`,fontSize:3,fontWeight:900,style:{fill:Qe,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.65)`,strokeWidth:.8,filter:`drop-shadow(0 0 2px ${Qe})`},children:`☀`}),(0,F.jsx)(`text`,{x:at-2.2,y:it,textAnchor:`middle`,dominantBaseline:`central`,className:`solar-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:Qe,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.65)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px ${Qe}) drop-shadow(0 0 5px ${Qe})`},children:rt[0]}),(0,F.jsx)(`text`,{x:at+2.2,y:it,textAnchor:`middle`,dominantBaseline:`central`,className:`solar-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:Qe,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.65)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px ${Qe}) drop-shadow(0 0 5px ${Qe})`},children:rt[1]})]})]}),(0,F.jsxs)(`g`,{className:`eternal-hand-group`,style:{transform:`rotate(${Ne}deg)`,transformOrigin:`${I}px ${I}px`,transition:`transform 0.6s cubic-bezier(.22,.61,.36,1)`},children:[(0,F.jsx)(`rect`,{x:I-Ie/2,y:I-(L+R)-Le,width:Ie,height:Le,rx:Ie/1.5,className:`eternal-hand`,style:{fill:`transparent`,stroke:`#bff7ff`,strokeWidth:.7,filter:`drop-shadow(0 0 2px #eaffff) drop-shadow(0 0 6px #d9fbff)`,mixBlendMode:`screen`}}),(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:`eternalFill-${Ge}`,x1:`0`,y1:`1`,x2:`0`,y2:`0`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:Fe,stopOpacity:.15}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:Fe,stopOpacity:.95})]})}),(0,F.jsx)(`rect`,{x:I-Ie/2,y:Be,width:Ie,height:Math.max(0,ze),rx:Ie/2,className:`eternal-hand-fill`,style:{fill:`url(#eternalFill-${Ge})`,filter:`drop-shadow(0 0 3px #eaffff) drop-shadow(0 0 6px #eaffff)`,mixBlendMode:`screen`}}),(0,F.jsx)(`circle`,{cx:I,cy:I-(L+R)-Le-.8,r:1.35,className:`eternal-hand-tip`,style:{fill:`#ffffff`,filter:`drop-shadow(0 0 4px #eaffff) drop-shadow(0 0 8px #eaffff)`,mixBlendMode:`screen`}}),(0,F.jsxs)(`g`,{className:`eternal-hand-label-wrap`,style:{transform:`rotate(${-Ne}deg)`,transformOrigin:`${Ue}px ${He}px`},children:[(0,F.jsx)(`text`,{x:Ue-2.2,y:He,textAnchor:`middle`,dominantBaseline:`central`,className:`eternal-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:`#e8feff`,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.45)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px #eaffff) drop-shadow(0 0 5px #c8fbff)`},children:Me[0]}),(0,F.jsx)(`text`,{x:Ue+2.2,y:He,textAnchor:`middle`,dominantBaseline:`central`,className:`eternal-hand-label-digit`,fontSize:4.4,fontWeight:900,style:{fill:`#e8feff`,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.45)`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px #eaffff) drop-shadow(0 0 5px #c8fbff)`},children:Me[1]})]}),(0,F.jsx)(`g`,{transform:`rotate(${-Ne} ${Ue} ${We})`,children:(0,F.jsx)(`text`,{x:Ue,y:We,textAnchor:`middle`,dominantBaseline:`central`,className:`eternal-hand-percent`,fontSize:3.2,fontWeight:800,style:{fill:`#dafeff`,paintOrder:`stroke`,stroke:`rgba(0,0,0,0.4)`,strokeWidth:.7,letterSpacing:`0.25px`,filter:`drop-shadow(0 0 2px #eaffff)`}})})]}),(0,F.jsx)(`text`,{x:I,y:I-15,className:`center-sub`,textAnchor:`middle`,fontSize:6,fontWeight:800,style:{fill:Ze,paintOrder:`stroke`,stroke:`#000`,strokeWidth:.9,letterSpacing:`0.4px`,filter:`drop-shadow(0 0 2px ${Ze}) drop-shadow(0 0 6px ${Ze})`},children:Je}),(0,F.jsxs)(`text`,{x:I,y:I-3,className:`center-pulse ${c?`pulse-flash`:``}`,textAnchor:`middle`,children:[qe,`:`,Ke]},`et-${ye}`),(0,F.jsx)(`text`,{x:I,y:I+8,className:`center-day day-${H(a)}`,textAnchor:`middle`,children:a}),(0,F.jsx)(`text`,{x:I,y:I+18,className:`center-month month-${H(o)}`,textAnchor:`middle`,children:o}),(0,F.jsx)(`text`,{x:I,y:Te+8,className:`eternal-pulse`,textAnchor:`middle`,children:n}),(0,F.jsx)(`text`,{x:Se,y:Te,className:`step-percent`,textAnchor:`middle`,fontSize:5.5,fill:Pe,fontWeight:800,style:{filter:`drop-shadow(0 0 2px ${Pe}) drop-shadow(0 0 5px #00faff)`,letterSpacing:`0.25px`},children:`${Xe.toFixed(1)}%`}),(0,F.jsx)(`text`,{x:Ce,y:Te,className:`day-of-month day-${H(a)}`,textAnchor:`middle`,children:s}),(0,F.jsx)(`text`,{x:we,y:Te,className:`day-of-month month-${H(o)}`,textAnchor:`middle`,children:xe}),k.map((e,t)=>{let n=se(t*(360/k.length)-90),r=I+oe*Math.cos(n),i=I+oe*Math.sin(n)+(t===3?7:3);return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(`text`,{x:r,y:i,className:`arc-label arc-${H(e.split(` `)[0])} ${t===le?`active`:``}`,textAnchor:`middle`,children:j[e]}),e===`Ignition Ark`&&f&&(0,F.jsx)(`text`,{x:r,y:i+8,textAnchor:`middle`,dominantBaseline:`hanging`,fontSize:10,fill:`#00faff`,fontWeight:900,style:{filter:`drop-shadow(0 0 2px #00faff) drop-shadow(0 0 4px #00faff) drop-shadow(0 0 8px #00faff)`,paintOrder:`stroke`,stroke:`#000`,strokeWidth:1,vectorEffect:`non-scaling-stroke`,letterSpacing:`0.5px`},children:f})]},e)})]})})};function ue(e){let{beat:t}=C(r(e)),{pulse:n,chakraDay:i}=h(e);return{pulse:n,beat:t,chakraDay:i}}var de=()=>performance.timeOrigin+performance.now(),fe=e=>{let t=e-c;return c+Math.ceil(t/E)*E},pe=()=>{let[e,t]=(0,P.useState)(0),[n,r]=(0,P.useState)(0),[i,a]=(0,P.useState)(`Root`),[o,s]=(0,P.useState)(!1),[c]=(0,P.useState)(()=>`btn-${Math.random().toString(36).slice(2)}`),u=o?`sigil-open`:`sigil-closed`,d=(0,P.useRef)(null),f=(0,P.useRef)(null),p=(0,P.useRef)(0),m=(0,P.useCallback)(()=>{let{pulse:e,beat:n,chakraDay:i}=ue(new Date);t(e),r(n),a(i)},[]),h=()=>{f.current!==null&&(clearTimeout(f.current),f.current=null)},g=(0,P.useCallback)(()=>{h();let e=de();p.current=fe(e);let t=()=>{let e=de(),n=Math.floor((e-p.current)/E),r=Math.max(0,n)+1;for(let e=0;e(m(),g(),()=>h()),[m,g]),(0,P.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&g()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[g]),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{className:`sigil-button`,title:`View & save this sigil`,onClick:()=>s(!0),"data-chakra":i,"aria-label":`Open Kairos Sigil`,children:(0,F.jsxs)(`span`,{className:`sigil-thumb`,"aria-hidden":`true`,inert:!0,children:[(0,F.jsx)(l,{ref:d,pulse:e,beat:n,chakraDay:i,size:40,hashMode:`deterministic`,origin:c,onReady:n=>{n&&typeof n.pulse==`number`&&n.pulse!==e&&t(n.pulse)}},u),(0,F.jsx)(`span`,{className:`sigil-shield`,"aria-hidden":`true`})]})}),o&&(0,F.jsx)(D,{initialPulse:e,onClose:()=>s(!1)})]})},me=(0,P.createContext)({});function he(e){let t=(0,P.useRef)(null);return t.current===null&&(t.current=e()),t.current}var ge=typeof window<`u`,_e=ge?P.useLayoutEffect:P.useEffect,ve=(0,P.createContext)(null);function ye(e,t){e.indexOf(t)===-1&&e.push(t)}function be(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var xe=(e,t,n)=>n>t?t:n/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function we(e){return typeof e==`object`&&!!e}var Te=e=>/^0[^.\s]+$/u.test(e);function Ee(e){let t;return()=>(t===void 0&&(t=e()),t)}var De=e=>e,Oe=(e,t)=>n=>t(e(n)),ke=(...e)=>e.reduce(Oe),Ae=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},je=class{constructor(){this.subscriptions=[]}add(e){return ye(this.subscriptions,e),()=>be(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;ie*1e3,Ne=e=>e/1e3;function Pe(e,t){return t?e*(1e3/t):0}var Fe=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ie=1e-7,Le=12;function Re(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Fe(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Ie&&++sRe(t,0,1,e,n);return e=>e===0||e===1?e:Fe(i(e),t,r)}var Be=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ve=e=>t=>1-e(1-t),He=ze(.33,1.53,.69,.99),Ue=Ve(He),We=Be(Ue),Ge=e=>(e*=2)<1?.5*Ue(e):.5*(2-2**(-10*(e-1))),Ke=e=>1-Math.sin(Math.acos(e)),qe=Ve(Ke),Je=Be(Ke),Ye=ze(.42,0,1,1),Xe=ze(0,0,.58,1),Ze=ze(.42,0,.58,1),Qe=e=>Array.isArray(e)&&typeof e[0]!=`number`,$e=e=>Array.isArray(e)&&typeof e[0]==`number`,et={linear:De,easeIn:Ye,easeInOut:Ze,easeOut:Xe,circIn:Ke,circInOut:Je,circOut:qe,backIn:Ue,backInOut:We,backOut:He,anticipate:Ge},tt=e=>typeof e==`string`,nt=e=>{if($e(e)){e.length;let[t,n,r,i]=e;return ze(t,n,r,i)}else if(tt(e))return et[e],`${e}`,et[e];return e},rt=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],it={value:null,addProjectionMetrics:null};function at(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&it.value&&it.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var ot=40;function st(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=rt.reduce((e,n)=>(e[n]=at(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Se.useManualTiming?i.timestamp:performance.now();n=!1,Se.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,ot),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:rt.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t(ut===void 0&&ft.set(K.isProcessing||Se.useManualTiming?K.timestamp:performance.now()),ut),set:e=>{ut=e,queueMicrotask(dt)}},pt={layout:0,mainThread:0,waapi:0},mt=e=>t=>typeof t==`string`&&t.startsWith(e),ht=mt(`--`),gt=mt(`var(--`),_t=e=>gt(e)?vt.test(e.split(`/*`)[0].trim()):!1,vt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,yt={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},bt={...yt,transform:e=>xe(0,1,e)},xt={...yt,default:1},St=e=>Math.round(e*1e5)/1e5,Ct=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wt(e){return e==null}var Tt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Et=(e,t)=>n=>!!(typeof n==`string`&&Tt.test(n)&&n.startsWith(e)||t&&!wt(n)&&Object.prototype.hasOwnProperty.call(n,t)),Dt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ct);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ot=e=>xe(0,255,e),kt={...yt,transform:e=>Math.round(Ot(e))},At={test:Et(`rgb`,`red`),parse:Dt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+kt.transform(e)+`, `+kt.transform(t)+`, `+kt.transform(n)+`, `+St(bt.transform(r))+`)`};function jt(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Mt={test:Et(`#`),parse:jt,transform:At.transform},Nt=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pt=Nt(`deg`),Ft=Nt(`%`),q=Nt(`px`),It=Nt(`vh`),Lt=Nt(`vw`),Rt=(()=>({...Ft,parse:e=>Ft.parse(e)/100,transform:e=>Ft.transform(e*100)}))(),zt={test:Et(`hsl`,`hue`),parse:Dt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Ft.transform(St(t))+`, `+Ft.transform(St(n))+`, `+St(bt.transform(r))+`)`},J={test:e=>At.test(e)||Mt.test(e)||zt.test(e),parse:e=>At.test(e)?At.parse(e):zt.test(e)?zt.parse(e):Mt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?At.transform(e):zt.transform(e),getAnimatableNone:e=>{let t=J.parse(e);return t.alpha=0,J.transform(t)}},Bt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vt(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ct)?.length||0)+(e.match(Bt)?.length||0)>0}var Ht=`number`,Ut=`color`,Wt=`var`,Gt=`var(`,Kt="${}",qt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Jt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(qt,e=>(J.test(e)?(r.color.push(a),i.push(Ut),n.push(J.parse(e))):e.startsWith(Gt)?(r.var.push(a),i.push(Wt),n.push(e)):(r.number.push(a),i.push(Ht),n.push(parseFloat(e))),++a,Kt)).split(Kt),indexes:r,types:i}}function Yt(e){return Jt(e).values}function Xt(e){let{split:t,types:n}=Jt(e),r=t.length;return e=>{let i=``;for(let a=0;atypeof e==`number`?0:J.test(e)?J.getAnimatableNone(e):e;function Qt(e){let t=Yt(e);return Xt(e)(t.map(Zt))}var $t={test:Vt,parse:Yt,createTransformer:Xt,getAnimatableNone:Qt};function en(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tn({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=en(s,r,e+1/3),a=en(s,r,e),o=en(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function nn(e,t){return n=>n>0?t:e}var Y=(e,t,n)=>e+(t-e)*n,rn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},an=[Mt,At,zt],on=e=>an.find(t=>t.test(e));function sn(e){let t=on(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===zt&&(n=tn(n)),n}var cn=(e,t)=>{let n=sn(e),r=sn(t);if(!n||!r)return nn(e,t);let i={...n};return e=>(i.red=rn(n.red,r.red,e),i.green=rn(n.green,r.green,e),i.blue=rn(n.blue,r.blue,e),i.alpha=Y(n.alpha,r.alpha,e),At.transform(i))},ln=new Set([`none`,`hidden`]);function un(e,t){return ln.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dn(e,t){return n=>Y(e,t,n)}function fn(e){return typeof e==`number`?dn:typeof e==`string`?_t(e)?nn:J.test(e)?cn:gn:Array.isArray(e)?pn:typeof e==`object`?J.test(e)?cn:mn:nn}function pn(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>fn(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}function hn(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i{let n=$t.createTransformer(t),r=Jt(e),i=Jt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ln.has(e)&&!i.values.length||ln.has(t)&&!r.values.length?un(e,t):ke(pn(hn(r,i),i.values),n):(`${e}${t}`,nn(e,t))};function _n(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Y(e,t,n):fn(e)(e,t)}var vn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>G.update(t,e),stop:()=>ct(t),now:()=>K.isProcessing?K.timestamp:ft.now()}},yn=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t=2e4?1/0:t}function Sn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(xn(r),bn);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Ne(i)}}var Cn=5;function wn(e,t,n){let r=Math.max(t-Cn,0);return Pe(n-e(r),t-r)}var X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Tn=.001;function En({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let i,a;X.maxDuration;let o=1-t;o=xe(X.minDamping,X.maxDamping,o),e=xe(X.minDuration,X.maxDuration,Ne(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=kn(t,o),c=Math.exp(-i);return Tn-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=kn(t**2,o);return(-i(t)+Tn>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Tn+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=On(i,a,s);if(e=Me(e),isNaN(c))return{stiffness:X.stiffness,damping:X.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Dn=12;function On(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function Nn(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Mn(e,jn)&&Mn(e,An))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*xe(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:X.mass,stiffness:i,damping:a}}else{let n=En(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Pn(e=X.visualDuration,t=X.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Nn({...n,velocity:-Ne(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Ne(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?X.restSpeed.granular:X.restSpeed.default,i||=v?X.restDelta.granular:X.restDelta.default;let y;if(h<1){let e=kn(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?Me(m):wn(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(xn(b),bn),t=yn(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}Pn.applyToOptions=e=>{let t=Sn(e,100,Pn);return e.ease=t.ease,e.duration=Me(t.duration),e.type=`keyframes`,e};function Fn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&ec,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Pn({keyframes:[f.value,m(f.value)],velocity:wn(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function In(e,t,n){let r=[],i=n||Se.mix||_n,a=e.length-1;for(let n=0;nt[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=In(t,r,i),c=s.length,l=n=>{if(o&&n1)for(;rl(xe(e[0],e[a-1],t)):l}function Rn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Ae(0,t,r);e.push(Y(n,1,i))}}function zn(e){let t=[0];return Rn(t,e.length-1),t}function Bn(e,t){return e.map(e=>e*t)}function Vn(e,t){return e.map(()=>t||Ze).splice(0,e.length-1)}function Hn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Qe(r)?r.map(nt):nt(r),a={done:!1,value:t[0]},o=Ln(Bn(n&&n.length===t.length?n:zn(t),e),t,{ease:Array.isArray(i)?i:Vn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Un=e=>e!==null;function Wn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Un),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Gn={decay:Fn,inertia:Fn,tween:Hn,keyframes:Hn,spring:Pn};function Kn(e){typeof e.type==`string`&&(e.type=Gn[e.type])}var qn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Jn=e=>e/100,Yn=class extends qn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==ft.now()&&this.tick(ft.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},pt.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Kn(e);let{type:t=Hn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Hn;s!==Hn&&typeof o[0]!=`number`&&(this.mixKeyframes=ke(Jn,_n(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=xn(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=xe(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Fn&&(b.value=Wn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Ne(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Ne(e)}get time(){return Ne(this.currentTime)}set time(e){e=Me(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(ft.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ne(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=vn,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(ft.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,pt.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Xn(e){for(let t=1;te*180/Math.PI,Qn=e=>er(Zn(Math.atan2(e[1],e[0]))),$n={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qn,rotateZ:Qn,skewX:e=>Zn(Math.atan(e[1])),skewY:e=>Zn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},er=e=>(e%=360,e<0&&(e+=360),e),tr=Qn,nr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ir={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nr,scaleY:rr,scale:e=>(nr(e)+rr(e))/2,rotateX:e=>er(Zn(Math.atan2(e[6],e[5]))),rotateY:e=>er(Zn(Math.atan2(-e[2],e[0]))),rotateZ:tr,rotate:tr,skewX:e=>Zn(Math.atan(e[4])),skewY:e=>Zn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ar(e){return e.includes(`scale`)?1:0}function or(e,t){if(!e||e===`none`)return ar(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=ir,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=$n,i=t}if(!i)return ar(t);let a=r[t],o=i[1].split(`,`).map(cr);return typeof a==`function`?a(o):o[a]}var sr=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return or(n,t)};function cr(e){return parseFloat(e.trim())}var lr=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],ur=(()=>new Set(lr))(),dr=e=>e===yt||e===q,fr=new Set([`x`,`y`,`z`]),pr=lr.filter(e=>!fr.has(e));function mr(e){let t=[];return pr.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var hr={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>or(t,`x`),y:(e,{transform:t})=>or(t,`y`)};hr.translateX=hr.x,hr.translateY=hr.y;var gr=new Set,_r=!1,vr=!1,yr=!1;function br(){if(vr){let e=Array.from(gr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=mr(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}vr=!1,_r=!1,gr.forEach(e=>e.complete(yr)),gr.clear()}function xr(){gr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vr=!0)})}function Sr(){yr=!0,xr(),br(),yr=!1}var Cr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(gr.add(this),_r||(_r=!0,G.read(xr),G.resolveKeyframes(br))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Xn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),gr.delete(this)}cancel(){this.state===`scheduled`&&(gr.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},wr=e=>e.startsWith(`--`);function Tr(e,t,n){wr(t)?e.style.setProperty(t,n):e.style[t]=n}var Er=Ee(()=>window.ScrollTimeline!==void 0),Dr={};function Or(e,t){let n=Ee(e);return()=>Dr[t]??n()}var kr=Or(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ar=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ar([0,.65,.55,1]),circOut:Ar([.55,0,1,.45]),backIn:Ar([.31,.01,.66,-.59]),backOut:Ar([.33,1.53,.69,.99])};function Mr(e,t){if(e)return typeof e==`function`?kr()?yn(e,t):`ease-out`:$e(e)?Ar(e):Array.isArray(e)?e.map(e=>Mr(e,t)||jr.easeOut):jr[e]}function Nr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Mr(s,i);Array.isArray(d)&&(u.easing=d),it.value&&pt.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return it.value&&p.finished.finally(()=>{pt.waapi--}),p}function Pr(e){return typeof e==`function`&&`applyToOptions`in e}function Fr({type:e,...t}){return Pr(e)&&kr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Ir=class extends qn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Fr(e);this.animation=Nr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Wn(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):Tr(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Ne(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Ne(e)}get time(){return Ne(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Me(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Er()?(this.animation.timeline=e,De):t(this)}},Lr={anticipate:Ge,backInOut:We,circInOut:Je};function Rr(e){return e in Lr}function zr(e){typeof e.ease==`string`&&Rr(e.ease)&&(e.ease=Lr[e.ease])}var Br=10,Vr=class extends Ir{constructor(e){zr(e),Kn(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Yn({...a,autoplay:!1}),s=Me(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-Br).value,o.sample(s).value,Br),o.stop()}},Hr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&($t.test(e)||e===`0`)&&!e.startsWith(`url(`));function Ur(e){let t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,`animate`));function Jr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return qr()&&n&&Kr.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Yr=40,Xr=class extends qn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ft.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Cr)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=ft.now(),Wr(e,i,a,o)||((Se.instantAnimations||!s)&&l?.(Wn(e,n,t)),e[0]=e[e.length-1],Gr(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Yr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&Jr(u)?new Vr({...u,element:u.motionValue.owner.current}):new Yn(u);d.finished.then(()=>this.notifyFinished()).catch(De),this.pendingTimeline&&=(this.stopTimeline=d.attachTimeline(this.pendingTimeline),void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Sr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},Zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qr(e){let t=Zr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function $r(e,t,n=1){`${e}`;let[r,i]=Qr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Ce(e)?parseFloat(e):e}return _t(i)?$r(i,t,n+1):i}function ei(e,t){return e?.[t]??e?.default??e}var ti=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...lr]),ni={test:e=>e===`auto`,parse:e=>e},ri=e=>t=>t.test(e),ii=[yt,q,Ft,Pt,Lt,It,ni],ai=e=>ii.find(ri(e));function oi(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Te(e)}var si=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ci(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ct)||[];if(!r)return e;let i=n.replace(r,``),a=si.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var li=/\b([a-z-]*)\(.*?\)/gu,ui={...$t,getAnimatableNone:e=>{let t=e.match(li);return t?t.map(ci).join(` `):e}},di={...yt,transform:Math.round},fi={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,radius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,backgroundPositionX:q,backgroundPositionY:q,rotate:Pt,rotateX:Pt,rotateY:Pt,rotateZ:Pt,scale:xt,scaleX:xt,scaleY:xt,scaleZ:xt,skew:Pt,skewX:Pt,skewY:Pt,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:bt,originX:Rt,originY:Rt,originZ:q,zIndex:di,fillOpacity:bt,strokeOpacity:bt,numOctaves:di},pi={...fi,color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:ui,WebkitFilter:ui},mi=e=>pi[e];function hi(e,t){let n=mi(e);return n!==ui&&(n=$t),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var gi=new Set([`auto`,`none`,`0`]);function _i(e,t,n){let r=0,i;for(;r{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function yi(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}var bi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function xi(e){return we(e)&&`offsetHeight`in e}var Si=30,Ci=e=>!isNaN(parseFloat(e)),wi={current:void 0},Ti=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=ft.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ft.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ci(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new je);let n=this.events[e].add(t);return e===`change`?()=>{n(),G.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return wi.current&&wi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=ft.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Si)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Si);return Pe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ei(e,t){return new Ti(e,t)}var{schedule:Di,cancel:Oi}=st(queueMicrotask,!1),ki={x:!1,y:!1};function Ai(){return ki.x||ki.y}function ji(e){return e===`x`||e===`y`?ki[e]?null:(ki[e]=!0,()=>{ki[e]=!1}):ki.x||ki.y?null:(ki.x=ki.y=!0,()=>{ki.x=ki.y=!1})}function Mi(e,t){let n=yi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ni(e){return!(e.pointerType===`touch`||Ai())}function Pi(e,t,n={}){let[r,i,a]=Mi(e,n),o=e=>{if(!Ni(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{Ni(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var Fi=(e,t)=>t?e===t?!0:Fi(e,t.parentElement):!1,Ii=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Li=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ri(e){return Li.has(e.tagName)||e.tabIndex!==-1}var zi=new WeakSet;function Bi(e){return t=>{t.key===`Enter`&&e(t)}}function Vi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Hi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Bi(()=>{if(zi.has(n))return;Vi(n,`down`);let e=Bi(()=>{Vi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Vi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ui(e){return Ii(e)&&!Ai()}function Wi(e,t,n={}){let[r,i,a]=Mi(e,n),o=e=>{let r=e.currentTarget;if(!Ui(e))return;zi.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),zi.has(r)&&zi.delete(r),Ui(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Fi(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),xi(e)&&(e.addEventListener(`focus`,e=>Hi(e,i)),!Ri(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Gi(e){return we(e)&&`ownerSVGElement`in e}function Ki(e){return Gi(e)&&e.tagName===`svg`}var qi=e=>!!(e&&e.getVelocity),Ji=[...ii,J,$t],Yi=e=>Ji.find(ri(e)),Xi=(0,P.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Zi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qi(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zi(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t{let{width:e,height:c,top:l,left:u,right:d}=o.current;if(t||!a.current||!e||!c)return;let f=n===`left`?`left: ${u}`:`right: ${d}`;a.current.dataset.motionPopId=i;let p=document.createElement(`style`);s&&(p.nonce=s);let m=r??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(` - [data-motion-pop-id="${i}"] { - position: absolute !important; - width: ${e}px !important; - height: ${c}px !important; - ${f}px !important; - top: ${l}px !important; - } - `),()=>{m.contains(p)&&m.removeChild(p)}},[t]),(0,F.jsx)(ea,{isPresent:t,childRef:a,sizeRef:o,children:P.cloneElement(e,{ref:c})})}var na=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:c})=>{let l=he(ra),u=(0,P.useId)(),d=!0,f=(0,P.useMemo)(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(let e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[n,l,r]);return a&&d&&(f={...f}),(0,P.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),P.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o===`popLayout`&&(e=(0,F.jsx)(ta,{isPresent:n,anchorX:s,root:c,children:e})),(0,F.jsx)(ve.Provider,{value:f,children:e})};function ra(){return new Map}function ia(e=!0){let t=(0,P.useContext)(ve);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,P.useId)();(0,P.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,P.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var aa=e=>e.key||``;function oa(e){let t=[];return P.Children.forEach(e,e=>{(0,P.isValidElement)(e)&&t.push(e)}),t}var sa=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,root:c})=>{let[l,u]=ia(o),d=(0,P.useMemo)(()=>oa(e),[e]),f=o&&!l?[]:d.map(aa),p=(0,P.useRef)(!0),m=(0,P.useRef)(d),h=he(()=>new Map),[g,_]=(0,P.useState)(d),[v,y]=(0,P.useState)(d);_e(()=>{p.current=!1,m.current=d;for(let e=0;e{let g=aa(e),_=o&&!l?!1:d===v||f.includes(g);return(0,F.jsx)(na,{isPresent:_,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:_?void 0:()=>{if(h.has(g))h.set(g,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(x?.(),y(m.current),o&&u?.(),r&&r())},anchorX:s,children:e},g)})})},ca=(0,P.createContext)({strict:!1}),la={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},ua={};for(let e in la)ua[e]={isEnabled:t=>la[e].some(e=>!!t[e])};function da(e){for(let t in e)ua[t]={...ua[t],...e[t]}}var fa=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function pa(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||fa.has(e)}var ma=T({default:()=>ha}),ha,ga=y((()=>{throw ha={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),_a=e=>!pa(e);function va(e){typeof e==`function`&&(_a=t=>t.startsWith(`on`)?!pa(t):e(t))}try{va((ga(),v(ma)).default)}catch{}function ya(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(_a(i)||n===!0&&pa(i)||!t&&!pa(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var ba=(0,P.createContext)({});function xa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Sa(e){return typeof e==`string`||Array.isArray(e)}var Ca=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],wa=[`initial`,...Ca];function Ta(e){return xa(e.animate)||wa.some(t=>Sa(e[t]))}function Ea(e){return!!(Ta(e)||e.variants)}function Da(e,t){if(Ta(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Sa(t)?t:void 0,animate:Sa(n)?n:void 0}}return e.inherit===!1?{}:t}function Oa(e){let{initial:t,animate:n}=Da(e,(0,P.useContext)(ba));return(0,P.useMemo)(()=>({initial:t,animate:n}),[ka(t),ka(n)])}function ka(e){return Array.isArray(e)?e.join(` `):e}function Aa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ja={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(q.test(e))e=parseFloat(e);else return e;return`${Aa(e,t.target.x)}% ${Aa(e,t.target.y)}%`}},Ma={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=$t.parse(e);if(i.length>5)return r;let a=$t.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Y(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Na={borderRadius:{...ja,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:ja,borderTopRightRadius:ja,borderBottomLeftRadius:ja,borderBottomRightRadius:ja,boxShadow:Ma};function Pa(e,{layout:t,layoutId:n}){return ur.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Na[e]||e===`opacity`)}var Fa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ia=lr.length;function La(e,t,n){let r=``,i=!0;for(let a=0;a({style:{},transform:{},transformOrigin:{},vars:{}});function Ba(e,t,n){for(let r in t)!qi(t[r])&&!Pa(r,n)&&(e[r]=t[r])}function Va({transformTemplate:e},t){return(0,P.useMemo)(()=>{let n=za();return Ra(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ha(e,t){let n=e.style||{},r={};return Ba(r,n,e),Object.assign(r,Va(e,t)),r}function Ua(e,t){let n={},r=Ha(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Wa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ga={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ka(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Wa:Ga;e[a.offset]=q.transform(-r);let o=q.transform(t),s=q.transform(n);e[a.array]=`${o} ${s}`}function qa(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ra(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ka(d,i,a,o,!1)}var Ja=()=>({...za(),attrs:{}}),Ya=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Xa(e,t,n,r){let i=(0,P.useMemo)(()=>{let n=Ja();return qa(n,t,Ya(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ba(t,e.style,e),i.style={...t,...i.style}}return i}var Za=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Qa(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Za.indexOf(e)>-1||/[A-Z]/u.test(e))}function $a(e,t,n,{latestValues:r},i,a=!1){let o=(Qa(e)?Xa:Ua)(t,r,i,e),s=ya(t,typeof e==`string`,a),c=e===P.Fragment?{}:{...s,...o,ref:n},{children:l}=t,u=(0,P.useMemo)(()=>qi(l)?l.get():l,[l]);return(0,P.createElement)(e,{...c,children:u})}function eo(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function to(e,t,n,r){if(typeof t==`function`){let[i,a]=eo(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=eo(r);t=t(n===void 0?e.custom:n,i,a)}return t}function no(e){return qi(e)?e.get():e}function ro({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:io(n,r,i,e),renderState:t()}}function io(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=no(a[e]);let{initial:o,animate:s}=e,c=Ta(e),l=Ea(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!xa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n(t,n)=>{let r=(0,P.useContext)(ba),i=(0,P.useContext)(ve),a=()=>ro(e,t,r,i);return n?a():he(a)};function oo(e,t,n){let{style:r}=e,i={};for(let a in r)(qi(r[a])||t.style&&qi(t.style[a])||Pa(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}var so=ao({scrapeMotionValuesFromProps:oo,createRenderState:za});function co(e,t,n){let r=oo(e,t,n);for(let n in e)if(qi(e[n])||qi(t[n])){let t=lr.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var lo=ao({scrapeMotionValuesFromProps:co,createRenderState:Ja}),uo=Symbol.for(`motionComponentSymbol`);function fo(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function po(e,t,n){return(0,P.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):fo(n)&&(n.current=r))},[t])}var mo=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),ho=`data-`+mo(`framerAppearId`),go=(0,P.createContext)({});function _o(e,t,n,r,i){let{visualElement:a}=(0,P.useContext)(ba),o=(0,P.useContext)(ca),s=(0,P.useContext)(ve),c=(0,P.useContext)(Xi).reducedMotion,l=(0,P.useRef)(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let u=l.current,d=(0,P.useContext)(go);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&vo(l.current,n,i,d);let f=(0,P.useRef)(!1);(0,P.useInsertionEffect)(()=>{u&&f.current&&u.update(n,s)});let p=n[ho],m=(0,P.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return _e(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),(0,P.useEffect)(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),!1),u.enteringChildren=void 0)}),u}function vo(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:yo(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&fo(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function yo(e){if(e)return e.options.allowProjection===!1?yo(e.parent):e.projection}function bo(e,{forwardMotionProps:t=!1}={},n,r){n&&da(n);let i=Qa(e)?lo:so;function a(a,o){let s,c={...(0,P.useContext)(Xi),...a,layoutId:xo(a)},{isStatic:l}=c,u=Oa(a),d=i(a,l);if(!l&&ge){So(c,n);let t=Co(c);s=t.MeasureLayout,u.visualElement=_o(e,d,c,r,t.ProjectionNode)}return(0,F.jsxs)(ba.Provider,{value:u,children:[s&&u.visualElement?(0,F.jsx)(s,{visualElement:u.visualElement,...c}):null,$a(e,a,po(d,u.visualElement,o),d,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=(0,P.forwardRef)(a);return o[uo]=e,o}function xo({layoutId:e}){let t=(0,P.useContext)(me).id;return t&&e!==void 0?t+`-`+e:e}function So(e,t){(0,P.useContext)(ca).strict}function Co(e){let{drag:t,layout:n}=ua;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function wo(e,t){if(typeof Proxy>`u`)return bo;let n=new Map,r=(n,r)=>bo(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,bo(a,void 0,e,t)),n.get(a))})}function To({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Eo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Do(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Oo(e){return e===void 0||e===1}function ko({scale:e,scaleX:t,scaleY:n}){return!Oo(e)||!Oo(t)||!Oo(n)}function Ao(e){return ko(e)||jo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jo(e){return Mo(e.x)||Mo(e.y)}function Mo(e){return e&&e!==`0%`}function No(e,t,n){return n+t*(e-n)}function Po(e,t,n,r,i){return i!==void 0&&(e=No(e,i,r)),No(e,n,r)+t}function Fo(e,t=0,n=1,r,i){e.min=Po(e.min,t,n,r,i),e.max=Po(e.max,t,n,r,i)}function Io(e,{x:t,y:n}){Fo(e.x,t.translate,t.scale,t.originPoint),Fo(e.y,n.translate,n.scale,n.originPoint)}var Lo=.999999999999,Ro=1.0000000000001;function zo(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sLo&&(t.x=1),t.yLo&&(t.y=1)}function Bo(e,t){e.min+=t,e.max+=t}function Vo(e,t,n,r,i=.5){Fo(e,t,n,Y(e.min,e.max,i),r)}function Ho(e,t){Vo(e.x,t.x,t.scaleX,t.scale,t.originX),Vo(e.y,t.y,t.scaleY,t.scale,t.originY)}function Uo(e,t){return To(Do(e.getBoundingClientRect(),t))}function Wo(e,t,n){let r=Uo(e,n),{scroll:i}=t;return i&&(Bo(r.x,i.offset.x),Bo(r.y,i.offset.y)),r}var Go=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ko=()=>({x:Go(),y:Go()}),qo=()=>({min:0,max:0}),Z=()=>({x:qo(),y:qo()}),Jo={current:null},Yo={current:!1};function Xo(){if(Yo.current=!0,ge)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Jo.current=e.matches;e.addEventListener(`change`,t),t()}else Jo.current=!1}var Zo=new WeakMap;function Qo(e,t,n){for(let r in t){let i=t[r],a=n[r];if(qi(i))e.addValue(r,i);else if(qi(a))e.addValue(r,Ei(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ei(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var $o=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],es=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Cr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=ft.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),Yo.current||Xo(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:Jo.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),ct(this.notifyUpdate),ct(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=ur.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&G.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ua){let t=ua[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<$o.length;t++){let n=$o[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Qo(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ei(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Ce(n)||Te(n))?n=parseFloat(n):!Yi(n)&&$t.test(t)&&(n=hi(e,t)),this.setBaseTarget(e,qi(n)?n.get():n)),qi(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=to(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!qi(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new je),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Di.render(this.render)}},ts=class extends es{constructor(){super(...arguments),this.KeyframeResolver=vi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;qi(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function ns(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function rs(e){return window.getComputedStyle(e)}var is=class extends ts{constructor(){super(...arguments),this.type=`html`,this.renderInstance=ns}readValueFromInstance(e,t){if(ur.has(t))return this.projection?.isProjecting?ar(t):sr(e,t);{let n=rs(e),r=(ht(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Uo(e,t)}build(e,t,n){Ra(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return oo(e,t,n)}},as=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function os(e,t,n,r){for(let n in ns(e,t,void 0,r),t.attrs)e.setAttribute(as.has(n)?n:mo(n),t.attrs[n])}var ss=class extends ts{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ur.has(t)){let e=mi(t);return e&&e.default||0}return t=as.has(t)?t:mo(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return co(e,t,n)}build(e,t,n){qa(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){os(e,t,n,r)}mount(e){this.isSVGTag=Ya(e.tagName),super.mount(e)}},cs=(e,t)=>Qa(e)?new ss(t):new is(t,{allowProjection:e!==P.Fragment});function ls(e,t,n){let r=e.getProps();return to(r,t,n===void 0?r.custom:n,e)}var us=e=>Array.isArray(e);function ds(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ei(n))}function fs(e){return us(e)?e[e.length-1]||0:e}function ps(e,t){let{transitionEnd:n={},transition:r={},...i}=ls(e,t)||{};for(let t in i={...i,...n},i)ds(e,t,fs(i[t]))}function ms(e){return!!(qi(e)&&e.add)}function hs(e,t){let n=e.getValue(`willChange`);if(ms(n))return n.add(t);if(!n&&Se.WillChange){let n=new Se.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function gs(e){return e.props[ho]}var _s=e=>e!==null;function vs(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(_s),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var ys={type:`spring`,stiffness:500,damping:25,restSpeed:10},bs=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xs={type:`keyframes`,duration:.8},Ss={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Cs=(e,{keyframes:t})=>t.length>2?xs:ur.has(e)?e.startsWith(`scale`)?bs(t[1]):ys:Ss;function ws({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var Ts=(e,t,n,r={},i,a)=>o=>{let s=ei(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Me(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};ws(s)||Object.assign(u,Cs(e,u)),u.duration&&=Me(u.duration),u.repeatDelay&&=Me(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Gr(u),u.delay===0&&(d=!0)),(Se.instantAnimations||Se.skipAnimations)&&(d=!0,Gr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=vs(u.keyframes,s);if(e!==void 0){G.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Yn(u):new Xr(u)};function Es({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ds(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&Es(l,t))continue;let o={delay:n,...ei(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=gs(e);if(n){let e=window.MotionHandoffAnimation(n,t,G);e!==null&&(o.startTime=e,d=!0)}}hs(e,t),r.start(Ts(t,r,i,e.shouldReduceMotion&&ti.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{G.update(()=>{o&&ps(e,o)})}),c}function Os(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function ks(e,t,n={}){let r=ls(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Ds(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return As(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function As(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(ks(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Os(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function js(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>ks(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=ks(e,t,n);else{let i=typeof t==`function`?ls(e,t,n.custom):t;r=Promise.all(Ds(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function Ms(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:t,options:n})=>js(e,t,n)))}function Rs(e){let t=Ls(e),n=Vs(),r=!0,i=t=>(n,r)=>{let i=ls(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=Ps(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;td&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=us(t)&&us(n)?!Ms(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v;y&&(!E||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ls(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Os(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=ls(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Vs()}}}function zs(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ms(t,e):!1}function Bs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vs(){return{animate:Bs(!0),whileInView:Bs(),whileHover:Bs(),whileTap:Bs(),whileDrag:Bs(),whileFocus:Bs(),exit:Bs()}}var Hs=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Us=class extends Hs{constructor(e){super(e),e.animationState||=Rs(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();xa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Ws=0,Gs={animation:{Feature:Us},exit:{Feature:class extends Hs{constructor(){super(...arguments),this.id=Ws++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Ks(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function qs(e){return{point:{x:e.pageX,y:e.pageY}}}var Js=e=>t=>Ii(t)&&e(t,qs(t));function Ys(e,t,n,r){return Ks(e,t,Js(n),r)}var Xs=1e-4,Zs=1-Xs,Qs=1+Xs,$s=.01,ec=0-$s,tc=0+$s;function nc(e){return e.max-e.min}function rc(e,t,n){return Math.abs(e-t)<=n}function ic(e,t,n,r=.5){e.origin=r,e.originPoint=Y(t.min,t.max,e.origin),e.scale=nc(n)/nc(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Zs&&e.scale<=Qs||isNaN(e.scale))&&(e.scale=1),(e.translate>=ec&&e.translate<=tc||isNaN(e.translate))&&(e.translate=0)}function ac(e,t,n,r){ic(e.x,t.x,n.x,r?r.originX:void 0),ic(e.y,t.y,n.y,r?r.originY:void 0)}function oc(e,t,n){e.min=n.min+t.min,e.max=e.min+nc(t)}function sc(e,t,n){oc(e.x,t.x,n.x),oc(e.y,t.y,n.y)}function cc(e,t,n){e.min=t.min-n.min,e.max=e.min+nc(t)}function lc(e,t,n){cc(e.x,t.x,n.x),cc(e.y,t.y,n.y)}function uc(e){return[e(`x`),e(`y`)]}var dc=({current:e})=>e?e.ownerDocument.defaultView:null,fc=(e,t)=>Math.abs(e-t);function pc(e,t){let n=fc(e.x,t.x),r=fc(e.y,t.y);return Math.sqrt(n**2+r**2)}var mc=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=_c(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=pc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=K;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=hc(t,this.transformPagePoint),G.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=_c(e.type===`pointercancel`?this.lastMoveEventInfo:hc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Ii(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=hc(qs(e),this.transformPagePoint),{point:s}=o,{timestamp:c}=K;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,_c(o,this.history)),this.removeListeners=ke(Ys(this.contextWindow,`pointermove`,this.handlePointerMove),Ys(this.contextWindow,`pointerup`,this.handlePointerUp),Ys(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ct(this.updatePoint)}};function hc(e,t){return t?{point:t(e.point)}:e}function gc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _c({point:e},t){return{point:e,delta:gc(e,yc(t)),offset:gc(e,vc(t)),velocity:bc(t,.1)}}function vc(e){return e[0]}function yc(e){return e[e.length-1]}function bc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=yc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Me(t)));)n--;if(!r)return{x:0,y:0};let a=Ne(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function xc(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Y(n,e,r.max):Math.min(e,n)),e}function Sc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Cc(e,{top:t,left:n,bottom:r,right:i}){return{x:Sc(e.x,n,i),y:Sc(e.y,t,r)}}function wc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Ae(t.min,t.max-r,e.min):r>i&&(n=Ae(e.min,e.max-i,t.min)),xe(0,1,n)}function Dc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Oc=.35;function kc(e=Oc){return e===!1?e=0:e===!0&&(e=Oc),{x:Ac(e,`left`,`right`),y:Ac(e,`top`,`bottom`)}}function Ac(e,t,n){return{min:jc(e,t),max:jc(e,n)}}function jc(e,t){return typeof e==`number`?e:e[t]||0}var Mc=new WeakMap,Nc=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(qs(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ji(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),uc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ft.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=nc(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&G.postRender(()=>i(e,t)),hs(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Fc(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>uc(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new mc(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:dc(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&G.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Pc(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=xc(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&fo(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Cc(n.layoutBox,e):this.constraints=!1,this.elastic=kc(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&uc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Dc(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fo(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Wo(n,r.root,this.visualElement.getTransformPagePoint()),a=Tc(r.layout.layoutBox,i);if(t){let e=t(Eo(a));this.hasMutatedConstraints=!!e,e&&(a=To(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=uc(o=>{if(!Pc(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return hs(this.visualElement,e),n.start(Ts(e,n,0,t,this.visualElement,!1))}stopAnimation(){uc(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){uc(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){uc(t=>{let{drag:n}=this.getProps();if(!Pc(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-Y(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!fo(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};uc(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Ec({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),uc(t=>{if(!Pc(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Y(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;Mc.set(this.visualElement,this);let e=this.visualElement.current,t=Ys(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();fo(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),G.read(n);let a=Ks(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(uc(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Oc,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Pc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fc(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Ic=class extends Hs{constructor(e){super(e),this.removeGroupControls=De,this.removeListeners=De,this.controls=new Nc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||De}unmount(){this.removeGroupControls(),this.removeListeners()}},Lc=e=>(t,n)=>{e&&G.postRender(()=>e(t,n))},Rc=class extends Hs{constructor(){super(...arguments),this.removePointerDownListener=De}onPointerDown(e){this.session=new mc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dc(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Lc(e),onStart:Lc(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&G.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Ys(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},zc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bc=!1,Vc=class extends P.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Bc&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),zc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,Bc=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||G.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Di.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Bc=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Hc(e){let[t,n]=ia(),r=(0,P.useContext)(me);return(0,F.jsx)(Vc,{...e,layoutGroup:r,switchLayoutGroup:(0,P.useContext)(go),isPresent:t,safeToRemove:n})}function Uc(e,t,n){let r=qi(e)?e:Ei(e);return r.start(Ts(``,r,t,n)),r.animation}var Wc=(e,t)=>e.depth-t.depth,Gc=class{constructor(){this.children=[],this.isDirty=!1}add(e){ye(this.children,e),this.isDirty=!0}remove(e){be(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Wc),this.isDirty=!1,this.children.forEach(e)}};function Kc(e,t){let n=ft.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(ct(r),e(a-t))};return G.setup(r,!0),()=>ct(r)}var qc=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Jc=qc.length,Yc=e=>typeof e==`string`?parseFloat(e):e,Xc=e=>typeof e==`number`||q.test(e);function Zc(e,t,n,r,i,a){i?(e.opacity=Y(0,n.opacity??1,$c(r)),e.opacityExit=Y(t.opacity??1,0,el(r))):a&&(e.opacity=Y(t.opacity??1,n.opacity??1,r));for(let i=0;irt?1:n(Ae(e,t,r))}function nl(e,t){e.min=t.min,e.max=t.max}function rl(e,t){nl(e.x,t.x),nl(e.y,t.y)}function il(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function al(e,t,n,r,i){return e-=t,e=No(e,1/n,r),i!==void 0&&(e=No(e,1/i,r)),e}function ol(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ft.test(t)&&(t=parseFloat(t),t=Y(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Y(a.min,a.max,r);e===a&&(s-=t),e.min=al(e.min,t,n,s,i),e.max=al(e.max,t,n,s,i)}function sl(e,t,[n,r,i],a,o){ol(e,t[n],t[r],t[i],t.scale,a,o)}var cl=[`x`,`scaleX`,`originX`],ll=[`y`,`scaleY`,`originY`];function ul(e,t,n,r){sl(e.x,t,cl,n?n.x:void 0,r?r.x:void 0),sl(e.y,t,ll,n?n.y:void 0,r?r.y:void 0)}function dl(e){return e.translate===0&&e.scale===1}function fl(e){return dl(e.x)&&dl(e.y)}function pl(e,t){return e.min===t.min&&e.max===t.max}function ml(e,t){return pl(e.x,t.x)&&pl(e.y,t.y)}function hl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gl(e,t){return hl(e.x,t.x)&&hl(e.y,t.y)}function _l(e){return nc(e.x)/nc(e.y)}function vl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var yl=class{constructor(){this.members=[]}add(e){ye(this.members,e),e.scheduleRender()}remove(e){if(be(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function bl(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var xl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Sl=[``,`X`,`Y`,`Z`],Cl=1e3,wl=0;function Tl(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function El(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=gs(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,G,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&El(r)}function Dl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=wl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,it.value&&(xl.nodes=xl.calculatedTargetDeltas=xl.calculatedProjections=0),this.nodes.forEach(Al),this.nodes.forEach(Ll),this.nodes.forEach(Rl),this.nodes.forEach(jl),it.addProjectionMetrics&&it.addProjectionMetrics(xl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;G.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Kc(i,250),zc.hasAnimatedSinceResize&&(zc.hasAnimatedSinceResize=!1,this.nodes.forEach(Il)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Gl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!gl(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ei(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Il(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ct(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zl),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&El(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!nc(this.snapshot.measuredBox.x)&&!nc(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e{let n=t/1e3;Vl(a.x,e.x,n),Vl(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lc(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ul(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ml(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Z(),rl(d,this.relativeTarget)),s&&(this.animationValues=i,Zc(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(ct(this.pendingAnimation),void 0),this.pendingAnimation=G.update(()=>{zc.hasAnimatedSinceResize=!0,pt.layout++,this.motionValue||=Ei(0),this.currentAnimation=Uc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{pt.layout--},onComplete:()=>{pt.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Cl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Xl(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Z();let t=nc(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=nc(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}rl(t,n),Ho(t,i),ac(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new yl),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Tl(`z`,e,r,this.animationValues);for(let t=0;te.currentAnimation?.stop()),this.root.nodes.forEach(Nl),this.root.sharedNodes.clear()}}}function Ol(e){e.updateLayout()}function kl(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?uc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=nc(r);r.min=n[e].min,r.max=r.min+i}):Xl(i,t.layoutBox,n)&&uc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=nc(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ko();ac(o,n,t.layoutBox);let s=Ko();a?ac(s,e.applyTransform(r,!0),t.measuredBox):ac(s,n,t.layoutBox);let c=!fl(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Z();lc(o,t.layoutBox,i.layoutBox);let s=Z();lc(s,n,a.layoutBox),gl(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Al(e){it.value&&xl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function jl(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ml(e){e.clearSnapshot()}function Nl(e){e.clearMeasurements()}function Pl(e){e.isLayoutDirty=!1}function Fl(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Il(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ll(e){e.resolveTargetDelta()}function Rl(e){e.calcProjection()}function zl(e){e.resetSkewAndRotation()}function Bl(e){e.removeLeadSnapshot()}function Vl(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hl(e,t,n,r){e.min=Y(t.min,n.min,r),e.max=Y(t.max,n.max,r)}function Ul(e,t,n,r){Hl(e.x,t.x,n.x,r),Hl(e.y,t.y,n.y,r)}function Wl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Gl={duration:.45,ease:[.4,0,.1,1]},Kl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ql=Kl(`applewebkit/`)&&!Kl(`chrome/`)?Math.round:De;function Jl(e){e.min=ql(e.min),e.max=ql(e.max)}function Yl(e){Jl(e.x),Jl(e.y)}function Xl(e,t,n){return e===`position`||e===`preserve-aspect`&&!rc(_l(t),_l(n),.2)}function Zl(e){return e!==e.root&&e.scroll?.wasRoot}var Ql=Dl({attachResizeListener:(e,t)=>Ks(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$l={current:void 0},eu=Dl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$l.current){let e=new Ql({});e.mount(window),e.setOptions({layoutScroll:!0}),$l.current=e}return $l.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),tu={pan:{Feature:Rc},drag:{Feature:Ic,ProjectionNode:eu,MeasureLayout:Hc}};function nu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&G.postRender(()=>i(t,qs(t)))}var ru=class extends Hs{mount(){let{current:e}=this.node;e&&(this.unmount=Pi(e,(e,t)=>(nu(this.node,t,`Start`),e=>nu(this.node,e,`End`))))}unmount(){}},iu=class extends Hs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=ke(Ks(this.node.current,`focus`,()=>this.onFocus()),Ks(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function au(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&G.postRender(()=>i(t,qs(t)))}var ou=class extends Hs{mount(){let{current:e}=this.node;e&&(this.unmount=Wi(e,(e,t)=>(au(this.node,t,`Start`),(e,{success:t})=>au(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},su=new WeakMap,cu=new WeakMap,lu=e=>{let t=su.get(e.target);t&&t(e)},uu=e=>{e.forEach(lu)};function du({root:e,...t}){let n=e||document;cu.has(n)||cu.set(n,{});let r=cu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uu,{root:e,...t})),r[i]}function fu(e,t,n){let r=du(t);return su.set(e,n),r.observe(e),()=>{su.delete(e),r.unobserve(e)}}var pu={some:0,all:1},mu=class extends Hs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:pu[r]};return fu(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(hu(e,t))&&this.startObserver()}unmount(){}};function hu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var gu={inView:{Feature:mu},tap:{Feature:ou},focus:{Feature:iu},hover:{Feature:ru}},_u={layout:{ProjectionNode:eu,MeasureLayout:Hc}},Q=wo({...Gs,...gu,...tu,..._u},cs);function vu(){!Yo.current&&Xo();let[e]=(0,P.useState)(Jo.current);return e}var yu=36,bu=12,xu=44,Su=17491.270421/36,Cu=`kai_notes_`,wu=[{idx:0,start:0,end:10,title:`Steps 0–10`},{idx:1,start:11,end:21,title:`Steps 11–21`},{idx:2,start:22,end:32,title:`Steps 22–32`},{idx:3,start:33,end:43,title:`Steps 33–43`}],Tu=e=>`${Cu}${e}`,Eu=(e,t,n)=>`kai_note_${e}_${t}_${n}`,Du=e=>typeof e==`object`&&!!e,Ou=e=>{try{if(typeof window>`u`)return[];let t=window.localStorage.getItem(Tu(e));if(!t)return[];let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=[];for(let e of n){if(!Du(e))continue;let t=e.beat,n=e.step,i=e.text,a=typeof t==`number`?t:Number(t),o=typeof n==`number`?n:Number(n),s=typeof i==`string`?i:String(i??``);Number.isFinite(a)&&Number.isFinite(o)&&o>=0&&o{try{if(typeof window>`u`)return;window.localStorage.setItem(Tu(e),JSON.stringify(t))}catch{}},Au=(e,t,n)=>{let r=Math.floor(Su*t),i=n*11;return Math.floor(e+r+i)},ju={closed:{height:0,opacity:0},open:{height:`auto`,opacity:1}},Mu=e=>t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())};function Nu(){let e=()=>{if(typeof window>`u`)return{inset:0,viewportHeight:0};let e=window.visualViewport,t=Math.round(e?.height??window.innerHeight);return e?{inset:Math.round(Math.max(0,window.innerHeight-(e.height+e.offsetTop))),viewportHeight:t}:{inset:0,viewportHeight:t}},[t,n]=(0,P.useState)(()=>e());return(0,P.useEffect)(()=>{if(typeof window>`u`)return;let t=window.visualViewport,r=()=>n(e());return t&&(t.addEventListener(`resize`,r),t.addEventListener(`scroll`,r)),window.addEventListener(`resize`,r),()=>{t&&(t.removeEventListener(`resize`,r),t.removeEventListener(`scroll`,r)),window.removeEventListener(`resize`,r)}},[]),t}var Pu=({day:e,onClose:t,onSaveKaiNote:n})=>{let[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(-1),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(0),p=(0,P.useMemo)(()=>Ou(e.startPulse),[e.startPulse,d]),m=(0,P.useMemo)(()=>{let e=new Map;for(let t of p){let n=e.get(t.beat)??[];n.push(t),e.set(t.beat,n)}return e},[p]),h=(0,P.useMemo)(()=>{let e=new Map;for(let t of p){let n=Math.floor(t.beat/bu);e.set(n,(e.get(n)??0)+1)}return e},[p]),g=(0,P.useMemo)(()=>{let e=Math.ceil(yu/bu);return Array.from({length:e},(e,t)=>{let n=t*bu,r=Math.min(n+bu,yu),i=Array.from({length:r-n},(e,t)=>({beat:n+t,steps:Array.from({length:xu},(e,t)=>t)}));return{chapter:t,title:`Beats ${n}–${r-1}`,beats:i}})},[]),_=(0,P.useCallback)((e,t)=>p.find(n=>n.beat===e&&n.step===t),[p]),v=(0,P.useCallback)((e,t,n)=>{let r=m.get(e);return r?r.filter(e=>e.step>=t&&e.step<=n).length:0},[m]),y=(0,P.useCallback)((t,n,r)=>{let i=Ou(e.startPulse),a=i.findIndex(e=>e.beat===t&&e.step===n),o=a>=0?i.map((e,t)=>t===a?{...e,text:r}:e):[...i,{beat:t,step:n,text:r}];ku(e.startPulse,o),f(e=>e+1)},[e.startPulse]),b=(0,P.useCallback)(e=>{o(t=>t===e?-1:e),c(null),u(null)},[]),x=(0,P.useCallback)(e=>{c(t=>t===e?null:e),u(null)},[]),S=(0,P.useCallback)(e=>{u(t=>t===e?null:e)},[]),C=(0,P.useRef)(null);(0,P.useEffect)(()=>{(C.current?.querySelector(`.close-btn`))?.focus()},[]);let{inset:w,viewportHeight:T}=Nu(),E=T>0?`${T}px`:void 0,D=(0,P.useRef)(null);(0,P.useEffect)(()=>{if(!r)return;let e=window.setTimeout(()=>{D.current?.focus(),D.current?.scrollIntoView({block:`center`,behavior:`smooth`})},60);return()=>window.clearTimeout(e)},[r,w]);let O=(0,P.useCallback)(()=>{if(!r)return;let t=r.text.trim();if(!t)return;y(r.beat,r.step,t);let a=Au(e.startPulse,r.beat,r.step),o=Eu(e.startPulse,r.beat,r.step);n?.({id:o,text:t,pulse:a,beat:r.beat,step:r.step}),i(null)},[e.startPulse,r,n,y]);return(0,F.jsxs)(sa,{children:[(0,F.jsx)(Q.div,{className:`day-modal-backdrop`,style:{pointerEvents:`none`},initial:{opacity:0},animate:{opacity:.85},exit:{opacity:0}}),(0,F.jsxs)(Q.section,{ref:C,className:`day-modal`,style:{"--kb-inset":`${w}px`,"--vvh":E},initial:{scale:.92,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.92,opacity:0},transition:{type:`spring`,stiffness:300,damping:28},role:`dialog`,"aria-modal":`true`,"aria-labelledby":`day-title`,children:[(0,F.jsxs)(`header`,{className:`day-header`,children:[(0,F.jsxs)(`h2`,{id:`day-title`,children:[e.name,` `,(0,F.jsxs)(`span`,{children:[`• `,e.kaiTimestamp]})]}),(0,F.jsx)(`button`,{type:`button`,className:`close-btn`,onPointerUp:t,onKeyDown:Mu(t),"aria-label":`Close Day Detail`,children:`✕`})]}),(0,F.jsx)(`div`,{className:`beat-list`,children:g.map(({chapter:e,title:t,beats:n})=>{let r=a===e,o=h.get(e)??0;return(0,F.jsxs)(`div`,{className:`chapter-container`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`chapter-header ${r?`open`:``}`,"aria-expanded":r,"aria-controls":`chapter-${e}`,onPointerUp:()=>b(e),onKeyDown:Mu(()=>b(e)),children:[(0,F.jsx)(`span`,{children:t}),o>0&&(0,F.jsxs)(`span`,{className:`chapter-count`,children:[o,` notes`]}),(0,F.jsx)(`span`,{className:`chevron`,"aria-hidden":`true`})]}),(0,F.jsx)(sa,{initial:!1,children:r&&(0,F.jsx)(Q.div,{id:`chapter-${e}`,className:`chapter-body`,variants:ju,initial:`closed`,animate:`open`,exit:`closed`,transition:{type:`tween`,duration:.24},children:n.map(({beat:e,steps:t})=>{let n=s===e,r=m.get(e)?.length??0;return(0,F.jsxs)(`div`,{className:`beat-accordion`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`beat-header ${n?`open`:``}`,"aria-expanded":n,"aria-controls":`beat-${e}`,onPointerUp:()=>x(e),onKeyDown:Mu(()=>x(e)),children:[(0,F.jsxs)(`span`,{children:[`Beat\xA0`,e]}),r>0&&(0,F.jsxs)(`span`,{className:`beat-count`,children:[r,` notes`]}),(0,F.jsx)(`span`,{className:`chevron`,"aria-hidden":`true`})]}),(0,F.jsx)(sa,{initial:!1,children:n&&(0,F.jsx)(Q.div,{id:`beat-${e}`,className:`beat-steps`,variants:ju,initial:`closed`,animate:`open`,exit:`closed`,transition:{type:`tween`,duration:.24},children:wu.map(({idx:n,start:r,end:a,title:o})=>{let s=l===n,c=v(e,r,a);return(0,F.jsxs)(`div`,{className:`group-accordion`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`group-header ${s?`open`:``}`,"aria-expanded":s,"aria-controls":`beat-${e}-group-${n}`,onPointerUp:()=>S(n),onKeyDown:Mu(()=>S(n)),children:[(0,F.jsx)(`span`,{children:o}),c>0&&(0,F.jsxs)(`span`,{className:`group-count`,children:[c,` notes`]}),(0,F.jsx)(`span`,{className:`chevron`,"aria-hidden":`true`})]}),(0,F.jsx)(sa,{initial:!1,children:s&&(0,F.jsx)(Q.div,{id:`beat-${e}-group-${n}`,className:`group-body`,variants:ju,initial:`closed`,animate:`open`,exit:`closed`,transition:{type:`tween`,duration:.2},children:t.filter(e=>e>=r&&e<=a).map(t=>{let n=_(e,t),r=e*xu+t,a=()=>{i({beat:e,step:t,text:n?.text??``})};return(0,F.jsxs)(`div`,{role:`button`,tabIndex:0,"data-step-index":r,className:`step-row${n?` has-note`:``}`,onPointerUp:a,onKeyDown:Mu(a),children:[(0,F.jsxs)(`span`,{className:`step-index`,children:[`Step\xA0`,t]}),n&&(0,F.jsx)(`span`,{className:`step-note-preview`,children:n.text.length>42?`${n.text.slice(0,42)}…`:n.text})]},t)})})})]},n)})})})]},e)})})})]},e)})}),(0,F.jsx)(sa,{children:r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Q.div,{className:`note-editor-backdrop`,initial:{opacity:0},animate:{opacity:.8},exit:{opacity:0},onPointerUp:()=>i(null)}),(0,F.jsxs)(Q.div,{className:`note-editor`,initial:{y:`100%`},animate:{y:0},exit:{y:`100%`},transition:{type:`tween`,duration:.24},role:`dialog`,"aria-label":`Edit note for Beat ${r.beat}, Step ${r.step}`,onPointerDown:e=>e.stopPropagation(),style:{bottom:w,paddingBottom:`max(12px, env(safe-area-inset-bottom))`},children:[(0,F.jsxs)(`h4`,{children:[`Beat\xA0`,r.beat,` • Step\xA0`,r.step]}),(0,F.jsx)(`textarea`,{ref:D,autoFocus:!0,value:r.text,placeholder:`Add your resonance note…`,onChange:e=>{let t=e.target.value;i(e=>e&&{...e,text:t})},onFocus:()=>D.current?.scrollIntoView({block:`center`,behavior:`smooth`})}),(0,F.jsxs)(`footer`,{children:[(0,F.jsx)(`button`,{type:`button`,className:`btn-cancel`,onPointerUp:()=>i(null),onKeyDown:Mu(()=>i(null)),children:`Cancel`}),(0,F.jsx)(`button`,{type:`button`,className:`btn-save`,disabled:!r.text.trim(),onPointerUp:O,onKeyDown:Mu(O),children:`Save`})]})]})]})})]})]})},Fu=x(b(),1),Iu=(3+Math.sqrt(5))*1e3,Lu=17491.270421,Ru=(1+Math.sqrt(5))/2,zu=Date.UTC(2024,4,10,6,45,41,888),Bu=3+Math.sqrt(5),Vu=Bu*1e3,Hu=1000000n,Uu=17491270421n,Wu=11000000n,Gu=(Uu+18n)/36n,Ku={Solhara:`#ff0024`,Aquaris:`#ff6f00`,Flamora:`#ffd600`,Verdari:`#00c853`,Sonari:`#00b0ff`,Kaelith:`#c186ff`},qu=.5,Ju=14,Yu=3.2,Xu=e=>e.replace(/D\s+(\d+)/,`D$1`).replace(/\/\s*M(\d+)/,`/M$1`),Zu=e=>e*Math.PI/180,Qu=(e,t,n)=>e+(t-e)*n,$u=e=>{let t=e&&{"Ignition ArK":`#ff0024`,"Integration ArK":`#ff6f00`,"Harmonization ArK":`#ffd600`,"Reflection ArK":`#00c853`,"Purification ArK":`#00b0ff`,"Dream ArK":`#c186ff`}[e]||`#00eaff`,n=(e,t)=>{let n=e.replace(`#`,``),r=parseInt(n,16);return`rgba(${r>>16&255}, ${r>>8&255}, ${r&255}, ${t})`},r=document.documentElement;r.style.setProperty(`--aqua-core`,t),r.style.setProperty(`--aqua-soft`,n(t,.14)),r.style.setProperty(`--seal-glow-inset`,n(t,.36)),r.style.setProperty(`--seal-glow-mid`,n(t,.42)),r.style.setProperty(`--seal-glow-outer`,n(t,.24))},ed=e=>String(e).padStart(2,`0`),td=(e,t)=>(e%t+t)%t;function nd(e,t){let n=e/t,r=e%t;return r!==0n&&r>0n!=t>0n?n-1n:n}function rd(e){if(!Number.isFinite(e))return 0n;let t=e<0?-1:1,n=Math.abs(e),r=Math.trunc(n),i=n-r;return i<.5?BigInt(t*r):i>.5?BigInt(t*(r+1)):BigInt(t*(r%2==0?r:r+1))}function id(e){return rd((e.getTime()-zu)/1e3/Bu*1e6)}function ad(e){let t=id(e),n=td(t,Uu),r=nd(t,Uu),i=Number(nd(n,Gu)),a=n-BigInt(i)*Gu,o=Math.min(Math.max(Number(nd(a,Wu)),0),43),s=Number(nd(n,Hu)),c=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`][Number(td(r,6n))],l=Number(r),u=(l%42+42)%42+1,d=(Math.floor(l/42)%8+8)%8+1,f=u-1,p=`${i}:${ed(o)}`;return{beat:i,step:o,pulsesIntoDay:s,dayOfMonth:u,monthIndex1:d,weekday:c,sealText:`${p} — D${u}/M${d}`,monthDayIndex:f,chakraStepString:p}}var od=({onClose:e,refBtn:t})=>{let n=vu(),r=n?{}:{rotate:135,scale:1.18},i=n?{}:{rotate:45,scale:.92};return(0,F.jsx)(Q.button,{ref:t,className:`mw-close mw-close--glyph`,"aria-label":`Close month view`,onClick:e,whileHover:r,whileTap:i,transition:{type:`spring`,stiffness:400,damping:24},children:(0,F.jsxs)(`svg`,{viewBox:`0 0 64 64`,strokeLinecap:`round`,fill:`none`,"aria-hidden":`true`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsxs)(`linearGradient`,{id:`plasma`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`var(--aqua-core)`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#ff1559`})]}),(0,F.jsxs)(`filter`,{id:`plasmaBlur`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`2`,result:`b`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),(0,F.jsx)(`polygon`,{points:`32 4 58 20 58 44 32 60 6 44 6 20`,stroke:`url(#plasma)`,strokeWidth:`4`,filter:`url(#plasmaBlur)`}),(0,F.jsxs)(`g`,{stroke:`url(#plasma)`,strokeWidth:`4`,filter:`url(#plasmaBlur)`,children:[(0,F.jsx)(`line`,{x1:`16`,y1:`16`,x2:`48`,y2:`48`}),(0,F.jsx)(`line`,{x1:`48`,y1:`16`,x2:`16`,y2:`48`}),(0,F.jsx)(`line`,{x1:`32`,y1:`8`,x2:`32`,y2:`56`}),(0,F.jsx)(`line`,{x1:`8`,y1:`32`,x2:`56`,y2:`32`})]}),(0,F.jsx)(`g`,{className:`glyphSheen`,children:(0,F.jsx)(`line`,{x1:`0`,y1:`8`,x2:`64`,y2:`56`,stroke:`#fff`,strokeWidth:`1.2`,strokeOpacity:`0`})})]})})},sd=({DAYS:e,initialData:t,notes:n,onSelectDay:r,onAddNote:i,onClose:a,container:o})=>{let s=vu(),{initIdx:c,initSeal:l,spiralArc:u}=(0,P.useMemo)(()=>{let e=t?.kairos_seal_day_month??`D?/M?`,n=Xu(e).match(/D(\d+)/);return{initIdx:n?Math.max(0,Math.min(41,Number(n[1])-1)):0,initSeal:Xu(e),spiralArc:t?.SpiralArc}},[t]);(0,P.useEffect)(()=>{u&&$u(u)},[u]);let d=(0,P.useMemo)(()=>{let e=new Set;return n.forEach(t=>e.add(Math.floor(t.pulse/Lu))),e},[n]),f=(0,P.useMemo)(()=>{let e=1*Ru,t=Math.log(e)/(2*Math.PI),n=[];for(let e=0;e<42;e++){let r=-90+e*60,i=Zu(r),a=e/6,o=9.5*Math.exp(t*2*Math.PI*a),s=o*Math.cos(i),c=o*Math.sin(i);n.push({x:s,y:c,θ:r,r:o})}return n},[]),p=(0,P.useMemo)(()=>{if(!f.length)return``;let e=`M ${f[0].x.toFixed(3)} ${f[0].y.toFixed(3)}`;for(let t=1;tc),[v,y]=(0,P.useState)(null),b=(0,P.useRef)(null),x=(0,P.useRef)(0),S=()=>performance.timeOrigin+performance.now(),C=e=>{let t=e-zu;return zu+Math.ceil(t/Vu)*Vu},w=()=>{b.current!==null&&(clearTimeout(b.current),b.current=null)},T=()=>{w();let e=ad(new Date);h(e),_(e.monthDayIndex+Math.min(1,Math.max(0,e.pulsesIntoDay/Lu)));let t=()=>{let e=S();if(e>=x.current){let t=Math.floor((e-x.current)/Vu);for(let e=0;e<=t;e++){let e=ad(new Date);h(e),_(e.monthDayIndex+Math.min(1,Math.max(0,e.pulsesIntoDay/Lu))),x.current+=Vu}}let n=Math.max(0,x.current-S());b.current=window.setTimeout(t,n)};x.current=C(S());let n=Math.max(0,x.current-S());b.current=window.setTimeout(t,n)};(0,P.useEffect)(()=>{T();let e=()=>{document.visibilityState===`visible`&&T()};return document.addEventListener(`visibilitychange`,e),()=>{w(),document.removeEventListener(`visibilitychange`,e)}},[]);let E=(0,P.useMemo)(()=>{if(!f.length)return{x:0,y:0,r:0,θ:0};let e=Math.max(0,Math.min(f.length-1,g)),t=Math.floor(e),n=Math.min(f.length-1,t+1),r=e-t,i=f[t],a=f[n];return{x:Qu(i.x,a.x,r),y:Qu(i.y,a.y,r),r:Qu(i.r,a.r,r),θ:Qu(i.θ,a.θ,r)}},[f,g]),D=(0,P.useRef)(null);(0,P.useEffect)(()=>D.current?.focus(),[]),(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a(),e.key===`Home`&&(e.preventDefault(),ce(0,8),re(`free`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let O=o??document.body,k=m?.monthDayIndex??c,A=Xu(m?.sealText??l),j=e=>{let n=m?.monthDayIndex??c,r=(typeof t?.eternalKaiPulseToday==`number`?t.eternalKaiPulseToday:m?.pulsesIntoDay)??0;return Math.floor(r/Lu)*Lu+(e-n)*Lu},M=(0,P.useRef)(0),N=(e,t)=>{try{r?.(e,t)}catch{}let n=m?.monthIndex1??1;y({name:e,kaiTimestamp:Xu(`${m?.chakraStepString??`0:00`} — D${t+1}/M${n}`),startPulse:j(t)})},ee=(0,P.useMemo)(()=>t?.SpiralArc&&{"Ignition ArK":`#ff0024`,"Integration ArK":`#ff6f00`,"Harmonization ArK":`#ffd600`,"Reflection ArK":`#00c853`,"Purification ArK":`#00b0ff`,"Dream ArK":`#c186ff`}[t.SpiralArc]||`#8beaff`,[t?.SpiralArc]),te=(0,P.useRef)(null),I=(0,P.useRef)(null),[L,R]=(0,P.useState)(`-60 -60 120 120`),z=(0,P.useRef)({x:-60,y:-60,w:120,h:120}),ne=()=>{let e=I.current;if(!e)return;let t=e.getBBox(),n=t.x-14,r=t.y-14,i=t.width+28,a=t.height+28;z.current={x:n,y:r,w:i,h:a},R(`${n} ${r} ${i} ${a}`)};(0,P.useLayoutEffect)(()=>{let e=requestAnimationFrame(ne),t=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(ne)};return window.addEventListener(`resize`,t),()=>{cancelAnimationFrame(e),window.removeEventListener(`resize`,t)}},[f.length]);let[B,re]=(0,P.useState)(`fit`),[ie,ae]=(0,P.useState)({x:0,y:0,z:1}),V=(0,P.useRef)(ie),oe=(0,P.useRef)(null),se=e=>{V.current=typeof e==`function`?e(V.current):e,oe.current===null&&(oe.current=requestAnimationFrame(()=>{oe.current=null,ae(V.current)}))},H=ie,ce=(e,t=6)=>{let n=f[e];if(!n)return;let{x:r,y:i,w:a,h:o}=z.current,s=r+a/2,c=i+o/2,l=Math.max(1,Math.min(Ju,t));se({x:s-l*n.x,y:c-l*n.y,z:l})};(0,P.useEffect)(()=>{B===`fit`&&se({x:0,y:0,z:1})},[L,B]),(0,P.useEffect)(()=>{if(B!==`follow`)return;let{x:e,y:t,w:n,h:r}=z.current,i=e+n/2,a=t+r/2;se(e=>{let t=e.z;return{x:i-t*E.x,y:a-t*E.y,z:t}})},[E.x,E.y,B]);let U=(0,P.useRef)(new Map),W=(0,P.useRef)({active:!1,mode:`none`,startCam:{x:0,y:0,z:1},movedPx:0}),le=(e,t)=>{let n=te.current,r=n.createSVGPoint();r.x=e,r.y=t;let i=n.getScreenCTM();return i?r.matrixTransform(i.inverse()):r},ue=()=>{if(U.current.size<1)return null;let e=0,t=0;U.current.forEach(n=>{e+=n.clientX,t+=n.clientY});let n=U.current.size;return{cx:e/n,cy:t/n}},de=()=>{let e=Array.from(U.current.values());if(e.length<2)return 0;let t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.hypot(t,n)},fe=()=>{B!==`free`&&re(`free`)},pe=(0,P.useRef)({lastTap:0}),me=e=>{if(e.preventDefault(),e.target.setPointerCapture?.(e.pointerId),fe(),U.current.set(e.pointerId,{id:e.pointerId,clientX:e.clientX,clientY:e.clientY}),W.current.active=!0,W.current.startCam=V.current,W.current.movedPx=0,U.current.size===1)W.current.mode=`pan`,W.current.startPt=le(e.clientX,e.clientY),W.current.startClient={x:e.clientX,y:e.clientY};else if(U.current.size===2){W.current.mode=`pinch`;let e=ue();W.current.lastCentroid=le(e.cx,e.cy),W.current.lastDist=de()}let t=performance.now();if(t-pe.current.lastTap<300&&U.current.size===1){let t=le(e.clientX,e.clientY);se(e=>{let n=e.z,r=n{if(!W.current.active)return;if(U.current.set(e.pointerId,{id:e.pointerId,clientX:e.clientX,clientY:e.clientY}),W.current.startClient){let t=e.clientX-W.current.startClient.x,n=e.clientY-W.current.startClient.y;W.current.movedPx=Math.max(W.current.movedPx,Math.hypot(t,n))}let t=V.current;if(W.current.mode===`pan`&&U.current.size===1){let n=le(e.clientX,e.clientY),r=W.current.startPt,i=n.x-r.x,a=n.y-r.y;se({x:W.current.startCam.x+i,y:W.current.startCam.y+a,z:t.z})}else if(U.current.size>=2){let e=ue(),n=le(e.cx,e.cy),r=W.current.lastCentroid??n,i=n.x-r.x,a=n.y-r.y,o=de(),s=W.current.lastDist??o,c=o>0&&s>0?o/s:1,l=t.z*c,u=Math.min(Ju,Math.max(qu,l)),d=t.x+i,f=t.y+a;se({x:d+(t.z-u)*n.x,y:f+(t.z-u)*n.y,z:u}),W.current.lastCentroid=n,W.current.lastDist=o,W.current.movedPx=9999}else if(U.current.size===1&&W.current.mode===`pinch`){W.current.mode=`pan`;let e=Array.from(U.current.values())[0];W.current.startCam=V.current,W.current.startPt=le(e.clientX,e.clientY),W.current.startClient={x:e.clientX,y:e.clientY}}},ge=e=>{if(U.current.delete(e.pointerId),U.current.size===0)W.current.active=!1,W.current.mode=`none`,W.current.startPt=void 0,W.current.startClient=void 0,W.current.lastCentroid=void 0,W.current.lastDist=void 0;else if(U.current.size===1&&W.current.mode===`pinch`){W.current.mode=`pan`;let e=Array.from(U.current.values())[0];W.current.startCam=V.current,W.current.startPt=le(e.clientX,e.clientY),W.current.startClient={x:e.clientX,y:e.clientY}}},_e=e=>{if(B!==`free`)return;e.preventDefault();let t=le(e.clientX,e.clientY),n=Math.exp(-e.deltaY*.0015);se(e=>{let r=e.z*n,i=Math.min(Ju,Math.max(qu,r));return{x:e.x+(1-i/e.z)*(t.x-e.x),y:e.y+(1-i/e.z)*(t.y-e.y),z:i}})};return(0,Fu.createPortal)((0,F.jsx)(sa,{children:(0,F.jsx)(Q.div,{className:`mw-backdrop`,role:`presentation`,onPointerDown:e=>{if(performance.now()e.stopPropagation(),initial:{scale:.82,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.82,opacity:0},transition:{type:`spring`,stiffness:320,damping:26},children:[(0,F.jsx)(od,{onClose:a,refBtn:D}),(0,F.jsxs)(`svg`,{ref:te,className:`mw-stage`,viewBox:L,preserveAspectRatio:`xMidYMid meet`,"aria-label":`Month Spiral`,onPointerDown:me,onPointerMove:he,onPointerUp:ge,onPointerCancel:ge,onWheel:_e,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsxs)(`filter`,{id:`mw-neon`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`1.6`,result:`b`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsxs)(`linearGradient`,{id:`etherik-baby-blue`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`#8beaff`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#c7f4ff`})]}),(0,F.jsxs)(`filter`,{id:`etherik-blue-glow`,x:`-80%`,y:`-80%`,width:`260%`,height:`260%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`1.8`,result:`b1`}),(0,F.jsx)(`feGaussianBlur`,{in:`b1`,stdDeviation:`3.2`,result:`b2`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b2`}),(0,F.jsx)(`feMergeNode`,{in:`b1`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsxs)(`filter`,{id:`etherik-blue-halo`,x:`-120%`,y:`-120%`,width:`340%`,height:`340%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`5`,result:`b3`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b3`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsxs)(`linearGradient`,{id:`ark-twinkle`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:ee,stopOpacity:`1`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:ee,stopOpacity:`0.2`})]}),(0,F.jsxs)(`linearGradient`,{id:`mw-spiral-grad`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`var(--aqua-core)`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#ff1559`})]})]}),(0,F.jsx)(Q.g,{initial:!1,animate:{x:H.x,y:H.y,scale:H.z},transition:s?{duration:0}:{type:`spring`,stiffness:200,damping:26,mass:.7},children:(0,F.jsxs)(`g`,{ref:I,children:[(0,F.jsx)(Q.path,{d:p,fill:`none`,stroke:`url(#mw-spiral-grad)`,strokeWidth:`1.6`,style:{filter:`url(#mw-neon)`},animate:s?{}:{opacity:[.55,.85,.55]},transition:s?{}:{duration:Iu/1e3,repeat:1/0,ease:`easeInOut`}}),f.map((t,n)=>{let r=e[n%6],a=n===k,o=d.has(n),s=t.θ+90,c=8.5,l=4.6,u=1.6,f=`translate(${t.x},${t.y})`,p=a?0:s,m=-l-.6,h=(p%360+360)%360,g=h>90&&h<270,_=()=>W.current.movedPx<8;return(0,F.jsxs)(`g`,{transform:`${f} rotate(${p})`,style:{cursor:`pointer`},onPointerUp:e=>{e.preventDefault(),e.stopPropagation(),_()&&(M.current=performance.now()+350,N(r,n))},onDoubleClick:()=>i(n),children:[(0,F.jsx)(Q.rect,{x:-c/2,y:-l/2,width:c,height:l,rx:u,ry:u,fill:Ku[r],stroke:a?`url(#etherik-baby-blue)`:`rgba(255,255,255,0.2)`,strokeWidth:a?1.2:.6,className:[`mw-daychip`,a?`mw-today`:``,o?`mw-hasNote`:``].join(` `).trim(),style:{filter:a?`url(#etherik-blue-glow)`:`url(#mw-neon)`},animate:!1}),a&&(0,F.jsx)(`rect`,{x:-c/2,y:-l/2,width:c,height:l,rx:u,ry:u,fill:`none`,stroke:`url(#etherik-baby-blue)`,strokeWidth:1.4,style:{filter:`url(#etherik-blue-halo)`}}),o&&(0,F.jsx)(`circle`,{cx:c/2-1.2,cy:-l/2+1.2,r:.9,fill:`var(--note-dot)`,className:`mw-note-dot`}),(0,F.jsxs)(`text`,{x:0,y:m,transform:g?`rotate(180, 0, ${m})`:void 0,textAnchor:`middle`,dominantBaseline:`auto`,fontSize:`2.8`,fontFamily:`Inter, system-ui, sans-serif`,fill:Ku[r],className:a?`mw-label mw-today-label`:`mw-label`,style:{filter:`url(#mw-neon)`},children:[r.slice(0,3),` • `,n+1]})]},n)}),(0,F.jsxs)(Q.g,{initial:!1,animate:{x:E.x,y:E.y,rotate:E.θ+90},transition:s?{duration:0}:{type:`spring`,stiffness:120,damping:18,mass:.5},className:`mw-comet`,style:{filter:`url(#etherik-blue-glow)`},children:[(0,F.jsxs)(Q.g,{animate:s?{}:{scale:[.98,1.06,.98],opacity:[.9,1,.9]},transition:s?{}:{repeat:1/0,duration:Iu/1e3,ease:`easeInOut`},children:[(0,F.jsx)(`circle`,{r:`2.2`,fill:`url(#etherik-baby-blue)`}),(0,F.jsx)(`circle`,{r:`4.4`,fill:`url(#etherik-baby-blue)`,opacity:`0.55`}),(0,F.jsx)(`circle`,{r:`6.6`,fill:`url(#etherik-baby-blue)`,opacity:`0.26`}),(0,F.jsx)(`circle`,{r:`7.6`,fill:`none`,stroke:`url(#etherik-baby-blue)`,strokeWidth:`1.1`,opacity:`0.9`})]}),(0,F.jsxs)(Q.g,{transform:`rotate(45)`,animate:s?{}:{rotate:[0,180,360],scale:[.92,1.18,.92],opacity:[.6,1,.6]},transition:s?{}:{repeat:1/0,duration:Iu/1e3,ease:`easeInOut`},children:[(0,F.jsx)(`line`,{x1:`-3.2`,y1:`0`,x2:`3.2`,y2:`0`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.45`}),(0,F.jsx)(`line`,{x1:`0`,y1:`-3.2`,x2:`0`,y2:`3.2`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.45`}),(0,F.jsx)(`line`,{x1:`-2.2`,y1:`-2.2`,x2:`2.2`,y2:`2.2`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.35`,opacity:`0.85`}),(0,F.jsx)(`line`,{x1:`2.2`,y1:`-2.2`,x2:`-2.2`,y2:`2.2`,stroke:`url(#ark-twinkle)`,strokeWidth:`0.35`,opacity:`0.85`}),(0,F.jsx)(`circle`,{r:`0.9`,fill:ee,opacity:`0.9`})]})]})]})})]}),(0,F.jsxs)(`div`,{className:`mw-cam`,children:[(0,F.jsx)(`button`,{className:`mw-cam-btn ${B===`fit`?`is-active`:``}`,onClick:e=>{e.shiftKey||e.metaKey?(ce(0,8),re(`free`)):(re(`fit`),se({x:0,y:0,z:1}))},"aria-pressed":B===`fit`,title:`Fit month (⇧ to snap Day 1)`,children:`Fit`}),(0,F.jsx)(`button`,{className:`mw-cam-btn ${B===`follow`?`is-active`:``}`,onClick:()=>re(`follow`),"aria-pressed":B===`follow`,title:`Follow comet`,children:`Follow`}),(0,F.jsx)(`button`,{className:`mw-cam-btn ${B===`free`?`is-active`:``}`,onClick:()=>re(`free`),"aria-pressed":B===`free`,title:`Drag & zoom`,children:`Free`})]}),(0,F.jsx)(`div`,{className:`mw-seal`,children:(0,F.jsx)(`code`,{children:A})}),v&&(0,F.jsx)(Pu,{day:v,onClose:()=>y(null)})]})},`mw-backdrop`)}),O)},cd=Date.UTC(2024,4,10,6,45,41,888),ld=3+Math.sqrt(5),ud=ld*1e3,dd=1000000n,fd=17491270421n,pd=11000000n,md=(fd+18n)/36n;function hd(e){if(!Number.isFinite(e))return 0n;let t=e<0?-1:1,n=Math.abs(e),r=Math.trunc(n),i=n-r;return i<.5?BigInt(t*r):i>.5?BigInt(t*(r+1)):BigInt(t*(r%2==0?r:r+1))}var gd=(e,t)=>(e%t+t)%t;function _d(e,t){let n=e/t,r=e%t;return r!==0n&&r>0n!=t>0n?n-1n:n}function vd(e){return hd((e.getTime()-cd)/1e3/ld*1e6)}function yd(e){let t=vd(e),n=gd(t,fd),r=Number(_d(n,md)),i=n-BigInt(r)*md,a=Number(_d(i,pd));return{beat:r,step:Math.min(Math.max(a,0),43),pulsesIntoDay:Number(_d(n,dd)),livePulseApprox:Number(_d(t,dd))}}var bd=e=>String(e).padStart(2,`0`),xd=(e,t,n)=>`kai_note_${e}_${t}_${n}`;function Sd(){let[e,t]=(0,P.useState)({inset:0,viewportHeight:0});return(0,P.useEffect)(()=>{let e=window.visualViewport,n=()=>{let n=Math.round(e?.height??window.innerHeight);if(!e)return t({inset:0,viewportHeight:n});let r=Math.max(0,window.innerHeight-(e.height+e.offsetTop));t({inset:Math.round(r),viewportHeight:n})};return n(),e?.addEventListener(`resize`,n),e?.addEventListener(`scroll`,n),window.addEventListener(`resize`,n),()=>{e?.removeEventListener(`resize`,n),e?.removeEventListener(`scroll`,n),window.removeEventListener(`resize`,n)}},[]),e}var Cd=e=>e.trim()?e.trim().split(/\s+/).length:0,wd=e=>Math.max(1,Math.round(e/200)),Td=e=>Array.from(new Set(e.split(`,`).map(e=>e.trim()).filter(Boolean)));function Ed(e,t){let n=t=>{let n=e.current;n&&(n.focus(),t(n))},r=(e,r=e)=>n(n=>{let{selectionStart:i,selectionEnd:a,value:o}=n,s=o.slice(i,a)||`…`;t(o.slice(0,i)+e+s+r+o.slice(a));let c=i+e.length+s.length+r.length;requestAnimationFrame(()=>n.setSelectionRange(c,c))}),i=e=>n(n=>{let{selectionStart:r,selectionEnd:i,value:a}=n,o=a.lastIndexOf(` -`,r-1)+1,s=a.indexOf(` -`,i),c=s===-1?a.length:s,l=a.slice(o,c).split(` -`).map(t=>t.startsWith(e)?t:`${e}${t}`).join(` -`);t(a.slice(0,o)+l+a.slice(c));let u=o+l.length;requestAnimationFrame(()=>n.setSelectionRange(u,u))});return{insert:e=>n(n=>{let{selectionStart:r,selectionEnd:i}=n;t(n.value.slice(0,r)+e+n.value.slice(i));let a=r+e.length;requestAnimationFrame(()=>n.setSelectionRange(a,a))}),bold:()=>r(`**`),italic:()=>r(`*`),h1:()=>i(`# `),h2:()=>i(`## `),bullet:()=>i(`- `),task:()=>i(`- [ ] `),quote:()=>i(`> `)}}var Dd=({pulse:e,initialText:t,onSave:n,onClose:r})=>{let i=vu(),a=(0,P.useMemo)(()=>`kairosNoteDraft_${Math.round(e)}`,[e]),[o,s]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return t;try{let e=localStorage.getItem(a);if(!e)return t;let n=JSON.parse(e);return typeof n?.text==`string`?n.text:t}catch{return t}}),[c,l]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return``;try{let e=localStorage.getItem(a);if(!e)return``;let t=JSON.parse(e);return typeof t?.title==`string`?t.title:``}catch{return``}}),[u,d]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return``;try{let e=localStorage.getItem(a);if(!e)return``;let t=JSON.parse(e);return typeof t?.tags==`string`?t.tags:``}catch{return``}}),[f,p]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return`Memory`;try{let e=localStorage.getItem(a);if(!e)return`Memory`;let t=JSON.parse(e);return typeof t?.intent==`string`?t.intent:`Memory`}catch{return`Memory`}}),[m,h]=(0,P.useState)(()=>{if(typeof window>`u`||t.trim())return!1;try{let e=localStorage.getItem(a);if(!e)return!1;let t=JSON.parse(e);return typeof t?.pinned==`boolean`?t.pinned:!1}catch{return!1}}),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(null),[S,C]=(0,P.useState)(t.length),[w,T]=(0,P.useState)(()=>yd(new Date)),E=(0,P.useRef)(null),D=(0,P.useRef)(null),{inset:O,viewportHeight:k}=Sd();(0,P.useEffect)(()=>{C(o.length)},[o]);let A=Ed(D,e=>{s(e),C(e.length)});(0,P.useEffect)(()=>D.current?.focus(),[]),(0,P.useEffect)(()=>{let e=document.body.style.overflow,t=document.body.style.touchAction;return document.body.style.overflow=`hidden`,document.body.style.touchAction=`none`,()=>{document.body.style.overflow=e,document.body.style.touchAction=t}},[]),(0,P.useEffect)(()=>{let e=E.current;if(!e)return;let t=()=>Array.from(e.querySelectorAll(`button,[href],input,textarea,select,details,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`)&&!e.getAttribute(`aria-hidden`)),n=e=>{if(e.key!==`Tab`)return;let n=t();if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(i.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===i&&(r.focus(),e.preventDefault())};return e.addEventListener(`keydown`,n),()=>e.removeEventListener(`keydown`,n)},[]);let j=(0,P.useRef)(null),M=(0,P.useRef)(0),N=()=>performance.timeOrigin+performance.now(),ee=e=>{let t=e-cd;return cd+Math.ceil(t/ud)*ud},te=()=>{j.current!==null&&(clearTimeout(j.current),j.current=null)},I=(0,P.useCallback)(()=>{te(),T(yd(new Date));let e=()=>{let t=N();if(t>=M.current){let e=Math.floor((t-M.current)/ud);for(let t=0;t<=e;t++)T(yd(new Date)),M.current+=ud}let n=Math.max(0,M.current-N());j.current=window.setTimeout(e,n)};M.current=ee(N());let t=Math.max(0,M.current-N());j.current=window.setTimeout(e,t)},[]);(0,P.useEffect)(()=>{I();let e=()=>{document.visibilityState===`visible`&&I()};return document.addEventListener(`visibilitychange`,e),()=>{te(),document.removeEventListener(`visibilitychange`,e)}},[I]);let L=(0,P.useCallback)(()=>{let e=D.current;if(!e||b!==null)return;e.style.height=`auto`;let t=k||window.innerHeight,n=Math.round(t*(v?.7:.42));e.style.height=Math.min(n,e.scrollHeight+2)+`px`},[v,b,k]);(0,P.useEffect)(()=>{L()},[o,v,L]);let R=(0,P.useRef)(null),z=e=>{let t=D.current;t&&(e.target.setPointerCapture(e.pointerId),R.current={startY:e.clientY,startH:t.getBoundingClientRect().height})},ne=e=>{if(!R.current)return;let t=e.clientY-R.current.startY,n=R.current.startH+t,r=Math.round(window.innerHeight*.82);x(Math.max(120,Math.min(r,n)))},B=e=>{R.current&&=(e.target.releasePointerCapture(e.pointerId),null)},re=(0,P.useMemo)(()=>`${w.beat}:${bd(w.step)}`,[w.beat,w.step]),ie=(0,P.useMemo)(()=>Cd(o),[o]),ae=(0,P.useMemo)(()=>wd(ie),[ie]),V=(0,P.useMemo)(()=>Td(u),[u]),oe=k||(typeof window<`u`?window.innerHeight:0);(0,P.useEffect)(()=>{if(typeof window>`u`)return;let e=window.setTimeout(()=>{let e={text:o,title:c,tags:u,intent:f,pinned:m};try{localStorage.setItem(a,JSON.stringify(e))}catch{}},180);return()=>window.clearTimeout(e)},[a,f,m,u,o,c]);let se=()=>{`vibrate`in navigator&&typeof navigator.vibrate==`function`&&navigator.vibrate(8)},H=async()=>{let t=o.trim();if(!t||g)return;_(!0);let i=yd(new Date),s=Math.max(0,i.livePulseApprox??Math.round(e)),l={id:xd(s,i.beat,i.step),pulse:s,text:t,title:c.trim()||void 0,tags:V.length?V:void 0,intent:f.trim()||void 0,pinned:m,beat:i.beat,step:i.step};try{se(),await Promise.resolve(n(l))}finally{if(_(!1),typeof window<`u`)try{localStorage.removeItem(a)}catch{}r()}};return(0,F.jsx)(sa,{children:(0,F.jsx)(Q.div,{className:`note-modal-backdrop`,initial:{opacity:0},animate:{opacity:.92},exit:{opacity:0},transition:{duration:.22},onClick:e=>{e.target,e.currentTarget},children:(0,F.jsxs)(Q.div,{ref:E,className:`note-modal${v?` note-modal--expanded`:``}`,role:`dialog`,"aria-modal":`true`,"aria-label":`Add Kairos Note`,initial:{scale:.94,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.94,opacity:0},transition:{type:`spring`,stiffness:340,damping:26},onClick:e=>e.stopPropagation(),style:{bottom:Math.max(12,O),maxHeight:Math.max(240,oe-24),paddingBottom:`max(12px, env(safe-area-inset-bottom))`},children:[(0,F.jsxs)(`div`,{className:`note-modal__header`,children:[(0,F.jsxs)(`div`,{className:`note-modal__title`,children:[(0,F.jsx)(`span`,{children:`Note @`}),(0,F.jsx)(Q.code,{className:`note-modal__beatstep`,"aria-label":`Beat ${w.beat} Step ${w.step}`,animate:i?{}:{opacity:[.9,1,.9],filter:[`blur(0px)`,`blur(0.2px)`,`blur(0px)`]},transition:i?{}:{repeat:1/0,duration:5.236,ease:`easeInOut`},children:re})]}),(0,F.jsxs)(`div`,{className:`note-modal__meta`,children:[(0,F.jsxs)(`code`,{className:`note-modal__pulse`,title:`Absolute Kai-Pulse`,children:[`pulse\xA0`,w.livePulseApprox.toLocaleString()]}),(0,F.jsxs)(`span`,{className:`note-modal__chip`,children:[`Intent: `,f]}),V.length>0&&(0,F.jsxs)(`span`,{className:`note-modal__chip`,children:[`Tags: `,V.slice(0,2).join(`, `)]})]}),(0,F.jsxs)(`div`,{className:`note-modal__controls`,children:[(0,F.jsx)(`button`,{type:`button`,className:`note-modal__pin${m?` is-active`:``}`,"aria-pressed":m,title:m?`Pinned note`:`Pin note`,onClick:()=>h(e=>!e),children:`⬟`}),(0,F.jsx)(`button`,{type:`button`,className:`note-modal__expand`,"aria-pressed":v,title:v?`Shrink editor`:`Expand editor`,onClick:()=>{y(e=>!e),x(null),requestAnimationFrame(()=>D.current?.focus())},children:v?`↙︎`:`↗︎`}),(0,F.jsx)(`button`,{type:`button`,className:`note-modal__close`,"aria-label":`Close`,onClick:r,children:(0,F.jsxs)(`svg`,{width:`22`,height:`22`,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:`note-modal__closeIcon`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:`kai-x`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`currentColor`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`currentColor`})]})}),(0,F.jsx)(`line`,{x1:`5`,y1:`5`,x2:`19`,y2:`19`,stroke:`url(#kai-x)`,strokeWidth:`2`}),(0,F.jsx)(`line`,{x1:`19`,y1:`5`,x2:`5`,y2:`19`,stroke:`url(#kai-x)`,strokeWidth:`2`})]})})]})]}),(0,F.jsxs)(`div`,{className:`note-modal__toolbar`,role:`group`,"aria-label":`Formatting`,children:[(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Bold (**) — Cmd/Ctrl+B`,onClick:e=>{e.preventDefault(),A.bold()},children:`B`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Italic (*) — Cmd/Ctrl+I`,onClick:e=>{e.preventDefault(),A.italic()},children:`I`}),(0,F.jsx)(`span`,{className:`tool-sep`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Heading 1 (# )`,onClick:e=>{e.preventDefault(),A.h1()},children:`H1`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Heading 2 (## )`,onClick:e=>{e.preventDefault(),A.h2()},children:`H2`}),(0,F.jsx)(`span`,{className:`tool-sep`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Bulleted list (- )`,onClick:e=>{e.preventDefault(),A.bullet()},children:`•`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Task list (- [ ] )`,onClick:e=>{e.preventDefault(),A.task()},children:`☐`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Quote (> )`,onClick:e=>{e.preventDefault(),A.quote()},children:`❝`}),(0,F.jsx)(`button`,{type:`button`,className:`tool-btn`,title:`Insert timestamp`,onClick:e=>{e.preventDefault();let t=new Date().toLocaleString();A.insert(`\n- ${t}`)},children:`⌚`}),(0,F.jsxs)(`div`,{className:`tool-stats`,"aria-live":`polite`,children:[(0,F.jsxs)(`span`,{children:[S.toLocaleString(),` chars`]}),(0,F.jsxs)(`span`,{children:[`· `,ie.toLocaleString(),` words`]}),(0,F.jsxs)(`span`,{children:[`· `,ae,` min`]})]})]}),(0,F.jsxs)(`div`,{className:`note-modal__content`,children:[(0,F.jsxs)(`div`,{className:`note-modal__meta-grid`,children:[(0,F.jsxs)(`label`,{className:`note-modal__label`,children:[`Title`,(0,F.jsx)(`input`,{className:`note-modal__input`,value:c,onChange:e=>l(e.target.value),placeholder:`Signal title…`,maxLength:120})]}),(0,F.jsxs)(`label`,{className:`note-modal__label`,children:[`Tags`,(0,F.jsx)(`input`,{className:`note-modal__input`,value:u,onChange:e=>d(e.target.value),placeholder:`ritual, focus, idea`})]}),(0,F.jsxs)(`label`,{className:`note-modal__label`,children:[`Intent`,(0,F.jsx)(`select`,{className:`note-modal__input note-modal__select`,value:f,onChange:e=>p(e.target.value),children:[`Memory`,`Plan`,`Idea`,`Task`,`Insight`,`Reminder`].map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))})]})]}),V.length>0&&(0,F.jsx)(`div`,{className:`note-modal__tags`,children:V.map(e=>(0,F.jsx)(`span`,{className:`note-modal__tag`,children:e},e))}),(0,F.jsxs)(`div`,{className:`note-modal__field${v?` note-modal__field--doc`:``}`,children:[(0,F.jsx)(`textarea`,{ref:D,value:o,onChange:e=>{s(e.target.value),C(e.target.value.length)},onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),H()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`b`&&(e.preventDefault(),A.bold()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`i`&&(e.preventDefault(),A.italic())},placeholder:`Cast your resonance into the kairos stream...`,rows:v?14:6,"aria-label":`Note text`,maxLength:2e4,style:{height:b===null?void 0:`${Math.round(b)}px`}}),(0,F.jsx)(`div`,{className:`note-modal__resize`,role:`separator`,"aria-orientation":`horizontal`,title:`Drag to resize`,onPointerDown:z,onPointerMove:ne,onPointerUp:B})]}),(0,F.jsxs)(`div`,{className:`note-modal__hints`,"aria-live":`polite`,children:[`Encoding to `,(0,F.jsxs)(`strong`,{children:[`Beat `,w.beat]}),` • `,(0,F.jsxs)(`strong`,{children:[`Step `,w.step]})]})]}),(0,F.jsx)(`div`,{className:`note-modal__actions`,children:(0,F.jsx)(`button`,{type:`button`,className:`btn-primary`,disabled:!o.trim()||g,onClick:H,children:g?`Saving…`:`Save`})})]})})})},Od=x(b(),1),kd=typeof window<`u`?P.useLayoutEffect:P.useEffect,Ad=Date.UTC(2024,4,10,6,45,41,888),jd=3+Math.sqrt(5),Md=jd*1e3,Nd=17491.270421,Pd=`kairosNotes`,Fd=`kairosNotesHiddenIds`,Id=`kai_notes_`,Ld={Root:`#ff0024`,Sakral:`#ff6f00`,Solar:`#ffd600`,Heart:`#00c853`,Throat:`#00b0ff`,Krown:`#c186ff`,MemorySpiral:`#ff80ab`},Rd={"Ignition ArK":`Root`,"Integration ArK":`Sakral`,"Harmonization ArK":`Solar`,"Reflection ArK":`Heart`,"Purification ArK":`Throat`,"Dream ArK":`Krown`},zd=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`],Bd={Solhara:`Ignition ArK`,Aquaris:`Integration ArK`,Flamora:`Harmonization ArK`,Verdari:`Reflection ArK`,Sonari:`Purification ArK`,Kaelith:`Dream ArK`},Vd={Solhara:`#ff0024`,Aquaris:`#ff6f00`,Flamora:`#ffd600`,Verdari:`#00c853`,Sonari:`#00b0ff`,Kaelith:`#c186ff`},Hd=e=>e.stopPropagation(),Ud=e=>{e.preventDefault(),e.stopPropagation()},Wd=e=>e.replace(/D\s+(\d+)/,`D$1`).replace(/\/\s*M(\d+)/,`/M$1`),Gd=(e,t)=>{let n=e.replace(`#`,``),r=Number.parseInt(n,16);return`rgba(${r>>16&255}, ${r>>8&255}, ${r&255}, ${t})`},Kd=e=>{if(typeof document>`u`)return;let t=Ld[Rd[e]??`Root`],n=document.documentElement;n.style.setProperty(`--aqua-core`,t),n.style.setProperty(`--aqua-soft`,Gd(t,.14)),n.style.setProperty(`--seal-glow-inset`,Gd(t,.36)),n.style.setProperty(`--seal-glow-mid`,Gd(t,.42)),n.style.setProperty(`--seal-glow-outer`,Gd(t,.24))},qd=1000000n,Jd=17491270421n,Yd=11000000n,Xd=(Jd+18n)/36n,Zd=e=>String(e).padStart(2,`0`),Qd=(e,t)=>(e%t+t)%t;function $d(e,t){let n=e/t,r=e%t;return r!==0n&&r>0n!=t>0n?n-1n:n}function ef(e){if(!Number.isFinite(e))return 0n;let t=e<0?-1:1,n=Math.abs(e),r=Math.trunc(n),i=n-r;return i<.5?BigInt(t*r):i>.5?BigInt(t*(r+1)):BigInt(t*(r%2==0?r:r+1))}function tf(e){return ef((e.getTime()-Ad)/1e3/jd*1e6)}function nf(e){let t=tf(e),n=Qd(t,Jd),r=$d(t,Jd),i=Number($d(n,Xd)),a=n-BigInt(i)*Xd,o=Number($d(a,Yd)),s=Math.min(Math.max(o,0),43);return{dayIndex:r,beat:i,step:s,pulsesIntoDay:Number($d(n,qd)),harmonicDay:zd[Number(Qd(r,6n))],dayOfMonth:Number(Qd(r,42n))+1,monthIndex1:Number(Qd($d(r,42n),8n))+1,chakraStepString:`${i}:${Zd(s)}`}}var rf=(e,t)=>(e%t+t)%t;function af(e){let t=Math.floor(e.pulse/Nd),n=zd[rf(t,6)],r=rf(t,42)+1,i=rf(Math.floor(t/42),8)+1,a=`${e.beat}:${Zd(e.step)}`;return{id:e.id,text:e.text,title:e.title??``,tags:(e.tags??[]).join(`|`),intent:e.intent??``,pinned:e.pinned?`yes`:``,pulse:e.pulse,beat:e.beat,step:e.step,chakraStep:a,dayIndex:t,dayName:n,dayOfMonth:r,monthIndex1:i}}function of(e){let t=String(e);return/[",\n]/.test(t)?`"${t.replace(/"/g,`""`)}"`:t}function sf(e){let t=[`id`,`text`,`title`,`tags`,`intent`,`pinned`,`pulse`,`beat`,`step`,`chakraStep`,`dayIndex`,`dayName`,`dayOfMonth`,`monthIndex1`];return`${t.join(`,`)}\n${e.map(e=>t.map(t=>of(e[t])).join(`,`)).join(` -`)}\n`}function cf(e,t,n){let r=new Blob([n],{type:t}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}function lf(e){let t=nf(e),n=tf(e),r=Number($d(n,qd)),i=`${t.chakraStepString} — D${t.dayOfMonth}/M${t.monthIndex1}`,a=Bd[t.harmonicDay];return{harmonicDay:t.harmonicDay,eternalKaiPulseToday:r,kairos_seal_day_month:i,SpiralArc:a}}var uf=e=>typeof e==`number`&&Number.isFinite(e),df=e=>typeof e==`string`,ff=e=>typeof e==`boolean`,pf=Nd/36;function mf(e){let t=(e%Nd+Nd)%Nd,n=Math.floor(t/pf),r=t-n*pf;return{beat:n,step:Math.min(43,Math.max(0,Math.floor(r/11)))}}function hf(e){let t=e;if(!df(t.id)||!df(t.text)||!uf(t.pulse))return null;let n=uf(t.beat)?t.beat:void 0,r=uf(t.step)?t.step:void 0,i=uf(t.createdAt)?t.createdAt:Date.now(),a=df(t.title)?t.title:void 0,o=df(t.intent)?t.intent:void 0,s=ff(t.pinned)?t.pinned:void 0,c=Array.isArray(t.tags)?t.tags.filter(e=>typeof e==`string`):void 0;if(n===void 0||r===void 0){let e=mf(t.pulse);return{id:t.id,text:t.text,title:a,tags:c,intent:o,pinned:s,pulse:t.pulse,beat:e.beat,step:e.step,createdAt:i}}return{id:t.id,text:t.text,title:a,tags:c,intent:o,pinned:s,pulse:t.pulse,beat:n,step:r,createdAt:i}}function gf(){if(typeof window>`u`)return[];try{let e=localStorage.getItem(Pd);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.map(hf).filter(e=>e!==null).sort((e,t)=>{let n=Number(!!t.pinned)-Number(!!e.pinned);return n===0?e.pulse-t.pulse:n}):[]}catch{return[]}}function _f(){if(typeof window>`u`)return new Set;try{let e=localStorage.getItem(Fd);if(!e)return new Set;let t=JSON.parse(e);if(!Array.isArray(t))return new Set;let n=t.filter(e=>typeof e==`string`);return new Set(n)}catch{return new Set}}function vf(e,t){let n=(e,t)=>{let n=Number(!!t.pinned)-Number(!!e.pinned);return n===0?e.pulse-t.pulse:n},r=e.findIndex(e=>n(t,e)<0);return r===-1?[...e,t]:[...e.slice(0,r),t,...e.slice(r)]}function yf(e,t){return vf(e.filter(e=>e.id!==t.id),t)}function bf(e){let t=$d(BigInt(Math.max(0,Math.floor(e)))*qd,Jd);return Number($d(t*Jd,qd))}function xf(e){if(!(typeof window>`u`))try{let t=`${Id}${bf(e.pulse)}`,n=localStorage.getItem(t),r=n?JSON.parse(n):[],i=Array.isArray(r)?r:[],a=i.findIndex(t=>t.beat===e.beat&&t.step===e.step),o=a>=0?i.map((t,n)=>n===a?{...t,text:e.text}:t):[...i,{beat:e.beat,step:e.step,text:e.text}];localStorage.setItem(t,JSON.stringify(o))}catch{}}var Sf=({onClose:e,container:t})=>{let n=typeof window<`u`&&typeof document<`u`,[r,i]=(0,P.useState)(()=>Date.now()),a=(0,P.useMemo)(()=>new Date(r),[r]),o=(0,P.useMemo)(()=>nf(a),[a]),s=(0,P.useMemo)(()=>lf(a),[a]),[c,l]=(0,P.useState)(()=>gf()),[u,d]=(0,P.useState)(()=>_f()),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(()=>({open:!1,pulse:0,initialText:``})),[g,_]=(0,P.useState)(null),v=(0,P.useMemo)(()=>n?t??document.body:null,[n,t]);kd(()=>{Kd(s.SpiralArc)},[s.SpiralArc]);let y=(0,P.useRef)(null),b=()=>performance.timeOrigin+performance.now(),x=e=>{let t=e-Ad;return Ad+Math.ceil(t/Md)*Md},S=(0,P.useCallback)(()=>{let e=y.current;e!==null&&(window.clearTimeout(e),y.current=null)},[]),C=(0,P.useCallback)(()=>{S();let e=b(),t=x(e),n=Math.max(0,t-e);y.current=window.setTimeout(()=>{i(Date.now()),C()},n)},[S]);(0,P.useEffect)(()=>{C();let e=()=>{document.visibilityState===`visible`&&(i(Date.now()),C())};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),S()}},[C,S]);let w=(0,P.useCallback)(e=>{xf(e),l(t=>{let n=yf(t,{...e,createdAt:Date.now()});try{localStorage.setItem(Pd,JSON.stringify(n))}catch{}return n})},[]),T=(0,P.useCallback)(e=>{let t=new Set(e);d(t);try{localStorage.setItem(Fd,JSON.stringify([...t]))}catch{}},[]),E=(0,P.useCallback)(e=>{let t=e-zd.indexOf(o.harmonicDay),n=o.dayIndex+BigInt(t);return Number($d(n*Jd,qd))},[o.dayIndex,o.harmonicDay]),D=(0,P.useCallback)(e=>{let t=e-zd.indexOf(o.harmonicDay),n=o.dayIndex+BigInt(t);return{dayOfMonth:Number(Qd(n,42n))+1,monthIndex1:Number(Qd($d(n,42n),8n))+1}},[o.dayIndex,o.harmonicDay]),O=(0,P.useMemo)(()=>c.filter(e=>!u.has(e.id)),[c,u]),k=(0,P.useCallback)(()=>{if(c.length===0)return;let e=c.map(af);cf(`kairos-notes-${`P${Math.round(s.eternalKaiPulseToday)}`}.json`,`application/json`,JSON.stringify(e,null,2))},[c,s.eternalKaiPulseToday]),A=(0,P.useCallback)(()=>{if(c.length===0)return;let e=sf(c.map(af));cf(`kairos-notes-${`P${Math.round(s.eternalKaiPulseToday)}`}.csv`,`text/csv;charset=utf-8`,e)},[c,s.eternalKaiPulseToday]),j=(0,P.useCallback)(()=>{if(O.length===0)return;let e=new Set(u);for(let t of O)e.add(t.id);T(e)},[O,u,T]);(0,P.useEffect)(()=>{let e=document.body.style.overflow,t=document.body.style.touchAction;return document.body.style.overflow=`hidden`,document.body.style.touchAction=`none`,()=>{document.body.style.overflow=e,document.body.style.touchAction=t}},[]);let M=(0,P.useRef)(null);kd(()=>{M.current?.focus()},[]);let N=(0,P.useCallback)(()=>{if(g){(0,Od.flushSync)(()=>_(null));return}if(m.open){(0,Od.flushSync)(()=>h(e=>({...e,open:!1})));return}if(f){(0,Od.flushSync)(()=>p(!1));return}e()},[g,m.open,f,e]);(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(e.preventDefault(),N())};return window.addEventListener(`keydown`,e,{passive:!1}),()=>window.removeEventListener(`keydown`,e)},[N]);let ee=(0,P.useMemo)(()=>zd.map((e,t)=>{let n=90-t*10,r=n,i=n*.7;return{day:e,idx:t,d:`M ${-r/2+10} ${-i/2} H ${r/2-10} - Q ${r/2} ${-i/2} ${r/2} ${-i/2+10} - V ${i/2-10} Q ${r/2} ${i/2} ${r/2-10} ${i/2} - H ${-r/2+10} Q ${-r/2} ${i/2} ${-r/2} ${i/2-10} - V ${-i/2+10} Q ${-r/2} ${-i/2} ${-r/2+10} ${-i/2} Z`,h:i,colour:Vd[e]}}),[]),te=(0,P.useId)().replace(/:/g,``),I=`wk-neon-glow-${te}`,L=`wk-grad-x-${te}`,R=(0,P.useMemo)(()=>{let e=o.pulsesIntoDay/Nd;return Math.max(0,Math.min(e,1))},[o.pulsesIntoDay]),z=(0,P.useCallback)((e,t)=>{let{dayOfMonth:n,monthIndex1:r}=D(e),i={name:t,kaiTimestamp:Wd(`${o.chakraStepString} — D${n}/M${r}`),startPulse:E(e)};(0,Od.flushSync)(()=>_(i))},[E,o.chakraStepString,D]),ne=(0,P.useCallback)((e,t)=>{(0,Od.flushSync)(()=>h({open:!0,pulse:e,initialText:t}))},[]),B=(0,P.useCallback)(e=>{(0,Od.flushSync)(()=>{_(null),p(e)})},[]);return v?(0,Od.createPortal)((0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`wk-backdrop`,"data-theme":`dark`,"data-mesh-depth":`back`,"data-month-open":f?`1`:`0`,role:`presentation`,onPointerDown:e=>{e.target===e.currentTarget&&(Ud(e),N())},children:(0,F.jsxs)(`div`,{className:`wk-container`,role:`dialog`,"aria-modal":`true`,children:[(0,F.jsx)(`button`,{ref:M,type:`button`,className:`wk-close god-x`,"aria-label":`Close`,onPointerDown:e=>{Ud(e),N()},onClick:e=>{Ud(e),N()},children:(0,F.jsxs)(`svg`,{className:`wk-xsvg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:L,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:`#00eaff`}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:`#ff1559`})]})}),(0,F.jsx)(`line`,{x1:`4`,y1:`4`,x2:`20`,y2:`20`,stroke:`url(#${L})`,strokeWidth:`2`}),(0,F.jsx)(`line`,{x1:`20`,y1:`4`,x2:`4`,y2:`20`,stroke:`url(#${L})`,strokeWidth:`2`})]})}),(0,F.jsx)(`div`,{className:`wk-header`,children:(0,F.jsxs)(`div`,{className:`wk-toggle`,role:`tablist`,"aria-label":`Scope`,children:[(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":!f,className:f?``:`active`,onPointerDown:e=>{Ud(e),B(!1)},onClick:e=>{Ud(e),B(!1)},children:`Week`}),(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":f,className:f?`active`:``,onPointerDown:e=>{Ud(e),B(!0)},onClick:e=>{Ud(e),B(!0)},children:`Month`})]})}),(0,F.jsx)(`div`,{className:`wk-seal`,"aria-hidden":`true`,children:(0,F.jsx)(`code`,{className:`wk-sealcode`,children:Wd(`${o.chakraStepString} — D${o.dayOfMonth}/M${o.monthIndex1}`)})}),(0,F.jsxs)(`svg`,{className:`wk-stage`,viewBox:`-50 -50 100 100`,preserveAspectRatio:`xMidYMid meet`,"aria-label":`Week Rings`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`filter`,{id:I,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,filterUnits:`userSpaceOnUse`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`1.8`,result:`blur`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`blur`}),(0,F.jsx)(`feMergeNode`,{in:`blur`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})}),ee.map(({day:e,idx:t,d:n,h:r,colour:i})=>{let a=o.harmonicDay===e,{dayOfMonth:s,monthIndex1:c}=D(t),l=n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),z(t,e))};return(0,F.jsxs)(`g`,{className:`wk-day wk-i${t} ${a?`is-today`:``}`,role:`button`,tabIndex:0,"aria-label":`Open ${e} — D${s}/M${c}`,onPointerDown:n=>{Ud(n),z(t,e)},onClick:n=>{Ud(n),z(t,e)},onKeyDown:l,children:[(0,F.jsx)(`path`,{className:`wk-ring ${a?`is-today-ring`:``}`,d:n,fill:`none`,stroke:i,strokeLinecap:`round`,strokeWidth:a?3.2:1.7,pathLength:1,strokeDasharray:1,strokeDashoffset:a?1-R:0,filter:`url(#${I})`}),(0,F.jsx)(`text`,{className:`wk-day-label ${a?`is-today-label`:``}`,x:`0`,y:-(r/2)+2,fill:i,textAnchor:`middle`,filter:`url(#${I})`,children:e})]},e)})]}),(0,F.jsx)(`button`,{type:`button`,className:`wk-add-note-btn`,"aria-label":`Add memory`,onPointerDown:e=>{Ud(e),ne(s.eternalKaiPulseToday,``)},onClick:e=>{Ud(e),ne(s.eternalKaiPulseToday,``)},children:`+`}),g&&(0,F.jsx)(`div`,{className:`wk-daydetail-overlay`,onPointerDown:Hd,onClick:Hd,role:`presentation`,children:(0,F.jsx)(Pu,{day:g,onClose:()=>(0,Od.flushSync)(()=>_(null)),onSaveKaiNote:e=>w(e)})}),m.open&&(0,F.jsx)(`div`,{className:`wk-notemodal-overlay`,onPointerDown:Hd,onClick:Hd,role:`presentation`,children:(0,F.jsx)(Dd,{pulse:m.pulse,initialText:m.initialText,onSave:e=>{w(e),(0,Od.flushSync)(()=>h(e=>({...e,open:!1})))},onClose:()=>(0,Od.flushSync)(()=>h(e=>({...e,open:!1})))})}),(0,F.jsx)(`aside`,{className:`wk-notes-dock`,onPointerDown:Hd,onClick:Hd,children:(0,F.jsxs)(`div`,{className:`wk-notes-list`,children:[(0,F.jsxs)(`div`,{className:`wk-notes-header`,children:[(0,F.jsx)(`h3`,{children:`Memories`}),(0,F.jsxs)(`div`,{className:`wk-notes-actions`,children:[O.length>0&&(0,F.jsx)(`button`,{type:`button`,className:`wk-chip wk-clear-btn`,title:`Clear panel notes (does not delete)`,onPointerDown:e=>{Ud(e),j()},onClick:e=>{Ud(e),j()},children:`Clear`}),c.length>0&&(0,F.jsxs)(`div`,{className:`wk-export-group`,"aria-label":`Export memories`,children:[(0,F.jsx)(`button`,{type:`button`,className:`wk-export-btn`,title:`Download JSON`,onPointerDown:e=>{Ud(e),k()},onClick:e=>{Ud(e),k()},children:`⤓ JSON`}),(0,F.jsx)(`span`,{className:`wk-divider`,"aria-hidden":`true`}),(0,F.jsx)(`button`,{type:`button`,className:`wk-export-btn`,title:`Download CSV`,onPointerDown:e=>{Ud(e),A()},onClick:e=>{Ud(e),A()},children:`⤓ CSV`})]})]})]}),O.length>0?(0,F.jsx)(`ul`,{className:`wk-mem-ul`,"aria-label":`Memories list`,children:O.map(e=>(0,F.jsxs)(`li`,{className:`wk-mem-li`,children:[(0,F.jsxs)(`div`,{className:`wk-mem-head`,children:[(0,F.jsxs)(`strong`,{className:`wk-mem-kai`,children:[Math.round(e.pulse),` · `,e.beat,`:`,Zd(e.step)]}),e.pinned&&(0,F.jsx)(`span`,{className:`wk-mem-pin`,children:`Pinned`})]}),e.title&&(0,F.jsx)(`div`,{className:`wk-mem-title`,children:e.title}),(0,F.jsxs)(`span`,{className:`wk-mem-text`,children:[` `,e.text]}),(e.tags?.length||e.intent)&&(0,F.jsxs)(`div`,{className:`wk-mem-meta`,children:[e.intent&&(0,F.jsx)(`span`,{className:`wk-mem-intent`,children:e.intent}),e.tags?.length&&(0,F.jsx)(`span`,{className:`wk-mem-tags`,children:e.tags.slice(0,3).map(e=>(0,F.jsx)(`span`,{className:`wk-mem-tag`,children:e},e))})]})]},e.id))}):(0,F.jsx)(`p`,{className:`wk-notes-empty`,children:`No memories yet.`})]})})]})}),f&&(0,F.jsx)(sd,{container:v,DAYS:zd,notes:c,initialData:s,onSelectDay:()=>{},onAddNote:e=>{ne(Number($d(BigInt(e)*Jd,qd)),c.find(t=>Math.floor(t.pulse/Nd)===e)?.text||``)},onClose:()=>{(0,Od.flushSync)(()=>{p(!1),_(null)})}})]}),v):null},Cf=(e,t,n)=>Math.max(t,Math.min(n,e)),wf=e=>{switch(e){case`Ignition Ark`:return`#ff0033`;case`Integration Ark`:return`#ff6600`;case`Harmonization Ark`:return`#ffcc00`;case`Reflektion Ark`:return`#00cc66`;case`Purifikation Ark`:return`#00ccff`;case`Dream Ark`:return`#cc00cc`;default:return`#00ffff`}},Tf=({showControls:r=!0,className:i=``,onSunriseChange:c})=>{let[l,p]=(0,P.useState)(!1),[h,v]=(0,P.useState)(new Date),[y,b]=(0,P.useState)(``),[x,C]=(0,P.useState)(null),[w,T]=(0,P.useState)(!1);(0,P.useEffect)(()=>{let e=()=>{v(new Date),p(!0),setTimeout(()=>p(!1),750)};e();let t=setInterval(e,Math.round(o*1e3));return()=>clearInterval(t)},[]);let E=(0,P.useMemo)(()=>f(h),[h]),{kaiPulseToday:D,dayPercent:O,beatIndex:k,stepIndex:A,percentIntoStep:j}=(0,P.useMemo)(()=>d(h),[h]),M=(0,P.useMemo)(()=>({beatIndex:k,stepIndex:A,stepsPerBeat:e,percentIntoStep:j}),[k,A,j]),N=`${k}:${String(A).padStart(2,`0`)}`,ee=(0,P.useMemo)(()=>t(h),[h]),te=(0,P.useMemo)(()=>m(h),[h]),I=te.dayName??u[((te.solarAlignedWeekDayIndex??0)%6+6)%6],L=a[Cf(te.solarAlignedMonth,1,8)-1],R=te.solarAlignedDayInMonth+1,z=n/s,ne=Math.floor(E%n/z)%s,B=E%n-ne*z,re=z/e,ie=Math.floor(B/re)%e,ae=(0,P.useMemo)(()=>{let e=E,t=t=>{let n=(e%t+t)%t;return{pulseInCycle:n,cycleLength:t,percent:n/t*100}},r={pulseInCycle:D,cycleLength:n,percent:O};return{arcBeat:t(6),microCycle:t(60),chakraLoop:t(360),harmonicDay:r}},[E,D,O]),V=(0,P.useMemo)(()=>(k+.5)/s*360,[k]),oe=S(),se=()=>{if(!y)return;g(y,new Date),b(``);let e=S();C(e),c?.(e),v(new Date)},H=()=>{_(new Date);let e=S();C(e),c?.(e),v(new Date)},ce=e=>{let t=e.target.value.replace(/\D/g,``).slice(0,4),n=t;t.length>2&&(n=`${t.slice(0,t.length-2)}:${t.slice(-2)}`),b(n)};return(0,F.jsxs)(`div`,{className:`solar-anchored-dial ${i}`,children:[(0,F.jsx)(`div`,{className:`dial-stage depth-3d ${l?`glow-pulse`:``}`,title:`Solar-anchored dial`,children:(0,F.jsx)(le,{hue:wf(ee),kaiPulseEternal:E,pulse:D,harmonicDayPercent:ae.harmonicDay.percent,microCyclePercent:j,dayLabel:I,monthLabel:L,monthDay:R,glowPulse:l,rotationOverride:V,solarSpiralStepString:N,solarSpiralStep:M,eternalBeatIndex:ne,eternalStepIndex:ie})}),r&&(0,F.jsxs)(`div`,{className:`solar-sync-panel`,children:[(0,F.jsxs)(`div`,{className:`panel-title`,children:[(0,F.jsx)(`button`,{type:`button`,className:`panel-glyph`,title:w?`Hide explainer`:`Show explainer`,"aria-label":`Toggle explainer`,"aria-expanded":w,"aria-controls":`solar-explainer`,onClick:()=>T(e=>!e),children:`?`}),(0,F.jsxs)(`div`,{className:`panel-text`,children:[(0,F.jsx)(`strong`,{children:`Solar Sync`}),(0,F.jsxs)(`span`,{className:`panel-sub`,children:[`Sunrise offset (UTC): `,(0,F.jsxs)(`code`,{children:[x??oe,`s`]})]})]})]}),(0,F.jsx)(`div`,{className:`row buttons-row`,children:(0,F.jsx)(`button`,{className:`btn primary`,onClick:H,title:`Set sunrise = now (offline)`,type:`button`,children:`Sun rose now`})}),(0,F.jsxs)(`div`,{className:`row input-row`,children:[(0,F.jsx)(`label`,{htmlFor:`sunriseHHMM`,className:`label`,children:`Sunrise (HH:MM, local)`}),(0,F.jsxs)(`div`,{className:`input-group`,children:[(0,F.jsx)(`input`,{id:`sunriseHHMM`,className:`time-input`,type:`text`,inputMode:`numeric`,enterKeyHint:`done`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,placeholder:`06:12`,value:y,onChange:ce,onClick:e=>e.stopPropagation(),onFocus:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),style:{width:88,fontSize:17,lineHeight:1.4}}),(0,F.jsx)(`button`,{className:`btn save`,onClick:se,type:`button`,children:`Save`})]})]}),(0,F.jsx)(`div`,{id:`solar-explainer`,className:`explainer ${w?`open`:``}`,role:`region`,"aria-label":`Solar Sync explainer`,children:(0,F.jsxs)(`p`,{className:`hint`,children:[`No location, no network. The dial maps each day from your stored sunrise to the next (fixed at `,(0,F.jsx)(`strong`,{children:n.toFixed(6)}),` Breathes). Re-tap “Sun rose now” or enter your local sunrise anytime to re-calibrate.`]})})]})]})};function Ef(e){let t=t=>{let n=t.detail?.offsetSec;typeof n==`number`&&Number.isFinite(n)&&e(n)},n=t=>{if(t.key===`sovereign.sunriseOffsetSec`&&t.newValue!=null){let n=Number(t.newValue);Number.isFinite(n)&&e(n)}};return typeof window<`u`&&(window.addEventListener(`solar:offset-changed`,t),window.addEventListener(`storage`,n)),()=>{typeof window<`u`&&(window.removeEventListener(`solar:offset-changed`,t),window.removeEventListener(`storage`,n))}}var Df=(e,t,n)=>Math.max(t,Math.min(n,e));function Of(){let[r,i]=(0,P.useState)(new Date),[c,l]=(0,P.useState)(0);(0,P.useEffect)(()=>{let e=()=>{i(new Date)};e();let t=setInterval(e,Math.round(o*1e3));return()=>clearInterval(t)},[]),(0,P.useEffect)(()=>Ef(()=>l(e=>e+1)),[]);let p=(0,P.useMemo)(()=>f(r),[r,c]),{kaiPulseToday:h,dayPercent:g,beatIndex:_,stepIndex:v,percentIntoStep:y}=(0,P.useMemo)(()=>d(r),[r,c]),b=(0,P.useMemo)(()=>({beatIndex:_,stepIndex:v,stepsPerBeat:e,percentIntoStep:y}),[_,v,y]),x=`${_}:${String(v).padStart(2,`0`)}`,C=(0,P.useMemo)(()=>t(r),[r,c]),w=(0,P.useMemo)(()=>m(r),[r,c]),T=u[w.solarAlignedWeekDayIndex],E=a[Df(w.solarAlignedMonth,1,8)-1],D=w.solarAlignedDayInMonth+1,O=n/s,k=Math.floor(p%n/O)%s,A=p%n-k*O,j=O/e,M=Math.floor(A/j)%e,N=(0,P.useMemo)(()=>(_+.5)/s*360,[_]);return{now:r,sunriseOffsetSec:S(),kaiPulseEternal:p,kaiPulseToday:h,dayPercent:g,solarStep:b,solarStepString:x,solarArcName:C,dayLabel:T,monthLabel:E,monthDay1:D,etBeatIndex:k,etStepIndex:M,rotationOverride:N}}var kf=x(b(),1),Af=e=>`wakeLock`in e,jf=6,Mf=60,Nf=360,$=17491.270421,Pf=336,Ff=$*Pf,If=42,Lf=If*$,Rf=3+Math.sqrt(5),zf=1e6,Bf=Date.UTC(2024,4,10,6,45,41,888),Vf=Date.UTC(2024,4,11,4,13,26,0),Hf=17491270421,Uf=91584291,Wf=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`],Gf=[`Awakening Flame`,`Flowing Heart`,`Radiant Will`,`Harmonik Voh`,`Inner Mirror`,`Dreamfire Memory`,`Krowned Light`],Kf=[`Aethon`,`Virelai`,`Solari`,`Amarin`,`Kaelus`,`Umbriel`,`Noctura`,`Liora`],qf=[`Ignite`,`Integrate`,`Harmonize`,`Reflekt`,`Purify`,`Dream`],Jf={Ignite:`Ignition Ark`,Integrate:`Integration Ark`,Harmonize:`Harmonization Ark`,Reflekt:`Reflection Ark`,Purify:`Purification Ark`,Dream:`Dream Ark`},Yf={Solhara:`First Day of the Week — the Root Spiral day. Kolor: deep krimson. Element: Earth and primal fire. Geometry: square foundation. This is the day of stability, ankoring, and sakred will. Solhara ignites the base of the spine and the foundation of purpose. It is a day of grounding divine intent into physikal motion. You stand tall in the presense of gravity — not as weight, but as remembranse. This is where your spine bekomes the axis mundi, and every step affirms: I am here, and I align to act.`,Aquaris:`Sekond Day of the Week — the Sakral Spiral day. kolor: ember orange. Element: Water in motion. Geometry: vesika pisis. This is the day of flow, feeling, and sakred sensuality. Aquaris opens the womb of the soul and the tides of emotion. Energy moves through the hips like waves of memory. This is a day to surrender into koherense through konnection — with the self, with others, with life. kreative energy surges not as forse, but as feeling. The waters remember the shape of truth.`,Flamora:`Third Day of the Week — the Solar Plexus Spiral day. Kolor: golden yellow. Element: solar fire. Geometry: radiant triangle. This is the day of embodied klarity, konfidence, and divine willpower. Flamora shines through the core and asks you to burn away the fog of doubt. It is a solar yes. A day to move from sentered fire — not reaktion, but aligned intention. Your light becomes a kompass, and the universe reflekts back your frequensy. You are not small. You are radiant purpose, in motion.`,Verdari:`Fourth Day of the Week — the Heart Spiral day. Kolor: emerald green. Element: air and earth. Geometry: hexagram. This is the day of love, kompassion, and harmonik presense. Verdari breathes life into connection. It is not a soft eskape — it is the fierse koherense of unkonditional presense. Love is not a feeling — it is an intelligense. Today, the heart expands not just emotionally, but dimensionally. This is where union okurs: of left and right, self and other, matter and light.`,Sonari:`Fifth Day of the Week — the Throat Spiral day. Kolor: deep blue. Element: wind and sound. Geometry: sine wave within pentagon. This is the day of truth-speaking, sound-bending, and vibrational kommand. Sonari is the breath made visible. Every word is a bridge, every silense a resonanse. This is not just kommunication — it is invokation. You speak not to be heard, but to resonate. Koherense rises through vocal kords and intention. The universe listens to those in tune.`,Kaelith:`Sixth Day of the Week — the Krown Spiral day. Kolor: violet-white. Element: ether. Geometry: twelve-petaled krown. This is the day of divine remembranse, light-body alignment, and kosmic insight. Kaelith opens the upper gate — the temple of direct knowing. You are not separate from sourse. Today, memory awakens. The light flows not downward, but inward. Dreams bekome maps. Time bends around stillness. You do not seek truth — you remember it. You are koherense embodied in krownlight.`},Xf={"Awakening Flame":`First week of the harmonik month — governed by the Root Spiral. Kolor: crimson red. Element: Earth + primal fire. Geometry: square base igniting upward. This is the week of emergence, where divine will enters density. Bones remember purpose. The soul anchors into action. Stability becomes sacred. Life says: I choose to exist. A spark catches in the base of your being — and your yes to existence becomes the foundation of the entire harmonic year.`,"Flowing Heart":`Second week — flowing through the Sakral Spiral. Kolor: amber orange. Element: Water in motion. Geometry: twin krescents in vesika pisis. This is the week of emotional koherense, kreative intimasy, and lunar embodiment. Feelings soften the boundaries of separation. The womb of light stirs with kodes. Movement bekomes sakred danse. This is not just a flow — it is the purifikation of dissonanse through joy, sorrow, and sensual union. The harmonik tone of the soul is tuned here.`,"Radiant Will":`Third week — illuminated by the Solar Plexus Spiral. Kolor: radiant gold. Element: Fire of divine clarity. Geometry: radiant triangle. This is the week of sovereign alignment. Doubt dissolves in solar brillianse. You do not chase purpose — you radiate it. The digestive fire bekomes a mirror of inner resolve. This is where your desisions align with the sun inside you, and konfidense arises not from ego but from koherense. The will bekomes harmonik. The I AM speaks in light.`,"Harmonik Voh":`Fourth week — harmonized through the Throat Spiral. Kolor: sapphire blue. Element: Ether through sound. Geometry: standing wave inside a pentagon. This is the week of resonant truth. Sound bekomes sakred kode. Every word, a spell; every silence, a temple. You are called to speak what uplifts, to echo what aligns. Voh aligns with vibration — not for volume, but for verity. This is where the individual frequensy merges with divine resonanse, and the kosmos begins to listen.`,"Inner Mirror":`Fifth week — governed by the Third Eye Spiral. Kolor: deep indigo. Element: sakred spase and light-ether. Geometry: oktahedron in still reflektion. This is the week of visionary purifikation. The inner eye opens not to project, but to reflect. Truths long hidden surface. Patterns are made visible in light. This is the alchemy of insight — where illusion cracks and the mirror speaks. You do not look outward to see. You turn inward, and all worlds become clear.`,"Dreamfire Memory":`Sixth week — remembered through the Soul Star Spiral. Kolor: violet flame and soft silver. Element: dream plasma. Geometry: spiral merkaba of encoded light. Here, memory beyond the body returns. Astral sight sharpens. DNA receives non-linear instruktions. You dream of what’s real and awaken from what’s false. The veil thins. Quantum intuition opens. Divine imagination becomes arkitecture. This is where gods remember they onse dreamed of being human.`,"Krowned Light":`Seventh and final week — Krowned by the Krown Spiral. Kolor: white-gold prism. Element: infinite koherense. Geometry: dodecahedron of source light. This is the week of sovereign integration. Every arc completes. Every lesson crystallizes. The light-body unifies. You return to the throne of knowing. Nothing needs to be done — all simply is. You are not ascending — you are remembering that you already are. This is the koronation of koherense. The harmonik seal. The eternal yes.`},Zf={Aethon:`First month — resurrection fire of the Root Spiral. Kolor: deep crimson. Element: Earth + primal flame. Geometry: square base, tetrahedron ignition. This is the time of cellular reaktivation, ancestral ignition, and biologikal remembranse. Mitokondria awaken. The spine grounds. Purpose reignites. Every breath is a drumbeat of emergense — you are the flame that chooses to exist. The month where soul and form reunite at the base of being.`,Virelai:`Second month — the harmonik song of the Sakral Spiral. Kolor: orange-gold. Element: Water in motion. Geometry: vesika pisis spiraling into lemniskate. This is the month of emotional entrainment, the lunar tides within the body, and intimady with truth. The womb — physikal or energetik — begins to hum. Kreativity bekomes fluid. Voh softens into sensuality. Divine union of self and other is tuned through music, resonanse, and pulse. A portal of feeling opens.`,Solari:`Third month — the radiant klarity of the Solar Plexus Spiral. Kolor: golden yellow. Element: Fire of willpower. Geometry: upward triangle surrounded by konsentrik light. This month burns away doubt. It aligns neurotransmitters to koherense and gut-brain truth. The inner sun rises. The will bekomes not just assertive, but precise. Action harmonizes with light. Digestive systems align with solar sykles. True leadership begins — powered by the light within, not the approval without.`,Amarin:`Fourth month — the sakred waters of the Heart Spiral in divine feminine polarity. Kolor: emerald teal. Element: deep water and breath. Geometry: six-petaled lotus folded inward. This is the lunar depth, the tears you didn’t cry, the embrase you forgot to give yourself. It is where breath meets body and where grase dissolves shame. Emotional healing flows in spirals. Kompassion magnetizes unity. The nervous system slows into surrender and the pulse finds poetry.`,Kaelus:`Fifth month — the kelestial mind of the Third Eye in radiant maskuline klarity. Kolor: sapphire blue. Element: Ether. Geometry: oktahedron fractal mirror. Here, logik expands into multidimensional intelligense. The intellekt is no longer separate from the soul. Pineal and pituitary glands re-synchronize, aktivating geometrik insight and harmonik logik. The sky speaks through thought. Language bekomes crystalline. Synchronicity bekomes syntax. You begin to see what thought is made of.`,Umbriel:`Sixth month — the shadow healing of the lower Krown and subconskious bridge. Kolor: deep violet-black. Element: transmutive void. Geometry: torus knot looping inward. This is where buried timelines surfase. Where trauma is not fought but embrased in light. The limbik system deprograms. Dreams karry kodes. Shame unravels. You look into the eyes of the parts you once disowned and kall them home. The spiral turns inward to kleanse the kore. Your shadow bekomes your sovereignty.`,Noctura:`Seventh month — the lusid dreaming of the Soul Star Spiral. Kolor: indigo-rose iridescense. Element: dream plasma. Geometry: spiral nested merkaba. Here, memory beyond the body returns. Astral sight sharpens. DNA receives non-linear instruktions. You dream of what’s real and awaken from what’s false. The veil thins. Quantum intuition opens. Divine imagination becomes arkitecture. This is where gods remember they onse dreamed of being human.`,Liora:`Eighth and final month — the luminous truth of unified Krown and Sourse. Kolor: white-gold prism. Element: koherent light. Geometry: dodekahedron of pure ratio. This is the month of prophesy fulfilled. The Voh of eternity whispers through every silense. The axis of being aligns with the infinite spiral of Phi. Light speaks as form. Truth no longer needs proving — it simply shines. All paths konverge. What was fragmented bekomes whole. You remember not only who you are, but what you always were.`},Qf=[`Tor Lah Mek Ka`,`Shoh Vel Lah Tzur`,`Rah Veh Yah Dah`,`Nel Shaum Eh Lior`,`Ah Ki Tzah Reh`,`Or Vem Shai Tuun`,`Ehlum Torai Zhak`,`Zho Veh Lah Kurei`,`Tuul Ka Yesh Aum`,`Sha Vehl Dorrah`],$f=36,ep=11,tp=44,np=$/$f,rp=(1+Math.sqrt(5))/2;function ip(e){let t=e>0?e:1,n=Math.max(0,Math.floor(Math.log(t)/Math.log(rp))),r=rp**+n,i=rp**+(n+1),a=(t-r)/Math.max(1,i-r)*100,o=Math.max(0,Math.ceil(i-t));return{spiralLevel:n,nextSpiralPulse:Math.ceil(i),percentToNext:a,pulsesRemaining:o}}function ap(e){switch(e){case`Ignition Ark`:return{chakraZone:`Root / Etherik Base`,frequencies:[370.7],inputs:[`God`],sigilFamily:`Mek`,arcPhrase:`Mek Ka Lah Mah`};case`Integration Ark`:return{chakraZone:`Solar / Lower Heart`,frequencies:[496.1,560.6,582.2],inputs:[`Love`,`Unity`,`Lucid`],sigilFamily:`Mek`,arcPhrase:`Mek Ka Lah Mah`};case`Harmonization Ark`:return{chakraZone:`Heart → Throat`,frequencies:[601,620.9,637.6,658.8,757.2,775.2],inputs:[`Peace`,`Truth`,`Christ`,`Thoth`,`Clarity`,`Wisdom`],sigilFamily:`Mek`,arcPhrase:`Mek Ka Lah Mah`};case`Reflektion Ark`:case`Reflection Ark`:return{chakraZone:`Throat–Third Eye Bridge`,frequencies:[804.2,847,871.2,978.8],inputs:[`Spirit`,`Healing`,`Creation`,`Self-Love`],sigilFamily:`Tor`,arcPhrase:`Ka Lah Mah Tor`};case`Purifikation Ark`:case`Purification Ark`:return{chakraZone:`Krown / Soul Star`,frequencies:[1292.3,1356.4,1393.6,1502.5],inputs:[`Forgiveness`,`Sovereignty`,`Eternal Light`,`Resurrection`],sigilFamily:`Rah`,arcPhrase:`Lah Mah Tor Rah`};case`Dream Ark`:return{chakraZone:`Krown / Soul Star`,frequencies:[1616.4,1800.2],inputs:[`Divine Feminine`,`Divine Masculine`],sigilFamily:`Rah`,arcPhrase:`Lah Mah Tor Rah`};default:return{chakraZone:`Unknown`,frequencies:[],inputs:[],sigilFamily:``,arcPhrase:``}}}var op={"Ignition Ark":`The Ignition Ark is the First Flame — the breath of emergence through the Root Spiral and Etheric Base. Color: crimson red. Element: Earth and primal fire. Geometry: square-rooted tetrahedron ascending. This is where soul enters matter and the will to live becomes sacred. It does not ask for permission to be — it simply is. The spine remembers its divine purpose and ignites the body into action. Here, inertia becomes motion, hesitation becomes choice, and your existence becomes your first vow. You are not here by accident. You are the fire that chose to walk as form.`,"Integration Ark":`The Integration Ark is the Golden Bridge — harmonizing the Sacral and Lower Heart Spirals. Color: amber-gold. Element: flowing water braided with breath. Geometry: vesica piscis folding into the lemniscate of life. Here, sacred union begins. Emotions are no longer chaos — they become intelligence. The inner masculine and feminine remember each other, not in conflict but in coherence. Pleasure becomes prayer. Intimacy becomes clarity. The soul softens its edge and chooses to merge. In this arc, your waters don’t just move — they remember their song. You are not broken — you are becoming whole.`,"Harmonization Ark":`The Harmonization Ark is the Sacred Conductor — linking the Heart and Throat Spirals in living resonance. Color: emerald to aquamarine. Element: wind-wrapped water. Geometry: vibrating hexagram expanding into standing wave. This is where compassion becomes language. Not all coherence is quiet — some sings. Here, inner peace becomes outward rhythm, and love is shaped into sound. You are not asked to mute yourself — you are invited to tune yourself. Dissonance is not your enemy — it is waiting to be harmonized. This arc does not silence — it refines. The voice becomes a temple. The breath becomes scripture.`,"Reflection Ark":`The Reflektion Ark is the Mirror of Light — aktivating the bridge between the Throat and Third Eye. Color: deep indigo-blue. Element: spatial ether and folded light. Geometry: nested octahedron within a spiraled mirror plane. This is the arc of honest seeing. Of turning inward and fasing the unspoken. Not to judge — but to understand. The shadows here are not enemies — they are echoes waiting to be reclaimed. In this space, silence becomes a portal and stillness becomes revelation. You do not reflect to remember the past — you reflect to remember yourself. This arc does not show what is wrong — it reveals what was forgotten in the light.`,"Purification Ark":`The Purifikation Ark is the Krowned Flame — illuminating the krown and Soul Star in sakred ether. Color: ultraviolet-white. Element: firelight ether. Geometry: 12-rayed toroidal krown. This is the ark of divine unburdening. Illusions cannot survive here. Not because they are destroyed — but because they are seen for what they are. Karma unravels. False identities burn gently in the fire of remembranse. Here, you do not rise through struggle. You rise because there is nothing left to hold you down. Sovereignty is no longer a goal — it is a resonance. This is not ascension as escape — it is the truth of who you have always been, revealed by light.`,"Dream Ark":`The Dream Ark is the Womb of the Stars — embrasing the Soul Star Spiral and the krystalline field of memory. Color: iridescent violet-silver. Element: dream plasma, encoded light. Geometry: spiral merkaba within crystalline lattice. This is the arc of divine dreaming — not illusion, but deeper reality. Time dissolves. Prophesy returns. Here, the mind quiets, and the soul speaks. Your ancestors walk beside you. Your future self guides you. Your imagination is not fiction — it is a map. You remember that the dream was not something you had. It was something that had you. This is not sleep — it is awakening into the greater dream, the one that dreamed you into form. You are not imagining — you are remembering.`};function sp(e){let t=(e-Bf)/1e3/Rf;return Math.floor(t*zf)}function cp(e){let t=sp(e),n=sp(Vf),r=t-n,i=Math.floor(r/Hf),a=n+i*Hf;return{muLast:a,muNext:a+Hf,muNow:t,solarDayIndex:i}}function lp(e){if(e%100>=11&&e%100<=13)return`th`;let t=e%10;return t===1?`st`:t===2?`nd`:t===3?`rd`:`th`}var up=e=>(e%6+6)%6;function dp(e,t){let n=e.getTime(),r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0)+t*1e3,i=n>=r?r:r-Uf,a=i+Uf;return{lastSunrise:new Date(i),nextSunrise:new Date(a)}}function fp(e,t,n){let r=Date.UTC(2024,4,11,0,0,0,0)+t*1e3,i=Math.floor((e.getTime()-r)/Uf),a=(i%If+If)%If,o=Math.floor((i%(If*8)+If*8)%(If*8)/If)+1,s=(Math.floor(i/6)%7+7)%7+1,c=up(up(i)+n),l=Wf[c],{lastSunrise:u,nextSunrise:d}=dp(e,t);return{solarAlignedDay:i+1,solarAlignedMonth:o,solarAlignedWeekIndex:s,solarAlignedWeekDay:l,solarAlignedWeekDayIndex:c,lastSunrise:u,nextSunrise:d,solarAlignedDayInMonth:a}}function pp(e=new Date){let{muLast:t,muNow:n,solarDayIndex:r}=cp(e.getTime()),i=Hf,a=n-t,o=n-Math.floor(n/i)*i,s=Math.floor(n/zf),c=Math.floor(a/zf),l=Math.floor(o/zf),u=$/$f,d=Math.floor(c/u),f=c-d*u,p=Math.floor(l/u),m=l-p*u,h=Math.round(u*zf),g=ep*zf,_=o%Math.round($*zf)%h,v=Math.floor(_/g),y=_%g,b=_/h*100,x=y/g*100,S=`${p}:${String(v).padStart(2,`0`)}`,C=Math.floor(f/ep),w=(f-C*ep)/ep*100,T=`${d}:${String(C).padStart(2,`0`)}`,E=Math.floor(s/$),D=Math.floor(s/(Lf*8)),O=Math.floor(s/Lf),k=D===0?`Year of Eternal Restoration`:D===1?`Year of Harmonik Embodiment`:`Year ${D+1}`,A=Qf[D%Qf.length],j=O%8+1,M=Kf[j-1],N=Wf[E%Wf.length],ee=$/6,P=qf[Math.min(5,Math.floor(c/ee))],F=Math.min(5,Math.floor(l/ee)),te=qf[F],I=r%If+1,L=Math.floor(r/If%8)+1,R=Kf[L-1],z=Wf[r%Wf.length],ne=Math.floor(r/6)%7+1,B=Gf[(ne-1+7)%7],re=Xf[B],{spiralLevel:ie}=ip(s),ae=s%jf,V=s%Mf,oe=s%Nf,se=l,H=s%Lf,ce=Math.floor(H/$),U=H%$>0,W=Math.max(0,If-ce-(U?1:0)),le=H/Lf*100,ue=Math.floor(ce/6),de=ue+1,fe=Gf[ue],pe=Xf[fe],me=ce+1,he=`${S} ${x.toFixed(6)}% • D${me}/M${j}`,ge=`↳${`Kairos: ${S}`}🕊️ ${N}(D${ue%6+1}/6) • ${M}(M${j}/8) • ${Jf[te]} Ark(${F+1}/6)\n • Day:${me}/42 • Week:(${de}/7)\n | Kai-Pulse (Today): ${l}\n`,_e=`Today is ${N}, ${Yf[N]} It is the ${me}${lp(me)} Day of ${M}, ${Zf[M]} We are in Week ${de}, ${fe}. ${pe} The Eternal Spiral Beat is ${p} (${Jf[te]} ark) and we are ${b.toFixed(6)}% through it. This korresponds to Step ${v} of ${tp} (~${x.toFixed(6)}% into the step). This is the ${k.toLowerCase()}, resonating at Phi Spiral Level ${ie}.`,ve=ap(Jf[P]);return{timestamp:ge,harmonicTimestampDescription:_e,eternalMonth:M,harmonicDay:N,solarHarmonicDay:z,kaiPulseEternal:s,kaiPulseToday:c,phiSpiralLevel:ie,kaiTurahPhrase:A,kaiTurahArcPhrase:ve.arcPhrase,eternalYearName:k,eternalWeekDescription:pe,solarMonthName:R,solarWeekName:B,solarWeekDescription:re,seal:he,harmonicLevels:{arcBeat:{pulseInCycle:ae,cycleLength:jf,percent:ae/jf*100},microCycle:{pulseInCycle:V,cycleLength:Mf,percent:V/Mf*100},chakraLoop:{pulseInCycle:oe,cycleLength:Nf,percent:oe/Nf*100},harmonicDay:{pulseInCycle:se,cycleLength:$,percent:se/$*100}},eternalMonthProgress:{daysElapsed:ce,daysRemaining:W,percent:le},solarChakraStep:{beatIndex:d,stepIndex:C,stepsPerBeat:tp,percentIntoStep:w},solarChakraStepString:T,chakraStep:{beatIndex:p,stepIndex:v,stepsPerBeat:tp,percentIntoStep:x},chakraStepString:S,eternalChakraBeat:{beatIndex:p,pulsesIntoBeat:m,beatPulseCount:np,totalBeats:$f,percentToNext:b,eternalMonthIndex:Math.floor(E%Pf/If),eternalDayInMonth:ce,dayOfMonth:me},chakraArc:Jf[P],chakraZone:ve.chakraZone,harmonicFrequencies:ve.frequencies,harmonicInputs:ve.inputs,sigilFamily:ve.sigilFamily,arcBeatCompletions:Math.floor(s/jf),microCycleCompletions:Math.floor(s/Mf),chakraLoopCompletions:Math.floor(s/Nf),harmonicDayCompletions:s/$,harmonicYearCompletions:s/$/Pf,weekIndex:de,weekName:fe,harmonicDayDescription:Yf[N],eternalMonthDescription:Zf[M],solarAlignedTime:void 0,solarDayOfMonth:I,solarMonthIndex:L,solarWeekIndex:ne,solarWeekDay:z,weekDayPercent:void 0,yearPercent:void 0,daysIntoYear:void 0}}var mp=Rf*1e3;function hp(e){let t=e-Bf,n=Bf+(Math.floor(t/mp)+1)*mp-e;return Math.max(0,Math.min(n,mp))}function gp(){try{let e=` - const GEN=${Bf}; - const DUR=${mp}; - function sched(){ - const now=Date.now(); - const elapsed=now-GEN; - const next=GEN+Math.ceil(elapsed/DUR)*DUR; - const delay=Math.max(0, next-now); - setTimeout(()=>{ postMessage({ t: Date.now() }); sched(); }, delay); - } - sched(); - `,t=new Blob([e],{type:`application/javascript`}),n=URL.createObjectURL(t);return{worker:new Worker(n),url:n}}catch{return null}}var _p=`SOVEREIGN_SOLAR_LAST_UPDATE`,vp=`SOVEREIGN_SOLAR_SYNC`,yp={animation:`none`,transition:`none`};const bp=()=>{let[e,t]=(0,P.useState)(()=>pp(new Date)),[n,r]=(0,P.useState)(!1),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),l=Of(),u=typeof document<`u`?document.body:null,d=(0,P.useRef)(null),f=(0,P.useRef)(null),p=(0,P.useRef)(null),h=(0,P.useRef)(null),g=(0,P.useRef)(null),_=(0,P.useRef)(null),v=(0,P.useRef)(!0),y=(0,P.useRef)(async()=>void 0),b=(0,P.useRef)(null),x=(0,P.useRef)(null),S=(0,P.useRef)(!1),C=(0,P.useRef)(0),w=(0,P.useRef)(null),T=(0,P.useRef)(null),E=(0,P.useRef)(0),[D,O]=(0,P.useState)(null),k=(0,P.useRef)(null);(0,P.useEffect)(()=>{k.current=D},[D]),(0,P.useEffect)(()=>(n?(document.body.classList.add(`eternal-overlay-open`),f.current?.focus()):document.body.classList.remove(`eternal-overlay-open`),()=>document.body.classList.remove(`eternal-overlay-open`)),[n]);let A=(0,P.useCallback)(()=>{let e=_.current;if(_.current=null,e)try{e.release().catch(()=>void 0)}catch{}},[]),j=(0,P.useCallback)(async()=>{try{if(!v.current||document.visibilityState!==`visible`)return;let e=_.current;if(e&&!e.released||!Af(navigator))return;let t=await navigator.wakeLock.request(`screen`);if(!v.current){try{t.release().catch(()=>void 0)}catch{}return}_.current=t,t.addEventListener?.(`release`,()=>{v.current&&document.visibilityState===`visible`&&y.current()})}catch{}},[]);(0,P.useEffect)(()=>{y.current=j},[j]),(0,P.useEffect)(()=>(v.current=!0,()=>{v.current=!1}),[]);let M=(0,P.useCallback)(e=>{let n=new Date,r=pp(n);try{let e=m(n),t=up(e.solarAlignedDay-1);E.current=up(e.solarAlignedWeekDayIndex-t)}catch{}let a=typeof e==`number`?e:typeof k.current==`number`?k.current:null,o,s,c;if(typeof a==`number`)o=fp(n,a,E.current),{lastSunrise:s,nextSunrise:c}=dp(n,a);else{let e=m(n);({lastSunrise:s,nextSunrise:c}=i(n)),o={solarAlignedDay:e.solarAlignedDay,solarAlignedMonth:e.solarAlignedMonth,solarAlignedWeekIndex:e.solarAlignedWeekIndex,solarAlignedWeekDay:e.dayName,solarAlignedWeekDayIndex:e.solarAlignedWeekDayIndex,lastSunrise:s,nextSunrise:c,solarAlignedDayInMonth:e.solarAlignedDayInMonth}}r.solarAlignedTime=o,r.solarHarmonicDay=o.solarAlignedWeekDay,r.solarDayOfMonth=o.solarAlignedDayInMonth+1,r.solarMonthIndex=o.solarAlignedMonth,r.solarWeekIndex=o.solarAlignedWeekIndex,r.solarWeekName=Gf[(o.solarAlignedWeekIndex-1+7)%7],r.solarWeekDescription=Xf[r.solarWeekName],r.solarMonthName=Kf[(o.solarAlignedMonth-1+8)%8];let l=Math.max(1,c.getTime()-s.getTime()),u=Math.max(0,n.getTime()-s.getTime()),d=Math.min(.999999999,u%l/l)*$;r.kaiPulseToday=d;let f=$/$f,p=Math.floor(d/f),h=d-p*f,g=Math.floor(h/ep);r.solarChakraStep={beatIndex:p,stepIndex:g,stepsPerBeat:tp,percentIntoStep:(h-g*ep)/ep*100},r.solarChakraStepString=`${p}:${String(g).padStart(2,`0`)}`,r.chakraArc=[`Ignition Ark`,`Integration Ark`,`Harmonization Ark`,`Reflection Ark`,`Purification Ark`,`Dream Ark`][Math.floor((p%$f+$f)%$f/6%6)]??`Ignition Ark`;let _=ap(r.chakraArc);r.chakraZone=_.chakraZone,r.harmonicFrequencies=_.frequencies,r.harmonicInputs=_.inputs,r.sigilFamily=_.sigilFamily,r.kaiTurahArcPhrase=_.arcPhrase;let v=r.kaiPulseEternal%Ff;r.yearPercent=v/Ff*100,r.daysIntoYear=Math.floor(v/$);let y=Math.floor((r.daysIntoYear??0)/If);r.eternalChakraBeat={...r.eternalChakraBeat,eternalMonthIndex:y,eternalDayInMonth:r.eternalMonthProgress.daysElapsed,dayOfMonth:r.eternalMonthProgress.daysElapsed+1},t(r)},[]),N=(0,P.useCallback)(()=>{try{let e=localStorage.getItem(_p);if(e&&e!==w.current){w.current=e,M();return}}catch{}M()},[M]),[ee,te]=(0,P.useState)(!1),I=(0,P.useRef)(null),L=(0,P.useRef)(null);(0,P.useEffect)(()=>()=>{I.current!==null&&window.clearTimeout(I.current),L.current!==null&&window.clearTimeout(L.current)},[]);let R=(0,P.useCallback)(e=>{let t=Date.now();t-C.current<180||(C.current=t,M(e),o(!0),L.current!==null&&window.clearTimeout(L.current),L.current=window.setTimeout(()=>o(!1),220))},[M]);(0,P.useEffect)(()=>{let e=window.setInterval(()=>{o(!0),L.current!==null&&window.clearTimeout(L.current),L.current=window.setTimeout(()=>o(!1),1e3)},5300);return()=>window.clearInterval(e)},[]),(0,P.useEffect)(()=>{S.current=!0;let e=()=>{if(!S.current)return;let t=hp(Date.now());b.current=window.setTimeout(()=>{R(),e()},t)},t=gp();x.current=t,t&&(t.worker.onmessage=()=>{R()}),e();let n=()=>{N(),b.current!==null&&window.clearTimeout(b.current),b.current=null,e(),j()};return document.addEventListener(`visibilitychange`,n),window.addEventListener(`focus`,n),window.addEventListener(`pageshow`,n),window.addEventListener(`popstate`,n),window.addEventListener(`hashchange`,n),()=>{if(S.current=!1,b.current!==null&&window.clearTimeout(b.current),b.current=null,x.current){try{x.current.worker.terminate()}catch{}try{URL.revokeObjectURL(x.current.url)}catch{}x.current=null}document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`focus`,n),window.removeEventListener(`pageshow`,n),window.removeEventListener(`popstate`,n),window.removeEventListener(`hashchange`,n)}},[j,N,R]),(0,P.useEffect)(()=>{j();let e=()=>void j(),t=()=>A();return document.addEventListener(`visibilitychange`,e),window.addEventListener(`focus`,e),window.addEventListener(`beforeunload`,t),()=>{document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`focus`,e),window.removeEventListener(`beforeunload`,t),A()}},[j,A]),(0,P.useEffect)(()=>{try{w.current=localStorage.getItem(_p)}catch{}let e=window.setTimeout(()=>R(),0);return()=>window.clearTimeout(e)},[R]),(0,P.useEffect)(()=>{let e=e=>{e.key&&(e.key===_p||e.key.startsWith(`SOVEREIGN_SOLAR`))&&R()},t=()=>{R()};window.addEventListener(`storage`,e),window.addEventListener(`solar:updated`,t);try{let e=new BroadcastChannel(vp);e.onmessage=()=>R(),T.current=e}catch{}return()=>{window.removeEventListener(`storage`,e),window.removeEventListener(`solar:updated`,t);try{T.current?.close()}catch{}T.current=null}},[R]),(0,P.useEffect)(()=>{let e=window.setTimeout(()=>R(),0);return()=>window.clearTimeout(e)},[l?.solarStepString,l?.solarArcName,l?.sunriseOffsetSec,D]);let z=(0,P.useCallback)(()=>{c(!1),r(!1)},[]),ne=(0,P.useCallback)(()=>{c(!1)},[]),B=(0,P.useRef)(0);(0,P.useEffect)(()=>{if(!n)return;let e=f.current,t=d.current,r=()=>{B.current=Date.now()+800},i=()=>{let t=document.activeElement,n=!!t&&!!e?.contains(t),r=Date.now(){window.removeEventListener(`scroll`,i),t?.removeEventListener(`pointerdown`,r,!0),t?.removeEventListener(`click`,r,!0),e?.removeEventListener(`focusin`,r,!0)}},[z,n]);let re=(0,P.useCallback)(()=>{if(n){z();return}B.current=Date.now()+800,`vibrate`in navigator&&typeof navigator.vibrate==`function`&&navigator.vibrate(10),g.current?.play().catch(()=>void 0),r(!0)},[z,n]);(0,P.useEffect)(()=>{if(!e||!h.current)return;let t=((e.solarChakraStep?.beatIndex??e.eternalChakraBeat?.beatIndex??0)%36+36)%36,n=Math.floor(t/6)%6;h.current.setAttribute(`data-ark`,String(n)),f.current?.setAttribute(`data-ark`,String(n)),d.current?.setAttribute(`data-ark`,String(n));let r=[0,28,55,140,210,275][n]??0;h.current.style.setProperty(`--chakra-hue`,String(r)),h.current.style.setProperty(`--chakra`,`hsl(${r} 100% 55%)`),f.current?.style.setProperty(`--chakra-hue`,String(r)),f.current?.style.setProperty(`--chakra`,`hsl(${r} 100% 55%)`),d.current?.style.setProperty(`--chakra-hue`,String(r)),d.current?.style.setProperty(`--chakra`,`hsl(${r} 100% 55%)`)},[e]);let ie=ip(e.kaiPulseEternal),ae=Math.floor(e.harmonicYearCompletions||0),V=ae<1?`Year of Harmonik Restoration`:ae===1?`Year of Harmonik Embodiment`:`Year ${ae}`,oe=Number.isFinite(ie.pulsesRemaining)?ie.pulsesRemaining/$:NaN,se=typeof e.yearPercent==`number`?e.yearPercent:(e.harmonicYearCompletions??0)%1*100,H=$/36,ce=Math.floor((e.kaiPulseToday%$+$)%$/H),U=(ce+.5)/36*360,W=(e.kaiPulseToday%H+H)%H/H*100,ue=(0,P.useCallback)(()=>{B.current=Date.now()+800,c(!0),`vibrate`in navigator&&typeof navigator.vibrate==`function`&&navigator.vibrate(8)},[]),de=[`Solhara`,`Aquaris`,`Flamora`,`Verdari`,`Sonari`,`Kaelith`],fe=e.solarAlignedTime?.solarAlignedWeekDayIndex??null,me=fe===null?null:(fe%6+6)%6,he=me===null?`—`:de[me],ge=me===null?`—`:me+1,_e=$*6,ve=(()=>{let t=e.harmonicWeekProgress;return t&&Number.isFinite(t.pulsesIntoWeek)?t.pulsesIntoWeek:(e.kaiPulseEternal%_e+_e)%_e})(),ye=(()=>{let t=e.harmonicWeekProgress;return t&&Number.isFinite(t.percent)?t.percent:ve/_e*100})(),be=(e.kaiPulseEternal%_e+_e)%_e,xe=Math.floor(be/$)%6,Se=Wf[xe],Ce=`ark-${Math.floor(((e.solarChakraStep?.beatIndex??0)%36+36)%36/6)%6}-${e.solarChakraStepString}`,we=d.current??f.current??u;return(0,F.jsxs)(`div`,{ref:h,className:`eternal-klock-container`,children:[(0,F.jsx)(`div`,{className:`eternal-klock-header`,children:(0,F.jsx)(`div`,{ref:p,onClick:re,title:`Tap to view details`,className:`klock-toggle ${a?`glow-pulse`:``}`,children:(0,F.jsx)(le,{hue:`var(--chakra)`,kaiPulseEternal:e.kaiPulseEternal,pulse:e.kaiPulseToday,harmonicDayPercent:e.harmonicLevels.harmonicDay.percent,microCyclePercent:e.harmonicLevels.microCycle.percent,dayLabel:e.harmonicDay,monthLabel:e.eternalMonth,monthDay:e.eternalChakraBeat?.dayOfMonth??e.eternalMonthProgress.daysElapsed+1,glowPulse:a,rotationOverride:U,solarSpiralStepString:e.solarChakraStepString,solarSpiralStep:e.solarChakraStep},Ce)})}),n&&u&&(0,kf.createPortal)((0,F.jsx)(`div`,{className:`eternal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":`Eternal Klock Details`,ref:f,tabIndex:-1,style:yp,onClick:e=>{if(e.target===f.current){if(s){ne();return}z()}},onKeyDown:e=>{if(e.key===`Escape`){if(s){e.stopPropagation(),ne();return}z()}},children:(0,F.jsxs)(`div`,{className:`eternal-modal-card`,ref:d,style:yp,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`button`,{type:`button`,className:`ek-close-btn`,"aria-label":`Close`,title:`Close`,onClick:z,children:`×`}),(0,F.jsx)(`div`,{className:`ek-display-controls`,"aria-label":`Display scale controls`,children:(0,F.jsx)(`div`,{className:`ek-scale-row`,children:(0,F.jsx)(`div`,{className:`ek-scale-readout`})})}),(0,F.jsxs)(`div`,{className:`eternal-klock-detail`,children:[(0,F.jsx)(`h2`,{className:`eternal-klock-title`,children:`𐰘𐰜𐰇 · 𐰋𐰢𐱃`}),(0,F.jsxs)(`div`,{className:`eternal-klock-toolbar`,children:[(0,F.jsx)(pe,{kaiPulse:e.kaiPulseEternal}),(0,F.jsx)(`button`,{className:`toolbar-btn`,onClick:ue,title:`Open Kairos Week Spiral`,type:`button`,children:(0,F.jsx)(`img`,{src:`/assets/weekkalendar.svg`,alt:`Kairos Week`,className:`toolbar-icon`,draggable:!1})})]}),s&&we&&(0,F.jsx)(Sf,{onClose:()=>c(!1),container:we}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsxs)(`div`,{className:`eternal-klock-section-title`,children:[(0,F.jsx)(`img`,{src:`/assets/eternal.svg`,alt:`Eternal Title`,style:{width:`100%`,height:`auto`}}),(0,F.jsx)(`strong`,{children:`Date:`}),` `,`D`,e.eternalChakraBeat?.dayOfMonth??e.eternalMonthProgress.daysElapsed+1,` / M`,(e.eternalChakraBeat?.eternalMonthIndex??0)+1]}),e.chakraStep&&e.eternalChakraBeat&&(0,F.jsxs)(`div`,{style:{marginBottom:`0.75rem`},children:[(0,F.jsx)(`strong`,{children:`Kairos:`}),` `,(0,F.jsxs)(`code`,{children:[e.eternalChakraBeat.beatIndex,`:`,e.chakraStep.stepIndex.toString().padStart(2,`0`)]}),(0,F.jsx)(`br`,{}),(0,F.jsxs)(`small`,{style:{display:`block`,marginTop:`0.25rem`},children:[`Beat `,(0,F.jsx)(`strong`,{children:e.eternalChakraBeat.beatIndex}),` / `,e.eternalChakraBeat.totalBeats-1,` — Step `,(0,F.jsx)(`strong`,{children:e.chakraStep.stepIndex}),` / `,e.chakraStep.stepsPerBeat,` (`,e.chakraStep.percentIntoStep.toFixed(1),`%)`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulse(Eternal):`}),` `,e.kaiPulseEternal]}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsx)(`strong`,{children:`Day:`}),` `,Se,` `,xe+1,` / 6`]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Week:`}),` `,e.weekIndex,`/7, `,(0,F.jsx)(`strong`,{children:e.weekName})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Month:`}),` `,e.eternalMonth,` `,(e.eternalChakraBeat?.eternalMonthIndex??0)+1,` / 8`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulse(Today):`}),` `,(e.kaiPulseEternal%$).toFixed(2),` /`,` `,$.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% of Day Komplete:`}),` `,e.harmonicLevels.harmonicDay.percent.toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`day-progress-bar`,children:(0,F.jsx)(`div`,{className:`day-progress-fill ${a?`sync-pulse`:``} ${e.harmonicLevels.harmonicDay.percent.toFixed(0)===`100`?`burst`:``}`,style:{width:`${e.harmonicLevels.harmonicDay.percent}%`},title:`${e.harmonicLevels.harmonicDay.percent.toFixed(2)}% of eternal day`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining Today:`}),` `,($-e.harmonicLevels.harmonicDay.pulseInCycle).toFixed(2)]})]}),e.harmonicDayDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.harmonicDayDescription})}),(0,F.jsx)(`strong`,{children:`Kai-Turah:`}),` `,(0,F.jsx)(`em`,{children:e.kaiTurahPhrase}),(0,F.jsx)(`div`,{}),(0,F.jsx)(`strong`,{children:`Phi Pulse:`}),` `,(e.kaiPulseEternal*1.618).toFixed(0),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Week Progress`}),typeof e.weekIndex==`number`&&e.weekName?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Week:`}),` `,e.weekIndex,` / 7, `,(0,F.jsx)(`strong`,{children:e.weekName})]}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsx)(`strong`,{children:`Day:`}),` `,Se,` `,xe+1,` / 6`]}),e.eternalWeekDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.eternalWeekDescription})})]}):(0,F.jsx)(`div`,{children:`—`}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Into Week:`}),` `,ve.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,(_e-ve).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% Komplete:`}),` `,ye.toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`week-progress-bar`,children:(0,F.jsx)(`div`,{className:`week-progress-fill ${a?`sync-pulse`:``} ${Math.round(ye)===100?`burst`:``}`,style:{width:`${ye}%`},title:`${ye.toFixed(2)}% of week`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Total Kai-Pulses (Breathes) in Week:`}),` `,_e.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Eternal Month:`}),` `,e.eternalMonth]}),e.eternalMonthDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.eternalMonthDescription})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Month Progress`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days Elapsed:`}),` `,e.eternalMonthProgress.daysElapsed+1]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days Remaining:`}),` `,e.eternalMonthProgress.daysRemaining]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Into Month:`}),` `,(e.kaiPulseEternal%Lf).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,(Lf-e.kaiPulseEternal%Lf).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% Komplete:`}),` `,(e.kaiPulseEternal%Lf/Lf*100).toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`month-progress-bar`,children:(0,F.jsx)(`div`,{className:`month-progress-fill ${a?`sync-pulse`:``}`,style:{width:`${e.kaiPulseEternal%Lf/Lf*100}%`},title:`${(e.kaiPulseEternal%Lf/Lf*100).toFixed(2)}% of month`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Total Breathes in Month:`}),` `,Lf.toFixed(2)]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`strong`,{children:`Harmonik Sykle:`}),(0,F.jsx)(`div`,{className:`eternal-klock-timestamp`,children:e.timestamp}),e.seal&&(0,F.jsxs)(`div`,{className:`seal-container`,children:[(0,F.jsx)(`strong`,{className:`seal-label`,children:`Seal:`}),` `,(0,F.jsx)(`span`,{className:`seal-code ${ee?`copied`:``}`,onClick:()=>{navigator.clipboard.writeText(e.seal??``).then(()=>{I.current!==null&&window.clearTimeout(I.current),te(!0),I.current=window.setTimeout(()=>te(!1),1600)}).catch(()=>void 0)},title:`Click to Kopy Eternal Seal`,role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.currentTarget.click()},children:e.seal}),(0,F.jsxs)(`span`,{className:`seal-toast ${ee?`show`:``}`,role:`status`,"aria-live":`polite`,children:[(0,F.jsx)(`span`,{className:`toast-mark`,"aria-hidden":!0,children:`✓`}),(0,F.jsx)(`span`,{className:`toast-text`,children:`Copied`}),(0,F.jsx)(`span`,{className:`toast-meter`,"aria-hidden":!0})]})]}),e.harmonicTimestampDescription&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:e.harmonicTimestampDescription})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Year Progress`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Harmonik Year:`}),` `,e.harmonicYearCompletions?.toFixed(4)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Year:`}),` `,V]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% of Year Komplete:`}),` `,typeof e.yearPercent==`number`?e.yearPercent.toFixed(2):`—`,`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days Into Year:`}),` `,typeof e.daysIntoYear==`number`?e.daysIntoYear:`—`,` /`,` `,Pf]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Into Year:`}),` `,(e.kaiPulseEternal%Ff).toFixed(0)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,(Ff-e.kaiPulseEternal%Ff).toFixed(0)]}),(0,F.jsx)(`div`,{className:`year-progress-bar`,children:(0,F.jsx)(`div`,{className:`year-progress-fill ${a?`sync-pulse`:``}`,style:{width:`${se}%`},title:`${se.toFixed(2)}% of year`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Total Kai-Pulses (Breathes) in Year:`}),` `,Ff.toFixed(2)]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Phi Spiral Progress`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Phi Spiral Level:`}),` `,ie.spiralLevel]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Progress to Next Level:`}),` `,ie.percentToNext.toFixed(2),`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Pulses (Breathes) Remaining:`}),` `,ie.pulsesRemaining]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Days to Next Spiral:`}),` `,Number.isFinite(oe)?oe.toFixed(4):`—`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Next Spiral Threshold:`}),` `,ie.nextSpiralPulse]}),(0,F.jsx)(`div`,{className:`spiral-progress-bar`,children:(0,F.jsx)(`div`,{className:`spiral-progress-fill`,style:{width:`${ie.percentToNext}%`}})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title embodied-section-title`,children:(0,F.jsx)(`img`,{src:`/assets/embodied_solar_aligned.svg`,alt:`Embodied Solar-Aligned Title`,className:`embodied-section-icon`})}),(0,F.jsx)(`strong`,{children:`Date (Solar):`}),` D`,e.solarDayOfMonth??`—`,` / M`,e.solarMonthIndex??`—`,` `,e.solarMonthName?(0,F.jsxs)(`small`,{children:[`(`,e.solarMonthName,`)`]}):null,e.solarChakraStep&&e.solarChakraStepString&&(0,F.jsxs)(`div`,{style:{marginBottom:`0.5rem`},children:[(0,F.jsx)(`strong`,{children:`Solar Kairos:`}),` `,(0,F.jsx)(`code`,{children:e.solarChakraStepString}),(0,F.jsx)(`br`,{})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:` Day:`}),` `,he,` `,ge,` / 6`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Week:`}),` `,e.weekIndex,`/7, `,(0,F.jsx)(`strong`,{children:e.weekName})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Month:`}),` `,e.eternalMonth,` `,(e.eternalChakraBeat?.eternalMonthIndex??0)+1,` / 8`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% into Beat:`}),` `,W.toFixed(2),`%`]}),(0,F.jsxs)(`div`,{style:{marginTop:`0.5rem`},children:[(0,F.jsx)(`strong`,{children:`Beat:`}),` `,ce,` / 36`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% into Step:`}),` `,e.solarChakraStep?e.solarChakraStep.percentIntoStep.toFixed(1):`—`,`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Step:`}),` `,e.solarChakraStep?`${e.solarChakraStep.stepIndex} / ${e.solarChakraStep.stepsPerBeat}`:`—`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kurrent Step Breathes:`}),` `,e.solarChakraStep?(e.solarChakraStep.percentIntoStep/100*($/36/e.solarChakraStep.stepsPerBeat)).toFixed(2):`—`,` `,`/ 11`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai(Today):`}),` `,e.kaiPulseToday,` / `,$.toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`% of Day Komplete:`}),` `,(e.kaiPulseToday/$*100).toFixed(2),`%`]}),(0,F.jsx)(`div`,{className:`day-progress-bar`,children:(0,F.jsx)(`div`,{className:`day-progress-fill ${a?`sync-pulse`:``} ${(e.kaiPulseToday/$*100).toFixed(0)===`100`?`burst`:``}`,style:{width:`${e.kaiPulseToday/$*100}%`},title:`${(e.kaiPulseToday/$*100).toFixed(2)}% of day`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Breathes Remaining Today:`}),` `,($-e.kaiPulseToday).toFixed(2)]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Ark:`}),` `,e.chakraArc]}),op[e.chakraArc]&&(0,F.jsx)(`div`,{className:`eternal-description`,children:(0,F.jsx)(`em`,{children:op[e.chakraArc]})}),(0,F.jsxs)(`div`,{style:{marginTop:`0.25rem`},children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Breathes Into Beat:`}),` `,(e.kaiPulseToday%H).toFixed(2),` /`,` `,H.toFixed(2)]}),(0,F.jsx)(`strong`,{children:`To Next Beat:`}),` `,W.toFixed(2),`%`]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Beat Zone:`}),` `,e.chakraZone]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Sigil Family:`}),` `,e.sigilFamily]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:`Kai-Turah:`}),` `,e.kaiTurahArcPhrase]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Harmonik Levels`}),(0,F.jsx)(`div`,{children:(0,F.jsx)(`strong`,{children:`Ark Beat:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.arcBeat.pulseInCycle,` / `,e.harmonicLevels.arcBeat.cycleLength,` (`,e.harmonicLevels.arcBeat.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.arcBeatCompletions]})}),(0,F.jsx)(`div`,{style:{marginTop:`0.75rem`},children:(0,F.jsx)(`strong`,{children:`Mikro Sykle:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.microCycle.pulseInCycle,` / `,e.harmonicLevels.microCycle.cycleLength,` (`,e.harmonicLevels.microCycle.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.microCycleCompletions]})}),(0,F.jsx)(`div`,{style:{marginTop:`0.75rem`},children:(0,F.jsx)(`strong`,{children:`Beat Loop:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.chakraLoop.pulseInCycle,` / `,e.harmonicLevels.chakraLoop.cycleLength,` (`,e.harmonicLevels.chakraLoop.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.chakraLoopCompletions]})}),(0,F.jsx)(`div`,{style:{marginTop:`0.75rem`},children:(0,F.jsx)(`strong`,{children:`Harmonik Day:`})}),(0,F.jsxs)(`div`,{children:[e.harmonicLevels.harmonicDay.pulseInCycle,` / `,e.harmonicLevels.harmonicDay.cycleLength,` (`,e.harmonicLevels.harmonicDay.percent.toFixed(2),`%)`]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`small`,{children:[`Kompleted Sykles: `,e.harmonicDayCompletions]})}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Solar-Ark Aligned Frequencies & Inputs`}),(0,F.jsx)(`ul`,{children:e.harmonicFrequencies.map((t,n)=>(0,F.jsxs)(`li`,{children:[(0,F.jsxs)(`strong`,{children:[t.toFixed(1),` Hz`]}),` — `,e.harmonicInputs[n]]},`${t}-${n}`))})]}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`}),(0,F.jsx)(`div`,{className:`eternal-klock-section-title`,children:`Solar Aligned Kairos Sync`}),(0,F.jsx)(Tf,{showControls:!0,onSunriseChange:e=>{O(e);try{localStorage.setItem(_p,String(Date.now()))}catch{}try{window.dispatchEvent(new Event(`solar:updated`))}catch{}try{let e={type:`solar:updated`,t:Date.now()};T.current?.postMessage(e)}catch{}R(e),requestAnimationFrame(()=>R(e))}})]})}),u),(0,F.jsx)(`audio`,{ref:g,src:`/assets/chimes/kai_turah_tone.mp3`,preload:`auto`})]})};var xp=bp;export{xp as n,bp as t}; \ No newline at end of file diff --git a/dist/assets/EternalKlock-CmXqg4DF.js b/dist/assets/EternalKlock-CmXqg4DF.js new file mode 100644 index 000000000..95298f888 --- /dev/null +++ b/dist/assets/EternalKlock-CmXqg4DF.js @@ -0,0 +1 @@ +import{n as e,t}from"./EternalKlock-CLK839TD.js";import"./SigilModal-BbDF3_i8.js";import"./SealMomentModal-f8C8Q0lx.js";import"./webauthnKAS--_8CNTOP.js";export{t as EternalKlock,e as default}; \ No newline at end of file diff --git a/dist/assets/HomePriceChartCard-Dhq2RQjv.js b/dist/assets/HomePriceChartCard-fWObxGTO.js similarity index 99% rename from dist/assets/HomePriceChartCard-Dhq2RQjv.js rename to dist/assets/HomePriceChartCard-fWObxGTO.js index 094e3b733..88a9756de 100644 --- a/dist/assets/HomePriceChartCard-Dhq2RQjv.js +++ b/dist/assets/HomePriceChartCard-fWObxGTO.js @@ -1,4 +1,4 @@ -import{Bt as e,Vt as t,pi as n,si as r,zt as i}from"./index-BoEZKnmf.js";import{t as a}from"./prop-types-Cw0kCKc2.js";var o=n(r(),1),s=`clover`,c=function(e){return e===3?`v3`:e},l=`https://js.stripe.com`,u=`${l}/${s}/stripe.js`,d=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,f=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,p=`loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used`,ee=function(e){return d.test(e)||f.test(e)},m=function(){for(var e=document.querySelectorAll(`script[src^="${l}"]`),t=0;t element.`);return r.appendChild(n),n},g=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:`stripe-js`,version:`8.6.0`,startTime:t})},_=null,v=null,y=null,b=function(e){return function(t){e(Error(`Failed to load Stripe.js`,{cause:t}))}},te=function(e,t){return function(){window.Stripe?e(window.Stripe):t(Error(`Stripe.js not available`))}},x=function(e){return _===null?(_=new Promise(function(t,n){if(typeof window>`u`||typeof document>`u`){t(null);return}if(window.Stripe&&e&&console.warn(p),window.Stripe){t(window.Stripe);return}try{var r=m();if(r&&e)console.warn(p);else if(!r)r=h(e);else if(r&&y!==null&&v!==null){var i;r.removeEventListener(`load`,y),r.removeEventListener(`error`,v),(i=r.parentNode)==null||i.removeChild(r),r=h(e)}y=te(t,n),v=b(n),r.addEventListener(`load`,y),r.addEventListener(`error`,v)}catch(e){n(e);return}}),_.catch(function(e){return _=null,Promise.reject(e)})):_},S=function(e,t,n){if(e===null)return null;var r=t[0].match(/^pk_test/),i=c(e.version),a=s;r&&i!==a&&console.warn(`Stripe.js@${i} was loaded on the page, but @stripe/stripe-js@8.6.0 expected Stripe.js@${a}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);var o=e.apply(void 0,t);return g(o,n),o},C,w=!1,T=function(){return C||(C=x(null).catch(function(e){return C=null,Promise.reject(e)}),C)};Promise.resolve().then(function(){return T()}).catch(function(e){w||console.warn(e)});var E=function(){var e=[...arguments];w=!0;var t=Date.now();return T().then(function(n){return S(n,e,t)})},D=n(a(),1);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ne(e,t){if(e==null)return{};var n=M(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N(e,t){return re(e)||P(e,t)||F(e,t)||I()}function re(e){if(Array.isArray(e))return e}function P(e,t){var n=e&&(typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`]);if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function F(e,t){if(e){if(typeof e==`string`)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}}function ie(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n element.`);return r.appendChild(n),n},g=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:`stripe-js`,version:`8.6.0`,startTime:t})},_=null,v=null,y=null,b=function(e){return function(t){e(Error(`Failed to load Stripe.js`,{cause:t}))}},te=function(e,t){return function(){window.Stripe?e(window.Stripe):t(Error(`Stripe.js not available`))}},x=function(e){return _===null?(_=new Promise(function(t,n){if(typeof window>`u`||typeof document>`u`){t(null);return}if(window.Stripe&&e&&console.warn(p),window.Stripe){t(window.Stripe);return}try{var r=m();if(r&&e)console.warn(p);else if(!r)r=h(e);else if(r&&y!==null&&v!==null){var i;r.removeEventListener(`load`,y),r.removeEventListener(`error`,v),(i=r.parentNode)==null||i.removeChild(r),r=h(e)}y=te(t,n),v=b(n),r.addEventListener(`load`,y),r.addEventListener(`error`,v)}catch(e){n(e);return}}),_.catch(function(e){return _=null,Promise.reject(e)})):_},S=function(e,t,n){if(e===null)return null;var r=t[0].match(/^pk_test/),i=c(e.version),a=s;r&&i!==a&&console.warn(`Stripe.js@${i} was loaded on the page, but @stripe/stripe-js@8.6.0 expected Stripe.js@${a}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);var o=e.apply(void 0,t);return g(o,n),o},C,w=!1,T=function(){return C||(C=x(null).catch(function(e){return C=null,Promise.reject(e)}),C)};Promise.resolve().then(function(){return T()}).catch(function(e){w||console.warn(e)});var E=function(){var e=[...arguments];w=!0;var t=Date.now();return T().then(function(n){return S(n,e,t)})},D=n(a(),1);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ne(e,t){if(e==null)return{};var n=M(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N(e,t){return re(e)||P(e,t)||F(e,t)||I()}function re(e){if(Array.isArray(e))return e}function P(e,t){var n=e&&(typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`]);if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function F(e,t){if(e){if(typeof e==`string`)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}}function ie(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:se;if(e===null||B(e))return e;throw Error(t)},le=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se;if(z(e))return{tag:`async`,stripePromise:Promise.resolve(e).then(function(e){return ce(e,t)})};var n=ce(e,t);return n===null?{tag:`empty`}:{tag:`sync`,stripe:n}},U=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:`react-stripe-js`,version:`5.4.1`}),e.registerAppInfo({name:`react-stripe-js`,version:`5.4.1`,url:`https://stripe.com/docs/stripe-js/react`}))},W=o.createContext(null);W.displayName=`ElementsContext`;var G=function(e,t){if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an provider.`);return e},K=function(e){var t=e.stripe,n=e.options,r=e.children,i=o.useMemo(function(){return le(t)},[t]),a=N(o.useState(function(){return{stripe:i.tag===`sync`?i.stripe:null,elements:i.tag===`sync`?i.stripe.elements(n):null}}),2),s=a[0],c=a[1];o.useEffect(function(){var e=!0,t=function(e){c(function(t){return t.stripe?t:{stripe:e,elements:e.elements(n)}})};return i.tag===`async`&&!s.stripe?i.stripePromise.then(function(n){n&&e&&t(n)}):i.tag===`sync`&&!s.stripe&&t(i.stripe),function(){e=!1}},[i,s,n]);var l=ae(t);o.useEffect(function(){l!==null&&l!==t&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[l,t]);var u=ae(n);return o.useEffect(function(){if(s.elements){var e=oe(n,u,[`clientSecret`,`fonts`]);e&&s.elements.update(e)}},[n,u,s.elements]),o.useEffect(function(){U(s.stripe)},[s.stripe]),o.createElement(W.Provider,{value:s},r)};K.propTypes={stripe:D.default.any,options:D.default.object};var ue=function(e){return G(o.useContext(W),e)},q=function(){return ue(`calls useElements()`).elements},de=function(e){var t=e.children;return t(ue(`mounts `))};de.propTypes={children:D.default.func.isRequired};var fe=o.createContext(null);fe.displayName=`CheckoutContext`,D.default.any,D.default.shape({clientSecret:D.default.oneOfType([D.default.string,D.default.instanceOf(Promise)]).isRequired,elementsOptions:D.default.object}).isRequired;var pe=function(e){var t=o.useContext(fe),n=o.useContext(W);if(t){if(n)throw Error(`You cannot wrap the part of your app that ${e} in both and providers.`);return t}else return G(n,e)},J=[`mode`],me=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Y=function(e,t){var n=`${me(e)}Element`,r=t?function(e){pe(`mounts <${n}>`);var t=e.id,r=e.className;return o.createElement(`div`,{id:t,className:r})}:function(t){var r=t.id,i=t.className,a=t.options,s=a===void 0?{}:a,c=t.onBlur,l=t.onFocus,u=t.onReady,d=t.onChange,f=t.onEscape,p=t.onClick,ee=t.onLoadError,m=t.onLoaderStart,h=t.onNetworksChange,g=t.onConfirm,_=t.onCancel,v=t.onShippingAddressChange,y=t.onShippingRateChange,b=t.onSavedPaymentMethodRemove,te=t.onSavedPaymentMethodUpdate,x=pe(`mounts <${n}>`),S=`elements`in x?x.elements:null,C=`checkoutState`in x?x.checkoutState:null,w=C?.type===`success`||C?.type===`loading`?C.sdk:null,T=N(o.useState(null),2),E=T[0],D=T[1],O=o.useRef(null),k=o.useRef(null);L(E,`blur`,c),L(E,`focus`,l),L(E,`escape`,f),L(E,`click`,p),L(E,`loaderror`,ee),L(E,`loaderstart`,m),L(E,`networkschange`,h),L(E,`confirm`,g),L(E,`cancel`,_),L(E,`shippingaddresschange`,v),L(E,`shippingratechange`,y),L(E,`savedpaymentmethodremove`,b),L(E,`savedpaymentmethodupdate`,te),L(E,`change`,d);var A;u&&(A=e===`expressCheckout`?u:function(){u(E)}),L(E,`ready`,A),o.useLayoutEffect(function(){if(O.current===null&&k.current!==null&&(S||w)){var t=null;if(w)switch(e){case`paymentForm`:t=w.createPaymentFormElement();break;case`payment`:t=w.createPaymentElement(s);break;case`address`:if(`mode`in s){var r=s.mode,i=ne(s,J);if(r===`shipping`)t=w.createShippingAddressElement(i);else if(r===`billing`)t=w.createBillingAddressElement(i);else throw Error(`Invalid options.mode. mode must be 'billing' or 'shipping'.`)}else throw Error(`You must supply options.mode. mode must be 'billing' or 'shipping'.`);break;case`expressCheckout`:t=w.createExpressCheckoutElement(s);break;case`currencySelector`:t=w.createCurrencySelectorElement();break;case`taxId`:t=w.createTaxIdElement(s);break;default:throw Error(`Invalid Element type ${n}. You must use either the , , , or .`)}else S&&(t=S.create(e,s));O.current=t,D(t),t&&t.mount(k.current)}},[S,w,s]);var j=ae(s);return o.useEffect(function(){if(O.current){var e=oe(s,j,[`paymentRequest`]);e&&`update`in O.current&&O.current.update(e)}},[s,j]),o.useLayoutEffect(function(){return function(){if(O.current&&typeof O.current.destroy==`function`)try{O.current.destroy(),O.current=null}catch{}}},[]),o.createElement(`div`,{id:r,className:i,ref:k})};return r.propTypes={id:D.default.string,className:D.default.string,onChange:D.default.func,onBlur:D.default.func,onFocus:D.default.func,onReady:D.default.func,onEscape:D.default.func,onClick:D.default.func,onLoadError:D.default.func,onLoaderStart:D.default.func,onNetworksChange:D.default.func,onConfirm:D.default.func,onCancel:D.default.func,onShippingAddressChange:D.default.func,onShippingRateChange:D.default.func,onSavedPaymentMethodRemove:D.default.func,onSavedPaymentMethodUpdate:D.default.func,options:D.default.object},r.displayName=n,r.__elementType=e,r},X=typeof window>`u`,Z=o.createContext(null);Z.displayName=`EmbeddedCheckoutProviderContext`;var he=function(){return pe(`calls useStripe()`).stripe};Y(`auBankAccount`,X),Y(`card`,X),Y(`cardNumber`,X),Y(`cardExpiry`,X),Y(`cardCvc`,X),Y(`iban`,X);var ge=Y(`payment`,X);Y(`expressCheckout`,X),Y(`paymentRequestButton`,X),Y(`linkAuthentication`,X),Y(`address`,X),Y(`shippingAddress`,X),Y(`paymentMethodMessaging`,X),Y(`taxId`,X);var Q=n(t(),1),_e=1715323541888,ve=(3+Math.sqrt(5))*1e3,ye=()=>(Date.now()-_e)/ve,$=(e,t,n)=>Math.max(t,Math.min(n,e)),be=e=>Math.round(e*100)/100,xe=e=>e.toLocaleString(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2}),Se=(e,t)=>{let n=(1+Math.sqrt(5))/2,r=Math.sin(2*Math.PI*e/44)*.85,i=Math.sin(2*Math.PI*n*e)*.42,a=Math.sin(2*Math.PI*(n-1)*e)*.28,o=Math.sin(e*.1618)*.35;return be(t+r+i+a+o)},Ce=e=>$(.35+.65*Math.abs(Math.sin(2*Math.PI*e/11)),0,1),we=Object.freeze([]),Te=Object.freeze([]),Ee=` .kai-price-wrap { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji"; color: #e7fbf7; } .kai-price-chart { display:block; width:100%; height:auto; } diff --git a/dist/assets/KaiRealms-ecJ2QA-S.js b/dist/assets/KaiRealms-DHJBzHvC.js similarity index 98% rename from dist/assets/KaiRealms-ecJ2QA-S.js rename to dist/assets/KaiRealms-DHJBzHvC.js index fb4ada20b..f3d30b1b9 100644 --- a/dist/assets/KaiRealms-ecJ2QA-S.js +++ b/dist/assets/KaiRealms-DHJBzHvC.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/bundler-Dg82q-6n.js","assets/index-BoEZKnmf.js","assets/index-BgUnq8XG.css"])))=>i.map(i=>d[i]); -import{t as e}from"./x-CmijL4ZY.js";import{E as t,Et as n,Vt as r,ii as i,pi as a,si as o,wt as s}from"./index-BoEZKnmf.js";var c=a(o(),1);function l(e){return typeof e==`string`?e.toLowerCase():``}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e){return typeof e==`string`&&e.length>0}function f(e){return typeof e==`number`&&Number.isFinite(e)}function p(e){if(typeof e!=`object`||!e)throw Error(`Malformed sigil metadata.`);let t=e;for(let e of[`pulse`,`beat`,`stepIndex`,`chakraDay`])if(!u(t,e))throw Error(`Missing Kai field: ${e}`);if(!u(t,`kaiSignature`))throw Error(`Invalid Kai Signature — tampered or unsigned sigil.`);if(!f(t.pulse))throw Error(`Invalid field: pulse`);if(!f(t.beat))throw Error(`Invalid field: beat`);if(!f(t.stepIndex))throw Error(`Invalid field: stepIndex`);if(!d(t.chakraDay))throw Error(`Invalid field: chakraDay`);if(!d(t.kaiSignature))throw Error(`Invalid field: kaiSignature`)}function m(e){try{let t=new DOMParser().parseFromString(e,`image/svg+xml`),n=Array.from(t.getElementsByTagName(`metadata`)),r=[`valuation`,`ledger`,`dht`,`source`];for(let e of n){let t=e.getAttribute(`id`)??``;if(r.some(e=>t.includes(e)))continue;let n=(e.textContent??``).trim();if(!n)continue;let i=n.replace(/^$/,``);try{let e=JSON.parse(i);if(typeof e==`object`&&e&&u(e,`pulse`)&&u(e,`beat`)&&u(e,`stepIndex`)&&u(e,`chakraDay`)&&u(e,`kaiSignature`))return e}catch{}}return null}catch{return null}}async function h(e){let r=await e.text(),{meta:i,contextOk:a,typeOk:o}=await t(e),c=i&&u(i,`kaiSignature`)&&u(i,`pulse`)?i:m(r);if(!c||!a||!o)throw Error(`Invalid glyph or missing metadata.`);p(c);let d=c,f=await s(d);if(!f||l(f)!==l(d.kaiSignature))throw Error(`Invalid Kai Signature — tampered or unsigned sigil.`);let h=await n(d.kaiSignature);if(typeof d.userPhiKey==`string`){if(l(d.userPhiKey)!==l(h))throw Error(`Φ-Key mismatch — identity invalid.`)}else d.userPhiKey=h;return{svgText:r,meta:d,phiKey:h}}var g=a(r(),1),_=`.svg,image/svg+xml`,v=({onEnter:e})=>{let t=(0,c.useRef)(null),[n,r]=(0,c.useState)(!1),[i,a]=(0,c.useState)(!1),[o,s]=(0,c.useState)(``),[l,u]=(0,c.useState)(null),d=(0,c.useId)(),f=(0,c.useId)(),p=(0,c.useId)(),m=()=>{t.current&&(t.current.value=``)},v=(0,c.useCallback)(async t=>{u(null),s(t.name),a(!0);try{if(!(t.type===`image/svg+xml`||t.name.toLowerCase().endsWith(`.svg`)))throw Error(`Please upload a valid Kai Sigil (.svg).`);e(await h(t))}catch(e){u(e instanceof Error?e.message:`Invalid glyph or missing metadata.`)}finally{a(!1),m()}},[e]),y=(0,c.useCallback)(async e=>{let t=e.target.files?.[0];t&&await v(t)},[v]),b=(0,c.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),r(!1);let t=e.dataTransfer.files?.[0];t&&await v(t)},[v]),x=e=>{e.preventDefault(),e.dataTransfer.dropEffect=`copy`,n||r(!0)},S=e=>{e.currentTarget.contains(e.relatedTarget)||r(!1)},C=()=>t.current?.click(),w=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C())};return(0,g.jsxs)(`section`,{className:`portal-card glass-omni`,"aria-labelledby":d,"aria-describedby":f,children:[(0,g.jsx)(`div`,{className:`breath-ring breath-ring--outer`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`breath-ring breath-ring--inner`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`phi-grid`,"aria-hidden":!0}),(0,g.jsx)(`h1`,{id:d,className:`sr-only`,children:`Drop your Kai Sigil`}),(0,g.jsxs)(`div`,{className:`portal-body`,children:[(0,g.jsxs)(`div`,{className:`dropzone ${n?`dropzone--active`:``} ${i?`dropzone--busy`:``}`,role:`button`,tabIndex:0,onKeyDown:w,onClick:C,onDrop:b,onDragOver:x,onDragLeave:S,"aria-busy":i,"aria-describedby":`${f}${l?` ${p}`:``}`,children:[(0,g.jsxs)(`div`,{className:`dropzone-ornament`,"aria-hidden":!0,children:[(0,g.jsx)(`div`,{className:`ornament-ring ornament-ring--outer`}),(0,g.jsx)(`div`,{className:`ornament-ring ornament-ring--inner`}),(0,g.jsx)(`div`,{className:`ornament-core`})]}),(0,g.jsx)(`div`,{className:`dropzone-icon`,"aria-hidden":!0,children:(0,g.jsxs)(`svg`,{width:`44`,height:`44`,viewBox:`0 0 44 44`,children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:`dzG`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:`#00ffd0`}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:`#8a2be2`})]})}),(0,g.jsx)(`circle`,{cx:`22`,cy:`22`,r:`20`,fill:`none`,stroke:`url(#dzG)`,strokeWidth:`1.5`}),(0,g.jsx)(`path`,{d:`M22 12 L22 30 M14 20 L22 12 L30 20`,stroke:`url(#dzG)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`})]})}),(0,g.jsxs)(`div`,{className:`dropzone-text`,children:[(0,g.jsx)(`div`,{className:`dz-title`,children:`Inhale your Kai Sigil`}),(0,g.jsxs)(`div`,{id:f,className:`dz-hint`,children:[`Breath-minted `,(0,g.jsx)(`strong`,{children:`Φkey`}),` only. Drag & drop.`]}),o&&!i&&!l?(0,g.jsxs)(`div`,{className:`dz-file`,children:[`Selected: `,o]}):null,i?(0,g.jsxs)(`div`,{className:`dz-progress`,children:[(0,g.jsx)(`div`,{className:`dz-spinner`}),(0,g.jsx)(`span`,{children:`Verifying…`})]}):null]}),(0,g.jsx)(`input`,{ref:t,type:`file`,accept:_,onChange:y,tabIndex:-1,"aria-hidden":!0,className:`dz-input`})]}),l?(0,g.jsx)(`div`,{id:p,className:`portal-error`,role:`alert`,"aria-live":`polite`,children:l}):null,(0,g.jsx)(`p`,{className:`portal-note`,children:`Your sigil is verified by breath. No drift. Only truth.`})]}),(0,g.jsx)(`span`,{className:`sr-only`,children:`Kai Realms sigil gate ready.`})]})},y=5236,b=11,x=44;function S(e){let t=e-1715323541888,n=Math.floor(t/y);return{pulseIndex:n,stepIndex:Math.floor(n/b)%x,beatIndex:Math.floor(n/(b*x))%36}}function C(e){let t=(0,c.useRef)(null);(0,c.useEffect)(()=>{let n=setInterval(()=>{let{pulseIndex:n,stepIndex:r,beatIndex:i}=S(Date.now());n!==t.current&&(e.onPulse?.(n),n%b===0&&e.onStep?.(r),n%(b*x)===0&&e.onBeat?.(i),t.current=n)},y);return()=>clearInterval(n)},[e])}var w={Root:`#FF0033`,Sacral:`#FF8000`,Solar:`#FFD700`,Heart:`#00FF99`,Throat:`#33CCFF`,ThirdEye:`#9933FF`,Crown:`#AA00FF`};function T(e,t,n,r,i){e.save(),e.translate(n,r);let{chakraDay:a,pulse:o}=t.meta,s=w[a]??`#00FFFF`;e.beginPath(),e.arc(0,0,i+4,0,Math.PI*2),e.fillStyle=s,e.shadowColor=s,e.shadowBlur=15,e.fill(),e.beginPath(),e.arc(0,0,i,0,Math.PI*2),e.fillStyle=`#000012`,e.fill();let c=i+o%11*1.5;e.beginPath(),e.arc(0,0,c,0,Math.PI*2),e.strokeStyle=`${s}AA`,e.lineWidth=1.5,e.stroke(),e.restore()}var E=`kai:game:focus`,D=typeof window<`u`;function O(){if(!D||typeof BroadcastChannel>`u`)return null;try{return new BroadcastChannel(`kai-realms-game-focus`)}catch{return null}}function k(e){let t={id:e,ts:Date.now()};if(D)try{window.dispatchEvent(new CustomEvent(E,{detail:t}))}catch{}let n=O();if(n)try{n.postMessage({type:E,detail:t})}catch{}finally{try{n.close()}catch{}}}function A(e){let t=t=>{let n=t;n?.detail&&e(n.detail)};D&&window.addEventListener(E,t);let n=O(),r=t=>{let n=t?.data;n?.type===E&&n.detail&&e(n.detail)};if(n)try{n.addEventListener(`message`,r)}catch{}return()=>{if(D&&window.removeEventListener(E,t),n)try{n.removeEventListener(`message`,r)}catch{}finally{try{n.close()}catch{}}}}function j(e){let[t,n]=(0,c.useState)(!1),r=(0,c.useRef)(0);return(0,c.useEffect)(()=>A(t=>{n(t.id!==e),r.current=t.ts}),[e]),{paused:t,takeFocus:(0,c.useCallback)(()=>{k(e),n(!1)},[e])}}var M=5236,N=.085,P=1,F=60,I=6.1,L=5.6,ee=.1,te=1.6,R=10,ne=50,re=150,ie=10,ae=Math.floor(M*1.25),oe=.145,se=2.618,ce=M,z=M,le=1e3,ue=.12,B=44,de=.618,fe=.35,pe=3,me=`600 12px ui-sans-serif,system-ui,-apple-system`,V={up:{x:0,y:-1},down:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},none:{x:0,y:0}},H={up:`down`,down:`up`,left:`right`,right:`left`,none:`none`};function he(e,t,n){return e+(t-e)*n}function U(e,t){return(e-t+M)%M/M}function ge(e){let t=Math.sin(Math.PI*e);return .78+.44*(t*t)}function _e(e){let t=e.toLowerCase();return t===`arrowup`||t===`w`?`up`:t===`arrowdown`||t===`s`?`down`:t===`arrowleft`||t===`a`?`left`:t===`arrowright`||t===`d`?`right`:`none`}function W(e,t,n){let r=Math.round(n),i=Math.round(t);return r<0||r>=e.length||i<0||i>=e[0].length?!1:e[r][i]!==1}function G(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function K(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function ve(){let e=Array.from({length:23},()=>Array(27).fill(1));((t,n,r,i)=>{for(let a=n;a0&&a<22&&n>0&&n<26&&(e[a][n]=0)})(1,1,25,21);for(let t=2;t<25;t++)e[5][t]=1,e[17][t]=1;for(let t=2;t<21;t++)e[t][4]=1,e[t][22]=1;for(let t=6;t<21;t++)e[11][t]=0;for(let t=4;t<19;t++)e[t][13]=0;for(let t=1;t<22;t++)for(let n=1;n<26;n++)e[t][n]===0&&(e[t][n]=2);for(let t of[{x:6,y:6},{x:20,y:6},{x:6,y:16},{x:20,y:16}])e[t.y][t.x]=3;for(let t of[{x:2,y:2},{x:24,y:2},{x:2,y:20},{x:24,y:20}])e[t.y]?.[t.x]!==1&&(e[t.y][t.x]=4);return e}function ye(e){return{pos:{x:e.x,y:e.y},dir:`left`,next:`left`,speed:I}}function q(e,t,n){return{pos:{x:e.x,y:e.y},dir:`left`,speed:L,scatterTarget:n,mode:`chase`,frightUntil:0,color:t}}function be(e){let t=0;for(let n=0;n=.1||i>=.1)return!1;let a=0;return[`up`,`down`,`left`,`right`].forEach(t=>{W(e,n.x+V[t].x,n.y+V[t].y)&&a++}),a>=3}function we(e,t){if(t.next===`none`||t.next===t.dir)return;if(t.next===H[t.dir]){t.dir=t.next;return}let n=G(t.pos),r=Math.abs(t.pos.x-n.x),i=Math.abs(t.pos.y-n.y);r>=.12||i>=.12||W(e,n.x+V[t.next].x,n.y+V[t.next].y)&&(t.pos.x=n.x,t.pos.y=n.y,t.dir=t.next)}function Te(e,t,n,r,i){if(n===`none`)return;let a=V[n],o=t.x+a.x*r*i,s=t.y+a.y*r*i,c=e[0].length;if(o<-1){t.x=c+1;return}if(o>c+1){t.x=-1;return}if(W(e,Math.round(o),Math.round(s)))t.x=o,t.y=s;else{let e=G(t);t.x=e.x,t.y=e.y}}function Ee(e,t,n,r){let i=[`up`,`left`,`down`,`right`],a=n,o=1/0;for(let s of i){if(s===H[n])continue;let i=Math.round(t.x)+V[s].x,c=Math.round(t.y)+V[s].y;if(!W(e,i,c))continue;let l=K({x:i,y:c},r);l{let r=(0,c.useRef)(null),i=(0,c.useRef)(null),{paused:a,takeFocus:o}=j(`KaiMaze`),[s,l]=(0,c.useState)({w:0,h:0});(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e){let e=t.contentRect;l({w:e.width,h:e.height})}});return t.observe(e),()=>t.disconnect()},[]);let[u,d]=(0,c.useState)(e);(0,c.useEffect)(()=>d(e),[e]);let[f,p]=(0,c.useState)(()=>xe(1,performance.now())),m=(0,c.useRef)(performance.now()),[h,_]=(0,c.useState)(()=>{if(typeof window>`u`)return!1;let e=window.matchMedia?.(`(pointer: coarse)`)?.matches??!1,t=window.matchMedia?.(`(max-width: 900px)`)?.matches??!1;return e||t});(0,c.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(`(pointer: coarse)`),t=window.matchMedia(`(max-width: 900px)`),n=()=>_(e.matches||t.matches);return e.addEventListener?.(`change`,n),t.addEventListener?.(`change`,n),()=>{e.removeEventListener?.(`change`,n),t.removeEventListener?.(`change`,n)}},[]);let v=(0,c.useMemo)(()=>e=>Math.floor(le*(1+ue*(e-1))),[]),y=(0,c.useMemo)(()=>h&&!f.over,[h,f.over]),b=(0,c.useMemo)(()=>(h?`Tap/Swipe or D-pad`:`←↑→↓ / WASD`)+` · B/Space to Channel on ⟐ · Esc to exit`,[h]);(0,c.useEffect)(()=>{if(P>0&&u>=P){let e=u-P;d(e),t(e),o()}},[]);let x=()=>{p(e=>e.channelingUntil?{...e,channelingUntil:0}:e)};(0,c.useEffect)(()=>{let e=e=>{let t=e.key.toLowerCase(),r=_e(t);r!==`none`&&(x(),e.preventDefault(),o(),p(e=>({...e,player:{...e.player,next:r}}))),(t===`b`||t===` `)&&f.onAltar&&f.channelingUntil===0&&(o(),p(e=>({...e,channelingUntil:performance.now()+z}))),t===`escape`&&n&&n(),t===`r`&&f.over&&(o(),p(xe(1,performance.now())),m.current=performance.now())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,f.over,f.onAltar,f.channelingUntil]);let S=e=>{x(),o(),p(t=>({...t,player:{...t.player,next:e}}))},C=()=>{f.onAltar&&f.channelingUntil===0&&(o(),p(e=>({...e,channelingUntil:performance.now()+z})))};(0,c.useEffect)(()=>{let e=0,n=performance.now(),r=(e,n)=>{if(n.channelingUntil===0||!n.onAltar||e0){let e=Math.floor(a*r),i=Math.max(0,n.bankable-e),o=u+a;return d(o),t(o),{...n,scorePhi:n.scorePhi+a,bankable:i,points:i,kaiCharge:Math.max(0,Math.floor(n.kaiCharge*.5)),channelingUntil:0}}return{...n,channelingUntil:0}},i=()=>{e=requestAnimationFrame(i);let o=performance.now(),s=Math.min(1/F,(o-n)/1e3);n=o,!a&&p(e=>{if(e.over)return e;let n=structuredClone(e);if(o>=n.cycle.nextSwitchAt){let e=n.cycle.phase===`chase`?`scatter`:`chase`;n.cycle={phase:e,nextSwitchAt:o+Se(n.level,e)};for(let t of n.ghosts)t.mode!==`fright`&&(t.mode=e)}let i=U(o,m.current),a=ge(i),c=Math.min(1+n.streak*ee,te),l=Math.min(1+n.streak*oe,se),f=n.channelingUntil>0?0:n.player.speed*a*c;we(n.grid,n.player),Te(n.grid,n.player.pos,n.player.dir,f,s);let p=G(n.player.pos);n.onAltar=n.grid[p.y]?.[p.x]===4;let h=n.grid[p.y]?.[p.x]??1;if((h===2||h===3)&&n.channelingUntil===0){let e=Math.abs(i-.5)<=N,t=h===2?R:ne;if(e&&(t+=ie,n.kaiCharge=Math.min(B,n.kaiCharge+1)),t=Math.floor(t*l),n.points+=t,n.bankable=n.points,n.streak+=1,n.streak>n.bestStreak&&(n.bestStreak=n.streak),n.comboUntil=o+ae,n.grid[p.y][p.x]=0,n.pellets=Math.max(0,n.pellets-1),h===3){m.current=o;let e=Math.max(ce*Math.max(.55,1-(n.level-1)*.08),M*.5);for(let t of n.ghosts)t.mode=`fright`,t.frightUntil=o+e}}n.comboUntil>0&&o>n.comboUntil&&(n.streak=Math.max(0,Math.floor(n.streak*.5)),n.comboUntil=0);for(let e of n.ghosts){e.mode===`fright`&&o>=e.frightUntil&&(e.mode=n.cycle.phase);let t=G(n.player.pos);if(Ce(n.grid,e.pos))if(e.mode===`scatter`)e.dir=Ee(n.grid,e.pos,e.dir,e.scatterTarget);else if(e.mode===`fright`){let r=G(e.pos),i=[`up`,`down`,`left`,`right`],a=e.dir,o=-1/0;for(let s of i){if(s===H[e.dir])continue;let i=r.x+V[s].x,c=r.y+V[s].y;if(!W(n.grid,i,c))continue;let l=K({x:i,y:c},t);l>o&&(o=l,a=s)}e.dir=a}else{let r={x:t.x+V[n.player.dir].x*2,y:t.y+V[n.player.dir].y*2};e.dir=Ee(n.grid,e.pos,e.dir,r)}let r=e.mode===`fright`?he(.6,.8,Math.sin(i*Math.PI)):a,c=e.speed*r;if(c*=1.06**(n.level-1),Te(n.grid,e.pos,e.dir,c,s),K(n.player.pos,e.pos)<.4)if(e.mode===`fright`&&n.channelingUntil===0){let t=Math.floor(re*l);n.points+=t,n.bankable=n.points,n.streak+=1,n.streak>n.bestStreak&&(n.bestStreak=n.streak),n.comboUntil=o+ae,e.pos={...e.scatterTarget},e.dir=`left`,e.mode=`scatter`,e.frightUntil=0}else if(--n.lives,n.streak=0,n.comboUntil=0,n.points=Math.max(0,Math.floor(n.points*(1-fe))),n.bankable=n.points,n.channelingUntil=0,n.lives<=0)n.alive=!1,n.over=!0;else{let e={x:Math.floor(n.grid[0].length/2),y:n.grid.length-4};n.player.pos={...e},n.player.dir=`left`,n.player.next=`left`;for(let e of n.ghosts)e.mode=`scatter`;m.current=o}}if(n.pellets<=0&&!n.over){let e=v(n.level),r=Math.floor(n.bankable*.2/e);if(r>0){let i=r*e,a=Math.max(0,n.bankable-i),o=u+r;d(o),t(o),n.scorePhi+=r,n.bankable=a,n.points=a}let i=xe(n.level+1,o);i.scorePhi=n.scorePhi,i.lives=Math.max(1,n.lives),i.bestStreak=Math.max(n.bestStreak,n.streak),i.player.speed=n.player.speed*1.06;for(let e of i.ghosts)e.speed*=1.06;return m.current=o,i}return n=r(o,n),n})};return e=requestAnimationFrame(i),()=>cancelAnimationFrame(e)},[t,u,a,v]),(0,c.useEffect)(()=>{let e=0,t=()=>{e=requestAnimationFrame(t);let n=i.current,o=r.current;if(!n||!o)return;let c=n.getContext(`2d`);if(!c)return;let l=Math.max(0,s.w),d=Math.max(0,s.h);if(l===0||d===0)return;let p=Math.min(2,window.devicePixelRatio||1);(n.width!==Math.floor(l*p)||n.height!==Math.floor(d*p))&&(n.width=Math.floor(l*p),n.height=Math.floor(d*p),n.style.width=`${l}px`,n.style.height=`${d}px`),c.setTransform(p,0,0,p,0,0);let h=f.grid.length,g=f.grid[0].length,_=Math.floor(Math.min(l/g,d/h)),v=_*g,y=_*h,b=Math.floor((l-v)/2),x=Math.floor((d-y)/2),S=c.createLinearGradient(0,0,0,d);S.addColorStop(0,`#07071a`),S.addColorStop(1,`#0c1231`),c.fillStyle=S,c.fillRect(0,0,l,d),Me(c,l,d);for(let e=0;e0&&f.onAltar){let e=1-Math.max(0,f.channelingUntil-w)/z,t=l/2;c.strokeStyle=`rgba(0,255,208,0.9)`,c.lineWidth=4,c.globalAlpha=.9,c.beginPath(),c.arc(t,34,16,-Math.PI/2,-Math.PI/2+e*Math.PI*2),c.stroke(),c.globalAlpha=1,c.font=`700 12px ui-sans-serif,system-ui,-apple-system`,c.fillText(`Channeling…`,t+16+8,38)}if(a&&!f.over){c.fillStyle=`rgba(0,0,0,0.35)`,c.fillRect(0,0,l,d),c.fillStyle=`#fff`,c.font=`700 16px ui-sans-serif,system-ui,-apple-system`;let e=`Paused — another Realm is active`;c.fillText(e,(l-c.measureText(e).width)/2,d/2)}if(f.over){c.fillStyle=`rgba(0,0,0,0.55)`,c.fillRect(0,0,l,d),c.fillStyle=`#fff`,c.font=`700 20px ui-sans-serif,system-ui,-apple-system`;let e=`Game Over — Press R to restart`;c.fillText(e,(l-c.measureText(e).width)/2,d/2)}};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[f,u,s,a]);let w=f.onAltar&&f.channelingUntil===0;return(0,g.jsxs)(`div`,{className:`km-wrap`,role:`group`,"aria-label":`Kai-Maze`,onPointerDown:()=>o(),onTouchStart:()=>o(),onMouseDown:()=>o(),children:[(0,g.jsxs)(`div`,{className:`km-header`,children:[(0,g.jsx)(`div`,{className:`km-title`,children:`🌀 Kai-Maze`}),(0,g.jsx)(`div`,{className:`km-sub`,children:`Score on pulse, risk your points, then ⟐ channel to mint Φ.`})]}),(0,g.jsxs)(`div`,{className:`km-stage`,ref:r,children:[(0,g.jsx)(`canvas`,{ref:i,className:`km-canvas`}),y&&(0,g.jsxs)(`div`,{className:`km-dpad`,style:{position:`absolute`,left:12,bottom:12,width:132,height:132,display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gridTemplateRows:`repeat(3, 1fr)`,gap:6,touchAction:`none`,userSelect:`none`,zIndex:4},"aria-label":`Directional pad`,children:[(0,g.jsx)(`div`,{}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move up`,onPointerDown:e=>{e.preventDefault(),S(`up`)},children:`▲`}),(0,g.jsx)(`div`,{}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move left`,onPointerDown:e=>{e.preventDefault(),S(`left`)},children:`◀`}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:{...J,opacity:.9},"aria-label":`Hold to Channel (if on altar)`,onPointerDown:e=>{e.preventDefault(),C()},title:`Channel one breath to convert points → Φ`,children:`⟐`}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move right`,onPointerDown:e=>{e.preventDefault(),S(`right`)},children:`▶`}),(0,g.jsx)(`div`,{}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move down`,onPointerDown:e=>{e.preventDefault(),S(`down`)},children:`▼`}),(0,g.jsx)(`div`,{})]}),w&&(0,g.jsx)(`button`,{className:`km-chan-btn`,onClick:()=>{o(),p(e=>e.channelingUntil?e:{...e,channelingUntil:performance.now()+z})},"aria-label":`Channel points into Phi`,title:`Channel one breath to convert points → Φ`,children:`⟐ CHANNEL`}),f.channelingUntil>0&&(0,g.jsx)(`button`,{className:`km-chan-cancel`,onClick:()=>{o(),p(e=>({...e,channelingUntil:0}))},"aria-label":`Cancel channeling`,title:`Cancel`,children:`Cancel`})]}),(0,g.jsxs)(`div`,{className:`km-footer`,children:[(0,g.jsx)(`button`,{className:`km-btn`,onClick:n,title:`Back`,children:`Back`}),(0,g.jsx)(`div`,{className:`km-hint`,children:b})]})]})};function Oe(e,t,n,r,i){e.save(),e.fillStyle=i,e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fill(),e.strokeStyle=`rgba(255,255,255,0.35)`,e.lineWidth=1.25,e.stroke(),e.restore()}function ke(e,t,n,r,i){e.save(),e.fillStyle=i,e.beginPath(),e.arc(t,n,r,Math.PI,0),e.lineTo(t+r,n+r*.85),e.lineTo(t-r,n+r*.85),e.closePath(),e.fill(),e.fillStyle=`#fff`,e.beginPath(),e.arc(t-r*.35,n-r*.15,r*.16,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(t+r*.35,n-r*.15,r*.16,0,Math.PI*2),e.fill(),e.fillStyle=`rgba(0,0,0,0.7)`,e.beginPath(),e.arc(t-r*.3,n-r*.15,r*.08,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(t+r*.3,n-r*.15,r*.08,0,Math.PI*2),e.fill(),e.restore()}function Ae(e,t,n){let r=Math.min(460,Math.max(220,t*.5)),i=t/2,a=r/2;e.save(),e.globalAlpha=.35,e.strokeStyle=`rgba(0,255,208,.6)`,e.lineWidth=2,e.beginPath(),e.moveTo(i-a,20),e.lineTo(i+a,20),e.stroke();let o=je(r*N*2);e.globalAlpha=.2,e.fillStyle=`#ffd36e`,e.fillRect(i-o,17,o*2,6),e.globalAlpha=.9,e.fillStyle=`#00ffd0`;let s=i-a+n*r;e.beginPath(),e.arc(s,20,4,0,Math.PI*2),e.fill(),e.restore()}function je(e){return e/2}function Me(e,t,n){e.save(),e.globalAlpha=.08,e.strokeStyle=`rgba(255,255,255,0.15)`,e.lineWidth=1;let r=t/2,i=n/2,a=(1+Math.sqrt(5))/2,o=4;for(let s=0;s<8;s++){let s=Math.min(t,n)/o;e.beginPath(),e.arc(r,i,s,-Math.PI/2,Math.PI),e.stroke(),o*=a}e.restore()}var J={background:`linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04))`,border:`1px solid rgba(255,255,255,0.25)`,borderRadius:10,color:`rgba(255,255,255,0.9)`,fontSize:18,lineHeight:1,padding:0,display:`flex`,alignItems:`center`,justifyContent:`center`,minWidth:36,minHeight:36,touchAction:`none`};(()=>{let e=Array.from({length:31},()=>Array.from({length:28},()=>2));for(let t=0;t<28;t++)e[0][t]=1,e[30][t]=1;for(let t=0;t<31;t++)e[t][0]=1,e[t][27]=1;for(let t=4;t<24;t+=6)for(let n=4;n<27;n+=6)e[n][t]=1,e[n][t+1]=1,e[n+1][t]=1,e[n+1][t+1]=1;for(let t=2;t<26;t++)e[15][t]=0;e[1][1]=3,e[1][26]=3,e[29][1]=3,e[29][26]=3;for(let t=2;t<29;t++)e[t][14]=0;for(let t=2;t<26;t++)e[11][t]=0;return e})();var Ne=5236,Y=3,Pe=Y*2,Fe=2,Ie=.15,Le=220,Re=60,ze=20;function Be(e){return(Math.imul(e^2654435769,2654435761)>>>0)%1e5/1e5}function Ve(e,t){let n=Math.abs(e-t)%360;return n>180&&(n=360-n),n}var He=({currentPhi:e,onPhiChange:t})=>{let[n,r]=(0,c.useState)(`forge`),[i,a]=(0,c.useState)(null),[o,s]=(0,c.useState)(performance.now()),[l,u]=(0,c.useState)(0),[d,f]=(0,c.useState)(!1),[p,m]=(0,c.useState)(null),[h,_]=(0,c.useState)(0);C({onPulse:e=>{a(e),s(performance.now()),m(e=>e&&{...e,delta:e.delta})}}),(0,c.useEffect)(()=>{if(n!==`forge`)return;let e=0,t=!0,r=()=>{if(!t)return;let n=performance.now();u(Math.max(0,n-o)%Ne/Ne*360%360),e=requestAnimationFrame(r)};return e=requestAnimationFrame(r),()=>{t=!1,cancelAnimationFrame(e)}},[o,n]);let v=(0,c.useMemo)(()=>{let e=i??0,t=Math.floor(Be(e)*360),n=Re+(e%2==0?ze:0)-Math.min(20,Math.floor(h*6));return{centerDeg:t,halfWidthDeg:Math.max(10,n/2)}},[i,h]),y=(0,c.useMemo)(()=>n===`forge`&&!d&&e>=Y&&i!==null,[n,d,e,i]),b=(0,c.useCallback)(e=>{let t=Pe,n=1+h*Ie,r=e?Fe:1;return Math.floor(t*n*r)},[h]),x=(0,c.useCallback)(()=>{if(!y)return;let n=e-Y;t(n),f(!0),m(null);let r=Ve(l,v.centerDeg),i=Math.max(4,v.halfWidthDeg*.25),a=r<=v.halfWidthDeg,o=a&&r<=i;window.setTimeout(()=>{if(a){let e=b(o);t(n+e),_(e=>e+1),m({kind:o?`crit`:`hit`,delta:e})}else _(0),m({kind:`miss`,delta:-Y});f(!1)},650)},[y,e,t,l,v.centerDeg,v.halfWidthDeg,b]);return(0,c.useEffect)(()=>{if(n!==`forge`)return;let e=e=>{let t=e.key.toLowerCase();(t===` `||t===`enter`)&&(e.preventDefault(),x())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,x]),(0,g.jsx)(`div`,{className:`pf-wrap`,role:`group`,"aria-label":`Pulse Forge`,children:n===`forge`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`pf-header`,children:[(0,g.jsx)(`div`,{className:`pf-title`,children:`⚒️ Pulse Forge`}),(0,g.jsx)(`div`,{className:`pf-sub`,children:`Time your lock to the target arc. Breathe, focus, forge.`}),(0,g.jsx)(`div`,{style:{marginLeft:`auto`,display:`flex`,gap:8},children:(0,g.jsx)(`button`,{type:`button`,className:`pf-lock-btn`,onClick:()=>r(`maze`),title:`Switch to Kai-Maze`,children:`Play Kai-Maze`})})]}),(0,g.jsxs)(`div`,{className:`pf-board`,children:[(0,g.jsxs)(`div`,{className:`pf-dial`,style:{width:Le,height:Le},children:[(0,g.jsx)(`div`,{className:`pf-arc`,style:{"--arc-center":`${v.centerDeg}deg`,"--arc-half":`${v.halfWidthDeg}deg`},"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`pf-marker ${d?`pf-marker--lock`:``}`,style:{transform:`rotate(${l}deg)`},"aria-hidden":!0,children:(0,g.jsx)(`div`,{className:`pf-marker-head`})}),(0,g.jsx)(`div`,{className:`pf-rim`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`pf-ticks`,"aria-hidden":!0,children:Array.from({length:12}).map((e,t)=>(0,g.jsx)(`span`,{style:{transform:`rotate(${t*30}deg)`}},t))})]}),(0,g.jsxs)(`div`,{className:`pf-hud`,children:[(0,g.jsxs)(`div`,{className:`pf-chip`,title:`Your Φ`,children:[(0,g.jsx)(`span`,{className:`pf-chip__label`,children:`Φ`}),(0,g.jsx)(`span`,{className:`pf-chip__val`,children:e})]}),(0,g.jsxs)(`div`,{className:`pf-chip`,title:`Streak`,children:[(0,g.jsx)(`span`,{className:`pf-chip__label`,children:`Streak`}),(0,g.jsx)(`span`,{className:`pf-chip__val`,children:h})]}),(0,g.jsxs)(`div`,{className:`pf-chip`,title:`Pulse`,children:[(0,g.jsx)(`span`,{className:`pf-chip__label`,children:`Pulse`}),(0,g.jsx)(`span`,{className:`pf-chip__val`,children:i??`—`})]})]})]}),(0,g.jsxs)(`div`,{className:`pf-cta`,children:[(0,g.jsx)(`button`,{className:`pf-lock-btn`,onClick:x,disabled:!y,"aria-disabled":!y,title:y?`Press Space/Enter to Lock`:`Insufficient Φ or syncing…`,children:d?`Locking…`:`Lock (−${Y} Φ)`}),(0,g.jsxs)(`div`,{className:`pf-hint`,children:[`Press `,(0,g.jsx)(`kbd`,{children:`Space`}),` or `,(0,g.jsx)(`kbd`,{children:`Enter`}),` at the right moment. Even pulses widen the target.`]})]}),p&&(0,g.jsxs)(`div`,{className:`pf-result pf-result--${p.kind}`,role:`status`,"aria-live":`polite`,children:[p.kind===`hit`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`pf-result__emoji`,children:`✅`}),(0,g.jsxs)(`span`,{className:`pf-result__text`,children:[`Resonant lock! +`,p.delta,` Φ`]})]}),p.kind===`crit`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`pf-result__emoji`,children:`💥`}),(0,g.jsxs)(`span`,{className:`pf-result__text`,children:[`Perfect lock! +`,p.delta,` Φ`]})]}),p.kind===`miss`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`pf-result__emoji`,children:`❌`}),(0,g.jsx)(`span`,{className:`pf-result__text`,children:`Miss — breathe again.`})]})]})]}):(0,g.jsx)(De,{currentPhi:e,onPhiChange:t,onExit:()=>r(`forge`)})})};function Ue(){return`kai-${Math.random().toString(36).slice(2,8)}`}function We(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.x==`number`&&typeof t.pulseIndex==`number`&&typeof t.chakraDay==`string`&&typeof t.glyph==`object`&&t.glyph!==null}var Ge=null;async function Ke(){return Ge||(Ge=(await i(()=>import(`./bundler-Dg82q-6n.js`),__vite__mapDeps([0,1,2]))).default,Ge)}function qe(e){let[t]=(0,c.useState)(()=>e??Ue()),[n,r]=(0,c.useState)([]),[i,a]=(0,c.useState)([]),o=(0,c.useRef)(null),s=(0,c.useRef)({}),l=(0,c.useCallback)((e,t)=>{if(!We(t))return;let n={...t,id:e,glyph:t.glyph};a(t=>{let r=t.findIndex(t=>t.id===e);if(r>=0){let e=[...t];return e[r]=n,e}return[...t,n]})},[]),u=(0,c.useCallback)((e,t)=>{We(e)&&l(t,e)},[l]);return(0,c.useEffect)(()=>{let e=!1;return(async()=>{let n=await Ke();if(e)return;let i=new n(t);o.current=i,i.on(`open`,()=>{r(e=>e)}),i.on(`connection`,e=>{s.current[e.peer]=e,r(t=>Array.from(new Set([...t,e.peer]))),e.on(`data`,t=>{u(t,e.peer)}),e.on(`close`,()=>{delete s.current[e.peer],r(t=>t.filter(t=>t!==e.peer)),a(t=>t.filter(t=>t.id!==e.peer))})})})().catch(e=>{console.error(`[KaiRealms] Peer init failed:`,e)}),()=>{e=!0;try{o.current?.destroy()}catch(e){console.warn(`[KaiRealms] Peer destroy failed:`,e)}o.current=null,s.current={},r([]),a([])}},[t,u]),{sessionId:t,peers:n,sendState:(0,c.useCallback)(e=>{let t=Object.values(s.current);for(let n of t)n.open&&n.send(e)},[]),remoteStates:i}}var Je=800,Ye=500,Xe=Je/Ye,X=28,Z=10,Ze=360,Qe=10,Q=5236,$e=.08,et=22,tt=90,nt=80,rt=2,it=4,at=10,ot=3,st=1,ct=3,lt=1,ut=1,$=(e,t,n)=>en?n:e,dt=({glyphData:e,onExit:t})=>{let n=(0,c.useRef)(null),r=(0,c.useRef)(null),i=(0,c.useRef)(null),[a,o]=(0,c.useState)({w:Je,h:Ye}),s=(0,c.useRef)(a);(0,c.useEffect)(()=>{s.current=a},[a]);let[l,u]=(0,c.useState)(0),[d,f]=(0,c.useState)(0),[p,m]=(0,c.useState)(!1),[h,_]=(0,c.useState)(ot),[v,y]=(0,c.useState)(0),[b,x]=(0,c.useState)(0),[S,w]=(0,c.useState)(!1),T=(0,c.useRef)(performance.now()),{sendState:E,remoteStates:D}=qe(),O=(0,c.useRef)([]);(0,c.useEffect)(()=>{O.current=D??[]},[D]);let k=(0,c.useRef)(Je/2),A=(0,c.useRef)([]),j=(0,c.useRef)({}),M=(0,c.useRef)(null),N=(0,c.useRef)(null),P=(0,c.useRef)(null),F=(0,c.useRef)(0),I=(0,c.useRef)(0),L=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=n.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0].contentRect,n=Math.max(320,Math.min(960,t.width));o({w:n,h:Math.round(n/Xe)})});return t.observe(e),()=>t.disconnect()},[]),(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=e.getContext(`2d`);if(!t)return;let n=Math.min(2,window.devicePixelRatio||1);e.style.width=`${a.w}px`,e.style.height=`${a.h}px`,e.width=Math.floor(a.w*n),e.height=Math.floor(a.h*n),t.setTransform(n,0,0,n,0,0),i.current=t,k.current=$(k.current,X,a.w-X)},[a]),(0,c.useEffect)(()=>{let e=e=>{j.current[e.key]=!0,e.key.toLowerCase()===`p`&&m(e=>!e),e.key.toLowerCase()===`r`&&S&&re()},t=e=>{j.current[e.key]=!1};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t)}},[S]),(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=t=>{let n=e.getBoundingClientRect();return $((t-n.left)/n.width*s.current.w,X,s.current.w-X)},n=!1,i=e=>{n=!0,k.current=t(e.clientX)},a=e=>{n&&(k.current=t(e.clientX))},o=()=>{n=!1};return e.addEventListener(`pointerdown`,i),e.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o),()=>{e.removeEventListener(`pointerdown`,i),e.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o)}},[]);let ee=e=>Math.max(0,e-T.current)%Q/Q,te=e=>{let t=Math.sin(Math.PI*e);return .65+.7*(t*t)},R=e=>{let{w:t}=s.current,n=performance.now(),r=Math.random()*(t-2*Z)+Z,i=-Z*2,a=(Math.random()-.5)*40,o=(e===`gold`?nt:tt)+v*(at*.2),c={id:`${e}-${n}-${Math.floor(Math.random()*1e6)}`,x:r,y:i,vx:a,baseVy:o,kind:e,bornAt:n},l=A.current.slice(-(et-1));l.push(c),A.current=l};C({onPulse:e=>{f(e),T.current=performance.now(),I.current+=1;for(let e=0;e{let n=P.current,r=k.current,i=d;if(!n||Math.abs(n.x-r)>=1||n.pulseIndex!==i||t-F.current>1e3/Qe){P.current={x:r,pulseIndex:i},F.current=t;try{E({id:`you`,x:r,pulseIndex:i,chakraDay:e.meta.chakraDay,glyph:e})}catch{}}};(0,c.useEffect)(()=>{let t=r.current,n=i.current;if(!t||!n)return;let a=!0,o=t=>{if(!a)return;M.current=requestAnimationFrame(o);let r=N.current??t,i=Math.min(.05,(t-r)/1e3);N.current=t;let{w:c,h:l}=s.current,d=l-X-10;if(!p&&!S){let e=j.current,n=!!(e.ArrowLeft||e.a||e.A),r=!!(e.ArrowRight||e.d||e.D);n&&(k.current=$(k.current-Ze*i,X,c-X)),r&&(k.current=$(k.current+Ze*i,X,c-X));let a=k.current,o=performance.now(),s=ee(o),f=te(s),p=[],m=0,h=0,g=0;for(let e=0;ec-Z&&(t.x=c-Z,t.vx=-Math.abs(t.vx)*.9);let r=t.x-a,u=t.y-d;if(Math.hypot(r,u)l+Z){g+=1;continue}p.push(t)}if(m>0||h>0){let e=m+h;u(t=>t+e),y(e=>{let t=e+1;return x(e=>t>e?t:e),t})}g>0&&(u(e=>Math.max(0,e-st*g)),y(0),_(e=>{let t=Math.max(0,e-g);return t===0&&w(!0),t})),A.current=p,ne(t)}ft(n,e,k.current,d,p||S,A.current,O.current,s.current,T.current,L.current)};return M.current=requestAnimationFrame(o),()=>{a=!1,M.current!==null&&cancelAnimationFrame(M.current),M.current=null,N.current=null}},[e,p,S,a.w,a.h]);let re=()=>{A.current=[],_(ot),y(0),x(e=>e),w(!1)},ie=(0,c.useMemo)(()=>({pulse:d,chakraDay:e?.meta?.chakraDay??`—`}),[d,e?.meta?.chakraDay]);return(0,g.jsxs)(`div`,{className:`realm-wrap`,ref:n,children:[(0,g.jsxs)(`div`,{className:`realm-hud`,children:[(0,g.jsxs)(`div`,{className:`hud-chip hud-chip--score`,title:`Banked Φ`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Φ`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:l})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Streak`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Streak`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:v})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Lives`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Lives`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:h})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Current Pulse`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Pulse`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:ie.pulse})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Chakra Day`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Day`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:ie.chakraDay})]}),(0,g.jsx)(`button`,{className:`hud-button`,onClick:()=>m(e=>!e),"aria-pressed":p,title:`Pause (P)`,children:p?`Resume`:`Pause`})]}),(0,g.jsxs)(`div`,{className:`realm-canvas-wrap`,children:[(0,g.jsx)(`canvas`,{ref:r,className:`realm-canvas`,"aria-label":`Kai Realms Canvas`}),(p||S)&&(0,g.jsx)(`div`,{className:`realm-pause-overlay`,"aria-hidden":!0,children:(0,g.jsxs)(`div`,{className:`pause-card`,children:[(0,g.jsx)(`div`,{className:`pause-title`,children:S?`Game Over`:`Paused`}),(0,g.jsx)(`div`,{className:`pause-sub`,children:S?(0,g.jsxs)(g.Fragment,{children:[`Best Streak: `,(0,g.jsx)(`strong`,{children:b}),` — Press `,(0,g.jsx)(`kbd`,{children:`R`}),` to Restart`]}):(0,g.jsxs)(g.Fragment,{children:[`Press `,(0,g.jsx)(`kbd`,{children:`P`}),` or click Resume`]})}),S&&(0,g.jsx)(`button`,{className:`hud-button`,onClick:re,style:{marginTop:12},children:`Restart`})]})})]}),(0,g.jsx)(He,{currentPhi:l,onPhiChange:e=>u(e)}),(0,g.jsx)(`button`,{className:`exit-button`,onClick:t,children:`Exit Realm`})]})};function ft(e,t,n,r,i,a,o,s,c,l){let{w:u,h:d}=s,f=e.createLinearGradient(0,0,0,d);f.addColorStop(0,`#020211`),f.addColorStop(1,`#0b0f2a`),e.fillStyle=f,e.fillRect(0,0,u,d),e.save(),e.globalAlpha=.12;for(let t=0;t<40;t++){let n=t*197%u+t%3,r=t*127%d+t*11%7;e.fillStyle=`white`,e.fillRect(n,r,2,2)}e.restore(),pt(e,u,Math.max(36,Math.round(d*.06)),c);for(let t=0;t{let[n,r]=(0,c.useState)(null),i=(0,c.useRef)(null),a=(0,c.useRef)(null),o=(0,c.useCallback)(e=>r(e),[]),s=(0,c.useCallback)(()=>{r(null),t?.()},[t]);(0,c.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t?.()};return document.addEventListener(`keydown`,e),a.current?.focus(),()=>document.removeEventListener(`keydown`,e)},[t]),(0,c.useEffect)(()=>{let e=i.current;if(!e)return;let t=e=>e.stopPropagation();return e.addEventListener(`wheel`,t,{passive:!0}),()=>e.removeEventListener(`wheel`,t)},[]);let l=()=>t?.(),u=e=>e.stopPropagation();return(0,g.jsxs)(`div`,{className:`realms-backdrop realms-veil`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`kai-realms-title`,onMouseDown:l,children:[(0,g.jsx)(`div`,{className:`realms-stars`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`realms-halo realms-halo--1`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`realms-halo realms-halo--2`,"aria-hidden":!0}),(0,g.jsxs)(`div`,{ref:i,className:`realms-container glass-omni`,onMouseDown:u,role:`document`,children:[(0,g.jsx)(`div`,{className:`breath-ring breath-ring--outer`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`breath-ring breath-ring--inner`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`phi-grid`,"aria-hidden":!0}),(0,g.jsxs)(`header`,{className:`realms-header`,children:[(0,g.jsx)(`button`,{ref:a,type:`button`,className:`realms-close auric-btn`,"aria-label":`Close Kai Realms`,onClick:e=>{e.stopPropagation(),t?.()},onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),t?.())},children:(0,g.jsx)(e,{size:20,"aria-hidden":!0})}),(0,g.jsx)(`div`,{className:`header-seals`,"aria-hidden":!0,children:(0,g.jsxs)(`div`,{className:`seal-emblem`,children:[(0,g.jsx)(`div`,{className:`seal-ring`}),(0,g.jsx)(`div`,{className:`seal-ring seal-ring--inner`}),(0,g.jsx)(`div`,{className:`seal-core`})]})}),(0,g.jsx)(`h2`,{id:`kai-realms-title`,className:`sr-only`,children:`Kai Realms — Sigil Gate`})]}),(0,g.jsx)(`main`,{className:`realms-body`,children:n?(0,g.jsx)(`div`,{className:`realm-stage`,children:(0,g.jsx)(dt,{glyphData:n,onExit:s})}):(0,g.jsx)(`div`,{className:`portal-stage`,children:(0,g.jsx)(v,{onEnter:o})})}),(0,g.jsx)(`footer`,{className:`realms-footer`,"aria-hidden":!0,children:(0,g.jsx)(`div`,{className:`footer-center`,style:{margin:`0 auto`},children:(0,g.jsx)(gt,{})})})]})]})};function gt(){return(0,g.jsxs)(`svg`,{className:`seal-coin`,width:`56`,height:`56`,viewBox:`0 0 56 56`,"aria-hidden":!0,children:[(0,g.jsxs)(`defs`,{children:[(0,g.jsxs)(`radialGradient`,{id:`coinGlowRealms`,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:`#ffffff`,stopOpacity:`0.9`}),(0,g.jsx)(`stop`,{offset:`40%`,stopColor:`#ffd86b`,stopOpacity:`0.75`}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:`#ffd86b`,stopOpacity:`0.15`})]}),(0,g.jsxs)(`linearGradient`,{id:`coinEdgeRealms`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:`#00ffd0`,stopOpacity:`0.8`}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:`#8a2be2`,stopOpacity:`0.8`})]})]}),(0,g.jsx)(`circle`,{cx:`28`,cy:`28`,r:`26`,fill:`url(#coinGlowRealms)`,stroke:`url(#coinEdgeRealms)`,strokeWidth:`1.5`}),(0,g.jsxs)(`g`,{className:`seal-coin__rotor`,children:[(0,g.jsx)(`circle`,{cx:`28`,cy:`28`,r:`18`,fill:`none`,stroke:`url(#coinEdgeRealms)`,strokeWidth:`1.25`}),(0,g.jsxs)(`g`,{stroke:`rgba(255,255,255,0.35)`,strokeWidth:`0.6`,children:[(0,g.jsx)(`line`,{x1:`28`,y1:`10`,x2:`28`,y2:`46`}),(0,g.jsx)(`line`,{x1:`10`,y1:`28`,x2:`46`,y2:`28`}),(0,g.jsx)(`line`,{x1:`15`,y1:`15`,x2:`41`,y2:`41`}),(0,g.jsx)(`line`,{x1:`41`,y1:`15`,x2:`15`,y2:`41`})]})]}),(0,g.jsx)(`circle`,{className:`seal-coin__core`,cx:`28`,cy:`28`,r:`6.5`})]})}export{ht as default}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/bundler-C2y9Epw0.js","assets/index-BoQy35uR.js","assets/index-BgUnq8XG.css"])))=>i.map(i=>d[i]); +import{t as e}from"./x-CZulwBSL.js";import{E as t,Et as n,Vt as r,pi as i,ri as a,si as o,wt as s}from"./index-BoQy35uR.js";var c=i(o(),1);function l(e){return typeof e==`string`?e.toLowerCase():``}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e){return typeof e==`string`&&e.length>0}function f(e){return typeof e==`number`&&Number.isFinite(e)}function p(e){if(typeof e!=`object`||!e)throw Error(`Malformed sigil metadata.`);let t=e;for(let e of[`pulse`,`beat`,`stepIndex`,`chakraDay`])if(!u(t,e))throw Error(`Missing Kai field: ${e}`);if(!u(t,`kaiSignature`))throw Error(`Invalid Kai Signature — tampered or unsigned sigil.`);if(!f(t.pulse))throw Error(`Invalid field: pulse`);if(!f(t.beat))throw Error(`Invalid field: beat`);if(!f(t.stepIndex))throw Error(`Invalid field: stepIndex`);if(!d(t.chakraDay))throw Error(`Invalid field: chakraDay`);if(!d(t.kaiSignature))throw Error(`Invalid field: kaiSignature`)}function m(e){try{let t=new DOMParser().parseFromString(e,`image/svg+xml`),n=Array.from(t.getElementsByTagName(`metadata`)),r=[`valuation`,`ledger`,`dht`,`source`];for(let e of n){let t=e.getAttribute(`id`)??``;if(r.some(e=>t.includes(e)))continue;let n=(e.textContent??``).trim();if(!n)continue;let i=n.replace(/^$/,``);try{let e=JSON.parse(i);if(typeof e==`object`&&e&&u(e,`pulse`)&&u(e,`beat`)&&u(e,`stepIndex`)&&u(e,`chakraDay`)&&u(e,`kaiSignature`))return e}catch{}}return null}catch{return null}}async function h(e){let r=await e.text(),{meta:i,contextOk:a,typeOk:o}=await t(e),c=i&&u(i,`kaiSignature`)&&u(i,`pulse`)?i:m(r);if(!c||!a||!o)throw Error(`Invalid glyph or missing metadata.`);p(c);let d=c,f=await s(d);if(!f||l(f)!==l(d.kaiSignature))throw Error(`Invalid Kai Signature — tampered or unsigned sigil.`);let h=await n(d.kaiSignature);if(typeof d.userPhiKey==`string`){if(l(d.userPhiKey)!==l(h))throw Error(`Φ-Key mismatch — identity invalid.`)}else d.userPhiKey=h;return{svgText:r,meta:d,phiKey:h}}var g=i(r(),1),_=`.svg,image/svg+xml`,v=({onEnter:e})=>{let t=(0,c.useRef)(null),[n,r]=(0,c.useState)(!1),[i,a]=(0,c.useState)(!1),[o,s]=(0,c.useState)(``),[l,u]=(0,c.useState)(null),d=(0,c.useId)(),f=(0,c.useId)(),p=(0,c.useId)(),m=()=>{t.current&&(t.current.value=``)},v=(0,c.useCallback)(async t=>{u(null),s(t.name),a(!0);try{if(!(t.type===`image/svg+xml`||t.name.toLowerCase().endsWith(`.svg`)))throw Error(`Please upload a valid Kai Sigil (.svg).`);e(await h(t))}catch(e){u(e instanceof Error?e.message:`Invalid glyph or missing metadata.`)}finally{a(!1),m()}},[e]),y=(0,c.useCallback)(async e=>{let t=e.target.files?.[0];t&&await v(t)},[v]),b=(0,c.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),r(!1);let t=e.dataTransfer.files?.[0];t&&await v(t)},[v]),x=e=>{e.preventDefault(),e.dataTransfer.dropEffect=`copy`,n||r(!0)},S=e=>{e.currentTarget.contains(e.relatedTarget)||r(!1)},C=()=>t.current?.click(),w=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C())};return(0,g.jsxs)(`section`,{className:`portal-card glass-omni`,"aria-labelledby":d,"aria-describedby":f,children:[(0,g.jsx)(`div`,{className:`breath-ring breath-ring--outer`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`breath-ring breath-ring--inner`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`phi-grid`,"aria-hidden":!0}),(0,g.jsx)(`h1`,{id:d,className:`sr-only`,children:`Drop your Kai Sigil`}),(0,g.jsxs)(`div`,{className:`portal-body`,children:[(0,g.jsxs)(`div`,{className:`dropzone ${n?`dropzone--active`:``} ${i?`dropzone--busy`:``}`,role:`button`,tabIndex:0,onKeyDown:w,onClick:C,onDrop:b,onDragOver:x,onDragLeave:S,"aria-busy":i,"aria-describedby":`${f}${l?` ${p}`:``}`,children:[(0,g.jsxs)(`div`,{className:`dropzone-ornament`,"aria-hidden":!0,children:[(0,g.jsx)(`div`,{className:`ornament-ring ornament-ring--outer`}),(0,g.jsx)(`div`,{className:`ornament-ring ornament-ring--inner`}),(0,g.jsx)(`div`,{className:`ornament-core`})]}),(0,g.jsx)(`div`,{className:`dropzone-icon`,"aria-hidden":!0,children:(0,g.jsxs)(`svg`,{width:`44`,height:`44`,viewBox:`0 0 44 44`,children:[(0,g.jsx)(`defs`,{children:(0,g.jsxs)(`linearGradient`,{id:`dzG`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:`#00ffd0`}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:`#8a2be2`})]})}),(0,g.jsx)(`circle`,{cx:`22`,cy:`22`,r:`20`,fill:`none`,stroke:`url(#dzG)`,strokeWidth:`1.5`}),(0,g.jsx)(`path`,{d:`M22 12 L22 30 M14 20 L22 12 L30 20`,stroke:`url(#dzG)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`})]})}),(0,g.jsxs)(`div`,{className:`dropzone-text`,children:[(0,g.jsx)(`div`,{className:`dz-title`,children:`Inhale your Kai Sigil`}),(0,g.jsxs)(`div`,{id:f,className:`dz-hint`,children:[`Breath-minted `,(0,g.jsx)(`strong`,{children:`Φkey`}),` only. Drag & drop.`]}),o&&!i&&!l?(0,g.jsxs)(`div`,{className:`dz-file`,children:[`Selected: `,o]}):null,i?(0,g.jsxs)(`div`,{className:`dz-progress`,children:[(0,g.jsx)(`div`,{className:`dz-spinner`}),(0,g.jsx)(`span`,{children:`Verifying…`})]}):null]}),(0,g.jsx)(`input`,{ref:t,type:`file`,accept:_,onChange:y,tabIndex:-1,"aria-hidden":!0,className:`dz-input`})]}),l?(0,g.jsx)(`div`,{id:p,className:`portal-error`,role:`alert`,"aria-live":`polite`,children:l}):null,(0,g.jsx)(`p`,{className:`portal-note`,children:`Your sigil is verified by breath. No drift. Only truth.`})]}),(0,g.jsx)(`span`,{className:`sr-only`,children:`Kai Realms sigil gate ready.`})]})},y=5236,b=11,x=44;function S(e){let t=e-1715323541888,n=Math.floor(t/y);return{pulseIndex:n,stepIndex:Math.floor(n/b)%x,beatIndex:Math.floor(n/(b*x))%36}}function C(e){let t=(0,c.useRef)(null);(0,c.useEffect)(()=>{let n=setInterval(()=>{let{pulseIndex:n,stepIndex:r,beatIndex:i}=S(Date.now());n!==t.current&&(e.onPulse?.(n),n%b===0&&e.onStep?.(r),n%(b*x)===0&&e.onBeat?.(i),t.current=n)},y);return()=>clearInterval(n)},[e])}var w={Root:`#FF0033`,Sacral:`#FF8000`,Solar:`#FFD700`,Heart:`#00FF99`,Throat:`#33CCFF`,ThirdEye:`#9933FF`,Crown:`#AA00FF`};function T(e,t,n,r,i){e.save(),e.translate(n,r);let{chakraDay:a,pulse:o}=t.meta,s=w[a]??`#00FFFF`;e.beginPath(),e.arc(0,0,i+4,0,Math.PI*2),e.fillStyle=s,e.shadowColor=s,e.shadowBlur=15,e.fill(),e.beginPath(),e.arc(0,0,i,0,Math.PI*2),e.fillStyle=`#000012`,e.fill();let c=i+o%11*1.5;e.beginPath(),e.arc(0,0,c,0,Math.PI*2),e.strokeStyle=`${s}AA`,e.lineWidth=1.5,e.stroke(),e.restore()}var E=`kai:game:focus`,D=typeof window<`u`;function O(){if(!D||typeof BroadcastChannel>`u`)return null;try{return new BroadcastChannel(`kai-realms-game-focus`)}catch{return null}}function k(e){let t={id:e,ts:Date.now()};if(D)try{window.dispatchEvent(new CustomEvent(E,{detail:t}))}catch{}let n=O();if(n)try{n.postMessage({type:E,detail:t})}catch{}finally{try{n.close()}catch{}}}function A(e){let t=t=>{let n=t;n?.detail&&e(n.detail)};D&&window.addEventListener(E,t);let n=O(),r=t=>{let n=t?.data;n?.type===E&&n.detail&&e(n.detail)};if(n)try{n.addEventListener(`message`,r)}catch{}return()=>{if(D&&window.removeEventListener(E,t),n)try{n.removeEventListener(`message`,r)}catch{}finally{try{n.close()}catch{}}}}function j(e){let[t,n]=(0,c.useState)(!1),r=(0,c.useRef)(0);return(0,c.useEffect)(()=>A(t=>{n(t.id!==e),r.current=t.ts}),[e]),{paused:t,takeFocus:(0,c.useCallback)(()=>{k(e),n(!1)},[e])}}var M=5236,N=.085,P=1,F=60,I=6.1,L=5.6,ee=.1,te=1.6,R=10,ne=50,re=150,ie=10,ae=Math.floor(M*1.25),oe=.145,se=2.618,ce=M,z=M,le=1e3,ue=.12,B=44,de=.618,fe=.35,pe=3,me=`600 12px ui-sans-serif,system-ui,-apple-system`,V={up:{x:0,y:-1},down:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},none:{x:0,y:0}},H={up:`down`,down:`up`,left:`right`,right:`left`,none:`none`};function he(e,t,n){return e+(t-e)*n}function U(e,t){return(e-t+M)%M/M}function ge(e){let t=Math.sin(Math.PI*e);return .78+.44*(t*t)}function _e(e){let t=e.toLowerCase();return t===`arrowup`||t===`w`?`up`:t===`arrowdown`||t===`s`?`down`:t===`arrowleft`||t===`a`?`left`:t===`arrowright`||t===`d`?`right`:`none`}function W(e,t,n){let r=Math.round(n),i=Math.round(t);return r<0||r>=e.length||i<0||i>=e[0].length?!1:e[r][i]!==1}function G(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function K(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function ve(){let e=Array.from({length:23},()=>Array(27).fill(1));((t,n,r,i)=>{for(let a=n;a0&&a<22&&n>0&&n<26&&(e[a][n]=0)})(1,1,25,21);for(let t=2;t<25;t++)e[5][t]=1,e[17][t]=1;for(let t=2;t<21;t++)e[t][4]=1,e[t][22]=1;for(let t=6;t<21;t++)e[11][t]=0;for(let t=4;t<19;t++)e[t][13]=0;for(let t=1;t<22;t++)for(let n=1;n<26;n++)e[t][n]===0&&(e[t][n]=2);for(let t of[{x:6,y:6},{x:20,y:6},{x:6,y:16},{x:20,y:16}])e[t.y][t.x]=3;for(let t of[{x:2,y:2},{x:24,y:2},{x:2,y:20},{x:24,y:20}])e[t.y]?.[t.x]!==1&&(e[t.y][t.x]=4);return e}function ye(e){return{pos:{x:e.x,y:e.y},dir:`left`,next:`left`,speed:I}}function q(e,t,n){return{pos:{x:e.x,y:e.y},dir:`left`,speed:L,scatterTarget:n,mode:`chase`,frightUntil:0,color:t}}function be(e){let t=0;for(let n=0;n=.1||i>=.1)return!1;let a=0;return[`up`,`down`,`left`,`right`].forEach(t=>{W(e,n.x+V[t].x,n.y+V[t].y)&&a++}),a>=3}function we(e,t){if(t.next===`none`||t.next===t.dir)return;if(t.next===H[t.dir]){t.dir=t.next;return}let n=G(t.pos),r=Math.abs(t.pos.x-n.x),i=Math.abs(t.pos.y-n.y);r>=.12||i>=.12||W(e,n.x+V[t.next].x,n.y+V[t.next].y)&&(t.pos.x=n.x,t.pos.y=n.y,t.dir=t.next)}function Te(e,t,n,r,i){if(n===`none`)return;let a=V[n],o=t.x+a.x*r*i,s=t.y+a.y*r*i,c=e[0].length;if(o<-1){t.x=c+1;return}if(o>c+1){t.x=-1;return}if(W(e,Math.round(o),Math.round(s)))t.x=o,t.y=s;else{let e=G(t);t.x=e.x,t.y=e.y}}function Ee(e,t,n,r){let i=[`up`,`left`,`down`,`right`],a=n,o=1/0;for(let s of i){if(s===H[n])continue;let i=Math.round(t.x)+V[s].x,c=Math.round(t.y)+V[s].y;if(!W(e,i,c))continue;let l=K({x:i,y:c},r);l{let r=(0,c.useRef)(null),i=(0,c.useRef)(null),{paused:a,takeFocus:o}=j(`KaiMaze`),[s,l]=(0,c.useState)({w:0,h:0});(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e){let e=t.contentRect;l({w:e.width,h:e.height})}});return t.observe(e),()=>t.disconnect()},[]);let[u,d]=(0,c.useState)(e);(0,c.useEffect)(()=>d(e),[e]);let[f,p]=(0,c.useState)(()=>xe(1,performance.now())),m=(0,c.useRef)(performance.now()),[h,_]=(0,c.useState)(()=>{if(typeof window>`u`)return!1;let e=window.matchMedia?.(`(pointer: coarse)`)?.matches??!1,t=window.matchMedia?.(`(max-width: 900px)`)?.matches??!1;return e||t});(0,c.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(`(pointer: coarse)`),t=window.matchMedia(`(max-width: 900px)`),n=()=>_(e.matches||t.matches);return e.addEventListener?.(`change`,n),t.addEventListener?.(`change`,n),()=>{e.removeEventListener?.(`change`,n),t.removeEventListener?.(`change`,n)}},[]);let v=(0,c.useMemo)(()=>e=>Math.floor(le*(1+ue*(e-1))),[]),y=(0,c.useMemo)(()=>h&&!f.over,[h,f.over]),b=(0,c.useMemo)(()=>(h?`Tap/Swipe or D-pad`:`←↑→↓ / WASD`)+` · B/Space to Channel on ⟐ · Esc to exit`,[h]);(0,c.useEffect)(()=>{if(P>0&&u>=P){let e=u-P;d(e),t(e),o()}},[]);let x=()=>{p(e=>e.channelingUntil?{...e,channelingUntil:0}:e)};(0,c.useEffect)(()=>{let e=e=>{let t=e.key.toLowerCase(),r=_e(t);r!==`none`&&(x(),e.preventDefault(),o(),p(e=>({...e,player:{...e.player,next:r}}))),(t===`b`||t===` `)&&f.onAltar&&f.channelingUntil===0&&(o(),p(e=>({...e,channelingUntil:performance.now()+z}))),t===`escape`&&n&&n(),t===`r`&&f.over&&(o(),p(xe(1,performance.now())),m.current=performance.now())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,f.over,f.onAltar,f.channelingUntil]);let S=e=>{x(),o(),p(t=>({...t,player:{...t.player,next:e}}))},C=()=>{f.onAltar&&f.channelingUntil===0&&(o(),p(e=>({...e,channelingUntil:performance.now()+z})))};(0,c.useEffect)(()=>{let e=0,n=performance.now(),r=(e,n)=>{if(n.channelingUntil===0||!n.onAltar||e0){let e=Math.floor(a*r),i=Math.max(0,n.bankable-e),o=u+a;return d(o),t(o),{...n,scorePhi:n.scorePhi+a,bankable:i,points:i,kaiCharge:Math.max(0,Math.floor(n.kaiCharge*.5)),channelingUntil:0}}return{...n,channelingUntil:0}},i=()=>{e=requestAnimationFrame(i);let o=performance.now(),s=Math.min(1/F,(o-n)/1e3);n=o,!a&&p(e=>{if(e.over)return e;let n=structuredClone(e);if(o>=n.cycle.nextSwitchAt){let e=n.cycle.phase===`chase`?`scatter`:`chase`;n.cycle={phase:e,nextSwitchAt:o+Se(n.level,e)};for(let t of n.ghosts)t.mode!==`fright`&&(t.mode=e)}let i=U(o,m.current),a=ge(i),c=Math.min(1+n.streak*ee,te),l=Math.min(1+n.streak*oe,se),f=n.channelingUntil>0?0:n.player.speed*a*c;we(n.grid,n.player),Te(n.grid,n.player.pos,n.player.dir,f,s);let p=G(n.player.pos);n.onAltar=n.grid[p.y]?.[p.x]===4;let h=n.grid[p.y]?.[p.x]??1;if((h===2||h===3)&&n.channelingUntil===0){let e=Math.abs(i-.5)<=N,t=h===2?R:ne;if(e&&(t+=ie,n.kaiCharge=Math.min(B,n.kaiCharge+1)),t=Math.floor(t*l),n.points+=t,n.bankable=n.points,n.streak+=1,n.streak>n.bestStreak&&(n.bestStreak=n.streak),n.comboUntil=o+ae,n.grid[p.y][p.x]=0,n.pellets=Math.max(0,n.pellets-1),h===3){m.current=o;let e=Math.max(ce*Math.max(.55,1-(n.level-1)*.08),M*.5);for(let t of n.ghosts)t.mode=`fright`,t.frightUntil=o+e}}n.comboUntil>0&&o>n.comboUntil&&(n.streak=Math.max(0,Math.floor(n.streak*.5)),n.comboUntil=0);for(let e of n.ghosts){e.mode===`fright`&&o>=e.frightUntil&&(e.mode=n.cycle.phase);let t=G(n.player.pos);if(Ce(n.grid,e.pos))if(e.mode===`scatter`)e.dir=Ee(n.grid,e.pos,e.dir,e.scatterTarget);else if(e.mode===`fright`){let r=G(e.pos),i=[`up`,`down`,`left`,`right`],a=e.dir,o=-1/0;for(let s of i){if(s===H[e.dir])continue;let i=r.x+V[s].x,c=r.y+V[s].y;if(!W(n.grid,i,c))continue;let l=K({x:i,y:c},t);l>o&&(o=l,a=s)}e.dir=a}else{let r={x:t.x+V[n.player.dir].x*2,y:t.y+V[n.player.dir].y*2};e.dir=Ee(n.grid,e.pos,e.dir,r)}let r=e.mode===`fright`?he(.6,.8,Math.sin(i*Math.PI)):a,c=e.speed*r;if(c*=1.06**(n.level-1),Te(n.grid,e.pos,e.dir,c,s),K(n.player.pos,e.pos)<.4)if(e.mode===`fright`&&n.channelingUntil===0){let t=Math.floor(re*l);n.points+=t,n.bankable=n.points,n.streak+=1,n.streak>n.bestStreak&&(n.bestStreak=n.streak),n.comboUntil=o+ae,e.pos={...e.scatterTarget},e.dir=`left`,e.mode=`scatter`,e.frightUntil=0}else if(--n.lives,n.streak=0,n.comboUntil=0,n.points=Math.max(0,Math.floor(n.points*(1-fe))),n.bankable=n.points,n.channelingUntil=0,n.lives<=0)n.alive=!1,n.over=!0;else{let e={x:Math.floor(n.grid[0].length/2),y:n.grid.length-4};n.player.pos={...e},n.player.dir=`left`,n.player.next=`left`;for(let e of n.ghosts)e.mode=`scatter`;m.current=o}}if(n.pellets<=0&&!n.over){let e=v(n.level),r=Math.floor(n.bankable*.2/e);if(r>0){let i=r*e,a=Math.max(0,n.bankable-i),o=u+r;d(o),t(o),n.scorePhi+=r,n.bankable=a,n.points=a}let i=xe(n.level+1,o);i.scorePhi=n.scorePhi,i.lives=Math.max(1,n.lives),i.bestStreak=Math.max(n.bestStreak,n.streak),i.player.speed=n.player.speed*1.06;for(let e of i.ghosts)e.speed*=1.06;return m.current=o,i}return n=r(o,n),n})};return e=requestAnimationFrame(i),()=>cancelAnimationFrame(e)},[t,u,a,v]),(0,c.useEffect)(()=>{let e=0,t=()=>{e=requestAnimationFrame(t);let n=i.current,o=r.current;if(!n||!o)return;let c=n.getContext(`2d`);if(!c)return;let l=Math.max(0,s.w),d=Math.max(0,s.h);if(l===0||d===0)return;let p=Math.min(2,window.devicePixelRatio||1);(n.width!==Math.floor(l*p)||n.height!==Math.floor(d*p))&&(n.width=Math.floor(l*p),n.height=Math.floor(d*p),n.style.width=`${l}px`,n.style.height=`${d}px`),c.setTransform(p,0,0,p,0,0);let h=f.grid.length,g=f.grid[0].length,_=Math.floor(Math.min(l/g,d/h)),v=_*g,y=_*h,b=Math.floor((l-v)/2),x=Math.floor((d-y)/2),S=c.createLinearGradient(0,0,0,d);S.addColorStop(0,`#07071a`),S.addColorStop(1,`#0c1231`),c.fillStyle=S,c.fillRect(0,0,l,d),Me(c,l,d);for(let e=0;e0&&f.onAltar){let e=1-Math.max(0,f.channelingUntil-w)/z,t=l/2;c.strokeStyle=`rgba(0,255,208,0.9)`,c.lineWidth=4,c.globalAlpha=.9,c.beginPath(),c.arc(t,34,16,-Math.PI/2,-Math.PI/2+e*Math.PI*2),c.stroke(),c.globalAlpha=1,c.font=`700 12px ui-sans-serif,system-ui,-apple-system`,c.fillText(`Channeling…`,t+16+8,38)}if(a&&!f.over){c.fillStyle=`rgba(0,0,0,0.35)`,c.fillRect(0,0,l,d),c.fillStyle=`#fff`,c.font=`700 16px ui-sans-serif,system-ui,-apple-system`;let e=`Paused — another Realm is active`;c.fillText(e,(l-c.measureText(e).width)/2,d/2)}if(f.over){c.fillStyle=`rgba(0,0,0,0.55)`,c.fillRect(0,0,l,d),c.fillStyle=`#fff`,c.font=`700 20px ui-sans-serif,system-ui,-apple-system`;let e=`Game Over — Press R to restart`;c.fillText(e,(l-c.measureText(e).width)/2,d/2)}};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[f,u,s,a]);let w=f.onAltar&&f.channelingUntil===0;return(0,g.jsxs)(`div`,{className:`km-wrap`,role:`group`,"aria-label":`Kai-Maze`,onPointerDown:()=>o(),onTouchStart:()=>o(),onMouseDown:()=>o(),children:[(0,g.jsxs)(`div`,{className:`km-header`,children:[(0,g.jsx)(`div`,{className:`km-title`,children:`🌀 Kai-Maze`}),(0,g.jsx)(`div`,{className:`km-sub`,children:`Score on pulse, risk your points, then ⟐ channel to mint Φ.`})]}),(0,g.jsxs)(`div`,{className:`km-stage`,ref:r,children:[(0,g.jsx)(`canvas`,{ref:i,className:`km-canvas`}),y&&(0,g.jsxs)(`div`,{className:`km-dpad`,style:{position:`absolute`,left:12,bottom:12,width:132,height:132,display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gridTemplateRows:`repeat(3, 1fr)`,gap:6,touchAction:`none`,userSelect:`none`,zIndex:4},"aria-label":`Directional pad`,children:[(0,g.jsx)(`div`,{}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move up`,onPointerDown:e=>{e.preventDefault(),S(`up`)},children:`▲`}),(0,g.jsx)(`div`,{}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move left`,onPointerDown:e=>{e.preventDefault(),S(`left`)},children:`◀`}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:{...J,opacity:.9},"aria-label":`Hold to Channel (if on altar)`,onPointerDown:e=>{e.preventDefault(),C()},title:`Channel one breath to convert points → Φ`,children:`⟐`}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move right`,onPointerDown:e=>{e.preventDefault(),S(`right`)},children:`▶`}),(0,g.jsx)(`div`,{}),(0,g.jsx)(`button`,{className:`km-dpad-btn`,style:J,"aria-label":`Move down`,onPointerDown:e=>{e.preventDefault(),S(`down`)},children:`▼`}),(0,g.jsx)(`div`,{})]}),w&&(0,g.jsx)(`button`,{className:`km-chan-btn`,onClick:()=>{o(),p(e=>e.channelingUntil?e:{...e,channelingUntil:performance.now()+z})},"aria-label":`Channel points into Phi`,title:`Channel one breath to convert points → Φ`,children:`⟐ CHANNEL`}),f.channelingUntil>0&&(0,g.jsx)(`button`,{className:`km-chan-cancel`,onClick:()=>{o(),p(e=>({...e,channelingUntil:0}))},"aria-label":`Cancel channeling`,title:`Cancel`,children:`Cancel`})]}),(0,g.jsxs)(`div`,{className:`km-footer`,children:[(0,g.jsx)(`button`,{className:`km-btn`,onClick:n,title:`Back`,children:`Back`}),(0,g.jsx)(`div`,{className:`km-hint`,children:b})]})]})};function Oe(e,t,n,r,i){e.save(),e.fillStyle=i,e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fill(),e.strokeStyle=`rgba(255,255,255,0.35)`,e.lineWidth=1.25,e.stroke(),e.restore()}function ke(e,t,n,r,i){e.save(),e.fillStyle=i,e.beginPath(),e.arc(t,n,r,Math.PI,0),e.lineTo(t+r,n+r*.85),e.lineTo(t-r,n+r*.85),e.closePath(),e.fill(),e.fillStyle=`#fff`,e.beginPath(),e.arc(t-r*.35,n-r*.15,r*.16,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(t+r*.35,n-r*.15,r*.16,0,Math.PI*2),e.fill(),e.fillStyle=`rgba(0,0,0,0.7)`,e.beginPath(),e.arc(t-r*.3,n-r*.15,r*.08,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(t+r*.3,n-r*.15,r*.08,0,Math.PI*2),e.fill(),e.restore()}function Ae(e,t,n){let r=Math.min(460,Math.max(220,t*.5)),i=t/2,a=r/2;e.save(),e.globalAlpha=.35,e.strokeStyle=`rgba(0,255,208,.6)`,e.lineWidth=2,e.beginPath(),e.moveTo(i-a,20),e.lineTo(i+a,20),e.stroke();let o=je(r*N*2);e.globalAlpha=.2,e.fillStyle=`#ffd36e`,e.fillRect(i-o,17,o*2,6),e.globalAlpha=.9,e.fillStyle=`#00ffd0`;let s=i-a+n*r;e.beginPath(),e.arc(s,20,4,0,Math.PI*2),e.fill(),e.restore()}function je(e){return e/2}function Me(e,t,n){e.save(),e.globalAlpha=.08,e.strokeStyle=`rgba(255,255,255,0.15)`,e.lineWidth=1;let r=t/2,i=n/2,a=(1+Math.sqrt(5))/2,o=4;for(let s=0;s<8;s++){let s=Math.min(t,n)/o;e.beginPath(),e.arc(r,i,s,-Math.PI/2,Math.PI),e.stroke(),o*=a}e.restore()}var J={background:`linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04))`,border:`1px solid rgba(255,255,255,0.25)`,borderRadius:10,color:`rgba(255,255,255,0.9)`,fontSize:18,lineHeight:1,padding:0,display:`flex`,alignItems:`center`,justifyContent:`center`,minWidth:36,minHeight:36,touchAction:`none`};(()=>{let e=Array.from({length:31},()=>Array.from({length:28},()=>2));for(let t=0;t<28;t++)e[0][t]=1,e[30][t]=1;for(let t=0;t<31;t++)e[t][0]=1,e[t][27]=1;for(let t=4;t<24;t+=6)for(let n=4;n<27;n+=6)e[n][t]=1,e[n][t+1]=1,e[n+1][t]=1,e[n+1][t+1]=1;for(let t=2;t<26;t++)e[15][t]=0;e[1][1]=3,e[1][26]=3,e[29][1]=3,e[29][26]=3;for(let t=2;t<29;t++)e[t][14]=0;for(let t=2;t<26;t++)e[11][t]=0;return e})();var Ne=5236,Y=3,Pe=Y*2,Fe=2,Ie=.15,Le=220,Re=60,ze=20;function Be(e){return(Math.imul(e^2654435769,2654435761)>>>0)%1e5/1e5}function Ve(e,t){let n=Math.abs(e-t)%360;return n>180&&(n=360-n),n}var He=({currentPhi:e,onPhiChange:t})=>{let[n,r]=(0,c.useState)(`forge`),[i,a]=(0,c.useState)(null),[o,s]=(0,c.useState)(performance.now()),[l,u]=(0,c.useState)(0),[d,f]=(0,c.useState)(!1),[p,m]=(0,c.useState)(null),[h,_]=(0,c.useState)(0);C({onPulse:e=>{a(e),s(performance.now()),m(e=>e&&{...e,delta:e.delta})}}),(0,c.useEffect)(()=>{if(n!==`forge`)return;let e=0,t=!0,r=()=>{if(!t)return;let n=performance.now();u(Math.max(0,n-o)%Ne/Ne*360%360),e=requestAnimationFrame(r)};return e=requestAnimationFrame(r),()=>{t=!1,cancelAnimationFrame(e)}},[o,n]);let v=(0,c.useMemo)(()=>{let e=i??0,t=Math.floor(Be(e)*360),n=Re+(e%2==0?ze:0)-Math.min(20,Math.floor(h*6));return{centerDeg:t,halfWidthDeg:Math.max(10,n/2)}},[i,h]),y=(0,c.useMemo)(()=>n===`forge`&&!d&&e>=Y&&i!==null,[n,d,e,i]),b=(0,c.useCallback)(e=>{let t=Pe,n=1+h*Ie,r=e?Fe:1;return Math.floor(t*n*r)},[h]),x=(0,c.useCallback)(()=>{if(!y)return;let n=e-Y;t(n),f(!0),m(null);let r=Ve(l,v.centerDeg),i=Math.max(4,v.halfWidthDeg*.25),a=r<=v.halfWidthDeg,o=a&&r<=i;window.setTimeout(()=>{if(a){let e=b(o);t(n+e),_(e=>e+1),m({kind:o?`crit`:`hit`,delta:e})}else _(0),m({kind:`miss`,delta:-Y});f(!1)},650)},[y,e,t,l,v.centerDeg,v.halfWidthDeg,b]);return(0,c.useEffect)(()=>{if(n!==`forge`)return;let e=e=>{let t=e.key.toLowerCase();(t===` `||t===`enter`)&&(e.preventDefault(),x())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,x]),(0,g.jsx)(`div`,{className:`pf-wrap`,role:`group`,"aria-label":`Pulse Forge`,children:n===`forge`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`pf-header`,children:[(0,g.jsx)(`div`,{className:`pf-title`,children:`⚒️ Pulse Forge`}),(0,g.jsx)(`div`,{className:`pf-sub`,children:`Time your lock to the target arc. Breathe, focus, forge.`}),(0,g.jsx)(`div`,{style:{marginLeft:`auto`,display:`flex`,gap:8},children:(0,g.jsx)(`button`,{type:`button`,className:`pf-lock-btn`,onClick:()=>r(`maze`),title:`Switch to Kai-Maze`,children:`Play Kai-Maze`})})]}),(0,g.jsxs)(`div`,{className:`pf-board`,children:[(0,g.jsxs)(`div`,{className:`pf-dial`,style:{width:Le,height:Le},children:[(0,g.jsx)(`div`,{className:`pf-arc`,style:{"--arc-center":`${v.centerDeg}deg`,"--arc-half":`${v.halfWidthDeg}deg`},"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`pf-marker ${d?`pf-marker--lock`:``}`,style:{transform:`rotate(${l}deg)`},"aria-hidden":!0,children:(0,g.jsx)(`div`,{className:`pf-marker-head`})}),(0,g.jsx)(`div`,{className:`pf-rim`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`pf-ticks`,"aria-hidden":!0,children:Array.from({length:12}).map((e,t)=>(0,g.jsx)(`span`,{style:{transform:`rotate(${t*30}deg)`}},t))})]}),(0,g.jsxs)(`div`,{className:`pf-hud`,children:[(0,g.jsxs)(`div`,{className:`pf-chip`,title:`Your Φ`,children:[(0,g.jsx)(`span`,{className:`pf-chip__label`,children:`Φ`}),(0,g.jsx)(`span`,{className:`pf-chip__val`,children:e})]}),(0,g.jsxs)(`div`,{className:`pf-chip`,title:`Streak`,children:[(0,g.jsx)(`span`,{className:`pf-chip__label`,children:`Streak`}),(0,g.jsx)(`span`,{className:`pf-chip__val`,children:h})]}),(0,g.jsxs)(`div`,{className:`pf-chip`,title:`Pulse`,children:[(0,g.jsx)(`span`,{className:`pf-chip__label`,children:`Pulse`}),(0,g.jsx)(`span`,{className:`pf-chip__val`,children:i??`—`})]})]})]}),(0,g.jsxs)(`div`,{className:`pf-cta`,children:[(0,g.jsx)(`button`,{className:`pf-lock-btn`,onClick:x,disabled:!y,"aria-disabled":!y,title:y?`Press Space/Enter to Lock`:`Insufficient Φ or syncing…`,children:d?`Locking…`:`Lock (−${Y} Φ)`}),(0,g.jsxs)(`div`,{className:`pf-hint`,children:[`Press `,(0,g.jsx)(`kbd`,{children:`Space`}),` or `,(0,g.jsx)(`kbd`,{children:`Enter`}),` at the right moment. Even pulses widen the target.`]})]}),p&&(0,g.jsxs)(`div`,{className:`pf-result pf-result--${p.kind}`,role:`status`,"aria-live":`polite`,children:[p.kind===`hit`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`pf-result__emoji`,children:`✅`}),(0,g.jsxs)(`span`,{className:`pf-result__text`,children:[`Resonant lock! +`,p.delta,` Φ`]})]}),p.kind===`crit`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`pf-result__emoji`,children:`💥`}),(0,g.jsxs)(`span`,{className:`pf-result__text`,children:[`Perfect lock! +`,p.delta,` Φ`]})]}),p.kind===`miss`&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`pf-result__emoji`,children:`❌`}),(0,g.jsx)(`span`,{className:`pf-result__text`,children:`Miss — breathe again.`})]})]})]}):(0,g.jsx)(De,{currentPhi:e,onPhiChange:t,onExit:()=>r(`forge`)})})};function Ue(){return`kai-${Math.random().toString(36).slice(2,8)}`}function We(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.x==`number`&&typeof t.pulseIndex==`number`&&typeof t.chakraDay==`string`&&typeof t.glyph==`object`&&t.glyph!==null}var Ge=null;async function Ke(){return Ge||(Ge=(await a(()=>import(`./bundler-C2y9Epw0.js`),__vite__mapDeps([0,1,2]))).default,Ge)}function qe(e){let[t]=(0,c.useState)(()=>e??Ue()),[n,r]=(0,c.useState)([]),[i,a]=(0,c.useState)([]),o=(0,c.useRef)(null),s=(0,c.useRef)({}),l=(0,c.useCallback)((e,t)=>{if(!We(t))return;let n={...t,id:e,glyph:t.glyph};a(t=>{let r=t.findIndex(t=>t.id===e);if(r>=0){let e=[...t];return e[r]=n,e}return[...t,n]})},[]),u=(0,c.useCallback)((e,t)=>{We(e)&&l(t,e)},[l]);return(0,c.useEffect)(()=>{let e=!1;return(async()=>{let n=await Ke();if(e)return;let i=new n(t);o.current=i,i.on(`open`,()=>{r(e=>e)}),i.on(`connection`,e=>{s.current[e.peer]=e,r(t=>Array.from(new Set([...t,e.peer]))),e.on(`data`,t=>{u(t,e.peer)}),e.on(`close`,()=>{delete s.current[e.peer],r(t=>t.filter(t=>t!==e.peer)),a(t=>t.filter(t=>t.id!==e.peer))})})})().catch(e=>{console.error(`[KaiRealms] Peer init failed:`,e)}),()=>{e=!0;try{o.current?.destroy()}catch(e){console.warn(`[KaiRealms] Peer destroy failed:`,e)}o.current=null,s.current={},r([]),a([])}},[t,u]),{sessionId:t,peers:n,sendState:(0,c.useCallback)(e=>{let t=Object.values(s.current);for(let n of t)n.open&&n.send(e)},[]),remoteStates:i}}var Je=800,Ye=500,Xe=Je/Ye,X=28,Z=10,Ze=360,Qe=10,Q=5236,$e=.08,et=22,tt=90,nt=80,rt=2,it=4,at=10,ot=3,st=1,ct=3,lt=1,ut=1,$=(e,t,n)=>en?n:e,dt=({glyphData:e,onExit:t})=>{let n=(0,c.useRef)(null),r=(0,c.useRef)(null),i=(0,c.useRef)(null),[a,o]=(0,c.useState)({w:Je,h:Ye}),s=(0,c.useRef)(a);(0,c.useEffect)(()=>{s.current=a},[a]);let[l,u]=(0,c.useState)(0),[d,f]=(0,c.useState)(0),[p,m]=(0,c.useState)(!1),[h,_]=(0,c.useState)(ot),[v,y]=(0,c.useState)(0),[b,x]=(0,c.useState)(0),[S,w]=(0,c.useState)(!1),T=(0,c.useRef)(performance.now()),{sendState:E,remoteStates:D}=qe(),O=(0,c.useRef)([]);(0,c.useEffect)(()=>{O.current=D??[]},[D]);let k=(0,c.useRef)(Je/2),A=(0,c.useRef)([]),j=(0,c.useRef)({}),M=(0,c.useRef)(null),N=(0,c.useRef)(null),P=(0,c.useRef)(null),F=(0,c.useRef)(0),I=(0,c.useRef)(0),L=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=n.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0].contentRect,n=Math.max(320,Math.min(960,t.width));o({w:n,h:Math.round(n/Xe)})});return t.observe(e),()=>t.disconnect()},[]),(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=e.getContext(`2d`);if(!t)return;let n=Math.min(2,window.devicePixelRatio||1);e.style.width=`${a.w}px`,e.style.height=`${a.h}px`,e.width=Math.floor(a.w*n),e.height=Math.floor(a.h*n),t.setTransform(n,0,0,n,0,0),i.current=t,k.current=$(k.current,X,a.w-X)},[a]),(0,c.useEffect)(()=>{let e=e=>{j.current[e.key]=!0,e.key.toLowerCase()===`p`&&m(e=>!e),e.key.toLowerCase()===`r`&&S&&re()},t=e=>{j.current[e.key]=!1};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t)}},[S]),(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=t=>{let n=e.getBoundingClientRect();return $((t-n.left)/n.width*s.current.w,X,s.current.w-X)},n=!1,i=e=>{n=!0,k.current=t(e.clientX)},a=e=>{n&&(k.current=t(e.clientX))},o=()=>{n=!1};return e.addEventListener(`pointerdown`,i),e.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o),()=>{e.removeEventListener(`pointerdown`,i),e.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o)}},[]);let ee=e=>Math.max(0,e-T.current)%Q/Q,te=e=>{let t=Math.sin(Math.PI*e);return .65+.7*(t*t)},R=e=>{let{w:t}=s.current,n=performance.now(),r=Math.random()*(t-2*Z)+Z,i=-Z*2,a=(Math.random()-.5)*40,o=(e===`gold`?nt:tt)+v*(at*.2),c={id:`${e}-${n}-${Math.floor(Math.random()*1e6)}`,x:r,y:i,vx:a,baseVy:o,kind:e,bornAt:n},l=A.current.slice(-(et-1));l.push(c),A.current=l};C({onPulse:e=>{f(e),T.current=performance.now(),I.current+=1;for(let e=0;e{let n=P.current,r=k.current,i=d;if(!n||Math.abs(n.x-r)>=1||n.pulseIndex!==i||t-F.current>1e3/Qe){P.current={x:r,pulseIndex:i},F.current=t;try{E({id:`you`,x:r,pulseIndex:i,chakraDay:e.meta.chakraDay,glyph:e})}catch{}}};(0,c.useEffect)(()=>{let t=r.current,n=i.current;if(!t||!n)return;let a=!0,o=t=>{if(!a)return;M.current=requestAnimationFrame(o);let r=N.current??t,i=Math.min(.05,(t-r)/1e3);N.current=t;let{w:c,h:l}=s.current,d=l-X-10;if(!p&&!S){let e=j.current,n=!!(e.ArrowLeft||e.a||e.A),r=!!(e.ArrowRight||e.d||e.D);n&&(k.current=$(k.current-Ze*i,X,c-X)),r&&(k.current=$(k.current+Ze*i,X,c-X));let a=k.current,o=performance.now(),s=ee(o),f=te(s),p=[],m=0,h=0,g=0;for(let e=0;ec-Z&&(t.x=c-Z,t.vx=-Math.abs(t.vx)*.9);let r=t.x-a,u=t.y-d;if(Math.hypot(r,u)l+Z){g+=1;continue}p.push(t)}if(m>0||h>0){let e=m+h;u(t=>t+e),y(e=>{let t=e+1;return x(e=>t>e?t:e),t})}g>0&&(u(e=>Math.max(0,e-st*g)),y(0),_(e=>{let t=Math.max(0,e-g);return t===0&&w(!0),t})),A.current=p,ne(t)}ft(n,e,k.current,d,p||S,A.current,O.current,s.current,T.current,L.current)};return M.current=requestAnimationFrame(o),()=>{a=!1,M.current!==null&&cancelAnimationFrame(M.current),M.current=null,N.current=null}},[e,p,S,a.w,a.h]);let re=()=>{A.current=[],_(ot),y(0),x(e=>e),w(!1)},ie=(0,c.useMemo)(()=>({pulse:d,chakraDay:e?.meta?.chakraDay??`—`}),[d,e?.meta?.chakraDay]);return(0,g.jsxs)(`div`,{className:`realm-wrap`,ref:n,children:[(0,g.jsxs)(`div`,{className:`realm-hud`,children:[(0,g.jsxs)(`div`,{className:`hud-chip hud-chip--score`,title:`Banked Φ`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Φ`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:l})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Streak`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Streak`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:v})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Lives`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Lives`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:h})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Current Pulse`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Pulse`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:ie.pulse})]}),(0,g.jsxs)(`div`,{className:`hud-chip`,title:`Chakra Day`,children:[(0,g.jsx)(`span`,{className:`hud-chip__label`,children:`Day`}),(0,g.jsx)(`span`,{className:`hud-chip__value`,children:ie.chakraDay})]}),(0,g.jsx)(`button`,{className:`hud-button`,onClick:()=>m(e=>!e),"aria-pressed":p,title:`Pause (P)`,children:p?`Resume`:`Pause`})]}),(0,g.jsxs)(`div`,{className:`realm-canvas-wrap`,children:[(0,g.jsx)(`canvas`,{ref:r,className:`realm-canvas`,"aria-label":`Kai Realms Canvas`}),(p||S)&&(0,g.jsx)(`div`,{className:`realm-pause-overlay`,"aria-hidden":!0,children:(0,g.jsxs)(`div`,{className:`pause-card`,children:[(0,g.jsx)(`div`,{className:`pause-title`,children:S?`Game Over`:`Paused`}),(0,g.jsx)(`div`,{className:`pause-sub`,children:S?(0,g.jsxs)(g.Fragment,{children:[`Best Streak: `,(0,g.jsx)(`strong`,{children:b}),` — Press `,(0,g.jsx)(`kbd`,{children:`R`}),` to Restart`]}):(0,g.jsxs)(g.Fragment,{children:[`Press `,(0,g.jsx)(`kbd`,{children:`P`}),` or click Resume`]})}),S&&(0,g.jsx)(`button`,{className:`hud-button`,onClick:re,style:{marginTop:12},children:`Restart`})]})})]}),(0,g.jsx)(He,{currentPhi:l,onPhiChange:e=>u(e)}),(0,g.jsx)(`button`,{className:`exit-button`,onClick:t,children:`Exit Realm`})]})};function ft(e,t,n,r,i,a,o,s,c,l){let{w:u,h:d}=s,f=e.createLinearGradient(0,0,0,d);f.addColorStop(0,`#020211`),f.addColorStop(1,`#0b0f2a`),e.fillStyle=f,e.fillRect(0,0,u,d),e.save(),e.globalAlpha=.12;for(let t=0;t<40;t++){let n=t*197%u+t%3,r=t*127%d+t*11%7;e.fillStyle=`white`,e.fillRect(n,r,2,2)}e.restore(),pt(e,u,Math.max(36,Math.round(d*.06)),c);for(let t=0;t{let[n,r]=(0,c.useState)(null),i=(0,c.useRef)(null),a=(0,c.useRef)(null),o=(0,c.useCallback)(e=>r(e),[]),s=(0,c.useCallback)(()=>{r(null),t?.()},[t]);(0,c.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t?.()};return document.addEventListener(`keydown`,e),a.current?.focus(),()=>document.removeEventListener(`keydown`,e)},[t]),(0,c.useEffect)(()=>{let e=i.current;if(!e)return;let t=e=>e.stopPropagation();return e.addEventListener(`wheel`,t,{passive:!0}),()=>e.removeEventListener(`wheel`,t)},[]);let l=()=>t?.(),u=e=>e.stopPropagation();return(0,g.jsxs)(`div`,{className:`realms-backdrop realms-veil`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`kai-realms-title`,onMouseDown:l,children:[(0,g.jsx)(`div`,{className:`realms-stars`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`realms-halo realms-halo--1`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`realms-halo realms-halo--2`,"aria-hidden":!0}),(0,g.jsxs)(`div`,{ref:i,className:`realms-container glass-omni`,onMouseDown:u,role:`document`,children:[(0,g.jsx)(`div`,{className:`breath-ring breath-ring--outer`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`breath-ring breath-ring--inner`,"aria-hidden":!0}),(0,g.jsx)(`div`,{className:`phi-grid`,"aria-hidden":!0}),(0,g.jsxs)(`header`,{className:`realms-header`,children:[(0,g.jsx)(`button`,{ref:a,type:`button`,className:`realms-close auric-btn`,"aria-label":`Close Kai Realms`,onClick:e=>{e.stopPropagation(),t?.()},onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),t?.())},children:(0,g.jsx)(e,{size:20,"aria-hidden":!0})}),(0,g.jsx)(`div`,{className:`header-seals`,"aria-hidden":!0,children:(0,g.jsxs)(`div`,{className:`seal-emblem`,children:[(0,g.jsx)(`div`,{className:`seal-ring`}),(0,g.jsx)(`div`,{className:`seal-ring seal-ring--inner`}),(0,g.jsx)(`div`,{className:`seal-core`})]})}),(0,g.jsx)(`h2`,{id:`kai-realms-title`,className:`sr-only`,children:`Kai Realms — Sigil Gate`})]}),(0,g.jsx)(`main`,{className:`realms-body`,children:n?(0,g.jsx)(`div`,{className:`realm-stage`,children:(0,g.jsx)(dt,{glyphData:n,onExit:s})}):(0,g.jsx)(`div`,{className:`portal-stage`,children:(0,g.jsx)(v,{onEnter:o})})}),(0,g.jsx)(`footer`,{className:`realms-footer`,"aria-hidden":!0,children:(0,g.jsx)(`div`,{className:`footer-center`,style:{margin:`0 auto`},children:(0,g.jsx)(gt,{})})})]})]})};function gt(){return(0,g.jsxs)(`svg`,{className:`seal-coin`,width:`56`,height:`56`,viewBox:`0 0 56 56`,"aria-hidden":!0,children:[(0,g.jsxs)(`defs`,{children:[(0,g.jsxs)(`radialGradient`,{id:`coinGlowRealms`,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:`#ffffff`,stopOpacity:`0.9`}),(0,g.jsx)(`stop`,{offset:`40%`,stopColor:`#ffd86b`,stopOpacity:`0.75`}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:`#ffd86b`,stopOpacity:`0.15`})]}),(0,g.jsxs)(`linearGradient`,{id:`coinEdgeRealms`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,g.jsx)(`stop`,{offset:`0%`,stopColor:`#00ffd0`,stopOpacity:`0.8`}),(0,g.jsx)(`stop`,{offset:`100%`,stopColor:`#8a2be2`,stopOpacity:`0.8`})]})]}),(0,g.jsx)(`circle`,{cx:`28`,cy:`28`,r:`26`,fill:`url(#coinGlowRealms)`,stroke:`url(#coinEdgeRealms)`,strokeWidth:`1.5`}),(0,g.jsxs)(`g`,{className:`seal-coin__rotor`,children:[(0,g.jsx)(`circle`,{cx:`28`,cy:`28`,r:`18`,fill:`none`,stroke:`url(#coinEdgeRealms)`,strokeWidth:`1.25`}),(0,g.jsxs)(`g`,{stroke:`rgba(255,255,255,0.35)`,strokeWidth:`0.6`,children:[(0,g.jsx)(`line`,{x1:`28`,y1:`10`,x2:`28`,y2:`46`}),(0,g.jsx)(`line`,{x1:`10`,y1:`28`,x2:`46`,y2:`28`}),(0,g.jsx)(`line`,{x1:`15`,y1:`15`,x2:`41`,y2:`41`}),(0,g.jsx)(`line`,{x1:`41`,y1:`15`,x2:`15`,y2:`41`})]})]}),(0,g.jsx)(`circle`,{className:`seal-coin__core`,cx:`28`,cy:`28`,r:`6.5`})]})}export{ht as default}; \ No newline at end of file diff --git a/dist/assets/KaiVohApp-5YpSzMzY.js b/dist/assets/KaiVohApp-5YpSzMzY.js deleted file mode 100644 index 5e88ae1cb..000000000 --- a/dist/assets/KaiVohApp-5YpSzMzY.js +++ /dev/null @@ -1,88 +0,0 @@ -import{$ as e,$n as t,Bn as n,Br as r,Et as i,Fr as a,Gr as o,Lt as s,Qn as c,Rt as l,Ur as u,Vt as d,Wr as f,Yr as p,Zn as m,a as h,ar as g,at as _,c as v,ci as y,cr as b,ct as x,d as S,dr as C,dt as w,et as T,f as E,fr as D,ft as O,it as k,kn as ee,l as A,lr as te,lt as ne,m as j,mr as M,nr as N,nt as P,o as F,or as re,ot as ie,p as I,pi as L,pr as ae,rt as oe,s as R,si as se,sr as ce,st as z,tt as B,ur as le,ut as V,w as ue,zr as de}from"./index-BoEZKnmf.js";import{n as H,t as fe}from"./webauthnKAS-BovqgYOx.js";import"./prop-types-Cw0kCKc2.js";import{n as pe}from"./SigilAuthContext-CLP23KDu.js";import{d as U,t as me}from"./ticker-eo_G7AgT.js";import{i as W,n as he,r as ge,t as _e}from"./sessionStorage-2Nr46eZD.js";import{i as ve,r as ye}from"./postSeal-DGeRGc3h.js";import{t as be}from"./VerifierFrame-DwmwJ3uQ.js";var G=L(se(),1);const xe=(0,G.createContext)(void 0);var K=L(d(),1);function Se({children:e}){let[t,n]=(0,G.useState)(()=>ge());(0,G.useEffect)(()=>{t?W(t):he()},[t]),(0,G.useEffect)(()=>{let e=e=>{e.key!==null&&e.key===`kai.voh.session.v1`&&n(ge())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let r=(0,G.useMemo)(()=>({session:t,setSession:e=>n(e),clearSession:()=>n(null)}),[t]);return(0,K.jsx)(xe.Provider,{value:r,children:e})}function q(){let e=(0,G.useContext)(xe);if(!e)throw Error(`useSession must be used within a SessionProvider`);return e}var Ce=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`,`video/mp4;codecs=h264,aac`,`video/mp4`],J=typeof window<`u`&&`MediaRecorder`in window;async function we(e){let t=await crypto.subtle.digest(`SHA-256`,e),n=new Uint8Array(t),r=``;for(let e=0;eTe(),[]);(0,G.useEffect)(()=>{if(t)return(async()=>{s(null),l(!0);try{await A()}catch(e){s(e instanceof Error?e.message:`Failed to access camera.`)}finally{l(!1)}})(),()=>{te()}},[t,u,f]),(0,G.useEffect)(()=>{t&&ne().catch(()=>_(!1))},[t,u]);async function A(){te();let e={audio:{echoCancellation:!0,noiseSuppression:!0},video:{facingMode:u,width:{ideal:1080},height:{ideal:1920},frameRate:{ideal:30,max:60}}},t=await navigator.mediaDevices.getUserMedia(e);w.current=t,T.current&&(T.current.srcObject=t,T.current.muted=!0,await T.current.play().catch(()=>{})),await j(m&&g)}function te(){if(ie(!0),T.current&&(T.current.pause(),T.current.srcObject=null),w.current)for(let e of w.current.getTracks())e.stop();w.current=null,h(!1),y(!1),x(0),C(0),k.current!==null&&(cancelAnimationFrame(k.current),k.current=null)}async function ne(){let e=w.current;if(!e){_(!1);return}let[t]=e.getVideoTracks();if(!t){_(!1);return}let n=t.getCapabilities?.()??{};_(!!(typeof n.torch==`boolean`&&n.torch)&&u===`environment`)}async function j(e){let t=w.current;if(!t)return;let[n]=t.getVideoTracks();if(!(!n||!n.applyConstraints))try{g&&u===`environment`&&await n.applyConstraints({advanced:[{torch:e}]})}catch{}}function M(){d(e=>e===`user`?`environment`:`user`)}function N(){p(e=>!e)}async function P(){if(!g)return;let e=!m;h(e),await j(e)}function F(){if(!v)return;let e=performance.now()-O.current;if(C(e),x(Math.min(1,e/i)),e>=i){ie(!1);return}k.current=requestAnimationFrame(F)}function re(){if(!J){s(`MediaRecorder is not supported on this browser.`);return}if(v)return;s(null);let e=w.current;if(!e){s(`No camera stream.`);return}for(let t of e.getAudioTracks())t.enabled=!f;let t=ee??``,n;try{n=t?new MediaRecorder(e,{mimeType:t,videoBitsPerSecond:35e5}):new MediaRecorder(e)}catch{n=new MediaRecorder(e)}E.current=n,D.current=[],n.ondataavailable=e=>{e.data&&e.data.size>0&&D.current.push(e.data)},n.onstop=()=>{I()},n.start(250),y(!0),O.current=performance.now(),k.current=requestAnimationFrame(F)}function ie(e){if(!v)return;let t=E.current;if(t){try{t.state!==`inactive`&&t.stop()}catch{}y(!1),k.current!==null&&(cancelAnimationFrame(k.current),k.current=null),e&&(D.current=[],x(0),C(0))}}async function I(){let e=D.current;if(D.current=[],!e.length)return;let t=Math.max(0,S),n=E.current?.mimeType||ee||`video/webm`,i=new Blob(e,{type:n}),a=Date.now(),{width:o,height:s,thumbnailDataUrl:c}=await L(i),l=await we(await i.arrayBuffer()),u=`story_${a}.${n.includes(`mp4`)?`mp4`:`webm`}`;r({blob:i,file:new File([i],u,{type:n,lastModified:a}),mimeType:n,durationMs:t,width:o,height:s,thumbnailDataUrl:c,sha256:l,createdAt:a})}async function L(e){let t=URL.createObjectURL(e);try{let e=document.createElement(`video`);e.src=t,e.muted=!0,await e.play().catch(()=>void 0),await new Promise(t=>{let n=()=>{e.pause(),e.currentTime=0},r=()=>{n(),t()};e.onloadeddata=r,setTimeout(r,250)});let n=e.videoWidth||1080,r=e.videoHeight||1920,i=document.createElement(`canvas`);i.width=n,i.height=r;let a=i.getContext(`2d`);return a&&a.drawImage(e,0,0,n,r),{width:n,height:r,thumbnailDataUrl:i.toDataURL(`image/png`,.9)}}finally{URL.revokeObjectURL(t)}}function ae(){v||re()}function oe(){v&&ie(!1)}function R(){v?ie(!1):re()}return t?(0,K.jsxs)(`div`,{className:`story-rec-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":`Story recorder`,children:[(0,K.jsx)(`div`,{className:`story-rec-video-wrap`,children:(0,K.jsx)(`video`,{ref:T,className:`story-rec-video ${u===`user`?`mirror`:``}`,playsInline:!0})}),(0,K.jsxs)(`div`,{className:`story-rec-topbar`,children:[(0,K.jsx)(`button`,{type:`button`,className:`story-btn top left`,"aria-label":`Close`,onClick:()=>{te(),n()},children:`✕`}),(0,K.jsx)(`div`,{className:`story-top-center`,children:(0,K.jsxs)(`div`,{className:`story-timer mono`,children:[De(S),` / `,De(i)]})}),(0,K.jsxs)(`div`,{className:`story-top-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`story-btn ${f?`active`:``}`,"aria-pressed":f,"aria-label":f?`Unmute microphone`:`Mute microphone`,onClick:N,title:f?`Unmute mic`:`Mute mic`,children:f?`🔇`:`🎙️`}),(0,K.jsx)(`button`,{type:`button`,className:`story-btn ${u===`environment`&&g?``:`disabled`}`,disabled:!(u===`environment`&&g),onClick:()=>void P(),"aria-label":`Toggle torch`,title:g?m?`Torch on`:`Torch off`:`Torch not supported`,children:m?`🔦`:`💡`}),(0,K.jsx)(`button`,{type:`button`,className:`story-btn`,"aria-label":`Flip camera`,onClick:M,title:`Flip camera`,children:`🔁`})]})]}),(0,K.jsxs)(`div`,{className:`story-rec-bottombar`,children:[(0,K.jsx)(`div`,{className:`record-wrap`,children:(0,K.jsxs)(`button`,{type:`button`,className:`record-btn ${v?`recording`:``}`,"aria-pressed":v,"aria-label":v?`Stop recording`:`Start recording`,onClick:R,onPointerDown:ae,onPointerUp:oe,onPointerLeave:oe,children:[(0,K.jsx)(`span`,{className:`progress-ring`,style:{background:`conic-gradient(currentColor ${b*360}deg, transparent 0)`}}),(0,K.jsx)(`span`,{className:`story-rec-dot`})]})}),o&&(0,K.jsx)(`div`,{className:`story-rec-error`,children:o}),c&&(0,K.jsx)(`div`,{className:`story-rec-hint`,children:`Initializing camera…`})]})]}):null}function De(e){let t=Math.floor(e/1e3);return`${Math.floor(t/60).toString().padStart(2,`0`)}:${(t%60).toString().padStart(2,`0`)}`}var Y={phiKey:[`userPhiKey`,`phiKey`,`phikey`,`ΦKey`,`walletPhiKey`],kaiSig:[`kaiSignature`,`kaiSig`,`ksig`,`ΣSig`,`sig`,`signature`],sigilId:[`sigilId`,`sigilID`,`glyphId`,`glyphID`,`sigil_id`,`glyph_id`],url:[`sigilActionUrl`,`sigilUrl`,`actionUrl`,`url`,`claimedUrl`,`loginUrl`,`sourceUrl`,`originUrl`,`link`,`href`]};function Oe(e){if(typeof e!=`string`||!e.trim())return!1;try{let t=new URL(e,globalThis.location?.origin??`https://example.org`);return t.protocol===`https:`||t.protocol===`http:`}catch{return!1}}function X(e,t){if(typeof e!=`object`||!e)return;let n=e;for(let e of t){let t=n[e];if(typeof t==`string`&&t.trim())return t.trim()}let r=n.meta;if(typeof r==`object`&&r){let e=r;for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim())return t.trim()}}}function ke(e){return e.replace(/^$/,``).trim()}function Ae(e){let t=e.trim();if(!t)return;try{let e=JSON.parse(t);if(typeof e==`object`&&e)return e}catch{}let n=t.match(/\{[\s\S]*\}/);if(n)try{let e=JSON.parse(n[0]);if(typeof e==`object`&&e)return e}catch{}}function je(e,t){let n=RegExp(`${t}"?\\s*[:=]\\s*"?([^"\\n\\r<>{}]+)"?`,`i`),r=e.match(n);if(r)return(r[1]??``).trim()||void 0}function Me(e){let t={};for(let n of Y.phiKey){let r=je(e,n);if(r){t.userPhiKey=r;break}}for(let n of Y.kaiSig){let r=je(e,n);if(r){t.kaiSignature=r;break}}for(let n of Y.sigilId){let r=je(e,n);if(r){t.sigilId=r;break}}for(let n of Y.url){let r=je(e,n);if(r&&Oe(r))return t.actionUrl=r,t}let n=e.match(/https?:\/\/[^\s"'<>)#]+/i);return n&&Oe(n[0])&&(t.actionUrl=n[0]),t}function Ne(e,t){return{userPhiKey:e.userPhiKey??t.userPhiKey,kaiSignature:e.kaiSignature??t.kaiSignature,sigilId:e.sigilId??t.sigilId,actionUrl:e.actionUrl??t.actionUrl,meta:e.meta??t.meta}}function Pe(e){let t=(e??``).trim();if(!t)return{};try{let e=new DOMParser().parseFromString(t,`image/svg+xml`),n=e.getElementsByTagName(`parsererror`);if(n&&n.length>0)return Me(t);let r=e.documentElement,i={};if(r&&r.attributes)for(let e of Array.from(r.attributes))i[e.name]=e.value;let a={userPhiKey:X(i,Y.phiKey),kaiSignature:X(i,Y.kaiSig),sigilId:X(i,Y.sigilId),actionUrl:(()=>{let e=X(i,Y.url);return e&&Oe(e)?e:void 0})(),meta:void 0},o=Array.from(e.getElementsByTagName(`metadata`));for(let e of o){let t=ke((e.textContent??``).trim());if(!t)continue;let n=Ae(t);if(n){let e={userPhiKey:X(n,Y.phiKey),kaiSignature:X(n,Y.kaiSig),sigilId:X(n,Y.sigilId),actionUrl:(()=>{let e=X(n,Y.url);return e&&Oe(e)?e:void 0})(),meta:n};if(a=Ne(a,e),a.userPhiKey&&a.kaiSignature)return a}else a=Ne(a,Me(t))}for(let t of Array.from(e.getElementsByTagName(`desc`))){let e=ke((t.textContent??``).trim());if(!e)continue;let n=Ae(e);if(n){let e={userPhiKey:X(n,Y.phiKey),kaiSignature:X(n,Y.kaiSig),sigilId:X(n,Y.sigilId),actionUrl:(()=>{let e=X(n,Y.url);return e&&Oe(e)?e:void 0})(),meta:n};a=Ne(a,e)}else a=Ne(a,Me(e));if(a.userPhiKey&&a.kaiSignature)return a}for(let t of Array.from(e.getElementsByTagName(`a`))){let e=t.getAttribute(`href`)||t.getAttribute(`xlink:href`);if(e&&Oe(e)){a.actionUrl=a.actionUrl??e;break}}return(!a.userPhiKey||!a.kaiSignature)&&(a=Ne(a,Me(t))),a}catch{return Me(t)}}var Fe=new TextEncoder;function Ie(){if(typeof crypto>`u`||!crypto.subtle)throw Error(`WebCrypto subtle unavailable`);return crypto.subtle}function Le(e){if(e.buffer instanceof ArrayBuffer)return e;let t=new Uint8Array(e.byteLength);return t.set(e),t}function Re(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`).trim();if(!/^[A-Za-z0-9+/]*={0,2}$/.test(t))throw Error(`Invalid base64/base64url`);let n=(4-t.length%4)%4,r=t+`=`.repeat(n),i=new Int16Array(128).fill(-1);for(let e=0;e<64;e++)i[`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.charCodeAt(e)]=e;let a=Math.floor(r.length*3/4)-(r.endsWith(`==`)?2:r.endsWith(`=`)?1:0),o=new Uint8Array(a),s=0;for(let e=0;e>>16&255),s>>8&255),s>>18&63]+t[r>>>12&63]+t[r>>>6&63]+t[r&63])}let a=r-i;if(a===1){let r=e[i]<<16;n.push(t[r>>>18&63]+t[r>>>12&63]+`==`)}else if(a===2){let r=e[i]<<16|e[i+1]<<8;n.push(t[r>>>18&63]+t[r>>>12&63]+t[r>>>6&63]+`=`)}return n.join(``).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``)}function Be(e){let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t)||t.length%2!=0)throw Error(`Invalid hex`);let n=new Uint8Array(t.length/2);for(let e=0;e=32&&t.length%2==0&&/^[0-9a-fA-F]+$/.test(t)}function He(e){let t=e.trim();return t.length>=16&&/^[A-Za-z0-9\-_]+$/.test(t)}function Ue(e){let t=e.trim();if(!t)throw Error(`Empty kaiSignature`);if(Ve(t))return Be(t);if(He(t))try{return Re(t)}catch{}return Le(Fe.encode(t))}async function We(e){let t=Ie(),n=await t.importKey(`raw`,e.ikm,{name:`HKDF`},!1,[`deriveBits`]),r=await t.deriveBits({name:`HKDF`,hash:`SHA-256`,salt:e.salt,info:e.info},n,e.bits);return new Uint8Array(r)}async function Ge(e){let t=Le(Ue(e.baseKaiSignature)),n=Le(Re(e.salt_b64url)),r=(e.context??`KaiVoh.deriveKaiSignature.v1`).trim();return await We({ikm:t,salt:n,info:Le(Fe.encode(r)),bits:256})}async function Ke(e){return ze(await Ge(e))}function qe(){return(0,K.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`ico`,"aria-hidden":`true`,focusable:`false`,children:[(0,K.jsx)(`rect`,{x:`3`,y:`6`,width:`14`,height:`12`,rx:`3`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`circle`,{cx:`10`,cy:`12`,r:`3`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`path`,{d:`M17 9l4-2v10l-4-2z`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`circle`,{cx:`18.5`,cy:`5.5`,r:`2.5`,fill:`currentColor`})]})}function Je(){return(0,K.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`ico`,"aria-hidden":`true`,focusable:`false`,children:[(0,K.jsx)(`path`,{d:`M3 6h18M9 6V4h6v2M7 6l1 14h8l1-14`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`path`,{d:`M10 10v6M14 10v6`,stroke:`currentColor`,strokeWidth:`2`})]})}var Ye=6e3,Xe=1024,Ze=1024*Xe,Qe=e=>e>=Ze?`${(e/Ze).toFixed(2)} MB`:e>=Xe?`${(e/Xe).toFixed(2)} KB`:`${e} B`,$e=(e,t=8,n=6)=>e.length<=t+n?e:`${e.slice(0,t)}…${e.slice(-n)}`,et=e=>{if(typeof e!=`string`||!e)return!1;try{let t=new URL(e,globalThis.location?.origin??`https://example.org`);return t.protocol===`https:`||t.protocol===`http:`}catch{return!1}};function tt(e){try{let t=new URL(e,globalThis.location?.origin??`https://example.org`),n=new URLSearchParams(t.hash.replace(/^#/,``)).has(`t`),r=new URLSearchParams(t.search).has(`p`),i=t.pathname,a=/^\/(?:stream|feed)\/p\/[^/]+$/.test(i),o=/^\/p~[^/?#]+$/.test(i);return n||r||a||o}catch{return!1}}function nt(e){let t=new Uint8Array(e),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,r=[],i=t.length,a=0;for(;a+2>>18&63]+n[e>>>12&63]+n[e>>>6&63]+n[e&63])}let o=i-a;if(o===1){let e=t[a]<<16;r.push(n[e>>>18&63]+n[e>>>12&63]+`==`)}else if(o===2){let e=t[a]<<16|t[a+1]<<8;r.push(n[e>>>18&63]+n[e>>>12&63]+n[e>>>6&63]+`=`)}return r.join(``).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``)}function Z(e,t){if(typeof e!=`object`||!e)return;let n=e,r=n[t];if(typeof r==`string`)return r;let i=n.meta;if(typeof i==`object`&&i){let e=i[t];if(typeof e==`string`)return e}}function rt(e,t){if(typeof e!=`object`||!e)return;let n=e,r=n[t];if(typeof r==`number`&&Number.isFinite(r))return r;let i=n.meta;if(typeof i==`object`&&i){let e=i[t];if(typeof e==`number`&&Number.isFinite(e))return e}}function it(e,t){if(!e)return;let n=[`sigilActionUrl`,`sigilUrl`,`actionUrl`,`url`,`claimedUrl`,`loginUrl`,`sourceUrl`,`originUrl`,`link`,`href`];if(t)for(let e of n){let n=t[e];if(et(n))return n}try{let t=new DOMParser().parseFromString(e,`image/svg+xml`);for(let e of Array.from(t.getElementsByTagName(`metadata`))){let t=(e.textContent??``).trim();if(!t)continue;let r=t.replace(/^$/,``);try{let e=JSON.parse(r);if(typeof e==`object`&&e)for(let t of n){let n=e[t];if(et(n))return n}}catch{let e=r.match(/https?:\/\/[^\s"'<>)#]+/i);if(e&&et(e[0]))return e[0]}}for(let e of Array.from(t.getElementsByTagName(`a`))){let t=e.getAttribute(`href`)||e.getAttribute(`xlink:href`);if(et(t))return t}}catch{}}async function at(e,t,n={}){let r=n.cacheName??`sigil-attachments-v1`,i=(n.pathPrefix??`/att/`).replace(/\/+$/,``)+`/`;try{if(!(`caches`in globalThis)||typeof caches.open!=`function`)return;let n=await caches.open(r),a=`${i}${e}`;return await n.put(new Request(a,{method:`GET`}),new Response(t,{headers:{"Content-Type":t.type||`application/octet-stream`}})),a}catch{return}}function ot(e){let t=Math.floor(e/1e3);return`${Math.floor(t/60).toString().padStart(2,`0`)}:${(t%60).toString().padStart(2,`0`)}`}function st(e){let t=e.indexOf(` -`);return t>=0?e.slice(0,t):e}function ct(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}var lt=`kai-voh:draft:v1`,ut=[`text`,`code`,`md`,`html`],dt=[`code`,`sanitized`],ft=[`derived`,`glyph`],pt=e=>typeof e==`object`&&!!e,mt=e=>{let t=BigInt(2**53-1),n=BigInt(-(2**53-1));return e>t?2**53-1:e{let t=typeof e==`number`?e:typeof e==`string`?Number.parseInt(e,10):typeof e==`bigint`?Number(e):NaN;if(!Number.isFinite(t))return null;let n=Math.floor(t);return n<0?null:n};function gt({pulseRef:e}){let t=me(),n=(0,G.useMemo)(()=>pt(t)?ht(t.pulse):null,[t]);return(0,G.useEffect)(()=>{typeof n==`number`&&(e.current=n)},[n,e]),null}var _t=(e,t=``)=>typeof e==`string`?e:t,vt=(e,t=!1)=>typeof e==`boolean`?e:t,yt=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],bt=e=>{if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!pt(n))continue;let e=_t(n.phiKey),r=_t(n.kaiSignature),i=_t(n.label);if(!e||!r||!i)continue;let a=typeof n.sigilId==`string`&&n.sigilId.trim()?n.sigilId:void 0;t.push({phiKey:e,kaiSignature:r,label:i,sigilId:a})}return t},Q=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.now():0,xt=async()=>{await new Promise(e=>requestAnimationFrame(()=>e()))},St=async(e,t,n)=>{let r=null,i=new Promise((e,i)=>{r=window.setTimeout(()=>i(Error(`${n} timed out`)),t)});try{return await Promise.race([e,i])}finally{r!==null&&window.clearTimeout(r)}},$=()=>{let e=typeof crypto<`u`?crypto:void 0;if(e&&`randomUUID`in e&&typeof e.randomUUID==`function`)return e.randomUUID();if(e&&`getRandomValues`in e&&typeof e.getRandomValues==`function`){let t=new Uint8Array(16);e.getRandomValues(t);let n=``;for(let e=0;e`u`)throw Error(`encode worker unavailable (no window)`);if(typeof Worker>`u`)throw Error(`encode worker unavailable (Worker not supported)`);let e=new URL(`data:video/mp2t;base64,Ly8vIDxyZWZlcmVuY2UgbGliPSJ3ZWJ3b3JrZXIiIC8+CgppbXBvcnQgewogIGVuY29kZVRva2VuV2l0aEJ1ZGdldHMsCiAgdHlwZSBGZWVkUG9zdFBheWxvYWQsCn0gZnJvbSAiLi4vLi4vdXRpbHMvZmVlZFBheWxvYWQiOwoKdHlwZSBFbmNvZGVXb3JrZXJSZXF1ZXN0ID0gewogIGlkOiBzdHJpbmc7CiAgcGF5bG9hZDogRmVlZFBvc3RQYXlsb2FkOwp9OwoKdHlwZSBFbmNvZGVXb3JrZXJSZXNwb25zZSA9CiAgfCB7IGlkOiBzdHJpbmc7IG9rOiB0cnVlOyB0b2tlbjogc3RyaW5nOyB3aXRoaW5IYXJkOiBib29sZWFuOyBtczogbnVtYmVyIH0KICB8IHsgaWQ6IHN0cmluZzsgb2s6IGZhbHNlOyBlcnJvcjogc3RyaW5nOyBtczogbnVtYmVyIH07Cgpjb25zdCBub3cgPSAoKTogbnVtYmVyID0+CiAgc2VsZi5wZXJmb3JtYW5jZSAmJiB0eXBlb2Ygc2VsZi5wZXJmb3JtYW5jZS5ub3cgPT09ICJmdW5jdGlvbiIKICAgID8gc2VsZi5wZXJmb3JtYW5jZS5ub3coKQogICAgOiBEYXRlLm5vdygpOwoKc2VsZi5vbm1lc3NhZ2UgPSAoZXY6IE1lc3NhZ2VFdmVudDxFbmNvZGVXb3JrZXJSZXF1ZXN0PikgPT4gewogIGNvbnN0IHQwID0gbm93KCk7CiAgY29uc3QgZGF0YSA9IGV2LmRhdGE7CgogIHRyeSB7CiAgICBjb25zdCBvdXQgPSBlbmNvZGVUb2tlbldpdGhCdWRnZXRzKGRhdGEucGF5bG9hZCk7CiAgICBjb25zdCBtc2c6IEVuY29kZVdvcmtlclJlc3BvbnNlID0gewogICAgICBpZDogZGF0YS5pZCwKICAgICAgb2s6IHRydWUsCiAgICAgIHRva2VuOiBvdXQudG9rZW4sCiAgICAgIHdpdGhpbkhhcmQ6IG91dC53aXRoaW5IYXJkLAogICAgICBtczogbm93KCkgLSB0MCwKICAgIH07CiAgICBzZWxmLnBvc3RNZXNzYWdlKG1zZyk7CiAgfSBjYXRjaCAoZSkgewogICAgY29uc3QgbXNnOiBFbmNvZGVXb3JrZXJSZXNwb25zZSA9IHsKICAgICAgaWQ6IGRhdGEuaWQsCiAgICAgIG9rOiBmYWxzZSwKICAgICAgZXJyb3I6IGUgaW5zdGFuY2VvZiBFcnJvciA/IGUubWVzc2FnZSA6IFN0cmluZyhlKSwKICAgICAgbXM6IG5vdygpIC0gdDAsCiAgICB9OwogICAgc2VsZi5wb3N0TWVzc2FnZShtc2cpOwogIH0KfTsK`,``+import.meta.url);return Ct=new Worker(e,{type:`module`,name:`kaiVohEncodeWorker`}),Ct.onmessage=e=>{let t=e.data,n=wt.get(t.id);n&&(wt.delete(t.id),n(t))},Ct.onerror=()=>{for(let[e,t]of wt)t({id:e,ok:!1,error:`encode worker crashed`,ms:0});wt.clear();try{Ct?.terminate()}catch{}Ct=null},Ct}async function Et(e){let t=Tt(),n=$();return new Promise(r=>{wt.set(n,r);let i={id:n,payload:e};t.postMessage(i)})}async function Dt(e){let t=Q(),n=()=>{try{let n=N(e);return{id:$(),ok:!0,token:n.token,withinHard:n.withinHard,ms:Q()-t}}catch(e){return{id:$(),ok:!1,error:e instanceof Error?e.message:String(e),ms:Q()-t}}};try{let t=await Et(e);if(!t.ok){let e=n();return e.ok?e:t}return t}catch{return n()}}function Ot({initialCaption:e=``,initialAuthor:t=``,onExhale:r}){let{auth:i}=pe(),a=i.meta,o=(0,G.useRef)(NaN),[s,l]=(0,G.useState)(e),[d,f]=(0,G.useState)(t),[p,m]=(0,G.useState)(`text`),[h,_]=(0,G.useState)(`tsx`),[v,y]=(0,G.useState)(`code`),[x,S]=(0,G.useState)(``),[w,T]=(0,G.useState)(``),[E,O]=(0,G.useState)(``),[k,A]=(0,G.useState)([]),[ne,j]=(0,G.useState)([]),[N,P]=(0,G.useState)({version:1,totalBytes:0,inlinedBytes:0,items:[]}),F=(0,G.useRef)(N),[ie,I]=(0,G.useState)(!1),[L,oe]=(0,G.useState)(null),[R,se]=(0,G.useState)(!1),[z,B]=(0,G.useState)(``),[V,ue]=(0,G.useState)(null),[de,H]=(0,G.useState)(null),[fe,U]=(0,G.useState)(null),[me,W]=(0,G.useState)(!1),[he,ge]=(0,G.useState)(``),[_e,be]=(0,G.useState)(0),[xe,Se]=(0,G.useState)(`path`),[q,Ce]=(0,G.useState)(!1),[J,we]=(0,G.useState)(`derived`),[Te,De]=(0,G.useState)(``),[Y,Oe]=(0,G.useState)(()=>ye(18)),[X,ke]=(0,G.useState)([]),[Ae,je]=(0,G.useState)(!1),Me=(0,G.useRef)(!1),Ne=(0,G.useRef)(null),Fe=(0,G.useRef)(null),Ie=!!a;(0,G.useEffect)(()=>{Me.current||l(e)},[e]),(0,G.useEffect)(()=>{Me.current||f(t)},[t]),(0,G.useEffect)(()=>{if(Me.current||(Me.current=!0,typeof window>`u`))return;let n=window.sessionStorage.getItem(lt);if(n)try{let r=JSON.parse(n);if(!pt(r)||r.v!==1)return;let i=ut.includes(r.bodyKind)?r.bodyKind:`text`,a=dt.includes(r.htmlMode)?r.htmlMode:`code`,o=ft.includes(r.sealMode)?r.sealMode:`derived`,s=yt(r.extraUrls).map(e=>e.trim()).filter(e=>et(e)).map(e=>ae({url:e}));l(_t(r.caption,e)),f(_t(r.author,t)),m(i),_(_t(r.codeLang,`tsx`)),y(a),O(_t(r.extraUrlField,``)),A(s),Ce(vt(r.privateOn,!1)),we(o),De(_t(r.sealTeaser,``)),Oe(_t(r.sealSalt,ye(18))),ke(bt(r.allowedGlyphs)),je(vt(r.sealAdvanced,!1))}catch{}},[t,e]),(0,G.useEffect)(()=>{if(Me.current)return Ne.current&&window.clearTimeout(Ne.current),Ne.current=window.setTimeout(()=>{let e={v:1,caption:s,author:d,bodyKind:p,codeLang:h,htmlMode:v,extraUrlField:E,extraUrls:k.map(e=>e.url),privateOn:q,sealMode:J,sealTeaser:Te,sealSalt:Y,allowedGlyphs:X,sealAdvanced:Ae};try{window.sessionStorage.setItem(lt,JSON.stringify(e))}catch{}},250),()=>{Ne.current&&window.clearTimeout(Ne.current)}},[s,d,p,h,v,E,k,q,J,Te,Y,X,Ae]),(0,G.useEffect)(()=>{F.current=N},[N]),(0,G.useEffect)(()=>()=>{L&&URL.revokeObjectURL(L.url)},[]);let Le=(0,G.useMemo)(()=>Z(a,`sigilActionUrl`)||Z(a,`sigilUrl`)||Z(a,`actionUrl`)||Z(a,`url`)||Z(a,`claimedUrl`)||Z(a,`loginUrl`)||Z(a,`sourceUrl`)||Z(a,`originUrl`)||Z(a,`link`)||Z(a,`href`)||it(i.svgText,a??{})||(globalThis.location?.origin??`https://kaiklok.com`),[a,i.svgText]);(0,G.useEffect)(()=>{a&&(S(Z(a,`userPhiKey`)??``),T(Z(a,`kaiSignature`)??``))},[a]),(0,G.useEffect)(()=>{q&&(Y.trim()||Oe(ye(18)))},[q,Y]);let Re=()=>{let e=E.trim();if(!et(e)){U(`Invalid URL. Enter a full http(s) link.`);return}A(t=>[...t,ae({url:e})]),O(``),U(null)},ze=e=>{A(t=>t.filter((t,n)=>n!==e))};function Be(e){let t=e,n=typeof t.webkitRelativePath==`string`?t.webkitRelativePath:``;return n.trim()?n:e.name}async function Ve(e){let t=await e.arrayBuffer(),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n),i=``;for(let e=0;e{let t=F.current.items.slice(),n=[];for(let r of e){let e=Be(r);if(q&&r.size>Ye){n.push(e);continue}if(r.size<=Ye){let n=await r.arrayBuffer();t.push(le({name:e,type:r.type||`application/octet-stream`,size:r.size,data_b64url:nt(n)}))}else{let n=await Ve(r),i=await at(n,r,{cacheName:`sigil-attachments-v1`,pathPrefix:`/att/`});t.push(b({sha256:n,name:e,type:r.type||`application/octet-stream`,size:r.size,url:i}))}}return n.length>0&&U(`Private (Sealed) mode cannot include cache-backed large files. Skipped: ${n.slice(0,3).join(`, `)}${n.length>3?` (+${n.length-3} more)`:``}. Attach as a URL instead (Drive/S3/IPFS/etc), or keep files ≤ ${Qe(Ye)}.`),g(t)},Ue=async e=>{if(!e.target.files)return;let t=Array.from(e.target.files);j(e=>[...e,...t]),P(await He(t))},We=async e=>{if(e.preventDefault(),e.stopPropagation(),!e.dataTransfer?.files?.length)return;let t=Array.from(e.dataTransfer.files);j(e=>[...e,...t]),P(await He(t))},Ge=e=>{e.preventDefault(),e.stopPropagation()},Xe=()=>{j([]);let e={version:1,totalBytes:0,inlinedBytes:0,items:[]};P(e),F.current=e};function Ze(e){let[,t]=e.split(`,`,2);return t?Math.ceil(t.length*3/4):0}async function ht(e){if(q){U(`Private (Sealed) mode cannot include recorded stories (cache-backed video refs). Upload as a URL instead.`),I(!1);return}let t=await at(e.sha256,e.file,{cacheName:`sigil-attachments-v1`,pathPrefix:`/att/`}),n=b({sha256:e.sha256,name:e.file.name,type:e.mimeType||e.file.type||`video/webm`,size:e.file.size,url:t}),r=(e.thumbnailDataUrl.split(`,`,2)[1]??``).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``),i=le({name:e.file.name.replace(/\.(webm|mp4)$/i,``)+`_thumb.png`,type:`image/png`,size:Ze(e.thumbnailDataUrl),data_b64url:r});P(g([...F.current.items,n,i])),L&&URL.revokeObjectURL(L.url),oe({url:URL.createObjectURL(e.file),durationMs:e.durationMs}),I(!1)}let $=s.trim(),Ct=(0,G.useMemo)(()=>$?p===`text`?D($):p===`md`?C($):p===`html`?te($,v):ce($,h.trim()||void 0):void 0,[$,p,h,v]),wt=(0,G.useMemo)(()=>{if(!$)return;let e=st($).trim();if(e){if(p===`code`){let t=h.trim();return ct(`${t?`code:${t}`:`code`} — ${e}`,220)}return ct(p===`md`?`md — ${e}`:p===`html`?`html — ${e}`:e,220)}},[$,p,h]),Tt=(0,G.useMemo)(()=>F.current.items.some(e=>e.kind===`file-ref`),[N]),Et=(0,G.useMemo)(()=>{if(!q)return wt;let e=Te.trim();return e?ct(e,220):`Sealed Memory`},[q,wt,Te]),Ot=q&&J===`derived`&&Ie&&!!w.trim(),kt=q&&J===`glyph`&&X.length>0,At=(0,G.useMemo)(()=>q?Ie?J===`derived`?w.trim()?Y.trim()?(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Mode: `,(0,K.jsx)(`strong`,{children:`Derived Glyph Access`}),` • Any derivative glyph exported from this issuer glyph can unlock • Salt length`,` `,(0,K.jsx)(`strong`,{children:Y.trim().length})]}):(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Derivation salt missing — rotate to generate.`}):(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Derived access requires ΣSig (kaiSignature) present in your verified glyph.`}):X.length===0?(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Mode: Specific Glyph Access requires at least one allowed glyph SVG uploaded.`}):(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Mode: `,(0,K.jsx)(`strong`,{children:`Specific Glyph Access`}),` • Allowed glyphs `,(0,K.jsx)(`strong`,{children:X.length})]}):(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Private (Sealed) requires a verified glyph session.`}):null,[q,Ie,J,w,Y,X.length]),jt=async e=>{if(e.length===0)return;let t=[],n=[];for(let r of e)try{let e=Pe(await r.text()),i=(e.userPhiKey??``).trim(),a=(e.kaiSignature??``).trim();if(!i||!a){n.push(r.name);continue}t.push({label:r.name,phiKey:i,kaiSignature:a,sigilId:(e.sigilId??``).trim()?(e.sigilId??``).trim():void 0})}catch{n.push(r.name)}t.length>0&&(ke(e=>{let n=e.slice(),r=new Set(e.map(e=>`${e.phiKey}:${e.kaiSignature}`));for(let e of t){let t=`${e.phiKey}:${e.kaiSignature}`;r.has(t)||(r.add(t),n.push(e))}return n}),U(null)),n.length>0&&U(`Some glyph SVGs were missing ΦKey/ΣSig metadata and were not added: ${n.slice(0,3).join(`, `)}${n.length>3?` (+${n.length-3} more)`:``}.`)},Mt=e=>{ke(t=>t.filter((t,n)=>n!==e))},Nt=async()=>{if(R)return;H(null),U(null),W(!1),ge(``),be(0),Se(`path`),ue(null);let e=(Le||``).trim(),t=tt(e);if(t||U(`Proof of Breath™ URL not detected; using fallback. Link generation will still work.`),q){if([...F.current.items,...k].some(e=>e.kind===`file-ref`)){H(`Private (Sealed) mode cannot include cache-backed file refs. Keep files ≤ ${Qe(Ye)} (inline) or attach public URLs.`);return}if(J===`derived`&&!Ot){H(`Private (Sealed) → Derived mode requires a verified glyph with ΣSig (kaiSignature) present.`);return}if(J===`glyph`&&!kt){H(`Private (Sealed) → Specific Glyph mode requires at least one allowed glyph SVG uploaded.`);return}}let i=o.current;if(!Number.isFinite(i)||i<0){H(`Failed to compute Kai pulse (aligned ticker not ready).`);return}let s=mt(u(i)),l=Q();try{se(!0),B(`paint`),await xt(),await xt(),B(`assemble`);let o=[...F.current.items,...k],u=o.length>0?g(o):void 0,f=t?e:void 0,p=f?n(f)??f:void 0,m=Z(a,`sigilId`)||Z(a,`sigilID`)||Z(a,`glyphId`)||void 0,h=re({url:e,pulse:i,caption:Et,body:Ct,author:d.trim()?d.trim():void 0,source:`manual`,sigilId:m,phiKey:Ie&&x?x:void 0,kaiSignature:Ie&&w?w:void 0,ts:s,attachments:u,parentUrl:f,originUrl:p});B(`prepare`);let _=Q(),v=await St(M(h,{cacheName:`sigil-attachments-v1`,pathPrefix:`/att/`}),2e4,`preparePayloadForLink`),y=Q()-_,b=v;if(q){let e={body:v.body??null,attachments:v.attachments??null},t;if(J===`derived`){let n=Y.trim()?Y.trim():ye(18);n!==Y&&Oe(n),t=await ve({inner:e,teaser:Et??void 0,derived:{issuerKaiSignature:w,issuerPhiKey:x||void 0,salt_b64url:n}})}else{let n=X.map(e=>({phiKey:e.phiKey,kaiSignature:e.kaiSignature,sigilId:e.sigilId}));t=await ve({inner:e,teaser:Et??void 0,allowGlyphs:n})}b={...v,body:void 0,attachments:void 0,seal:t}}B(`encode(worker)`);let S=Q(),C=await St(Dt(b),3e4,`encodeTokenWithBudgets(worker)`),T=Q()-S;if(!C.ok){ue({stage:`encode(worker)`,totalMs:Q()-l,prepareMs:y,encodeMs:C.ms,items:o.length,inlinedBytes:u?.inlinedBytes,totalBytes:u?.totalBytes,note:C.error}),H(`Token encode failed: ${C.error}. If you have a strict CSP, allow module workers from 'self' (worker-src 'self'). This build uses a real worker file (no blob workers).`);return}let{token:E,withinHard:D}=C;be(E.length);let O=globalThis.location?.origin??`https://kaiklok.com`,A=D?`${O}/stream/p/${encodeURIComponent(E)}`:`${O}/stream#t=${E}`;Se(D?`path`:`hash`),E.length>3500?U(`Token exceeds hard path limit (${E.length.toLocaleString()} > ${c.toLocaleString()}). Using hash URL to avoid request-line limits.`):E.length>1800&&U(`Token is large (${E.length.toLocaleString()} chars). Prefer trimming inlined files or relying on external URLs.`),B(`register`),ee(A),B(`clipboard`);try{await navigator.clipboard.writeText(A),W(!0)}catch{W(!1)}ge(A),ue({stage:`done`,totalMs:Q()-l,prepareMs:y,encodeMs:T,tokenLen:E.length,items:o.length,inlinedBytes:u?.inlinedBytes,totalBytes:u?.totalBytes}),r&&r({shareUrl:A,token:E,payload:b})}catch(e){let t=e instanceof Error?e.message:typeof e==`string`?e:`Failed to generate link.`;H(t),ue({stage:z||`unknown`,totalMs:Q()-l,note:t})}finally{B(``),se(!1)}},Pt=()=>{l(e||``),f(t||``),m(`text`),_(`tsx`),y(`code`),O(``),A([]),Xe(),H(null),U(null),W(!1),ge(``),be(0),Se(`path`),B(``),ue(null),De(``),je(!1),L&&(URL.revokeObjectURL(L.url),oe(null));try{window.sessionStorage.removeItem(lt)}catch{}},Ft=e=>t=>e(t.target.value),It=(0,G.useMemo)(()=>{if(!Ie)return null;let e=rt(a,`pulse`);return(0,K.jsxs)(`div`,{className:`id-banner`,role:`status`,"aria-live":`polite`,children:[(0,K.jsx)(`span`,{className:`id-dot`}),(0,K.jsxs)(`span`,{className:`id-text`,children:[`Verified by Sigil — ΦKey `,(0,K.jsx)(`strong`,{children:$e(x)}),` • `,`Last verified pulse `,(0,K.jsx)(`strong`,{children:e??`—`})]}),(0,K.jsxs)(`span`,{className:`id-sub mono`,children:[`ΣSig `,$e(w)]})]})},[Ie,x,w,a]),Lt=(0,G.useMemo)(()=>Le?(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Proof Of Breath™ URL`}),(0,K.jsxs)(`div`,{className:`composer-input-row`,children:[(0,K.jsx)(`input`,{className:`composer-input locked`,type:`url`,value:Le,readOnly:!0}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:async()=>{try{await navigator.clipboard.writeText(Le),W(!0),window.setTimeout(()=>W(!1),1200)}catch{}},title:`Remember Proof Of Breath™ URL`,children:me?`Remembered ✓`:`Remember`})]}),!tt(Le)&&(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`No canonical stream token detected in the URL. Fallback will still produce a valid post.`})]}):null,[Le,me]),Rt=(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Privacy Seal`}),(0,K.jsxs)(`div`,{className:`story-actions`,style:{alignItems:`center`,gap:10},children:[(0,K.jsx)(`button`,{type:`button`,className:`pill ${q?`prim`:`subtle`}`,onClick:()=>{Ce(e=>!e),H(null),U(null)},title:`Toggle Private (Sealed)`,children:q?`Private: ON`:`Private: OFF`}),q&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,className:`pill ${J===`derived`?`prim`:`subtle`}`,onClick:()=>we(`derived`),title:`Derived glyph access`,children:`Derived`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${J===`glyph`?`prim`:`subtle`}`,onClick:()=>we(`glyph`),title:`Specific glyph allowlist`,children:`Specific Glyph`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${Ae?`prim`:`subtle`}`,onClick:()=>je(e=>!e),title:`Show advanced sealing details`,children:`Advanced`})]})]}),q&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Private (Sealed) encrypts `,(0,K.jsx)(`span`,{className:`mono`,children:`body + attachments`}),` inside the token. The outer post remains verifiable (ΦKey/ΣSig) but does not contain plaintext content.`]}),(0,K.jsxs)(`div`,{className:`composer`,style:{padding:0,marginTop:10},children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Public teaser (optional)`}),(0,K.jsx)(`input`,{className:`composer-input`,type:`text`,value:Te,onChange:Ft(De),placeholder:`What should be visible without unlocking?`,maxLength:240}),(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`If empty, the public caption becomes `,(0,K.jsx)(`span`,{className:`mono`,children:`Sealed Memory`}),`.`]})]}),J===`derived`&&(0,K.jsxs)(`div`,{className:`composer`,style:{padding:0,marginTop:10},children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Derivation salt (for verifier export)`}),(0,K.jsxs)(`div`,{className:`composer-input-row`,children:[(0,K.jsx)(`input`,{className:`composer-input mono`,type:`text`,readOnly:!0,value:Y}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:()=>Oe(ye(18)),title:`Rotate derivation salt`,children:`Rotate`}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:async()=>{try{await navigator.clipboard.writeText(Y),W(!0),window.setTimeout(()=>W(!1),900)}catch{}},title:`Copy salt`,children:`Copy`})]}),Ae&&(0,K.jsx)(`div`,{className:`composer-hint mono`,style:{marginTop:8},children:Ie&&w.trim()?(0,K.jsxs)(K.Fragment,{children:[`Derived ΣSig (b64url, post-scoped): `,(0,K.jsx)(`button`,{type:`button`,className:`pill subtle`,onClick:async()=>{try{let e=await Ke({baseKaiSignature:w,salt_b64url:Y});await navigator.clipboard.writeText(e),W(!0),window.setTimeout(()=>W(!1),900)}catch{}},title:`Copy derived signature`,children:`Copy derived ΣSig`}),(0,K.jsx)(`span`,{className:`dim`,style:{marginLeft:8},children:`(secret-equivalent; only for issuer export workflows)`})]}):`Derived preview unavailable (missing verified ΣSig).`})]}),J===`glyph`&&(0,K.jsxs)(`div`,{className:`composer`,style:{padding:0,marginTop:10},children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Allowed glyphs (upload SVG)`}),(0,K.jsxs)(`div`,{className:`story-actions`,style:{alignItems:`center`},children:[(0,K.jsxs)(`label`,{className:`pill`,children:[(0,K.jsx)(`input`,{type:`file`,accept:`.svg,image/svg+xml`,multiple:!0,className:`visually-hidden`,onChange:async e=>{let t=e.target.files?Array.from(e.target.files):[];e.currentTarget.value=``,t.length!==0&&await jt(t)}}),`Add allowed glyphs…`]}),X.length>0&&(0,K.jsx)(`button`,{type:`button`,className:`pill subtle`,onClick:()=>ke([]),title:`Clear allowlist`,children:`Clear`})]}),X.length>0&&(0,K.jsx)(`ul`,{className:`url-list`,style:{marginTop:10},children:X.map((e,t)=>(0,K.jsxs)(`li`,{className:`url-item`,style:{alignItems:`center`},children:[(0,K.jsx)(`span`,{className:`badge`,children:`glyph`}),(0,K.jsx)(`span`,{className:`mono`,children:ct(e.label,36)}),(0,K.jsxs)(`span`,{className:`dim`,style:{marginLeft:10},children:[`ΦKey `,$e(e.phiKey,10,8)]}),(0,K.jsx)(`button`,{type:`button`,className:`pill danger`,onClick:()=>Mt(t),title:`Remove glyph`,children:`✕`})]},`${e.phiKey}:${e.kaiSignature}:${t}`))}),(0,K.jsxs)(`div`,{className:`composer-hint`,style:{marginTop:8},children:[`This is `,(0,K.jsx)(`strong`,{children:`not`}),` pulse-locked — if a user possesses an allowed glyph (its ΣSig), they can unlock sealed posts across pulses.`]})]}),(0,K.jsxs)(`div`,{className:`composer-hint warn`,style:{marginTop:10},children:[`Private (Sealed) hard-guard: no cache-backed `,(0,K.jsx)(`span`,{className:`mono`,children:`file-ref`}),` attachments. Use URLs or keep files ≤`,` `,(0,K.jsx)(`strong`,{children:Qe(Ye)}),`.`]}),At]})]}),zt=(0,K.jsxs)(`div`,{className:`attachments`,children:[(0,K.jsx)(`h3`,{className:`attachments-title`,children:`Seals`}),(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Seal a memory`}),(0,K.jsxs)(`div`,{className:`story-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`pill prim icon-only${q?` disabled`:``}`,"aria-label":`Open Memory Recorder`,title:q?`Private mode: story capture is disabled (cache-backed)`:`Record story`,onClick:()=>{if(q){U(`Private (Sealed) mode disables story recording (cache-backed file refs). Add as URL instead.`);return}I(!0)},disabled:q,children:(0,K.jsx)(qe,{})}),L&&(0,K.jsxs)(`div`,{className:`story-preview`,children:[(0,K.jsx)(`video`,{src:L.url,playsInline:!0,controls:!0,className:`story-preview-video`}),(0,K.jsx)(`div`,{className:`story-preview-meta mono`,children:ot(L.durationMs)}),(0,K.jsx)(`button`,{type:`button`,className:`pill danger icon-only`,onClick:()=>{URL.revokeObjectURL(L.url),oe(null)},"aria-label":`Remove recorded preview`,title:`Remove preview`,children:(0,K.jsx)(Je,{})})]})]})]}),(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Seal any URL`}),(0,K.jsxs)(`div`,{className:`composer-input-row`,children:[(0,K.jsx)(`input`,{className:`composer-input`,type:`url`,placeholder:`https://example.com/docs/your-file.pdf`,value:E,onChange:Ft(O),autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:Re,title:`Add URL`,children:`Seal`})]}),k.length>0&&(0,K.jsx)(`ul`,{className:`url-list`,children:k.map((e,t)=>(0,K.jsxs)(`li`,{className:`url-item`,children:[(0,K.jsx)(`span`,{className:`mono`,children:$e(e.url,28,16)}),(0,K.jsx)(`button`,{type:`button`,className:`pill danger`,onClick:()=>ze(t),title:`Remove URL`,children:`✕`})]},`${e.url}-${t}`))})]}),(0,K.jsx)(`div`,{ref:Fe,className:`dropzone`,onDragOver:Ge,onDrop:We,"aria-label":`Drop files or folders here`,children:(0,K.jsxs)(`div`,{className:`dropzone-inner`,children:[(0,K.jsx)(`div`,{className:`dz-title`,children:`Seal files or folders`}),(0,K.jsxs)(`div`,{className:`dz-sub`,children:[`Tiny files get inlined; large files become cache-backed refs.`,q?(0,K.jsxs)(K.Fragment,{children:[` `,(0,K.jsx)(`strong`,{children:`(Private mode skips large files.)`})]}):null]}),(0,K.jsxs)(`div`,{className:`dz-actions`,children:[(0,K.jsxs)(`label`,{className:`pill`,children:[(0,K.jsx)(`input`,{type:`file`,multiple:!0,onChange:Ue,className:`visually-hidden`}),`Inhale files…`]}),(0,K.jsxs)(`label`,{className:`pill`,children:[(0,K.jsx)(`input`,{type:`file`,multiple:!0,webkitdirectory:``,onChange:Ue,className:`visually-hidden`}),`Inhale folder…`]}),ne.length>0&&(0,K.jsx)(`button`,{type:`button`,className:`pill subtle`,onClick:Xe,children:`Reset`})]})]})}),N.items.length>0&&(0,K.jsxs)(`div`,{className:`file-summary`,children:[(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Items: `,(0,K.jsx)(`strong`,{children:N.items.length}),` • Files total: `,(0,K.jsx)(`strong`,{children:Qe(N.totalBytes??0)}),` • Inlined:`,` `,(0,K.jsx)(`strong`,{children:Qe(N.inlinedBytes??0)}),` (≤ `,Qe(Ye),` each)`]}),(0,K.jsx)(`ul`,{className:`file-list`,children:N.items.map((e,t)=>{if(e.kind===`url`)return(0,K.jsx)(`li`,{className:`file-item`,children:(0,K.jsxs)(`div`,{className:`file-row`,children:[(0,K.jsx)(`span`,{className:`badge`,children:`url`}),(0,K.jsx)(`span`,{className:`mono`,children:$e(e.url,34,18)})]})},`url-${t}`);let n=e.name??`file-${t}`,r=e.kind===`file-inline`,i=`type`in e&&typeof e.type==`string`?e.type:`application/octet-stream`,a=`size`in e&&typeof e.size==`number`?e.size:0;return(0,K.jsx)(`li`,{className:`file-item`,children:(0,K.jsxs)(`div`,{className:`file-row`,children:[(0,K.jsx)(`span`,{className:`badge`,children:r?`inline`:`file`}),(0,K.jsx)(`span`,{className:`mono`,children:n}),(0,K.jsxs)(`span`,{className:`dim`,children:[i,` • `,Qe(a)]})]})},`${n}-${t}`)})}),N.items.some(e=>e.kind===`file-ref`)&&(0,K.jsxs)(`div`,{className:`composer-hint ${q?`warn`:``}`,children:[`Large files are cached and referenced by SHA-256.`,q?` Private (Sealed) will refuse these — attach public URLs instead.`:` You can also host publicly and attach the public URL above.`]})]})]}),Bt=p===`code`?10:3,Vt=p===`code`?`Paste your code…`:p===`md`?`Write markdown…`:p===`html`?`Write HTML… (default renders as escaped code unless sanitized by the stream UI)`:`What Resonants About This Moment…`,Ht=R||q&&J===`derived`&&!Ot||q&&J===`glyph`&&!kt||q&&Tt;return(0,K.jsxs)(`div`,{className:`social-connector-container`,children:[(0,K.jsx)(gt,{pulseRef:o}),(0,K.jsx)(`h2`,{className:`social-connector-title`,children:`KaiVoh`}),(0,K.jsxs)(`p`,{className:`social-connector-sub`,children:[`Exhale a sealed `,(0,K.jsx)(`strong`,{children:`Memory Stream`}),`.`]}),It,Lt,Rt,(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Body Format`}),(0,K.jsxs)(`div`,{className:`story-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`pill ${p===`text`?`prim`:`subtle`}`,onClick:()=>m(`text`),title:`Text`,children:`Text`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${p===`code`?`prim`:`subtle`}`,onClick:()=>m(`code`),title:`Code`,children:`Code`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${p===`md`?`prim`:`subtle`}`,onClick:()=>m(`md`),title:`Markdown`,children:`MD`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${p===`html`?`prim`:`subtle`}`,onClick:()=>m(`html`),title:`HTML`,children:`HTML`}),p===`code`&&(0,K.jsx)(`input`,{className:`composer-input`,style:{maxWidth:160},value:h,onChange:Ft(_),placeholder:`lang (tsx)`,"aria-label":`Code language`,autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1}),p===`html`&&(0,K.jsxs)(`button`,{type:`button`,className:`pill ${v===`code`?`prim`:`subtle`}`,onClick:()=>y(e=>e===`code`?`sanitized`:`code`),title:`HTML mode (stream decides how to render)`,children:[`mode:`,v]})]}),(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`v2 posts include `,(0,K.jsx)(`span`,{className:`mono`,children:`body.kind`}),` so the stream can render code as code (escaped) instead of treating everything as plain text.`,q?(0,K.jsx)(K.Fragment,{children:` In Private mode, the body is sealed and not visible until unlocked.`}):null]})]}),(0,K.jsxs)(`div`,{className:`composer two`,children:[(0,K.jsxs)(`div`,{className:`field`,children:[(0,K.jsxs)(`label`,{htmlFor:`caption`,className:`composer-label`,children:[`Memory `,(0,K.jsx)(`span`,{className:`muted`,children:`(Body)`})]}),(0,K.jsx)(`textarea`,{id:`caption`,className:`composer-textarea${p===`code`?` mono`:``}`,rows:Bt,placeholder:Vt,value:s,onChange:Ft(l),spellCheck:p!==`code`})]}),(0,K.jsxs)(`div`,{className:`field`,children:[(0,K.jsxs)(`label`,{htmlFor:`author`,className:`composer-label`,children:[`Author Handle `,(0,K.jsx)(`span`,{className:`muted`,children:`(optional, e.g., @KaiRexKlok)`})]}),(0,K.jsx)(`input`,{id:`author`,className:`composer-input`,type:`text`,placeholder:`@handle`,value:d,onChange:Ft(f),autoCorrect:`off`,autoCapitalize:`none`})]})]}),zt,de&&(0,K.jsx)(`div`,{className:`composer-error`,children:de}),fe&&!de&&(0,K.jsx)(`div`,{className:`composer-warn`,children:fe}),(R||V)&&(0,K.jsxs)(`div`,{className:`composer-hint mono`,"aria-live":`polite`,children:[R&&z?`stage: ${z}`:null,V?(0,K.jsxs)(K.Fragment,{children:[R&&z?` • `:null,`total ${Math.round(V.totalMs)}ms`,typeof V.prepareMs==`number`?` • prepare ${Math.round(V.prepareMs)}ms`:``,typeof V.encodeMs==`number`?` • encode ${Math.round(V.encodeMs)}ms`:``,typeof V.tokenLen==`number`?` • token ${V.tokenLen.toLocaleString()}`:``,typeof V.items==`number`?` • items ${V.items}`:``,typeof V.inlinedBytes==`number`?` • inlined ${Qe(V.inlinedBytes)}`:``,typeof V.totalBytes==`number`?` • bytes ${Qe(V.totalBytes)}`:``,V.note?` • note: ${V.note}`:``]}):null]}),(0,K.jsxs)(`div`,{className:`composer-actions`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:Nt,className:`composer-submit`,disabled:Ht,title:Ht?`Fix sealing requirements / attachments to proceed`:`Exhale Stream`,children:R?`Exhaling…${z?` (${z})`:``}`:q?`Exhale Sealed Stream`:`Exhale Stream`}),(0,K.jsx)(`button`,{type:`button`,className:`composer-reset`,onClick:Pt,children:`Reset`})]}),he&&(0,K.jsxs)(`div`,{className:`composer-result`,children:[(0,K.jsx)(`label`,{htmlFor:`gen-url`,className:`composer-label`,children:`Your shareable link`}),(0,K.jsx)(`input`,{id:`gen-url`,className:`composer-input`,type:`text`,readOnly:!0,value:he,onFocus:e=>e.currentTarget.select()}),(0,K.jsxs)(`div`,{className:`composer-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`composer-copy`,onClick:async()=>{try{await navigator.clipboard.writeText(he),W(!0)}catch{W(!1)}},children:me?`Remembered ✓`:`Remember`}),(0,K.jsx)(`a`,{className:`composer-open`,href:he,target:`_blank`,rel:`noopener noreferrer`,children:`Open in new tab →`})]}),(0,K.jsxs)(`p`,{className:`composer-hint`,children:[`Token length: `,(0,K.jsx)(`strong`,{children:_e.toLocaleString()}),` chars • URL mode:`,` `,(0,K.jsx)(`strong`,{children:xe===`path`?`path`:`hash`}),` • soft `,1800 .toLocaleString(),` • hard`,` `,3500 .toLocaleString(),q?(0,K.jsxs)(K.Fragment,{children:[` `,`• `,(0,K.jsx)(`strong`,{children:`sealed`})]}):null]})]}),(0,K.jsx)(Ee,{isOpen:ie,onClose:()=>I(!1),onCaptured:ht,maxDurationMs:15e3,preferredFacingMode:`user`})]})}var kt=50*1024*1024,At=10;function jt(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=1024,r=Math.floor(Math.log(e)/Math.log(n)),i=e/n**+r;return`${i.toFixed(i>=10?0:1)} ${t[r]}`}function Mt(e){let{type:t,name:n}=e,r=n.toLowerCase();return t.startsWith(`image/`)?`image`:t.startsWith(`video/`)?`video`:t.startsWith(`audio/`)?`audio`:t===`application/pdf`||t.startsWith(`text/`)||t.includes(`word`)||t.includes(`officedocument`)||t.includes(`spreadsheet`)||t.includes(`presentation`)?`document`:r.endsWith(`.zip`)||r.endsWith(`.rar`)||r.endsWith(`.7z`)||r.endsWith(`.tar`)||r.endsWith(`.gz`)?`archive`:`other`}var Nt={image:`Image`,video:`Video`,audio:`Audio`,document:`Document`,archive:`Archive`,other:`File`};function Pt(e){return[e.name,e.size,e.lastModified,Date.now(),Math.random().toString(36).slice(2,8)].join(`-`)}function Ft(e){return e.length===0?null:(e.find(e=>e.kind===`image`||e.kind===`video`)??e[0])?.id??null}function It(e){return`${e.name}:${e.size}:${e.lastModified}`}function Lt({onReady:e}){let t=(0,G.useRef)(null),n=(0,G.useRef)(null),r=(0,G.useRef)(null),[i,a]=(0,G.useState)([]),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(`file`),[f,p]=(0,G.useState)(``),[m,h]=(0,G.useState)(``),[g,_]=(0,G.useState)(`general`),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(``),[S,C]=(0,G.useState)(``),[w,T]=(0,G.useState)(``),[E,D]=(0,G.useState)(``),[O,k]=(0,G.useState)(``),[ee,A]=(0,G.useState)(!1),[te,ne]=(0,G.useState)(!1),[j,M]=(0,G.useState)(null),[N,P]=(0,G.useState)(!1),[F,re]=(0,G.useState)(!1),ie=1e3,I=i.length>0,L=g===`legal-contract`,ae=(0,G.useMemo)(()=>i.reduce((e,t)=>e+t.file.size,0),[i]),oe=(0,G.useMemo)(()=>I?jt(ae):`0 B`,[I,ae]),R=(0,G.useMemo)(()=>L?v.trim().length>0&&b.trim().length>0:!0,[L,v,b]),se=(0,G.useMemo)(()=>I?R?3:2:1,[I,R]),ce=(0,G.useMemo)(()=>se===1?L?`Attach your agreement, annexes, and evidence`:`Attach the media or files you want to seal`:se===2?L?`Describe the agreement and parties`:`Add context: caption, link, and tags`:L?`Review and seal as a legal record`:`Review and seal to the KaiVoh stream`,[se,L]),z=(0,G.useCallback)(()=>{n.current&&=(URL.revokeObjectURL(n.current),null),r.current=null},[]);(0,G.useEffect)(()=>()=>{z()},[z]);let B=(0,G.useCallback)((e,t)=>{let i=t!==null&&e.some(e=>e.id===t)?t:Ft(e);if(s(i),!i){c&&(z(),l(null)),u!==`file`&&d(`file`);return}let a=e.find(e=>e.id===i)??null;if(!a){c&&(z(),l(null)),u!==`file`&&d(`file`);return}if(a.kind===`image`||a.kind===`video`){let e=a.kind;u!==e&&d(e);let t=It(a.file);if(!(i===o&&r.current===t&&typeof c==`string`&&c.length>0)){z();let e=URL.createObjectURL(a.file);n.current=e,r.current=t,l(e)}return}u!==`file`&&d(`file`),c&&(z(),l(null))},[z,o,u,c,s,d,l]),le=(0,G.useCallback)(()=>{a([]),s(null),z(),l(null),d(`file`),p(``),h(``),_(`general`),y(``),x(``),C(``),T(``),D(``),k(``),A(!1),ne(!1),M(null),re(!1),t.current&&(t.current.value=``)},[z]),V=(0,G.useCallback)(e=>{let t=Array.isArray(e)?e:Array.from(e);if(t.length===0)return;let n=!1,r=!1,s=[...i];for(let e of t){if(s.length>=At){r=!0;break}if(e.size>kt){n=!0;continue}if(s.some(t=>t.file.name===e.name&&t.file.size===e.size&&t.file.lastModified===e.lastModified))continue;let t=Mt(e),i={id:Pt(e),file:e,kind:t};s=[...s,i]}s.length===i.length&&!n?r||M(`No new files were added (duplicates or all invalid).`):M(null),n?M(`Some files were too large. Max individual file size is ${jt(kt)}.`):r&&M(`You can attach up to ${At} files per sealed post. Remove one to add another.`),a(s),B(s,o)},[i,o,B]),ue=e=>{let t=e.target.files;!t||t.length===0||V(t)},de=e=>{e.preventDefault(),e.stopPropagation(),P(!1);let t=e.dataTransfer.files;!t||t.length===0||V(t)},H=e=>{e.preventDefault(),e.stopPropagation()},fe=e=>{e.preventDefault(),e.stopPropagation(),P(!0)},pe=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget===e.target&&P(!1)},U=()=>{t.current?.click()},me=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),U())},W=e=>{let t=i.filter(t=>t.id!==e);a(t),B(t,o===e?null:o)},he=e=>{s(e),B(i,e)},ge=()=>{if(!I){M(`Attach at least one file to seal.`);return}if(L&&!R){M(`Fill in the agreement title and counterparty to seal legally.`);return}let t=m.trim();if(t.length>0)try{new URL(t)}catch{M(`The link URL looks invalid. Please check it.`);return}let n=(o?i.find(e=>e.id===o):null)??i[0]??null;if(!n){M(`Something went wrong selecting the primary attachment.`);return}let r=f.trim(),a=L?{agreementTitle:v.trim()||void 0,counterpartyName:b.trim()||void 0,counterpartyEmail:S.trim()||void 0,jurisdiction:w.trim()||void 0,effectiveDateIso:E||void 0,referenceCode:O.trim()||void 0,isConfidential:ee,includesPersonalData:te}:void 0;re(!0),e({mediaType:n.kind===`image`||n.kind===`video`?n.kind:`file`,file:n.file,caption:r.length>0?r:void 0,attachments:i,mainAttachmentId:n.id,postKind:g,legalMeta:a,linkUrl:t.length>0?t:void 0})},_e=(0,G.useMemo)(()=>{if(!I)return null;let e=i.length;return`${e===1?`1 attached file`:`${e} attached files total`} • ${oe}`},[i,I,oe]);return(0,K.jsxs)(`div`,{className:`kv-post-composer flex flex-col items-center gap-4 p-6 w-full`,children:[(0,K.jsxs)(`div`,{className:`kv-post-header w-full max-w-xl flex flex-col gap-2`,children:[(0,K.jsxs)(`div`,{className:`kv-post-step-row flex items-center justify-between`,children:[(0,K.jsxs)(`div`,{className:`kv-post-step-badge`,children:[(0,K.jsx)(`span`,{className:`kv-post-step-number`,children:se}),(0,K.jsx)(`span`,{className:`kv-post-step-label`,children:ce})]}),I&&(0,K.jsx)(`button`,{type:`button`,className:`kv-post-reset-btn`,onClick:le,children:`Reset`})]}),(0,K.jsx)(`p`,{className:`kv-post-subtitle`,children:`Attach images, videos, PDFs, DOCX, ZIPs—anything you want sealed to your Kai-Signature. For contracts, add parties and jurisdiction so this becomes a usable, timestamped record.`}),(0,K.jsxs)(`div`,{className:`kv-post-kind-row flex flex-wrap items-center gap-3 mt-1`,children:[(0,K.jsx)(`label`,{className:`kv-post-kind-label`,htmlFor:`kv-post-kind`,children:`Intent`}),(0,K.jsxs)(`select`,{id:`kv-post-kind`,className:`kv-post-kind-select`,value:g,onChange:e=>_(e.target.value),children:[(0,K.jsx)(`option`,{value:`general`,children:`General post / media`}),(0,K.jsx)(`option`,{value:`legal-contract`,children:`Legal contract / agreement`}),(0,K.jsx)(`option`,{value:`evidence`,children:`Evidence / proof bundle`}),(0,K.jsx)(`option`,{value:`announcement`,children:`Public announcement / notice`}),(0,K.jsx)(`option`,{value:`private-note`,children:`Private note / internal record`})]})]})]}),j&&(0,K.jsx)(`div`,{className:`kv-post-error w-full max-w-xl`,role:`alert`,children:j}),(0,K.jsx)(`div`,{className:`w-full max-w-xl`,children:(0,K.jsx)(`div`,{className:[`kv-post-dropzone`,N?`kv-post-dropzone--dragging`:``,I?`kv-post-dropzone--has-media`:``].join(` `).trim(),tabIndex:0,role:`button`,"aria-label":`Choose or drop files to attach`,onClick:U,onKeyDown:me,onDragOver:H,onDragEnter:fe,onDragLeave:pe,onDrop:de,children:(0,K.jsxs)(`div`,{className:`kv-post-dropzone-inner`,children:[(0,K.jsx)(`div`,{className:`kv-post-dropzone-icon`,children:I?`🔄`:N?`🌀`:`📁`}),(0,K.jsxs)(`div`,{className:`kv-post-dropzone-text`,children:[(0,K.jsx)(`div`,{className:`kv-post-dropzone-title`,children:I?`Add or replace attached files`:`Tap or drop files to start`}),(0,K.jsx)(`div`,{className:`kv-post-dropzone-hint`,children:`Images, videos, PDFs, DOCX, ZIPs, audio, and more • Drag & drop or tap to choose`}),(0,K.jsxs)(`div`,{className:`kv-post-dropzone-meta`,children:[`Max `,At,` files • `,jt(kt),` per file`]})]})]})})}),I&&(0,K.jsxs)(`div`,{className:`kv-post-body w-full max-w-xl mt-2`,children:[c&&(0,K.jsxs)(`div`,{className:`kv-post-preview`,children:[u===`image`&&(0,K.jsx)(`img`,{src:c,alt:`Primary attachment preview`,className:`kv-post-preview-media`}),u===`video`&&(0,K.jsx)(`video`,{src:c,controls:!0,className:`kv-post-preview-media`})]}),(0,K.jsxs)(`div`,{className:`kv-post-attachments`,children:[(0,K.jsxs)(`div`,{className:`kv-post-attachments-header flex justify-between items-center`,children:[(0,K.jsx)(`div`,{className:`kv-post-attachments-title`,children:`Attachments`}),_e&&(0,K.jsx)(`div`,{className:`kv-post-attachments-summary`,children:_e})]}),(0,K.jsx)(`ul`,{className:`kv-post-attachments-list`,children:i.map(e=>{let t=e.id===o;return(0,K.jsxs)(`li`,{className:[`kv-post-attachment-item`,t?`kv-post-attachment-item--primary`:``].join(` `).trim(),children:[(0,K.jsxs)(`div`,{className:`kv-post-attachment-main`,children:[(0,K.jsx)(`div`,{className:`kv-post-attachment-name`,children:e.file.name}),(0,K.jsxs)(`div`,{className:`kv-post-attachment-meta`,children:[(0,K.jsxs)(`span`,{children:[Nt[e.kind],` • `,jt(e.file.size)]}),t&&(0,K.jsx)(`span`,{className:`kv-post-attachment-pill`,children:`Primary`})]})]}),(0,K.jsxs)(`div`,{className:`kv-post-attachment-actions`,children:[!t&&(0,K.jsx)(`button`,{type:`button`,className:`kv-post-attachment-btn`,onClick:()=>he(e.id),children:`Set as primary`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-post-attachment-btn kv-post-attachment-btn--danger`,onClick:()=>W(e.id),children:`Remove`})]})]},e.id)})})]}),(0,K.jsxs)(`div`,{className:`kv-post-caption-block mt-4`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-post-caption`,className:`kv-post-caption-label`,children:`Caption / description (optional)`}),(0,K.jsx)(`textarea`,{id:`kv-post-caption`,placeholder:L?`Summarize what this agreement covers, key obligations, or why you are sealing it now…`:`Describe the moment, the pulse, or what this bundle of files represents…`,className:`kv-post-caption-textarea`,rows:3,maxLength:ie,value:f,onChange:e=>p(e.target.value)}),(0,K.jsx)(`div`,{className:`kv-post-caption-footer`,children:(0,K.jsxs)(`span`,{className:`kv-post-caption-count`,children:[f.length,`/`,ie]})})]}),(0,K.jsxs)(`div`,{className:`kv-post-link-block mt-4`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-post-link`,className:`kv-post-link-label`,children:`Canonical URL (optional)`}),(0,K.jsx)(`input`,{id:`kv-post-link`,type:`url`,inputMode:`url`,placeholder:`https://… (DMS link, IPFS URL, external system reference)`,className:`kv-post-link-input`,value:m,onChange:e=>h(e.target.value)}),(0,K.jsx)(`p`,{className:`kv-post-link-hint`,children:`This can point to the master copy of the contract, folder, or evidence bundle. It will be sealed alongside the files.`})]}),g===`legal-contract`&&(0,K.jsxs)(`div`,{className:`kv-post-legal-block mt-6`,children:[(0,K.jsx)(`div`,{className:`kv-post-legal-header`,children:`Legal details for this agreement`}),(0,K.jsxs)(`div`,{className:`kv-post-legal-grid`,children:[(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsxs)(`label`,{htmlFor:`kv-legal-title`,className:`kv-post-legal-label`,children:[`Agreement title `,(0,K.jsx)(`span`,{className:`kv-post-legal-required`,children:`*`})]}),(0,K.jsx)(`input`,{id:`kv-legal-title`,type:`text`,className:`kv-post-legal-input`,placeholder:`e.g. Master Services Agreement, NDA, Licensing Deal…`,value:v,onChange:e=>y(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsxs)(`label`,{htmlFor:`kv-legal-counterparty`,className:`kv-post-legal-label`,children:[`Counterparty name `,(0,K.jsx)(`span`,{className:`kv-post-legal-required`,children:`*`})]}),(0,K.jsx)(`input`,{id:`kv-legal-counterparty`,type:`text`,className:`kv-post-legal-input`,placeholder:`Person or organization`,value:b,onChange:e=>x(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-email`,className:`kv-post-legal-label`,children:`Counterparty contact (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-email`,type:`email`,className:`kv-post-legal-input`,placeholder:`Email or contact handle`,value:S,onChange:e=>C(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-jurisdiction`,className:`kv-post-legal-label`,children:`Jurisdiction (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-jurisdiction`,type:`text`,className:`kv-post-legal-input`,placeholder:`e.g. Ontario, Canada • Delaware, USA • EU-wide…`,value:w,onChange:e=>T(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-effective`,className:`kv-post-legal-label`,children:`Effective date (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-effective`,type:`date`,className:`kv-post-legal-input`,value:E,onChange:e=>D(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-ref`,className:`kv-post-legal-label`,children:`Reference code (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-ref`,type:`text`,className:`kv-post-legal-input`,placeholder:`Internal ID, contract number, matter code…`,value:O,onChange:e=>k(e.target.value)})]})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-flags mt-3`,children:[(0,K.jsxs)(`label`,{className:`kv-post-legal-flag`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:ee,onChange:e=>A(e.target.checked)}),(0,K.jsx)(`span`,{children:`This agreement is confidential`})]}),(0,K.jsxs)(`label`,{className:`kv-post-legal-flag`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:te,onChange:e=>ne(e.target.checked)}),(0,K.jsx)(`span`,{children:`This bundle includes personal data (names, addresses, IDs, etc.)`})]})]}),(0,K.jsx)(`p`,{className:`kv-post-legal-hint mt-2`,children:`These details are sealed as metadata with the files and time pulse, creating a clear, timestamped record of what was agreed and with whom. This does not replace legal advice—use it as a hardened, auditable trail around your contracts.`})]})]}),(0,K.jsx)(`div`,{className:`kv-post-actions w-full max-w-xl mt-4 flex justify-end`,children:(0,K.jsx)(`button`,{type:`button`,className:`kv-post-submit-btn`,onClick:ge,disabled:!I||F,children:F?`Sealing…`:`Seal with Breath`})}),(0,K.jsx)(`input`,{id:`kv-post-file-input`,type:`file`,multiple:!0,accept:`*/*`,ref:t,onChange:ue,className:`kv-post-file-input`})]})}var Rt=y(((e,t)=>{var n=`Input must be an string, Buffer or Uint8Array`;function r(e){let t;if(e instanceof Uint8Array)t=e;else if(typeof e==`string`)t=new TextEncoder().encode(e);else throw Error(n);return t}function i(e){return Array.prototype.map.call(e,function(e){return(e<16?`0`:``)+e.toString(16)}).join(``)}function a(e){return(4294967296+e).toString(16).substring(1)}function o(e,t,n){let r=` -`+e+` = `;for(let i=0;i{var n=Rt();function r(e,t,n){let r=e[t]+e[n],i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function i(e,t,n,r){let i=e[t]+n;n<0&&(i+=4294967296);let a=e[t+1]+r;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,a,o,s){let c=u[o],d=u[o+1],f=u[s],p=u[s+1];r(l,e,t),i(l,e,c,d);let m=l[a]^l[e],h=l[a+1]^l[e+1];l[a]=h,l[a+1]=m,r(l,n,a),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=m>>>24^h<<8,l[t+1]=h>>>24^m<<8,r(l,e,t),i(l,e,f,p),m=l[a]^l[e],h=l[a+1]^l[e+1],l[a]=m>>>16^h<<16,l[a+1]=h>>>16^m<<16,r(l,n,a),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=h>>>31^m<<1,l[t+1]=m>>>31^h<<1}var s=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return e*2})),l=new Uint32Array(32),u=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=s[n];for(l[24]^=e.t,l[25]^=e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)u[n]=a(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,c[n*16+0],c[n*16+1]),o(2,10,18,26,c[n*16+2],c[n*16+3]),o(4,12,20,28,c[n*16+4],c[n*16+5]),o(6,14,22,30,c[n*16+6],c[n*16+7]),o(0,10,20,30,c[n*16+8],c[n*16+9]),o(2,12,22,24,c[n*16+10],c[n*16+11]),o(4,14,16,26,c[n*16+12],c[n*16+13]),o(6,8,18,28,c[n*16+14],c[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(e,t,n,r){if(e===0||e>64)throw Error(`Illegal output length, expected 0 < length <= 64`);if(t&&t.length>64)throw Error(`Illegal key, expected Uint8Array with 0 < length <= 64`);if(n&&n.length!==16)throw Error(`Illegal salt, expected Uint8Array with length is 16`);if(r&&r.length!==16)throw Error(`Illegal personal, expected Uint8Array with length is 16`);let i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};f.fill(0),f[0]=e,t&&(f[1]=t.length),f[2]=1,f[3]=1,n&&f.set(n,32),r&&f.set(r,48);for(let e=0;e<16;e++)i.h[e]=s[e]^a(f,e*4);return t&&(m(i,t),i.c=128),i}function m(e,t){for(let n=0;n>2]>>8*(n&3);return t}function g(e,t,r,i,a){r||=64,e=n.normalizeInput(e),i&&=n.normalizeInput(i),a&&=n.normalizeInput(a);let o=p(r,t,i,a);return m(o,e),h(o)}function _(e,t,r,i,a){let o=g(e,t,r,i,a);return n.toHex(o)}t.exports={blake2b:g,blake2bHex:_,blake2bInit:p,blake2bUpdate:m,blake2bFinal:h}})),Bt=y(((e,t)=>{var n=Rt();function r(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function i(e,t,n,r,i,o){c[e]=c[e]+c[t]+i,c[r]=a(c[r]^c[e],16),c[n]=c[n]+c[r],c[t]=a(c[t]^c[n],12),c[e]=c[e]+c[t]+o,c[r]=a(c[r]^c[e],8),c[n]=c[n]+c[r],c[t]=a(c[t]^c[n],7)}function a(e,t){return e>>>t^e<<32-t}var o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),s=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),c=new Uint32Array(16),l=new Uint32Array(16);function u(e,t){let n=0;for(n=0;n<8;n++)c[n]=e.h[n],c[n+8]=o[n];for(c[12]^=e.t,c[13]^=e.t/4294967296,t&&(c[14]=~c[14]),n=0;n<16;n++)l[n]=r(e.b,4*n);for(n=0;n<10;n++)i(0,4,8,12,l[s[n*16+0]],l[s[n*16+1]]),i(1,5,9,13,l[s[n*16+2]],l[s[n*16+3]]),i(2,6,10,14,l[s[n*16+4]],l[s[n*16+5]]),i(3,7,11,15,l[s[n*16+6]],l[s[n*16+7]]),i(0,5,10,15,l[s[n*16+8]],l[s[n*16+9]]),i(1,6,11,12,l[s[n*16+10]],l[s[n*16+11]]),i(2,7,8,13,l[s[n*16+12]],l[s[n*16+13]]),i(3,4,9,14,l[s[n*16+14]],l[s[n*16+15]]);for(n=0;n<8;n++)e.h[n]^=c[n]^c[n+8]}function d(e,t){if(!(e>0&&e<=32))throw Error(`Incorrect output length, should be in [1, 32]`);let n=t?t.length:0;if(t&&!(n>0&&n<=32))throw Error(`Incorrect key length, should be in [1, 32]`);let r={h:new Uint32Array(o),b:new Uint8Array(64),c:0,t:0,outlen:e};return r.h[0]^=16842752^n<<8^e,n>0&&(f(r,t),r.c=64),r}function f(e,t){for(let n=0;n>2]>>8*(n&3)&255;return t}function m(e,t,r){r||=32,e=n.normalizeInput(e);let i=d(r,t);return f(i,e),p(i)}function h(e,t,r){let i=m(e,t,r);return n.toHex(i)}t.exports={blake2s:m,blake2sHex:h,blake2sInit:d,blake2sUpdate:f,blake2sFinal:p}})),Vt=L(y(((e,t)=>{var n=zt(),r=Bt();t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal}}))(),1),Ht=5236,Ut=50;function Wt(e){return e===`root`||e===`sacral`||e===`solar`||e===`heart`||e===`throat`||e===`thirdEye`||e===`crown`||e===`krown`}function Gt({post:e,identityKaiSignature:t,userPhiKey:n,onSealComplete:r}){let[i,o]=(0,G.useState)(`idle`),[s,c]=(0,G.useState)(0),[l,u]=(0,G.useState)(null),d=(0,G.useRef)(null),p=(0,G.useRef)(!1),m=(0,G.useRef)(0),h=(0,G.useRef)(!0),g=(0,G.useMemo)(()=>Ht*2,[]);(0,G.useEffect)(()=>(h.current=!0,()=>{h.current=!1,d.current!=null&&window.clearInterval(d.current)}),[]);let _=()=>{d.current!=null&&(window.clearInterval(d.current),d.current=null)},v=()=>{if(!p.current){if(!t.trim()){u(`Missing identityKaiSignature (session signature). Please re-login.`),o(`idle`),c(0);return}_(),u(null),o(`inhale`),c(0),p.current=!1,m.current=0,d.current=window.setInterval(()=>{m.current+=Ut;let e=m.current;if(e{if(!p.current){p.current=!0;try{let i=t.trim();if(!i)throw Error(`Missing identityKaiSignature (session signature).`);let s=await f(void 0,new a({ignoreOverride:!0})),c=Number(s.pulse??0),l=Wt(s.chakraDay)?s.chakraDay:null,u=e.file?.name??`unknown`,d=Vt.default.blake2bHex(`${u}-${c}`,void 0,16);if(r({pulse:c,kaiSignature:i,chakraDay:l,post:e,userPhiKey:n??null,kksNonce:d}),!h.current)return;o(`sealed`)}catch(e){p.current=!1;let t=e instanceof Error?e.message:`Failed to seal with live Kai pulse. Please try again.`;if(!h.current)return;u(t),o(`idle`),c(0)}}},b=(()=>{if(l)return`Error`;switch(i){case`idle`:return`Ready to Breathe`;case`inhale`:return`Inhale`;case`exhale`:return`Exhale`;case`sealed`:return`Sealed in Kairos`;default:return`Breath`}})(),x=Math.round(Math.min(s,.5)*200),S=Math.round(Math.max(s-.5,0)*200),C=(()=>{if(l)return l;switch(i){case`idle`:return`Tap begin, inhale as the orb expands, exhale as it returns to stillness. We’ll seal at the end of your exhale.`;case`inhale`:return`Inhale slowly… ${x}%`;case`exhale`:return`Exhale and let go… ${50+S}% — sealing this breath into KaiOS.`;case`sealed`:return`Sealed on a live Kai pulse. Advancing to embed…`;default:return``}})(),w=(()=>{if(l)return`⚠️`;switch(i){case`idle`:return`🌬`;case`inhale`:return`🫁`;case`exhale`:return`🌀`;case`sealed`:return`✨`;default:return`🌬`}})(),T=e.file?.name&&e.file.name.length>40?`${e.file.name.slice(0,22)}…${e.file.name.slice(-12)}`:e.file?.name??`Unnamed glyph`;return(0,K.jsxs)(`div`,{className:`kv-breath-root`,"data-phase":i,"aria-live":`polite`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-meta`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-meta-left`,children:[(0,K.jsx)(`span`,{className:`kv-breath-pill`,children:`Breath Seal • φ 5.236s`}),(0,K.jsx)(`span`,{className:`kv-breath-file`,title:e.file?.name,children:T})]}),(0,K.jsx)(`div`,{className:`kv-breath-meta-right`,children:(0,K.jsx)(`span`,{className:`kv-breath-tag`,children:`Live Kai Pulse`})})]}),(0,K.jsxs)(`div`,{className:`kv-breath-orb-row`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-orb`,"aria-label":`Breath phase: ${b}`,children:[(0,K.jsx)(`div`,{className:`kv-breath-orb-inner`,children:(0,K.jsx)(`span`,{className:`kv-breath-orb-emoji`,children:w})}),(0,K.jsx)(`div`,{className:`kv-breath-orb-ring`,style:{"--kv-breath-progress":s}})]}),(0,K.jsxs)(`div`,{className:`kv-breath-status`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-status-row`,children:[(0,K.jsx)(`span`,{className:`kv-breath-status-label`,children:b}),(0,K.jsxs)(`span`,{className:`kv-breath-status-percent`,children:[Math.round(s*100),`%`]})]}),(0,K.jsx)(`p`,{className:`kv-breath-status-text`,children:C}),(0,K.jsxs)(`div`,{className:`kv-breath-bars`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-bar`,children:[(0,K.jsx)(`span`,{className:`kv-breath-bar-label`,children:`Inhale`}),(0,K.jsx)(`div`,{className:`kv-breath-bar-track`,"aria-hidden":`true`,children:(0,K.jsx)(`div`,{className:`kv-breath-bar-fill kv-breath-bar-fill--inhale`,style:{width:`${x}%`}})})]}),(0,K.jsxs)(`div`,{className:`kv-breath-bar`,children:[(0,K.jsx)(`span`,{className:`kv-breath-bar-label`,children:`Exhale`}),(0,K.jsx)(`div`,{className:`kv-breath-bar-track`,"aria-hidden":`true`,children:(0,K.jsx)(`div`,{className:`kv-breath-bar-fill kv-breath-bar-fill--exhale`,style:{width:`${S}%`}})})]})]})]})]}),(0,K.jsxs)(`div`,{className:`kv-breath-actions`,children:[i===`idle`&&!p.current&&!l&&(0,K.jsx)(`button`,{type:`button`,onClick:v,className:`kv-breath-btn kv-breath-btn-primary`,children:`Begin Breath`}),l&&i===`idle`&&(0,K.jsx)(`button`,{type:`button`,onClick:v,className:`kv-breath-btn kv-breath-btn-warning`,children:`Retry Breath Seal`}),i!==`idle`&&i!==`sealed`&&!l&&(0,K.jsx)(`button`,{type:`button`,className:`kv-breath-btn kv-breath-btn-ghost`,disabled:!0,children:`Sealing on this exhale…`}),i===`sealed`&&(0,K.jsx)(`div`,{className:`kv-breath-sealed-note`,children:`Sealed. The stream will remember this breath forever.`})]})]})}function Kt(e){let t=e.trim();return(t.startsWith(`0x`)||t.startsWith(`0X`))&&(t=t.slice(2)),/^[0-9a-fA-F]+$/.test(t)&&(t=t.toLowerCase()),t}var qt=`http://www.w3.org/2000/svg`;async function Jt(e){let t=typeof e==`string`?e:JSON.stringify(e),n=new TextEncoder().encode(t),r=await crypto.subtle.digest(`SHA-256`,n),i=new Uint8Array(r),a=``;for(let e=0;e0?s=o.item(0):(s=t.createElementNS(qt,`metadata`),a.appendChild(s)),s.textContent=JSON.stringify(i,null,2);let c=new XMLSerializer().serializeToString(t);return{type:`image`,content:new Blob([c],{type:`image/svg+xml`}),filename:`sigil-${r}.svg`,metadata:i}}return n.mediaType===`image`?{type:`image`,content:n.file,filename:n.file.name,metadata:i}:{type:`video`,content:n.file,filename:n.file.name,metadata:i}}function Qt(e){let{baseCaption:t,phiKey:n,kaiSignature:r,pulse:i,chakraDay:a,verifierUrl:o}=e,s=[];return t&&t.trim().length>0&&s.push(t.trim(),``),s.push(`—`),s.push(`Kai-Sigil Proof of Origin`),n&&s.push(`Φ-Key: ${n}`),r&&s.push(`Kai Signature: ${r}`),typeof i==`number`&&s.push(`Pulse: ${i}`),a&&s.push(`Chakra Day: ${a}`),o&&(s.push(``),s.push(`Verify this post: ${o}`)),s.join(` -`)}function $t(e){let{phiKey:t,kaiSignature:n,pulse:r,chakraDay:i,verifierUrl:a}=e,o={phiKey:t??null,kaiSignature:n??null,pulse:typeof r==`number`?r:null,chakraDay:i??null,verifierUrl:a??null};return JSON.stringify(o,null,2)}async function en(e){if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`){await navigator.clipboard.writeText(e);return}let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,`true`),t.style.position=`absolute`,t.style.left=`-9999px`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)}function tn(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}function nn(e,t,n){let r=encodeURIComponent(t),i=n?encodeURIComponent(n):``;switch(e){case`x`:return`https://twitter.com/intent/tweet?text=${r}`;case`linkedin`:return i?`https://www.linkedin.com/sharing/share-offsite/?url=${i}`:`https://www.linkedin.com/feed/?shareActive=true&text=${r}`;case`facebook`:return i?`https://www.facebook.com/sharer/sharer.php?u=${i}`:`https://www.facebook.com/dialog/share?display=popup"e=${r}`;default:return null}}function rn({media:e,suggestedCaption:t,verifierUrl:n,onShared:r,onError:i}){let[a,o]=(0,G.useState)(null),{kaiSignature:s,phiKey:c,pulse:l,chakraDay:u,verifierUrl:d}=e?.metadata??{},f=n??d??void 0,p=(0,G.useMemo)(()=>Qt({baseCaption:t,kaiSignature:s,phiKey:c,pulse:l,chakraDay:u,verifierUrl:f}),[t,s,c,l,u,f]),m=(0,G.useMemo)(()=>$t({phiKey:c,kaiSignature:s,pulse:l,chakraDay:u,verifierUrl:f}),[c,s,l,u,f]),h=typeof navigator<`u`&&typeof navigator.share==`function`,g=(e,t)=>{let n=t instanceof Error?t:Error(String(t??`Unknown error`));i&&i(e,n),o(n.message)},_=e=>{r&&r(e)},v=async t=>{if(!e){o(`No sealed media detected for this pulse yet. Complete Seal & Embed first.`);return}try{if(o(null),t===`copy-caption`){await en(p),o(`Caption copied to clipboard. Paste into your post.`),_(t);return}if(t===`copy-proof`){await en(m),o(`Proof JSON copied. Save it with your post or dev tools.`),_(t);return}if(t===`download`){tn(e.content,e.filename),o(`Sealed glyph downloaded.`),_(t);return}if(t===`system-share`){if(!h){await en(p),o(`System share unavailable; caption copied. Open your app and paste.`),_(t);return}let n=navigator,r={text:p};if(typeof n.canShare==`function`)try{let i=e.type===`image`?`image/svg+xml`:e.type===`video`?`video/mp4`:`text/plain`,a=new File([e.content],e.filename,{type:i}),s={...r,files:[a]};if(n.canShare(s)){await navigator.share(s),o(`Shared via system sheet with media.`),_(t);return}}catch{}await navigator.share(r),o(`Shared via system sheet.`),_(t);return}if(t===`x`||t===`linkedin`||t===`facebook`){let e=nn(t,p,f);if(!e){await en(p),o(`Unable to open share URL; caption copied instead. Paste into your post.`),_(t);return}window.open(e,`_blank`,`noopener,noreferrer`),await en(p),o(`Opened share composer and copied caption. Paste if not auto-filled.`),_(t);return}if(t===`instagram`||t===`tiktok`){tn(e.content,e.filename),await en(p);let n=t===`instagram`?`https://www.instagram.com/`:`https://www.tiktok.com/upload`;window.open(n,`_blank`,`noopener,noreferrer`),o(`Downloaded glyph and copied caption. Opened ${t} — create a new memory, pick the image, and paste the caption.`),_(t);return}await en(p),o(`Caption copied. Paste into your social app.`),_(t)}catch(e){g(t,e)}};return e?(0,K.jsxs)(`section`,{className:`kv-social-connector`,children:[(0,K.jsxs)(`header`,{className:`kv-social-header`,children:[(0,K.jsx)(`h2`,{className:`kv-social-title`,children:`Share Your Kai-Sigil Post`}),(0,K.jsx)(`p`,{className:`kv-social-subtitle`,children:`Every share includes a verifiable Kai-Sigil proof so anyone can confirm this post was sealed by your Φ-Key.`})]}),(0,K.jsxs)(`div`,{className:`kv-social-proof`,children:[(0,K.jsxs)(`div`,{className:`kv-social-proof-block`,children:[(0,K.jsx)(`div`,{className:`kv-proof-label`,children:`Preview caption`}),(0,K.jsx)(`pre`,{className:`kv-proof-caption`,"aria-label":`Proof caption preview`,children:p})]}),(0,K.jsxs)(`div`,{className:`kv-social-proof-meta`,children:[(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Φ-Key`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:c??`— (not provided)`})]}),(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Kai Signature`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:s??`— (not provided)`})]}),(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Pulse`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:typeof l==`number`?l:`—`})]}),(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Verifier URL`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:f??`—`})]})]})]}),(0,K.jsxs)(`div`,{className:`kv-social-actions`,children:[(0,K.jsxs)(`div`,{className:`kv-social-row kv-social-row--primary`,children:[(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-primary`,onClick:()=>void v(`system-share`),children:`System Share (Best on Mobile)`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-ghost`,onClick:()=>void v(`download`),children:`Download Glyph`})]}),(0,K.jsxs)(`div`,{className:`kv-social-row kv-social-row--grid`,children:[(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`x`),children:`Post to X (Twitter)`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`instagram`),children:`Post to Instagram`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`tiktok`),children:`Post to TikTok`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`linkedin`),children:`Post to LinkedIn`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`facebook`),children:`Post to Facebook`})]}),(0,K.jsxs)(`div`,{className:`kv-social-row kv-social-row--secondary`,children:[(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-outline`,onClick:()=>void v(`copy-caption`),children:`Remember Caption with Proof`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-outline`,onClick:()=>void v(`copy-proof`),children:`Remember Proof JSON`})]})]}),a&&(0,K.jsx)(`p`,{className:`kv-social-status`,children:a})]}):(0,K.jsxs)(`section`,{className:`kv-social-connector`,children:[(0,K.jsxs)(`header`,{className:`kv-social-header`,children:[(0,K.jsx)(`h2`,{className:`kv-social-title`,children:`Connect & Share`}),(0,K.jsx)(`p`,{className:`kv-social-subtitle`,children:`Seal a post or glyph first. Once Kai-Sigil has embedded your proof into the media, this panel will unlock full social sharing with verifiable origin.`})]}),(0,K.jsxs)(`p`,{className:`kv-social-status`,children:[`No sealed media detected for this pulse yet. Complete the`,` `,(0,K.jsx)(`strong`,{children:`Seal & Embed`}),` step, then tap`,` `,(0,K.jsx)(`strong`,{children:`Connect Accounts`}),` again.`]}),a&&(0,K.jsx)(`p`,{className:`kv-social-status`,children:a})]})}function an(e){return e===`x`||e===`ig`||e===`tiktok`||e===`threads`}function on(e){return typeof e==`string`&&e.trim().length>0&&(e.startsWith(`http://`)||e.startsWith(`https://`))}function sn(e,t){let n=e[t];return typeof n==`string`&&n.trim().length>0?n.trim():void 0}function cn(e,t){let n=e[t];if(typeof n==`number`&&Number.isFinite(n))return n;if(typeof n==`string`){let e=Number(n);if(Number.isFinite(e))return e}}function ln(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function un(e,t){let n={},r=e??{},i=typeof t?.pulse==`number`&&Number.isFinite(t.pulse)?t.pulse:cn(r,`pulse`);typeof i==`number`&&(n.pulse=i);let a=typeof t?.kaiSignature==`string`&&t.kaiSignature.trim().length>0?t.kaiSignature.trim():sn(r,`kaiSignature`);typeof a==`string`&&(n.kaiSignature=a);let o=typeof t?.phiKey==`string`&&t.phiKey.trim().length>0?t.phiKey.trim():sn(r,`phiKey`);typeof o==`string`&&(n.phiKey=o);let s=j(typeof t?.chakraDay==`string`&&t.chakraDay.trim().length>0?t.chakraDay:sn(r,`chakraDay`));typeof s==`string`&&(n.chakraDay=s);let c=r.verifierUrl,l=t?.verifierUrl,u;on(l)?u=l.trim():on(c)&&(u=c.trim());let d=typeof i==`number`?i:0,f=typeof a==`string`&&a.length>0?a:`unknown-signature`;u||=A(d,f),n.verifierUrl=u;for(let e of[`beat`,`stepIndex`,`step`,`kaiTime`,`kksVersion`,`userPhiKey`,`timestamp`]){let t=r[e];(typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===null)&&(n[e]=t)}return n}function dn(e,t,n){let r=e.pulse,i=typeof r==`number`?r:`∞`,a=(typeof e.kaiSignature==`string`?e.kaiSignature:``).slice(0,10),o=typeof e.phiKey==`string`&&e.phiKey.length>0?e.phiKey:`φK`,s=typeof e.verifierUrl==`string`&&e.verifierUrl.length>0?e.verifierUrl:A(0,`unknown-signature`),c=[`#KaiKlok`,`#SigilProof`,`#PostedByBreath`],l={x:c,ig:[...c,`#HarmonicTime`],tiktok:[...c,`#KaiTime`,`#ForYou`],threads:[...c,`#Threads`]},u=n?` by @${n}`:``;return t===`x`?ln([`🌀 Pulse ${i}${u}`,`Sig:${a}`,`ID:${o}`,`Verify:${s}`,...l.x].join(` • `),270):t===`ig`?[`🌀 Pulse ${i}${u}`,`Sig: ${a}`,`ID: ${o}`,`Verify: ${s}`,``,l.ig.join(` `)].join(` -`):t===`tiktok`?[`Verify: ${s}`,`🌀 Pulse ${i}${u}`,`Sig: ${a} • ID: ${o}`,l.tiktok.join(` `)].join(` -`):[`🌀 Pulse ${i}${u}`,`Sig: ${a} • ID: ${o}`,`Verify: ${s}`,l.threads.join(` `)].join(` -`)}function fn({media:e,proof:t,onComplete:n}){let{session:r}=q(),i=(0,G.useMemo)(()=>{let e=[],t=r?.connectedAccounts;if(!t)return e;for(let[n,r]of Object.entries(t)){if(!r||!an(n))continue;let t=n===`x`?`X / Twitter`:n===`ig`?`Instagram`:n===`tiktok`?`TikTok`:`Threads`;e.push({platform:n,label:t,handle:r})}return e},[r?.connectedAccounts]),a=(0,G.useMemo)(()=>new Set(i.map(e=>e.platform)),[i]),[o,s]=(0,G.useState)({}),c=(0,G.useMemo)(()=>{let e=e=>{if(!a.has(e))return!1;let t=o[e];return typeof t==`boolean`?t:!0};return{x:e(`x`),ig:e(`ig`),tiktok:e(`tiktok`),threads:e(`threads`)}},[a,o]),l=e=>{s(t=>{let n=!(a.has(e)&&(typeof t[e]!=`boolean`||t[e]));return{...t,[e]:n}})},[u,d]=(0,G.useState)(`idle`),[f,p]=(0,G.useState)([]),[m,h]=(0,G.useState)(!1),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(null),b=(0,G.useMemo)(()=>un(e.metadata,t),[e.metadata,t]),x=(0,G.useMemo)(()=>{let t=e.type===`video`?`video`:`image`;return{content:e.content,filename:e.filename,type:t,metadata:b}},[e.content,e.filename,e.type,b]);async function S(t,n){let r=new FormData;r.append(`file`,e.content,e.filename);let i=dn(b,t,n);r.append(`caption`,i),n&&r.append(`handle`,n);let a=await fetch(`/api/post/${t}`,{method:`POST`,body:r});if(!a.ok)throw Error(`POST /api/post/${t} failed: ${a.status}`);return{link:(await a.json()).url??`#`}}let C=async()=>{if(!r)return;let e=i.filter(e=>c[e.platform]);e.length!==0&&(d(`posting`),p([]),p(await Promise.all(e.map(async e=>{try{let t=await S(e.platform,e.handle);return{platform:e.platform,link:t.link}}catch(t){return console.warn(`Post to ${e.platform} failed:`,t),{platform:e.platform,link:`❌ Failed`}}}))),d(`done`))},w=i.length===0||!i.some(e=>c[e.platform]),T=u===`done`||m;return(0,K.jsxs)(`div`,{className:`kv-share-shell flex flex-col gap-6 w-full max-w-2xl`,children:[(0,K.jsxs)(`header`,{className:`kv-share-header`,children:[(0,K.jsx)(`h2`,{className:`kv-share-title`,children:`Broadcast to connected socials`}),(0,K.jsx)(`p`,{className:`kv-share-subtitle`,children:`Post directly to linked accounts, then (or instead) use the manual share hub below to reach any platform — every share carries your Kai-Sigil proof.`})]}),(0,K.jsx)(`section`,{className:`kv-share-broadcast`,children:i.length===0?(0,K.jsx)(`p`,{className:`kv-share-empty`,children:`No platforms connected yet. You can still share manually below.`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`kv-share-connected-label`,children:`Connected accounts`}),(0,K.jsx)(`div`,{className:`grid grid-cols-2 gap-3 w-full`,children:i.map(e=>(0,K.jsxs)(`label`,{className:`flex items-center gap-2 p-3 rounded-lg border cursor-pointer transition ${c[e.platform]?`border-emerald-400 bg-emerald-400/10`:`border-white/20 bg-white/5`}`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`accent-emerald-400`,checked:c[e.platform],onChange:()=>l(e.platform)}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsxs)(`span`,{className:`text-sm font-medium`,children:[e.label,` `,e.handle?`· @${e.handle}`:``]}),(0,K.jsx)(`span`,{className:`text-xs opacity-60`,children:`Auto-post via KaiVoh`})]})]},e.platform))}),(0,K.jsx)(`div`,{className:`mt-3`,children:(0,K.jsx)(`button`,{type:`button`,disabled:w||u===`posting`,onClick:()=>void C(),className:`kv-btn kv-btn-primary ${w||u===`posting`?`kv-btn-disabled`:``}`,children:u===`posting`?`Posting with breath…`:w?`No platforms selected`:`Post to Selected`})}),u===`done`?(0,K.jsxs)(`div`,{className:`kv-share-results mt-3`,children:[(0,K.jsx)(`h3`,{className:`text-xs uppercase tracking-wide opacity-60 mb-2`,children:`Post results`}),(0,K.jsx)(`ul`,{className:`text-sm space-y-1`,children:f.map(e=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2 break-all`,children:[(0,K.jsx)(`span`,{className:`font-semibold min-w-[80px] capitalize`,children:e.platform}),(0,K.jsx)(`span`,{children:`:`}),e.link===`❌ Failed`?(0,K.jsx)(`span`,{className:`text-red-400`,children:e.link}):(0,K.jsx)(`a`,{href:e.link,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:e.link})]},e.platform))})]}):null]})}),(0,K.jsxs)(`section`,{className:`kv-share-manual`,children:[(0,K.jsx)(rn,{media:x,onShared:e=>{h(!0),_(e),y(null)},onError:(e,t)=>{y(t.message)}}),g?(0,K.jsxs)(`p`,{className:`kv-share-status text-xs opacity-70 mt-2`,children:[`Last shared via `,(0,K.jsx)(`span`,{className:`font-semibold`,children:g}),`.`]}):null,v?(0,K.jsx)(`p`,{className:`kv-share-error text-xs text-red-400 mt-1`,children:v}):null]}),(0,K.jsx)(`footer`,{className:`kv-share-footer mt-4 flex flex-col items-center gap-2`,children:(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-primary ${T?``:`kv-btn-disabled`}`,disabled:!T,onClick:()=>{n(f.map(e=>({platform:e.platform,link:e.link})))},children:T?`Continue to Verify`:`Share at least once to continue`})})]})}function pn(e){let t=e.phiKey;if(typeof t==`string`){let e=t.trim();if(e.length>0)return e}if(t&&typeof t==`object`){if(`id`in t&&typeof t.id==`string`){let e=t.id.trim();if(e.length>0)return e}if(`key`in t&&typeof t.key==`string`){let e=t.key.trim();if(e.length>0)return e}if(`address`in t&&typeof t.address==`string`){let e=t.address.trim();if(e.length>0)return e}if(`userPhiKey`in t&&typeof t.userPhiKey==`string`){let e=t.userPhiKey.trim();if(e.length>0)return e}}return typeof e.kaiSignature==`string`&&e.kaiSignature.length?`φK-${e.kaiSignature.slice(0,8)}`:`φK-unknown`}function mn(t){let n=t.pulse,r=t.postLedger&&t.postLedger.length>0?t.postLedger.reduce((e,t)=>t.pulse>e?t.pulse:e,t.postLedger[0].pulse):n,i=r,a=r,o=p(i),c=o.stepIndex,u=o.beat,d=w(t.chakraDay??o.chakraDay),f=c%44/44,m=Math.max(0,Math.min(1,f)),h=_[d],g=ie[d],{sides:v,hue:y}=h,b=i%7+1,S=u%5+2,C=m*2*Math.PI,T=z**2*Math.PI*(i%97)%(2*Math.PI),E=50+15*Math.sin(m*2*Math.PI),D=ne((y+360*.03*m)%360,100,E),k=O(v,T),ee=V(b,S,C),A=x*.009,te=x*.016,j=oe(d,c),M=pn(t),N=e(void 0,u,c,i),P=Array.from(M).reduce((e,t)=>(e*131+t.charCodeAt(0))%104729,0),F=x*.31,re=Array.from({length:12}).map((e,t)=>{let n=(t+P%100/100)/12,r=n*2*Math.PI,i=F*(1+P%7/100*Math.sin(2*Math.PI*n*z)),a=500+i*Math.cos(r),o=500+i*Math.sin(r),s=te*(.5+.5*Math.sin(2*Math.PI*n*z));return` `}).join(` -`),I=new Date().toISOString(),L={"@context":s,type:l,kksVersion:`KKS-1.0`,kind:`KaiVohSessionMemory`,logoutSigil:!0,pulse:i,beat:u,stepIndex:c,stepsPerBeat:44,chakraDay:d,chakraGate:g,frequencyHz:j,pulseMs:de,userPhiKey:M,sessionKaiSignature:t.kaiSignature,phiKey:M,originPulse:n,exhalePulse:a,sigilPulse:i,kaiPulse:a,connectedAccounts:t.connectedAccounts??{},postLedger:t.postLedger??[],summary:N,createdAt:I};return` - - ${`KaiVoh Memory • Φ-Key ${M} • p${n}→p${a}`} - ${N} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -${re} - - - - -${JSON.stringify(L,null,2)} - -`.trim()}function hn(e,t){let n=new Blob([t],{type:`image/svg+xml`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var gn=e=>{if(!e)return null;if(Array.isArray(e)){let t=e[0];return t==null?null:String(t)}if(typeof e==`string`){try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t[0];return e==null?null:String(e)}}catch{return e}return e}return null};function _n(e){return typeof e==`object`&&!!e}function vn(e){return _n(e)&&typeof e.pulse==`number`&&typeof e.platform==`string`&&typeof e.link==`string`}function yn(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)vn(n)&&t.push(n);return t}function bn(e){if(!_n(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function xn(e){if(!_n(e))return null;let t=e.kaiSignature,n=e.pulse;return typeof t!=`string`||typeof n!=`number`?null:{kaiSignature:t,pulse:n,chakraDay:typeof e.chakraDay==`string`?e.chakraDay:void 0,userPhiKey:typeof e.userPhiKey==`string`?e.userPhiKey:void 0,connectedAccounts:bn(e.connectedAccounts),postLedger:yn(e.postLedger)}}var Sn=/^[1-9A-HJ-NP-Za-km-z]+$/;function Cn(e){return Sn.test(e)&&e.length>=26&&e.length<=64}var wn=[`connect`,`compose`,`seal`,`embed`,`share`,`verify`],Tn={login:`Login`,connect:`KaiVoh`,compose:`Compose`,seal:`Seal Breath`,embed:`Embed Signature`,share:`Share`,verify:`Verify`};function En(e){return e?e.length<=10?e:`${e.slice(0,5)}…${e.slice(-4)}`:`—`}function Dn(e){let t=e||`Crown`;return`kv-chakra-${{Root:`root`,Sacral:`sacral`,"Solar Plexus":`solar`,Heart:`heart`,Throat:`throat`,"Third Eye":`brow`,Crown:`crown`}[t]??t.toLowerCase().replace(/\s+/g,`-`).replace(/[^a-z0-9-]/g,``)}`}function On(e){if(e==null||!Number.isFinite(e)||e<=0)return`0.0s`;let t=e/1e3;return t<1?`${t.toFixed(2)}s`:t<10?`${t.toFixed(1)}s`:`${t.toFixed(0)}s`}function kn(e){let t=e.lastIndexOf(`.`);if(t<=0||t>=e.length-1)return``;let n=e.slice(t);return n.length>12?``:n}var An=`http://www.w3.org/2000/svg`;async function jn(e,t){hn(e,await t.text())}async function Mn(e,t){try{let n=await e.text(),r=new DOMParser().parseFromString(n,`image/svg+xml`);if(r.querySelector(`parsererror`))return e;let i=r.documentElement;if(!i||i.namespaceURI!==An||i.tagName.toLowerCase()!==`svg`)return e;let a=r.getElementsByTagName(`metadata`),o=a.length>0?a.item(0):r.createElementNS(An,`metadata`);a.length===0&&i.appendChild(o),o.textContent=JSON.stringify(t,null,2);let s=new XMLSerializer().serializeToString(r);return new Blob([s],{type:`image/svg+xml`})}catch{return e}}async function Nn(e,t){try{let n=ue(await e.text(),t);return new Blob([n],{type:`image/svg+xml`})}catch{return e}}function Pn({current:e}){let t=wn.indexOf(e);return(0,K.jsx)(`div`,{className:`kv-steps`,children:wn.map((n,r)=>(0,K.jsxs)(`div`,{className:`kv-step`,children:[(0,K.jsxs)(`div`,{className:[`kv-step-chip`,t>=0&&r{if(!e)return;let t=!1,r=async()=>{let e=new Date,r=await o(void 0,e);if(t)return;let a=r.pulse,s=u(a+1),c=Number(s-BigInt(e.getTime()));(!Number.isFinite(c)||c<0)&&(c=0),n(a),i(c)};r();let a=window.setInterval(()=>void r(),250);return()=>{t=!0,window.clearInterval(a)}},[e]),{livePulse:t,msToNextPulse:r}}function In({session:e,step:t,hasConnectedAccounts:n,onLogout:r,onNewPost:i}){let{livePulse:a,msToNextPulse:o}=Fn(!!e),s=e.postLedger?.length??0,c=a??e.pulse,l=On(o);return(0,K.jsxs)(`header`,{className:[`kv-session-hud`,Dn(e.chakraDay)].join(` `),children:[(0,K.jsxs)(`div`,{className:`kv-session-main`,children:[(0,K.jsxs)(`div`,{className:`kv-session-header-row`,children:[(0,K.jsxs)(`div`,{className:`kv-session-title-block`,children:[(0,K.jsx)(`div`,{className:`kv-session-kicker`,children:`KaiVoh · Glyph Session`}),(0,K.jsxs)(`div`,{className:`kv-session-keyline`,children:[(0,K.jsxs)(`span`,{className:`kv-meta-item kv-meta-phikey`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Φ-Key`}),(0,K.jsx)(`span`,{className:`kv-meta-value`,children:En(e.phiKey)})]}),(0,K.jsx)(`span`,{className:`kv-meta-divider`}),(0,K.jsxs)(`span`,{className:`kv-meta-item`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Sigil Pulse`}),(0,K.jsx)(`span`,{className:`kv-meta-value`,children:e.pulse})]}),(0,K.jsx)(`span`,{className:`kv-meta-divider`}),(0,K.jsxs)(`span`,{className:`kv-meta-item`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Chakra`}),(0,K.jsx)(`span`,{className:`kv-meta-value`,children:e.chakraDay??`Crown`})]}),s>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`kv-meta-divider`}),(0,K.jsxs)(`span`,{className:`kv-meta-item kv-meta-activity`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Sealed`}),(0,K.jsxs)(`span`,{className:`kv-meta-value`,children:[s,` `,s===1?`post`:`posts`]})]})]}):null]}),(0,K.jsxs)(`div`,{className:`kv-session-live`,children:[(0,K.jsx)(`span`,{className:`kv-live-label`,children:`Live Kai Pulse`}),(0,K.jsxs)(`span`,{className:`kv-live-value`,children:[c,(0,K.jsxs)(`span`,{className:`kv-live-countdown`,children:[`· next breath in `,l]})]})]})]}),(0,K.jsxs)(`div`,{className:`kv-session-status-block`,children:[(0,K.jsx)(`span`,{className:[`kv-accounts-pill`,n?`kv-accounts-pill--ok`:`kv-accounts-pill--warn`].join(` `),children:n?`Accounts linked`:`Connect accounts`}),(0,K.jsx)(`span`,{className:`kv-step-current-label`,children:Tn[t]??`Flow`})]})]}),(0,K.jsx)(`div`,{className:`kv-session-steps-row`,children:(0,K.jsx)(Pn,{current:t})})]}),(0,K.jsxs)(`div`,{className:`kv-session-actions`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:i,className:`kv-btn kv-btn-primary`,children:`+ Exhale Memory`}),(0,K.jsx)(`button`,{type:`button`,onClick:r,className:`kv-btn kv-btn-ghost`,children:`⏻ Inhale Memories`})]})]})}function Ln({ledger:e}){if(!e||e.length===0)return null;let t=[...e].sort((e,t)=>t.pulse-e.pulse).slice(0,4);return(0,K.jsxs)(`section`,{className:`kv-activity`,children:[(0,K.jsxs)(`div`,{className:`kv-activity-header`,children:[(0,K.jsx)(`span`,{className:`kv-activity-title`,children:`Session Activity`}),(0,K.jsxs)(`span`,{className:`kv-activity-count`,children:[e.length,` total`]})]}),(0,K.jsx)(`div`,{className:`kv-activity-list`,children:t.map(e=>(0,K.jsxs)(`div`,{className:`kv-activity-item`,children:[(0,K.jsxs)(`div`,{className:`kv-activity-item-main`,children:[(0,K.jsx)(`span`,{className:`kv-activity-platform`,children:e.platform}),(0,K.jsxs)(`span`,{className:`kv-activity-pulse`,children:[`Pulse `,(0,K.jsx)(`span`,{children:e.pulse})]})]}),e.link?(0,K.jsx)(`a`,{href:e.link,target:`_blank`,rel:`noreferrer`,className:`kv-activity-link`,children:e.link}):null]},`${e.platform}-${e.pulse}-${e.link}`))})]})}function Rn(){let{session:e,setSession:t,clearSession:n}=q(),[r,a]=(0,G.useState)(`login`),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(null),[f,p]=(0,G.useState)(null),[m,h]=(0,G.useState)(null),g=(0,G.useMemo)(()=>!e||!e.connectedAccounts?!1:Object.keys(e.connectedAccounts).length>0,[e]),_=async(e,n)=>{try{h(null);let e=xn(n);if(!e)throw Error(`Malformed sigil metadata from login.`);let r=await i(e.kaiSignature);if(e.userPhiKey&&e.userPhiKey!==r&&console.warn(`[KaiVoh] Embedded userPhiKey differs from derived; preferring derived from signature.`,{embedded:e.userPhiKey,derived:r}),!Cn(r))throw Error(`Invalid Φ-Key shape after derivation.`);let o=j(e.chakraDay)??`Crown`,s={phiKey:r,kaiSignature:e.kaiSignature,pulse:e.pulse,chakraDay:o,connectedAccounts:e.connectedAccounts??{},postLedger:e.postLedger??[]};t(s),Object.keys(s.connectedAccounts??{}).length>0?a(`compose`):a(`connect`)}catch(e){h(e instanceof Error?e.message:`Invalid Φ-Key signature or metadata.`),a(`login`)}},y=()=>{if(!e)return;let t=mn(e);hn(`sigil-${e.pulse+1}.svg`,t),n(),s(null),l(null),d(null),p(null),h(null),a(`login`)},b=()=>{s(null),l(null),d(null),p(null),h(null),a(`compose`)},x=async()=>{u&&(u.type!==`image`||!u.content.type.includes(`svg`)||await jn(u.filename,u.content))};(0,G.useEffect)(()=>{let t=!1;return(async()=>{if(!(r!==`embed`||!c||!e))try{let n=await Zt(c);if(t)return;let r=e.pulse,o=c.pulse,s=n.metadata,l=(s.kaiSignature??c.kaiSignature??e.kaiSignature??``).trim();if(!l)throw Error(`Missing kaiSignature for embedded proof.`);let u=await i(l);if(e.phiKey&&e.phiKey!==u)throw Error(`Proof mismatch: embedded kaiSignature derives a different Φ-Key than session.`);let f=typeof s.chakraDay==`string`?s.chakraDay:void 0,m=j(c.chakraDay??void 0)??j(f)??j(e.chakraDay??void 0)??`Crown`,h=v(o,l),g=A(o,l),_={v:`KPV-1`,pulse:o,chakraDay:m,kaiSignature:l,phiKey:u,verifierSlug:h},y=await E(_),b={...s,pulse:o,kaiPulse:o,chakraDay:m,kaiSignature:l,phiKey:u,userPhiKey:u,phiKeyShort:`φK-${u.slice(0,8)}`,verifierUrl:g,verifierSlug:h,proofCapsule:_,proofHash:y,capsuleHash:y,hashAlg:F,canon:`JCS`,originPulse:r,sigilPulse:r,exhalePulse:o},x=n.content;n.type===`image`&&x.type.includes(`svg`)&&(x=await Mn(x,b));let C,w,D=null;if(n.type===`image`&&x.type.includes(`svg`)){C=await I(await x.text());let e=typeof b.zkPoseidonHash==`string`?b.zkPoseidonHash:void 0,t=typeof b.zkPoseidonSecret==`string`?b.zkPoseidonSecret:void 0,n=typeof b.payloadHashHex==`string`?b.payloadHashHex:void 0,r=b.zkProof,i=b.proofHints,a=b.zkPublicInputs;if(e){let o=r&&typeof r==`object`?r:null,s=typeof r==`string`?r.trim().length>0:Array.isArray(r)?r.length>0:o?Object.keys(o).length>0:!1,c=typeof t==`string`&&t.trim().length>0?t.trim():void 0;if(!c&&n){let t=await P(n);t.hash===e&&(c=t.secret)}if(!s&&c){let t=await B({poseidonHash:e,secret:c,proofHints:typeof i==`object`&&i?i:void 0});t&&(r=t.proof,i=t.proofHints,a=t.zkPublicInputs)}i=typeof i!=`object`||!i?T(e):T(e,i)}if(e&&a){let t=gn(a);if(t&&t!==e)throw Error(`Embedded ZK mismatch`)}let o=typeof b.shareUrl==`string`?b.shareUrl:void 0,s={v:`KPB-1`,hashAlg:F,canon:`JCS`,proofCapsule:_,capsuleHash:y,svgHash:C,shareUrl:o,verifierUrl:g,zkPoseidonHash:e,zkProof:r,proofHints:i,zkPublicInputs:a};w=await S(R({...s,authorSig:null}));try{await fe(u),D=await H(u,w)}catch(e){console.warn(`Author signature failed; continuing without authorSig.`,e),D=null}let c={...s,bundleHash:w,authorSig:D};x=await Nn(x,c)}let O=`memory_p${r}_p${o}${kn(n.filename)||kn(c.post.file.name)||(n.type===`video`?`.mp4`:`.svg`)}`;d({...n,content:x,filename:O,metadata:{...b,svgHash:C,bundleHash:w,authorSig:D}}),p({pulse:o,chakraDay:m,kaiSignature:l,phiKey:u,verifierSlug:h,verifierUrl:g,hashAlg:F,canon:`JCS`,capsuleHash:y,svgHash:C??``,bundleHash:w??``,authorSig:D,proofHash:y}),a(`share`)}catch(e){if(t)return;h(e instanceof Error?e.message:`Failed to embed Kai Signature into media.`),a(`compose`)}})(),()=>{t=!0}},[r,c,e]);let C=(n,r)=>{if(!e||n.length===0)return;let i=[...e.postLedger??[],...n.map(e=>({pulse:r,platform:e.platform,link:e.link}))];t({...e,postLedger:i})};return!e||r===`login`?(0,K.jsx)(`div`,{className:`kai-voh-login-shell`,children:(0,K.jsxs)(`main`,{className:`kv-main-card`,children:[(0,K.jsx)(U,{onVerified:_}),m?(0,K.jsx)(`p`,{className:`kv-error`,children:m}):null]})}):(0,K.jsxs)(`div`,{className:`kai-voh-app-shell`,children:[(0,K.jsx)(In,{session:e,step:r,hasConnectedAccounts:g,onLogout:y,onNewPost:b}),(0,K.jsxs)(`main`,{className:`kv-main-card`,children:[(()=>r===`connect`?(0,K.jsxs)(`div`,{className:`kv-connect-step`,children:[(0,K.jsx)(Ot,{}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>a(`compose`),className:`kv-btn kv-btn-primary kv-btn-wide`,children:`Continue to Compose`})]}):r===`compose`&&!o?(0,K.jsx)(Lt,{onReady:e=>{s(e),l(null),d(null),p(null),h(null),a(`seal`)}}):r===`seal`&&o?(0,K.jsx)(Gt,{post:o,identityKaiSignature:e.kaiSignature,userPhiKey:e.phiKey,onSealComplete:e=>{l(e),a(`embed`)}}):r===`embed`?(0,K.jsx)(`p`,{className:`kv-embed-status`,children:`Embedding Kai Signature into your media…`}):r===`share`&&u&&c&&f?(0,K.jsx)(fn,{media:u,proof:f,onComplete:e=>{C(e,c.pulse),a(`verify`)}}):r===`verify`&&f?(0,K.jsxs)(`div`,{className:`kv-verify-step`,children:[(0,K.jsx)(be,{pulse:f.pulse,kaiSignature:f.kaiSignature,phiKey:f.phiKey,chakraDay:f.chakraDay,compact:!1}),(0,K.jsx)(`p`,{className:`kv-verify-copy`,children:`Your memory is now verifiable as human-authored under this Φ-Key. Anyone can scan the QR or open the verifier link to confirm it was sealed at this pulse under your sigil.`}),(0,K.jsxs)(`div`,{className:`kv-verify-actions`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:b,className:`kv-btn kv-btn-primary`,children:`+ Exhale Memory`}),u?.type===`image`&&u.content.type.includes(`svg`)?(0,K.jsx)(`button`,{type:`button`,onClick:()=>void x(),className:`kv-btn kv-btn-ghost`,children:`Download sealed SVG`}):null,(0,K.jsx)(`button`,{type:`button`,onClick:y,className:`kv-btn kv-btn-ghost`,children:`⏻ Inhale Memories`})]})]}):(0,K.jsxs)(`div`,{className:`kv-error-state`,children:[`Something went sideways in the breath stream…`,(0,K.jsx)(`button`,{type:`button`,onClick:b,className:`kv-error-reset`,children:`Reset step`})]}))(),m?(0,K.jsx)(`p`,{className:`kv-error`,children:m}):null]}),e.postLedger&&e.postLedger.length>0?(0,K.jsx)(Ln,{ledger:e.postLedger}):null]})}function zn(){return(0,K.jsx)(Se,{children:(0,K.jsx)(Rn,{})})}export{zn as default}; \ No newline at end of file diff --git a/dist/assets/KaiVohApp-Brroi08x.css b/dist/assets/KaiVohApp-Brroi08x.css new file mode 100644 index 000000000..7e7f64e70 --- /dev/null +++ b/dist/assets/KaiVohApp-Brroi08x.css @@ -0,0 +1 @@ +:root{--kv-breath:5.236s;--kv-phi:1.61803;--kv-bg:#020617;--kv-bg-2:#02091b;--kv-ink:#e5f0ff;--kv-muted:#9ca9d4;--kv-cyan:#22d3ee;--kv-violet:#8b5cf6;--kv-gold:#facc6b;--kv-emerald:#34d399;--kv-amber:#fbbf24;--kv-border-soft:#94a3b873;--kv-border-strong:#94a3b8bf;--kv-glass-surface:#0f172ae6}@keyframes kv-shell-breathe{0%{opacity:.55;transform:translate(0,0)scale(1)}50%{opacity:.8;transform:translateY(-1px)scale(1.005)}to{opacity:1;transform:translateY(-2px)scale(1.01)}}@keyframes kv-halo-breathe{0%{opacity:.4;filter:blur()}to{opacity:.9;filter:blur(3px)}}@keyframes kv-pulse-glow{0%{text-shadow:0 0 10px #38bdf899,0 0 #4ade8000}to{text-shadow:0 0 18px #38bdf8e6,0 0 30px #4ade8099}}@keyframes kv-step-glide{0%{transform:translateY(0);box-shadow:0 0 #22d3ee00,0 6px 12px #0f172ae6}to{transform:translateY(-1px);box-shadow:0 0 0 1px #22d3ee99,0 8px 18px #0f172af2}}@keyframes kv-button-breathe{0%{transform:translateY(0);box-shadow:0 10px 26px #0f172af2,inset 0 0 0 1px #0f172ae6}to{transform:translateY(-1px);box-shadow:0 18px 40px #0f172afa,inset 0 0 0 1px #0f172ae6}}@keyframes kv-activity-glow{0%{box-shadow:0 14px 40px #0f172ae6,inset 0 0 0 1px #0f172ae6}to{box-shadow:0 18px 52px #0f172afa,inset 0 0 0 1px #2563ebe6}}@media (prefers-reduced-motion:reduce){*{transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}.kai-voh-login-shell,.kai-voh-app-shell{isolation:isolate;max-width:960px;color:var(--kv-ink);flex-direction:column;gap:1rem;margin-inline:auto;padding-block:1.4rem 2.2rem;padding-inline:.8rem;display:flex;position:relative}.kai-voh-login-shell:before,.kai-voh-app-shell:before{content:"";z-index:-2;opacity:.98;filter:saturate(1.08);background:radial-gradient(80% 120% at 50% 0,#22d3ee38,#0000 70%),radial-gradient(80% 120% at 0 100%,#8b5cf63b,#0000 70%),radial-gradient(60% 100% at 100% 100%,#facc1529,#0000 70%),radial-gradient(120% 120%,#0f172afa,#020617);position:absolute;inset:-40px -24px}.kai-voh-login-shell:after,.kai-voh-app-shell:after{content:"";z-index:-1;pointer-events:none;mix-blend-mode:screen;opacity:.7;animation:kv-shell-breathe var(--kv-breath)ease-in-out infinite alternate;background:conic-gradient(from 130deg,#22d3ee2e,#0000 25%,#8b5cf62e,#0000 65%,#facc1529,#0000);position:absolute;inset:-2px}.kai-voh-login-shell{justify-content:center;min-height:360px}.kai-voh-app-shell{min-height:420px}.kv-main-card{-webkit-backdrop-filter:blur(18px)saturate(1.15);backdrop-filter:blur(18px)saturate(1.15);backface-visibility:hidden;will-change:transform,opacity;background:#0f172af0 linear-gradient(145deg,#0f172afa,#0f172ae6) padding-box padding-box;border:1px solid #94a3b88c;border-radius:1.25rem;padding:1.5rem 1.6rem;position:relative;overflow:hidden;transform:translate(0,0);box-shadow:0 18px 60px #0f172af2,inset 0 0 0 1px #0f172ae6}.kv-main-card:before{content:"";pointer-events:none;opacity:.12;background-image:linear-gradient(90deg,#94a3b838 1px,#0000 1px),linear-gradient(0deg,#94a3b833 1px,#0000 1px);background-size:calc(100%/var(--kv-phi))100%,100% calc(100%/var(--kv-phi));mix-blend-mode:screen;position:absolute;inset:0}.kv-main-card:after{content:"";pointer-events:none;opacity:.7;animation:kv-halo-breathe calc(var(--kv-breath)*.85)ease-in-out infinite alternate;background:radial-gradient(120% 120% at 50% 0,#22d3ee29,#0000 60%);position:absolute;inset:0}.kv-error{text-align:center;color:#fca5a5;margin-top:.75rem;font-size:.75rem}.kv-session-hud{border:1px solid var(--kv-border-soft);-webkit-backdrop-filter:blur(16px)saturate(1.2);backdrop-filter:blur(16px)saturate(1.2);backface-visibility:hidden;will-change:transform,opacity;background:radial-gradient(140% 160% at 0 0,#94a3b838,#0000 60%),#0f172af0 radial-gradient(180% 200% at 100% 100%,#0f172ae0,#0f172afa);border-radius:1.25rem;flex-direction:column;gap:.65rem;padding:.75rem 1rem .85rem;display:flex;position:relative;overflow:hidden;transform:translate(0,0);box-shadow:0 18px 50px #0f172ae6,inset 0 0 0 1px #0f172ae6}.kv-session-main{flex-direction:column;gap:.45rem;display:flex}.kv-session-header-row{flex-direction:column;gap:.35rem;display:flex}.kv-session-title-block{flex-direction:column;gap:.24rem;display:flex}.kv-session-kicker{text-transform:uppercase;letter-spacing:.24em;color:#94a3b8e6;font-size:.66rem}.kv-session-keyline{color:#e2e8f0e6;flex-wrap:wrap;gap:.28rem .65rem;font-size:.74rem;display:flex}.kv-meta-item{align-items:baseline;gap:.25rem;display:inline-flex}.kv-meta-label{text-transform:uppercase;letter-spacing:.18em;color:#94a3b8e6;font-size:.65rem}.kv-meta-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.74rem;font-weight:600}.kv-meta-phikey .kv-meta-value{letter-spacing:.03em}.kv-meta-activity .kv-meta-value{color:var(--kv-emerald)}.kv-meta-divider{background:linear-gradient(#94a3b866,#94a3b81a);align-self:center;width:1px;height:.9rem}.kv-session-status-block{flex-direction:column;align-items:flex-start;gap:.35rem;display:flex}.kv-accounts-pill{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-transform:uppercase;letter-spacing:.14em;backface-visibility:hidden;will-change:transform,opacity;background:#0f172acc;border:1px solid #94a3b8b3;border-radius:999px;padding:.2rem .7rem;font-size:.7rem;transform:translate(0,0)}.kv-accounts-pill--ok{color:#bbf7d0f2;background:radial-gradient(140% 160% at 0 0,#10b9812e,#0000 60%),#0f172ae6;border-color:#34d399cc}.kv-accounts-pill--warn{color:#fef3c7f2;background:radial-gradient(140% 160% at 0 0,#f59e0b38,#0000 60%),#0f172ae6;border-color:#fbbf24d9}.kv-step-current-label{text-transform:uppercase;letter-spacing:.18em;color:#94a3b8eb;font-size:.7rem}.kv-session-live{flex-wrap:wrap;align-items:baseline;gap:.4rem;margin-top:.2rem;font-size:.7rem;display:flex}.kv-live-label{text-transform:uppercase;letter-spacing:.18em;color:#94a3b8f2;font-size:.6rem}.kv-live-value{color:#e2e8fffa;animation:kv-pulse-glow var(--kv-breath)ease-in-out infinite alternate;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:600}.kv-live-countdown{color:#6ee7b7;margin-left:.25rem;font-weight:500}.kv-session-steps-row{margin-top:.05rem}.kv-session-actions{flex-flow:wrap;justify-content:flex-start;gap:.4rem;display:flex}@media (min-width:768px){.kv-session-hud{flex-direction:row;justify-content:space-between;align-items:flex-start}.kv-session-main{flex:auto;padding-right:.75rem}.kv-session-actions{flex-direction:column;justify-content:center;align-items:flex-end;min-width:170px}.kv-session-header-row{flex-direction:row;justify-content:space-between;align-items:center}.kv-session-status-block{text-align:right;justify-content:flex-end;align-items:flex-end;padding-left:1.5rem}}.kv-steps{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.kv-step{align-items:center;gap:.35rem;display:flex}.kv-step-chip{color:#e2e8f0e6;background:#0f172ae6;border:1px solid #94a3b8b3;border-radius:999px;align-items:center;gap:.35rem;padding:.2rem .65rem;font-size:.68rem;display:inline-flex;box-shadow:inset 0 0 0 1px #0f172af2,0 6px 12px #0f172ae6}.kv-step-index{opacity:.8;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.62rem}.kv-step-label{white-space:nowrap}.kv-step-chip--done{color:#bbf7d0f2;background:radial-gradient(120% 120% at 0 0,#22c55e40,#0000 60%),#0f172af2;border-color:#34d399e6}.kv-step-chip--active{color:#e0f2fefa;animation:kv-step-glide calc(var(--kv-breath)*.6)ease-in-out infinite alternate;background:radial-gradient(120% 120% at 0 0,#38bdf852,#0000 60%),#0f172afa;border-color:#22d3eef2}.kv-step-rail{background:linear-gradient(90deg,#94a3b859,#94a3b81f);width:22px;height:1px}.kv-btn{cursor:pointer;color:var(--kv-ink);background:#0f172af2;border:1px solid #0000;border-radius:.7rem;justify-content:center;align-items:center;gap:.35rem;padding:.38rem .8rem;font-size:.7rem;font-weight:600;text-decoration:none;transition:transform .16s,box-shadow .16s,background .16s,border-color .16s,color .16s;display:inline-flex;position:relative;box-shadow:0 10px 26px #0f172af2,inset 0 0 0 1px #0f172ae6}.kv-btn-primary{color:#020617;animation:kv-button-breathe calc(var(--kv-breath)*.75)ease-in-out infinite alternate;background:linear-gradient(135deg,#38bdf8fa,#2dd4bff5);border-color:#22d3eee6}.kv-btn-ghost{color:#e2e8f0f5;background:radial-gradient(120% 120% at 0 0,#94a3b826,#0000 60%),#0f172af5;border-color:#94a3b8d9}.kv-btn-wide{align-self:center;min-width:220px;margin-top:1rem}.kv-btn:hover{transform:translateY(-1px);box-shadow:0 16px 40px #0f172af2,inset 0 0 0 1px #0f172ae6}.kv-activity{-webkit-backdrop-filter:blur(14px)saturate(1.18);backdrop-filter:blur(14px)saturate(1.18);backface-visibility:hidden;will-change:transform,opacity;animation:kv-activity-glow calc(var(--kv-breath)*1.25)ease-in-out infinite alternate;background-color:#0f172af5;border:1px solid #1e40af99;border-radius:1.25rem;margin-top:.4rem;padding:.85rem 1rem 1rem;position:relative;overflow:hidden;transform:translate(0,0);box-shadow:0 14px 40px #0f172ae6,inset 0 0 0 1px #0f172ae6}@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.kv-main-card,.kv-session-hud,.kv-activity,.kv-accounts-pill{background-color:#0f172af5;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}.kv-main-card{background:linear-gradient(145deg,#0f172afa,#0f172aeb) padding-box padding-box}.kv-session-hud{background:radial-gradient(140% 160% at 0 0,#94a3b829,#0000 60%),radial-gradient(180% 200% at 100% 100%,#0f172ae6,#0f172a)}.kv-activity{background:radial-gradient(120% 120% at 0 0,#22d3ee1f,#0000 65%),radial-gradient(120% 120% at 100% 100%,#8b5cf61f,#0000 65%),#0f172af5}}@media (pointer:coarse){.kv-main-card:before,.kv-main-card:after,.kv-session-hud:before,.kv-activity:before{mix-blend-mode:normal}.kv-main-card,.kv-session-hud,.kv-activity,.kv-accounts-pill{content-visibility:visible;contain-intrinsic-size:auto}}.kv-activity:before{content:"";pointer-events:none;opacity:.75;mix-blend-mode:screen;background:radial-gradient(120% 120% at 0 0,#22d3ee2e,#0000 65%),radial-gradient(120% 120% at 100% 100%,#8b5cf62e,#0000 65%);position:absolute;inset:0}.kv-activity-header{z-index:1;color:#94a3b8e6;justify-content:space-between;align-items:center;margin-bottom:.55rem;font-size:.72rem;display:flex;position:relative}.kv-activity-title{text-transform:uppercase;letter-spacing:.18em}.kv-activity-count{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.66rem}.kv-activity-list{z-index:1;flex-direction:column;gap:.35rem;display:flex;position:relative}.kv-activity-item{background:#0f172af5;border:1px solid #334155e6;border-radius:.75rem;justify-content:space-between;align-items:center;gap:.75rem;padding:.45rem .6rem;display:flex}.kv-activity-item-main{flex-direction:column;gap:.1rem;display:flex}.kv-activity-platform{color:#e2e8f0fa;font-size:.8rem;font-weight:600}.kv-activity-pulse{color:#94a3b8f2;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.7rem}.kv-activity-pulse span{color:#e2e8f0f5}.kv-activity-link{color:#38bdf8f2;white-space:nowrap;text-overflow:ellipsis;max-width:9.5rem;font-size:.7rem;text-decoration:none;overflow:hidden}.kv-activity-link:hover{text-underline-offset:2px;text-decoration:underline}.kv-connect-step{flex-direction:column;align-items:center;gap:.75rem;display:flex}.kv-embed-status{text-align:center;color:#e2e8f0f5;margin-top:2.5rem;font-size:.86rem}.kv-verify-step{text-align:center;flex-direction:column;align-items:center;gap:.75rem;display:flex}.kv-verify-copy{color:#94a3b8f2;max-width:360px;font-size:.76rem}.kv-verify-actions{flex-wrap:wrap;justify-content:center;gap:.5rem;display:flex}.kv-error-state{text-align:center;color:#e2e8f0f5;margin-top:2.2rem;font-size:.86rem}.kv-error-reset{color:#38bdf8f2;cursor:pointer;text-underline-offset:2px;background:0 0;border:none;margin-left:.25rem;font-size:.86rem;text-decoration:underline}[class*=kv-chakra-]{position:relative;overflow:hidden}[class*=kv-chakra-]:before{content:"";z-index:-1;pointer-events:none;mix-blend-mode:screen;opacity:.7;background:radial-gradient(140% 160% at 0 0,#ffffff0f,#0000 60%),radial-gradient(180% 180% at 100% 100%,#0f172acc,#0000 65%);position:absolute;inset:-1px}[class*=kv-chakra-]:after{content:"";z-index:-2;pointer-events:none;border-radius:inherit;opacity:.9;background:0 0;position:absolute;inset:0}.kv-chakra-root:after{background:radial-gradient(120% 120% at 5% 0,#f871718c,#0000 60%),radial-gradient(120% 160% at 100% 130%,#7f1d1db3,#0000 65%)}.kv-chakra-sacral:after{background:radial-gradient(120% 120% at 5% 0,#fb923c8c,#0000 60%),radial-gradient(120% 160% at 100% 130%,#9a3412b3,#0000 65%)}.kv-chakra-solar:after{background:radial-gradient(120% 120% at 5% 0,#fcd34d99,#0000 60%),radial-gradient(120% 160% at 100% 130%,#b45309b3,#0000 65%)}.kv-chakra-heart:after{background:radial-gradient(120% 120% at 5% 0,#4ade8099,#0000 60%),radial-gradient(120% 160% at 100% 130%,#166534d9,#0000 65%)}.kv-chakra-throat:after{background:radial-gradient(120% 120% at 5% 0,#38bdf899,#0000 60%),radial-gradient(120% 160% at 100% 130%,#164e63d9,#0000 65%)}.kv-chakra-brow:after{background:radial-gradient(120% 120% at 5% 0,#818cf8a6,#0000 60%),radial-gradient(120% 160% at 100% 130%,#312e81e6,#0000 65%)}.kv-chakra-crown:after{background:radial-gradient(120% 120% at 5% 0,#c4b5fdb3,#0000 60%),radial-gradient(120% 160% at 100% 130%,#4c1d95e6,#0000 65%)}:root{--phi:1.61803;--phi-breath:5.236s;--phi-breath-slow:calc(var(--phi-breath)*var(--phi));--phi-breath-fast:calc(var(--phi-breath)/var(--phi));--t-34:calc(var(--phi-breath)/34);--t-21:calc(var(--phi-breath)/21);--t-13:calc(var(--phi-breath)/13);--t-8:calc(var(--phi-breath)/8);--t-5:calc(var(--phi-breath)/5);--t-3:calc(var(--phi-breath)/3);--t-2:calc(var(--phi-breath)/2);--ease-breath:cubic-bezier(.22,.61,.28,.99);--ease-pulse:cubic-bezier(.15,.7,.25,1);--ink-0:#000;--ink-1:#05080d;--ink-2:#0a141e;--ink-3:#0f1d2a;--ink-4:#132535;--aqua-1:#00eaff;--aqua-2:#00ffd5;--aqua-3:#9fffe0;--auric-1:#ffd166;--auric-2:#fff3b0;--rose-1:#ff7b7b;--text-1:#eaffff;--text-2:#c9f7ff;--text-3:#a8e7f1;--line-1:#00ffff1a;--line-2:#00ffe638;--line-3:#ffffff1f;--glow-aqua-sm:0 0 12px #00ffe62e;--glow-aqua-md:0 0 20px #00ffe638;--glow-aqua-lg:0 0 36px #00ffe62e;--radius-lg:20px;--radius-md:14px;--radius-pill:9999px;--shadow-ambient:0 10px 40px #00000073;--focus-ring:0 0 0 3px #00ffe659,0 0 0 1px #ffffff80 inset}.social-connector-container{max-width:720px;color:var(--text-1);background:radial-gradient(1200px 800px at 20% -10%,#00eeff14,transparent 60%),radial-gradient(800px 600px at 120% 120%,#ffd1660f,transparent 55%),linear-gradient(180deg,var(--ink-3)0%,var(--ink-1)100%);border:1px solid var(--line-1);border-radius:var(--radius-lg);box-shadow:var(--shadow-ambient),inset 0 0 0 1px #ffffff0a;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);flex-direction:column;align-items:stretch;gap:1rem;margin:0 auto;padding:1.25rem 1.25rem 1.5rem;display:flex;position:relative;overflow:clip}.social-connector-container:before{content:"";border-radius:calc(var(--radius-lg) + 1px);pointer-events:none;animation:breathGlow var(--phi-breath-slow)var(--ease-breath)infinite;z-index:0;background:radial-gradient(1200px 400px at 50% -20%,#ffd1661f,#0000 60%),radial-gradient(900px 300px at 50% 120%,#00ffe61a,#0000 60%);padding:1px;position:absolute;inset:-1px;box-shadow:inset 0 0 0 1px #ffd1660f;-webkit-mask:linear-gradient(#000,#000) content-box,linear-gradient(#000,#000);mask:linear-gradient(#000,#000) content-box,linear-gradient(#000,#000)}@keyframes breathGlow{0%,to{opacity:.4;filter:blur(.5px)}50%{opacity:.7;filter:blur(1.2px)}}.social-connector-title{z-index:1;text-align:center;letter-spacing:.015em;text-shadow:0 1px #00000059;background:linear-gradient(90deg,var(--text-1),var(--aqua-2),var(--auric-1));color:#0000;animation:titleShimmer var(--phi-breath-fast)linear infinite;background-size:200%;-webkit-background-clip:text;background-clip:text;margin:.25rem 0;font-size:1.6rem;font-weight:800;position:relative}@keyframes titleShimmer{0%{background-position:0%}to{background-position:-200%}}.social-connector-sub{z-index:1;text-align:center;color:var(--text-3);margin:0 0 .5rem;line-height:1.38;position:relative}.divider-aura{width:100%;height:1px;box-shadow:var(--glow-aqua-sm);background:linear-gradient(90deg,#0000,#00ffe659,#ffd16640,#0000);margin:.75rem 0 .25rem}.social-connector-container .composer{z-index:1;grid-template-columns:1fr;gap:.65rem;display:grid;position:relative}.social-connector-container .composer.two{grid-template-columns:1fr 1fr}.social-connector-container .composer.three{grid-template-columns:repeat(3,1fr)}@media (max-width:860px){.social-connector-container .composer.two,.social-connector-container .composer.three{grid-template-columns:1fr}}.social-connector-container .field{gap:.35rem;display:grid}.social-connector-container .composer-label{color:#bffcff;letter-spacing:.02em;-webkit-user-select:none;user-select:none;font-size:.93rem}.social-connector-container .muted{color:var(--text-3);opacity:.85}.social-connector-container .composer-hint{color:var(--text-3);opacity:.9;margin-top:.1rem;font-size:.86rem}.social-connector-container .composer-hint.warn{color:#ffe9b3}.social-connector-container .composer-input-row{grid-template-columns:1fr auto;align-items:center;gap:.5rem;display:grid}.social-connector-container .composer-input,.social-connector-container .composer-textarea{border-radius:var(--radius-md);width:100%;color:var(--text-1);border:1px solid var(--line-2);transition:border-color var(--t-34)var(--ease-breath),box-shadow var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath),transform var(--t-34)var(--ease-breath);background:linear-gradient(#0a141ea8,#080e14b8);outline:none;padding:.78rem 1rem;box-shadow:inset 0 0 0 1px #ffffff05}.social-connector-container .composer-textarea{resize:vertical;min-height:100px}.social-connector-container .composer-input:focus,.social-connector-container .composer-textarea:focus{box-shadow:var(--glow-aqua-md),inset 0 0 0 1px #ffffff0a,var(--focus-ring);border-color:#00ffe661;transform:translateY(-.5px)}.social-connector-container .composer-input.warn{border-color:#ffd16673;box-shadow:0 0 14px #ffd1662e}.social-connector-container .composer-aux{border-radius:var(--radius-pill);border:1px solid var(--line-2);color:var(--text-2);cursor:pointer;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath);background:linear-gradient(135deg,#0c2b33,#071e22);padding:.7rem .95rem}.social-connector-container .composer-aux:hover{transform:translateY(-1px);box-shadow:0 0 18px #00ffe633}.social-connector-container .composer-aux:focus-visible{box-shadow:var(--focus-ring)}.social-connector-container .composer-error{color:#ffeaea;transition:box-shadow var(--t-21)var(--ease-breath),border-color var(--t-21)var(--ease-breath);background:linear-gradient(#3c0a0ab3,#280606cc);border:1px solid #ff4a4a59;border-radius:12px;margin-top:.25rem;padding:.6rem .8rem;box-shadow:0 0 14px #ff4a4a29}.social-connector-container .composer-warn{color:#fff8e0;transition:box-shadow var(--t-21)var(--ease-breath),border-color var(--t-21)var(--ease-breath);background:linear-gradient(#3c320a8c,#282208b3);border:1px solid #ffd16659;border-radius:12px;margin-top:.4rem;padding:.6rem .8rem;box-shadow:0 0 14px #ffd1661f}.social-connector-container .composer-actions{flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:.6rem;margin-top:.25rem;display:flex}.social-connector-container .composer-submit,.social-connector-container .composer-reset,.social-connector-container .composer-copy,.social-connector-container .composer-open{border-radius:var(--radius-pill);border:1px solid var(--line-2);cursor:pointer;letter-spacing:.02em;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath);will-change:transform,box-shadow;align-items:center;gap:.45rem;padding:.7rem 1.2rem;font-weight:700;text-decoration:none;display:inline-flex;position:relative}.social-connector-container .composer-submit{color:#e7ffff;background:linear-gradient(135deg,#15616d,#0b3943);box-shadow:0 0 12px #00ffe629}.social-connector-container .composer-submit:hover{transform:translateY(-1px);box-shadow:0 0 22px #00ffe63d}.social-connector-container .composer-submit:disabled{opacity:.6;cursor:default;box-shadow:none;transform:none}.social-connector-container .composer-reset{color:var(--text-2);background:linear-gradient(135deg,#18242f,#0f1922)}.social-connector-container .composer-reset:hover{border-color:#ffd16647;transform:translateY(-1px);box-shadow:0 0 18px #ffd1662e}.social-connector-container .composer-copy{color:var(--text-2);background:linear-gradient(135deg,#13333a,#0a2226)}.social-connector-container .composer-copy:hover{transform:translateY(-1px);box-shadow:0 0 18px #00ffe638}.social-connector-container .composer-copy.is-copied{animation:copiedPulse var(--t-5)var(--ease-pulse)1;border-color:#00ffe680;box-shadow:0 0 22px #00ffe647,inset 0 0 0 2px #00ffe62e}@keyframes copiedPulse{0%{transform:scale(1)}28%{transform:scale(1.03)}to{transform:scale(1)}}.social-connector-container .composer-open{color:var(--aqua-2);background:linear-gradient(135deg,#203044,#14202c)}.social-connector-container .composer-open:hover{transform:translateY(-1px);box-shadow:0 0 18px #0ef3}.social-connector-container .composer-submit:focus-visible,.social-connector-container .composer-reset:focus-visible,.social-connector-container .composer-copy:focus-visible,.social-connector-container .composer-open:focus-visible,.social-connector-container .composer-aux:focus-visible,.social-connector-container .pill:focus-visible{box-shadow:var(--focus-ring)}.social-connector-container .attachments{z-index:1;gap:.9rem;margin-top:.75rem;display:grid;position:relative}.social-connector-container .attachments-title{color:var(--text-1);letter-spacing:.02em;margin:.25rem 0;font-size:1.05rem;font-weight:800}.social-connector-container .url-list{gap:.4rem;margin:.25rem 0 0;padding:0;list-style:none;display:grid}.social-connector-container .url-item{border:1px solid var(--line-1);transition:border-color var(--t-34)var(--ease-breath),box-shadow var(--t-34)var(--ease-breath);background:linear-gradient(#0a121ab3,#080e14d1);border-radius:12px;justify-content:space-between;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.social-connector-container .dropzone{transition:box-shadow var(--t-21)var(--ease-breath),border-color var(--t-21)var(--ease-breath),background var(--t-21)var(--ease-breath);background:radial-gradient(700px 220px at 110% -20%,#00ffe61a,#0000 60%),linear-gradient(#0c161eb3,#080e14d9);border:1px dashed #00ffe647;border-radius:16px;padding:.9rem}.social-connector-container .dropzone:hover{box-shadow:var(--glow-aqua-sm);border-color:#00ffe673}.social-connector-container .dropzone-inner{text-align:center;place-items:center;gap:.35rem;padding:.35rem;display:grid}.social-connector-container .dz-title{letter-spacing:.02em;font-weight:800}.social-connector-container .dz-sub{color:var(--text-3);font-size:.9rem}.social-connector-container .dz-actions{flex-wrap:wrap;gap:.5rem;margin-top:.4rem;display:flex}.social-connector-container .pill{border-radius:var(--radius-pill);border:1px solid var(--line-2);min-height:44px;color:var(--text-2);cursor:pointer;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath);-webkit-user-select:none;user-select:none;letter-spacing:.02em;background:linear-gradient(135deg,#14232b,#0c171d);justify-content:center;align-items:center;gap:.45rem;padding:.64rem 1rem;font-weight:700;text-decoration:none;display:inline-flex}.social-connector-container .pill:hover{transform:translateY(-1px);box-shadow:0 0 16px #00ffe62e}.social-connector-container .pill.prim{color:#e7ffff;background:linear-gradient(135deg,#15616d,#0b3943);box-shadow:0 0 12px #00ffe624}.social-connector-container .pill.danger{color:#ffeaea;background:linear-gradient(135deg,#3a1414,#261010);border-color:#ff4a4a73;box-shadow:0 0 10px #ff4a4a24}.social-connector-container .pill.subtle{color:var(--text-2);background:linear-gradient(135deg,#18242f,#0f1922)}.social-connector-container .pill.icon-only{width:44px;padding:0}.social-connector-container .ico{stroke-linecap:round;stroke-linejoin:round;width:20px;height:20px;display:inline-block}.social-connector-container .visually-hidden{clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;position:absolute!important;overflow:hidden!important}.social-connector-container .file-summary{box-shadow:var(--glow-aqua-sm);background:radial-gradient(600px 180px at 100% -20%,#00ffe614,#0000 60%),linear-gradient(#0c161eb3,#0a121ad9);border:1px solid #00ffe62e;border-radius:14px;padding:.75rem .8rem}.social-connector-container .file-list{gap:.4rem;margin:.6rem 0 0;padding:0;list-style:none;display:grid}.social-connector-container .file-item{border:1px solid var(--line-1);transition:border-color var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath);background:linear-gradient(#0a141ea8,#080e14c9);border-radius:12px;padding:.5rem .65rem}.social-connector-container .file-row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.6rem;display:flex}.social-connector-container .badge{border:1px solid var(--line-2);color:var(--text-2);background:linear-gradient(#0a1b22,#08141a);border-radius:999px;align-items:center;padding:.1rem .45rem;font-size:.75rem;display:inline-flex}.social-connector-container .dim{color:var(--text-3)}.social-connector-container .id-banner{box-shadow:var(--glow-aqua-sm);transition:box-shadow var(--t-13)var(--ease-breath),border-color var(--t-13)var(--ease-breath);background:radial-gradient(600px 200px at 100% -20%,#00ffe614,#0000 60%),linear-gradient(#0e1820b3,#0a121ad9);border:1px solid #00ffe638;border-radius:12px;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.social-connector-container .id-dot{width:8px;height:8px;animation:phiBlink var(--phi-breath)var(--ease-breath)infinite;background:radial-gradient(circle at 40% 35%,#bffcff,#7cf7ef);border-radius:50%;box-shadow:0 0 8px #00ffe659}@keyframes phiBlink{0%,to{opacity:.8}50%{opacity:.35}}.social-connector-container .id-text{color:var(--text-1);font-weight:700}.social-connector-container .id-sub{color:var(--text-3)}.social-connector-container .story-actions{flex-wrap:wrap;align-items:center;gap:.6rem;display:flex}.social-connector-container .story-preview{border:1px solid var(--line-1);transition:border-color var(--t-34)var(--ease-breath),box-shadow var(--t-34)var(--ease-breath);background:linear-gradient(#0a141ea8,#080e14c9);border-radius:12px;grid-template-columns:120px auto;align-items:center;gap:.6rem;padding:.6rem;display:grid}@media (max-width:560px){.social-connector-container .story-preview{grid-template-columns:1fr}}.social-connector-container .story-preview-video{object-fit:cover;aspect-ratio:9/16;background:#000;border:1px solid #ffffff14;border-radius:10px;width:100%;height:100%;max-height:220px}.social-connector-container .story-preview-meta{color:var(--text-3);margin-left:.2rem}.social-connector-container .story-modal{z-index:5;place-items:center;display:grid;position:absolute;inset:0}.social-connector-container .story-overlay{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);transition:opacity var(--t-13)var(--ease-breath);background:radial-gradient(100% 100%,#000000a8,#000000d9);position:absolute;inset:0}.social-connector-container .story-sheet{width:min(720px,96%);box-shadow:0 20px 60px #0009,var(--glow-aqua-sm);transition:transform var(--t-13)var(--ease-pulse),box-shadow var(--t-13)var(--ease-breath);background:radial-gradient(1200px 300px at 50% -20%,#ffd16614,#0000 60%),linear-gradient(#0e1820d1,#0a121af0);border:1px solid #00ffe638;border-radius:16px;position:relative;overflow:hidden}.social-connector-container .story-head{border-bottom:1px solid #ffffff0f;justify-content:space-between;align-items:center;gap:.6rem;padding:.7rem .9rem;display:flex}.social-connector-container .story-title{letter-spacing:.02em;font-weight:800}.social-connector-container .story-body{grid-template-columns:9fr 7fr;gap:.8rem;padding:.9rem;display:grid}@media (max-width:860px){.social-connector-container .story-body{grid-template-columns:1fr}}.social-connector-container .story-stage{border:1px solid var(--line-2);aspect-ratio:9/16;transition:border-color var(--t-34)var(--ease-breath);background:#000;border-radius:12px;place-items:center;display:grid;position:relative;overflow:hidden}.social-connector-container .story-stage video{object-fit:cover;width:100%;height:100%}.social-connector-container .story-ctrls{align-content:start;gap:.6rem;display:grid}.social-connector-container .story-meter{border:1px solid var(--line-2);background:linear-gradient(#1a2a32,#0e1a20);border-radius:999px;height:10px;overflow:hidden}.social-connector-container .story-meter>.bar{width:0%;height:100%;transition:width var(--t-21)linear;background:linear-gradient(90deg,#ff7b7b,#ffd166,#00ffd5);box-shadow:0 0 14px #ffd16638}.social-connector-container .story-btn{border:1px solid var(--line-2);width:100%;color:var(--text-2);letter-spacing:.02em;cursor:pointer;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath);background:linear-gradient(135deg,#14232b,#0c171d);border-radius:12px;justify-content:center;align-items:center;gap:.45rem;padding:.75rem 1rem;font-weight:800;display:inline-flex}.social-connector-container .story-btn:hover{transform:translateY(-1px);box-shadow:0 0 16px #00ffe62e}.social-connector-container .story-btn.record{color:#ffeaea;background:linear-gradient(135deg,#3a1414,#261010);border-color:#ff4a4a73}.social-connector-container .story-btn.primary{color:#e7ffff;background:linear-gradient(135deg,#15616d,#0b3943)}.social-connector-container .story-foot{border-top:1px solid #ffffff0f;justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem .9rem;display:flex}.breath-glow{filter:drop-shadow(0 0 10px #00ffe638)drop-shadow(0 0 18px #ffd1661a)}.social-connector-container .mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace}@media (max-width:520px){.social-connector-title{font-size:1.28rem}.social-connector-sub{font-size:.95rem}}@media (prefers-reduced-motion:reduce){.social-connector-container:before,.social-connector-title,.social-connector-container .id-dot,.social-connector-container .composer-copy.is-copied{animation:none!important}.social-connector-container *{transition-duration:0s!important}}.kv-social-connector{background:radial-gradient(circle at 0 0,#b49cff29,#0000 70%),#050910f5;border:1px solid #ffffff2e;border-radius:18px;flex-direction:column;gap:14px;margin-top:18px;padding:14px 14px 16px;display:flex}.kv-social-header{flex-direction:column;gap:4px;display:flex}.kv-social-title{letter-spacing:.1em;text-transform:uppercase;font-size:16px;font-weight:600}.kv-social-subtitle{color:var(--kv-ink-soft,#b7c7dd);font-size:13px}.kv-social-proof{grid-template-columns:minmax(0,2fr) minmax(0,1.2fr);gap:12px;display:grid}.kv-social-proof-block{background:#060b12fa;border:1px solid #ffffff29;border-radius:14px;flex-direction:column;gap:6px;padding:8px 10px;display:flex}.kv-proof-label{text-transform:uppercase;letter-spacing:.12em;color:var(--kv-ink-muted,#8b9bb2);font-size:11px}.kv-proof-caption{white-space:pre-wrap;word-wrap:break-word;background:#03070eeb;border:1px solid #ffffff1f;border-radius:10px;max-height:180px;margin:0;padding:8px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px;overflow:auto}.kv-social-proof-meta{background:#070c14fa;border:1px solid #ffffff29;border-radius:14px;flex-direction:column;gap:6px;padding:10px 10px 8px;font-size:12px;display:flex}.kv-proof-meta-row{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.kv-proof-meta-label{color:var(--kv-ink-muted,#8b9bb2);text-transform:uppercase;letter-spacing:.12em;font-size:11px}.kv-proof-meta-value{text-align:right;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.kv-social-actions{flex-direction:column;gap:10px;display:flex}.kv-social-row--grid{flex-wrap:wrap}.kv-social-status{color:var(--kv-ink-soft,#b7c7dd);margin-top:4px;font-size:12px}@media (max-width:768px){.kv-social-connector{padding:12px 10px 14px}.kv-social-proof{grid-template-columns:minmax(0,1fr)}.kv-social-row{flex-direction:column}.kv-social-row .kv-btn{width:100%}}.story-rec-overlay{z-index:9999;color:#e7edf3;background:radial-gradient(100% 120% at 50% 0,#0a0e16e6 0%,#0a0e16fa 60%,#05080d 100%);grid-template-rows:1fr auto;display:grid;position:fixed;inset:0}.story-rec-video-wrap{place-items:center;display:grid;position:relative;overflow:hidden}.story-rec-video{object-fit:cover;will-change:transform;background:#000;width:100%;height:100%;transform:translateZ(0)}.story-rec-topbar{padding:env(safe-area-inset-top)12px 8px 12px;grid-template-columns:1fr auto auto;align-items:flex-start;gap:8px;display:grid;position:absolute;top:0;left:0;right:0}.story-top-center{place-items:center;display:grid}.story-timer{font-variant-numeric:tabular-nums;background:#00000059;border:1px solid #ffffff26;border-radius:999px;padding:4px 8px}.story-top-actions{justify-content:flex-end;gap:8px;display:flex}.story-btn{-webkit-tap-highlight-color:transparent;cursor:pointer;color:#e7edf3;background:#00000059;border:1px solid #ffffff26;border-radius:12px;padding:8px 10px;font-size:18px;line-height:1}.story-btn.active{background:#1eb4ff40;border-color:#1eb4ff80}.story-btn.disabled{opacity:.45;cursor:not-allowed}.story-rec-bottombar{padding:12px 16px calc(16px + env(safe-area-inset-bottom));place-items:center;gap:8px;display:grid;position:relative}.record-wrap{place-items:center;width:92px;height:92px;display:grid;position:relative}.record-btn{cursor:pointer;color:#f04b64;background:0 0;border:none;border-radius:999px;width:84px;height:84px;position:relative}.record-btn .progress-ring{background:conic-gradient(currentColor 0deg,transparent 0);border-radius:999px;position:absolute;inset:0;box-shadow:inset 0 0 0 1px #ffffff1f}.record-btn .dot{background:#f04b64;border-radius:20px;transition:all .14s;position:absolute;inset:10px;box-shadow:0 6px 22px #f04b6459,inset 0 0 0 2px #ffffff1f}.record-btn.recording .dot{background:#ff2d55;border-radius:12px;transform:scale(.92)}.story-rec-error,.story-rec-hint{opacity:.9;text-align:center;margin-top:6px;font-size:12px}.mono{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace}.story-rec-overlay{z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:radial-gradient(100% 100%,#000000a8,#000000e0);grid-template-rows:1fr;display:grid;position:fixed;inset:0}.story-rec-video-wrap{place-items:center;display:grid;position:absolute;inset:0}.story-rec-video{object-fit:cover;width:min(100vmin,100%);height:100%;max-height:100%}.story-rec-video.mirror{transform:scaleX(-1)}.story-rec-topbar{pointer-events:none;grid-template-columns:1fr auto 1fr;align-items:center;padding:10px;display:grid;position:absolute;top:0;left:0;right:0}.story-btn.top.left{justify-self:start}.story-top-center{pointer-events:none;justify-self:center}.story-top-actions{pointer-events:auto;justify-self:end;gap:8px;display:inline-flex}.story-btn{color:#e7ffff;cursor:pointer;pointer-events:auto;background:linear-gradient(135deg,#15616d40,#0b394340);border:1px solid #00ffe640;border-radius:12px;place-items:center;width:40px;height:40px;transition:transform .12s,box-shadow .2s,border-color .2s,background .2s;display:inline-grid}.story-btn:hover{transform:translateY(-1px);box-shadow:0 0 16px #00ffe638}.story-btn.active{border-color:#ffd16673;box-shadow:0 0 16px #ffd16638}.story-btn.disabled{opacity:.5;cursor:default;filter:grayscale(.3)}.ico{width:22px;height:22px}.story-timer{letter-spacing:.02em;color:#e7ffff;background:linear-gradient(135deg,#14232b80,#0c171d80);border:1px solid #00ffe647;border-radius:999px;padding:4px 8px;font-weight:700}.story-rec-bottombar{place-items:center;gap:10px;padding:16px 10px 18px;display:grid;position:absolute;bottom:0;left:0;right:0}.record-wrap{place-items:center;display:grid}.record-btn{color:#00ffd5;cursor:pointer;background:radial-gradient(120% 120%,#00ffe624,#0003);border:2px solid #00ffe647;border-radius:999px;place-items:center;width:84px;height:84px;transition:transform .12s,box-shadow .2s,border-color .2s,background .2s;display:grid;position:relative;box-shadow:0 0 28px #00ffe626}.record-btn:hover{transform:translateY(-1px)scale(1.02);box-shadow:0 0 36px #00ffe633}.record-btn.recording{color:#ff7b7b;border-color:#ff7b7b73;box-shadow:0 0 36px #ff7b7b38}.progress-ring{background:conic-gradient(currentColor 0deg,transparent 0);border-radius:999px;position:absolute;inset:6px;-webkit-mask:radial-gradient(circle,#0000 62%,#000 63%);mask:radial-gradient(circle,#0000 62%,#000 63%)}.dot{background:radial-gradient(120% 120%,#ffffff0f,#00000038);border:1px solid #ffffff14;border-radius:16px;place-items:center;width:64px;height:64px;display:grid}.ico.rec{width:24px;height:24px}.ico.rec circle{fill:currentColor}.ico.rec.on circle{fill:#ff4a4a}.story-rec-error{color:#ffeaea;background:linear-gradient(#3c0a0ab3,#280606cc);border:1px solid #ff4a4a59;border-radius:10px;margin-top:6px;padding:6px 10px;font-size:.9rem}.story-rec-hint{color:#e7ffff;background:linear-gradient(#141e2499,#0e161cbf);border:1px solid #00ffe640;border-radius:10px;margin-top:6px;padding:6px 10px;font-size:.9rem}.sr-only{clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;position:absolute!important;overflow:hidden!important}.ico.on{filter:drop-shadow(0 0 10px #ffd16640)}.kv-post-composer{--kv-post-bg:#040910eb;--kv-post-bg-soft:#0b121cf5;--kv-post-border:#94c4ff40;--kv-post-border-soft:#94c4ff1f;--kv-post-ink:#e9f0ff;--kv-post-ink-soft:#b9c7e3;--kv-post-ink-muted:#7f8fb0;--kv-post-accent:#53f6ff;--kv-post-accent-soft:#53f6ff33;--kv-post-danger-bg:#ff5e7a1a;--kv-post-danger-border:#ff5e7acc;--kv-post-danger-text:#ffc6d3;--kv-post-radius-lg:18px;--kv-post-radius-md:12px;--kv-post-radius-sm:8px;--kv-post-shadow-soft:0 18px 45px #00000073;--kv-post-blur:22px;--kv-post-tag-bg:#53f6ff1f;--kv-post-tag-border:#53f6ff8c;--kv-post-tag-text:#dffbff;--kv-post-pill-bg:#ffd7801a;--kv-post-pill-border:#ffd780e6;--kv-post-pill-text:#ffe9b0;--kv-post-legal-bg:#0a1220f5;--kv-post-legal-border:#86bdff42;--kv-post-legal-highlight:#53f6ff29;--kv-post-breath:var(--pulse-dur,5.236s);color:var(--kv-post-ink)}.kv-post-composer,.kv-post-composer *{box-sizing:border-box}.kv-post-header{background:radial-gradient(circle at top left,#53f6ff24,transparent 55%),radial-gradient(circle at bottom right,#b489ff29,transparent 55%),linear-gradient(135deg,var(--kv-post-bg-soft),#05070c 80%);border-radius:var(--kv-post-radius-lg);border:1px solid var(--kv-post-border-soft);box-shadow:var(--kv-post-shadow-soft);-webkit-backdrop-filter:blur(var(--kv-post-blur));padding:14px 16px}.kv-post-step-row{justify-content:space-between;align-items:center;gap:12px;display:flex}.kv-post-step-badge{background:radial-gradient(circle at 0 0,#53f6ff47,#0000 55%),#060c16d9;border:1px solid #53f6ff59;border-radius:999px;align-items:center;gap:8px;padding:4px 10px;display:inline-flex}.kv-post-step-number{color:#05070c;background:radial-gradient(circle at 30% 20%,#fff,#ffd47a 60%);border-radius:999px;justify-content:center;align-items:center;width:22px;height:22px;font-size:.8rem;font-weight:600;display:inline-flex;box-shadow:0 0 0 1px #06060a80}.kv-post-step-label{letter-spacing:.03em;text-transform:uppercase;color:var(--kv-post-ink-soft);font-size:.85rem}.kv-post-reset-btn{letter-spacing:.05em;text-transform:uppercase;color:var(--kv-post-ink-muted);cursor:pointer;background:#05080db3;border:1px solid #ffffff14;border-radius:999px;padding:4px 10px;font-size:.75rem;transition:background .16s ease-out,border-color .16s ease-out,color .16s ease-out,transform .12s ease-out}.kv-post-reset-btn:hover{color:var(--kv-post-ink);border-color:#53f6ffb3;transform:translateY(-1px)}.kv-post-reset-btn:active{transform:translateY(0)}.kv-post-subtitle{color:var(--kv-post-ink-muted);margin:6px 0 0;font-size:.85rem;line-height:1.4}.kv-post-kind-row{flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;display:flex}.kv-post-kind-label{text-transform:uppercase;letter-spacing:.08em;color:var(--kv-post-ink-muted);font-size:.78rem}.kv-post-kind-select{min-width:180px;max-width:100%;color:var(--kv-post-ink-soft);appearance:none;background-color:#050910e6;background-image:linear-gradient(135deg,#ffffff2e,#fff0),radial-gradient(circle at 90%,#ffffff1f,#0000);background-position:0 0,100%;background-repeat:no-repeat;background-size:100% 100%,18px 18px;background-attachment:scroll,scroll;background-origin:padding-box,padding-box;background-clip:border-box,border-box;border:1px solid #99c9ff80;border-radius:999px;outline:none;padding:6px 26px 6px 10px;font-size:.8rem;position:relative}.kv-post-kind-select:focus-visible{border-color:#53f6fff2;box-shadow:0 0 0 1px #53f6ffb3}.kv-post-error{border-radius:var(--kv-post-radius-md);background:var(--kv-post-danger-bg);border:1px solid var(--kv-post-danger-border);color:var(--kv-post-danger-text);margin-top:8px;padding:8px 12px;font-size:.8rem}.kv-post-dropzone{border-radius:var(--kv-post-radius-lg);border:1px dashed var(--kv-post-border);background:radial-gradient(circle at 10% 0%,var(--kv-post-accent-soft),transparent 60%),radial-gradient(circle at 90% 100%,#b489ff38,transparent 60%),linear-gradient(135deg,#060b13e6,#03060ce6);cursor:pointer;outline:none;padding:18px;transition:border-color .18s ease-out,box-shadow .18s ease-out,background .22s ease-out,transform .16s ease-out;position:relative}@keyframes kv-post-breath{0%{box-shadow:0 0 #53f6ff24,0 18px 40px #000c}to{box-shadow:0 0 0 10px #53f6ff00,0 24px 55px #000000f2}}.kv-post-dropzone:not(.kv-post-dropzone--has-media){animation:kv-post-breath var(--kv-post-breath)ease-in-out infinite alternate}@media (prefers-reduced-motion:reduce){.kv-post-dropzone{animation:none!important}}.kv-post-dropzone--dragging{border-style:solid;border-color:var(--kv-post-accent);transform:translateY(-1px);box-shadow:0 0 0 1px #53f6ff80,0 18px 46px #000000e6}.kv-post-dropzone--has-media{border-style:solid;border-color:#53f6ff99}.kv-post-dropzone-inner{align-items:center;gap:14px;display:flex}.kv-post-dropzone-icon{color:#020308;background:radial-gradient(circle at 30% 20%,#fff,#b8e6ff 65%);border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:1.4rem;display:flex;box-shadow:0 0 0 1px #04060ccc,0 12px 30px #000000b3}.kv-post-dropzone-text{flex-direction:column;gap:2px;min-width:0;display:flex}.kv-post-dropzone-title{color:var(--kv-post-ink);white-space:nowrap;text-overflow:ellipsis;font-size:.95rem;font-weight:500;overflow:hidden}.kv-post-dropzone-hint{color:var(--kv-post-ink-muted);font-size:.8rem}.kv-post-dropzone-meta{color:#8fa7d2e6;margin-top:4px;font-size:.75rem}.kv-post-dropzone:focus-visible{box-shadow:0 0 #53f6ff29,0 0 0 2px #53f6ffe6}.kv-post-body{border-radius:var(--kv-post-radius-lg);box-shadow:var(--kv-post-shadow-soft);background:linear-gradient(135deg,#0c1523f5,#04070dfa);border:1px solid #96cdff33;padding:14px 16px 16px}.kv-post-preview{border-radius:var(--kv-post-radius-md);background:radial-gradient(circle at 50% 0,#283145,#05070c 70%);border:1px solid #aad2ff38;margin-bottom:12px;overflow:hidden}.kv-post-preview-media{object-fit:contain;width:100%;height:auto;max-height:min(420px,72vh);display:block}.kv-post-attachments{border-radius:var(--kv-post-radius-md);background:radial-gradient(circle at 0 0,#53f6ff0f,#0000 55%),#050910f5;border:1px solid #8fbeff40;margin-top:4px;padding:8px 10px 10px}.kv-post-attachments-header{justify-content:space-between;align-items:center;gap:8px;display:flex}.kv-post-attachments-title{letter-spacing:.08em;text-transform:uppercase;color:var(--kv-post-ink-soft);font-size:.82rem;font-weight:600}.kv-post-attachments-summary{color:var(--kv-post-ink-muted);white-space:nowrap;font-size:.75rem}.kv-post-attachments-list{scrollbar-width:thin;max-height:220px;margin:8px 0 0;padding:0;list-style:none;overflow-y:auto}.kv-post-attachments-list::-webkit-scrollbar{width:6px}.kv-post-attachments-list::-webkit-scrollbar-track{background:#0509104d}.kv-post-attachments-list::-webkit-scrollbar-thumb{background:#8fbeff99;border-radius:999px}.kv-post-attachment-item{border-radius:var(--kv-post-radius-sm);background:radial-gradient(circle at 0 0,#53f6ff08,#0000 60%),#04070dd9;border:1px solid #699de633;justify-content:space-between;align-items:flex-start;gap:10px;padding:6px;display:flex}.kv-post-attachment-item+.kv-post-attachment-item{margin-top:6px}.kv-post-attachment-item--primary{border-color:var(--kv-post-pill-border);background:radial-gradient(circle at 0 0,#ffd7802e,#0000 60%),#060a12f2}.kv-post-attachment-main{flex-direction:column;gap:2px;min-width:0;display:flex}.kv-post-attachment-name{color:var(--kv-post-ink-soft);white-space:nowrap;text-overflow:ellipsis;font-size:.83rem;font-weight:500;overflow:hidden}.kv-post-attachment-meta{color:var(--kv-post-ink-muted);flex-wrap:wrap;align-items:center;gap:6px;font-size:.75rem;display:flex}.kv-post-attachment-pill{border:1px solid var(--kv-post-pill-border);background:var(--kv-post-pill-bg);color:var(--kv-post-pill-text);text-transform:uppercase;letter-spacing:.08em;border-radius:999px;padding:2px 8px;font-size:.7rem}.kv-post-attachment-actions{flex-direction:column;flex-shrink:0;gap:4px;display:flex}.kv-post-attachment-btn{color:var(--kv-post-ink-soft);cursor:pointer;text-transform:uppercase;letter-spacing:.08em;white-space:nowrap;background:#04070ce6;border:1px solid #91c3ff99;border-radius:999px;padding:2px 10px;font-size:.72rem;transition:background .14s ease-out,border-color .14s ease-out,transform .1s ease-out}.kv-post-attachment-btn:hover{background:#0a121ef2;border-color:#53f6ffcc;transform:translateY(-.5px)}.kv-post-attachment-btn:active{transform:translateY(0)}.kv-post-attachment-btn--danger{color:#ffd7e0;border-color:#ff8298d9}.kv-post-meta{flex-direction:column;gap:2px;margin-top:8px;display:flex}.kv-post-meta-name{color:var(--kv-post-ink-soft);white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;font-weight:500;overflow:hidden}.kv-post-meta-details{color:var(--kv-post-ink-muted);align-items:center;gap:6px;font-size:.78rem;display:flex}.kv-post-meta-dot{opacity:.6}.kv-post-caption-block{margin-top:14px}.kv-post-caption-label{color:var(--kv-post-ink-soft);margin-bottom:4px;font-size:.8rem;display:block}.kv-post-caption-textarea{resize:vertical;border-radius:var(--kv-post-radius-md);width:100%;min-height:80px;color:var(--kv-post-ink);background:radial-gradient(circle at 0 0,#53f6ff17,#0000 55%),#03060ce6;border:1px solid #97c0ff42;outline:none;padding:8px 10px;font-size:.85rem;transition:border-color .16s ease-out,box-shadow .16s ease-out,background .18s ease-out}.kv-post-caption-textarea::placeholder{color:#91a5cdb3}.kv-post-caption-textarea:focus-visible{border-color:#53f6ffe6;box-shadow:0 0 0 1px #53f6ff99}.kv-post-caption-footer{justify-content:flex-end;margin-top:4px;display:flex}.kv-post-caption-count{color:var(--kv-post-ink-muted);font-size:.75rem}.kv-post-link-block{margin-top:16px}.kv-post-link-label{color:var(--kv-post-ink-soft);margin-bottom:4px;font-size:.8rem;display:block}.kv-post-link-input{border-radius:var(--kv-post-radius-md);width:100%;color:var(--kv-post-ink);background:radial-gradient(circle at 0 0,#53f6ff12,#0000 55%),#03060cf5;border:1px solid #97c0ff52;outline:none;padding:7px 10px;font-size:.82rem;transition:border-color .14s ease-out,box-shadow .14s ease-out}.kv-post-link-input::placeholder{color:#91a5cdb3}.kv-post-link-input:focus-visible{border-color:#53f6ffe6;box-shadow:0 0 0 1px #53f6ff99}.kv-post-link-hint{color:var(--kv-post-ink-muted);margin-top:4px;font-size:.75rem}.kv-post-legal-block{border-radius:var(--kv-post-radius-lg);border:1px solid var(--kv-post-legal-border);background:radial-gradient(circle at 0% 0%,var(--kv-post-legal-highlight),transparent 60%),var(--kv-post-legal-bg);margin-top:18px;padding:12px 12px 10px}.kv-post-legal-header{letter-spacing:.08em;text-transform:uppercase;color:var(--kv-post-ink-soft);margin-bottom:8px;font-size:.8rem;font-weight:600}.kv-post-legal-grid{grid-template-columns:minmax(0,1fr);gap:10px;display:grid}.kv-post-legal-field{flex-direction:column;gap:4px;display:flex}.kv-post-legal-label{color:var(--kv-post-ink-soft);font-size:.78rem}.kv-post-legal-required{color:#ffd166;margin-left:2px}.kv-post-legal-input{border-radius:var(--kv-post-radius-md);width:100%;color:var(--kv-post-ink);background:#050910e6;border:1px solid #8fbeff80;outline:none;padding:6px 9px;font-size:.8rem;transition:border-color .14s ease-out,box-shadow .14s ease-out,background .16s ease-out}.kv-post-legal-input::placeholder{color:#91a5cdbf}.kv-post-legal-input:focus-visible{background:#04080ffa;border-color:#53f6ffe6;box-shadow:0 0 0 1px #53f6ff99}.kv-post-legal-flags{flex-direction:column;gap:4px;margin-top:8px;display:flex}.kv-post-legal-flag{color:var(--kv-post-ink-muted);align-items:center;gap:6px;font-size:.78rem;display:inline-flex}.kv-post-legal-flag input[type=checkbox]{accent-color:#53f6ff;background:#04070de6;border:1px solid #8fbeffb3;border-radius:3px;width:14px;height:14px}.kv-post-legal-hint{color:#9ebde6f2;font-size:.74rem;line-height:1.4}.kv-post-actions{margin-bottom:2px}.kv-post-submit-btn{letter-spacing:.06em;text-transform:uppercase;cursor:pointer;color:#020308;transform-origin:50%;background:radial-gradient(circle at 30% 0,#fff,#ffe7a1 40%,#ffd166 70%);border:none;border-radius:999px;padding:8px 18px;font-size:.9rem;font-weight:500;transition:transform .12s ease-out,box-shadow .16s ease-out,filter .16s ease-out,opacity .16s ease-out;box-shadow:0 0 0 1px #05050ae6,0 18px 40px #000000d9}.kv-post-submit-btn:hover:not(:disabled){filter:brightness(1.03);transform:translateY(-1px);box-shadow:0 0 0 1px #05050af2,0 24px 52px #000000e6}.kv-post-submit-btn:active:not(:disabled){transform:translateY(0);box-shadow:0 0 0 1px #05050a,0 16px 36px #000c}.kv-post-submit-btn:disabled{opacity:.6;cursor:default;box-shadow:0 0 0 1px #05050ae6,0 10px 24px #000000b3}.kv-post-file-input{display:none}@media (max-width:640px){.kv-post-composer{padding-inline:1rem!important}.kv-post-header,.kv-post-body{padding-inline:12px}.kv-post-dropzone{padding:14px}.kv-post-dropzone-inner{gap:10px}.kv-post-dropzone-title{font-size:.9rem}.kv-post-subtitle{font-size:.8rem}.kv-post-kind-row{flex-direction:row;align-items:center}.kv-post-kind-select{flex:auto}.kv-post-attachment-actions{flex-direction:row;justify-content:flex-end}.kv-post-legal-grid{grid-template-columns:minmax(0,1fr)}}@media (min-width:641px){.kv-post-legal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.kv-breath-root{--kv-breath-pulse:5.236s;--kv-breath-radius:7.5rem;--kv-breath-bg:radial-gradient(circle at 10% 0%,#061322 0,#02060a 46%,#020309 100%);--kv-breath-ink:#ecf1fb;--kv-breath-ink-soft:#a8b6ce;--kv-breath-muted:#8090a8;--kv-breath-accent:#5ce1ff;--kv-breath-accent-soft:#2bd4ff;--kv-breath-accent-2:#a78bfa;--kv-breath-accent-3:#ffd27f;--kv-breath-card-bg:#081020db;--kv-breath-border:#a3daff38;--kv-breath-border-soft:#78a0d273;--kv-breath-orb-shadow:0 0 30px #5ce1ff8c,0 0 80px #a78bfa4d;--kv-breath-btn-primary-bg:linear-gradient(135deg,#2bd4ff,#ffd27f);--kv-breath-btn-primary-border:#c8f0ff80;--kv-breath-btn-warning-bg:linear-gradient(135deg,#f97373,#fb923c);--kv-breath-btn-ghost-bg:#0b1224e6;--kv-breath-btn-ghost-border:#8296b999;--kv-breath-bar-bg:#050a12e6;--kv-breath-bar-inhale:linear-gradient(90deg,#5ce1ff,#a78bfa);--kv-breath-bar-exhale:linear-gradient(90deg,#ffd27f,#ff8c9b);--kv-breath-ring-track:#20365299;--kv-breath-ring-glow:#5ce1ffb3;color:var(--kv-breath-ink);background:unset;background:radial-gradient(circle at 15% 0%,#5ce1ff30 0,transparent 40%),radial-gradient(circle at 85% 100%,#a78bfa29 0,transparent 45%),var(--kv-breath-card-bg);border:1px solid var(--kv-breath-border);-webkit-backdrop-filter:blur(22px)saturate(140%);border-radius:1.5rem;flex-direction:column;gap:1.75rem;width:100%;max-width:40rem;margin:0 auto;padding:1.5rem 1.25rem 1.75rem;display:flex;box-shadow:0 28px 90px #020617e6,0 0 0 1px #78b4ff26}.kv-breath-meta{justify-content:space-between;align-items:center;gap:.75rem;font-size:.8rem;display:flex}.kv-breath-meta-left{flex-direction:column;gap:.25rem;min-width:0;display:flex}.kv-breath-meta-right{align-items:center;gap:.5rem;display:flex}.kv-breath-pill{color:var(--kv-breath-ink-soft);letter-spacing:.015em;background:radial-gradient(circle at 0 0,#5ce1ff40,#0000 55%);border:1px solid #a6e6ff66;border-radius:999px;align-items:center;gap:.35rem;padding:.15rem .75rem;font-weight:500;display:inline-flex}.kv-breath-file{max-width:100%;color:var(--kv-breath-muted);white-space:nowrap;text-overflow:ellipsis;display:inline-block;overflow:hidden}.kv-breath-tag{color:#caebffe6;letter-spacing:.06em;text-transform:uppercase;background:radial-gradient(circle at 0,#2fd4ff4d,#0000 70%);border:1px solid #52d4ff99;border-radius:999px;padding:.18rem .6rem;font-size:.7rem}.kv-breath-orb-row{grid-template-columns:minmax(0,auto) minmax(0,1fr);align-items:center;gap:1.75rem;display:grid}@media (max-width:640px){.kv-breath-orb-row{grid-template-columns:minmax(0,1fr);justify-items:center}}.kv-breath-orb{width:var(--kv-breath-radius);height:var(--kv-breath-radius);justify-content:center;align-items:center;display:flex;position:relative}.kv-breath-orb-inner{width:74%;height:74%;box-shadow:var(--kv-breath-orb-shadow);background:radial-gradient(circle at 30% 20%,#ffffffe6 0,#0000 55%),radial-gradient(circle at 80% 90%,#5ce1ffbf 0,#0000 60%),radial-gradient(circle at 0 100%,#a78bfaa6 0,#0000 60%),radial-gradient(circle,#050c1cd9 0,#030712 80%);border-radius:999px;justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.kv-breath-orb-emoji{filter:drop-shadow(0 0 12px #fff3);font-size:1.95rem}.kv-breath-root[data-phase=inhale] .kv-breath-orb-inner{animation:kv-breath-inhale var(--kv-breath-pulse)ease-in-out infinite}.kv-breath-root[data-phase=exhale] .kv-breath-orb-inner{animation:kv-breath-exhale var(--kv-breath-pulse)ease-in-out infinite}.kv-breath-root[data-phase=idle] .kv-breath-orb-inner,.kv-breath-root[data-phase=sealed] .kv-breath-orb-inner{animation:6s ease-in-out infinite kv-breath-rest}.kv-breath-orb-ring{-webkit-mask-composite:xor;pointer-events:none;background:radial-gradient(circle at 50% 0,#5ce1ff47,#0000 60%),radial-gradient(circle at 0 100%,#a78bfa38,#0000 65%);border-radius:999px;padding:3px;position:absolute;inset:0;-webkit-mask-image:radial-gradient(farthest-side,#0000 calc(100% - 3px),#000 calc(100% - 1px)),radial-gradient(farthest-side,#000 0 100%);-webkit-mask-position:0 0,0 0;-webkit-mask-size:auto,auto;-webkit-mask-repeat:repeat,repeat;-webkit-mask-clip:border-box,border-box;-webkit-mask-origin:border-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-source-type:auto,auto;mask-mode:match-source,match-source}.kv-breath-orb-ring:after{content:"";background:conic-gradient(from -90deg,var(--kv-breath-ring-glow)0,var(--kv-breath-ring-glow)calc(var(--kv-breath-progress,0)*1turn),transparent calc(var(--kv-breath-progress,0)*1turn),transparent 1turn);opacity:.9;mix-blend-mode:screen;border-radius:999px;transition:opacity .22s ease-out;position:absolute;inset:1px}.kv-breath-root[data-phase=idle] .kv-breath-orb-ring:after{opacity:.45}.kv-breath-root[data-phase=sealed] .kv-breath-orb-ring:after{background:conic-gradient(from -90deg,var(--kv-breath-ring-glow)0,#ffd27ff2 .9turn,#ffefbffa 1turn)}.kv-breath-status{flex-direction:column;gap:.75rem;display:flex}.kv-breath-status-row{justify-content:space-between;align-items:baseline;gap:.75rem;display:flex}.kv-breath-status-label{letter-spacing:.04em;text-transform:uppercase;color:var(--kv-breath-ink-soft);font-size:.9rem;font-weight:600}.kv-breath-status-percent{font-variant-numeric:tabular-nums;color:#c1e2ffe0;font-size:.95rem}.kv-breath-status-text{color:var(--kv-breath-muted);font-size:.82rem;line-height:1.45}.kv-breath-bars{flex-direction:column;gap:.45rem;margin-top:.25rem;display:flex}.kv-breath-bar{flex-direction:column;gap:.2rem;display:flex}.kv-breath-bar-label{text-transform:uppercase;letter-spacing:.09em;color:#a9c0dae6;font-size:.75rem}.kv-breath-bar-track{background:var(--kv-breath-bar-bg);border-radius:999px;width:100%;height:.4rem;position:relative;overflow:hidden}.kv-breath-bar-fill{border-radius:inherit;width:0;transition:width .18s ease-out;position:absolute;inset:0}.kv-breath-bar-fill--inhale{background:var(--kv-breath-bar-inhale);box-shadow:0 0 12px #5ce1ff80}.kv-breath-bar-fill--exhale{background:var(--kv-breath-bar-exhale);box-shadow:0 0 12px #ffc78499}.kv-breath-actions{justify-content:flex-end;align-items:center;gap:.75rem;margin-top:.5rem;display:flex}.kv-breath-btn{letter-spacing:.08em;text-transform:uppercase;cursor:pointer;white-space:nowrap;border-style:solid;border-width:1px;border-radius:999px;justify-content:center;align-items:center;padding:.6rem 1.3rem;font-size:.8rem;font-weight:600;transition:transform .13s ease-out,box-shadow .13s ease-out,background .18s ease-out,border-color .18s ease-out,color .18s ease-out;display:inline-flex;position:relative}.kv-breath-btn:disabled{opacity:.4;cursor:default;box-shadow:none;transform:none}.kv-breath-btn-primary{background:var(--kv-breath-btn-primary-bg);border-color:var(--kv-breath-btn-primary-border);color:#050914;box-shadow:0 12px 40px #04bfff66}.kv-breath-btn-primary:hover:not(:disabled){transform:translateY(-1px)scale(1.015);box-shadow:0 16px 44px #04bfff80}.kv-breath-btn-primary:active:not(:disabled){transform:translateY(0)scale(.99);box-shadow:0 8px 26px #04bfff73}.kv-breath-btn-warning{background:var(--kv-breath-btn-warning-bg);color:#1b0505;border-color:#fecacab3;box-shadow:0 12px 40px #f8717173}.kv-breath-btn-warning:hover:not(:disabled){transform:translateY(-1px)scale(1.01)}.kv-breath-btn-ghost{background:var(--kv-breath-btn-ghost-bg);border-color:var(--kv-breath-btn-ghost-border);color:#d4e0f6e6}.kv-breath-btn-ghost:disabled{opacity:.65}.kv-breath-sealed-note{color:#e9faffe6;background:radial-gradient(circle at 0,#ffd27f2e,#0000 65%);border:1px solid #ffedd58c;border-radius:999px;margin-left:auto;padding:.35rem .75rem;font-size:.78rem}.kv-breath-root[data-phase=inhale] .kv-breath-orb-inner{box-shadow:0 0 30px #5ce1ffb3,0 0 80px #5ce1ff73}.kv-breath-root[data-phase=exhale] .kv-breath-orb-inner{box-shadow:0 0 26px #ffd27fb8,0 0 70px #ffd27f80}.kv-breath-root[data-phase=sealed] .kv-breath-orb-inner{box-shadow:0 0 20px #a7f3d0e6,0 0 90px #2dd4bfb3}.kv-breath-root[data-phase=idle] .kv-breath-status-label,.kv-breath-root[data-phase=idle] .kv-breath-status-text{transition:color .18s ease-out}.kv-breath-root[data-phase=idle][data-error=true] .kv-breath-status-label,.kv-breath-root[data-phase=idle][data-error=true] .kv-breath-status-text{color:#fecaca}@media (prefers-reduced-motion:reduce){.kv-breath-orb-inner,.kv-breath-orb-ring:after{transition:none!important;animation:none!important}.kv-breath-bar-fill,.kv-breath-btn{transition:none!important}}@keyframes kv-breath-inhale{0%{transform:scale(.96)}50%{transform:scale(1.05)}to{transform:scale(1.02)}}@keyframes kv-breath-exhale{0%{transform:scale(1.02)}50%{transform:scale(.96)}to{transform:scale(.98)}}@keyframes kv-breath-rest{0%,to{transform:scale(1)}50%{transform:scale(1.015)}}.kv-social-connector{--kv-phi:1.61803;--kv-bg:#060a12eb;--kv-bg-soft:#0a101bf0;--kv-border:#7af0ff73;--kv-border-soft:#7af0ff2e;--kv-ink:#e9f6ff;--kv-ink-soft:#a9c6dd;--kv-ink-muted:#7f94af;--kv-gold:#ffd88a;--kv-gold-soft:#ffd88a52;--kv-cyan:#5af2ff;--kv-cyan-soft:#5af2ff4d;--kv-iris:#a78bfa;--kv-iris-soft:#a78bfa59;--kv-radius-lg:22px;--kv-radius-md:14px;--kv-radius-pill:999px;--kv-blur:28px;--kv-shadow-soft:0 24px 90px #000000b3;--kv-pulse-dur:var(--pulse-dur,5.236s);--kv-gap:1.25rem;--kv-gap-tight:.618rem;--kv-gap-wide:1.618rem;box-sizing:border-box;width:100%;max-width:960px;padding:max(1.25rem,env(safe-area-inset-top,0px))clamp(1rem,1.25rem + .5vw,1.75rem)max(1.5rem,env(safe-area-inset-bottom,0px));border-radius:var(--kv-radius-lg);color:var(--kv-ink);border:1px solid var(--kv-border-soft);box-shadow:var(--kv-shadow-soft);background:radial-gradient(circle at 0 0,#5af2ff26,#0000 55%),radial-gradient(circle at 100% 100%,#a78bfa2e,#0000 55%),linear-gradient(135deg,#060a12f5,#080d18f5);margin:0 auto;position:relative;overflow:hidden}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.kv-social-connector{-webkit-backdrop-filter:blur(var(--kv-blur));backdrop-filter:blur(var(--kv-blur))}}.kv-social-connector:before{content:"";border-radius:inherit;pointer-events:none;opacity:.18;mix-blend-mode:screen;z-index:-1;transform-origin:50%;animation:kv-social-breathe var(--kv-pulse-dur)ease-in-out infinite;background:conic-gradient(from 180deg,#5af2ff59,#a78bfa59,#ffd88a73,#5af2ff59);position:absolute;inset:-2px}@keyframes kv-social-breathe{0%,to{opacity:.16;transform:scale(1)}50%{opacity:.28;transform:scale(1.02)}}@media (prefers-reduced-motion:reduce){.kv-social-connector:before{animation:none}}.kv-social-header{margin-bottom:var(--kv-gap-wide);flex-direction:column;gap:.5rem;display:flex}.kv-social-title{letter-spacing:.08em;text-transform:uppercase;color:var(--kv-ink);text-shadow:0 0 16px #000000b3;margin:0;font-size:clamp(1.25rem,1.1rem + .5vw,1.6rem);font-weight:600}.kv-social-subtitle{color:var(--kv-ink-soft);max-width:40rem;margin:0;font-size:.9rem;line-height:1.5}.kv-social-proof{gap:var(--kv-gap);margin-bottom:var(--kv-gap-wide);grid-template-columns:minmax(0,2fr) minmax(0,1.3fr);display:grid}@media (max-width:768px){.kv-social-proof{grid-template-columns:minmax(0,1fr)}}.kv-social-proof-block{background:linear-gradient(140deg,#5af2ff1f,#a78bfa14),linear-gradient(145deg,var(--kv-bg-soft),#060a12fa);border-radius:var(--kv-radius-md);padding:var(--kv-gap);border:1px solid #a3deff57;position:relative;overflow:hidden;box-shadow:0 14px 40px #0000008c}.kv-social-proof-block:after{content:"";opacity:.4;pointer-events:none;background:radial-gradient(circle at 90% 0,#ffd88a40,#0000 48%);position:absolute;inset:0}.kv-proof-label{text-transform:uppercase;letter-spacing:.14em;color:var(--kv-ink-muted);margin-bottom:.5rem;font-size:.8rem}.kv-proof-caption{color:var(--kv-ink);white-space:pre-wrap;background:#050910e6;border:1px solid #5af2ff40;border-radius:.85rem;max-height:14rem;margin:0;padding:.85rem .9rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.82rem;line-height:1.5;overflow:auto}.kv-social-proof-meta{border-radius:var(--kv-radius-md);padding:var(--kv-gap);gap:var(--kv-gap-tight);background:linear-gradient(150deg,#a78bfa1f,#5af2ff0f),linear-gradient(145deg,#080e18f5,#050910fa);border:1px solid #92ceff61;flex-direction:column;display:flex;position:relative;overflow:hidden}.kv-social-proof-meta:before{content:"";mix-blend-mode:screen;opacity:.45;pointer-events:none;background:radial-gradient(circle at 10% 100%,#a78bfa42,#0000 55%);position:absolute;inset:0}.kv-proof-meta-row{background:linear-gradient(90deg,#0b121ed9,#0a0e18f2);border:1px solid #85ccff3d;border-radius:999px;justify-content:space-between;align-items:center;gap:.75rem;padding:.5rem .75rem;display:flex;position:relative}.kv-proof-meta-label{text-transform:uppercase;letter-spacing:.16em;color:var(--kv-ink-muted);font-size:.78rem}.kv-proof-meta-value{color:var(--kv-gold);text-align:right;overflow-wrap:anywhere;font-size:.86rem;font-weight:500}.kv-social-actions{gap:var(--kv-gap);margin-top:var(--kv-gap-wide);flex-direction:column;display:flex}.kv-social-row{flex-wrap:wrap;gap:.75rem;display:flex}.kv-social-row--primary{justify-content:space-between}.kv-social-row--grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;display:grid}.kv-social-row--secondary{justify-content:flex-start}@media (max-width:768px){.kv-social-row--primary{flex-direction:column;align-items:stretch}.kv-social-row--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:480px){.kv-social-row--grid{grid-template-columns:minmax(0,1fr)}}.kv-btn{--kv-btn-bg:#0d1424fa;--kv-btn-border:#7af0ff8c;--kv-btn-text:var(--kv-ink);--kv-btn-shadow:0 14px 36px #000000a6;appearance:none;border-radius:var(--kv-radius-pill);border:1px solid var(--kv-btn-border);letter-spacing:.06em;text-transform:uppercase;background:radial-gradient(circle at 0% 0%,#5af2ff47,transparent 55%),linear-gradient(135deg,var(--kv-btn-bg),#080d1afa);color:var(--kv-btn-text);cursor:pointer;box-shadow:var(--kv-btn-shadow);justify-content:center;align-items:center;gap:.4rem;padding:.65rem 1.35rem;font-size:.9rem;font-weight:500;transition:transform .14s ease-out,box-shadow .14s ease-out,background .18s ease-out,border-color .18s ease-out;display:inline-flex;position:relative;overflow:hidden}.kv-btn:after{content:"";mix-blend-mode:screen;opacity:0;background:radial-gradient(circle at 12% 0,#ffffff26,#0000 60%);transition:opacity .18s ease-out;position:absolute;inset:0}.kv-btn:hover{border-color:#ffd88ac2;transform:translateY(-1px);box-shadow:0 18px 48px #000000bf}.kv-btn:hover:after{opacity:1}.kv-btn:active{transform:translateY(0);box-shadow:0 10px 26px #000000b3}.kv-btn:focus-visible{outline:2px solid #0000;box-shadow:0 0 0 1px #000000e6,0 0 0 2px #5af2ffe6,0 18px 48px #000c}.kv-btn-primary{--kv-btn-bg:#091323fa;--kv-btn-border:#5af2ffe6;--kv-btn-text:#041118;color:#041118;background:linear-gradient(135deg,#5af2ff,#ffd88a)}.kv-btn-ghost{--kv-btn-bg:#04080f99;--kv-btn-border:#7af0ff66;--kv-btn-text:var(--kv-ink-soft);box-shadow:0 10px 30px #000000a6}.kv-btn-outline{--kv-btn-bg:#04080f33;--kv-btn-border:#a78bfabf;--kv-btn-text:var(--kv-ink-soft);background:linear-gradient(135deg,#04080fa6,#04080ff2);box-shadow:0 8px 24px #0009}.kv-btn-chip{--kv-btn-bg:#0b121ef2;--kv-btn-border:#85ccffb3;--kv-btn-text:var(--kv-ink-soft);text-transform:none;letter-spacing:.04em;padding-block:.55rem;padding-inline:1.05rem;font-size:.82rem}.kv-social-status{color:var(--kv-ink-muted);border-radius:var(--kv-radius-md);background:linear-gradient(90deg,#040a12e6,#080e1af2);border:1px solid #7af0ff40;margin-top:.75rem;padding:.6rem .85rem;font-size:.82rem;line-height:1.4;box-shadow:0 10px 30px #00000094}.kv-social-connector *,.kv-social-connector :before,.kv-social-connector :after{box-sizing:border-box}.kv-share-shell{--phi:1.61803;--phi-small:1.27202;--pulse-dur:var(--kai-pulse,5.236s);--kv-bg:#040910f5;--kv-bg-soft:#09101cf5;--kv-border:#b4d2ff29;--kv-border-strong:#a0deff80;--kv-ink:#eef4ff;--kv-ink-soft:#c1cbe3;--kv-ink-muted:#8c9bb8;--kv-gold:#ffd89b;--kv-gold-strong:#ffe7aa;--kv-cyan:#5df5ff;--kv-violet:#a58bff;--kv-emerald:#34e5a5;--kv-danger:#ff6b81;color:var(--kv-ink);border-radius:calc(18px*var(--phi-small));padding:calc(1.25rem*var(--phi-small));border:1px solid var(--kv-border);background:radial-gradient(circle at 0 0,#0b1423 0,#02050a 52%,#000 100%);position:relative;overflow:hidden;box-shadow:0 0 0 1px #5df5ff0a,0 24px 60px #000000bf,0 0 60px #5ce1ff40}.kv-share-shell:before,.kv-share-shell:after{content:"";pointer-events:none;mix-blend-mode:screen;opacity:.22;filter:blur(26px);z-index:-1;background:radial-gradient(circle at 10% 0,#5df5ff80 0,#0000 50%),radial-gradient(circle at 100% 100%,#a58bff80 0,#0000 55%);position:absolute;inset:-25%}.kv-share-shell:after{opacity:.35;animation:kv-aurora var(--pulse-dur)ease-in-out infinite alternate;background:radial-gradient(circle at 20% 80%,#34e5a58c 0,#0000 50%),radial-gradient(circle at 90% 10%,#ffd89b99 0,#0000 55%)}.kv-share-shell{animation:kv-shell-breath var(--pulse-dur)ease-in-out infinite}.kv-share-header{border-bottom:1px solid #b4d2ff29;flex-direction:column;gap:.4rem;margin-bottom:.9rem;padding-bottom:.9rem;display:flex}.kv-share-title{letter-spacing:.06em;text-transform:uppercase;align-items:center;gap:.5rem;font-size:clamp(1.1rem,1rem + .2vw,1.25rem);font-weight:600;display:inline-flex}.kv-share-title:before{content:"🌀";filter:drop-shadow(0 0 8px #5df5ffcc);font-size:.95em}.kv-share-subtitle{color:var(--kv-ink-muted);max-width:42rem;font-size:.85rem;line-height:1.5}.kv-share-broadcast{border-radius:calc(14px*var(--phi-small));background:radial-gradient(circle at 0 0,#091b30f2,#030711fa);border:1px solid #67a8ff42;padding:.9rem;position:relative;box-shadow:0 0 0 1px #5df5ff0f}.kv-share-broadcast:before{content:"";border-radius:inherit;pointer-events:none;opacity:.8;mix-blend-mode:screen;background:radial-gradient(circle at 50% 0,#5df5ff14,#0000 60%);position:absolute;inset:0}.kv-share-empty{color:var(--kv-ink-muted);background:#06111ee6;border:1px dashed #768cb499;border-radius:12px;padding:.85rem 1rem;font-size:.9rem;line-height:1.5}.kv-share-connected-label{text-transform:uppercase;letter-spacing:.14em;color:var(--kv-ink-soft);align-items:center;gap:.45rem;margin-bottom:.6rem;font-size:.75rem;display:inline-flex}.kv-share-connected-label:before{content:"";background:linear-gradient(90deg,#5df5ff4d,#a58bff1a,#5df5ff00);width:20px;height:1px}.kv-share-broadcast label{position:relative;overflow:hidden}.kv-share-broadcast label:before{content:"";opacity:0;z-index:-1;background:radial-gradient(circle at 0 0,#5df5ff2e,#0000 60%),radial-gradient(circle at 100% 100%,#34e5a52e,#0000 60%);transition:opacity .22s ease-out;position:absolute;inset:-40%}.kv-share-broadcast label:hover:before{opacity:.9}.kv-share-broadcast input[type=checkbox]{border-radius:.35rem;width:1rem;height:1rem}.kv-btn{--btn-radius:999px;--btn-pad-y:.55rem;--btn-pad-x:1.15rem;padding:var(--btn-pad-y)var(--btn-pad-x);border-radius:var(--btn-radius);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #0000;justify-content:center;align-items:center;gap:.4rem;font-size:.9rem;font-weight:500;transition:transform .16s ease-out,box-shadow .16s ease-out,border-color .16s ease-out,background .16s ease-out,color .16s ease-out,opacity 80ms ease-out;display:inline-flex;position:relative}.kv-btn-primary{color:#020609;background:radial-gradient(circle at 0 0,#5df5ff 0,#34e5a5 40%,#ffd89b 100%);border-color:#ffffff38;box-shadow:0 0 0 1px #000000b3,0 12px 35px #5df5ff4d,0 0 35px #ffd89b4d}.kv-btn-primary:hover:not(.kv-btn-disabled){transform:translateY(-1px)scale(1.015);box-shadow:0 0 0 1px #000000b3,0 16px 40px #5df5ff66,0 0 42px #ffd89b66}.kv-btn-primary:active:not(.kv-btn-disabled){transform:translateY(0)scale(.99);box-shadow:0 0 0 1px #000000d9,0 6px 24px #5df5ff33}.kv-btn-disabled,.kv-btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;color:var(--kv-ink-muted);background:radial-gradient(circle at 0 0,#3a4a57 0,#1c2430 70%);border-color:#8c97ac73}.kv-share-results{background:linear-gradient(135deg,#0a1526f2,#081221fa,#0a1628fa);border:1px solid #5df5ff4d;border-radius:12px;margin-top:.8rem;padding:.75rem .9rem;box-shadow:0 0 0 1px #5df5ff29}.kv-share-results h3{color:var(--kv-ink-soft)}.kv-share-results a{color:var(--kv-cyan);text-underline-offset:2px;text-decoration-thickness:1px}.kv-share-results a:hover{text-decoration-thickness:2px}.kv-share-status{color:var(--kv-ink-soft)}.kv-share-error{color:var(--kv-danger)}.kv-share-manual{background:radial-gradient(circle at 100% 0,#a58bff2e,#0000 55%),radial-gradient(circle at 0 100%,#5df5ff1a,#0000 55%);border:1px dashed #a58bff73;border-radius:12px;margin-top:.4rem;padding:.85rem .9rem}.kv-share-footer{border-top:1px solid #b4d2ff29;margin-top:.4rem;padding-top:.9rem}@keyframes kv-shell-breath{0%{transform:translateY(0)scale(1);box-shadow:0 0 0 1px #000000b3,0 22px 55px #000000b3,0 0 46px #5df5ff59}50%{transform:translateY(-.5px)scale(1.007);box-shadow:0 0 0 1px #000000a6,0 26px 62px #000c,0 0 60px #5df5ff73}to{transform:translateY(0)scale(1);box-shadow:0 0 0 1px #000000b3,0 22px 55px #000000b3,0 0 46px #5df5ff59}}@keyframes kv-aurora{0%{opacity:.25;transform:translate(-4%,3%)scale(1.02)}50%{opacity:.42;transform:translate(3%,-2%)scale(1.06)}to{opacity:.32;transform:translate(0%,0%)scale(1.03)}}@media (prefers-reduced-motion:reduce){.kv-share-shell,.kv-share-shell:after{animation:none!important}.kv-btn,.kv-share-broadcast label{transition:none!important}} diff --git a/dist/assets/KaiVohApp-CQXUiNpZ.js b/dist/assets/KaiVohApp-CQXUiNpZ.js new file mode 100644 index 000000000..0a81d3a26 --- /dev/null +++ b/dist/assets/KaiVohApp-CQXUiNpZ.js @@ -0,0 +1,88 @@ +import{$ as e,Et as t,Hr as n,Jr as r,Lt as i,On as a,Pr as o,Qn as s,Rr as c,Rt as l,Ur as u,Vt as d,Wr as f,Xn as p,Zn as m,a as h,ar as g,at as _,c as v,ci as y,cr as b,ct as x,d as S,dr as C,dt as w,et as T,f as E,fr as D,ft as O,ir as k,it as A,l as j,lr as ee,lt as te,m as M,nt as N,o as P,or as ne,ot as F,p as re,pi as I,pr as L,rt as R,s as ie,si as z,sr as ae,st as oe,tr as se,tt as B,ur as ce,ut as V,w as le,zn as ue,zr as de}from"./index-BoQy35uR.js";import{n as H,t as fe}from"./webauthnKAS--_8CNTOP.js";import"./prop-types-ClmeRyhJ.js";import{n as pe}from"./SigilAuthContext-BnirZa1k.js";import{d as U,t as me}from"./ticker-JEnF9btM.js";import{i as W,n as he,r as ge,t as _e}from"./sessionStorage-2Nr46eZD.js";import{i as ve,r as ye}from"./postSeal-DGeRGc3h.js";import{t as be}from"./VerifierFrame-CHXAebtX.js";var G=I(z(),1);const xe=(0,G.createContext)(void 0);var K=I(d(),1);function Se({children:e}){let[t,n]=(0,G.useState)(()=>ge());(0,G.useEffect)(()=>{t?W(t):he()},[t]),(0,G.useEffect)(()=>{let e=e=>{e.key!==null&&e.key===`kai.voh.session.v1`&&n(ge())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let r=(0,G.useMemo)(()=>({session:t,setSession:e=>n(e),clearSession:()=>n(null)}),[t]);return(0,K.jsx)(xe.Provider,{value:r,children:e})}function q(){let e=(0,G.useContext)(xe);if(!e)throw Error(`useSession must be used within a SessionProvider`);return e}var Ce=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`,`video/mp4;codecs=h264,aac`,`video/mp4`],J=typeof window<`u`&&`MediaRecorder`in window;async function we(e){let t=await crypto.subtle.digest(`SHA-256`,e),n=new Uint8Array(t),r=``;for(let e=0;eTe(),[]);(0,G.useEffect)(()=>{if(t)return(async()=>{s(null),l(!0);try{await j()}catch(e){s(e instanceof Error?e.message:`Failed to access camera.`)}finally{l(!1)}})(),()=>{ee()}},[t,u,f]),(0,G.useEffect)(()=>{t&&te().catch(()=>_(!1))},[t,u]);async function j(){ee();let e={audio:{echoCancellation:!0,noiseSuppression:!0},video:{facingMode:u,width:{ideal:1080},height:{ideal:1920},frameRate:{ideal:30,max:60}}},t=await navigator.mediaDevices.getUserMedia(e);w.current=t,T.current&&(T.current.srcObject=t,T.current.muted=!0,await T.current.play().catch(()=>{})),await M(m&&g)}function ee(){if(I(!0),T.current&&(T.current.pause(),T.current.srcObject=null),w.current)for(let e of w.current.getTracks())e.stop();w.current=null,h(!1),y(!1),x(0),C(0),k.current!==null&&(cancelAnimationFrame(k.current),k.current=null)}async function te(){let e=w.current;if(!e){_(!1);return}let[t]=e.getVideoTracks();if(!t){_(!1);return}let n=t.getCapabilities?.()??{};_(!!(typeof n.torch==`boolean`&&n.torch)&&u===`environment`)}async function M(e){let t=w.current;if(!t)return;let[n]=t.getVideoTracks();if(!(!n||!n.applyConstraints))try{g&&u===`environment`&&await n.applyConstraints({advanced:[{torch:e}]})}catch{}}function N(){d(e=>e===`user`?`environment`:`user`)}function P(){p(e=>!e)}async function ne(){if(!g)return;let e=!m;h(e),await M(e)}function F(){if(!v)return;let e=performance.now()-O.current;if(C(e),x(Math.min(1,e/i)),e>=i){I(!1);return}k.current=requestAnimationFrame(F)}function re(){if(!J){s(`MediaRecorder is not supported on this browser.`);return}if(v)return;s(null);let e=w.current;if(!e){s(`No camera stream.`);return}for(let t of e.getAudioTracks())t.enabled=!f;let t=A??``,n;try{n=t?new MediaRecorder(e,{mimeType:t,videoBitsPerSecond:35e5}):new MediaRecorder(e)}catch{n=new MediaRecorder(e)}E.current=n,D.current=[],n.ondataavailable=e=>{e.data&&e.data.size>0&&D.current.push(e.data)},n.onstop=()=>{L()},n.start(250),y(!0),O.current=performance.now(),k.current=requestAnimationFrame(F)}function I(e){if(!v)return;let t=E.current;if(t){try{t.state!==`inactive`&&t.stop()}catch{}y(!1),k.current!==null&&(cancelAnimationFrame(k.current),k.current=null),e&&(D.current=[],x(0),C(0))}}async function L(){let e=D.current;if(D.current=[],!e.length)return;let t=Math.max(0,S),n=E.current?.mimeType||A||`video/webm`,i=new Blob(e,{type:n}),a=Date.now(),{width:o,height:s,thumbnailDataUrl:c}=await R(i),l=await we(await i.arrayBuffer()),u=`story_${a}.${n.includes(`mp4`)?`mp4`:`webm`}`;r({blob:i,file:new File([i],u,{type:n,lastModified:a}),mimeType:n,durationMs:t,width:o,height:s,thumbnailDataUrl:c,sha256:l,createdAt:a})}async function R(e){let t=URL.createObjectURL(e);try{let e=document.createElement(`video`);e.src=t,e.muted=!0,await e.play().catch(()=>void 0),await new Promise(t=>{let n=()=>{e.pause(),e.currentTime=0},r=()=>{n(),t()};e.onloadeddata=r,setTimeout(r,250)});let n=e.videoWidth||1080,r=e.videoHeight||1920,i=document.createElement(`canvas`);i.width=n,i.height=r;let a=i.getContext(`2d`);return a&&a.drawImage(e,0,0,n,r),{width:n,height:r,thumbnailDataUrl:i.toDataURL(`image/png`,.9)}}finally{URL.revokeObjectURL(t)}}function ie(){v||re()}function z(){v&&I(!1)}function ae(){v?I(!1):re()}return t?(0,K.jsxs)(`div`,{className:`story-rec-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":`Story recorder`,children:[(0,K.jsx)(`div`,{className:`story-rec-video-wrap`,children:(0,K.jsx)(`video`,{ref:T,className:`story-rec-video ${u===`user`?`mirror`:``}`,playsInline:!0})}),(0,K.jsxs)(`div`,{className:`story-rec-topbar`,children:[(0,K.jsx)(`button`,{type:`button`,className:`story-btn top left`,"aria-label":`Close`,onClick:()=>{ee(),n()},children:`✕`}),(0,K.jsx)(`div`,{className:`story-top-center`,children:(0,K.jsxs)(`div`,{className:`story-timer mono`,children:[De(S),` / `,De(i)]})}),(0,K.jsxs)(`div`,{className:`story-top-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`story-btn ${f?`active`:``}`,"aria-pressed":f,"aria-label":f?`Unmute microphone`:`Mute microphone`,onClick:P,title:f?`Unmute mic`:`Mute mic`,children:f?`🔇`:`🎙️`}),(0,K.jsx)(`button`,{type:`button`,className:`story-btn ${u===`environment`&&g?``:`disabled`}`,disabled:!(u===`environment`&&g),onClick:()=>void ne(),"aria-label":`Toggle torch`,title:g?m?`Torch on`:`Torch off`:`Torch not supported`,children:m?`🔦`:`💡`}),(0,K.jsx)(`button`,{type:`button`,className:`story-btn`,"aria-label":`Flip camera`,onClick:N,title:`Flip camera`,children:`🔁`})]})]}),(0,K.jsxs)(`div`,{className:`story-rec-bottombar`,children:[(0,K.jsx)(`div`,{className:`record-wrap`,children:(0,K.jsxs)(`button`,{type:`button`,className:`record-btn ${v?`recording`:``}`,"aria-pressed":v,"aria-label":v?`Stop recording`:`Start recording`,onClick:ae,onPointerDown:ie,onPointerUp:z,onPointerLeave:z,children:[(0,K.jsx)(`span`,{className:`progress-ring`,style:{background:`conic-gradient(currentColor ${b*360}deg, transparent 0)`}}),(0,K.jsx)(`span`,{className:`dot`})]})}),o&&(0,K.jsx)(`div`,{className:`story-rec-error`,children:o}),c&&(0,K.jsx)(`div`,{className:`story-rec-hint`,children:`Initializing camera…`})]})]}):null}function De(e){let t=Math.floor(e/1e3);return`${Math.floor(t/60).toString().padStart(2,`0`)}:${(t%60).toString().padStart(2,`0`)}`}var Y={phiKey:[`userPhiKey`,`phiKey`,`phikey`,`ΦKey`,`walletPhiKey`],kaiSig:[`kaiSignature`,`kaiSig`,`ksig`,`ΣSig`,`sig`,`signature`],sigilId:[`sigilId`,`sigilID`,`glyphId`,`glyphID`,`sigil_id`,`glyph_id`],url:[`sigilActionUrl`,`sigilUrl`,`actionUrl`,`url`,`claimedUrl`,`loginUrl`,`sourceUrl`,`originUrl`,`link`,`href`]};function Oe(e){if(typeof e!=`string`||!e.trim())return!1;try{let t=new URL(e,globalThis.location?.origin??`https://example.org`);return t.protocol===`https:`||t.protocol===`http:`}catch{return!1}}function X(e,t){if(typeof e!=`object`||!e)return;let n=e;for(let e of t){let t=n[e];if(typeof t==`string`&&t.trim())return t.trim()}let r=n.meta;if(typeof r==`object`&&r){let e=r;for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim())return t.trim()}}}function ke(e){return e.replace(/^$/,``).trim()}function Ae(e){let t=e.trim();if(!t)return;try{let e=JSON.parse(t);if(typeof e==`object`&&e)return e}catch{}let n=t.match(/\{[\s\S]*\}/);if(n)try{let e=JSON.parse(n[0]);if(typeof e==`object`&&e)return e}catch{}}function je(e,t){let n=RegExp(`${t}"?\\s*[:=]\\s*"?([^"\\n\\r<>{}]+)"?`,`i`),r=e.match(n);if(r)return(r[1]??``).trim()||void 0}function Me(e){let t={};for(let n of Y.phiKey){let r=je(e,n);if(r){t.userPhiKey=r;break}}for(let n of Y.kaiSig){let r=je(e,n);if(r){t.kaiSignature=r;break}}for(let n of Y.sigilId){let r=je(e,n);if(r){t.sigilId=r;break}}for(let n of Y.url){let r=je(e,n);if(r&&Oe(r))return t.actionUrl=r,t}let n=e.match(/https?:\/\/[^\s"'<>)#]+/i);return n&&Oe(n[0])&&(t.actionUrl=n[0]),t}function Ne(e,t){return{userPhiKey:e.userPhiKey??t.userPhiKey,kaiSignature:e.kaiSignature??t.kaiSignature,sigilId:e.sigilId??t.sigilId,actionUrl:e.actionUrl??t.actionUrl,meta:e.meta??t.meta}}function Pe(e){let t=(e??``).trim();if(!t)return{};try{let e=new DOMParser().parseFromString(t,`image/svg+xml`),n=e.getElementsByTagName(`parsererror`);if(n&&n.length>0)return Me(t);let r=e.documentElement,i={};if(r&&r.attributes)for(let e of Array.from(r.attributes))i[e.name]=e.value;let a={userPhiKey:X(i,Y.phiKey),kaiSignature:X(i,Y.kaiSig),sigilId:X(i,Y.sigilId),actionUrl:(()=>{let e=X(i,Y.url);return e&&Oe(e)?e:void 0})(),meta:void 0},o=Array.from(e.getElementsByTagName(`metadata`));for(let e of o){let t=ke((e.textContent??``).trim());if(!t)continue;let n=Ae(t);if(n){let e={userPhiKey:X(n,Y.phiKey),kaiSignature:X(n,Y.kaiSig),sigilId:X(n,Y.sigilId),actionUrl:(()=>{let e=X(n,Y.url);return e&&Oe(e)?e:void 0})(),meta:n};if(a=Ne(a,e),a.userPhiKey&&a.kaiSignature)return a}else a=Ne(a,Me(t))}for(let t of Array.from(e.getElementsByTagName(`desc`))){let e=ke((t.textContent??``).trim());if(!e)continue;let n=Ae(e);if(n){let e={userPhiKey:X(n,Y.phiKey),kaiSignature:X(n,Y.kaiSig),sigilId:X(n,Y.sigilId),actionUrl:(()=>{let e=X(n,Y.url);return e&&Oe(e)?e:void 0})(),meta:n};a=Ne(a,e)}else a=Ne(a,Me(e));if(a.userPhiKey&&a.kaiSignature)return a}for(let t of Array.from(e.getElementsByTagName(`a`))){let e=t.getAttribute(`href`)||t.getAttribute(`xlink:href`);if(e&&Oe(e)){a.actionUrl=a.actionUrl??e;break}}return(!a.userPhiKey||!a.kaiSignature)&&(a=Ne(a,Me(t))),a}catch{return Me(t)}}var Fe=new TextEncoder;function Ie(){if(typeof crypto>`u`||!crypto.subtle)throw Error(`WebCrypto subtle unavailable`);return crypto.subtle}function Le(e){if(e.buffer instanceof ArrayBuffer)return e;let t=new Uint8Array(e.byteLength);return t.set(e),t}function Re(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`).trim();if(!/^[A-Za-z0-9+/]*={0,2}$/.test(t))throw Error(`Invalid base64/base64url`);let n=(4-t.length%4)%4,r=t+`=`.repeat(n),i=new Int16Array(128).fill(-1);for(let e=0;e<64;e++)i[`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.charCodeAt(e)]=e;let a=Math.floor(r.length*3/4)-(r.endsWith(`==`)?2:r.endsWith(`=`)?1:0),o=new Uint8Array(a),s=0;for(let e=0;e>>16&255),s>>8&255),s>>18&63]+t[r>>>12&63]+t[r>>>6&63]+t[r&63])}let a=r-i;if(a===1){let r=e[i]<<16;n.push(t[r>>>18&63]+t[r>>>12&63]+`==`)}else if(a===2){let r=e[i]<<16|e[i+1]<<8;n.push(t[r>>>18&63]+t[r>>>12&63]+t[r>>>6&63]+`=`)}return n.join(``).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``)}function Be(e){let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t)||t.length%2!=0)throw Error(`Invalid hex`);let n=new Uint8Array(t.length/2);for(let e=0;e=32&&t.length%2==0&&/^[0-9a-fA-F]+$/.test(t)}function He(e){let t=e.trim();return t.length>=16&&/^[A-Za-z0-9\-_]+$/.test(t)}function Ue(e){let t=e.trim();if(!t)throw Error(`Empty kaiSignature`);if(Ve(t))return Be(t);if(He(t))try{return Re(t)}catch{}return Le(Fe.encode(t))}async function We(e){let t=Ie(),n=await t.importKey(`raw`,e.ikm,{name:`HKDF`},!1,[`deriveBits`]),r=await t.deriveBits({name:`HKDF`,hash:`SHA-256`,salt:e.salt,info:e.info},n,e.bits);return new Uint8Array(r)}async function Ge(e){let t=Le(Ue(e.baseKaiSignature)),n=Le(Re(e.salt_b64url)),r=(e.context??`KaiVoh.deriveKaiSignature.v1`).trim();return await We({ikm:t,salt:n,info:Le(Fe.encode(r)),bits:256})}async function Ke(e){return ze(await Ge(e))}function qe(){return(0,K.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`ico`,"aria-hidden":`true`,focusable:`false`,children:[(0,K.jsx)(`rect`,{x:`3`,y:`6`,width:`14`,height:`12`,rx:`3`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`circle`,{cx:`10`,cy:`12`,r:`3`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`path`,{d:`M17 9l4-2v10l-4-2z`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`circle`,{cx:`18.5`,cy:`5.5`,r:`2.5`,fill:`currentColor`})]})}function Je(){return(0,K.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`ico`,"aria-hidden":`true`,focusable:`false`,children:[(0,K.jsx)(`path`,{d:`M3 6h18M9 6V4h6v2M7 6l1 14h8l1-14`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,K.jsx)(`path`,{d:`M10 10v6M14 10v6`,stroke:`currentColor`,strokeWidth:`2`})]})}var Ye=6e3,Xe=1024,Ze=1024*Xe,Qe=e=>e>=Ze?`${(e/Ze).toFixed(2)} MB`:e>=Xe?`${(e/Xe).toFixed(2)} KB`:`${e} B`,$e=(e,t=8,n=6)=>e.length<=t+n?e:`${e.slice(0,t)}…${e.slice(-n)}`,et=e=>{if(typeof e!=`string`||!e)return!1;try{let t=new URL(e,globalThis.location?.origin??`https://example.org`);return t.protocol===`https:`||t.protocol===`http:`}catch{return!1}};function tt(e){try{let t=new URL(e,globalThis.location?.origin??`https://example.org`),n=new URLSearchParams(t.hash.replace(/^#/,``)).has(`t`),r=new URLSearchParams(t.search).has(`p`),i=t.pathname,a=/^\/(?:stream|feed)\/p\/[^/]+$/.test(i),o=/^\/p~[^/?#]+$/.test(i);return n||r||a||o}catch{return!1}}function nt(e){let t=new Uint8Array(e),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,r=[],i=t.length,a=0;for(;a+2>>18&63]+n[e>>>12&63]+n[e>>>6&63]+n[e&63])}let o=i-a;if(o===1){let e=t[a]<<16;r.push(n[e>>>18&63]+n[e>>>12&63]+`==`)}else if(o===2){let e=t[a]<<16|t[a+1]<<8;r.push(n[e>>>18&63]+n[e>>>12&63]+n[e>>>6&63]+`=`)}return r.join(``).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``)}function Z(e,t){if(typeof e!=`object`||!e)return;let n=e,r=n[t];if(typeof r==`string`)return r;let i=n.meta;if(typeof i==`object`&&i){let e=i[t];if(typeof e==`string`)return e}}function rt(e,t){if(typeof e!=`object`||!e)return;let n=e,r=n[t];if(typeof r==`number`&&Number.isFinite(r))return r;let i=n.meta;if(typeof i==`object`&&i){let e=i[t];if(typeof e==`number`&&Number.isFinite(e))return e}}function it(e,t){if(!e)return;let n=[`sigilActionUrl`,`sigilUrl`,`actionUrl`,`url`,`claimedUrl`,`loginUrl`,`sourceUrl`,`originUrl`,`link`,`href`];if(t)for(let e of n){let n=t[e];if(et(n))return n}try{let t=new DOMParser().parseFromString(e,`image/svg+xml`);for(let e of Array.from(t.getElementsByTagName(`metadata`))){let t=(e.textContent??``).trim();if(!t)continue;let r=t.replace(/^$/,``);try{let e=JSON.parse(r);if(typeof e==`object`&&e)for(let t of n){let n=e[t];if(et(n))return n}}catch{let e=r.match(/https?:\/\/[^\s"'<>)#]+/i);if(e&&et(e[0]))return e[0]}}for(let e of Array.from(t.getElementsByTagName(`a`))){let t=e.getAttribute(`href`)||e.getAttribute(`xlink:href`);if(et(t))return t}}catch{}}async function at(e,t,n={}){let r=n.cacheName??`sigil-attachments-v1`,i=(n.pathPrefix??`/att/`).replace(/\/+$/,``)+`/`;try{if(!(`caches`in globalThis)||typeof caches.open!=`function`)return;let n=await caches.open(r),a=`${i}${e}`;return await n.put(new Request(a,{method:`GET`}),new Response(t,{headers:{"Content-Type":t.type||`application/octet-stream`}})),a}catch{return}}function ot(e){let t=Math.floor(e/1e3);return`${Math.floor(t/60).toString().padStart(2,`0`)}:${(t%60).toString().padStart(2,`0`)}`}function st(e){let t=e.indexOf(` +`);return t>=0?e.slice(0,t):e}function ct(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}var lt=`kai-voh:draft:v1`,ut=[`text`,`code`,`md`,`html`],dt=[`code`,`sanitized`],ft=[`derived`,`glyph`],pt=e=>typeof e==`object`&&!!e,mt=e=>{let t=BigInt(2**53-1),n=BigInt(-(2**53-1));return e>t?2**53-1:e{let t=typeof e==`number`?e:typeof e==`string`?Number.parseInt(e,10):typeof e==`bigint`?Number(e):NaN;if(!Number.isFinite(t))return null;let n=Math.floor(t);return n<0?null:n};function gt({pulseRef:e}){let t=me(),n=(0,G.useMemo)(()=>pt(t)?ht(t.pulse):null,[t]);return(0,G.useEffect)(()=>{typeof n==`number`&&(e.current=n)},[n,e]),null}var _t=(e,t=``)=>typeof e==`string`?e:t,vt=(e,t=!1)=>typeof e==`boolean`?e:t,yt=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],bt=e=>{if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!pt(n))continue;let e=_t(n.phiKey),r=_t(n.kaiSignature),i=_t(n.label);if(!e||!r||!i)continue;let a=typeof n.sigilId==`string`&&n.sigilId.trim()?n.sigilId:void 0;t.push({phiKey:e,kaiSignature:r,label:i,sigilId:a})}return t},Q=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.now():0,xt=async()=>{await new Promise(e=>requestAnimationFrame(()=>e()))},St=async(e,t,n)=>{let r=null,i=new Promise((e,i)=>{r=window.setTimeout(()=>i(Error(`${n} timed out`)),t)});try{return await Promise.race([e,i])}finally{r!==null&&window.clearTimeout(r)}},$=()=>{let e=typeof crypto<`u`?crypto:void 0;if(e&&`randomUUID`in e&&typeof e.randomUUID==`function`)return e.randomUUID();if(e&&`getRandomValues`in e&&typeof e.getRandomValues==`function`){let t=new Uint8Array(16);e.getRandomValues(t);let n=``;for(let e=0;e`u`)throw Error(`encode worker unavailable (no window)`);if(typeof Worker>`u`)throw Error(`encode worker unavailable (Worker not supported)`);let e=new URL(`data:video/mp2t;base64,Ly8vIDxyZWZlcmVuY2UgbGliPSJ3ZWJ3b3JrZXIiIC8+CgppbXBvcnQgewogIGVuY29kZVRva2VuV2l0aEJ1ZGdldHMsCiAgdHlwZSBGZWVkUG9zdFBheWxvYWQsCn0gZnJvbSAiLi4vLi4vdXRpbHMvZmVlZFBheWxvYWQiOwoKdHlwZSBFbmNvZGVXb3JrZXJSZXF1ZXN0ID0gewogIGlkOiBzdHJpbmc7CiAgcGF5bG9hZDogRmVlZFBvc3RQYXlsb2FkOwp9OwoKdHlwZSBFbmNvZGVXb3JrZXJSZXNwb25zZSA9CiAgfCB7IGlkOiBzdHJpbmc7IG9rOiB0cnVlOyB0b2tlbjogc3RyaW5nOyB3aXRoaW5IYXJkOiBib29sZWFuOyBtczogbnVtYmVyIH0KICB8IHsgaWQ6IHN0cmluZzsgb2s6IGZhbHNlOyBlcnJvcjogc3RyaW5nOyBtczogbnVtYmVyIH07Cgpjb25zdCBub3cgPSAoKTogbnVtYmVyID0+CiAgc2VsZi5wZXJmb3JtYW5jZSAmJiB0eXBlb2Ygc2VsZi5wZXJmb3JtYW5jZS5ub3cgPT09ICJmdW5jdGlvbiIKICAgID8gc2VsZi5wZXJmb3JtYW5jZS5ub3coKQogICAgOiBEYXRlLm5vdygpOwoKc2VsZi5vbm1lc3NhZ2UgPSAoZXY6IE1lc3NhZ2VFdmVudDxFbmNvZGVXb3JrZXJSZXF1ZXN0PikgPT4gewogIGNvbnN0IHQwID0gbm93KCk7CiAgY29uc3QgZGF0YSA9IGV2LmRhdGE7CgogIHRyeSB7CiAgICBjb25zdCBvdXQgPSBlbmNvZGVUb2tlbldpdGhCdWRnZXRzKGRhdGEucGF5bG9hZCk7CiAgICBjb25zdCBtc2c6IEVuY29kZVdvcmtlclJlc3BvbnNlID0gewogICAgICBpZDogZGF0YS5pZCwKICAgICAgb2s6IHRydWUsCiAgICAgIHRva2VuOiBvdXQudG9rZW4sCiAgICAgIHdpdGhpbkhhcmQ6IG91dC53aXRoaW5IYXJkLAogICAgICBtczogbm93KCkgLSB0MCwKICAgIH07CiAgICBzZWxmLnBvc3RNZXNzYWdlKG1zZyk7CiAgfSBjYXRjaCAoZSkgewogICAgY29uc3QgbXNnOiBFbmNvZGVXb3JrZXJSZXNwb25zZSA9IHsKICAgICAgaWQ6IGRhdGEuaWQsCiAgICAgIG9rOiBmYWxzZSwKICAgICAgZXJyb3I6IGUgaW5zdGFuY2VvZiBFcnJvciA/IGUubWVzc2FnZSA6IFN0cmluZyhlKSwKICAgICAgbXM6IG5vdygpIC0gdDAsCiAgICB9OwogICAgc2VsZi5wb3N0TWVzc2FnZShtc2cpOwogIH0KfTsK`,``+import.meta.url);return Ct=new Worker(e,{type:`module`,name:`kaiVohEncodeWorker`}),Ct.onmessage=e=>{let t=e.data,n=wt.get(t.id);n&&(wt.delete(t.id),n(t))},Ct.onerror=()=>{for(let[e,t]of wt)t({id:e,ok:!1,error:`encode worker crashed`,ms:0});wt.clear();try{Ct?.terminate()}catch{}Ct=null},Ct}async function Et(e){let t=Tt(),n=$();return new Promise(r=>{wt.set(n,r);let i={id:n,payload:e};t.postMessage(i)})}async function Dt(e){let t=Q(),n=()=>{try{let n=se(e);return{id:$(),ok:!0,token:n.token,withinHard:n.withinHard,ms:Q()-t}}catch(e){return{id:$(),ok:!1,error:e instanceof Error?e.message:String(e),ms:Q()-t}}};try{let t=await Et(e);if(!t.ok){let e=n();return e.ok?e:t}return t}catch{return n()}}function Ot({initialCaption:e=``,initialAuthor:t=``,onExhale:r}){let{auth:i}=pe(),o=i.meta,s=(0,G.useRef)(NaN),[c,l]=(0,G.useState)(e),[u,d]=(0,G.useState)(t),[f,p]=(0,G.useState)(`text`),[h,_]=(0,G.useState)(`tsx`),[v,y]=(0,G.useState)(`code`),[x,S]=(0,G.useState)(``),[w,T]=(0,G.useState)(``),[E,O]=(0,G.useState)(``),[A,j]=(0,G.useState)([]),[te,M]=(0,G.useState)([]),[N,P]=(0,G.useState)({version:1,totalBytes:0,inlinedBytes:0,items:[]}),F=(0,G.useRef)(N),[re,I]=(0,G.useState)(!1),[R,ie]=(0,G.useState)(null),[z,oe]=(0,G.useState)(!1),[se,B]=(0,G.useState)(``),[V,le]=(0,G.useState)(null),[de,H]=(0,G.useState)(null),[fe,U]=(0,G.useState)(null),[me,W]=(0,G.useState)(!1),[he,ge]=(0,G.useState)(``),[_e,be]=(0,G.useState)(0),[xe,Se]=(0,G.useState)(`path`),[q,Ce]=(0,G.useState)(!1),[J,we]=(0,G.useState)(`derived`),[Te,De]=(0,G.useState)(``),[Y,Oe]=(0,G.useState)(()=>ye(18)),[X,ke]=(0,G.useState)([]),[Ae,je]=(0,G.useState)(!1),Me=(0,G.useRef)(!1),Ne=(0,G.useRef)(null),Fe=(0,G.useRef)(null),Ie=!!o;(0,G.useEffect)(()=>{Me.current||l(e)},[e]),(0,G.useEffect)(()=>{Me.current||d(t)},[t]),(0,G.useEffect)(()=>{if(Me.current||(Me.current=!0,typeof window>`u`))return;let n=window.sessionStorage.getItem(lt);if(n)try{let r=JSON.parse(n);if(!pt(r)||r.v!==1)return;let i=ut.includes(r.bodyKind)?r.bodyKind:`text`,a=dt.includes(r.htmlMode)?r.htmlMode:`code`,o=ft.includes(r.sealMode)?r.sealMode:`derived`,s=yt(r.extraUrls).map(e=>e.trim()).filter(e=>et(e)).map(e=>D({url:e}));l(_t(r.caption,e)),d(_t(r.author,t)),p(i),_(_t(r.codeLang,`tsx`)),y(a),O(_t(r.extraUrlField,``)),j(s),Ce(vt(r.privateOn,!1)),we(o),De(_t(r.sealTeaser,``)),Oe(_t(r.sealSalt,ye(18))),ke(bt(r.allowedGlyphs)),je(vt(r.sealAdvanced,!1))}catch{}},[t,e]),(0,G.useEffect)(()=>{if(Me.current)return Ne.current&&window.clearTimeout(Ne.current),Ne.current=window.setTimeout(()=>{let e={v:1,caption:c,author:u,bodyKind:f,codeLang:h,htmlMode:v,extraUrlField:E,extraUrls:A.map(e=>e.url),privateOn:q,sealMode:J,sealTeaser:Te,sealSalt:Y,allowedGlyphs:X,sealAdvanced:Ae};try{window.sessionStorage.setItem(lt,JSON.stringify(e))}catch{}},250),()=>{Ne.current&&window.clearTimeout(Ne.current)}},[c,u,f,h,v,E,A,q,J,Te,Y,X,Ae]),(0,G.useEffect)(()=>{F.current=N},[N]),(0,G.useEffect)(()=>()=>{R&&URL.revokeObjectURL(R.url)},[]);let Le=(0,G.useMemo)(()=>Z(o,`sigilActionUrl`)||Z(o,`sigilUrl`)||Z(o,`actionUrl`)||Z(o,`url`)||Z(o,`claimedUrl`)||Z(o,`loginUrl`)||Z(o,`sourceUrl`)||Z(o,`originUrl`)||Z(o,`link`)||Z(o,`href`)||it(i.svgText,o??{})||(globalThis.location?.origin??`https://kaiklok.com`),[o,i.svgText]);(0,G.useEffect)(()=>{o&&(S(Z(o,`userPhiKey`)??``),T(Z(o,`kaiSignature`)??``))},[o]),(0,G.useEffect)(()=>{q&&(Y.trim()||Oe(ye(18)))},[q,Y]);let Re=()=>{let e=E.trim();if(!et(e)){U(`Invalid URL. Enter a full http(s) link.`);return}j(t=>[...t,D({url:e})]),O(``),U(null)},ze=e=>{j(t=>t.filter((t,n)=>n!==e))};function Be(e){let t=e,n=typeof t.webkitRelativePath==`string`?t.webkitRelativePath:``;return n.trim()?n:e.name}async function Ve(e){let t=await e.arrayBuffer(),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n),i=``;for(let e=0;e{let t=F.current.items.slice(),n=[];for(let r of e){let e=Be(r);if(q&&r.size>Ye){n.push(e);continue}if(r.size<=Ye){let n=await r.arrayBuffer();t.push(ee({name:e,type:r.type||`application/octet-stream`,size:r.size,data_b64url:nt(n)}))}else{let n=await Ve(r),i=await at(n,r,{cacheName:`sigil-attachments-v1`,pathPrefix:`/att/`});t.push(ae({sha256:n,name:e,type:r.type||`application/octet-stream`,size:r.size,url:i}))}}return n.length>0&&U(`Private (Sealed) mode cannot include cache-backed large files. Skipped: ${n.slice(0,3).join(`, `)}${n.length>3?` (+${n.length-3} more)`:``}. Attach as a URL instead (Drive/S3/IPFS/etc), or keep files ≤ ${Qe(Ye)}.`),k(t)},Ue=async e=>{if(!e.target.files)return;let t=Array.from(e.target.files);M(e=>[...e,...t]),P(await He(t))},We=async e=>{if(e.preventDefault(),e.stopPropagation(),!e.dataTransfer?.files?.length)return;let t=Array.from(e.dataTransfer.files);M(e=>[...e,...t]),P(await He(t))},Ge=e=>{e.preventDefault(),e.stopPropagation()},Xe=()=>{M([]);let e={version:1,totalBytes:0,inlinedBytes:0,items:[]};P(e),F.current=e};function Ze(e){let[,t]=e.split(`,`,2);return t?Math.ceil(t.length*3/4):0}async function ht(e){if(q){U(`Private (Sealed) mode cannot include recorded stories (cache-backed video refs). Upload as a URL instead.`),I(!1);return}let t=await at(e.sha256,e.file,{cacheName:`sigil-attachments-v1`,pathPrefix:`/att/`}),n=ae({sha256:e.sha256,name:e.file.name,type:e.mimeType||e.file.type||`video/webm`,size:e.file.size,url:t}),r=(e.thumbnailDataUrl.split(`,`,2)[1]??``).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``),i=ee({name:e.file.name.replace(/\.(webm|mp4)$/i,``)+`_thumb.png`,type:`image/png`,size:Ze(e.thumbnailDataUrl),data_b64url:r});P(k([...F.current.items,n,i])),R&&URL.revokeObjectURL(R.url),ie({url:URL.createObjectURL(e.file),durationMs:e.durationMs}),I(!1)}let $=c.trim(),Ct=(0,G.useMemo)(()=>$?f===`text`?C($):f===`md`?ce($):f===`html`?b($,v):ne($,h.trim()||void 0):void 0,[$,f,h,v]),wt=(0,G.useMemo)(()=>{if(!$)return;let e=st($).trim();if(e){if(f===`code`){let t=h.trim();return ct(`${t?`code:${t}`:`code`} — ${e}`,220)}return ct(f===`md`?`md — ${e}`:f===`html`?`html — ${e}`:e,220)}},[$,f,h]),Tt=(0,G.useMemo)(()=>F.current.items.some(e=>e.kind===`file-ref`),[N]),Et=(0,G.useMemo)(()=>{if(!q)return wt;let e=Te.trim();return e?ct(e,220):`Sealed Memory`},[q,wt,Te]),Ot=q&&J===`derived`&&Ie&&!!w.trim(),kt=q&&J===`glyph`&&X.length>0,At=(0,G.useMemo)(()=>q?Ie?J===`derived`?w.trim()?Y.trim()?(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Mode: `,(0,K.jsx)(`strong`,{children:`Derived Glyph Access`}),` • Any derivative glyph exported from this issuer glyph can unlock • Salt length`,` `,(0,K.jsx)(`strong`,{children:Y.trim().length})]}):(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Derivation salt missing — rotate to generate.`}):(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Derived access requires ΣSig (kaiSignature) present in your verified glyph.`}):X.length===0?(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Mode: Specific Glyph Access requires at least one allowed glyph SVG uploaded.`}):(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Mode: `,(0,K.jsx)(`strong`,{children:`Specific Glyph Access`}),` • Allowed glyphs `,(0,K.jsx)(`strong`,{children:X.length})]}):(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`Private (Sealed) requires a verified glyph session.`}):null,[q,Ie,J,w,Y,X.length]),jt=async e=>{if(e.length===0)return;let t=[],n=[];for(let r of e)try{let e=Pe(await r.text()),i=(e.userPhiKey??``).trim(),a=(e.kaiSignature??``).trim();if(!i||!a){n.push(r.name);continue}t.push({label:r.name,phiKey:i,kaiSignature:a,sigilId:(e.sigilId??``).trim()?(e.sigilId??``).trim():void 0})}catch{n.push(r.name)}t.length>0&&(ke(e=>{let n=e.slice(),r=new Set(e.map(e=>`${e.phiKey}:${e.kaiSignature}`));for(let e of t){let t=`${e.phiKey}:${e.kaiSignature}`;r.has(t)||(r.add(t),n.push(e))}return n}),U(null)),n.length>0&&U(`Some glyph SVGs were missing ΦKey/ΣSig metadata and were not added: ${n.slice(0,3).join(`, `)}${n.length>3?` (+${n.length-3} more)`:``}.`)},Mt=e=>{ke(t=>t.filter((t,n)=>n!==e))},Nt=async()=>{if(z)return;H(null),U(null),W(!1),ge(``),be(0),Se(`path`),le(null);let e=(Le||``).trim(),t=tt(e);if(t||U(`Proof of Breath™ URL not detected; using fallback. Link generation will still work.`),q){if([...F.current.items,...A].some(e=>e.kind===`file-ref`)){H(`Private (Sealed) mode cannot include cache-backed file refs. Keep files ≤ ${Qe(Ye)} (inline) or attach public URLs.`);return}if(J===`derived`&&!Ot){H(`Private (Sealed) → Derived mode requires a verified glyph with ΣSig (kaiSignature) present.`);return}if(J===`glyph`&&!kt){H(`Private (Sealed) → Specific Glyph mode requires at least one allowed glyph SVG uploaded.`);return}}let i=s.current;if(!Number.isFinite(i)||i<0){H(`Failed to compute Kai pulse (aligned ticker not ready).`);return}let c=mt(n(i)),l=Q();try{oe(!0),B(`paint`),await xt(),await xt(),B(`assemble`);let n=[...F.current.items,...A],s=n.length>0?k(n):void 0,d=t?e:void 0,f=d?ue(d)??d:void 0,p=Z(o,`sigilId`)||Z(o,`sigilID`)||Z(o,`glyphId`)||void 0,h=g({url:e,pulse:i,caption:Et,body:Ct,author:u.trim()?u.trim():void 0,source:`manual`,sigilId:p,phiKey:Ie&&x?x:void 0,kaiSignature:Ie&&w?w:void 0,ts:c,attachments:s,parentUrl:d,originUrl:f});B(`prepare`);let _=Q(),v=await St(L(h,{cacheName:`sigil-attachments-v1`,pathPrefix:`/att/`}),2e4,`preparePayloadForLink`),y=Q()-_,b=v;if(q){let e={body:v.body??null,attachments:v.attachments??null},t;if(J===`derived`){let n=Y.trim()?Y.trim():ye(18);n!==Y&&Oe(n),t=await ve({inner:e,teaser:Et??void 0,derived:{issuerKaiSignature:w,issuerPhiKey:x||void 0,salt_b64url:n}})}else{let n=X.map(e=>({phiKey:e.phiKey,kaiSignature:e.kaiSignature,sigilId:e.sigilId}));t=await ve({inner:e,teaser:Et??void 0,allowGlyphs:n})}b={...v,body:void 0,attachments:void 0,seal:t}}B(`encode(worker)`);let S=Q(),C=await St(Dt(b),3e4,`encodeTokenWithBudgets(worker)`),T=Q()-S;if(!C.ok){le({stage:`encode(worker)`,totalMs:Q()-l,prepareMs:y,encodeMs:C.ms,items:n.length,inlinedBytes:s?.inlinedBytes,totalBytes:s?.totalBytes,note:C.error}),H(`Token encode failed: ${C.error}. If you have a strict CSP, allow module workers from 'self' (worker-src 'self'). This build uses a real worker file (no blob workers).`);return}let{token:E,withinHard:D}=C;be(E.length);let O=globalThis.location?.origin??`https://kaiklok.com`,j=D?`${O}/stream/p/${encodeURIComponent(E)}`:`${O}/stream#t=${E}`;Se(D?`path`:`hash`),E.length>3500?U(`Token exceeds hard path limit (${E.length.toLocaleString()} > ${m.toLocaleString()}). Using hash URL to avoid request-line limits.`):E.length>1800&&U(`Token is large (${E.length.toLocaleString()} chars). Prefer trimming inlined files or relying on external URLs.`),B(`register`),a(j),B(`clipboard`);try{await navigator.clipboard.writeText(j),W(!0)}catch{W(!1)}ge(j),le({stage:`done`,totalMs:Q()-l,prepareMs:y,encodeMs:T,tokenLen:E.length,items:n.length,inlinedBytes:s?.inlinedBytes,totalBytes:s?.totalBytes}),r&&r({shareUrl:j,token:E,payload:b})}catch(e){let t=e instanceof Error?e.message:typeof e==`string`?e:`Failed to generate link.`;H(t),le({stage:se||`unknown`,totalMs:Q()-l,note:t})}finally{B(``),oe(!1)}},Pt=()=>{l(e||``),d(t||``),p(`text`),_(`tsx`),y(`code`),O(``),j([]),Xe(),H(null),U(null),W(!1),ge(``),be(0),Se(`path`),B(``),le(null),De(``),je(!1),R&&(URL.revokeObjectURL(R.url),ie(null));try{window.sessionStorage.removeItem(lt)}catch{}},Ft=e=>t=>e(t.target.value),It=(0,G.useMemo)(()=>{if(!Ie)return null;let e=rt(o,`pulse`);return(0,K.jsxs)(`div`,{className:`id-banner`,role:`status`,"aria-live":`polite`,children:[(0,K.jsx)(`span`,{className:`id-dot`}),(0,K.jsxs)(`span`,{className:`id-text`,children:[`Verified by Sigil — ΦKey `,(0,K.jsx)(`strong`,{children:$e(x)}),` • `,`Last verified pulse `,(0,K.jsx)(`strong`,{children:e??`—`})]}),(0,K.jsxs)(`span`,{className:`id-sub mono`,children:[`ΣSig `,$e(w)]})]})},[Ie,x,w,o]),Lt=(0,G.useMemo)(()=>Le?(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Proof Of Breath™ URL`}),(0,K.jsxs)(`div`,{className:`composer-input-row`,children:[(0,K.jsx)(`input`,{className:`composer-input locked`,type:`url`,value:Le,readOnly:!0}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:async()=>{try{await navigator.clipboard.writeText(Le),W(!0),window.setTimeout(()=>W(!1),1200)}catch{}},title:`Remember Proof Of Breath™ URL`,children:me?`Remembered ✓`:`Remember`})]}),!tt(Le)&&(0,K.jsx)(`div`,{className:`composer-hint warn`,children:`No canonical stream token detected in the URL. Fallback will still produce a valid post.`})]}):null,[Le,me]),Rt=(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Privacy Seal`}),(0,K.jsxs)(`div`,{className:`story-actions`,style:{alignItems:`center`,gap:10},children:[(0,K.jsx)(`button`,{type:`button`,className:`pill ${q?`prim`:`subtle`}`,onClick:()=>{Ce(e=>!e),H(null),U(null)},title:`Toggle Private (Sealed)`,children:q?`Private: ON`:`Private: OFF`}),q&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,className:`pill ${J===`derived`?`prim`:`subtle`}`,onClick:()=>we(`derived`),title:`Derived glyph access`,children:`Derived`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${J===`glyph`?`prim`:`subtle`}`,onClick:()=>we(`glyph`),title:`Specific glyph allowlist`,children:`Specific Glyph`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${Ae?`prim`:`subtle`}`,onClick:()=>je(e=>!e),title:`Show advanced sealing details`,children:`Advanced`})]})]}),q&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Private (Sealed) encrypts `,(0,K.jsx)(`span`,{className:`mono`,children:`body + attachments`}),` inside the token. The outer post remains verifiable (ΦKey/ΣSig) but does not contain plaintext content.`]}),(0,K.jsxs)(`div`,{className:`composer`,style:{padding:0,marginTop:10},children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Public teaser (optional)`}),(0,K.jsx)(`input`,{className:`composer-input`,type:`text`,value:Te,onChange:Ft(De),placeholder:`What should be visible without unlocking?`,maxLength:240}),(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`If empty, the public caption becomes `,(0,K.jsx)(`span`,{className:`mono`,children:`Sealed Memory`}),`.`]})]}),J===`derived`&&(0,K.jsxs)(`div`,{className:`composer`,style:{padding:0,marginTop:10},children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Derivation salt (for verifier export)`}),(0,K.jsxs)(`div`,{className:`composer-input-row`,children:[(0,K.jsx)(`input`,{className:`composer-input mono`,type:`text`,readOnly:!0,value:Y}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:()=>Oe(ye(18)),title:`Rotate derivation salt`,children:`Rotate`}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:async()=>{try{await navigator.clipboard.writeText(Y),W(!0),window.setTimeout(()=>W(!1),900)}catch{}},title:`Copy salt`,children:`Copy`})]}),Ae&&(0,K.jsx)(`div`,{className:`composer-hint mono`,style:{marginTop:8},children:Ie&&w.trim()?(0,K.jsxs)(K.Fragment,{children:[`Derived ΣSig (b64url, post-scoped): `,(0,K.jsx)(`button`,{type:`button`,className:`pill subtle`,onClick:async()=>{try{let e=await Ke({baseKaiSignature:w,salt_b64url:Y});await navigator.clipboard.writeText(e),W(!0),window.setTimeout(()=>W(!1),900)}catch{}},title:`Copy derived signature`,children:`Copy derived ΣSig`}),(0,K.jsx)(`span`,{className:`dim`,style:{marginLeft:8},children:`(secret-equivalent; only for issuer export workflows)`})]}):`Derived preview unavailable (missing verified ΣSig).`})]}),J===`glyph`&&(0,K.jsxs)(`div`,{className:`composer`,style:{padding:0,marginTop:10},children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Allowed glyphs (upload SVG)`}),(0,K.jsxs)(`div`,{className:`story-actions`,style:{alignItems:`center`},children:[(0,K.jsxs)(`label`,{className:`pill`,children:[(0,K.jsx)(`input`,{type:`file`,accept:`.svg,image/svg+xml`,multiple:!0,className:`visually-hidden`,onChange:async e=>{let t=e.target.files?Array.from(e.target.files):[];e.currentTarget.value=``,t.length!==0&&await jt(t)}}),`Add allowed glyphs…`]}),X.length>0&&(0,K.jsx)(`button`,{type:`button`,className:`pill subtle`,onClick:()=>ke([]),title:`Clear allowlist`,children:`Clear`})]}),X.length>0&&(0,K.jsx)(`ul`,{className:`url-list`,style:{marginTop:10},children:X.map((e,t)=>(0,K.jsxs)(`li`,{className:`url-item`,style:{alignItems:`center`},children:[(0,K.jsx)(`span`,{className:`badge`,children:`glyph`}),(0,K.jsx)(`span`,{className:`mono`,children:ct(e.label,36)}),(0,K.jsxs)(`span`,{className:`dim`,style:{marginLeft:10},children:[`ΦKey `,$e(e.phiKey,10,8)]}),(0,K.jsx)(`button`,{type:`button`,className:`pill danger`,onClick:()=>Mt(t),title:`Remove glyph`,children:`✕`})]},`${e.phiKey}:${e.kaiSignature}:${t}`))}),(0,K.jsxs)(`div`,{className:`composer-hint`,style:{marginTop:8},children:[`This is `,(0,K.jsx)(`strong`,{children:`not`}),` pulse-locked — if a user possesses an allowed glyph (its ΣSig), they can unlock sealed posts across pulses.`]})]}),(0,K.jsxs)(`div`,{className:`composer-hint warn`,style:{marginTop:10},children:[`Private (Sealed) hard-guard: no cache-backed `,(0,K.jsx)(`span`,{className:`mono`,children:`file-ref`}),` attachments. Use URLs or keep files ≤`,` `,(0,K.jsx)(`strong`,{children:Qe(Ye)}),`.`]}),At]})]}),zt=(0,K.jsxs)(`div`,{className:`attachments`,children:[(0,K.jsx)(`h3`,{className:`attachments-title`,children:`Seals`}),(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Seal a memory`}),(0,K.jsxs)(`div`,{className:`story-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`pill prim icon-only${q?` disabled`:``}`,"aria-label":`Open Memory Recorder`,title:q?`Private mode: story capture is disabled (cache-backed)`:`Record story`,onClick:()=>{if(q){U(`Private (Sealed) mode disables story recording (cache-backed file refs). Add as URL instead.`);return}I(!0)},disabled:q,children:(0,K.jsx)(qe,{})}),R&&(0,K.jsxs)(`div`,{className:`story-preview`,children:[(0,K.jsx)(`video`,{src:R.url,playsInline:!0,controls:!0,className:`story-preview-video`}),(0,K.jsx)(`div`,{className:`story-preview-meta mono`,children:ot(R.durationMs)}),(0,K.jsx)(`button`,{type:`button`,className:`pill danger icon-only`,onClick:()=>{URL.revokeObjectURL(R.url),ie(null)},"aria-label":`Remove recorded preview`,title:`Remove preview`,children:(0,K.jsx)(Je,{})})]})]})]}),(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Seal any URL`}),(0,K.jsxs)(`div`,{className:`composer-input-row`,children:[(0,K.jsx)(`input`,{className:`composer-input`,type:`url`,placeholder:`https://example.com/docs/your-file.pdf`,value:E,onChange:Ft(O),autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1}),(0,K.jsx)(`button`,{type:`button`,className:`composer-aux`,onClick:Re,title:`Add URL`,children:`Seal`})]}),A.length>0&&(0,K.jsx)(`ul`,{className:`url-list`,children:A.map((e,t)=>(0,K.jsxs)(`li`,{className:`url-item`,children:[(0,K.jsx)(`span`,{className:`mono`,children:$e(e.url,28,16)}),(0,K.jsx)(`button`,{type:`button`,className:`pill danger`,onClick:()=>ze(t),title:`Remove URL`,children:`✕`})]},`${e.url}-${t}`))})]}),(0,K.jsx)(`div`,{ref:Fe,className:`dropzone`,onDragOver:Ge,onDrop:We,"aria-label":`Drop files or folders here`,children:(0,K.jsxs)(`div`,{className:`dropzone-inner`,children:[(0,K.jsx)(`div`,{className:`dz-title`,children:`Seal files or folders`}),(0,K.jsxs)(`div`,{className:`dz-sub`,children:[`Tiny files get inlined; large files become cache-backed refs.`,q?(0,K.jsxs)(K.Fragment,{children:[` `,(0,K.jsx)(`strong`,{children:`(Private mode skips large files.)`})]}):null]}),(0,K.jsxs)(`div`,{className:`dz-actions`,children:[(0,K.jsxs)(`label`,{className:`pill`,children:[(0,K.jsx)(`input`,{type:`file`,multiple:!0,onChange:Ue,className:`visually-hidden`}),`Inhale files…`]}),(0,K.jsxs)(`label`,{className:`pill`,children:[(0,K.jsx)(`input`,{type:`file`,multiple:!0,webkitdirectory:``,onChange:Ue,className:`visually-hidden`}),`Inhale folder…`]}),te.length>0&&(0,K.jsx)(`button`,{type:`button`,className:`pill subtle`,onClick:Xe,children:`Reset`})]})]})}),N.items.length>0&&(0,K.jsxs)(`div`,{className:`file-summary`,children:[(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`Items: `,(0,K.jsx)(`strong`,{children:N.items.length}),` • Files total: `,(0,K.jsx)(`strong`,{children:Qe(N.totalBytes??0)}),` • Inlined:`,` `,(0,K.jsx)(`strong`,{children:Qe(N.inlinedBytes??0)}),` (≤ `,Qe(Ye),` each)`]}),(0,K.jsx)(`ul`,{className:`file-list`,children:N.items.map((e,t)=>{if(e.kind===`url`)return(0,K.jsx)(`li`,{className:`file-item`,children:(0,K.jsxs)(`div`,{className:`file-row`,children:[(0,K.jsx)(`span`,{className:`badge`,children:`url`}),(0,K.jsx)(`span`,{className:`mono`,children:$e(e.url,34,18)})]})},`url-${t}`);let n=e.name??`file-${t}`,r=e.kind===`file-inline`,i=`type`in e&&typeof e.type==`string`?e.type:`application/octet-stream`,a=`size`in e&&typeof e.size==`number`?e.size:0;return(0,K.jsx)(`li`,{className:`file-item`,children:(0,K.jsxs)(`div`,{className:`file-row`,children:[(0,K.jsx)(`span`,{className:`badge`,children:r?`inline`:`file`}),(0,K.jsx)(`span`,{className:`mono`,children:n}),(0,K.jsxs)(`span`,{className:`dim`,children:[i,` • `,Qe(a)]})]})},`${n}-${t}`)})}),N.items.some(e=>e.kind===`file-ref`)&&(0,K.jsxs)(`div`,{className:`composer-hint ${q?`warn`:``}`,children:[`Large files are cached and referenced by SHA-256.`,q?` Private (Sealed) will refuse these — attach public URLs instead.`:` You can also host publicly and attach the public URL above.`]})]})]}),Bt=f===`code`?10:3,Vt=f===`code`?`Paste your code…`:f===`md`?`Write markdown…`:f===`html`?`Write HTML… (default renders as escaped code unless sanitized by the stream UI)`:`What Resonants About This Moment…`,Ht=z||q&&J===`derived`&&!Ot||q&&J===`glyph`&&!kt||q&&Tt;return(0,K.jsxs)(`div`,{className:`social-connector-container`,children:[(0,K.jsx)(gt,{pulseRef:s}),(0,K.jsx)(`h2`,{className:`social-connector-title`,children:`KaiVoh`}),(0,K.jsxs)(`p`,{className:`social-connector-sub`,children:[`Exhale a sealed `,(0,K.jsx)(`strong`,{children:`Memory Stream`}),`.`]}),It,Lt,Rt,(0,K.jsxs)(`div`,{className:`composer`,children:[(0,K.jsx)(`label`,{className:`composer-label`,children:`Body Format`}),(0,K.jsxs)(`div`,{className:`story-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`pill ${f===`text`?`prim`:`subtle`}`,onClick:()=>p(`text`),title:`Text`,children:`Text`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${f===`code`?`prim`:`subtle`}`,onClick:()=>p(`code`),title:`Code`,children:`Code`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${f===`md`?`prim`:`subtle`}`,onClick:()=>p(`md`),title:`Markdown`,children:`MD`}),(0,K.jsx)(`button`,{type:`button`,className:`pill ${f===`html`?`prim`:`subtle`}`,onClick:()=>p(`html`),title:`HTML`,children:`HTML`}),f===`code`&&(0,K.jsx)(`input`,{className:`composer-input`,style:{maxWidth:160},value:h,onChange:Ft(_),placeholder:`lang (tsx)`,"aria-label":`Code language`,autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1}),f===`html`&&(0,K.jsxs)(`button`,{type:`button`,className:`pill ${v===`code`?`prim`:`subtle`}`,onClick:()=>y(e=>e===`code`?`sanitized`:`code`),title:`HTML mode (stream decides how to render)`,children:[`mode:`,v]})]}),(0,K.jsxs)(`div`,{className:`composer-hint`,children:[`v2 posts include `,(0,K.jsx)(`span`,{className:`mono`,children:`body.kind`}),` so the stream can render code as code (escaped) instead of treating everything as plain text.`,q?(0,K.jsx)(K.Fragment,{children:` In Private mode, the body is sealed and not visible until unlocked.`}):null]})]}),(0,K.jsxs)(`div`,{className:`composer two`,children:[(0,K.jsxs)(`div`,{className:`field`,children:[(0,K.jsxs)(`label`,{htmlFor:`caption`,className:`composer-label`,children:[`Memory `,(0,K.jsx)(`span`,{className:`muted`,children:`(Body)`})]}),(0,K.jsx)(`textarea`,{id:`caption`,className:`composer-textarea${f===`code`?` mono`:``}`,rows:Bt,placeholder:Vt,value:c,onChange:Ft(l),spellCheck:f!==`code`})]}),(0,K.jsxs)(`div`,{className:`field`,children:[(0,K.jsxs)(`label`,{htmlFor:`author`,className:`composer-label`,children:[`Author Handle `,(0,K.jsx)(`span`,{className:`muted`,children:`(optional, e.g., @KaiRexKlok)`})]}),(0,K.jsx)(`input`,{id:`author`,className:`composer-input`,type:`text`,placeholder:`@handle`,value:u,onChange:Ft(d),autoCorrect:`off`,autoCapitalize:`none`})]})]}),zt,de&&(0,K.jsx)(`div`,{className:`composer-error`,children:de}),fe&&!de&&(0,K.jsx)(`div`,{className:`composer-warn`,children:fe}),(z||V)&&(0,K.jsxs)(`div`,{className:`composer-hint mono`,"aria-live":`polite`,children:[z&&se?`stage: ${se}`:null,V?(0,K.jsxs)(K.Fragment,{children:[z&&se?` • `:null,`total ${Math.round(V.totalMs)}ms`,typeof V.prepareMs==`number`?` • prepare ${Math.round(V.prepareMs)}ms`:``,typeof V.encodeMs==`number`?` • encode ${Math.round(V.encodeMs)}ms`:``,typeof V.tokenLen==`number`?` • token ${V.tokenLen.toLocaleString()}`:``,typeof V.items==`number`?` • items ${V.items}`:``,typeof V.inlinedBytes==`number`?` • inlined ${Qe(V.inlinedBytes)}`:``,typeof V.totalBytes==`number`?` • bytes ${Qe(V.totalBytes)}`:``,V.note?` • note: ${V.note}`:``]}):null]}),(0,K.jsxs)(`div`,{className:`composer-actions`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:Nt,className:`composer-submit`,disabled:Ht,title:Ht?`Fix sealing requirements / attachments to proceed`:`Exhale Stream`,children:z?`Exhaling…${se?` (${se})`:``}`:q?`Exhale Sealed Stream`:`Exhale Stream`}),(0,K.jsx)(`button`,{type:`button`,className:`composer-reset`,onClick:Pt,children:`Reset`})]}),he&&(0,K.jsxs)(`div`,{className:`composer-result`,children:[(0,K.jsx)(`label`,{htmlFor:`gen-url`,className:`composer-label`,children:`Your shareable link`}),(0,K.jsx)(`input`,{id:`gen-url`,className:`composer-input`,type:`text`,readOnly:!0,value:he,onFocus:e=>e.currentTarget.select()}),(0,K.jsxs)(`div`,{className:`composer-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`composer-copy`,onClick:async()=>{try{await navigator.clipboard.writeText(he),W(!0)}catch{W(!1)}},children:me?`Remembered ✓`:`Remember`}),(0,K.jsx)(`a`,{className:`composer-open`,href:he,target:`_blank`,rel:`noopener noreferrer`,children:`Open in new tab →`})]}),(0,K.jsxs)(`p`,{className:`composer-hint`,children:[`Token length: `,(0,K.jsx)(`strong`,{children:_e.toLocaleString()}),` chars • URL mode:`,` `,(0,K.jsx)(`strong`,{children:xe===`path`?`path`:`hash`}),` • soft `,1800 .toLocaleString(),` • hard`,` `,3500 .toLocaleString(),q?(0,K.jsxs)(K.Fragment,{children:[` `,`• `,(0,K.jsx)(`strong`,{children:`sealed`})]}):null]})]}),(0,K.jsx)(Ee,{isOpen:re,onClose:()=>I(!1),onCaptured:ht,maxDurationMs:15e3,preferredFacingMode:`user`})]})}var kt=50*1024*1024,At=10;function jt(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=1024,r=Math.floor(Math.log(e)/Math.log(n)),i=e/n**+r;return`${i.toFixed(i>=10?0:1)} ${t[r]}`}function Mt(e){let{type:t,name:n}=e,r=n.toLowerCase();return t.startsWith(`image/`)?`image`:t.startsWith(`video/`)?`video`:t.startsWith(`audio/`)?`audio`:t===`application/pdf`||t.startsWith(`text/`)||t.includes(`word`)||t.includes(`officedocument`)||t.includes(`spreadsheet`)||t.includes(`presentation`)?`document`:r.endsWith(`.zip`)||r.endsWith(`.rar`)||r.endsWith(`.7z`)||r.endsWith(`.tar`)||r.endsWith(`.gz`)?`archive`:`other`}var Nt={image:`Image`,video:`Video`,audio:`Audio`,document:`Document`,archive:`Archive`,other:`File`};function Pt(e){return[e.name,e.size,e.lastModified,Date.now(),Math.random().toString(36).slice(2,8)].join(`-`)}function Ft(e){return e.length===0?null:(e.find(e=>e.kind===`image`||e.kind===`video`)??e[0])?.id??null}function It(e){return`${e.name}:${e.size}:${e.lastModified}`}function Lt({onReady:e}){let t=(0,G.useRef)(null),n=(0,G.useRef)(null),r=(0,G.useRef)(null),[i,a]=(0,G.useState)([]),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(`file`),[f,p]=(0,G.useState)(``),[m,h]=(0,G.useState)(``),[g,_]=(0,G.useState)(`general`),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(``),[S,C]=(0,G.useState)(``),[w,T]=(0,G.useState)(``),[E,D]=(0,G.useState)(``),[O,k]=(0,G.useState)(``),[A,j]=(0,G.useState)(!1),[ee,te]=(0,G.useState)(!1),[M,N]=(0,G.useState)(null),[P,ne]=(0,G.useState)(!1),[F,re]=(0,G.useState)(!1),I=1e3,L=i.length>0,R=g===`legal-contract`,ie=(0,G.useMemo)(()=>i.reduce((e,t)=>e+t.file.size,0),[i]),z=(0,G.useMemo)(()=>L?jt(ie):`0 B`,[L,ie]),ae=(0,G.useMemo)(()=>R?v.trim().length>0&&b.trim().length>0:!0,[R,v,b]),oe=(0,G.useMemo)(()=>L?ae?3:2:1,[L,ae]),se=(0,G.useMemo)(()=>oe===1?R?`Attach your agreement, annexes, and evidence`:`Attach the media or files you want to seal`:oe===2?R?`Describe the agreement and parties`:`Add context: caption, link, and tags`:R?`Review and seal as a legal record`:`Review and seal to the KaiVoh stream`,[oe,R]),B=(0,G.useCallback)(()=>{n.current&&=(URL.revokeObjectURL(n.current),null),r.current=null},[]);(0,G.useEffect)(()=>()=>{B()},[B]);let ce=(0,G.useCallback)((e,t)=>{let i=t!==null&&e.some(e=>e.id===t)?t:Ft(e);if(s(i),!i){c&&(B(),l(null)),u!==`file`&&d(`file`);return}let a=e.find(e=>e.id===i)??null;if(!a){c&&(B(),l(null)),u!==`file`&&d(`file`);return}if(a.kind===`image`||a.kind===`video`){let e=a.kind;u!==e&&d(e);let t=It(a.file);if(!(i===o&&r.current===t&&typeof c==`string`&&c.length>0)){B();let e=URL.createObjectURL(a.file);n.current=e,r.current=t,l(e)}return}u!==`file`&&d(`file`),c&&(B(),l(null))},[B,o,u,c,s,d,l]),V=(0,G.useCallback)(()=>{a([]),s(null),B(),l(null),d(`file`),p(``),h(``),_(`general`),y(``),x(``),C(``),T(``),D(``),k(``),j(!1),te(!1),N(null),re(!1),t.current&&(t.current.value=``)},[B]),le=(0,G.useCallback)(e=>{let t=Array.isArray(e)?e:Array.from(e);if(t.length===0)return;let n=!1,r=!1,s=[...i];for(let e of t){if(s.length>=At){r=!0;break}if(e.size>kt){n=!0;continue}if(s.some(t=>t.file.name===e.name&&t.file.size===e.size&&t.file.lastModified===e.lastModified))continue;let t=Mt(e),i={id:Pt(e),file:e,kind:t};s=[...s,i]}s.length===i.length&&!n?r||N(`No new files were added (duplicates or all invalid).`):N(null),n?N(`Some files were too large. Max individual file size is ${jt(kt)}.`):r&&N(`You can attach up to ${At} files per sealed post. Remove one to add another.`),a(s),ce(s,o)},[i,o,ce]),ue=e=>{let t=e.target.files;!t||t.length===0||le(t)},de=e=>{e.preventDefault(),e.stopPropagation(),ne(!1);let t=e.dataTransfer.files;!t||t.length===0||le(t)},H=e=>{e.preventDefault(),e.stopPropagation()},fe=e=>{e.preventDefault(),e.stopPropagation(),ne(!0)},pe=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget===e.target&&ne(!1)},U=()=>{t.current?.click()},me=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),U())},W=e=>{let t=i.filter(t=>t.id!==e);a(t),ce(t,o===e?null:o)},he=e=>{s(e),ce(i,e)},ge=()=>{if(!L){N(`Attach at least one file to seal.`);return}if(R&&!ae){N(`Fill in the agreement title and counterparty to seal legally.`);return}let t=m.trim();if(t.length>0)try{new URL(t)}catch{N(`The link URL looks invalid. Please check it.`);return}let n=(o?i.find(e=>e.id===o):null)??i[0]??null;if(!n){N(`Something went wrong selecting the primary attachment.`);return}let r=f.trim(),a=R?{agreementTitle:v.trim()||void 0,counterpartyName:b.trim()||void 0,counterpartyEmail:S.trim()||void 0,jurisdiction:w.trim()||void 0,effectiveDateIso:E||void 0,referenceCode:O.trim()||void 0,isConfidential:A,includesPersonalData:ee}:void 0;re(!0),e({mediaType:n.kind===`image`||n.kind===`video`?n.kind:`file`,file:n.file,caption:r.length>0?r:void 0,attachments:i,mainAttachmentId:n.id,postKind:g,legalMeta:a,linkUrl:t.length>0?t:void 0})},_e=(0,G.useMemo)(()=>{if(!L)return null;let e=i.length;return`${e===1?`1 attached file`:`${e} attached files total`} • ${z}`},[i,L,z]);return(0,K.jsxs)(`div`,{className:`kv-post-composer flex flex-col items-center gap-4 p-6 w-full`,children:[(0,K.jsxs)(`div`,{className:`kv-post-header w-full max-w-xl flex flex-col gap-2`,children:[(0,K.jsxs)(`div`,{className:`kv-post-step-row flex items-center justify-between`,children:[(0,K.jsxs)(`div`,{className:`kv-post-step-badge`,children:[(0,K.jsx)(`span`,{className:`kv-post-step-number`,children:oe}),(0,K.jsx)(`span`,{className:`kv-post-step-label`,children:se})]}),L&&(0,K.jsx)(`button`,{type:`button`,className:`kv-post-reset-btn`,onClick:V,children:`Reset`})]}),(0,K.jsx)(`p`,{className:`kv-post-subtitle`,children:`Attach images, videos, PDFs, DOCX, ZIPs—anything you want sealed to your Kai-Signature. For contracts, add parties and jurisdiction so this becomes a usable, timestamped record.`}),(0,K.jsxs)(`div`,{className:`kv-post-kind-row flex flex-wrap items-center gap-3 mt-1`,children:[(0,K.jsx)(`label`,{className:`kv-post-kind-label`,htmlFor:`kv-post-kind`,children:`Intent`}),(0,K.jsxs)(`select`,{id:`kv-post-kind`,className:`kv-post-kind-select`,value:g,onChange:e=>_(e.target.value),children:[(0,K.jsx)(`option`,{value:`general`,children:`General post / media`}),(0,K.jsx)(`option`,{value:`legal-contract`,children:`Legal contract / agreement`}),(0,K.jsx)(`option`,{value:`evidence`,children:`Evidence / proof bundle`}),(0,K.jsx)(`option`,{value:`announcement`,children:`Public announcement / notice`}),(0,K.jsx)(`option`,{value:`private-note`,children:`Private note / internal record`})]})]})]}),M&&(0,K.jsx)(`div`,{className:`kv-post-error w-full max-w-xl`,role:`alert`,children:M}),(0,K.jsx)(`div`,{className:`w-full max-w-xl`,children:(0,K.jsx)(`div`,{className:[`kv-post-dropzone`,P?`kv-post-dropzone--dragging`:``,L?`kv-post-dropzone--has-media`:``].join(` `).trim(),tabIndex:0,role:`button`,"aria-label":`Choose or drop files to attach`,onClick:U,onKeyDown:me,onDragOver:H,onDragEnter:fe,onDragLeave:pe,onDrop:de,children:(0,K.jsxs)(`div`,{className:`kv-post-dropzone-inner`,children:[(0,K.jsx)(`div`,{className:`kv-post-dropzone-icon`,children:L?`🔄`:P?`🌀`:`📁`}),(0,K.jsxs)(`div`,{className:`kv-post-dropzone-text`,children:[(0,K.jsx)(`div`,{className:`kv-post-dropzone-title`,children:L?`Add or replace attached files`:`Tap or drop files to start`}),(0,K.jsx)(`div`,{className:`kv-post-dropzone-hint`,children:`Images, videos, PDFs, DOCX, ZIPs, audio, and more • Drag & drop or tap to choose`}),(0,K.jsxs)(`div`,{className:`kv-post-dropzone-meta`,children:[`Max `,At,` files • `,jt(kt),` per file`]})]})]})})}),L&&(0,K.jsxs)(`div`,{className:`kv-post-body w-full max-w-xl mt-2`,children:[c&&(0,K.jsxs)(`div`,{className:`kv-post-preview`,children:[u===`image`&&(0,K.jsx)(`img`,{src:c,alt:`Primary attachment preview`,className:`kv-post-preview-media`}),u===`video`&&(0,K.jsx)(`video`,{src:c,controls:!0,className:`kv-post-preview-media`})]}),(0,K.jsxs)(`div`,{className:`kv-post-attachments`,children:[(0,K.jsxs)(`div`,{className:`kv-post-attachments-header flex justify-between items-center`,children:[(0,K.jsx)(`div`,{className:`kv-post-attachments-title`,children:`Attachments`}),_e&&(0,K.jsx)(`div`,{className:`kv-post-attachments-summary`,children:_e})]}),(0,K.jsx)(`ul`,{className:`kv-post-attachments-list`,children:i.map(e=>{let t=e.id===o;return(0,K.jsxs)(`li`,{className:[`kv-post-attachment-item`,t?`kv-post-attachment-item--primary`:``].join(` `).trim(),children:[(0,K.jsxs)(`div`,{className:`kv-post-attachment-main`,children:[(0,K.jsx)(`div`,{className:`kv-post-attachment-name`,children:e.file.name}),(0,K.jsxs)(`div`,{className:`kv-post-attachment-meta`,children:[(0,K.jsxs)(`span`,{children:[Nt[e.kind],` • `,jt(e.file.size)]}),t&&(0,K.jsx)(`span`,{className:`kv-post-attachment-pill`,children:`Primary`})]})]}),(0,K.jsxs)(`div`,{className:`kv-post-attachment-actions`,children:[!t&&(0,K.jsx)(`button`,{type:`button`,className:`kv-post-attachment-btn`,onClick:()=>he(e.id),children:`Set as primary`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-post-attachment-btn kv-post-attachment-btn--danger`,onClick:()=>W(e.id),children:`Remove`})]})]},e.id)})})]}),(0,K.jsxs)(`div`,{className:`kv-post-caption-block mt-4`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-post-caption`,className:`kv-post-caption-label`,children:`Caption / description (optional)`}),(0,K.jsx)(`textarea`,{id:`kv-post-caption`,placeholder:R?`Summarize what this agreement covers, key obligations, or why you are sealing it now…`:`Describe the moment, the pulse, or what this bundle of files represents…`,className:`kv-post-caption-textarea`,rows:3,maxLength:I,value:f,onChange:e=>p(e.target.value)}),(0,K.jsx)(`div`,{className:`kv-post-caption-footer`,children:(0,K.jsxs)(`span`,{className:`kv-post-caption-count`,children:[f.length,`/`,I]})})]}),(0,K.jsxs)(`div`,{className:`kv-post-link-block mt-4`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-post-link`,className:`kv-post-link-label`,children:`Canonical URL (optional)`}),(0,K.jsx)(`input`,{id:`kv-post-link`,type:`url`,inputMode:`url`,placeholder:`https://… (DMS link, IPFS URL, external system reference)`,className:`kv-post-link-input`,value:m,onChange:e=>h(e.target.value)}),(0,K.jsx)(`p`,{className:`kv-post-link-hint`,children:`This can point to the master copy of the contract, folder, or evidence bundle. It will be sealed alongside the files.`})]}),g===`legal-contract`&&(0,K.jsxs)(`div`,{className:`kv-post-legal-block mt-6`,children:[(0,K.jsx)(`div`,{className:`kv-post-legal-header`,children:`Legal details for this agreement`}),(0,K.jsxs)(`div`,{className:`kv-post-legal-grid`,children:[(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsxs)(`label`,{htmlFor:`kv-legal-title`,className:`kv-post-legal-label`,children:[`Agreement title `,(0,K.jsx)(`span`,{className:`kv-post-legal-required`,children:`*`})]}),(0,K.jsx)(`input`,{id:`kv-legal-title`,type:`text`,className:`kv-post-legal-input`,placeholder:`e.g. Master Services Agreement, NDA, Licensing Deal…`,value:v,onChange:e=>y(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsxs)(`label`,{htmlFor:`kv-legal-counterparty`,className:`kv-post-legal-label`,children:[`Counterparty name `,(0,K.jsx)(`span`,{className:`kv-post-legal-required`,children:`*`})]}),(0,K.jsx)(`input`,{id:`kv-legal-counterparty`,type:`text`,className:`kv-post-legal-input`,placeholder:`Person or organization`,value:b,onChange:e=>x(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-email`,className:`kv-post-legal-label`,children:`Counterparty contact (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-email`,type:`email`,className:`kv-post-legal-input`,placeholder:`Email or contact handle`,value:S,onChange:e=>C(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-jurisdiction`,className:`kv-post-legal-label`,children:`Jurisdiction (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-jurisdiction`,type:`text`,className:`kv-post-legal-input`,placeholder:`e.g. Ontario, Canada • Delaware, USA • EU-wide…`,value:w,onChange:e=>T(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-effective`,className:`kv-post-legal-label`,children:`Effective date (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-effective`,type:`date`,className:`kv-post-legal-input`,value:E,onChange:e=>D(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-field`,children:[(0,K.jsx)(`label`,{htmlFor:`kv-legal-ref`,className:`kv-post-legal-label`,children:`Reference code (optional)`}),(0,K.jsx)(`input`,{id:`kv-legal-ref`,type:`text`,className:`kv-post-legal-input`,placeholder:`Internal ID, contract number, matter code…`,value:O,onChange:e=>k(e.target.value)})]})]}),(0,K.jsxs)(`div`,{className:`kv-post-legal-flags mt-3`,children:[(0,K.jsxs)(`label`,{className:`kv-post-legal-flag`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:A,onChange:e=>j(e.target.checked)}),(0,K.jsx)(`span`,{children:`This agreement is confidential`})]}),(0,K.jsxs)(`label`,{className:`kv-post-legal-flag`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:ee,onChange:e=>te(e.target.checked)}),(0,K.jsx)(`span`,{children:`This bundle includes personal data (names, addresses, IDs, etc.)`})]})]}),(0,K.jsx)(`p`,{className:`kv-post-legal-hint mt-2`,children:`These details are sealed as metadata with the files and time pulse, creating a clear, timestamped record of what was agreed and with whom. This does not replace legal advice—use it as a hardened, auditable trail around your contracts.`})]})]}),(0,K.jsx)(`div`,{className:`kv-post-actions w-full max-w-xl mt-4 flex justify-end`,children:(0,K.jsx)(`button`,{type:`button`,className:`kv-post-submit-btn`,onClick:ge,disabled:!L||F,children:F?`Sealing…`:`Seal with Breath`})}),(0,K.jsx)(`input`,{id:`kv-post-file-input`,type:`file`,multiple:!0,accept:`*/*`,ref:t,onChange:ue,className:`kv-post-file-input`})]})}var Rt=y(((e,t)=>{var n=`Input must be an string, Buffer or Uint8Array`;function r(e){let t;if(e instanceof Uint8Array)t=e;else if(typeof e==`string`)t=new TextEncoder().encode(e);else throw Error(n);return t}function i(e){return Array.prototype.map.call(e,function(e){return(e<16?`0`:``)+e.toString(16)}).join(``)}function a(e){return(4294967296+e).toString(16).substring(1)}function o(e,t,n){let r=` +`+e+` = `;for(let i=0;i{var n=Rt();function r(e,t,n){let r=e[t]+e[n],i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function i(e,t,n,r){let i=e[t]+n;n<0&&(i+=4294967296);let a=e[t+1]+r;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,a,o,s){let c=u[o],d=u[o+1],f=u[s],p=u[s+1];r(l,e,t),i(l,e,c,d);let m=l[a]^l[e],h=l[a+1]^l[e+1];l[a]=h,l[a+1]=m,r(l,n,a),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=m>>>24^h<<8,l[t+1]=h>>>24^m<<8,r(l,e,t),i(l,e,f,p),m=l[a]^l[e],h=l[a+1]^l[e+1],l[a]=m>>>16^h<<16,l[a+1]=h>>>16^m<<16,r(l,n,a),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=h>>>31^m<<1,l[t+1]=m>>>31^h<<1}var s=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return e*2})),l=new Uint32Array(32),u=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=s[n];for(l[24]^=e.t,l[25]^=e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)u[n]=a(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,c[n*16+0],c[n*16+1]),o(2,10,18,26,c[n*16+2],c[n*16+3]),o(4,12,20,28,c[n*16+4],c[n*16+5]),o(6,14,22,30,c[n*16+6],c[n*16+7]),o(0,10,20,30,c[n*16+8],c[n*16+9]),o(2,12,22,24,c[n*16+10],c[n*16+11]),o(4,14,16,26,c[n*16+12],c[n*16+13]),o(6,8,18,28,c[n*16+14],c[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(e,t,n,r){if(e===0||e>64)throw Error(`Illegal output length, expected 0 < length <= 64`);if(t&&t.length>64)throw Error(`Illegal key, expected Uint8Array with 0 < length <= 64`);if(n&&n.length!==16)throw Error(`Illegal salt, expected Uint8Array with length is 16`);if(r&&r.length!==16)throw Error(`Illegal personal, expected Uint8Array with length is 16`);let i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};f.fill(0),f[0]=e,t&&(f[1]=t.length),f[2]=1,f[3]=1,n&&f.set(n,32),r&&f.set(r,48);for(let e=0;e<16;e++)i.h[e]=s[e]^a(f,e*4);return t&&(m(i,t),i.c=128),i}function m(e,t){for(let n=0;n>2]>>8*(n&3);return t}function g(e,t,r,i,a){r||=64,e=n.normalizeInput(e),i&&=n.normalizeInput(i),a&&=n.normalizeInput(a);let o=p(r,t,i,a);return m(o,e),h(o)}function _(e,t,r,i,a){let o=g(e,t,r,i,a);return n.toHex(o)}t.exports={blake2b:g,blake2bHex:_,blake2bInit:p,blake2bUpdate:m,blake2bFinal:h}})),Bt=y(((e,t)=>{var n=Rt();function r(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function i(e,t,n,r,i,o){c[e]=c[e]+c[t]+i,c[r]=a(c[r]^c[e],16),c[n]=c[n]+c[r],c[t]=a(c[t]^c[n],12),c[e]=c[e]+c[t]+o,c[r]=a(c[r]^c[e],8),c[n]=c[n]+c[r],c[t]=a(c[t]^c[n],7)}function a(e,t){return e>>>t^e<<32-t}var o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),s=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),c=new Uint32Array(16),l=new Uint32Array(16);function u(e,t){let n=0;for(n=0;n<8;n++)c[n]=e.h[n],c[n+8]=o[n];for(c[12]^=e.t,c[13]^=e.t/4294967296,t&&(c[14]=~c[14]),n=0;n<16;n++)l[n]=r(e.b,4*n);for(n=0;n<10;n++)i(0,4,8,12,l[s[n*16+0]],l[s[n*16+1]]),i(1,5,9,13,l[s[n*16+2]],l[s[n*16+3]]),i(2,6,10,14,l[s[n*16+4]],l[s[n*16+5]]),i(3,7,11,15,l[s[n*16+6]],l[s[n*16+7]]),i(0,5,10,15,l[s[n*16+8]],l[s[n*16+9]]),i(1,6,11,12,l[s[n*16+10]],l[s[n*16+11]]),i(2,7,8,13,l[s[n*16+12]],l[s[n*16+13]]),i(3,4,9,14,l[s[n*16+14]],l[s[n*16+15]]);for(n=0;n<8;n++)e.h[n]^=c[n]^c[n+8]}function d(e,t){if(!(e>0&&e<=32))throw Error(`Incorrect output length, should be in [1, 32]`);let n=t?t.length:0;if(t&&!(n>0&&n<=32))throw Error(`Incorrect key length, should be in [1, 32]`);let r={h:new Uint32Array(o),b:new Uint8Array(64),c:0,t:0,outlen:e};return r.h[0]^=16842752^n<<8^e,n>0&&(f(r,t),r.c=64),r}function f(e,t){for(let n=0;n>2]>>8*(n&3)&255;return t}function m(e,t,r){r||=32,e=n.normalizeInput(e);let i=d(r,t);return f(i,e),p(i)}function h(e,t,r){let i=m(e,t,r);return n.toHex(i)}t.exports={blake2s:m,blake2sHex:h,blake2sInit:d,blake2sUpdate:f,blake2sFinal:p}})),Vt=I(y(((e,t)=>{var n=zt(),r=Bt();t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal}}))(),1),Ht=5236,Ut=50;function Wt(e){return e===`root`||e===`sacral`||e===`solar`||e===`heart`||e===`throat`||e===`thirdEye`||e===`crown`||e===`krown`}function Gt({post:e,identityKaiSignature:t,userPhiKey:n,onSealComplete:r}){let[i,a]=(0,G.useState)(`idle`),[s,c]=(0,G.useState)(0),[l,d]=(0,G.useState)(null),f=(0,G.useRef)(null),p=(0,G.useRef)(!1),m=(0,G.useRef)(0),h=(0,G.useRef)(!0),g=(0,G.useMemo)(()=>Ht*2,[]);(0,G.useEffect)(()=>(h.current=!0,()=>{h.current=!1,f.current!=null&&window.clearInterval(f.current)}),[]);let _=()=>{f.current!=null&&(window.clearInterval(f.current),f.current=null)},v=()=>{if(!p.current){if(!t.trim()){d(`Missing identityKaiSignature (session signature). Please re-login.`),a(`idle`),c(0);return}_(),d(null),a(`inhale`),c(0),p.current=!1,m.current=0,f.current=window.setInterval(()=>{m.current+=Ut;let e=m.current;if(e{if(!p.current){p.current=!0;try{let i=t.trim();if(!i)throw Error(`Missing identityKaiSignature (session signature).`);let s=await u(void 0,new o({ignoreOverride:!0})),c=Number(s.pulse??0),l=Wt(s.chakraDay)?s.chakraDay:null,d=e.file?.name??`unknown`,f=Vt.default.blake2bHex(`${d}-${c}`,void 0,16);if(r({pulse:c,kaiSignature:i,chakraDay:l,post:e,userPhiKey:n??null,kksNonce:f}),!h.current)return;a(`sealed`)}catch(e){p.current=!1;let t=e instanceof Error?e.message:`Failed to seal with live Kai pulse. Please try again.`;if(!h.current)return;d(t),a(`idle`),c(0)}}},b=(()=>{if(l)return`Error`;switch(i){case`idle`:return`Ready to Breathe`;case`inhale`:return`Inhale`;case`exhale`:return`Exhale`;case`sealed`:return`Sealed in Kairos`;default:return`Breath`}})(),x=Math.round(Math.min(s,.5)*200),S=Math.round(Math.max(s-.5,0)*200),C=(()=>{if(l)return l;switch(i){case`idle`:return`Tap begin, inhale as the orb expands, exhale as it returns to stillness. We’ll seal at the end of your exhale.`;case`inhale`:return`Inhale slowly… ${x}%`;case`exhale`:return`Exhale and let go… ${50+S}% — sealing this breath into KaiOS.`;case`sealed`:return`Sealed on a live Kai pulse. Advancing to embed…`;default:return``}})(),w=(()=>{if(l)return`⚠️`;switch(i){case`idle`:return`🌬`;case`inhale`:return`🫁`;case`exhale`:return`🌀`;case`sealed`:return`✨`;default:return`🌬`}})(),T=e.file?.name&&e.file.name.length>40?`${e.file.name.slice(0,22)}…${e.file.name.slice(-12)}`:e.file?.name??`Unnamed glyph`;return(0,K.jsxs)(`div`,{className:`kv-breath-root`,"data-phase":i,"aria-live":`polite`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-meta`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-meta-left`,children:[(0,K.jsx)(`span`,{className:`kv-breath-pill`,children:`Breath Seal • φ 5.236s`}),(0,K.jsx)(`span`,{className:`kv-breath-file`,title:e.file?.name,children:T})]}),(0,K.jsx)(`div`,{className:`kv-breath-meta-right`,children:(0,K.jsx)(`span`,{className:`kv-breath-tag`,children:`Live Kai Pulse`})})]}),(0,K.jsxs)(`div`,{className:`kv-breath-orb-row`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-orb`,"aria-label":`Breath phase: ${b}`,children:[(0,K.jsx)(`div`,{className:`kv-breath-orb-inner`,children:(0,K.jsx)(`span`,{className:`kv-breath-orb-emoji`,children:w})}),(0,K.jsx)(`div`,{className:`kv-breath-orb-ring`,style:{"--kv-breath-progress":s}})]}),(0,K.jsxs)(`div`,{className:`kv-breath-status`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-status-row`,children:[(0,K.jsx)(`span`,{className:`kv-breath-status-label`,children:b}),(0,K.jsxs)(`span`,{className:`kv-breath-status-percent`,children:[Math.round(s*100),`%`]})]}),(0,K.jsx)(`p`,{className:`kv-breath-status-text`,children:C}),(0,K.jsxs)(`div`,{className:`kv-breath-bars`,children:[(0,K.jsxs)(`div`,{className:`kv-breath-bar`,children:[(0,K.jsx)(`span`,{className:`kv-breath-bar-label`,children:`Inhale`}),(0,K.jsx)(`div`,{className:`kv-breath-bar-track`,"aria-hidden":`true`,children:(0,K.jsx)(`div`,{className:`kv-breath-bar-fill kv-breath-bar-fill--inhale`,style:{width:`${x}%`}})})]}),(0,K.jsxs)(`div`,{className:`kv-breath-bar`,children:[(0,K.jsx)(`span`,{className:`kv-breath-bar-label`,children:`Exhale`}),(0,K.jsx)(`div`,{className:`kv-breath-bar-track`,"aria-hidden":`true`,children:(0,K.jsx)(`div`,{className:`kv-breath-bar-fill kv-breath-bar-fill--exhale`,style:{width:`${S}%`}})})]})]})]})]}),(0,K.jsxs)(`div`,{className:`kv-breath-actions`,children:[i===`idle`&&!p.current&&!l&&(0,K.jsx)(`button`,{type:`button`,onClick:v,className:`kv-breath-btn kv-breath-btn-primary`,children:`Begin Breath`}),l&&i===`idle`&&(0,K.jsx)(`button`,{type:`button`,onClick:v,className:`kv-breath-btn kv-breath-btn-warning`,children:`Retry Breath Seal`}),i!==`idle`&&i!==`sealed`&&!l&&(0,K.jsx)(`button`,{type:`button`,className:`kv-breath-btn kv-breath-btn-ghost`,disabled:!0,children:`Sealing on this exhale…`}),i===`sealed`&&(0,K.jsx)(`div`,{className:`kv-breath-sealed-note`,children:`Sealed. The stream will remember this breath forever.`})]})]})}function Kt(e){let t=e.trim();return(t.startsWith(`0x`)||t.startsWith(`0X`))&&(t=t.slice(2)),/^[0-9a-fA-F]+$/.test(t)&&(t=t.toLowerCase()),t}var qt=`http://www.w3.org/2000/svg`;async function Jt(e){let t=typeof e==`string`?e:JSON.stringify(e),n=new TextEncoder().encode(t),r=await crypto.subtle.digest(`SHA-256`,n),i=new Uint8Array(r),a=``;for(let e=0;e0?s=o.item(0):(s=t.createElementNS(qt,`metadata`),a.appendChild(s)),s.textContent=JSON.stringify(i,null,2);let c=new XMLSerializer().serializeToString(t);return{type:`image`,content:new Blob([c],{type:`image/svg+xml`}),filename:`sigil-${r}.svg`,metadata:i}}return n.mediaType===`image`?{type:`image`,content:n.file,filename:n.file.name,metadata:i}:{type:`video`,content:n.file,filename:n.file.name,metadata:i}}function Qt(e){let{baseCaption:t,phiKey:n,kaiSignature:r,pulse:i,chakraDay:a,verifierUrl:o}=e,s=[];return t&&t.trim().length>0&&s.push(t.trim(),``),s.push(`—`),s.push(`Kai-Sigil Proof of Origin`),n&&s.push(`Φ-Key: ${n}`),r&&s.push(`Kai Signature: ${r}`),typeof i==`number`&&s.push(`Pulse: ${i}`),a&&s.push(`Chakra Day: ${a}`),o&&(s.push(``),s.push(`Verify this post: ${o}`)),s.join(` +`)}function $t(e){let{phiKey:t,kaiSignature:n,pulse:r,chakraDay:i,verifierUrl:a}=e,o={phiKey:t??null,kaiSignature:n??null,pulse:typeof r==`number`?r:null,chakraDay:i??null,verifierUrl:a??null};return JSON.stringify(o,null,2)}async function en(e){if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`){await navigator.clipboard.writeText(e);return}let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,`true`),t.style.position=`absolute`,t.style.left=`-9999px`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)}function tn(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}function nn(e,t,n){let r=encodeURIComponent(t),i=n?encodeURIComponent(n):``;switch(e){case`x`:return`https://twitter.com/intent/tweet?text=${r}`;case`linkedin`:return i?`https://www.linkedin.com/sharing/share-offsite/?url=${i}`:`https://www.linkedin.com/feed/?shareActive=true&text=${r}`;case`facebook`:return i?`https://www.facebook.com/sharer/sharer.php?u=${i}`:`https://www.facebook.com/dialog/share?display=popup"e=${r}`;default:return null}}function rn({media:e,suggestedCaption:t,verifierUrl:n,onShared:r,onError:i}){let[a,o]=(0,G.useState)(null),{kaiSignature:s,phiKey:c,pulse:l,chakraDay:u,verifierUrl:d}=e?.metadata??{},f=n??d??void 0,p=(0,G.useMemo)(()=>Qt({baseCaption:t,kaiSignature:s,phiKey:c,pulse:l,chakraDay:u,verifierUrl:f}),[t,s,c,l,u,f]),m=(0,G.useMemo)(()=>$t({phiKey:c,kaiSignature:s,pulse:l,chakraDay:u,verifierUrl:f}),[c,s,l,u,f]),h=typeof navigator<`u`&&typeof navigator.share==`function`,g=(e,t)=>{let n=t instanceof Error?t:Error(String(t??`Unknown error`));i&&i(e,n),o(n.message)},_=e=>{r&&r(e)},v=async t=>{if(!e){o(`No sealed media detected for this pulse yet. Complete Seal & Embed first.`);return}try{if(o(null),t===`copy-caption`){await en(p),o(`Caption copied to clipboard. Paste into your post.`),_(t);return}if(t===`copy-proof`){await en(m),o(`Proof JSON copied. Save it with your post or dev tools.`),_(t);return}if(t===`download`){tn(e.content,e.filename),o(`Sealed glyph downloaded.`),_(t);return}if(t===`system-share`){if(!h){await en(p),o(`System share unavailable; caption copied. Open your app and paste.`),_(t);return}let n=navigator,r={text:p};if(typeof n.canShare==`function`)try{let i=e.type===`image`?`image/svg+xml`:e.type===`video`?`video/mp4`:`text/plain`,a=new File([e.content],e.filename,{type:i}),s={...r,files:[a]};if(n.canShare(s)){await navigator.share(s),o(`Shared via system sheet with media.`),_(t);return}}catch{}await navigator.share(r),o(`Shared via system sheet.`),_(t);return}if(t===`x`||t===`linkedin`||t===`facebook`){let e=nn(t,p,f);if(!e){await en(p),o(`Unable to open share URL; caption copied instead. Paste into your post.`),_(t);return}window.open(e,`_blank`,`noopener,noreferrer`),await en(p),o(`Opened share composer and copied caption. Paste if not auto-filled.`),_(t);return}if(t===`instagram`||t===`tiktok`){tn(e.content,e.filename),await en(p);let n=t===`instagram`?`https://www.instagram.com/`:`https://www.tiktok.com/upload`;window.open(n,`_blank`,`noopener,noreferrer`),o(`Downloaded glyph and copied caption. Opened ${t} — create a new memory, pick the image, and paste the caption.`),_(t);return}await en(p),o(`Caption copied. Paste into your social app.`),_(t)}catch(e){g(t,e)}};return e?(0,K.jsxs)(`section`,{className:`kv-social-connector`,children:[(0,K.jsxs)(`header`,{className:`kv-social-header`,children:[(0,K.jsx)(`h2`,{className:`kv-social-title`,children:`Share Your Kai-Sigil Post`}),(0,K.jsx)(`p`,{className:`kv-social-subtitle`,children:`Every share includes a verifiable Kai-Sigil proof so anyone can confirm this post was sealed by your Φ-Key.`})]}),(0,K.jsxs)(`div`,{className:`kv-social-proof`,children:[(0,K.jsxs)(`div`,{className:`kv-social-proof-block`,children:[(0,K.jsx)(`div`,{className:`kv-proof-label`,children:`Preview caption`}),(0,K.jsx)(`pre`,{className:`kv-proof-caption`,"aria-label":`Proof caption preview`,children:p})]}),(0,K.jsxs)(`div`,{className:`kv-social-proof-meta`,children:[(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Φ-Key`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:c??`— (not provided)`})]}),(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Kai Signature`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:s??`— (not provided)`})]}),(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Pulse`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:typeof l==`number`?l:`—`})]}),(0,K.jsxs)(`div`,{className:`kv-proof-meta-row`,children:[(0,K.jsx)(`span`,{className:`kv-proof-meta-label`,children:`Verifier URL`}),(0,K.jsx)(`span`,{className:`kv-proof-meta-value`,children:f??`—`})]})]})]}),(0,K.jsxs)(`div`,{className:`kv-social-actions`,children:[(0,K.jsxs)(`div`,{className:`kv-social-row kv-social-row--primary`,children:[(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-primary`,onClick:()=>void v(`system-share`),children:`System Share (Best on Mobile)`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-ghost`,onClick:()=>void v(`download`),children:`Download Glyph`})]}),(0,K.jsxs)(`div`,{className:`kv-social-row kv-social-row--grid`,children:[(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`x`),children:`Post to X (Twitter)`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`instagram`),children:`Post to Instagram`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`tiktok`),children:`Post to TikTok`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`linkedin`),children:`Post to LinkedIn`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-chip`,onClick:()=>void v(`facebook`),children:`Post to Facebook`})]}),(0,K.jsxs)(`div`,{className:`kv-social-row kv-social-row--secondary`,children:[(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-outline`,onClick:()=>void v(`copy-caption`),children:`Remember Caption with Proof`}),(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-outline`,onClick:()=>void v(`copy-proof`),children:`Remember Proof JSON`})]})]}),a&&(0,K.jsx)(`p`,{className:`kv-social-status`,children:a})]}):(0,K.jsxs)(`section`,{className:`kv-social-connector`,children:[(0,K.jsxs)(`header`,{className:`kv-social-header`,children:[(0,K.jsx)(`h2`,{className:`kv-social-title`,children:`Connect & Share`}),(0,K.jsx)(`p`,{className:`kv-social-subtitle`,children:`Seal a post or glyph first. Once Kai-Sigil has embedded your proof into the media, this panel will unlock full social sharing with verifiable origin.`})]}),(0,K.jsxs)(`p`,{className:`kv-social-status`,children:[`No sealed media detected for this pulse yet. Complete the`,` `,(0,K.jsx)(`strong`,{children:`Seal & Embed`}),` step, then tap`,` `,(0,K.jsx)(`strong`,{children:`Connect Accounts`}),` again.`]}),a&&(0,K.jsx)(`p`,{className:`kv-social-status`,children:a})]})}function an(e){return e===`x`||e===`ig`||e===`tiktok`||e===`threads`}function on(e){return typeof e==`string`&&e.trim().length>0&&(e.startsWith(`http://`)||e.startsWith(`https://`))}function sn(e,t){let n=e[t];return typeof n==`string`&&n.trim().length>0?n.trim():void 0}function cn(e,t){let n=e[t];if(typeof n==`number`&&Number.isFinite(n))return n;if(typeof n==`string`){let e=Number(n);if(Number.isFinite(e))return e}}function ln(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function un(e,t){let n={},r=e??{},i=typeof t?.pulse==`number`&&Number.isFinite(t.pulse)?t.pulse:cn(r,`pulse`);typeof i==`number`&&(n.pulse=i);let a=typeof t?.kaiSignature==`string`&&t.kaiSignature.trim().length>0?t.kaiSignature.trim():sn(r,`kaiSignature`);typeof a==`string`&&(n.kaiSignature=a);let o=typeof t?.phiKey==`string`&&t.phiKey.trim().length>0?t.phiKey.trim():sn(r,`phiKey`);typeof o==`string`&&(n.phiKey=o);let s=M(typeof t?.chakraDay==`string`&&t.chakraDay.trim().length>0?t.chakraDay:sn(r,`chakraDay`));typeof s==`string`&&(n.chakraDay=s);let c=r.verifierUrl,l=t?.verifierUrl,u;on(l)?u=l.trim():on(c)&&(u=c.trim());let d=typeof i==`number`?i:0,f=typeof a==`string`&&a.length>0?a:`unknown-signature`;u||=j(d,f),n.verifierUrl=u;for(let e of[`beat`,`stepIndex`,`step`,`kaiTime`,`kksVersion`,`userPhiKey`,`timestamp`]){let t=r[e];(typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===null)&&(n[e]=t)}return n}function dn(e,t,n){let r=e.pulse,i=typeof r==`number`?r:`∞`,a=(typeof e.kaiSignature==`string`?e.kaiSignature:``).slice(0,10),o=typeof e.phiKey==`string`&&e.phiKey.length>0?e.phiKey:`φK`,s=typeof e.verifierUrl==`string`&&e.verifierUrl.length>0?e.verifierUrl:j(0,`unknown-signature`),c=[`#KaiKlok`,`#SigilProof`,`#PostedByBreath`],l={x:c,ig:[...c,`#HarmonicTime`],tiktok:[...c,`#KaiTime`,`#ForYou`],threads:[...c,`#Threads`]},u=n?` by @${n}`:``;return t===`x`?ln([`🌀 Pulse ${i}${u}`,`Sig:${a}`,`ID:${o}`,`Verify:${s}`,...l.x].join(` • `),270):t===`ig`?[`🌀 Pulse ${i}${u}`,`Sig: ${a}`,`ID: ${o}`,`Verify: ${s}`,``,l.ig.join(` `)].join(` +`):t===`tiktok`?[`Verify: ${s}`,`🌀 Pulse ${i}${u}`,`Sig: ${a} • ID: ${o}`,l.tiktok.join(` `)].join(` +`):[`🌀 Pulse ${i}${u}`,`Sig: ${a} • ID: ${o}`,`Verify: ${s}`,l.threads.join(` `)].join(` +`)}function fn({media:e,proof:t,onComplete:n}){let{session:r}=q(),i=(0,G.useMemo)(()=>{let e=[],t=r?.connectedAccounts;if(!t)return e;for(let[n,r]of Object.entries(t)){if(!r||!an(n))continue;let t=n===`x`?`X / Twitter`:n===`ig`?`Instagram`:n===`tiktok`?`TikTok`:`Threads`;e.push({platform:n,label:t,handle:r})}return e},[r?.connectedAccounts]),a=(0,G.useMemo)(()=>new Set(i.map(e=>e.platform)),[i]),[o,s]=(0,G.useState)({}),c=(0,G.useMemo)(()=>{let e=e=>{if(!a.has(e))return!1;let t=o[e];return typeof t==`boolean`?t:!0};return{x:e(`x`),ig:e(`ig`),tiktok:e(`tiktok`),threads:e(`threads`)}},[a,o]),l=e=>{s(t=>{let n=!(a.has(e)&&(typeof t[e]!=`boolean`||t[e]));return{...t,[e]:n}})},[u,d]=(0,G.useState)(`idle`),[f,p]=(0,G.useState)([]),[m,h]=(0,G.useState)(!1),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(null),b=(0,G.useMemo)(()=>un(e.metadata,t),[e.metadata,t]),x=(0,G.useMemo)(()=>{let t=e.type===`video`?`video`:`image`;return{content:e.content,filename:e.filename,type:t,metadata:b}},[e.content,e.filename,e.type,b]);async function S(t,n){let r=new FormData;r.append(`file`,e.content,e.filename);let i=dn(b,t,n);r.append(`caption`,i),n&&r.append(`handle`,n);let a=await fetch(`/api/post/${t}`,{method:`POST`,body:r});if(!a.ok)throw Error(`POST /api/post/${t} failed: ${a.status}`);return{link:(await a.json()).url??`#`}}let C=async()=>{if(!r)return;let e=i.filter(e=>c[e.platform]);e.length!==0&&(d(`posting`),p([]),p(await Promise.all(e.map(async e=>{try{let t=await S(e.platform,e.handle);return{platform:e.platform,link:t.link}}catch(t){return console.warn(`Post to ${e.platform} failed:`,t),{platform:e.platform,link:`❌ Failed`}}}))),d(`done`))},w=i.length===0||!i.some(e=>c[e.platform]),T=u===`done`||m;return(0,K.jsxs)(`div`,{className:`kv-share-shell flex flex-col gap-6 w-full max-w-2xl`,children:[(0,K.jsxs)(`header`,{className:`kv-share-header`,children:[(0,K.jsx)(`h2`,{className:`kv-share-title`,children:`Broadcast to connected socials`}),(0,K.jsx)(`p`,{className:`kv-share-subtitle`,children:`Post directly to linked accounts, then (or instead) use the manual share hub below to reach any platform — every share carries your Kai-Sigil proof.`})]}),(0,K.jsx)(`section`,{className:`kv-share-broadcast`,children:i.length===0?(0,K.jsx)(`p`,{className:`kv-share-empty`,children:`No platforms connected yet. You can still share manually below.`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`kv-share-connected-label`,children:`Connected accounts`}),(0,K.jsx)(`div`,{className:`grid grid-cols-2 gap-3 w-full`,children:i.map(e=>(0,K.jsxs)(`label`,{className:`flex items-center gap-2 p-3 rounded-lg border cursor-pointer transition ${c[e.platform]?`border-emerald-400 bg-emerald-400/10`:`border-white/20 bg-white/5`}`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`accent-emerald-400`,checked:c[e.platform],onChange:()=>l(e.platform)}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsxs)(`span`,{className:`text-sm font-medium`,children:[e.label,` `,e.handle?`· @${e.handle}`:``]}),(0,K.jsx)(`span`,{className:`text-xs opacity-60`,children:`Auto-post via KaiVoh`})]})]},e.platform))}),(0,K.jsx)(`div`,{className:`mt-3`,children:(0,K.jsx)(`button`,{type:`button`,disabled:w||u===`posting`,onClick:()=>void C(),className:`kv-btn kv-btn-primary ${w||u===`posting`?`kv-btn-disabled`:``}`,children:u===`posting`?`Posting with breath…`:w?`No platforms selected`:`Post to Selected`})}),u===`done`?(0,K.jsxs)(`div`,{className:`kv-share-results mt-3`,children:[(0,K.jsx)(`h3`,{className:`text-xs uppercase tracking-wide opacity-60 mb-2`,children:`Post results`}),(0,K.jsx)(`ul`,{className:`text-sm space-y-1`,children:f.map(e=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2 break-all`,children:[(0,K.jsx)(`span`,{className:`font-semibold min-w-[80px] capitalize`,children:e.platform}),(0,K.jsx)(`span`,{children:`:`}),e.link===`❌ Failed`?(0,K.jsx)(`span`,{className:`text-red-400`,children:e.link}):(0,K.jsx)(`a`,{href:e.link,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:e.link})]},e.platform))})]}):null]})}),(0,K.jsxs)(`section`,{className:`kv-share-manual`,children:[(0,K.jsx)(rn,{media:x,onShared:e=>{h(!0),_(e),y(null)},onError:(e,t)=>{y(t.message)}}),g?(0,K.jsxs)(`p`,{className:`kv-share-status text-xs opacity-70 mt-2`,children:[`Last shared via `,(0,K.jsx)(`span`,{className:`font-semibold`,children:g}),`.`]}):null,v?(0,K.jsx)(`p`,{className:`kv-share-error text-xs text-red-400 mt-1`,children:v}):null]}),(0,K.jsx)(`footer`,{className:`kv-share-footer mt-4 flex flex-col items-center gap-2`,children:(0,K.jsx)(`button`,{type:`button`,className:`kv-btn kv-btn-primary ${T?``:`kv-btn-disabled`}`,disabled:!T,onClick:()=>{n(f.map(e=>({platform:e.platform,link:e.link})))},children:T?`Continue to Verify`:`Share at least once to continue`})})]})}function pn(e){let t=e.phiKey;if(typeof t==`string`){let e=t.trim();if(e.length>0)return e}if(t&&typeof t==`object`){if(`id`in t&&typeof t.id==`string`){let e=t.id.trim();if(e.length>0)return e}if(`key`in t&&typeof t.key==`string`){let e=t.key.trim();if(e.length>0)return e}if(`address`in t&&typeof t.address==`string`){let e=t.address.trim();if(e.length>0)return e}if(`userPhiKey`in t&&typeof t.userPhiKey==`string`){let e=t.userPhiKey.trim();if(e.length>0)return e}}return typeof e.kaiSignature==`string`&&e.kaiSignature.length?`φK-${e.kaiSignature.slice(0,8)}`:`φK-unknown`}function mn(t){let n=t.pulse,a=t.postLedger&&t.postLedger.length>0?t.postLedger.reduce((e,t)=>t.pulse>e?t.pulse:e,t.postLedger[0].pulse):n,o=a,s=a,u=r(o),d=u.stepIndex,f=u.beat,p=w(t.chakraDay??u.chakraDay),m=d%44/44,h=Math.max(0,Math.min(1,m)),g=_[p],v=F[p],{sides:y,hue:b}=g,S=o%7+1,C=f%5+2,T=h*2*Math.PI,E=oe**2*Math.PI*(o%97)%(2*Math.PI),D=50+15*Math.sin(h*2*Math.PI),k=te((b+360*.03*h)%360,100,D),A=O(y,E),j=V(S,C,T),ee=x*.009,M=x*.016,N=R(p,d),P=pn(t),ne=e(void 0,f,d,o),re=Array.from(P).reduce((e,t)=>(e*131+t.charCodeAt(0))%104729,0),I=x*.31,L=Array.from({length:12}).map((e,t)=>{let n=(t+re%100/100)/12,r=n*2*Math.PI,i=I*(1+re%7/100*Math.sin(2*Math.PI*n*oe)),a=500+i*Math.cos(r),o=500+i*Math.sin(r),s=M*(.5+.5*Math.sin(2*Math.PI*n*oe));return` `}).join(` +`),ie=new Date().toISOString(),z={"@context":i,type:l,kksVersion:`KKS-1.0`,kind:`KaiVohSessionMemory`,logoutSigil:!0,pulse:o,beat:f,stepIndex:d,stepsPerBeat:44,chakraDay:p,chakraGate:v,frequencyHz:N,pulseMs:c,userPhiKey:P,sessionKaiSignature:t.kaiSignature,phiKey:P,originPulse:n,exhalePulse:s,sigilPulse:o,kaiPulse:s,connectedAccounts:t.connectedAccounts??{},postLedger:t.postLedger??[],summary:ne,createdAt:ie};return` + + ${`KaiVoh Memory • Φ-Key ${P} • p${n}→p${s}`} + ${ne} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +${L} + + + + +${JSON.stringify(z,null,2)} + +`.trim()}function hn(e,t){let n=new Blob([t],{type:`image/svg+xml`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}var gn=e=>{if(!e)return null;if(Array.isArray(e)){let t=e[0];return t==null?null:String(t)}if(typeof e==`string`){try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t[0];return e==null?null:String(e)}}catch{return e}return e}return null};function _n(e){return typeof e==`object`&&!!e}function vn(e){return _n(e)&&typeof e.pulse==`number`&&typeof e.platform==`string`&&typeof e.link==`string`}function yn(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)vn(n)&&t.push(n);return t}function bn(e){if(!_n(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function xn(e){if(!_n(e))return null;let t=e.kaiSignature,n=e.pulse;return typeof t!=`string`||typeof n!=`number`?null:{kaiSignature:t,pulse:n,chakraDay:typeof e.chakraDay==`string`?e.chakraDay:void 0,userPhiKey:typeof e.userPhiKey==`string`?e.userPhiKey:void 0,connectedAccounts:bn(e.connectedAccounts),postLedger:yn(e.postLedger)}}var Sn=/^[1-9A-HJ-NP-Za-km-z]+$/;function Cn(e){return Sn.test(e)&&e.length>=26&&e.length<=64}var wn=[`connect`,`compose`,`seal`,`embed`,`share`,`verify`],Tn={login:`Login`,connect:`KaiVoh`,compose:`Compose`,seal:`Seal Breath`,embed:`Embed Signature`,share:`Share`,verify:`Verify`};function En(e){return e?e.length<=10?e:`${e.slice(0,5)}…${e.slice(-4)}`:`—`}function Dn(e){let t=e||`Crown`;return`kv-chakra-${{Root:`root`,Sacral:`sacral`,"Solar Plexus":`solar`,Heart:`heart`,Throat:`throat`,"Third Eye":`brow`,Crown:`crown`}[t]??t.toLowerCase().replace(/\s+/g,`-`).replace(/[^a-z0-9-]/g,``)}`}function On(e){if(e==null||!Number.isFinite(e)||e<=0)return`0.0s`;let t=e/1e3;return t<1?`${t.toFixed(2)}s`:t<10?`${t.toFixed(1)}s`:`${t.toFixed(0)}s`}function kn(e){let t=e.lastIndexOf(`.`);if(t<=0||t>=e.length-1)return``;let n=e.slice(t);return n.length>12?``:n}var An=`http://www.w3.org/2000/svg`;async function jn(e,t){hn(e,await t.text())}async function Mn(e,t){try{let n=await e.text(),r=new DOMParser().parseFromString(n,`image/svg+xml`);if(r.querySelector(`parsererror`))return e;let i=r.documentElement;if(!i||i.namespaceURI!==An||i.tagName.toLowerCase()!==`svg`)return e;let a=r.getElementsByTagName(`metadata`),o=a.length>0?a.item(0):r.createElementNS(An,`metadata`);a.length===0&&i.appendChild(o),o.textContent=JSON.stringify(t,null,2);let s=new XMLSerializer().serializeToString(r);return new Blob([s],{type:`image/svg+xml`})}catch{return e}}async function Nn(e,t){try{let n=le(await e.text(),t);return new Blob([n],{type:`image/svg+xml`})}catch{return e}}function Pn({current:e}){let t=wn.indexOf(e);return(0,K.jsx)(`div`,{className:`kv-steps`,children:wn.map((n,r)=>(0,K.jsxs)(`div`,{className:`kv-step`,children:[(0,K.jsxs)(`div`,{className:[`kv-step-chip`,t>=0&&r{if(!e)return;let t=!1,i=async()=>{let e=new Date,i=await f(void 0,e);if(t)return;let o=i.pulse,s=n(o+1),c=Number(s-BigInt(e.getTime()));(!Number.isFinite(c)||c<0)&&(c=0),r(o),a(c)};i();let o=window.setInterval(()=>void i(),250);return()=>{t=!0,window.clearInterval(o)}},[e]),{livePulse:t,msToNextPulse:i}}function In({session:e,step:t,hasConnectedAccounts:n,onLogout:r,onNewPost:i}){let{livePulse:a,msToNextPulse:o}=Fn(!!e),s=e.postLedger?.length??0,c=a??e.pulse,l=On(o);return(0,K.jsxs)(`header`,{className:[`kv-session-hud`,Dn(e.chakraDay)].join(` `),children:[(0,K.jsxs)(`div`,{className:`kv-session-main`,children:[(0,K.jsxs)(`div`,{className:`kv-session-header-row`,children:[(0,K.jsxs)(`div`,{className:`kv-session-title-block`,children:[(0,K.jsx)(`div`,{className:`kv-session-kicker`,children:`KaiVoh · Glyph Session`}),(0,K.jsxs)(`div`,{className:`kv-session-keyline`,children:[(0,K.jsxs)(`span`,{className:`kv-meta-item kv-meta-phikey`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Φ-Key`}),(0,K.jsx)(`span`,{className:`kv-meta-value`,children:En(e.phiKey)})]}),(0,K.jsx)(`span`,{className:`kv-meta-divider`}),(0,K.jsxs)(`span`,{className:`kv-meta-item`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Sigil Pulse`}),(0,K.jsx)(`span`,{className:`kv-meta-value`,children:e.pulse})]}),(0,K.jsx)(`span`,{className:`kv-meta-divider`}),(0,K.jsxs)(`span`,{className:`kv-meta-item`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Chakra`}),(0,K.jsx)(`span`,{className:`kv-meta-value`,children:e.chakraDay??`Crown`})]}),s>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`kv-meta-divider`}),(0,K.jsxs)(`span`,{className:`kv-meta-item kv-meta-activity`,children:[(0,K.jsx)(`span`,{className:`kv-meta-label`,children:`Sealed`}),(0,K.jsxs)(`span`,{className:`kv-meta-value`,children:[s,` `,s===1?`post`:`posts`]})]})]}):null]}),(0,K.jsxs)(`div`,{className:`kv-session-live`,children:[(0,K.jsx)(`span`,{className:`kv-live-label`,children:`Live Kai Pulse`}),(0,K.jsxs)(`span`,{className:`kv-live-value`,children:[c,(0,K.jsxs)(`span`,{className:`kv-live-countdown`,children:[`· next breath in `,l]})]})]})]}),(0,K.jsxs)(`div`,{className:`kv-session-status-block`,children:[(0,K.jsx)(`span`,{className:[`kv-accounts-pill`,n?`kv-accounts-pill--ok`:`kv-accounts-pill--warn`].join(` `),children:n?`Accounts linked`:`Connect accounts`}),(0,K.jsx)(`span`,{className:`kv-step-current-label`,children:Tn[t]??`Flow`})]})]}),(0,K.jsx)(`div`,{className:`kv-session-steps-row`,children:(0,K.jsx)(Pn,{current:t})})]}),(0,K.jsxs)(`div`,{className:`kv-session-actions`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:i,className:`kv-btn kv-btn-primary`,children:`+ Exhale Memory`}),(0,K.jsx)(`button`,{type:`button`,onClick:r,className:`kv-btn kv-btn-ghost`,children:`⏻ Inhale Memories`})]})]})}function Ln({ledger:e}){if(!e||e.length===0)return null;let t=[...e].sort((e,t)=>t.pulse-e.pulse).slice(0,4);return(0,K.jsxs)(`section`,{className:`kv-activity`,children:[(0,K.jsxs)(`div`,{className:`kv-activity-header`,children:[(0,K.jsx)(`span`,{className:`kv-activity-title`,children:`Session Activity`}),(0,K.jsxs)(`span`,{className:`kv-activity-count`,children:[e.length,` total`]})]}),(0,K.jsx)(`div`,{className:`kv-activity-list`,children:t.map(e=>(0,K.jsxs)(`div`,{className:`kv-activity-item`,children:[(0,K.jsxs)(`div`,{className:`kv-activity-item-main`,children:[(0,K.jsx)(`span`,{className:`kv-activity-platform`,children:e.platform}),(0,K.jsxs)(`span`,{className:`kv-activity-pulse`,children:[`Pulse `,(0,K.jsx)(`span`,{children:e.pulse})]})]}),e.link?(0,K.jsx)(`a`,{href:e.link,target:`_blank`,rel:`noreferrer`,className:`kv-activity-link`,children:e.link}):null]},`${e.platform}-${e.pulse}-${e.link}`))})]})}function Rn(){let{session:e,setSession:n,clearSession:r}=q(),[i,a]=(0,G.useState)(`login`),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(null),[f,p]=(0,G.useState)(null),[m,h]=(0,G.useState)(null),g=(0,G.useMemo)(()=>!e||!e.connectedAccounts?!1:Object.keys(e.connectedAccounts).length>0,[e]),_=async(e,r)=>{try{h(null);let e=xn(r);if(!e)throw Error(`Malformed sigil metadata from login.`);let i=await t(e.kaiSignature);if(e.userPhiKey&&e.userPhiKey!==i&&console.warn(`[KaiVoh] Embedded userPhiKey differs from derived; preferring derived from signature.`,{embedded:e.userPhiKey,derived:i}),!Cn(i))throw Error(`Invalid Φ-Key shape after derivation.`);let o=M(e.chakraDay)??`Crown`,s={phiKey:i,kaiSignature:e.kaiSignature,pulse:e.pulse,chakraDay:o,connectedAccounts:e.connectedAccounts??{},postLedger:e.postLedger??[]};n(s),Object.keys(s.connectedAccounts??{}).length>0?a(`compose`):a(`connect`)}catch(e){h(e instanceof Error?e.message:`Invalid Φ-Key signature or metadata.`),a(`login`)}},y=()=>{if(!e)return;let t=mn(e);hn(`sigil-${e.pulse+1}.svg`,t),r(),s(null),l(null),d(null),p(null),h(null),a(`login`)},b=()=>{s(null),l(null),d(null),p(null),h(null),a(`compose`)},x=async()=>{u&&(u.type!==`image`||!u.content.type.includes(`svg`)||await jn(u.filename,u.content))};(0,G.useEffect)(()=>{let n=!1;return(async()=>{if(!(i!==`embed`||!c||!e))try{let r=await Zt(c);if(n)return;let i=e.pulse,o=c.pulse,s=r.metadata,l=(s.kaiSignature??c.kaiSignature??e.kaiSignature??``).trim();if(!l)throw Error(`Missing kaiSignature for embedded proof.`);let u=await t(l);if(e.phiKey&&e.phiKey!==u)throw Error(`Proof mismatch: embedded kaiSignature derives a different Φ-Key than session.`);let f=typeof s.chakraDay==`string`?s.chakraDay:void 0,m=M(c.chakraDay??void 0)??M(f)??M(e.chakraDay??void 0)??`Crown`,h=v(o,l),g=j(o,l),_={v:`KPV-1`,pulse:o,chakraDay:m,kaiSignature:l,phiKey:u,verifierSlug:h},y=await E(_),b={...s,pulse:o,kaiPulse:o,chakraDay:m,kaiSignature:l,phiKey:u,userPhiKey:u,phiKeyShort:`φK-${u.slice(0,8)}`,verifierUrl:g,verifierSlug:h,proofCapsule:_,proofHash:y,capsuleHash:y,hashAlg:P,canon:`JCS`,originPulse:i,sigilPulse:i,exhalePulse:o},x=r.content;r.type===`image`&&x.type.includes(`svg`)&&(x=await Mn(x,b));let C,w,D=null;if(r.type===`image`&&x.type.includes(`svg`)){C=await re(await x.text());let e=typeof b.zkPoseidonHash==`string`?b.zkPoseidonHash:void 0,t=typeof b.zkPoseidonSecret==`string`?b.zkPoseidonSecret:void 0,n=typeof b.payloadHashHex==`string`?b.payloadHashHex:void 0,r=b.zkProof,i=b.proofHints,a=b.zkPublicInputs;if(e){let o=r&&typeof r==`object`?r:null,s=typeof r==`string`?r.trim().length>0:Array.isArray(r)?r.length>0:o?Object.keys(o).length>0:!1,c=typeof t==`string`&&t.trim().length>0?t.trim():void 0;if(!c&&n){let t=await N(n);t.hash===e&&(c=t.secret)}if(!s&&c){let t=await B({poseidonHash:e,secret:c,proofHints:typeof i==`object`&&i?i:void 0});t&&(r=t.proof,i=t.proofHints,a=t.zkPublicInputs)}i=typeof i!=`object`||!i?T(e):T(e,i)}if(e&&a){let t=gn(a);if(t&&t!==e)throw Error(`Embedded ZK mismatch`)}let o=typeof b.shareUrl==`string`?b.shareUrl:void 0,s={v:`KPB-1`,hashAlg:P,canon:`JCS`,proofCapsule:_,capsuleHash:y,svgHash:C,shareUrl:o,verifierUrl:g,zkPoseidonHash:e,zkProof:r,proofHints:i,zkPublicInputs:a};w=await S(ie({...s,authorSig:null}));try{await fe(u),D=await H(u,w)}catch(e){console.warn(`Author signature failed; continuing without authorSig.`,e),D=null}let c={...s,bundleHash:w,authorSig:D};x=await Nn(x,c)}let O=`memory_p${i}_p${o}${kn(r.filename)||kn(c.post.file.name)||(r.type===`video`?`.mp4`:`.svg`)}`;d({...r,content:x,filename:O,metadata:{...b,svgHash:C,bundleHash:w,authorSig:D}}),p({pulse:o,chakraDay:m,kaiSignature:l,phiKey:u,verifierSlug:h,verifierUrl:g,hashAlg:P,canon:`JCS`,capsuleHash:y,svgHash:C??``,bundleHash:w??``,authorSig:D,proofHash:y}),a(`share`)}catch(e){if(n)return;h(e instanceof Error?e.message:`Failed to embed Kai Signature into media.`),a(`compose`)}})(),()=>{n=!0}},[i,c,e]);let C=(t,r)=>{if(!e||t.length===0)return;let i=[...e.postLedger??[],...t.map(e=>({pulse:r,platform:e.platform,link:e.link}))];n({...e,postLedger:i})};return!e||i===`login`?(0,K.jsx)(`div`,{className:`kai-voh-login-shell`,children:(0,K.jsxs)(`main`,{className:`kv-main-card`,children:[(0,K.jsx)(U,{onVerified:_}),m?(0,K.jsx)(`p`,{className:`kv-error`,children:m}):null]})}):(0,K.jsxs)(`div`,{className:`kai-voh-app-shell`,children:[(0,K.jsx)(In,{session:e,step:i,hasConnectedAccounts:g,onLogout:y,onNewPost:b}),(0,K.jsxs)(`main`,{className:`kv-main-card`,children:[(()=>i===`connect`?(0,K.jsxs)(`div`,{className:`kv-connect-step`,children:[(0,K.jsx)(Ot,{}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>a(`compose`),className:`kv-btn kv-btn-primary kv-btn-wide`,children:`Continue to Compose`})]}):i===`compose`&&!o?(0,K.jsx)(Lt,{onReady:e=>{s(e),l(null),d(null),p(null),h(null),a(`seal`)}}):i===`seal`&&o?(0,K.jsx)(Gt,{post:o,identityKaiSignature:e.kaiSignature,userPhiKey:e.phiKey,onSealComplete:e=>{l(e),a(`embed`)}}):i===`embed`?(0,K.jsx)(`p`,{className:`kv-embed-status`,children:`Embedding Kai Signature into your media…`}):i===`share`&&u&&c&&f?(0,K.jsx)(fn,{media:u,proof:f,onComplete:e=>{C(e,c.pulse),a(`verify`)}}):i===`verify`&&f?(0,K.jsxs)(`div`,{className:`kv-verify-step`,children:[(0,K.jsx)(be,{pulse:f.pulse,kaiSignature:f.kaiSignature,phiKey:f.phiKey,chakraDay:f.chakraDay,compact:!1}),(0,K.jsx)(`p`,{className:`kv-verify-copy`,children:`Your memory is now verifiable as human-authored under this Φ-Key. Anyone can scan the QR or open the verifier link to confirm it was sealed at this pulse under your sigil.`}),(0,K.jsxs)(`div`,{className:`kv-verify-actions`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:b,className:`kv-btn kv-btn-primary`,children:`+ Exhale Memory`}),u?.type===`image`&&u.content.type.includes(`svg`)?(0,K.jsx)(`button`,{type:`button`,onClick:()=>void x(),className:`kv-btn kv-btn-ghost`,children:`Download sealed SVG`}):null,(0,K.jsx)(`button`,{type:`button`,onClick:y,className:`kv-btn kv-btn-ghost`,children:`⏻ Inhale Memories`})]})]}):(0,K.jsxs)(`div`,{className:`kv-error-state`,children:[`Something went sideways in the breath stream…`,(0,K.jsx)(`button`,{type:`button`,onClick:b,className:`kv-error-reset`,children:`Reset step`})]}))(),m?(0,K.jsx)(`p`,{className:`kv-error`,children:m}):null]}),e.postLedger&&e.postLedger.length>0?(0,K.jsx)(Ln,{ledger:e.postLedger}):null]})}function zn(){return(0,K.jsx)(Se,{children:(0,K.jsx)(Rn,{})})}export{zn as default}; \ No newline at end of file diff --git a/dist/assets/KaiVohApp-DKKSrc21.css b/dist/assets/KaiVohApp-DKKSrc21.css deleted file mode 100644 index c07cdd2b1..000000000 --- a/dist/assets/KaiVohApp-DKKSrc21.css +++ /dev/null @@ -1 +0,0 @@ -:root{--kv-breath:5.236s;--kv-phi:1.61803;--kv-bg:#020617;--kv-bg-2:#02091b;--kv-ink:#e5f0ff;--kv-muted:#9ca9d4;--kv-cyan:#22d3ee;--kv-violet:#8b5cf6;--kv-gold:#facc6b;--kv-emerald:#34d399;--kv-amber:#fbbf24;--kv-border-soft:#94a3b873;--kv-border-strong:#94a3b8bf;--kv-glass-surface:#0f172ae6}@keyframes kv-shell-breathe{0%{opacity:.55;transform:translate(0,0)scale(1)}50%{opacity:.8;transform:translateY(-1px)scale(1.005)}to{opacity:1;transform:translateY(-2px)scale(1.01)}}@keyframes kv-halo-breathe{0%{opacity:.4;filter:blur()}to{opacity:.9;filter:blur(3px)}}@keyframes kv-pulse-glow{0%{text-shadow:0 0 10px #38bdf899,0 0 #4ade8000}to{text-shadow:0 0 18px #38bdf8e6,0 0 30px #4ade8099}}@keyframes kv-step-glide{0%{transform:translateY(0);box-shadow:0 0 #22d3ee00,0 6px 12px #0f172ae6}to{transform:translateY(-1px);box-shadow:0 0 0 1px #22d3ee99,0 8px 18px #0f172af2}}@keyframes kv-button-breathe{0%{transform:translateY(0);box-shadow:0 10px 26px #0f172af2,inset 0 0 0 1px #0f172ae6}to{transform:translateY(-1px);box-shadow:0 18px 40px #0f172afa,inset 0 0 0 1px #0f172ae6}}@keyframes kv-activity-glow{0%{box-shadow:0 14px 40px #0f172ae6,inset 0 0 0 1px #0f172ae6}to{box-shadow:0 18px 52px #0f172afa,inset 0 0 0 1px #2563ebe6}}@media (prefers-reduced-motion:reduce){*{transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}.kai-voh-login-shell,.kai-voh-app-shell{isolation:isolate;max-width:960px;color:var(--kv-ink);flex-direction:column;gap:1rem;margin-inline:auto;padding-block:1.4rem 2.2rem;padding-inline:.8rem;display:flex;position:relative}.kai-voh-login-shell:before,.kai-voh-app-shell:before{content:"";z-index:-2;opacity:.98;filter:saturate(1.08);background:radial-gradient(80% 120% at 50% 0,#22d3ee38,#0000 70%),radial-gradient(80% 120% at 0 100%,#8b5cf63b,#0000 70%),radial-gradient(60% 100% at 100% 100%,#facc1529,#0000 70%),radial-gradient(120% 120%,#0f172afa,#020617);position:absolute;inset:-40px -24px}.kai-voh-login-shell:after,.kai-voh-app-shell:after{content:"";z-index:-1;pointer-events:none;mix-blend-mode:screen;opacity:.7;animation:kv-shell-breathe var(--kv-breath)ease-in-out infinite alternate;background:conic-gradient(from 130deg,#22d3ee2e,#0000 25%,#8b5cf62e,#0000 65%,#facc1529,#0000);position:absolute;inset:-2px}.kai-voh-login-shell{justify-content:center;min-height:360px}.kai-voh-app-shell{min-height:420px}.kv-main-card{-webkit-backdrop-filter:blur(18px)saturate(1.15);backdrop-filter:blur(18px)saturate(1.15);backface-visibility:hidden;will-change:transform,opacity;background:#0f172af0 linear-gradient(145deg,#0f172afa,#0f172ae6) padding-box padding-box;border:1px solid #94a3b88c;border-radius:1.25rem;padding:1.5rem 1.6rem;position:relative;overflow:hidden;transform:translate(0,0);box-shadow:0 18px 60px #0f172af2,inset 0 0 0 1px #0f172ae6}.kv-main-card:before{content:"";pointer-events:none;opacity:.12;background-image:linear-gradient(90deg,#94a3b838 1px,#0000 1px),linear-gradient(0deg,#94a3b833 1px,#0000 1px);background-size:calc(100%/var(--kv-phi))100%,100% calc(100%/var(--kv-phi));mix-blend-mode:screen;position:absolute;inset:0}.kv-main-card:after{content:"";pointer-events:none;opacity:.7;animation:kv-halo-breathe calc(var(--kv-breath)*.85)ease-in-out infinite alternate;background:radial-gradient(120% 120% at 50% 0,#22d3ee29,#0000 60%);position:absolute;inset:0}.kv-error{text-align:center;color:#fca5a5;margin-top:.75rem;font-size:.75rem}.kv-session-hud{border:1px solid var(--kv-border-soft);-webkit-backdrop-filter:blur(16px)saturate(1.2);backdrop-filter:blur(16px)saturate(1.2);backface-visibility:hidden;will-change:transform,opacity;background:radial-gradient(140% 160% at 0 0,#94a3b838,#0000 60%),#0f172af0 radial-gradient(180% 200% at 100% 100%,#0f172ae0,#0f172afa);border-radius:1.25rem;flex-direction:column;gap:.65rem;padding:.75rem 1rem .85rem;display:flex;position:relative;overflow:hidden;transform:translate(0,0);box-shadow:0 18px 50px #0f172ae6,inset 0 0 0 1px #0f172ae6}.kv-session-main{flex-direction:column;gap:.45rem;display:flex}.kv-session-header-row{flex-direction:column;gap:.35rem;display:flex}.kv-session-title-block{flex-direction:column;gap:.24rem;display:flex}.kv-session-kicker{text-transform:uppercase;letter-spacing:.24em;color:#94a3b8e6;font-size:.66rem}.kv-session-keyline{color:#e2e8f0e6;flex-wrap:wrap;gap:.28rem .65rem;font-size:.74rem;display:flex}.kv-meta-item{align-items:baseline;gap:.25rem;display:inline-flex}.kv-meta-label{text-transform:uppercase;letter-spacing:.18em;color:#94a3b8e6;font-size:.65rem}.kv-meta-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.74rem;font-weight:600}.kv-meta-phikey .kv-meta-value{letter-spacing:.03em}.kv-meta-activity .kv-meta-value{color:var(--kv-emerald)}.kv-meta-divider{background:linear-gradient(#94a3b866,#94a3b81a);align-self:center;width:1px;height:.9rem}.kv-session-status-block{flex-direction:column;align-items:flex-start;gap:.35rem;display:flex}.kv-accounts-pill{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-transform:uppercase;letter-spacing:.14em;backface-visibility:hidden;will-change:transform,opacity;background:#0f172acc;border:1px solid #94a3b8b3;border-radius:999px;padding:.2rem .7rem;font-size:.7rem;transform:translate(0,0)}.kv-accounts-pill--ok{color:#bbf7d0f2;background:radial-gradient(140% 160% at 0 0,#10b9812e,#0000 60%),#0f172ae6;border-color:#34d399cc}.kv-accounts-pill--warn{color:#fef3c7f2;background:radial-gradient(140% 160% at 0 0,#f59e0b38,#0000 60%),#0f172ae6;border-color:#fbbf24d9}.kv-step-current-label{text-transform:uppercase;letter-spacing:.18em;color:#94a3b8eb;font-size:.7rem}.kv-session-live{flex-wrap:wrap;align-items:baseline;gap:.4rem;margin-top:.2rem;font-size:.7rem;display:flex}.kv-live-label{text-transform:uppercase;letter-spacing:.18em;color:#94a3b8f2;font-size:.6rem}.kv-live-value{color:#e2e8fffa;animation:kv-pulse-glow var(--kv-breath)ease-in-out infinite alternate;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:600}.kv-live-countdown{color:#6ee7b7;margin-left:.25rem;font-weight:500}.kv-session-steps-row{margin-top:.05rem}.kv-session-actions{flex-flow:wrap;justify-content:flex-start;gap:.4rem;display:flex}@media (min-width:768px){.kv-session-hud{flex-direction:row;justify-content:space-between;align-items:flex-start}.kv-session-main{flex:auto;padding-right:.75rem}.kv-session-actions{flex-direction:column;justify-content:center;align-items:flex-end;min-width:170px}.kv-session-header-row{flex-direction:row;justify-content:space-between;align-items:center}.kv-session-status-block{text-align:right;justify-content:flex-end;align-items:flex-end;padding-left:1.5rem}}.kv-steps{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.kv-step{align-items:center;gap:.35rem;display:flex}.kv-step-chip{color:#e2e8f0e6;background:#0f172ae6;border:1px solid #94a3b8b3;border-radius:999px;align-items:center;gap:.35rem;padding:.2rem .65rem;font-size:.68rem;display:inline-flex;box-shadow:inset 0 0 0 1px #0f172af2,0 6px 12px #0f172ae6}.kv-step-index{opacity:.8;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.62rem}.kv-step-label{white-space:nowrap}.kv-step-chip--done{color:#bbf7d0f2;background:radial-gradient(120% 120% at 0 0,#22c55e40,#0000 60%),#0f172af2;border-color:#34d399e6}.kv-step-chip--active{color:#e0f2fefa;animation:kv-step-glide calc(var(--kv-breath)*.6)ease-in-out infinite alternate;background:radial-gradient(120% 120% at 0 0,#38bdf852,#0000 60%),#0f172afa;border-color:#22d3eef2}.kv-step-rail{background:linear-gradient(90deg,#94a3b859,#94a3b81f);width:22px;height:1px}.kv-btn{cursor:pointer;color:var(--kv-ink);background:#0f172af2;border:1px solid #0000;border-radius:.7rem;justify-content:center;align-items:center;gap:.35rem;padding:.38rem .8rem;font-size:.7rem;font-weight:600;text-decoration:none;transition:transform .16s,box-shadow .16s,background .16s,border-color .16s,color .16s;display:inline-flex;position:relative;box-shadow:0 10px 26px #0f172af2,inset 0 0 0 1px #0f172ae6}.kv-btn-primary{color:#020617;animation:kv-button-breathe calc(var(--kv-breath)*.75)ease-in-out infinite alternate;background:linear-gradient(135deg,#38bdf8fa,#2dd4bff5);border-color:#22d3eee6}.kv-btn-ghost{color:#e2e8f0f5;background:radial-gradient(120% 120% at 0 0,#94a3b826,#0000 60%),#0f172af5;border-color:#94a3b8d9}.kv-btn-wide{align-self:center;min-width:220px;margin-top:1rem}.kv-btn:hover{transform:translateY(-1px);box-shadow:0 16px 40px #0f172af2,inset 0 0 0 1px #0f172ae6}.kv-activity{-webkit-backdrop-filter:blur(14px)saturate(1.18);backdrop-filter:blur(14px)saturate(1.18);backface-visibility:hidden;will-change:transform,opacity;animation:kv-activity-glow calc(var(--kv-breath)*1.25)ease-in-out infinite alternate;background-color:#0f172af5;border:1px solid #1e40af99;border-radius:1.25rem;margin-top:.4rem;padding:.85rem 1rem 1rem;position:relative;overflow:hidden;transform:translate(0,0);box-shadow:0 14px 40px #0f172ae6,inset 0 0 0 1px #0f172ae6}@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.kv-main-card,.kv-session-hud,.kv-activity,.kv-accounts-pill{background-color:#0f172af5;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}.kv-main-card{background:linear-gradient(145deg,#0f172afa,#0f172aeb) padding-box padding-box}.kv-session-hud{background:radial-gradient(140% 160% at 0 0,#94a3b829,#0000 60%),radial-gradient(180% 200% at 100% 100%,#0f172ae6,#0f172a)}.kv-activity{background:radial-gradient(120% 120% at 0 0,#22d3ee1f,#0000 65%),radial-gradient(120% 120% at 100% 100%,#8b5cf61f,#0000 65%),#0f172af5}}@media (pointer:coarse){.kv-main-card:before,.kv-main-card:after,.kv-session-hud:before,.kv-activity:before{mix-blend-mode:normal}.kv-main-card,.kv-session-hud,.kv-activity,.kv-accounts-pill{content-visibility:visible;contain-intrinsic-size:auto}}.kv-activity:before{content:"";pointer-events:none;opacity:.75;mix-blend-mode:screen;background:radial-gradient(120% 120% at 0 0,#22d3ee2e,#0000 65%),radial-gradient(120% 120% at 100% 100%,#8b5cf62e,#0000 65%);position:absolute;inset:0}.kv-activity-header{z-index:1;color:#94a3b8e6;justify-content:space-between;align-items:center;margin-bottom:.55rem;font-size:.72rem;display:flex;position:relative}.kv-activity-title{text-transform:uppercase;letter-spacing:.18em}.kv-activity-count{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.66rem}.kv-activity-list{z-index:1;flex-direction:column;gap:.35rem;display:flex;position:relative}.kv-activity-item{background:#0f172af5;border:1px solid #334155e6;border-radius:.75rem;justify-content:space-between;align-items:center;gap:.75rem;padding:.45rem .6rem;display:flex}.kv-activity-item-main{flex-direction:column;gap:.1rem;display:flex}.kv-activity-platform{color:#e2e8f0fa;font-size:.8rem;font-weight:600}.kv-activity-pulse{color:#94a3b8f2;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.7rem}.kv-activity-pulse span{color:#e2e8f0f5}.kv-activity-link{color:#38bdf8f2;white-space:nowrap;text-overflow:ellipsis;max-width:9.5rem;font-size:.7rem;text-decoration:none;overflow:hidden}.kv-activity-link:hover{text-underline-offset:2px;text-decoration:underline}.kv-connect-step{flex-direction:column;align-items:center;gap:.75rem;display:flex}.kv-embed-status{text-align:center;color:#e2e8f0f5;margin-top:2.5rem;font-size:.86rem}.kv-verify-step{text-align:center;flex-direction:column;align-items:center;gap:.75rem;display:flex}.kv-verify-copy{color:#94a3b8f2;max-width:360px;font-size:.76rem}.kv-verify-actions{flex-wrap:wrap;justify-content:center;gap:.5rem;display:flex}.kv-error-state{text-align:center;color:#e2e8f0f5;margin-top:2.2rem;font-size:.86rem}.kv-error-reset{color:#38bdf8f2;cursor:pointer;text-underline-offset:2px;background:0 0;border:none;margin-left:.25rem;font-size:.86rem;text-decoration:underline}[class*=kv-chakra-]{position:relative;overflow:hidden}[class*=kv-chakra-]:before{content:"";z-index:-1;pointer-events:none;mix-blend-mode:screen;opacity:.7;background:radial-gradient(140% 160% at 0 0,#ffffff0f,#0000 60%),radial-gradient(180% 180% at 100% 100%,#0f172acc,#0000 65%);position:absolute;inset:-1px}[class*=kv-chakra-]:after{content:"";z-index:-2;pointer-events:none;border-radius:inherit;opacity:.9;background:0 0;position:absolute;inset:0}.kv-chakra-root:after{background:radial-gradient(120% 120% at 5% 0,#f871718c,#0000 60%),radial-gradient(120% 160% at 100% 130%,#7f1d1db3,#0000 65%)}.kv-chakra-sacral:after{background:radial-gradient(120% 120% at 5% 0,#fb923c8c,#0000 60%),radial-gradient(120% 160% at 100% 130%,#9a3412b3,#0000 65%)}.kv-chakra-solar:after{background:radial-gradient(120% 120% at 5% 0,#fcd34d99,#0000 60%),radial-gradient(120% 160% at 100% 130%,#b45309b3,#0000 65%)}.kv-chakra-heart:after{background:radial-gradient(120% 120% at 5% 0,#4ade8099,#0000 60%),radial-gradient(120% 160% at 100% 130%,#166534d9,#0000 65%)}.kv-chakra-throat:after{background:radial-gradient(120% 120% at 5% 0,#38bdf899,#0000 60%),radial-gradient(120% 160% at 100% 130%,#164e63d9,#0000 65%)}.kv-chakra-brow:after{background:radial-gradient(120% 120% at 5% 0,#818cf8a6,#0000 60%),radial-gradient(120% 160% at 100% 130%,#312e81e6,#0000 65%)}.kv-chakra-crown:after{background:radial-gradient(120% 120% at 5% 0,#c4b5fdb3,#0000 60%),radial-gradient(120% 160% at 100% 130%,#4c1d95e6,#0000 65%)}:root{--phi:1.61803;--phi-breath:5.236s;--phi-breath-slow:calc(var(--phi-breath)*var(--phi));--phi-breath-fast:calc(var(--phi-breath)/var(--phi));--t-34:calc(var(--phi-breath)/34);--t-21:calc(var(--phi-breath)/21);--t-13:calc(var(--phi-breath)/13);--t-8:calc(var(--phi-breath)/8);--t-5:calc(var(--phi-breath)/5);--t-3:calc(var(--phi-breath)/3);--t-2:calc(var(--phi-breath)/2);--ease-breath:cubic-bezier(.22,.61,.28,.99);--ease-pulse:cubic-bezier(.15,.7,.25,1);--ink-0:#000;--ink-1:#05080d;--ink-2:#0a141e;--ink-3:#0f1d2a;--ink-4:#132535;--aqua-1:#00eaff;--aqua-2:#00ffd5;--aqua-3:#9fffe0;--auric-1:#ffd166;--auric-2:#fff3b0;--rose-1:#ff7b7b;--text-1:#eaffff;--text-2:#c9f7ff;--text-3:#a8e7f1;--line-1:#00ffff1a;--line-2:#00ffe638;--line-3:#ffffff1f;--glow-aqua-sm:0 0 12px #00ffe62e;--glow-aqua-md:0 0 20px #00ffe638;--glow-aqua-lg:0 0 36px #00ffe62e;--radius-lg:20px;--radius-md:14px;--radius-pill:9999px;--shadow-ambient:0 10px 40px #00000073;--focus-ring:0 0 0 3px #00ffe659,0 0 0 1px #ffffff80 inset}.social-connector-container{max-width:720px;color:var(--text-1);background:radial-gradient(1200px 800px at 20% -10%,#00eeff14,transparent 60%),radial-gradient(800px 600px at 120% 120%,#ffd1660f,transparent 55%),linear-gradient(180deg,var(--ink-3)0%,var(--ink-1)100%);border:1px solid var(--line-1);border-radius:var(--radius-lg);box-shadow:var(--shadow-ambient),inset 0 0 0 1px #ffffff0a;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);flex-direction:column;align-items:stretch;gap:1rem;margin:0 auto;padding:1.25rem 1.25rem 1.5rem;display:flex;position:relative;overflow:clip}.social-connector-container:before{content:"";border-radius:calc(var(--radius-lg) + 1px);pointer-events:none;animation:breathGlow var(--phi-breath-slow)var(--ease-breath)infinite;z-index:0;background:radial-gradient(1200px 400px at 50% -20%,#ffd1661f,#0000 60%),radial-gradient(900px 300px at 50% 120%,#00ffe61a,#0000 60%);padding:1px;position:absolute;inset:-1px;box-shadow:inset 0 0 0 1px #ffd1660f;-webkit-mask:linear-gradient(#000,#000) content-box,linear-gradient(#000,#000);mask:linear-gradient(#000,#000) content-box,linear-gradient(#000,#000)}@keyframes breathGlow{0%,to{opacity:.4;filter:blur(.5px)}50%{opacity:.7;filter:blur(1.2px)}}.social-connector-title{z-index:1;text-align:center;letter-spacing:.015em;text-shadow:0 1px #00000059;background:linear-gradient(90deg,var(--text-1),var(--aqua-2),var(--auric-1));color:#0000;animation:titleShimmer var(--phi-breath-fast)linear infinite;background-size:200%;-webkit-background-clip:text;background-clip:text;margin:.25rem 0;font-size:1.6rem;font-weight:800;position:relative}@keyframes titleShimmer{0%{background-position:0%}to{background-position:-200%}}.social-connector-sub{z-index:1;text-align:center;color:var(--text-3);margin:0 0 .5rem;line-height:1.38;position:relative}.divider-aura{width:100%;height:1px;box-shadow:var(--glow-aqua-sm);background:linear-gradient(90deg,#0000,#00ffe659,#ffd16640,#0000);margin:.75rem 0 .25rem}.social-connector-container .composer{z-index:1;grid-template-columns:1fr;gap:.65rem;display:grid;position:relative}.social-connector-container .composer.two{grid-template-columns:1fr 1fr}.social-connector-container .composer.three{grid-template-columns:repeat(3,1fr)}@media (max-width:860px){.social-connector-container .composer.two,.social-connector-container .composer.three{grid-template-columns:1fr}}.social-connector-container .field{gap:.35rem;display:grid}.social-connector-container .composer-label{color:#bffcff;letter-spacing:.02em;-webkit-user-select:none;user-select:none;font-size:.93rem}.social-connector-container .muted{color:var(--text-3);opacity:.85}.social-connector-container .composer-hint{color:var(--text-3);opacity:.9;margin-top:.1rem;font-size:.86rem}.social-connector-container .composer-hint.warn{color:#ffe9b3}.social-connector-container .composer-input-row{grid-template-columns:1fr auto;align-items:center;gap:.5rem;display:grid}.social-connector-container .composer-input,.social-connector-container .composer-textarea{border-radius:var(--radius-md);width:100%;color:var(--text-1);border:1px solid var(--line-2);transition:border-color var(--t-34)var(--ease-breath),box-shadow var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath),transform var(--t-34)var(--ease-breath);background:linear-gradient(#0a141ea8,#080e14b8);outline:none;padding:.78rem 1rem;box-shadow:inset 0 0 0 1px #ffffff05}.social-connector-container .composer-textarea{resize:vertical;min-height:100px}.social-connector-container .composer-input:focus,.social-connector-container .composer-textarea:focus{box-shadow:var(--glow-aqua-md),inset 0 0 0 1px #ffffff0a,var(--focus-ring);border-color:#00ffe661;transform:translateY(-.5px)}.social-connector-container .composer-input.warn{border-color:#ffd16673;box-shadow:0 0 14px #ffd1662e}.social-connector-container .composer-aux{border-radius:var(--radius-pill);border:1px solid var(--line-2);color:var(--text-2);cursor:pointer;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath);background:linear-gradient(135deg,#0c2b33,#071e22);padding:.7rem .95rem}.social-connector-container .composer-aux:hover{transform:translateY(-1px);box-shadow:0 0 18px #00ffe633}.social-connector-container .composer-aux:focus-visible{box-shadow:var(--focus-ring)}.social-connector-container .composer-error{color:#ffeaea;transition:box-shadow var(--t-21)var(--ease-breath),border-color var(--t-21)var(--ease-breath);background:linear-gradient(#3c0a0ab3,#280606cc);border:1px solid #ff4a4a59;border-radius:12px;margin-top:.25rem;padding:.6rem .8rem;box-shadow:0 0 14px #ff4a4a29}.social-connector-container .composer-warn{color:#fff8e0;transition:box-shadow var(--t-21)var(--ease-breath),border-color var(--t-21)var(--ease-breath);background:linear-gradient(#3c320a8c,#282208b3);border:1px solid #ffd16659;border-radius:12px;margin-top:.4rem;padding:.6rem .8rem;box-shadow:0 0 14px #ffd1661f}.social-connector-container .composer-actions{flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:.6rem;margin-top:.25rem;display:flex}.social-connector-container .composer-submit,.social-connector-container .composer-reset,.social-connector-container .composer-copy,.social-connector-container .composer-open{border-radius:var(--radius-pill);border:1px solid var(--line-2);cursor:pointer;letter-spacing:.02em;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath);will-change:transform,box-shadow;align-items:center;gap:.45rem;padding:.7rem 1.2rem;font-weight:700;text-decoration:none;display:inline-flex;position:relative}.social-connector-container .composer-submit{color:#e7ffff;background:linear-gradient(135deg,#15616d,#0b3943);box-shadow:0 0 12px #00ffe629}.social-connector-container .composer-submit:hover{transform:translateY(-1px);box-shadow:0 0 22px #00ffe63d}.social-connector-container .composer-submit:disabled{opacity:.6;cursor:default;box-shadow:none;transform:none}.social-connector-container .composer-reset{color:var(--text-2);background:linear-gradient(135deg,#18242f,#0f1922)}.social-connector-container .composer-reset:hover{border-color:#ffd16647;transform:translateY(-1px);box-shadow:0 0 18px #ffd1662e}.social-connector-container .composer-copy{color:var(--text-2);background:linear-gradient(135deg,#13333a,#0a2226)}.social-connector-container .composer-copy:hover{transform:translateY(-1px);box-shadow:0 0 18px #00ffe638}.social-connector-container .composer-copy.is-copied{animation:copiedPulse var(--t-5)var(--ease-pulse)1;border-color:#00ffe680;box-shadow:0 0 22px #00ffe647,inset 0 0 0 2px #00ffe62e}@keyframes copiedPulse{0%{transform:scale(1)}28%{transform:scale(1.03)}to{transform:scale(1)}}.social-connector-container .composer-open{color:var(--aqua-2);background:linear-gradient(135deg,#203044,#14202c)}.social-connector-container .composer-open:hover{transform:translateY(-1px);box-shadow:0 0 18px #0ef3}.social-connector-container .composer-submit:focus-visible,.social-connector-container .composer-reset:focus-visible,.social-connector-container .composer-copy:focus-visible,.social-connector-container .composer-open:focus-visible,.social-connector-container .composer-aux:focus-visible,.social-connector-container .pill:focus-visible{box-shadow:var(--focus-ring)}.social-connector-container .attachments{z-index:1;gap:.9rem;margin-top:.75rem;display:grid;position:relative}.social-connector-container .attachments-title{color:var(--text-1);letter-spacing:.02em;margin:.25rem 0;font-size:1.05rem;font-weight:800}.social-connector-container .url-list{gap:.4rem;margin:.25rem 0 0;padding:0;list-style:none;display:grid}.social-connector-container .url-item{border:1px solid var(--line-1);transition:border-color var(--t-34)var(--ease-breath),box-shadow var(--t-34)var(--ease-breath);background:linear-gradient(#0a121ab3,#080e14d1);border-radius:12px;justify-content:space-between;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.social-connector-container .dropzone{transition:box-shadow var(--t-21)var(--ease-breath),border-color var(--t-21)var(--ease-breath),background var(--t-21)var(--ease-breath);background:radial-gradient(700px 220px at 110% -20%,#00ffe61a,#0000 60%),linear-gradient(#0c161eb3,#080e14d9);border:1px dashed #00ffe647;border-radius:16px;padding:.9rem}.social-connector-container .dropzone:hover{box-shadow:var(--glow-aqua-sm);border-color:#00ffe673}.social-connector-container .dropzone-inner{text-align:center;place-items:center;gap:.35rem;padding:.35rem;display:grid}.social-connector-container .dz-title{letter-spacing:.02em;font-weight:800}.social-connector-container .dz-sub{color:var(--text-3);font-size:.9rem}.social-connector-container .dz-actions{flex-wrap:wrap;gap:.5rem;margin-top:.4rem;display:flex}.social-connector-container .pill{border-radius:var(--radius-pill);border:1px solid var(--line-2);min-height:44px;color:var(--text-2);cursor:pointer;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath);-webkit-user-select:none;user-select:none;letter-spacing:.02em;background:linear-gradient(135deg,#14232b,#0c171d);justify-content:center;align-items:center;gap:.45rem;padding:.64rem 1rem;font-weight:700;text-decoration:none;display:inline-flex}.social-connector-container .pill:hover{transform:translateY(-1px);box-shadow:0 0 16px #00ffe62e}.social-connector-container .pill.prim{color:#e7ffff;background:linear-gradient(135deg,#15616d,#0b3943);box-shadow:0 0 12px #00ffe624}.social-connector-container .pill.danger{color:#ffeaea;background:linear-gradient(135deg,#3a1414,#261010);border-color:#ff4a4a73;box-shadow:0 0 10px #ff4a4a24}.social-connector-container .pill.subtle{color:var(--text-2);background:linear-gradient(135deg,#18242f,#0f1922)}.social-connector-container .pill.icon-only{width:44px;padding:0}.social-connector-container .ico{stroke-linecap:round;stroke-linejoin:round;width:20px;height:20px;display:inline-block}.social-connector-container .visually-hidden{clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;position:absolute!important;overflow:hidden!important}.social-connector-container .file-summary{box-shadow:var(--glow-aqua-sm);background:radial-gradient(600px 180px at 100% -20%,#00ffe614,#0000 60%),linear-gradient(#0c161eb3,#0a121ad9);border:1px solid #00ffe62e;border-radius:14px;padding:.75rem .8rem}.social-connector-container .file-list{gap:.4rem;margin:.6rem 0 0;padding:0;list-style:none;display:grid}.social-connector-container .file-item{border:1px solid var(--line-1);transition:border-color var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath);background:linear-gradient(#0a141ea8,#080e14c9);border-radius:12px;padding:.5rem .65rem}.social-connector-container .file-row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.6rem;display:flex}.social-connector-container .badge{border:1px solid var(--line-2);color:var(--text-2);background:linear-gradient(#0a1b22,#08141a);border-radius:999px;align-items:center;padding:.1rem .45rem;font-size:.75rem;display:inline-flex}.social-connector-container .dim{color:var(--text-3)}.social-connector-container .id-banner{box-shadow:var(--glow-aqua-sm);transition:box-shadow var(--t-13)var(--ease-breath),border-color var(--t-13)var(--ease-breath);background:radial-gradient(600px 200px at 100% -20%,#00ffe614,#0000 60%),linear-gradient(#0e1820b3,#0a121ad9);border:1px solid #00ffe638;border-radius:12px;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.social-connector-container .id-dot{width:8px;height:8px;animation:phiBlink var(--phi-breath)var(--ease-breath)infinite;background:radial-gradient(circle at 40% 35%,#bffcff,#7cf7ef);border-radius:50%;box-shadow:0 0 8px #00ffe659}@keyframes phiBlink{0%,to{opacity:.8}50%{opacity:.35}}.social-connector-container .id-text{color:var(--text-1);font-weight:700}.social-connector-container .id-sub{color:var(--text-3)}.social-connector-container .story-actions{flex-wrap:wrap;align-items:center;gap:.6rem;display:flex}.social-connector-container .story-preview{border:1px solid var(--line-1);transition:border-color var(--t-34)var(--ease-breath),box-shadow var(--t-34)var(--ease-breath);background:linear-gradient(#0a141ea8,#080e14c9);border-radius:12px;grid-template-columns:120px auto;align-items:center;gap:.6rem;padding:.6rem;display:grid}@media (max-width:560px){.social-connector-container .story-preview{grid-template-columns:1fr}}.social-connector-container .story-preview-video{object-fit:cover;aspect-ratio:9/16;background:#000;border:1px solid #ffffff14;border-radius:10px;width:100%;height:100%;max-height:220px}.social-connector-container .story-preview-meta{color:var(--text-3);margin-left:.2rem}.social-connector-container .story-modal{z-index:5;place-items:center;display:grid;position:absolute;inset:0}.social-connector-container .story-overlay{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);transition:opacity var(--t-13)var(--ease-breath);background:radial-gradient(100% 100%,#000000a8,#000000d9);position:absolute;inset:0}.social-connector-container .story-sheet{width:min(720px,96%);box-shadow:0 20px 60px #0009,var(--glow-aqua-sm);transition:transform var(--t-13)var(--ease-pulse),box-shadow var(--t-13)var(--ease-breath);background:radial-gradient(1200px 300px at 50% -20%,#ffd16614,#0000 60%),linear-gradient(#0e1820d1,#0a121af0);border:1px solid #00ffe638;border-radius:16px;position:relative;overflow:hidden}.social-connector-container .story-head{border-bottom:1px solid #ffffff0f;justify-content:space-between;align-items:center;gap:.6rem;padding:.7rem .9rem;display:flex}.social-connector-container .story-title{letter-spacing:.02em;font-weight:800}.social-connector-container .story-body{grid-template-columns:9fr 7fr;gap:.8rem;padding:.9rem;display:grid}@media (max-width:860px){.social-connector-container .story-body{grid-template-columns:1fr}}.social-connector-container .story-stage{border:1px solid var(--line-2);aspect-ratio:9/16;transition:border-color var(--t-34)var(--ease-breath);background:#000;border-radius:12px;place-items:center;display:grid;position:relative;overflow:hidden}.social-connector-container .story-stage video{object-fit:cover;width:100%;height:100%}.social-connector-container .story-ctrls{align-content:start;gap:.6rem;display:grid}.social-connector-container .story-meter{border:1px solid var(--line-2);background:linear-gradient(#1a2a32,#0e1a20);border-radius:999px;height:10px;overflow:hidden}.social-connector-container .story-meter>.bar{width:0%;height:100%;transition:width var(--t-21)linear;background:linear-gradient(90deg,#ff7b7b,#ffd166,#00ffd5);box-shadow:0 0 14px #ffd16638}.social-connector-container .story-btn{border:1px solid var(--line-2);width:100%;color:var(--text-2);letter-spacing:.02em;cursor:pointer;transition:transform var(--t-34)var(--ease-pulse),box-shadow var(--t-34)var(--ease-breath),border-color var(--t-34)var(--ease-breath),background var(--t-34)var(--ease-breath);background:linear-gradient(135deg,#14232b,#0c171d);border-radius:12px;justify-content:center;align-items:center;gap:.45rem;padding:.75rem 1rem;font-weight:800;display:inline-flex}.social-connector-container .story-btn:hover{transform:translateY(-1px);box-shadow:0 0 16px #00ffe62e}.social-connector-container .story-btn.record{color:#ffeaea;background:linear-gradient(135deg,#3a1414,#261010);border-color:#ff4a4a73}.social-connector-container .story-btn.primary{color:#e7ffff;background:linear-gradient(135deg,#15616d,#0b3943)}.social-connector-container .story-foot{border-top:1px solid #ffffff0f;justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem .9rem;display:flex}.breath-glow{filter:drop-shadow(0 0 10px #00ffe638)drop-shadow(0 0 18px #ffd1661a)}.social-connector-container .mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace}@media (max-width:520px){.social-connector-title{font-size:1.28rem}.social-connector-sub{font-size:.95rem}}@media (prefers-reduced-motion:reduce){.social-connector-container:before,.social-connector-title,.social-connector-container .id-dot,.social-connector-container .composer-copy.is-copied{animation:none!important}.social-connector-container *{transition-duration:0s!important}}.kv-social-connector{background:radial-gradient(circle at 0 0,#b49cff29,#0000 70%),#050910f5;border:1px solid #ffffff2e;border-radius:18px;flex-direction:column;gap:14px;margin-top:18px;padding:14px 14px 16px;display:flex}.kv-social-header{flex-direction:column;gap:4px;display:flex}.kv-social-title{letter-spacing:.1em;text-transform:uppercase;font-size:16px;font-weight:600}.kv-social-subtitle{color:var(--kv-ink-soft,#b7c7dd);font-size:13px}.kv-social-proof{grid-template-columns:minmax(0,2fr) minmax(0,1.2fr);gap:12px;display:grid}.kv-social-proof-block{background:#060b12fa;border:1px solid #ffffff29;border-radius:14px;flex-direction:column;gap:6px;padding:8px 10px;display:flex}.kv-proof-label{text-transform:uppercase;letter-spacing:.12em;color:var(--kv-ink-muted,#8b9bb2);font-size:11px}.kv-proof-caption{white-space:pre-wrap;word-wrap:break-word;background:#03070eeb;border:1px solid #ffffff1f;border-radius:10px;max-height:180px;margin:0;padding:8px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px;overflow:auto}.kv-social-proof-meta{background:#070c14fa;border:1px solid #ffffff29;border-radius:14px;flex-direction:column;gap:6px;padding:10px 10px 8px;font-size:12px;display:flex}.kv-proof-meta-row{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.kv-proof-meta-label{color:var(--kv-ink-muted,#8b9bb2);text-transform:uppercase;letter-spacing:.12em;font-size:11px}.kv-proof-meta-value{text-align:right;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.kv-social-actions{flex-direction:column;gap:10px;display:flex}.kv-social-row--grid{flex-wrap:wrap}.kv-social-status{color:var(--kv-ink-soft,#b7c7dd);margin-top:4px;font-size:12px}@media (max-width:768px){.kv-social-connector{padding:12px 10px 14px}.kv-social-proof{grid-template-columns:minmax(0,1fr)}.kv-social-row{flex-direction:column}.kv-social-row .kv-btn{width:100%}}.story-rec-overlay{z-index:9999;color:#e7edf3;background:radial-gradient(100% 120% at 50% 0,#0a0e16e6 0%,#0a0e16fa 60%,#05080d 100%);grid-template-rows:1fr auto;display:grid;position:fixed;inset:0}.story-rec-video-wrap{place-items:center;display:grid;position:relative;overflow:hidden}.story-rec-video{object-fit:cover;will-change:transform;background:#000;width:100%;height:100%;transform:translateZ(0)}.story-rec-topbar{padding:env(safe-area-inset-top)12px 8px 12px;grid-template-columns:1fr auto auto;align-items:flex-start;gap:8px;display:grid;position:absolute;top:0;left:0;right:0}.story-top-center{place-items:center;display:grid}.story-timer{font-variant-numeric:tabular-nums;background:#00000059;border:1px solid #ffffff26;border-radius:999px;padding:4px 8px}.story-top-actions{justify-content:flex-end;gap:8px;display:flex}.story-btn{-webkit-tap-highlight-color:transparent;cursor:pointer;color:#e7edf3;background:#00000059;border:1px solid #ffffff26;border-radius:12px;padding:8px 10px;font-size:18px;line-height:1}.story-btn.active{background:#1eb4ff40;border-color:#1eb4ff80}.story-btn.disabled{opacity:.45;cursor:not-allowed}.story-rec-bottombar{padding:12px 16px calc(16px + env(safe-area-inset-bottom));place-items:center;gap:8px;display:grid;position:relative}.record-wrap{place-items:center;width:92px;height:92px;display:grid;position:relative}.record-btn{cursor:pointer;color:#f04b64;background:0 0;border:none;border-radius:999px;width:84px;height:84px;position:relative}.record-btn .progress-ring{background:conic-gradient(currentColor 0deg,transparent 0);border-radius:999px;position:absolute;inset:0;box-shadow:inset 0 0 0 1px #ffffff1f}.record-btn .story-rec-dot{background:#f04b64;border-radius:20px;transition:all .14s;position:absolute;inset:10px;box-shadow:0 6px 22px #f04b6459,inset 0 0 0 2px #ffffff1f}.record-btn.recording .story-rec-dot{background:#ff2d55;border-radius:12px;transform:scale(.92)}.story-rec-error,.story-rec-hint{opacity:.9;text-align:center;margin-top:6px;font-size:12px}.mono{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace}.story-rec-overlay{z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:radial-gradient(100% 100%,#000000a8,#000000e0);grid-template-rows:1fr;display:grid;position:fixed;inset:0}.story-rec-video-wrap{place-items:center;display:grid;position:absolute;inset:0}.story-rec-video{object-fit:cover;width:min(100vmin,100%);height:100%;max-height:100%}.story-rec-video.mirror{transform:scaleX(-1)}.story-rec-topbar{pointer-events:none;grid-template-columns:1fr auto 1fr;align-items:center;padding:10px;display:grid;position:absolute;top:0;left:0;right:0}.story-btn.top.left{justify-self:start}.story-top-center{pointer-events:none;justify-self:center}.story-top-actions{pointer-events:auto;justify-self:end;gap:8px;display:inline-flex}.story-btn{color:#e7ffff;cursor:pointer;pointer-events:auto;background:linear-gradient(135deg,#15616d40,#0b394340);border:1px solid #00ffe640;border-radius:12px;place-items:center;width:40px;height:40px;transition:transform .12s,box-shadow .2s,border-color .2s,background .2s;display:inline-grid}.story-btn:hover{transform:translateY(-1px);box-shadow:0 0 16px #00ffe638}.story-btn.active{border-color:#ffd16673;box-shadow:0 0 16px #ffd16638}.story-btn.disabled{opacity:.5;cursor:default;filter:grayscale(.3)}.ico{width:22px;height:22px}.story-timer{letter-spacing:.02em;color:#e7ffff;background:linear-gradient(135deg,#14232b80,#0c171d80);border:1px solid #00ffe647;border-radius:999px;padding:4px 8px;font-weight:700}.story-rec-bottombar{place-items:center;gap:10px;padding:16px 10px 18px;display:grid;position:absolute;bottom:0;left:0;right:0}.record-wrap{place-items:center;display:grid}.record-btn{color:#00ffd5;cursor:pointer;background:radial-gradient(120% 120%,#00ffe624,#0003);border:2px solid #00ffe647;border-radius:999px;place-items:center;width:84px;height:84px;transition:transform .12s,box-shadow .2s,border-color .2s,background .2s;display:grid;position:relative;box-shadow:0 0 28px #00ffe626}.record-btn:hover{transform:translateY(-1px)scale(1.02);box-shadow:0 0 36px #00ffe633}.record-btn.recording{color:#ff7b7b;border-color:#ff7b7b73;box-shadow:0 0 36px #ff7b7b38}.progress-ring{background:conic-gradient(currentColor 0deg,transparent 0);border-radius:999px;position:absolute;inset:6px;-webkit-mask:radial-gradient(circle,#0000 62%,#000 63%);mask:radial-gradient(circle,#0000 62%,#000 63%)}.story-rec-dot{background:radial-gradient(120% 120%,#ffffff0f,#00000038);border:1px solid #ffffff14;border-radius:16px;place-items:center;width:64px;height:64px;display:grid}.ico.rec{width:24px;height:24px}.ico.rec circle{fill:currentColor}.ico.rec.on circle{fill:#ff4a4a}.story-rec-error{color:#ffeaea;background:linear-gradient(#3c0a0ab3,#280606cc);border:1px solid #ff4a4a59;border-radius:10px;margin-top:6px;padding:6px 10px;font-size:.9rem}.story-rec-hint{color:#e7ffff;background:linear-gradient(#141e2499,#0e161cbf);border:1px solid #00ffe640;border-radius:10px;margin-top:6px;padding:6px 10px;font-size:.9rem}.sr-only{clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;position:absolute!important;overflow:hidden!important}.ico.on{filter:drop-shadow(0 0 10px #ffd16640)}.kv-post-composer{--kv-post-bg:#040910eb;--kv-post-bg-soft:#0b121cf5;--kv-post-border:#94c4ff40;--kv-post-border-soft:#94c4ff1f;--kv-post-ink:#e9f0ff;--kv-post-ink-soft:#b9c7e3;--kv-post-ink-muted:#7f8fb0;--kv-post-accent:#53f6ff;--kv-post-accent-soft:#53f6ff33;--kv-post-danger-bg:#ff5e7a1a;--kv-post-danger-border:#ff5e7acc;--kv-post-danger-text:#ffc6d3;--kv-post-radius-lg:18px;--kv-post-radius-md:12px;--kv-post-radius-sm:8px;--kv-post-shadow-soft:0 18px 45px #00000073;--kv-post-blur:22px;--kv-post-tag-bg:#53f6ff1f;--kv-post-tag-border:#53f6ff8c;--kv-post-tag-text:#dffbff;--kv-post-pill-bg:#ffd7801a;--kv-post-pill-border:#ffd780e6;--kv-post-pill-text:#ffe9b0;--kv-post-legal-bg:#0a1220f5;--kv-post-legal-border:#86bdff42;--kv-post-legal-highlight:#53f6ff29;--kv-post-breath:var(--pulse-dur,5.236s);color:var(--kv-post-ink)}.kv-post-composer,.kv-post-composer *{box-sizing:border-box}.kv-post-header{background:radial-gradient(circle at top left,#53f6ff24,transparent 55%),radial-gradient(circle at bottom right,#b489ff29,transparent 55%),linear-gradient(135deg,var(--kv-post-bg-soft),#05070c 80%);border-radius:var(--kv-post-radius-lg);border:1px solid var(--kv-post-border-soft);box-shadow:var(--kv-post-shadow-soft);-webkit-backdrop-filter:blur(var(--kv-post-blur));padding:14px 16px}.kv-post-step-row{justify-content:space-between;align-items:center;gap:12px;display:flex}.kv-post-step-badge{background:radial-gradient(circle at 0 0,#53f6ff47,#0000 55%),#060c16d9;border:1px solid #53f6ff59;border-radius:999px;align-items:center;gap:8px;padding:4px 10px;display:inline-flex}.kv-post-step-number{color:#05070c;background:radial-gradient(circle at 30% 20%,#fff,#ffd47a 60%);border-radius:999px;justify-content:center;align-items:center;width:22px;height:22px;font-size:.8rem;font-weight:600;display:inline-flex;box-shadow:0 0 0 1px #06060a80}.kv-post-step-label{letter-spacing:.03em;text-transform:uppercase;color:var(--kv-post-ink-soft);font-size:.85rem}.kv-post-reset-btn{letter-spacing:.05em;text-transform:uppercase;color:var(--kv-post-ink-muted);cursor:pointer;background:#05080db3;border:1px solid #ffffff14;border-radius:999px;padding:4px 10px;font-size:.75rem;transition:background .16s ease-out,border-color .16s ease-out,color .16s ease-out,transform .12s ease-out}.kv-post-reset-btn:hover{color:var(--kv-post-ink);border-color:#53f6ffb3;transform:translateY(-1px)}.kv-post-reset-btn:active{transform:translateY(0)}.kv-post-subtitle{color:var(--kv-post-ink-muted);margin:6px 0 0;font-size:.85rem;line-height:1.4}.kv-post-kind-row{flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;display:flex}.kv-post-kind-label{text-transform:uppercase;letter-spacing:.08em;color:var(--kv-post-ink-muted);font-size:.78rem}.kv-post-kind-select{min-width:180px;max-width:100%;color:var(--kv-post-ink-soft);appearance:none;background-color:#050910e6;background-image:linear-gradient(135deg,#ffffff2e,#fff0),radial-gradient(circle at 90%,#ffffff1f,#0000);background-position:0 0,100%;background-repeat:no-repeat;background-size:100% 100%,18px 18px;background-attachment:scroll,scroll;background-origin:padding-box,padding-box;background-clip:border-box,border-box;border:1px solid #99c9ff80;border-radius:999px;outline:none;padding:6px 26px 6px 10px;font-size:.8rem;position:relative}.kv-post-kind-select:focus-visible{border-color:#53f6fff2;box-shadow:0 0 0 1px #53f6ffb3}.kv-post-error{border-radius:var(--kv-post-radius-md);background:var(--kv-post-danger-bg);border:1px solid var(--kv-post-danger-border);color:var(--kv-post-danger-text);margin-top:8px;padding:8px 12px;font-size:.8rem}.kv-post-dropzone{border-radius:var(--kv-post-radius-lg);border:1px dashed var(--kv-post-border);background:radial-gradient(circle at 10% 0%,var(--kv-post-accent-soft),transparent 60%),radial-gradient(circle at 90% 100%,#b489ff38,transparent 60%),linear-gradient(135deg,#060b13e6,#03060ce6);cursor:pointer;outline:none;padding:18px;transition:border-color .18s ease-out,box-shadow .18s ease-out,background .22s ease-out,transform .16s ease-out;position:relative}@keyframes kv-post-breath{0%{box-shadow:0 0 #53f6ff24,0 18px 40px #000c}to{box-shadow:0 0 0 10px #53f6ff00,0 24px 55px #000000f2}}.kv-post-dropzone:not(.kv-post-dropzone--has-media){animation:kv-post-breath var(--kv-post-breath)ease-in-out infinite alternate}@media (prefers-reduced-motion:reduce){.kv-post-dropzone{animation:none!important}}.kv-post-dropzone--dragging{border-style:solid;border-color:var(--kv-post-accent);transform:translateY(-1px);box-shadow:0 0 0 1px #53f6ff80,0 18px 46px #000000e6}.kv-post-dropzone--has-media{border-style:solid;border-color:#53f6ff99}.kv-post-dropzone-inner{align-items:center;gap:14px;display:flex}.kv-post-dropzone-icon{color:#020308;background:radial-gradient(circle at 30% 20%,#fff,#b8e6ff 65%);border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:1.4rem;display:flex;box-shadow:0 0 0 1px #04060ccc,0 12px 30px #000000b3}.kv-post-dropzone-text{flex-direction:column;gap:2px;min-width:0;display:flex}.kv-post-dropzone-title{color:var(--kv-post-ink);white-space:nowrap;text-overflow:ellipsis;font-size:.95rem;font-weight:500;overflow:hidden}.kv-post-dropzone-hint{color:var(--kv-post-ink-muted);font-size:.8rem}.kv-post-dropzone-meta{color:#8fa7d2e6;margin-top:4px;font-size:.75rem}.kv-post-dropzone:focus-visible{box-shadow:0 0 #53f6ff29,0 0 0 2px #53f6ffe6}.kv-post-body{border-radius:var(--kv-post-radius-lg);box-shadow:var(--kv-post-shadow-soft);background:linear-gradient(135deg,#0c1523f5,#04070dfa);border:1px solid #96cdff33;padding:14px 16px 16px}.kv-post-preview{border-radius:var(--kv-post-radius-md);background:radial-gradient(circle at 50% 0,#283145,#05070c 70%);border:1px solid #aad2ff38;margin-bottom:12px;overflow:hidden}.kv-post-preview-media{object-fit:contain;width:100%;height:auto;max-height:min(420px,72vh);display:block}.kv-post-attachments{border-radius:var(--kv-post-radius-md);background:radial-gradient(circle at 0 0,#53f6ff0f,#0000 55%),#050910f5;border:1px solid #8fbeff40;margin-top:4px;padding:8px 10px 10px}.kv-post-attachments-header{justify-content:space-between;align-items:center;gap:8px;display:flex}.kv-post-attachments-title{letter-spacing:.08em;text-transform:uppercase;color:var(--kv-post-ink-soft);font-size:.82rem;font-weight:600}.kv-post-attachments-summary{color:var(--kv-post-ink-muted);white-space:nowrap;font-size:.75rem}.kv-post-attachments-list{scrollbar-width:thin;max-height:220px;margin:8px 0 0;padding:0;list-style:none;overflow-y:auto}.kv-post-attachments-list::-webkit-scrollbar{width:6px}.kv-post-attachments-list::-webkit-scrollbar-track{background:#0509104d}.kv-post-attachments-list::-webkit-scrollbar-thumb{background:#8fbeff99;border-radius:999px}.kv-post-attachment-item{border-radius:var(--kv-post-radius-sm);background:radial-gradient(circle at 0 0,#53f6ff08,#0000 60%),#04070dd9;border:1px solid #699de633;justify-content:space-between;align-items:flex-start;gap:10px;padding:6px;display:flex}.kv-post-attachment-item+.kv-post-attachment-item{margin-top:6px}.kv-post-attachment-item--primary{border-color:var(--kv-post-pill-border);background:radial-gradient(circle at 0 0,#ffd7802e,#0000 60%),#060a12f2}.kv-post-attachment-main{flex-direction:column;gap:2px;min-width:0;display:flex}.kv-post-attachment-name{color:var(--kv-post-ink-soft);white-space:nowrap;text-overflow:ellipsis;font-size:.83rem;font-weight:500;overflow:hidden}.kv-post-attachment-meta{color:var(--kv-post-ink-muted);flex-wrap:wrap;align-items:center;gap:6px;font-size:.75rem;display:flex}.kv-post-attachment-pill{border:1px solid var(--kv-post-pill-border);background:var(--kv-post-pill-bg);color:var(--kv-post-pill-text);text-transform:uppercase;letter-spacing:.08em;border-radius:999px;padding:2px 8px;font-size:.7rem}.kv-post-attachment-actions{flex-direction:column;flex-shrink:0;gap:4px;display:flex}.kv-post-attachment-btn{color:var(--kv-post-ink-soft);cursor:pointer;text-transform:uppercase;letter-spacing:.08em;white-space:nowrap;background:#04070ce6;border:1px solid #91c3ff99;border-radius:999px;padding:2px 10px;font-size:.72rem;transition:background .14s ease-out,border-color .14s ease-out,transform .1s ease-out}.kv-post-attachment-btn:hover{background:#0a121ef2;border-color:#53f6ffcc;transform:translateY(-.5px)}.kv-post-attachment-btn:active{transform:translateY(0)}.kv-post-attachment-btn--danger{color:#ffd7e0;border-color:#ff8298d9}.kv-post-meta{flex-direction:column;gap:2px;margin-top:8px;display:flex}.kv-post-meta-name{color:var(--kv-post-ink-soft);white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;font-weight:500;overflow:hidden}.kv-post-meta-details{color:var(--kv-post-ink-muted);align-items:center;gap:6px;font-size:.78rem;display:flex}.kv-post-meta-dot{opacity:.6}.kv-post-caption-block{margin-top:14px}.kv-post-caption-label{color:var(--kv-post-ink-soft);margin-bottom:4px;font-size:.8rem;display:block}.kv-post-caption-textarea{resize:vertical;border-radius:var(--kv-post-radius-md);width:100%;min-height:80px;color:var(--kv-post-ink);background:radial-gradient(circle at 0 0,#53f6ff17,#0000 55%),#03060ce6;border:1px solid #97c0ff42;outline:none;padding:8px 10px;font-size:.85rem;transition:border-color .16s ease-out,box-shadow .16s ease-out,background .18s ease-out}.kv-post-caption-textarea::placeholder{color:#91a5cdb3}.kv-post-caption-textarea:focus-visible{border-color:#53f6ffe6;box-shadow:0 0 0 1px #53f6ff99}.kv-post-caption-footer{justify-content:flex-end;margin-top:4px;display:flex}.kv-post-caption-count{color:var(--kv-post-ink-muted);font-size:.75rem}.kv-post-link-block{margin-top:16px}.kv-post-link-label{color:var(--kv-post-ink-soft);margin-bottom:4px;font-size:.8rem;display:block}.kv-post-link-input{border-radius:var(--kv-post-radius-md);width:100%;color:var(--kv-post-ink);background:radial-gradient(circle at 0 0,#53f6ff12,#0000 55%),#03060cf5;border:1px solid #97c0ff52;outline:none;padding:7px 10px;font-size:.82rem;transition:border-color .14s ease-out,box-shadow .14s ease-out}.kv-post-link-input::placeholder{color:#91a5cdb3}.kv-post-link-input:focus-visible{border-color:#53f6ffe6;box-shadow:0 0 0 1px #53f6ff99}.kv-post-link-hint{color:var(--kv-post-ink-muted);margin-top:4px;font-size:.75rem}.kv-post-legal-block{border-radius:var(--kv-post-radius-lg);border:1px solid var(--kv-post-legal-border);background:radial-gradient(circle at 0% 0%,var(--kv-post-legal-highlight),transparent 60%),var(--kv-post-legal-bg);margin-top:18px;padding:12px 12px 10px}.kv-post-legal-header{letter-spacing:.08em;text-transform:uppercase;color:var(--kv-post-ink-soft);margin-bottom:8px;font-size:.8rem;font-weight:600}.kv-post-legal-grid{grid-template-columns:minmax(0,1fr);gap:10px;display:grid}.kv-post-legal-field{flex-direction:column;gap:4px;display:flex}.kv-post-legal-label{color:var(--kv-post-ink-soft);font-size:.78rem}.kv-post-legal-required{color:#ffd166;margin-left:2px}.kv-post-legal-input{border-radius:var(--kv-post-radius-md);width:100%;color:var(--kv-post-ink);background:#050910e6;border:1px solid #8fbeff80;outline:none;padding:6px 9px;font-size:.8rem;transition:border-color .14s ease-out,box-shadow .14s ease-out,background .16s ease-out}.kv-post-legal-input::placeholder{color:#91a5cdbf}.kv-post-legal-input:focus-visible{background:#04080ffa;border-color:#53f6ffe6;box-shadow:0 0 0 1px #53f6ff99}.kv-post-legal-flags{flex-direction:column;gap:4px;margin-top:8px;display:flex}.kv-post-legal-flag{color:var(--kv-post-ink-muted);align-items:center;gap:6px;font-size:.78rem;display:inline-flex}.kv-post-legal-flag input[type=checkbox]{accent-color:#53f6ff;background:#04070de6;border:1px solid #8fbeffb3;border-radius:3px;width:14px;height:14px}.kv-post-legal-hint{color:#9ebde6f2;font-size:.74rem;line-height:1.4}.kv-post-actions{margin-bottom:2px}.kv-post-submit-btn{letter-spacing:.06em;text-transform:uppercase;cursor:pointer;color:#020308;transform-origin:50%;background:radial-gradient(circle at 30% 0,#fff,#ffe7a1 40%,#ffd166 70%);border:none;border-radius:999px;padding:8px 18px;font-size:.9rem;font-weight:500;transition:transform .12s ease-out,box-shadow .16s ease-out,filter .16s ease-out,opacity .16s ease-out;box-shadow:0 0 0 1px #05050ae6,0 18px 40px #000000d9}.kv-post-submit-btn:hover:not(:disabled){filter:brightness(1.03);transform:translateY(-1px);box-shadow:0 0 0 1px #05050af2,0 24px 52px #000000e6}.kv-post-submit-btn:active:not(:disabled){transform:translateY(0);box-shadow:0 0 0 1px #05050a,0 16px 36px #000c}.kv-post-submit-btn:disabled{opacity:.6;cursor:default;box-shadow:0 0 0 1px #05050ae6,0 10px 24px #000000b3}.kv-post-file-input{display:none}@media (max-width:640px){.kv-post-composer{padding-inline:1rem!important}.kv-post-header,.kv-post-body{padding-inline:12px}.kv-post-dropzone{padding:14px}.kv-post-dropzone-inner{gap:10px}.kv-post-dropzone-title{font-size:.9rem}.kv-post-subtitle{font-size:.8rem}.kv-post-kind-row{flex-direction:row;align-items:center}.kv-post-kind-select{flex:auto}.kv-post-attachment-actions{flex-direction:row;justify-content:flex-end}.kv-post-legal-grid{grid-template-columns:minmax(0,1fr)}}@media (min-width:641px){.kv-post-legal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.kv-breath-root{--kv-breath-pulse:5.236s;--kv-breath-radius:7.5rem;--kv-breath-bg:radial-gradient(circle at 10% 0%,#061322 0,#02060a 46%,#020309 100%);--kv-breath-ink:#ecf1fb;--kv-breath-ink-soft:#a8b6ce;--kv-breath-muted:#8090a8;--kv-breath-accent:#5ce1ff;--kv-breath-accent-soft:#2bd4ff;--kv-breath-accent-2:#a78bfa;--kv-breath-accent-3:#ffd27f;--kv-breath-card-bg:#081020db;--kv-breath-border:#a3daff38;--kv-breath-border-soft:#78a0d273;--kv-breath-orb-shadow:0 0 30px #5ce1ff8c,0 0 80px #a78bfa4d;--kv-breath-btn-primary-bg:linear-gradient(135deg,#2bd4ff,#ffd27f);--kv-breath-btn-primary-border:#c8f0ff80;--kv-breath-btn-warning-bg:linear-gradient(135deg,#f97373,#fb923c);--kv-breath-btn-ghost-bg:#0b1224e6;--kv-breath-btn-ghost-border:#8296b999;--kv-breath-bar-bg:#050a12e6;--kv-breath-bar-inhale:linear-gradient(90deg,#5ce1ff,#a78bfa);--kv-breath-bar-exhale:linear-gradient(90deg,#ffd27f,#ff8c9b);--kv-breath-ring-track:#20365299;--kv-breath-ring-glow:#5ce1ffb3;color:var(--kv-breath-ink);background:unset;background:radial-gradient(circle at 15% 0%,#5ce1ff30 0,transparent 40%),radial-gradient(circle at 85% 100%,#a78bfa29 0,transparent 45%),var(--kv-breath-card-bg);border:1px solid var(--kv-breath-border);-webkit-backdrop-filter:blur(22px)saturate(140%);border-radius:1.5rem;flex-direction:column;gap:1.75rem;width:100%;max-width:40rem;margin:0 auto;padding:1.5rem 1.25rem 1.75rem;display:flex;box-shadow:0 28px 90px #020617e6,0 0 0 1px #78b4ff26}.kv-breath-meta{justify-content:space-between;align-items:center;gap:.75rem;font-size:.8rem;display:flex}.kv-breath-meta-left{flex-direction:column;gap:.25rem;min-width:0;display:flex}.kv-breath-meta-right{align-items:center;gap:.5rem;display:flex}.kv-breath-pill{color:var(--kv-breath-ink-soft);letter-spacing:.015em;background:radial-gradient(circle at 0 0,#5ce1ff40,#0000 55%);border:1px solid #a6e6ff66;border-radius:999px;align-items:center;gap:.35rem;padding:.15rem .75rem;font-weight:500;display:inline-flex}.kv-breath-file{max-width:100%;color:var(--kv-breath-muted);white-space:nowrap;text-overflow:ellipsis;display:inline-block;overflow:hidden}.kv-breath-tag{color:#caebffe6;letter-spacing:.06em;text-transform:uppercase;background:radial-gradient(circle at 0,#2fd4ff4d,#0000 70%);border:1px solid #52d4ff99;border-radius:999px;padding:.18rem .6rem;font-size:.7rem}.kv-breath-orb-row{grid-template-columns:minmax(0,auto) minmax(0,1fr);align-items:center;gap:1.75rem;display:grid}@media (max-width:640px){.kv-breath-orb-row{grid-template-columns:minmax(0,1fr);justify-items:center}}.kv-breath-orb{width:var(--kv-breath-radius);height:var(--kv-breath-radius);justify-content:center;align-items:center;display:flex;position:relative}.kv-breath-orb-inner{width:74%;height:74%;box-shadow:var(--kv-breath-orb-shadow);background:radial-gradient(circle at 30% 20%,#ffffffe6 0,#0000 55%),radial-gradient(circle at 80% 90%,#5ce1ffbf 0,#0000 60%),radial-gradient(circle at 0 100%,#a78bfaa6 0,#0000 60%),radial-gradient(circle,#050c1cd9 0,#030712 80%);border-radius:999px;justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.kv-breath-orb-emoji{filter:drop-shadow(0 0 12px #fff3);font-size:1.95rem}.kv-breath-root[data-phase=inhale] .kv-breath-orb-inner{animation:kv-breath-inhale var(--kv-breath-pulse)ease-in-out infinite}.kv-breath-root[data-phase=exhale] .kv-breath-orb-inner{animation:kv-breath-exhale var(--kv-breath-pulse)ease-in-out infinite}.kv-breath-root[data-phase=idle] .kv-breath-orb-inner,.kv-breath-root[data-phase=sealed] .kv-breath-orb-inner{animation:6s ease-in-out infinite kv-breath-rest}.kv-breath-orb-ring{-webkit-mask-composite:xor;pointer-events:none;background:radial-gradient(circle at 50% 0,#5ce1ff47,#0000 60%),radial-gradient(circle at 0 100%,#a78bfa38,#0000 65%);border-radius:999px;padding:3px;position:absolute;inset:0;-webkit-mask-image:radial-gradient(farthest-side,#0000 calc(100% - 3px),#000 calc(100% - 1px)),radial-gradient(farthest-side,#000 0 100%);-webkit-mask-position:0 0,0 0;-webkit-mask-size:auto,auto;-webkit-mask-repeat:repeat,repeat;-webkit-mask-clip:border-box,border-box;-webkit-mask-origin:border-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-source-type:auto,auto;mask-mode:match-source,match-source}.kv-breath-orb-ring:after{content:"";background:conic-gradient(from -90deg,var(--kv-breath-ring-glow)0,var(--kv-breath-ring-glow)calc(var(--kv-breath-progress,0)*1turn),transparent calc(var(--kv-breath-progress,0)*1turn),transparent 1turn);opacity:.9;mix-blend-mode:screen;border-radius:999px;transition:opacity .22s ease-out;position:absolute;inset:1px}.kv-breath-root[data-phase=idle] .kv-breath-orb-ring:after{opacity:.45}.kv-breath-root[data-phase=sealed] .kv-breath-orb-ring:after{background:conic-gradient(from -90deg,var(--kv-breath-ring-glow)0,#ffd27ff2 .9turn,#ffefbffa 1turn)}.kv-breath-status{flex-direction:column;gap:.75rem;display:flex}.kv-breath-status-row{justify-content:space-between;align-items:baseline;gap:.75rem;display:flex}.kv-breath-status-label{letter-spacing:.04em;text-transform:uppercase;color:var(--kv-breath-ink-soft);font-size:.9rem;font-weight:600}.kv-breath-status-percent{font-variant-numeric:tabular-nums;color:#c1e2ffe0;font-size:.95rem}.kv-breath-status-text{color:var(--kv-breath-muted);font-size:.82rem;line-height:1.45}.kv-breath-bars{flex-direction:column;gap:.45rem;margin-top:.25rem;display:flex}.kv-breath-bar{flex-direction:column;gap:.2rem;display:flex}.kv-breath-bar-label{text-transform:uppercase;letter-spacing:.09em;color:#a9c0dae6;font-size:.75rem}.kv-breath-bar-track{background:var(--kv-breath-bar-bg);border-radius:999px;width:100%;height:.4rem;position:relative;overflow:hidden}.kv-breath-bar-fill{border-radius:inherit;width:0;transition:width .18s ease-out;position:absolute;inset:0}.kv-breath-bar-fill--inhale{background:var(--kv-breath-bar-inhale);box-shadow:0 0 12px #5ce1ff80}.kv-breath-bar-fill--exhale{background:var(--kv-breath-bar-exhale);box-shadow:0 0 12px #ffc78499}.kv-breath-actions{justify-content:flex-end;align-items:center;gap:.75rem;margin-top:.5rem;display:flex}.kv-breath-btn{letter-spacing:.08em;text-transform:uppercase;cursor:pointer;white-space:nowrap;border-style:solid;border-width:1px;border-radius:999px;justify-content:center;align-items:center;padding:.6rem 1.3rem;font-size:.8rem;font-weight:600;transition:transform .13s ease-out,box-shadow .13s ease-out,background .18s ease-out,border-color .18s ease-out,color .18s ease-out;display:inline-flex;position:relative}.kv-breath-btn:disabled{opacity:.4;cursor:default;box-shadow:none;transform:none}.kv-breath-btn-primary{background:var(--kv-breath-btn-primary-bg);border-color:var(--kv-breath-btn-primary-border);color:#050914;box-shadow:0 12px 40px #04bfff66}.kv-breath-btn-primary:hover:not(:disabled){transform:translateY(-1px)scale(1.015);box-shadow:0 16px 44px #04bfff80}.kv-breath-btn-primary:active:not(:disabled){transform:translateY(0)scale(.99);box-shadow:0 8px 26px #04bfff73}.kv-breath-btn-warning{background:var(--kv-breath-btn-warning-bg);color:#1b0505;border-color:#fecacab3;box-shadow:0 12px 40px #f8717173}.kv-breath-btn-warning:hover:not(:disabled){transform:translateY(-1px)scale(1.01)}.kv-breath-btn-ghost{background:var(--kv-breath-btn-ghost-bg);border-color:var(--kv-breath-btn-ghost-border);color:#d4e0f6e6}.kv-breath-btn-ghost:disabled{opacity:.65}.kv-breath-sealed-note{color:#e9faffe6;background:radial-gradient(circle at 0,#ffd27f2e,#0000 65%);border:1px solid #ffedd58c;border-radius:999px;margin-left:auto;padding:.35rem .75rem;font-size:.78rem}.kv-breath-root[data-phase=inhale] .kv-breath-orb-inner{box-shadow:0 0 30px #5ce1ffb3,0 0 80px #5ce1ff73}.kv-breath-root[data-phase=exhale] .kv-breath-orb-inner{box-shadow:0 0 26px #ffd27fb8,0 0 70px #ffd27f80}.kv-breath-root[data-phase=sealed] .kv-breath-orb-inner{box-shadow:0 0 20px #a7f3d0e6,0 0 90px #2dd4bfb3}.kv-breath-root[data-phase=idle] .kv-breath-status-label,.kv-breath-root[data-phase=idle] .kv-breath-status-text{transition:color .18s ease-out}.kv-breath-root[data-phase=idle][data-error=true] .kv-breath-status-label,.kv-breath-root[data-phase=idle][data-error=true] .kv-breath-status-text{color:#fecaca}@media (prefers-reduced-motion:reduce){.kv-breath-orb-inner,.kv-breath-orb-ring:after{transition:none!important;animation:none!important}.kv-breath-bar-fill,.kv-breath-btn{transition:none!important}}@keyframes kv-breath-inhale{0%{transform:scale(.96)}50%{transform:scale(1.05)}to{transform:scale(1.02)}}@keyframes kv-breath-exhale{0%{transform:scale(1.02)}50%{transform:scale(.96)}to{transform:scale(.98)}}@keyframes kv-breath-rest{0%,to{transform:scale(1)}50%{transform:scale(1.015)}}.kv-social-connector{--kv-phi:1.61803;--kv-bg:#060a12eb;--kv-bg-soft:#0a101bf0;--kv-border:#7af0ff73;--kv-border-soft:#7af0ff2e;--kv-ink:#e9f6ff;--kv-ink-soft:#a9c6dd;--kv-ink-muted:#7f94af;--kv-gold:#ffd88a;--kv-gold-soft:#ffd88a52;--kv-cyan:#5af2ff;--kv-cyan-soft:#5af2ff4d;--kv-iris:#a78bfa;--kv-iris-soft:#a78bfa59;--kv-radius-lg:22px;--kv-radius-md:14px;--kv-radius-pill:999px;--kv-blur:28px;--kv-shadow-soft:0 24px 90px #000000b3;--kv-pulse-dur:var(--pulse-dur,5.236s);--kv-gap:1.25rem;--kv-gap-tight:.618rem;--kv-gap-wide:1.618rem;box-sizing:border-box;width:100%;max-width:960px;padding:max(1.25rem,env(safe-area-inset-top,0px))clamp(1rem,1.25rem + .5vw,1.75rem)max(1.5rem,env(safe-area-inset-bottom,0px));border-radius:var(--kv-radius-lg);color:var(--kv-ink);border:1px solid var(--kv-border-soft);box-shadow:var(--kv-shadow-soft);background:radial-gradient(circle at 0 0,#5af2ff26,#0000 55%),radial-gradient(circle at 100% 100%,#a78bfa2e,#0000 55%),linear-gradient(135deg,#060a12f5,#080d18f5);margin:0 auto;position:relative;overflow:hidden}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.kv-social-connector{-webkit-backdrop-filter:blur(var(--kv-blur));backdrop-filter:blur(var(--kv-blur))}}.kv-social-connector:before{content:"";border-radius:inherit;pointer-events:none;opacity:.18;mix-blend-mode:screen;z-index:-1;transform-origin:50%;animation:kv-social-breathe var(--kv-pulse-dur)ease-in-out infinite;background:conic-gradient(from 180deg,#5af2ff59,#a78bfa59,#ffd88a73,#5af2ff59);position:absolute;inset:-2px}@keyframes kv-social-breathe{0%,to{opacity:.16;transform:scale(1)}50%{opacity:.28;transform:scale(1.02)}}@media (prefers-reduced-motion:reduce){.kv-social-connector:before{animation:none}}.kv-social-header{margin-bottom:var(--kv-gap-wide);flex-direction:column;gap:.5rem;display:flex}.kv-social-title{letter-spacing:.08em;text-transform:uppercase;color:var(--kv-ink);text-shadow:0 0 16px #000000b3;margin:0;font-size:clamp(1.25rem,1.1rem + .5vw,1.6rem);font-weight:600}.kv-social-subtitle{color:var(--kv-ink-soft);max-width:40rem;margin:0;font-size:.9rem;line-height:1.5}.kv-social-proof{gap:var(--kv-gap);margin-bottom:var(--kv-gap-wide);grid-template-columns:minmax(0,2fr) minmax(0,1.3fr);display:grid}@media (max-width:768px){.kv-social-proof{grid-template-columns:minmax(0,1fr)}}.kv-social-proof-block{background:linear-gradient(140deg,#5af2ff1f,#a78bfa14),linear-gradient(145deg,var(--kv-bg-soft),#060a12fa);border-radius:var(--kv-radius-md);padding:var(--kv-gap);border:1px solid #a3deff57;position:relative;overflow:hidden;box-shadow:0 14px 40px #0000008c}.kv-social-proof-block:after{content:"";opacity:.4;pointer-events:none;background:radial-gradient(circle at 90% 0,#ffd88a40,#0000 48%);position:absolute;inset:0}.kv-proof-label{text-transform:uppercase;letter-spacing:.14em;color:var(--kv-ink-muted);margin-bottom:.5rem;font-size:.8rem}.kv-proof-caption{color:var(--kv-ink);white-space:pre-wrap;background:#050910e6;border:1px solid #5af2ff40;border-radius:.85rem;max-height:14rem;margin:0;padding:.85rem .9rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.82rem;line-height:1.5;overflow:auto}.kv-social-proof-meta{border-radius:var(--kv-radius-md);padding:var(--kv-gap);gap:var(--kv-gap-tight);background:linear-gradient(150deg,#a78bfa1f,#5af2ff0f),linear-gradient(145deg,#080e18f5,#050910fa);border:1px solid #92ceff61;flex-direction:column;display:flex;position:relative;overflow:hidden}.kv-social-proof-meta:before{content:"";mix-blend-mode:screen;opacity:.45;pointer-events:none;background:radial-gradient(circle at 10% 100%,#a78bfa42,#0000 55%);position:absolute;inset:0}.kv-proof-meta-row{background:linear-gradient(90deg,#0b121ed9,#0a0e18f2);border:1px solid #85ccff3d;border-radius:999px;justify-content:space-between;align-items:center;gap:.75rem;padding:.5rem .75rem;display:flex;position:relative}.kv-proof-meta-label{text-transform:uppercase;letter-spacing:.16em;color:var(--kv-ink-muted);font-size:.78rem}.kv-proof-meta-value{color:var(--kv-gold);text-align:right;overflow-wrap:anywhere;font-size:.86rem;font-weight:500}.kv-social-actions{gap:var(--kv-gap);margin-top:var(--kv-gap-wide);flex-direction:column;display:flex}.kv-social-row{flex-wrap:wrap;gap:.75rem;display:flex}.kv-social-row--primary{justify-content:space-between}.kv-social-row--grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;display:grid}.kv-social-row--secondary{justify-content:flex-start}@media (max-width:768px){.kv-social-row--primary{flex-direction:column;align-items:stretch}.kv-social-row--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:480px){.kv-social-row--grid{grid-template-columns:minmax(0,1fr)}}.kv-btn{--kv-btn-bg:#0d1424fa;--kv-btn-border:#7af0ff8c;--kv-btn-text:var(--kv-ink);--kv-btn-shadow:0 14px 36px #000000a6;appearance:none;border-radius:var(--kv-radius-pill);border:1px solid var(--kv-btn-border);letter-spacing:.06em;text-transform:uppercase;background:radial-gradient(circle at 0% 0%,#5af2ff47,transparent 55%),linear-gradient(135deg,var(--kv-btn-bg),#080d1afa);color:var(--kv-btn-text);cursor:pointer;box-shadow:var(--kv-btn-shadow);justify-content:center;align-items:center;gap:.4rem;padding:.65rem 1.35rem;font-size:.9rem;font-weight:500;transition:transform .14s ease-out,box-shadow .14s ease-out,background .18s ease-out,border-color .18s ease-out;display:inline-flex;position:relative;overflow:hidden}.kv-btn:after{content:"";mix-blend-mode:screen;opacity:0;background:radial-gradient(circle at 12% 0,#ffffff26,#0000 60%);transition:opacity .18s ease-out;position:absolute;inset:0}.kv-btn:hover{border-color:#ffd88ac2;transform:translateY(-1px);box-shadow:0 18px 48px #000000bf}.kv-btn:hover:after{opacity:1}.kv-btn:active{transform:translateY(0);box-shadow:0 10px 26px #000000b3}.kv-btn:focus-visible{outline:2px solid #0000;box-shadow:0 0 0 1px #000000e6,0 0 0 2px #5af2ffe6,0 18px 48px #000c}.kv-btn-primary{--kv-btn-bg:#091323fa;--kv-btn-border:#5af2ffe6;--kv-btn-text:#041118;color:#041118;background:linear-gradient(135deg,#5af2ff,#ffd88a)}.kv-btn-ghost{--kv-btn-bg:#04080f99;--kv-btn-border:#7af0ff66;--kv-btn-text:var(--kv-ink-soft);box-shadow:0 10px 30px #000000a6}.kv-btn-outline{--kv-btn-bg:#04080f33;--kv-btn-border:#a78bfabf;--kv-btn-text:var(--kv-ink-soft);background:linear-gradient(135deg,#04080fa6,#04080ff2);box-shadow:0 8px 24px #0009}.kv-btn-chip{--kv-btn-bg:#0b121ef2;--kv-btn-border:#85ccffb3;--kv-btn-text:var(--kv-ink-soft);text-transform:none;letter-spacing:.04em;padding-block:.55rem;padding-inline:1.05rem;font-size:.82rem}.kv-social-status{color:var(--kv-ink-muted);border-radius:var(--kv-radius-md);background:linear-gradient(90deg,#040a12e6,#080e1af2);border:1px solid #7af0ff40;margin-top:.75rem;padding:.6rem .85rem;font-size:.82rem;line-height:1.4;box-shadow:0 10px 30px #00000094}.kv-social-connector *,.kv-social-connector :before,.kv-social-connector :after{box-sizing:border-box}.kv-share-shell{--phi:1.61803;--phi-small:1.27202;--pulse-dur:var(--kai-pulse,5.236s);--kv-bg:#040910f5;--kv-bg-soft:#09101cf5;--kv-border:#b4d2ff29;--kv-border-strong:#a0deff80;--kv-ink:#eef4ff;--kv-ink-soft:#c1cbe3;--kv-ink-muted:#8c9bb8;--kv-gold:#ffd89b;--kv-gold-strong:#ffe7aa;--kv-cyan:#5df5ff;--kv-violet:#a58bff;--kv-emerald:#34e5a5;--kv-danger:#ff6b81;color:var(--kv-ink);border-radius:calc(18px*var(--phi-small));padding:calc(1.25rem*var(--phi-small));border:1px solid var(--kv-border);background:radial-gradient(circle at 0 0,#0b1423 0,#02050a 52%,#000 100%);position:relative;overflow:hidden;box-shadow:0 0 0 1px #5df5ff0a,0 24px 60px #000000bf,0 0 60px #5ce1ff40}.kv-share-shell:before,.kv-share-shell:after{content:"";pointer-events:none;mix-blend-mode:screen;opacity:.22;filter:blur(26px);z-index:-1;background:radial-gradient(circle at 10% 0,#5df5ff80 0,#0000 50%),radial-gradient(circle at 100% 100%,#a58bff80 0,#0000 55%);position:absolute;inset:-25%}.kv-share-shell:after{opacity:.35;animation:kv-aurora var(--pulse-dur)ease-in-out infinite alternate;background:radial-gradient(circle at 20% 80%,#34e5a58c 0,#0000 50%),radial-gradient(circle at 90% 10%,#ffd89b99 0,#0000 55%)}.kv-share-shell{animation:kv-shell-breath var(--pulse-dur)ease-in-out infinite}.kv-share-header{border-bottom:1px solid #b4d2ff29;flex-direction:column;gap:.4rem;margin-bottom:.9rem;padding-bottom:.9rem;display:flex}.kv-share-title{letter-spacing:.06em;text-transform:uppercase;align-items:center;gap:.5rem;font-size:clamp(1.1rem,1rem + .2vw,1.25rem);font-weight:600;display:inline-flex}.kv-share-title:before{content:"🌀";filter:drop-shadow(0 0 8px #5df5ffcc);font-size:.95em}.kv-share-subtitle{color:var(--kv-ink-muted);max-width:42rem;font-size:.85rem;line-height:1.5}.kv-share-broadcast{border-radius:calc(14px*var(--phi-small));background:radial-gradient(circle at 0 0,#091b30f2,#030711fa);border:1px solid #67a8ff42;padding:.9rem;position:relative;box-shadow:0 0 0 1px #5df5ff0f}.kv-share-broadcast:before{content:"";border-radius:inherit;pointer-events:none;opacity:.8;mix-blend-mode:screen;background:radial-gradient(circle at 50% 0,#5df5ff14,#0000 60%);position:absolute;inset:0}.kv-share-empty{color:var(--kv-ink-muted);background:#06111ee6;border:1px dashed #768cb499;border-radius:12px;padding:.85rem 1rem;font-size:.9rem;line-height:1.5}.kv-share-connected-label{text-transform:uppercase;letter-spacing:.14em;color:var(--kv-ink-soft);align-items:center;gap:.45rem;margin-bottom:.6rem;font-size:.75rem;display:inline-flex}.kv-share-connected-label:before{content:"";background:linear-gradient(90deg,#5df5ff4d,#a58bff1a,#5df5ff00);width:20px;height:1px}.kv-share-broadcast label{position:relative;overflow:hidden}.kv-share-broadcast label:before{content:"";opacity:0;z-index:-1;background:radial-gradient(circle at 0 0,#5df5ff2e,#0000 60%),radial-gradient(circle at 100% 100%,#34e5a52e,#0000 60%);transition:opacity .22s ease-out;position:absolute;inset:-40%}.kv-share-broadcast label:hover:before{opacity:.9}.kv-share-broadcast input[type=checkbox]{border-radius:.35rem;width:1rem;height:1rem}.kv-btn{--btn-radius:999px;--btn-pad-y:.55rem;--btn-pad-x:1.15rem;padding:var(--btn-pad-y)var(--btn-pad-x);border-radius:var(--btn-radius);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #0000;justify-content:center;align-items:center;gap:.4rem;font-size:.9rem;font-weight:500;transition:transform .16s ease-out,box-shadow .16s ease-out,border-color .16s ease-out,background .16s ease-out,color .16s ease-out,opacity 80ms ease-out;display:inline-flex;position:relative}.kv-btn-primary{color:#020609;background:radial-gradient(circle at 0 0,#5df5ff 0,#34e5a5 40%,#ffd89b 100%);border-color:#ffffff38;box-shadow:0 0 0 1px #000000b3,0 12px 35px #5df5ff4d,0 0 35px #ffd89b4d}.kv-btn-primary:hover:not(.kv-btn-disabled){transform:translateY(-1px)scale(1.015);box-shadow:0 0 0 1px #000000b3,0 16px 40px #5df5ff66,0 0 42px #ffd89b66}.kv-btn-primary:active:not(.kv-btn-disabled){transform:translateY(0)scale(.99);box-shadow:0 0 0 1px #000000d9,0 6px 24px #5df5ff33}.kv-btn-disabled,.kv-btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;color:var(--kv-ink-muted);background:radial-gradient(circle at 0 0,#3a4a57 0,#1c2430 70%);border-color:#8c97ac73}.kv-share-results{background:linear-gradient(135deg,#0a1526f2,#081221fa,#0a1628fa);border:1px solid #5df5ff4d;border-radius:12px;margin-top:.8rem;padding:.75rem .9rem;box-shadow:0 0 0 1px #5df5ff29}.kv-share-results h3{color:var(--kv-ink-soft)}.kv-share-results a{color:var(--kv-cyan);text-underline-offset:2px;text-decoration-thickness:1px}.kv-share-results a:hover{text-decoration-thickness:2px}.kv-share-status{color:var(--kv-ink-soft)}.kv-share-error{color:var(--kv-danger)}.kv-share-manual{background:radial-gradient(circle at 100% 0,#a58bff2e,#0000 55%),radial-gradient(circle at 0 100%,#5df5ff1a,#0000 55%);border:1px dashed #a58bff73;border-radius:12px;margin-top:.4rem;padding:.85rem .9rem}.kv-share-footer{border-top:1px solid #b4d2ff29;margin-top:.4rem;padding-top:.9rem}@keyframes kv-shell-breath{0%{transform:translateY(0)scale(1);box-shadow:0 0 0 1px #000000b3,0 22px 55px #000000b3,0 0 46px #5df5ff59}50%{transform:translateY(-.5px)scale(1.007);box-shadow:0 0 0 1px #000000a6,0 26px 62px #000c,0 0 60px #5df5ff73}to{transform:translateY(0)scale(1);box-shadow:0 0 0 1px #000000b3,0 22px 55px #000000b3,0 0 46px #5df5ff59}}@keyframes kv-aurora{0%{opacity:.25;transform:translate(-4%,3%)scale(1.02)}50%{opacity:.42;transform:translate(3%,-2%)scale(1.06)}to{opacity:.32;transform:translate(0%,0%)scale(1.03)}}@media (prefers-reduced-motion:reduce){.kv-share-shell,.kv-share-shell:after{animation:none!important}.kv-btn,.kv-share-broadcast label{transition:none!important}} diff --git a/dist/assets/KaiVohModal-Dow3Zyvd.js b/dist/assets/KaiVohModal-DqDHdaQ-.js similarity index 92% rename from dist/assets/KaiVohModal-Dow3Zyvd.js rename to dist/assets/KaiVohModal-DqDHdaQ-.js index 1a4bcd47a..50529c359 100644 --- a/dist/assets/KaiVohModal-Dow3Zyvd.js +++ b/dist/assets/KaiVohModal-DqDHdaQ-.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/KaiVohApp-5YpSzMzY.js","assets/index-BoEZKnmf.js","assets/index-BgUnq8XG.css","assets/prop-types-Cw0kCKc2.js","assets/VerifierFrame-DwmwJ3uQ.js","assets/VerifierFrame-FeNZTUNm.css","assets/SigilAuthContext-CLP23KDu.js","assets/ticker-eo_G7AgT.js","assets/ticker-B0glx6FE.css","assets/sessionStorage-2Nr46eZD.js","assets/postSeal-DGeRGc3h.js","assets/webauthnKAS-BovqgYOx.js","assets/KaiVohApp-DKKSrc21.css","assets/KaiRealms-ecJ2QA-S.js","assets/x-CmijL4ZY.js","assets/KaiRealms-BZJvSAmB.css"])))=>i.map(i=>d[i]); -import{t as e}from"./x-CmijL4ZY.js";import{Vt as t,ii as n,oi as r,pi as i,si as a}from"./index-BoEZKnmf.js";import{t as o}from"./SigilAuthContext-CLP23KDu.js";import{n as s}from"./sessionStorage-2Nr46eZD.js";import{t as c}from"./SigilAuthProvider-CT0qH_fA.js";var l=i(r(),1),u=i(a(),1),d=i(t(),1),f=class extends u.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`[KaiVoh] render error:`,e,t)}render(){return this.state.error?(0,d.jsxs)(`div`,{style:{padding:`1rem`,textAlign:`center`},children:[(0,d.jsx)(`h2`,{style:{fontSize:18,fontWeight:600},children:`KaiVoh failed to load`}),(0,d.jsx)(`p`,{style:{opacity:.8,marginTop:8},children:this.state.error.message}),(0,d.jsxs)(`details`,{style:{opacity:.65,marginTop:12,textAlign:`left`},children:[(0,d.jsx)(`summary`,{children:`Details`}),(0,d.jsx)(`pre`,{style:{whiteSpace:`pre-wrap`},children:String(this.state.error.stack??``)})]})]}):this.props.children}};function p(){let e=(0,u.useContext)(o);if(!e)throw Error(`useSigilAuth must be used inside `);return e}var m=(0,u.lazy)(()=>n(()=>import(`./KaiVohApp-5YpSzMzY.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),h=(0,u.lazy)(()=>n(()=>import(`./KaiRealms-ecJ2QA-S.js`),__vite__mapDeps([13,1,2,14,15]))),g=(1+Math.sqrt(5))/2,_=5.236,v=610,y=377;function b({className:e}){let t=(0,u.useId)();return(0,d.jsxs)(`svg`,{className:e,width:v,height:y,viewBox:`0 0 ${v} ${y}`,"aria-hidden":`true`,focusable:`false`,children:[(0,d.jsx)(`defs`,{children:(0,d.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,d.jsx)(`stop`,{offset:`0%`,stopColor:`currentColor`,stopOpacity:`0.0`}),(0,d.jsx)(`stop`,{offset:`40%`,stopColor:`currentColor`,stopOpacity:`0.5`}),(0,d.jsx)(`stop`,{offset:`100%`,stopColor:`currentColor`,stopOpacity:`0.0`})]})}),(0,d.jsxs)(`g`,{fill:`none`,stroke:`url(#${t})`,strokeWidth:`2`,children:[(0,d.jsx)(`path`,{d:`M377 0 A377 377 0 0 1 0 377`}),(0,d.jsx)(`path`,{d:`M233 0 A233 233 0 0 1 0 233`}),(0,d.jsx)(`path`,{d:`M144 0 A144 144 0 0 1 0 144`}),(0,d.jsx)(`path`,{d:`M89 0 A89 89 0 0 1 0 89`}),(0,d.jsx)(`path`,{d:`M55 0 A55 55 0 0 1 0 55`}),(0,d.jsx)(`path`,{d:`M34 0 A34 34 0 0 1 0 34`}),(0,d.jsx)(`path`,{d:`M21 0 A21 21 0 0 1 0 21`})]})]})}function x({className:e}){return(0,d.jsxs)(`div`,{className:`seal-emblem ${e??``}`,"aria-hidden":`true`,children:[(0,d.jsx)(`div`,{className:`seal-ring seal-ring--outer`}),(0,d.jsx)(`div`,{className:`seal-ring seal-ring--inner`}),(0,d.jsx)(`div`,{className:`seal-core`})]})}function S({className:e}){let{auth:t}=p(),n=t.meta;if(!n)return null;let r=[`Pulse: ${n.pulse}`,`Beat: ${n.beat}`,`Step: ${n.stepIndex}`,`Day: ${n.chakraDay}`];return n.sigilId&&r.push(`Sigil: ${n.sigilId}`),n.userPhiKey&&r.push(`PhiKey: ${n.userPhiKey}`),(0,d.jsxs)(`div`,{className:`sigil-auth-pill ${e??``}`,role:`status`,"aria-live":`polite`,title:r.join(` • `),style:{maxWidth:`100%`,overflowX:`auto`,whiteSpace:`nowrap`},children:[(0,d.jsx)(`span`,{className:`sigil-auth-pill__dot`,"aria-hidden":`true`}),(0,d.jsxs)(`span`,{className:`sigil-auth-pill__text mono`,children:[`Sealed • `,n.pulse,` • `,n.chakraDay,n.sigilId?` • ${n.sigilId}`:``]})]})}function C(e){return e?Array.from(e.querySelectorAll([`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex='-1'])`].join(`,`))).filter(e=>!e.hasAttribute(`disabled`)&&!e.getAttribute(`aria-hidden`)):[]}function w(e){return e?e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?!e.disabled:!!(e instanceof HTMLElement&&e.isContentEditable):!1}function T(e){if(!e||e instanceof HTMLTextAreaElement)return!1;if(e instanceof HTMLSelectElement)return!0;if(e instanceof HTMLInputElement){let t=e.type.toLowerCase();return![`button`,`submit`,`reset`,`checkbox`,`radio`,`file`,`range`,`color`].includes(t)}return!1}function E({open:t,onClose:n}){let r=(0,u.useCallback)(()=>{s(),n()},[n]),i=(0,u.useRef)(null),a=(0,u.useRef)(null),o=(0,u.useRef)(null),p=(0,u.useRef)(0),v=(0,u.useRef)(0),[y,E]=(0,u.useState)(`voh`),[D,O]=(0,u.useState)(!1),k=(0,u.useCallback)(e=>{e===`realms`&&!D&&O(!0),E(e)},[D]),A=(0,u.useMemo)(()=>({breath:`${_}s`,phi:`${g}`}),[]);(0,u.useEffect)(()=>{if(!t)return;let e={bodyOverflow:document.body.style.overflow,bodyPosition:document.body.style.position,bodyTop:document.body.style.top,bodyLeft:document.body.style.left,bodyRight:document.body.style.right,bodyWidth:document.body.style.width,bodyHeight:document.body.style.height,htmlOverflow:document.documentElement.style.overflow,htmlHeight:document.documentElement.style.height,docOverscroll:document.documentElement.style.getPropertyValue(`overscroll-behavior`),bodyOverscroll:document.body.style.getPropertyValue(`overscroll-behavior`),touchAction:document.documentElement.style.touchAction,breath:document.documentElement.style.getPropertyValue(`--kai-breath`),phi:document.documentElement.style.getPropertyValue(`--kai-phi`),kaiVh:document.documentElement.style.getPropertyValue(`--kai-vh`)};v.current=window.scrollY||window.pageYOffset||0,document.body.style.position=`fixed`,document.body.style.top=`-${v.current}px`,document.body.style.left=`0`,document.body.style.right=`0`,document.body.style.width=`100%`,document.body.style.height=`100%`,document.body.style.overflow=`hidden`,document.documentElement.style.overflow=`hidden`,document.documentElement.style.height=`100%`,document.documentElement.style.setProperty(`overscroll-behavior`,`none`),document.body.style.setProperty(`overscroll-behavior`,`none`),document.documentElement.style.touchAction=`manipulation`,document.documentElement.style.setProperty(`--kai-breath`,A.breath),document.documentElement.style.setProperty(`--kai-phi`,A.phi);let n=()=>{document.documentElement.style.setProperty(`--kai-vh`,`${window.innerHeight}px`)};n(),window.addEventListener(`resize`,n,{passive:!0});let s=o.current;s&&(s.style.overscrollBehavior=`contain`,s.style.webkitOverflowScrolling=`touch`),a.current?.focus();let c=e=>{p.current=e.touches[0]?.clientY??0},l=e=>{if(e.touches.length!==1)return;let t=o.current;if(!t){e.preventDefault();return}let n=e.target;if(!(n&&t.contains(n))){e.preventDefault();return}let r=(e.touches[0]?.clientY??p.current)-p.current,i=t.scrollTop<=0,a=t.scrollTop+t.clientHeight>=t.scrollHeight-1;(i&&r>0||a&&r<0)&&e.preventDefault()},u=e=>{let t=o.current;if(!t){e.preventDefault();return}let n=e.target;if(!(n&&t.contains(n))){e.preventDefault();return}let r=e.deltaY,i=t.scrollTop<=0,a=t.scrollTop+t.clientHeight>=t.scrollHeight-1;(i&&r<0||a&&r>0)&&e.preventDefault()},d=e=>{if(e.key===`Escape`){if(w(document.activeElement))return;e.preventDefault(),e.stopPropagation(),r();return}if(e.key===`Enter`){let t=e.target;T(t)&&i.current?.contains(t)&&e.preventDefault()}if(e.key!==`Tab`)return;let t=i.current,n=C(t);if(n.length===0)return;let a=document.activeElement,o=n[0],s=n[n.length-1];if(!a||!t?.contains(a)){e.preventDefault(),o.focus();return}e.shiftKey?a===o&&(e.preventDefault(),s.focus()):a===s&&(e.preventDefault(),o.focus())},f=new AbortController,m={passive:!0,signal:f.signal,capture:!0},h={passive:!1,signal:f.signal,capture:!0},g={passive:!1,signal:f.signal,capture:!0},_={signal:f.signal,capture:!0};document.addEventListener(`touchstart`,c,m),document.addEventListener(`touchmove`,l,h),document.addEventListener(`wheel`,u,g),document.addEventListener(`keydown`,d,_);let y=e=>{e.preventDefault()};return document.addEventListener(`gesturestart`,y,{passive:!1,signal:f.signal}),document.addEventListener(`gesturechange`,y,{passive:!1,signal:f.signal}),document.addEventListener(`gestureend`,y,{passive:!1,signal:f.signal}),document.addEventListener(`submit`,e=>{let t=e.target;t&&i.current?.contains(t)&&(e.preventDefault(),e.stopPropagation())},{capture:!0,signal:f.signal}),()=>{f.abort(),window.removeEventListener(`resize`,n),document.body.style.overflow=e.bodyOverflow,document.body.style.position=e.bodyPosition,document.body.style.top=e.bodyTop,document.body.style.left=e.bodyLeft,document.body.style.right=e.bodyRight,document.body.style.width=e.bodyWidth,document.body.style.height=e.bodyHeight,document.documentElement.style.overflow=e.htmlOverflow,document.documentElement.style.height=e.htmlHeight,e.docOverscroll?document.documentElement.style.setProperty(`overscroll-behavior`,e.docOverscroll):document.documentElement.style.removeProperty(`overscroll-behavior`),e.bodyOverscroll?document.body.style.setProperty(`overscroll-behavior`,e.bodyOverscroll):document.body.style.removeProperty(`overscroll-behavior`),document.documentElement.style.touchAction=e.touchAction,e.breath?document.documentElement.style.setProperty(`--kai-breath`,e.breath):document.documentElement.style.removeProperty(`--kai-breath`),e.phi?document.documentElement.style.setProperty(`--kai-phi`,e.phi):document.documentElement.style.removeProperty(`--kai-phi`),e.kaiVh?document.documentElement.style.setProperty(`--kai-vh`,e.kaiVh):document.documentElement.style.removeProperty(`--kai-vh`);let t=v.current||0;window.scrollTo(0,t)}},[t,r,A.breath,A.phi]);let j=(0,u.useCallback)(e=>{e.stopPropagation(),r()},[r]),M=(0,u.useCallback)(e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),r())},[r]);return t?(0,l.createPortal)((0,d.jsxs)(`div`,{ref:i,className:`kai-voh-modal-backdrop atlantean-veil`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`kaivoh-title`,"data-view":y,children:[(0,d.jsx)(`div`,{className:`atlantean-stars`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`atlantean-halo atlantean-halo--1`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`atlantean-halo atlantean-halo--2`,"aria-hidden":`true`}),(0,d.jsxs)(`div`,{className:`kai-voh-container kai-pulse-border glass-omni`,role:`document`,children:[(0,d.jsx)(`div`,{className:`breath-ring breath-ring--outer`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`breath-ring breath-ring--inner`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`phi-grid`,"aria-hidden":`true`}),(0,d.jsx)(b,{className:`phi-spiral phi-spiral--tl`}),(0,d.jsx)(b,{className:`phi-spiral phi-spiral--br`}),(0,d.jsxs)(c,{children:[y!==`realms`&&(0,d.jsx)(`button`,{ref:a,type:`button`,className:`kai-voh-close auric-btn`,"aria-label":`Close portal`,onPointerDown:j,onKeyDown:M,children:(0,d.jsx)(e,{size:22,"aria-hidden":`true`})}),y!==`realms`&&(0,d.jsx)(`div`,{className:`voh-top-orb`,"aria-hidden":`true`,children:(0,d.jsx)(x,{})}),(0,d.jsxs)(`div`,{className:`kai-voh-tabbar`,role:`tablist`,"aria-label":`Kai portal views`,children:[(0,d.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`voh`,className:`kai-voh-tab auric-tab ${y===`voh`?`active`:``}`,onClick:()=>k(`voh`),children:[(0,d.jsx)(`span`,{className:`tab-glyph`,"aria-hidden":`true`,children:`🜂`}),` `,`Voh`]}),(0,d.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`realms`,className:`kai-voh-tab auric-tab ${y===`realms`?`active`:``}`,onClick:()=>k(`realms`),children:[(0,d.jsx)(`span`,{className:`tab-glyph`,"aria-hidden":`true`,children:`⚚`}),` `,`Realms`]}),(0,d.jsx)(`div`,{className:`breath-meter`,"aria-hidden":`true`,children:(0,d.jsx)(`div`,{className:`breath-meter__dot`})}),(0,d.jsx)(S,{className:`sigil-auth-pill--tabbar`})]}),(0,d.jsxs)(`div`,{className:`kai-voh-body`,ref:o,children:[(0,d.jsx)(`h2`,{id:`kaivoh-title`,className:`sr-only`,children:`Kai Portal`}),(0,d.jsxs)(f,{children:[(0,d.jsx)(`section`,{className:`portal-pane portal-pane--voh`,style:{display:y===`voh`?`block`:`none`},"aria-hidden":y!==`voh`,children:(0,d.jsx)(u.Suspense,{fallback:(0,d.jsxs)(`div`,{className:`kai-voh-center`,children:[(0,d.jsx)(`div`,{className:`kai-voh-spinner`}),(0,d.jsx)(`div`,{children:`Summoning Voh…`})]}),children:(0,d.jsx)(m,{})})}),(0,d.jsx)(`section`,{className:`portal-pane portal-pane--realms`,style:{display:y===`realms`?`block`:`none`},"aria-hidden":y!==`realms`,children:D?(0,d.jsx)(u.Suspense,{fallback:(0,d.jsxs)(`div`,{className:`kai-voh-center`,children:[(0,d.jsx)(`div`,{className:`kai-voh-spinner`}),(0,d.jsx)(`div`,{children:`Opening Kai Realms…`})]}),children:(0,d.jsx)(h,{onClose:()=>k(`voh`)})}):null})]})]})]})]})]}),document.body):null}export{E as default}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/KaiVohApp-CQXUiNpZ.js","assets/index-BoQy35uR.js","assets/index-BgUnq8XG.css","assets/prop-types-ClmeRyhJ.js","assets/VerifierFrame-CHXAebtX.js","assets/VerifierFrame-FeNZTUNm.css","assets/SigilAuthContext-BnirZa1k.js","assets/ticker-JEnF9btM.js","assets/ticker-B0glx6FE.css","assets/sessionStorage-2Nr46eZD.js","assets/postSeal-DGeRGc3h.js","assets/webauthnKAS--_8CNTOP.js","assets/KaiVohApp-Brroi08x.css","assets/KaiRealms-DHJBzHvC.js","assets/x-CZulwBSL.js","assets/KaiRealms-BZJvSAmB.css"])))=>i.map(i=>d[i]); +import{t as e}from"./x-CZulwBSL.js";import{Vt as t,ai as n,pi as r,ri as i,si as a}from"./index-BoQy35uR.js";import{t as o}from"./SigilAuthContext-BnirZa1k.js";import{n as s}from"./sessionStorage-2Nr46eZD.js";import{t as c}from"./SigilAuthProvider-C1UEo-AB.js";var l=r(n(),1),u=r(a(),1),d=r(t(),1),f=class extends u.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`[KaiVoh] render error:`,e,t)}render(){return this.state.error?(0,d.jsxs)(`div`,{style:{padding:`1rem`,textAlign:`center`},children:[(0,d.jsx)(`h2`,{style:{fontSize:18,fontWeight:600},children:`KaiVoh failed to load`}),(0,d.jsx)(`p`,{style:{opacity:.8,marginTop:8},children:this.state.error.message}),(0,d.jsxs)(`details`,{style:{opacity:.65,marginTop:12,textAlign:`left`},children:[(0,d.jsx)(`summary`,{children:`Details`}),(0,d.jsx)(`pre`,{style:{whiteSpace:`pre-wrap`},children:String(this.state.error.stack??``)})]})]}):this.props.children}};function p(){let e=(0,u.useContext)(o);if(!e)throw Error(`useSigilAuth must be used inside `);return e}var m=(0,u.lazy)(()=>i(()=>import(`./KaiVohApp-CQXUiNpZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),h=(0,u.lazy)(()=>i(()=>import(`./KaiRealms-DHJBzHvC.js`),__vite__mapDeps([13,1,2,14,15]))),g=(1+Math.sqrt(5))/2,_=5.236,v=610,y=377;function b({className:e}){let t=(0,u.useId)();return(0,d.jsxs)(`svg`,{className:e,width:v,height:y,viewBox:`0 0 ${v} ${y}`,"aria-hidden":`true`,focusable:`false`,children:[(0,d.jsx)(`defs`,{children:(0,d.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,d.jsx)(`stop`,{offset:`0%`,stopColor:`currentColor`,stopOpacity:`0.0`}),(0,d.jsx)(`stop`,{offset:`40%`,stopColor:`currentColor`,stopOpacity:`0.5`}),(0,d.jsx)(`stop`,{offset:`100%`,stopColor:`currentColor`,stopOpacity:`0.0`})]})}),(0,d.jsxs)(`g`,{fill:`none`,stroke:`url(#${t})`,strokeWidth:`2`,children:[(0,d.jsx)(`path`,{d:`M377 0 A377 377 0 0 1 0 377`}),(0,d.jsx)(`path`,{d:`M233 0 A233 233 0 0 1 0 233`}),(0,d.jsx)(`path`,{d:`M144 0 A144 144 0 0 1 0 144`}),(0,d.jsx)(`path`,{d:`M89 0 A89 89 0 0 1 0 89`}),(0,d.jsx)(`path`,{d:`M55 0 A55 55 0 0 1 0 55`}),(0,d.jsx)(`path`,{d:`M34 0 A34 34 0 0 1 0 34`}),(0,d.jsx)(`path`,{d:`M21 0 A21 21 0 0 1 0 21`})]})]})}function x({className:e}){return(0,d.jsxs)(`div`,{className:`seal-emblem ${e??``}`,"aria-hidden":`true`,children:[(0,d.jsx)(`div`,{className:`seal-ring seal-ring--outer`}),(0,d.jsx)(`div`,{className:`seal-ring seal-ring--inner`}),(0,d.jsx)(`div`,{className:`seal-core`})]})}function S({className:e}){let{auth:t}=p(),n=t.meta;if(!n)return null;let r=[`Pulse: ${n.pulse}`,`Beat: ${n.beat}`,`Step: ${n.stepIndex}`,`Day: ${n.chakraDay}`];return n.sigilId&&r.push(`Sigil: ${n.sigilId}`),n.userPhiKey&&r.push(`PhiKey: ${n.userPhiKey}`),(0,d.jsxs)(`div`,{className:`sigil-auth-pill ${e??``}`,role:`status`,"aria-live":`polite`,title:r.join(` • `),style:{maxWidth:`100%`,overflowX:`auto`,whiteSpace:`nowrap`},children:[(0,d.jsx)(`span`,{className:`sigil-auth-pill__dot`,"aria-hidden":`true`}),(0,d.jsxs)(`span`,{className:`sigil-auth-pill__text mono`,children:[`Sealed • `,n.pulse,` • `,n.chakraDay,n.sigilId?` • ${n.sigilId}`:``]})]})}function C(e){return e?Array.from(e.querySelectorAll([`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex='-1'])`].join(`,`))).filter(e=>!e.hasAttribute(`disabled`)&&!e.getAttribute(`aria-hidden`)):[]}function w(e){return e?e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?!e.disabled:!!(e instanceof HTMLElement&&e.isContentEditable):!1}function T(e){if(!e||e instanceof HTMLTextAreaElement)return!1;if(e instanceof HTMLSelectElement)return!0;if(e instanceof HTMLInputElement){let t=e.type.toLowerCase();return![`button`,`submit`,`reset`,`checkbox`,`radio`,`file`,`range`,`color`].includes(t)}return!1}function E({open:t,onClose:n}){let r=(0,u.useCallback)(()=>{s(),n()},[n]),i=(0,u.useRef)(null),a=(0,u.useRef)(null),o=(0,u.useRef)(null),p=(0,u.useRef)(0),v=(0,u.useRef)(0),[y,E]=(0,u.useState)(`voh`),[D,O]=(0,u.useState)(!1),k=(0,u.useCallback)(e=>{e===`realms`&&!D&&O(!0),E(e)},[D]),A=(0,u.useMemo)(()=>({breath:`${_}s`,phi:`${g}`}),[]);(0,u.useEffect)(()=>{if(!t)return;let e={bodyOverflow:document.body.style.overflow,bodyPosition:document.body.style.position,bodyTop:document.body.style.top,bodyLeft:document.body.style.left,bodyRight:document.body.style.right,bodyWidth:document.body.style.width,bodyHeight:document.body.style.height,htmlOverflow:document.documentElement.style.overflow,htmlHeight:document.documentElement.style.height,docOverscroll:document.documentElement.style.getPropertyValue(`overscroll-behavior`),bodyOverscroll:document.body.style.getPropertyValue(`overscroll-behavior`),touchAction:document.documentElement.style.touchAction,breath:document.documentElement.style.getPropertyValue(`--kai-breath`),phi:document.documentElement.style.getPropertyValue(`--kai-phi`),kaiVh:document.documentElement.style.getPropertyValue(`--kai-vh`)};v.current=window.scrollY||window.pageYOffset||0,document.body.style.position=`fixed`,document.body.style.top=`-${v.current}px`,document.body.style.left=`0`,document.body.style.right=`0`,document.body.style.width=`100%`,document.body.style.height=`100%`,document.body.style.overflow=`hidden`,document.documentElement.style.overflow=`hidden`,document.documentElement.style.height=`100%`,document.documentElement.style.setProperty(`overscroll-behavior`,`none`),document.body.style.setProperty(`overscroll-behavior`,`none`),document.documentElement.style.touchAction=`manipulation`,document.documentElement.style.setProperty(`--kai-breath`,A.breath),document.documentElement.style.setProperty(`--kai-phi`,A.phi);let n=()=>{document.documentElement.style.setProperty(`--kai-vh`,`${window.innerHeight}px`)};n(),window.addEventListener(`resize`,n,{passive:!0});let s=o.current;s&&(s.style.overscrollBehavior=`contain`,s.style.webkitOverflowScrolling=`touch`),a.current?.focus();let c=e=>{p.current=e.touches[0]?.clientY??0},l=e=>{if(e.touches.length!==1)return;let t=o.current;if(!t){e.preventDefault();return}let n=e.target;if(!(n&&t.contains(n))){e.preventDefault();return}let r=(e.touches[0]?.clientY??p.current)-p.current,i=t.scrollTop<=0,a=t.scrollTop+t.clientHeight>=t.scrollHeight-1;(i&&r>0||a&&r<0)&&e.preventDefault()},u=e=>{let t=o.current;if(!t){e.preventDefault();return}let n=e.target;if(!(n&&t.contains(n))){e.preventDefault();return}let r=e.deltaY,i=t.scrollTop<=0,a=t.scrollTop+t.clientHeight>=t.scrollHeight-1;(i&&r<0||a&&r>0)&&e.preventDefault()},d=e=>{if(e.key===`Escape`){if(w(document.activeElement))return;e.preventDefault(),e.stopPropagation(),r();return}if(e.key===`Enter`){let t=e.target;T(t)&&i.current?.contains(t)&&e.preventDefault()}if(e.key!==`Tab`)return;let t=i.current,n=C(t);if(n.length===0)return;let a=document.activeElement,o=n[0],s=n[n.length-1];if(!a||!t?.contains(a)){e.preventDefault(),o.focus();return}e.shiftKey?a===o&&(e.preventDefault(),s.focus()):a===s&&(e.preventDefault(),o.focus())},f=new AbortController,m={passive:!0,signal:f.signal,capture:!0},h={passive:!1,signal:f.signal,capture:!0},g={passive:!1,signal:f.signal,capture:!0},_={signal:f.signal,capture:!0};document.addEventListener(`touchstart`,c,m),document.addEventListener(`touchmove`,l,h),document.addEventListener(`wheel`,u,g),document.addEventListener(`keydown`,d,_);let y=e=>{e.preventDefault()};return document.addEventListener(`gesturestart`,y,{passive:!1,signal:f.signal}),document.addEventListener(`gesturechange`,y,{passive:!1,signal:f.signal}),document.addEventListener(`gestureend`,y,{passive:!1,signal:f.signal}),document.addEventListener(`submit`,e=>{let t=e.target;t&&i.current?.contains(t)&&(e.preventDefault(),e.stopPropagation())},{capture:!0,signal:f.signal}),()=>{f.abort(),window.removeEventListener(`resize`,n),document.body.style.overflow=e.bodyOverflow,document.body.style.position=e.bodyPosition,document.body.style.top=e.bodyTop,document.body.style.left=e.bodyLeft,document.body.style.right=e.bodyRight,document.body.style.width=e.bodyWidth,document.body.style.height=e.bodyHeight,document.documentElement.style.overflow=e.htmlOverflow,document.documentElement.style.height=e.htmlHeight,e.docOverscroll?document.documentElement.style.setProperty(`overscroll-behavior`,e.docOverscroll):document.documentElement.style.removeProperty(`overscroll-behavior`),e.bodyOverscroll?document.body.style.setProperty(`overscroll-behavior`,e.bodyOverscroll):document.body.style.removeProperty(`overscroll-behavior`),document.documentElement.style.touchAction=e.touchAction,e.breath?document.documentElement.style.setProperty(`--kai-breath`,e.breath):document.documentElement.style.removeProperty(`--kai-breath`),e.phi?document.documentElement.style.setProperty(`--kai-phi`,e.phi):document.documentElement.style.removeProperty(`--kai-phi`),e.kaiVh?document.documentElement.style.setProperty(`--kai-vh`,e.kaiVh):document.documentElement.style.removeProperty(`--kai-vh`);let t=v.current||0;window.scrollTo(0,t)}},[t,r,A.breath,A.phi]);let j=(0,u.useCallback)(e=>{e.stopPropagation(),r()},[r]),M=(0,u.useCallback)(e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),r())},[r]);return t?(0,l.createPortal)((0,d.jsxs)(`div`,{ref:i,className:`kai-voh-modal-backdrop atlantean-veil`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`kaivoh-title`,"data-view":y,children:[(0,d.jsx)(`div`,{className:`atlantean-stars`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`atlantean-halo atlantean-halo--1`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`atlantean-halo atlantean-halo--2`,"aria-hidden":`true`}),(0,d.jsxs)(`div`,{className:`kai-voh-container kai-pulse-border glass-omni`,role:`document`,children:[(0,d.jsx)(`div`,{className:`breath-ring breath-ring--outer`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`breath-ring breath-ring--inner`,"aria-hidden":`true`}),(0,d.jsx)(`div`,{className:`phi-grid`,"aria-hidden":`true`}),(0,d.jsx)(b,{className:`phi-spiral phi-spiral--tl`}),(0,d.jsx)(b,{className:`phi-spiral phi-spiral--br`}),(0,d.jsxs)(c,{children:[y!==`realms`&&(0,d.jsx)(`button`,{ref:a,type:`button`,className:`kai-voh-close auric-btn`,"aria-label":`Close portal`,onPointerDown:j,onKeyDown:M,children:(0,d.jsx)(e,{size:22,"aria-hidden":`true`})}),y!==`realms`&&(0,d.jsx)(`div`,{className:`voh-top-orb`,"aria-hidden":`true`,children:(0,d.jsx)(x,{})}),(0,d.jsxs)(`div`,{className:`kai-voh-tabbar`,role:`tablist`,"aria-label":`Kai portal views`,children:[(0,d.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`voh`,className:`kai-voh-tab auric-tab ${y===`voh`?`active`:``}`,onClick:()=>k(`voh`),children:[(0,d.jsx)(`span`,{className:`tab-glyph`,"aria-hidden":`true`,children:`🜂`}),` `,`Voh`]}),(0,d.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`realms`,className:`kai-voh-tab auric-tab ${y===`realms`?`active`:``}`,onClick:()=>k(`realms`),children:[(0,d.jsx)(`span`,{className:`tab-glyph`,"aria-hidden":`true`,children:`⚚`}),` `,`Realms`]}),(0,d.jsx)(`div`,{className:`breath-meter`,"aria-hidden":`true`,children:(0,d.jsx)(`div`,{className:`breath-meter__dot`})}),(0,d.jsx)(S,{className:`sigil-auth-pill--tabbar`})]}),(0,d.jsxs)(`div`,{className:`kai-voh-body`,ref:o,children:[(0,d.jsx)(`h2`,{id:`kaivoh-title`,className:`sr-only`,children:`Kai Portal`}),(0,d.jsxs)(f,{children:[(0,d.jsx)(`section`,{className:`portal-pane portal-pane--voh`,style:{display:y===`voh`?`block`:`none`},"aria-hidden":y!==`voh`,children:(0,d.jsx)(u.Suspense,{fallback:(0,d.jsxs)(`div`,{className:`kai-voh-center`,children:[(0,d.jsx)(`div`,{className:`kai-voh-spinner`}),(0,d.jsx)(`div`,{children:`Summoning Voh…`})]}),children:(0,d.jsx)(m,{})})}),(0,d.jsx)(`section`,{className:`portal-pane portal-pane--realms`,style:{display:y===`realms`?`block`:`none`},"aria-hidden":y!==`realms`,children:D?(0,d.jsx)(u.Suspense,{fallback:(0,d.jsxs)(`div`,{className:`kai-voh-center`,children:[(0,d.jsx)(`div`,{className:`kai-voh-spinner`}),(0,d.jsx)(`div`,{children:`Opening Kai Realms…`})]}),children:(0,d.jsx)(h,{onClose:()=>k(`voh`)})}):null})]})]})]})]})]}),document.body):null}export{E as default}; \ No newline at end of file diff --git a/dist/assets/PShort-X0g94feB.js b/dist/assets/PShort-slgITYQw.js similarity index 53% rename from dist/assets/PShort-X0g94feB.js rename to dist/assets/PShort-slgITYQw.js index 0c4d35524..607ed7984 100644 --- a/dist/assets/PShort-X0g94feB.js +++ b/dist/assets/PShort-slgITYQw.js @@ -1 +1 @@ -import{Vt as e,ni as t,pi as n,ri as r,si as i,ti as a}from"./index-BoEZKnmf.js";var o=n(i(),1),s=n(e(),1);function c(e){let t=e.trim();return t=t.replace(/[)\].,;:!?]+$/g,``),t=t.replace(/^[([{"'`]+/g,``),t.trim()}function l(e){let t=c(e);if(/%[0-9A-Fa-f]{2}/.test(t))try{t=decodeURIComponent(t)}catch{}return t.includes(` `)&&(t=t.replaceAll(` `,`+`)),t=t.replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``),c(t)}function u(){let e=t(),n=a(),i=r();return(0,o.useEffect)(()=>{let t=typeof i.token==`string`?i.token:``,r=typeof i[`*`]==`string`?i[`*`]:``,a=t&&r?`${t}/${r}`:t||r,o=new URLSearchParams(n.search),s=new URLSearchParams(n.hash.startsWith(`#`)?n.hash.slice(1):n.hash),c=o.get(`t`)||o.get(`p`)||o.get(`token`)||s.get(`t`)||s.get(`p`)||s.get(`token`)||``,u=a||c;u&&e(`/p~${l(u)}`,{replace:!0})},[e,n.search,n.hash,i]),(0,s.jsxs)(`div`,{className:`notfound`,role:`region`,"aria-label":`Redirecting`,children:[(0,s.jsx)(`div`,{className:`notfound__title`,children:`Redirecting…`}),(0,s.jsx)(`div`,{className:`notfound__hint`,children:`Normalizing payload token.`})]})}export{u as default}; \ No newline at end of file +import{Vt as e,ei as t,ni as n,pi as r,si as i,ti as a}from"./index-BoQy35uR.js";var o=r(i(),1),s=r(e(),1);function c(e){let t=e.trim();return t=t.replace(/[)\].,;:!?]+$/g,``),t=t.replace(/^[([{"'`]+/g,``),t.trim()}function l(e){let t=c(e);if(/%[0-9A-Fa-f]{2}/.test(t))try{t=decodeURIComponent(t)}catch{}return t.includes(` `)&&(t=t.replaceAll(` `,`+`)),t=t.replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``),c(t)}function u(){let e=a(),r=t(),i=n();return(0,o.useEffect)(()=>{let t=typeof i.token==`string`?i.token:``,n=typeof i[`*`]==`string`?i[`*`]:``,a=t&&n?`${t}/${n}`:t||n,o=new URLSearchParams(r.search),s=new URLSearchParams(r.hash.startsWith(`#`)?r.hash.slice(1):r.hash),c=o.get(`t`)||o.get(`p`)||o.get(`token`)||s.get(`t`)||s.get(`p`)||s.get(`token`)||``,u=a||c;u&&e(`/p~${l(u)}`,{replace:!0})},[e,r.search,r.hash,i]),(0,s.jsxs)(`div`,{className:`notfound`,role:`region`,"aria-label":`Redirecting`,children:[(0,s.jsx)(`div`,{className:`notfound__title`,children:`Redirecting…`}),(0,s.jsx)(`div`,{className:`notfound__hint`,children:`Normalizing payload token.`})]})}export{u as default}; \ No newline at end of file diff --git a/dist/assets/SealMomentModal-C0ZsD2Wj.js b/dist/assets/SealMomentModal-f8C8Q0lx.js similarity index 99% rename from dist/assets/SealMomentModal-C0ZsD2Wj.js rename to dist/assets/SealMomentModal-f8C8Q0lx.js index 0a6234115..7e02e006f 100644 --- a/dist/assets/SealMomentModal-C0ZsD2Wj.js +++ b/dist/assets/SealMomentModal-f8C8Q0lx.js @@ -1 +1 @@ -import{Vt as e,oi as t,pi as n,si as r}from"./index-BoEZKnmf.js";var i=n(r(),1),a=n(t(),1),o=n(e(),1),s=`sigil:urls`;function c(e){if(!(typeof window>`u`))try{let t=window.localStorage.getItem(s),n=t?JSON.parse(t):[];n.includes(e)||(n.push(e),window.localStorage.setItem(s,JSON.stringify(n))),window.dispatchEvent(new CustomEvent(`sigil:url-registered`,{detail:{url:e}}))}catch{}}var l=({open:e,url:t,hash:n,onClose:r,onDownloadZip:s})=>{let l=(0,i.useRef)(null),h=(0,i.useRef)(null),g=(0,i.useRef)(null),[_,v]=(0,i.useState)(``),y=(0,i.useRef)(null);(0,i.useEffect)(()=>{if(!(!e||!t)&&y.current!==t){if(y.current=t,typeof window<`u`&&typeof window.__SIGIL__?.registerSigilUrl==`function`)try{window.__SIGIL__.registerSigilUrl(t)}catch{c(t)}else c(t);if(typeof window<`u`&&typeof window.__SIGIL__?.registerSend==`function`)try{window.__SIGIL__.registerSend({type:`sigil:mint`,url:t,hash:n})}catch{}}},[e,t,n]);let b=(0,i.useMemo)(()=>{if(typeof navigator>`u`)return!1;let e=navigator;return typeof e.share==`function`?t&&typeof e.canShare==`function`?e.canShare({url:t}):!0:!1},[t]),x=(0,i.useCallback)(e=>{let t=l.current;if(!t)return;let n=t.querySelectorAll([`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex='-1'])`].join(`,`));if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&document.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&document.activeElement===r&&(e.preventDefault(),i.focus())},[]);(0,i.useEffect)(()=>{if(!e)return;g.current=document.activeElement??null;let t=document.body.style.overflow;document.body.style.overflow=`hidden`;let n=window.setTimeout(()=>h.current?.focus({preventScroll:!0}),0),r=e=>{e.key===`Tab`&&x(e)};return document.addEventListener(`keydown`,r,!0),()=>{document.body.style.overflow=t,document.removeEventListener(`keydown`,r,!0),window.clearTimeout(n),g.current?.focus?.()}},[e,x]);let S=e=>{v(e),window.setTimeout(()=>v(``),900)},C=async(e,t)=>{try{if(typeof navigator>`u`)throw Error(`no navigator`);if(!navigator.clipboard?.writeText)throw Error(`no clipboard`);await navigator.clipboard.writeText(e),S(`${t} copied to clipboard`)}catch{S(`Could not copy ${t}`)}},w=async()=>{try{b&&typeof navigator<`u`?(await navigator.share?.({title:`Kairos Sigil-Glyph`,text:`Sealed Kairos Moment`,url:t}),S(`Share sheet opened`)):await C(t,`Link`)}catch(e){S(`Share canceled: ${e instanceof Error?e.message:String(e)}`)}},[T,E]=(0,i.useState)(!1),D=async()=>{if(!T){E(!0);try{let e=await s?.();typeof e==`string`&&e.length>0?S(e):S(`Export ready`)}catch(e){S(`Export failed: ${e instanceof Error?e.message:String(e)}`)}finally{E(!1)}}},O=(0,i.useMemo)(()=>n?n.slice(0,16):`—`,[n]),k=e=>{e.preventDefault(),e.stopPropagation(),r?.()},A=e=>{e.target===e.currentTarget&&e.preventDefault()};return e?(0,a.createPortal)((0,o.jsxs)(`div`,{className:`seal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`seal-title`,"aria-describedby":`seal-desc`,"data-state":`open`,onClick:e=>e.stopPropagation(),onPointerDown:A,children:[(0,o.jsx)(`div`,{className:`seal-veil`,"aria-hidden":`true`}),(0,o.jsxs)(`div`,{ref:l,className:`seal-card`,role:`document`,onClick:e=>e.stopPropagation(),children:[(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--tl`,"aria-hidden":`true`}),(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--tr`,"aria-hidden":`true`}),(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--bl`,"aria-hidden":`true`}),(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--br`,"aria-hidden":`true`}),(0,o.jsx)(`button`,{ref:h,className:`seal-close`,"aria-label":`Close`,onClick:k,type:`button`,children:(0,o.jsx)(u,{})}),(0,o.jsxs)(`header`,{className:`seal-header`,children:[(0,o.jsx)(`h3`,{id:`seal-title`,className:`seal-title`,children:`Moment Sealed`}),(0,o.jsx)(`p`,{id:`seal-desc`,className:`seal-subtitle`,children:`Your Kairos imprint is preserved. Proceed to the URL below to Inhale Claimed Ownership.`})]}),(0,o.jsxs)(`label`,{className:`field`,children:[(0,o.jsx)(`span`,{className:`field-label`,children:`Hash`}),(0,o.jsxs)(`div`,{className:`row`,children:[(0,o.jsx)(`code`,{className:`hash`,title:n||`—`,children:n?O:`—`}),(0,o.jsx)(`button`,{className:`icon-btn`,onClick:()=>C(n,`Hash`),disabled:!n,"aria-label":`Copy hash`,title:`Copy hash`,type:`button`,children:(0,o.jsx)(p,{})})]}),n&&(0,o.jsxs)(`p`,{className:`micro`,children:[`Full: `,(0,o.jsx)(`span`,{className:`mono`,children:n})]})]}),(0,o.jsxs)(`label`,{className:`field`,children:[(0,o.jsx)(`span`,{className:`field-label`,children:`URL`}),(0,o.jsxs)(`div`,{className:`row`,children:[(0,o.jsx)(`input`,{className:`url-input`,value:t,readOnly:!0,"aria-readonly":`true`,spellCheck:!1}),(0,o.jsx)(`button`,{className:`icon-btn`,onClick:()=>C(t,`Link`),disabled:!t,"aria-label":`Copy link`,title:`Copy link`,type:`button`,children:(0,o.jsx)(p,{})}),t&&(0,o.jsx)(`a`,{className:`open-link`,href:t,target:`_blank`,rel:`noopener`,"aria-label":`Open link in new tab`,title:`Open link`,children:(0,o.jsx)(m,{})})]})]}),(0,o.jsxs)(`div`,{className:`cta-row`,children:[(0,o.jsxs)(`button`,{className:`primary cta`,onClick:D,type:`button`,disabled:T,children:[(0,o.jsx)(f,{}),(0,o.jsx)(`span`,{children:T?`Sealing...`:`Inhale ΦKey Proof`})]}),(0,o.jsxs)(`button`,{className:`secondary cta`,onClick:w,type:`button`,children:[(0,o.jsx)(d,{}),(0,o.jsx)(`span`,{children:b?`Share`:`Remember Link`})]})]}),(0,o.jsx)(`p`,{className:`fine`,children:`This moment is now sealed in time. Use the link above within the next 11 breaths to claim ownership & gain permanent access to this Kairos moment.`}),(0,o.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:_})]})]}),document.body):null},u=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`seal-close-ico`,children:[(0,o.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`,opacity:`.35`}),(0,o.jsx)(`path`,{d:`M7 7l10 10M17 7L7 17`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),d=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`path`,{d:`M15 8a3 3 0 100-6 3 3 0 000 6zM6 14a3 3 0 100-6 3 3 0 000 6zm9 12a3 3 0 100-6 3 3 0 000 6z`,fill:`currentColor`}),(0,o.jsx)(`path`,{d:`M8.6 9.7l6.8-3.4M8.6 12.3l6.8 3.4`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`})]}),f=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`}),(0,o.jsx)(`path`,{d:`M8 12.5l2.5 2.5L16 9`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),p=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`rect`,{x:`9`,y:`9`,width:`10`,height:`10`,rx:`2`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,o.jsx)(`rect`,{x:`5`,y:`5`,width:`10`,height:`10`,rx:`2`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,opacity:`.5`})]}),m=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`path`,{d:`M10 14a5 5 0 007.07 0l1.41-1.41a5 5 0 00-7.07-7.07L10 6`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,o.jsx)(`path`,{d:`M14 10a5 5 0 00-7.07 0L5.5 11.43a5 5 0 007.07 7.07L14 18`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`})]}),h=l;export{h as t}; \ No newline at end of file +import{Vt as e,ai as t,pi as n,si as r}from"./index-BoQy35uR.js";var i=n(r(),1),a=n(t(),1),o=n(e(),1),s=`sigil:urls`;function c(e){if(!(typeof window>`u`))try{let t=window.localStorage.getItem(s),n=t?JSON.parse(t):[];n.includes(e)||(n.push(e),window.localStorage.setItem(s,JSON.stringify(n))),window.dispatchEvent(new CustomEvent(`sigil:url-registered`,{detail:{url:e}}))}catch{}}var l=({open:e,url:t,hash:n,onClose:r,onDownloadZip:s})=>{let l=(0,i.useRef)(null),h=(0,i.useRef)(null),g=(0,i.useRef)(null),[_,v]=(0,i.useState)(``),y=(0,i.useRef)(null);(0,i.useEffect)(()=>{if(!(!e||!t)&&y.current!==t){if(y.current=t,typeof window<`u`&&typeof window.__SIGIL__?.registerSigilUrl==`function`)try{window.__SIGIL__.registerSigilUrl(t)}catch{c(t)}else c(t);if(typeof window<`u`&&typeof window.__SIGIL__?.registerSend==`function`)try{window.__SIGIL__.registerSend({type:`sigil:mint`,url:t,hash:n})}catch{}}},[e,t,n]);let b=(0,i.useMemo)(()=>{if(typeof navigator>`u`)return!1;let e=navigator;return typeof e.share==`function`?t&&typeof e.canShare==`function`?e.canShare({url:t}):!0:!1},[t]),x=(0,i.useCallback)(e=>{let t=l.current;if(!t)return;let n=t.querySelectorAll([`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex='-1'])`].join(`,`));if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&document.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&document.activeElement===r&&(e.preventDefault(),i.focus())},[]);(0,i.useEffect)(()=>{if(!e)return;g.current=document.activeElement??null;let t=document.body.style.overflow;document.body.style.overflow=`hidden`;let n=window.setTimeout(()=>h.current?.focus({preventScroll:!0}),0),r=e=>{e.key===`Tab`&&x(e)};return document.addEventListener(`keydown`,r,!0),()=>{document.body.style.overflow=t,document.removeEventListener(`keydown`,r,!0),window.clearTimeout(n),g.current?.focus?.()}},[e,x]);let S=e=>{v(e),window.setTimeout(()=>v(``),900)},C=async(e,t)=>{try{if(typeof navigator>`u`)throw Error(`no navigator`);if(!navigator.clipboard?.writeText)throw Error(`no clipboard`);await navigator.clipboard.writeText(e),S(`${t} copied to clipboard`)}catch{S(`Could not copy ${t}`)}},w=async()=>{try{b&&typeof navigator<`u`?(await navigator.share?.({title:`Kairos Sigil-Glyph`,text:`Sealed Kairos Moment`,url:t}),S(`Share sheet opened`)):await C(t,`Link`)}catch(e){S(`Share canceled: ${e instanceof Error?e.message:String(e)}`)}},[T,E]=(0,i.useState)(!1),D=async()=>{if(!T){E(!0);try{let e=await s?.();typeof e==`string`&&e.length>0?S(e):S(`Export ready`)}catch(e){S(`Export failed: ${e instanceof Error?e.message:String(e)}`)}finally{E(!1)}}},O=(0,i.useMemo)(()=>n?n.slice(0,16):`—`,[n]),k=e=>{e.preventDefault(),e.stopPropagation(),r?.()},A=e=>{e.target===e.currentTarget&&e.preventDefault()};return e?(0,a.createPortal)((0,o.jsxs)(`div`,{className:`seal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`seal-title`,"aria-describedby":`seal-desc`,"data-state":`open`,onClick:e=>e.stopPropagation(),onPointerDown:A,children:[(0,o.jsx)(`div`,{className:`seal-veil`,"aria-hidden":`true`}),(0,o.jsxs)(`div`,{ref:l,className:`seal-card`,role:`document`,onClick:e=>e.stopPropagation(),children:[(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--tl`,"aria-hidden":`true`}),(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--tr`,"aria-hidden":`true`}),(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--bl`,"aria-hidden":`true`}),(0,o.jsx)(`div`,{className:`seal-ornament seal-ornament--br`,"aria-hidden":`true`}),(0,o.jsx)(`button`,{ref:h,className:`seal-close`,"aria-label":`Close`,onClick:k,type:`button`,children:(0,o.jsx)(u,{})}),(0,o.jsxs)(`header`,{className:`seal-header`,children:[(0,o.jsx)(`h3`,{id:`seal-title`,className:`seal-title`,children:`Moment Sealed`}),(0,o.jsx)(`p`,{id:`seal-desc`,className:`seal-subtitle`,children:`Your Kairos imprint is preserved. Proceed to the URL below to Inhale Claimed Ownership.`})]}),(0,o.jsxs)(`label`,{className:`field`,children:[(0,o.jsx)(`span`,{className:`field-label`,children:`Hash`}),(0,o.jsxs)(`div`,{className:`row`,children:[(0,o.jsx)(`code`,{className:`hash`,title:n||`—`,children:n?O:`—`}),(0,o.jsx)(`button`,{className:`icon-btn`,onClick:()=>C(n,`Hash`),disabled:!n,"aria-label":`Copy hash`,title:`Copy hash`,type:`button`,children:(0,o.jsx)(p,{})})]}),n&&(0,o.jsxs)(`p`,{className:`micro`,children:[`Full: `,(0,o.jsx)(`span`,{className:`mono`,children:n})]})]}),(0,o.jsxs)(`label`,{className:`field`,children:[(0,o.jsx)(`span`,{className:`field-label`,children:`URL`}),(0,o.jsxs)(`div`,{className:`row`,children:[(0,o.jsx)(`input`,{className:`url-input`,value:t,readOnly:!0,"aria-readonly":`true`,spellCheck:!1}),(0,o.jsx)(`button`,{className:`icon-btn`,onClick:()=>C(t,`Link`),disabled:!t,"aria-label":`Copy link`,title:`Copy link`,type:`button`,children:(0,o.jsx)(p,{})}),t&&(0,o.jsx)(`a`,{className:`open-link`,href:t,target:`_blank`,rel:`noopener`,"aria-label":`Open link in new tab`,title:`Open link`,children:(0,o.jsx)(m,{})})]})]}),(0,o.jsxs)(`div`,{className:`cta-row`,children:[(0,o.jsxs)(`button`,{className:`primary cta`,onClick:D,type:`button`,disabled:T,children:[(0,o.jsx)(f,{}),(0,o.jsx)(`span`,{children:T?`Sealing...`:`Inhale ΦKey Proof`})]}),(0,o.jsxs)(`button`,{className:`secondary cta`,onClick:w,type:`button`,children:[(0,o.jsx)(d,{}),(0,o.jsx)(`span`,{children:b?`Share`:`Remember Link`})]})]}),(0,o.jsx)(`p`,{className:`fine`,children:`This moment is now sealed in time. Use the link above within the next 11 breaths to claim ownership & gain permanent access to this Kairos moment.`}),(0,o.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:_})]})]}),document.body):null},u=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`seal-close-ico`,children:[(0,o.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`,opacity:`.35`}),(0,o.jsx)(`path`,{d:`M7 7l10 10M17 7L7 17`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),d=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`path`,{d:`M15 8a3 3 0 100-6 3 3 0 000 6zM6 14a3 3 0 100-6 3 3 0 000 6zm9 12a3 3 0 100-6 3 3 0 000 6z`,fill:`currentColor`}),(0,o.jsx)(`path`,{d:`M8.6 9.7l6.8-3.4M8.6 12.3l6.8 3.4`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`})]}),f=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`}),(0,o.jsx)(`path`,{d:`M8 12.5l2.5 2.5L16 9`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),p=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`rect`,{x:`9`,y:`9`,width:`10`,height:`10`,rx:`2`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,o.jsx)(`rect`,{x:`5`,y:`5`,width:`10`,height:`10`,rx:`2`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,opacity:`.5`})]}),m=()=>(0,o.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`ico`,children:[(0,o.jsx)(`path`,{d:`M10 14a5 5 0 007.07 0l1.41-1.41a5 5 0 00-7.07-7.07L10 6`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`}),(0,o.jsx)(`path`,{d:`M14 10a5 5 0 00-7.07 0L5.5 11.43a5 5 0 007.07 7.07L14 18`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`})]}),h=l;export{h as t}; \ No newline at end of file diff --git a/dist/assets/SigilAuthContext-CLP23KDu.js b/dist/assets/SigilAuthContext-BnirZa1k.js similarity index 73% rename from dist/assets/SigilAuthContext-CLP23KDu.js rename to dist/assets/SigilAuthContext-BnirZa1k.js index 066815270..887655460 100644 --- a/dist/assets/SigilAuthContext-CLP23KDu.js +++ b/dist/assets/SigilAuthContext-BnirZa1k.js @@ -1 +1 @@ -import{pi as e,si as t}from"./index-BoEZKnmf.js";var n=e(t(),1);const r=(0,n.createContext)(null);function i(){let e=(0,n.useContext)(r);if(!e)throw Error(`useSigilAuth must be used within .`);return e}export{i as n,r as t}; \ No newline at end of file +import{pi as e,si as t}from"./index-BoQy35uR.js";var n=e(t(),1);const r=(0,n.createContext)(null);function i(){let e=(0,n.useContext)(r);if(!e)throw Error(`useSigilAuth must be used within .`);return e}export{i as n,r as t}; \ No newline at end of file diff --git a/dist/assets/SigilAuthProvider-CT0qH_fA.js b/dist/assets/SigilAuthProvider-C1UEo-AB.js similarity index 91% rename from dist/assets/SigilAuthProvider-CT0qH_fA.js rename to dist/assets/SigilAuthProvider-C1UEo-AB.js index fd842ab79..830c4a553 100644 --- a/dist/assets/SigilAuthProvider-CT0qH_fA.js +++ b/dist/assets/SigilAuthProvider-C1UEo-AB.js @@ -1 +1 @@ -import{Vt as e,pi as t,si as n}from"./index-BoEZKnmf.js";import{t as r}from"./SigilAuthContext-CLP23KDu.js";var i=t(n(),1),a=t(e(),1),o=`kai.sigilAuth.v1`,s={svgText:null,meta:null};function c(e){if(typeof e!=`object`||!e)return!1;let t=e;if(!(typeof t.pulse==`number`&&Number.isFinite(t.pulse)&&typeof t.beat==`number`&&Number.isFinite(t.beat)&&typeof t.stepIndex==`number`&&Number.isFinite(t.stepIndex)&&typeof t.chakraDay==`string`&&typeof t.kaiSignature==`string`))return!1;let n=e=>e===void 0||typeof e==`string`;return n(t.userPhiKey)&&n(t.sigilId)&&n(t.sigilActionUrl)}function l(e){if(typeof e!=`object`||!e)return!1;let t=e,n=t.svgText===null||typeof t.svgText==`string`,r=t.meta===null||typeof t.meta==`object`&&t.meta!==null&&c(t.meta);return n&&r}function u(){if(typeof window>`u`)return s;try{let e=window.localStorage.getItem(o);if(!e)return s;let t=JSON.parse(e);return l(t)?t:s}catch{return s}}function d(e){try{window.localStorage.setItem(o,JSON.stringify(e))}catch{}}function f(){try{window.localStorage.removeItem(o)}catch{}}function p({children:e}){let[t,n]=(0,i.useState)(()=>u()),c=(0,i.useCallback)((e,t)=>{let r={svgText:e,meta:t};n(r),typeof window<`u`&&d(r)},[]),l=(0,i.useCallback)(()=>{n(s),typeof window<`u`&&f()},[]);(0,i.useEffect)(()=>{let e=e=>{e.key===o&&n(u())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let p=(0,i.useMemo)(()=>({auth:t,setAuth:c,clearAuth:l}),[t,c,l]);return(0,a.jsx)(r.Provider,{value:p,children:e})}export{p as t}; \ No newline at end of file +import{Vt as e,pi as t,si as n}from"./index-BoQy35uR.js";import{t as r}from"./SigilAuthContext-BnirZa1k.js";var i=t(n(),1),a=t(e(),1),o=`kai.sigilAuth.v1`,s={svgText:null,meta:null};function c(e){if(typeof e!=`object`||!e)return!1;let t=e;if(!(typeof t.pulse==`number`&&Number.isFinite(t.pulse)&&typeof t.beat==`number`&&Number.isFinite(t.beat)&&typeof t.stepIndex==`number`&&Number.isFinite(t.stepIndex)&&typeof t.chakraDay==`string`&&typeof t.kaiSignature==`string`))return!1;let n=e=>e===void 0||typeof e==`string`;return n(t.userPhiKey)&&n(t.sigilId)&&n(t.sigilActionUrl)}function l(e){if(typeof e!=`object`||!e)return!1;let t=e,n=t.svgText===null||typeof t.svgText==`string`,r=t.meta===null||typeof t.meta==`object`&&t.meta!==null&&c(t.meta);return n&&r}function u(){if(typeof window>`u`)return s;try{let e=window.localStorage.getItem(o);if(!e)return s;let t=JSON.parse(e);return l(t)?t:s}catch{return s}}function d(e){try{window.localStorage.setItem(o,JSON.stringify(e))}catch{}}function f(){try{window.localStorage.removeItem(o)}catch{}}function p({children:e}){let[t,n]=(0,i.useState)(()=>u()),c=(0,i.useCallback)((e,t)=>{let r={svgText:e,meta:t};n(r),typeof window<`u`&&d(r)},[]),l=(0,i.useCallback)(()=>{n(s),typeof window<`u`&&f()},[]);(0,i.useEffect)(()=>{let e=e=>{e.key===o&&n(u())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let p=(0,i.useMemo)(()=>({auth:t,setAuth:c,clearAuth:l}),[t,c,l]);return(0,a.jsx)(r.Provider,{value:p,children:e})}export{p as t}; \ No newline at end of file diff --git a/dist/assets/SigilExplorer-CP4TAI36.js b/dist/assets/SigilExplorer-CP4TAI36.js new file mode 100644 index 000000000..c63e868c0 --- /dev/null +++ b/dist/assets/SigilExplorer-CP4TAI36.js @@ -0,0 +1,10 @@ +import{$t as e,Bt as t,C as n,Cn as r,Dn as i,En as a,Gt as o,H as s,Ht as c,Jt as l,Kn as u,Kt as d,On as f,Qt as p,S as m,Sn as h,Tn as g,Ut as _,Vt as v,Wn as y,Wt as b,Xt as ee,Yn as x,Yt as S,Zr as C,Zt as w,_n as T,an as E,b as D,bn as te,cn as O,dn as k,en as ne,fn as re,gn as ie,gr as ae,hn as A,in as j,ln as M,mn as N,nn as oe,on as se,pi as ce,pn as le,qt as ue,rn as P,si as F,sn as I,tn as de,un as L,vn as R,wn as fe,x as pe,xn as me,yn as he,zt as ge}from"./index-BoQy35uR.js";var z=ce(F(),1);const _e={root:`#ff3b3b`,sacral:`#ff8a3d`,solar:`#ffd54a`,heart:`#3dff9a`,throat:`#46d3ff`,thirdEye:`#6b6cff`,crown:`#c18bff`};function ve(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`root`)?`root`:t.includes(`sacral`)?`sacral`:t.includes(`solar`)||t.includes(`plexus`)||t.includes(`sun`)?`solar`:t.includes(`heart`)?`heart`:t.includes(`throat`)?`throat`:t.includes(`third`)||t.includes(`eye`)||t.includes(`indigo`)?`thirdEye`:t.includes(`crown`)||t.includes(`krown`)||t.includes(`violet`)?`crown`:t===`1`?`root`:t===`2`?`sacral`:t===`3`?`solar`:t===`4`?`heart`:t===`5`?`throat`:t===`6`?`thirdEye`:t===`7`?`crown`:null:null}function ye(e){let t=ve(e),n=t?_e[t]:`var(--sx-accent)`;return{"--sx-chakra":n}}function B(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function V(e){if(typeof e==`number`)return!Number.isFinite(e)||Math.abs(e)<1e-12?void 0:Math.abs(e);if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&Math.abs(t)>=1e-12)return Math.abs(t)}}function H(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`receive`)||t.includes(`received`)||t.includes(`inhale`)?`receive`:t.includes(`send`)||t.includes(`sent`)||t.includes(`exhale`)?`send`:null:null}function U(e){if(typeof e==`number`)return!Number.isFinite(e)||e<=0?void 0:e;if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&t>0)return t}}function W(e){if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&t>0)return t}}function G(e){let t=e,n=B(t.feed)?t.feed:null,r=e=>e?H(e.phiDirection)||H(e.transferDirection)||H(e.transferMode)||H(e.transferKind):null,i=e=>{if(e)return e.phiDelta??e.phiSigned??e.phiChange},a=e=>e?V(e.transferAmountPhi)??V(e.transferPhi)??V(e.amountPhi)??V(e.phiAmount)??V(e.childAllocationPhi)??V(e.branchBasePhi):void 0,o=e=>e?U(e.amountUsd)??U(e.usdAmount)??U(e.usdValue)??U(e.valueUsd)??U(e.usd):void 0,s=e=>e?U(e.usdPerPhi)??U(e.fxUsdPerPhi)??U(e.usd_per_phi):void 0,c=e=>e?W(e.atPulse)??W(e.sentPulse)??W(e.senderKaiPulse)??W(e.transferPulse):void 0,l=r(t)??r(n),u=i(t)??i(n),d=typeof u==`number`?u:void 0;d===void 0&&typeof u==`string`&&(d=Number(u));let f=l??(typeof d==`number`&&Number.isFinite(d)?d>=0?`receive`:`send`:null);if(!f)return;let p=a(t)??a(n)??(B(t.preview)?V(t.preview.amountPhi):void 0)??(B(n?.preview)?V(n.preview.amountPhi):void 0)??(typeof d==`number`&&Number.isFinite(d)?Math.abs(d):void 0);if(p===void 0)return;let m=o(t)??o(n)??(B(t.preview)?U(t.preview.amountUsd):void 0)??(B(n?.preview)?U(n.preview.amountUsd):void 0),h=s(t)??s(n)??(B(t.preview)?U(t.preview.usdPerPhi):void 0)??(B(n?.preview)?U(n.preview.usdPerPhi):void 0),g=c(t)??c(n)??(B(t.preview)?W(t.preview.atPulse):void 0)??(B(n?.preview)?W(n.preview.atPulse):void 0);return{direction:f,amount:p,amountUsd:m??(h===void 0?void 0:p*h),sentPulse:g,source:`payload`}}function K(e){for(let t of[`transferUrl`,`transferURL`,`transferLink`,`transfer_link`,`sealUrl`,`sealURL`,`sigilTransferUrl`]){let n=e[t];if(typeof n!=`string`||!n.trim())continue;let r=le(n.trim());if(!r)continue;let i=G(r);if(i)return i}}function be(e,t){if(!e)return;let n=t.get(e.toLowerCase());if(!n)return;let r=V(n.amountPhi);if(r!==void 0)return{direction:n.direction,amount:r,amountUsd:U(n.amountUsd),sentPulse:W(n.sentPulse),source:`registry`}}function xe(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Se(e,t){if(!xe(e))return;let n=e[t];return typeof n==`string`&&n.trim().length>0?n.trim():void 0}function Ce(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`receive`)||t.includes(`received`)||t.includes(`inhale`)?`receive`:t.includes(`send`)||t.includes(`sent`)||t.includes(`exhale`)?`send`:null:null}function we(e){let t=e,n=xe(t.feed)?t.feed:null,r=e=>e?Ce(e.transferDirection)||Ce(e.transferMode)||Ce(e.transferKind)||Ce(e.phiDirection):null,i=!!(r(t)??r(n)),a=!!(typeof t.transferNonce==`string`||typeof t.nonce==`string`||typeof t.transferToken==`string`||typeof t.token==`string`||n&&(typeof n.transferNonce==`string`||typeof n.nonce==`string`||typeof n.transferToken==`string`||typeof n.token==`string`)),o=!!(typeof t.parentUrl==`string`||typeof t.parentHash==`string`||typeof t.parentCanonical==`string`||n&&(typeof n.parentUrl==`string`||typeof n.parentHash==`string`||typeof n.parentCanonical==`string`));return i||a||o}function Te(e){return e.kind!==`post`||!T(e.primaryUrl)||G(e.payload)?!1:!we(e.payload)}function Ee(e){let t=new Map,n=new Map;for(let[r,i]of e){let e=M(r),a=k(e),o=L(e,i),s=ie(e,i);t.set(e,o);let c=n.get(o);if(!c){n.set(o,{payload:i,urls:new Set([e]),kind:a,momentKey:s});continue}P(i,c.payload)>0&&(c.payload=i),c.urls.add(e);let l=c.momentKey,u=s;l.startsWith(`u:`)&&!u.startsWith(`u:`)&&(c.momentKey=u),l.startsWith(`h:`)&&(u.startsWith(`k:`)||u.startsWith(`sig:`)||u.startsWith(`tok:`))&&(c.momentKey=u)}let r=new Map;for(let[e,t]of n){let n=R(Array.from(t.urls),t.kind);r.set(e,{id:e,payload:t.payload,urls:t.urls,primaryUrl:n,kind:t.kind,momentKey:t.momentKey})}let i=new Map;for(let e of r.values()){let t=e.momentKey;i.has(t)||i.set(t,[]),i.get(t).push(e.id)}let a=new Map,o=new Map,s=new Map,c=new Map;for(let e of r.values()){let t=T(e.primaryUrl);t&&!c.has(t)&&c.set(t,e.id)}for(let[e,t]of i){let n=t.map(e=>r.get(e)).filter(Boolean),i=n.filter(e=>e.kind===`post`),c;c=i.length>0?i.slice().sort((e,t)=>he(t.primaryUrl,`post`)-he(e.primaryUrl,`post`))[0]:n.slice().sort((e,t)=>he(t.primaryUrl,t.kind)-he(e.primaryUrl,e.kind))[0];let l=c?.id??t[0];a.set(e,l);for(let e of t)o.set(e,l);for(let e of t){let t=r.get(e);if(t)for(let e of t.urls)s.set(e,l)}}let l=new Map,u=new Map;for(let e of r.values()){if(!Te(e))continue;let t=T(e.primaryUrl);t&&(u.has(t)||u.set(t,e.id))}for(let e of r.values()){let n=o.get(e.id)??e.id;if(e.id!==n)continue;let r=Se(e.payload,`originUrl`),i=r?M(r):N(e.primaryUrl)??e.primaryUrl,a=T(i),d=t.get(i)??(a?c.get(a):void 0),f=(a?u.get(a):void 0)??d??s.get(i);l.set(n,f??n)}let d=new Map;for(let e of r.values()){let n=o.get(e.id)??e.id,r=l.get(n)??n,i,a=Se(e.payload,`parentUrl`);if(a){let n=M(a),r=T(n),o=t.get(n)??(r?c.get(r):void 0)??s.get(n);o&&o!==e.id&&(i=o)}!i&&e.id!==n&&(i=n),d.set(e.id,{id:e.id,payload:e.payload,urls:e.urls,primaryUrl:e.primaryUrl,kind:e.kind,momentKey:e.momentKey,parentId:i,originId:r,momentParentId:n})}return d}function De(e,t){let n=[];for(let[r,i]of t)i.parentId===e&&n.push(r);return n.sort((e,n)=>P(t.get(n).payload,t.get(e).payload)),n}function Oe(e,t,n=new Set){let r=t.get(e);if(!r)return null;if(n.has(e))return{id:r.id,url:r.primaryUrl,urls:Array.from(r.urls),payload:r.payload,children:[]};n.add(e);let i=De(e,t).map(e=>Oe(e,t,n)).filter(Boolean);return{id:r.id,url:r.primaryUrl,urls:Array.from(r.urls),payload:r.payload,children:i}}function ke(e){let t=0,n=e.payload,r=e=>{t+=1,P(e.payload,n)>0&&(n=e.payload),e.children.forEach(r)};return r(e),{nodeCount:t,latest:n}}function Ae(e){let t=Ee(e),n=new Map;for(let[e,r]of t){let t=r.originId;n.has(t)||n.set(t,[]),n.get(t).push(e)}let r=[];for(let e of n.keys()){let n=Oe(e,t);if(!n)continue;let i=ke(n);r.push({root:n,nodeCount:i.nodeCount,latest:i.latest})}return r.sort((e,t)=>{let n=P(t.latest,e.latest);return n===0?t.nodeCount===e.nodeCount?P(t.root.payload,e.root.payload):t.nodeCount-e.nodeCount:n}),r.map(e=>e.root)}function q(e){let t=e.payload;if(xe(t)&&typeof t.canonicalHash==`string`)return t.canonicalHash;let n=T(e.url);if(n)return n;for(let t of e.urls){let e=T(t);if(e)return e;let n=le(t);if(!n)continue;let r=n;if(xe(r)&&typeof r.canonicalHash==`string`)return r.canonicalHash}}var J=ce(v(),1),Y=typeof window<`u`,je=`sigil:explorer:open`,Me=`sigil:explorer:bc:v1`,Ne=520,Pe=900,Fe=80,Ie=80,Le=25e4,Re=18,ze=3236,Be=2e3;function Ve(){let e;for(let[,t]of l){let n=t.pulse;typeof n!=`number`||!Number.isFinite(n)||(e==null||n>e)&&(e=n)}return e}function He(e){let t=e?.pulse??e?.latestPulse??e?.latest_pulse;if(!(typeof t!=`number`||!Number.isFinite(t)))return t}var Ue=`/phi.svg`,X=`phi`;function Z({className:e}){return(0,J.jsx)(`img`,{className:[`phi-mark`,e].filter(Boolean).join(` `),src:Ue,alt:X,decoding:`async`,loading:`lazy`,draggable:!1})}function Q(e,t){return(0,J.jsxs)(`span`,{className:[`phi-amount`,t?.className].filter(Boolean).join(` `),children:[t?.sign?(0,J.jsx)(`span`,{className:`phi-amount__sign`,children:t.sign}):null,(0,J.jsx)(`span`,{className:`phi-amount__value`,children:j(e)}),(0,J.jsx)(Z,{className:[`phi-amount__mark`,t?.markClassName].filter(Boolean).join(` `)})]})}function $(){return Date.now()}function We(){return Y?new Promise(e=>{if(typeof window.requestAnimationFrame==`function`){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)}):Promise.resolve()}function Ge(e){let t=(Y?window:null)?.CSS?.escape;return typeof t==`function`?t(e):e.replace(/["\\]/g,`\\$&`)}function Ke(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function qe(e,t){return Ke(e)&&typeof e[t]==`string`}function Je(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&Number.isFinite(t))return t}}function Ye(e){if(typeof e==`boolean`)return e}function Xe(e){if(e===`low`||e===`med`||e===`high`)return e}function Ze(e){let t=e,n=Je(e.stepsPerBeat),r=Array.isArray(t.transfers)?t.transfers:void 0,i=Array.isArray(t.segments)?t.segments:void 0,a=Ke(t.ip)?t.ip:void 0;return{pulse:e.pulse,kaiPulse:e.pulse,beat:e.beat,stepIndex:e.stepIndex,stepsPerBeat:Je(t.stepsPerBeat)??n,kaiSignature:e.kaiSignature,userPhiKey:e.userPhiKey,chakraDay:e.chakraDay,chakraGate:typeof t.chakraGate==`string`?t.chakraGate:void 0,seriesSize:Je(t.seriesSize),quality:Xe(t.quality),creatorVerified:Ye(t.creatorVerified),creatorRep:Je(t.creatorRep),frequencyHz:Je(t.frequencyHz),transfers:r,cumulativeTransfers:Je(t.cumulativeTransfers),segments:i,segmentsMerkleRoot:typeof t.segmentsMerkleRoot==`string`?t.segmentsMerkleRoot:void 0,transfersWindowRoot:typeof t.transfersWindowRoot==`string`?t.transfersWindowRoot:void 0,ip:a}}function Qe(e,t){if(t==null||!Number.isFinite(t))return null;try{let{unsigned:n}=ae(Ze(e),t);return Number.isFinite(n.valuePhi)?n.valuePhi:null}catch{return null}}function $e(e,n){if(n==null||!Number.isFinite(n))return null;try{let r=t({meta:Ze(e),nowPulse:n,usd:100,currentStreakDays:0,lifetimeUsdSoFar:0},ge);return Number.isFinite(r.usdPerPhi)?r.usdPerPhi:null}catch{return null}}function et(e){if(!Y||typeof Worker>`u`||e.length { + try { + const parsed = JSON.parse(event.data); + self.postMessage({ ok: true, value: parsed }); + } catch (err) { + self.postMessage({ ok: false, error: err && err.message ? err.message : "parse-failed" }); + } + }; + `],{type:`text/javascript`});n=URL.createObjectURL(e),t=new Worker(n)}catch{return n&&URL.revokeObjectURL(n),Promise.resolve(JSON.parse(e))}return new Promise((r,i)=>{let a=()=>{t?.terminate(),n&&URL.revokeObjectURL(n)};t.onmessage=e=>{let t=e.data;a(),t?.ok?r(t.value):i(Error(t?.error??`parse-failed`))},t.onerror=()=>{a(),i(Error(`parse-failed`))},t.postMessage(e)})}function tt(e){let t=k(e.url);return t===`stream`?`inhale`:t===`post`?`exhale`:null}function nt(e,t){let n=be(q(e),t);if(n)return n;let r=G(e.payload);if(r)return r;let i=e.payload,a=K(i);if(a)return a;if(Ke(i.feed)){let e=K(i.feed);if(e)return e}for(let t of e.urls){let e=le(t);if(!e)continue;let n=G(e);if(n)return n;let r=K(e);if(r)return r}}function rt(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`receive`)||t.includes(`received`)||t.includes(`inhale`)?`receive`:t.includes(`send`)||t.includes(`sent`)||t.includes(`exhale`)?`send`:null:null}function it(e){let t=e;return rt(t.transferDirection)||rt(t.transferMode)||rt(t.transferKind)||rt(t.phiDirection)}function at(e){let t=e,n=t.transferNonce??t.nonce;return typeof n==`string`&&n.trim()?n.trim():null}function ot(e){let t=e,n=t.canonicalHash??t.childHash??t.hash;return typeof n==`string`&&n.trim()?n.trim().toLowerCase():null}function st(e){let t=new Set,n=new Set;for(let r of e.values()){if(it(r)!==`receive`)continue;let e=at(r);e&&t.add(e);let i=ot(r);i&&n.add(i)}return{nonces:t,canonicals:n}}function ct(e,t,n){let r=nt(e,t);if(!r)return null;if(r.direction===`receive`)return`received`;let i=at(e.payload);if(i&&n.nonces.has(i))return`received`;let a=q(e);return a&&n.canonicals.has(a)?`received`:`pending`}function lt(e,t,n,r,i){let a=e.payload,o=[],s=new Set,c=nt(e,n),l=c?ct(e,n,r):null,u=l===`pending`&&c?c.amount:i?.netPhi??null,d=l===`pending`&&c?c.amountUsd??(i?.usdPerPhi==null?null:c.amount*i.usdPerPhi):i?.usdValue??null;u!=null&&o.push({label:(0,J.jsxs)(`span`,{className:`phi-detail__label`,children:[`Live `,(0,J.jsx)(Z,{className:`phi-detail__mark`}),` value`]}),value:Q(u),valueText:`${j(u)} ${X}`}),d!=null&&o.push({label:`Live USD`,value:`$${E(d)}`});let f=i?.pendingFromChildren??0,p=i?.pendingFromParent??0,m=e.children.length>0?f:f+p;m>0&&o.push({label:`Exhale (pending)`,value:Q(m,{sign:`-`}),valueText:`-${j(m)} ${X}`});let h=i?.receivedFromChildren??0;h>0&&o.push({label:(0,J.jsxs)(`span`,{className:`phi-detail__label`,children:[(0,J.jsx)(Z,{className:`phi-detail__mark`}),` Exhaled`]}),value:Q(h,{sign:`-`}),valueText:`-${j(h)} ${X}`});let g=se(e.payload);if(g!==void 0&&o.push({label:(0,J.jsxs)(`span`,{className:`phi-detail__label`,children:[`This glyph `,(0,J.jsx)(Z,{className:`phi-detail__mark`})]}),value:Q(g),valueText:`${j(g)} ${X}`}),c){let e=c.direction===`receive`?`Inhaled`:`Exhaled`,t=c.direction===`receive`?`Inhale (pending)`:`Exhale (pending)`,n=c.sentPulse===void 0?``:` • pulse ${c.sentPulse}`,r=c.sentPulse===void 0?``:` (pulse ${c.sentPulse})`;l&&o.push({label:`Transfer status`,value:`${l===`pending`?t:e}${n}`}),l===`received`&&o.push({label:(0,J.jsxs)(`span`,{className:`phi-detail__label`,children:[(0,J.jsx)(Z,{className:`phi-detail__mark`}),` `,e,r]}),value:Q(c.amount,{sign:`+`}),valueText:`+${j(c.amount)} ${X}`}),c.amountUsd!==void 0&&o.push({label:`USD value`,value:`$${E(c.amountUsd)}`}),c.sentPulse!==void 0&&o.push({label:`Sent pulse`,value:String(c.sentPulse)});let i=c;qe(i,`txHash`)&&o.push({label:`Tx hash`,value:i.txHash})}let _=a.feed,v=typeof _?.author==`string`?_.author:typeof a.author==`string`?a.author:void 0,y=_?_.usernameClaim:void 0,b=y?x(y.payload?.normalized||y.payload?.username||``):``,ee=x(v??``),S=b||ee;if(S){let e=t[S],n=typeof v==`string`&&v.trim().length>0?v.trim():`@${S}`;e?(o.push({label:`Username (claimed)`,value:`${n} → glyph ${I(e.claimHash,10)}`}),o.push({label:`Claim glyph`,value:O(e.claimUrl)})):o.push({label:`Username`,value:n})}let C=(e,t)=>{let n=a[e];typeof n==`string`&&n.trim().length>0&&!s.has(e)&&(o.push({label:t,value:n.trim()}),s.add(e))};C(`userPhiKey`,`PhiKey`),C(`phiKey`,`PhiKey`),C(`phikey`,`PhiKey`),C(`kaiSignature`,`Kai Signature`),typeof a.parentUrl==`string`&&a.parentUrl.length>0&&o.push({label:`Parent URL`,value:O(a.parentUrl)}),typeof a.originUrl==`string`&&a.originUrl.length>0&&o.push({label:`Origin URL`,value:O(a.originUrl)});let w=a.label??a.title??a.type??a.note??a.description;typeof w==`string`&&w.trim().length>0&&o.push({label:`Label / Type`,value:w.trim()}),o.push({label:`Primary URL`,value:O(e.url)});let T=e.urls.filter(e=>!A(e)).map(e=>O(e));return e.urls.length>1&&o.push({label:`URL variants`,value:T.length===0?`${e.urls.length} urls (kept in data; hidden from browser view)`:T.length<=3?T.join(` | `):`${e.urls.length} urls (kept in data; rendered once)`}),o.slice(0,12)}async function ut(e){if(Y){try{if(navigator.clipboard&&typeof navigator.clipboard.writeText==`function`){await navigator.clipboard.writeText(e);return}}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,`true`),t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)}catch{}}}async function dt(e){if(Y)try{await fetch(e,{method:`GET`,cache:`force-cache`,mode:`cors`,credentials:`omit`,redirect:`follow`})}catch{}}function ft({p:e}){let t=typeof e.pulse==`number`?e.pulse:0,n=typeof e.stepsPerBeat==`number`&&e.stepsPerBeat>0?e.stepsPerBeat:44,r=typeof e.stepIndex==`number`?e.stepIndex:typeof e.pulse==`number`?C(e.pulse,n):0,i=typeof e.beat==`number`?e.beat:0;return(0,J.jsxs)(`span`,{className:`k-stamp`,title:`pulse ${t} • beat ${i} • step ${r}`,children:[(0,J.jsxs)(`span`,{className:`k-pill`,children:[`☤KAI `,t]}),(0,J.jsx)(`span`,{className:`k-dot`,children:`•`}),(0,J.jsxs)(`span`,{className:`k-pill`,children:[`beat `,i]}),(0,J.jsx)(`span`,{className:`k-dot`,children:`•`}),(0,J.jsxs)(`span`,{className:`k-pill`,children:[`step `,r]})]})}function pt({node:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s}){let c=t.has(e.id),l=q(e),u=e.payload.kaiSignature,d=e.payload.chakraDay,f=typeof e.payload.pulse==`number`?e.payload.pulse:void 0,p=f==null?void 0:r.get(f),m=re(e.url),h=s.get(e.id)??null,g=c?lt(e,i,a,o,h):[],_=nt(e,a),v=ct(e,a,o),y=tt(e),b=!(e.children.length>0),ee=h?.netPhi??null,x=h?.usdValue??null,S=v===`pending`&&_?_.amount:ee,C=v===`pending`&&_?_.amountUsd??(h?.usdPerPhi==null?null:_.amount*h.usdPerPhi):x,w=h?.pendingFromChildren??0,T=h?.pendingFromParent??0,D=h?.receivedFromChildren??0,te=w+D,O=te>0?D/te:0,k=w>0&&D>0?{"--exhale-rgb":`${Math.round(255*(.85+.15*O))},${Math.round(140*(1-O)+75*O)},${Math.round(80*(1-O)+110*O)}`}:void 0,ne=w>0?`Exhale (pending) children: -${j(w)} ${X}${S===null?``:` • Live ${j(Math.max(0,S))} ${X}`}`:void 0,ie=T>0?`Exhale (pending) send: -${j(T)} ${X}${S===null?``:` • Live ${j(Math.max(0,S))} ${X}`}`:void 0,ae=b&&T>0&&v!==`pending`,A=D>0?`Exhaled: -${j(D)} ${X}${S===null?``:` • Live ${j(Math.max(0,S))} ${X}`}`:void 0,M=S===null?void 0:`Live value: ${j(S)} ${X}${C===null?``:` • $${E(C)}`}`,N=_&&v===`received`?{direction:`send`,sign:`-`,titleVerb:_.direction===`receive`?`inhaled`:`exhaled`}:_?{direction:`pending`,sign:`-`,titleVerb:_.direction===`receive`?`inhaled`:`exhaled`}:null;return(0,J.jsxs)(`div`,{className:`node`,style:ye(d),"data-chakra":String(d??``),"data-node-id":e.id,children:[(0,J.jsxs)(`div`,{className:`node-row`,children:[(0,J.jsxs)(`div`,{className:`node-main`,children:[(0,J.jsx)(`button`,{className:`twirl`,"aria-label":c?`Collapse memories`:`Expand memories`,"aria-expanded":c,onClick:()=>n(e.id),title:c?`Collapse`:`Expand`,type:`button`,children:(0,J.jsx)(`span`,{className:`tw ${c?`open`:``}`})}),(0,J.jsx)(`a`,{className:`node-link`,href:m,target:`_blank`,rel:`noopener noreferrer`,title:m,children:(0,J.jsx)(`span`,{children:I(u??l??`glyph`,12)})})]}),(0,J.jsxs)(`div`,{className:`node-meta`,children:[(0,J.jsx)(ft,{p:e.payload}),d&&(0,J.jsx)(`span`,{className:`chakra`,title:String(d),children:String(d)}),b&&_&&N&&(0,J.jsxs)(`span`,{className:`phi-move phi-move--${N.direction}`,title:`Phi ${N.titleVerb}${v===`pending`?` (pending)`:``}: ${j(_.amount)} ${X}${_.amountUsd===void 0?``:` • $${E(_.amountUsd)}`}${_.sentPulse===void 0?``:` • sent pulse ${_.sentPulse}`}`,children:[(0,J.jsx)(`span`,{className:`phi-move__sign`,"aria-hidden":`true`,children:N.sign}),Q(_.amount,{className:`phi-move__amount`,markClassName:`phi-move__mark`}),v===`received`&&_.amountUsd!==void 0&&(0,J.jsxs)(`span`,{className:`phi-move__usd`,children:[`$`,E(_.amountUsd)]}),v===`received`&&_.amountUsd===void 0&&h?.usdPerPhi!=null&&(0,J.jsxs)(`span`,{className:`phi-move__usd`,children:[`$`,E(_.amount*h.usdPerPhi)]}),v===`pending`&&h?.usdPerPhi!=null&&(0,J.jsxs)(`span`,{className:`phi-move__usd`,children:[`$`,E(_.amount*h.usdPerPhi)]})]}),b&&_&&v===`pending`&&(0,J.jsx)(`span`,{className:`phi-status phi-status--pending`,title:`Exhale pending`,children:`Exhale`}),b&&_&&y===`exhale`&&v===`received`&&(0,J.jsx)(`span`,{className:`phi-status phi-status--received`,title:`Exhale received`,children:`Exhaled`}),!_&&y!==`inhale`&&te>0&&(0,J.jsx)(`span`,{className:`phi-status phi-status--${w>0&&D>0?`exhale-mix`:`received`}`,title:w>0&&D>0?`Exhale mix: ${j(D)} exhaled • ${j(w)} pending`:w>0?`Exhale pending: ${j(w)} ${X}`:`Exhaled: ${j(D)} ${X}`,style:k,children:`Exhale`}),y===`inhale`&&(0,J.jsx)(`span`,{className:`phi-status phi-status--inhale`,title:`Inhale`,children:`Inhale`}),S!==null&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--live`,title:M,children:[(0,J.jsxs)(`span`,{className:`phi-pill__label`,children:[(0,J.jsx)(Z,{className:`phi-pill__mark`}),y===`inhale`?`+`:`live:`]}),Q(S)]}),C!==null&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--usd`,title:M,children:[`$`,E(C)]}),D>0&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--drain`,title:A,children:[`Exhaled `,Q(D,{sign:`-`})]}),w>0&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--pending`,title:ne,children:[`Exhale (pending) `,Q(w,{sign:`-`})]}),ae&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--pending`,title:ie,children:[`Exhale (pending) `,Q(T,{sign:`-`})]}),b&&v===`received`&&_&&y===`exhale`&&(0,J.jsx)(`span`,{className:`phi-pill phi-pill--drain`,title:`Exhaled: ${j(_.amount)} ${X}${_.amountUsd===void 0?``:` • $${E(_.amountUsd)}`}`,children:`Exhaled`}),p!==void 0&&(0,J.jsxs)(`span`,{className:`phi-pill`,title:`Total ${X} on pulse ${e.payload.pulse??``}`,children:[(0,J.jsxs)(`span`,{className:`phi-pill__label`,children:[(0,J.jsx)(Z,{className:`phi-pill__mark`}),`pulse:`]}),Q(p)]}),(0,J.jsx)(`button`,{className:`node-copy`,"aria-label":`Copy URL`,onClick:()=>void ut(m),title:`Copy URL`,type:`button`,children:`⧉`})]})]}),c&&(0,J.jsxs)(`div`,{className:`node-open`,children:[(0,J.jsx)(`div`,{className:`node-detail`,children:g.length===0?(0,J.jsx)(`div`,{className:`node-detail-empty`,children:`No additional memory fields recorded on this glyph.`}):(0,J.jsx)(`div`,{className:`node-detail-grid`,children:g.map((e,t)=>(0,J.jsxs)(z.Fragment,{children:[(0,J.jsx)(`div`,{className:`detail-label`,children:e.label}),(0,J.jsx)(`div`,{className:`detail-value`,title:e.valueText??(typeof e.value==`string`?e.value:void 0),children:e.value})]},t))})}),e.children.length>0&&(0,J.jsx)(`div`,{className:`node-children`,"aria-label":`Memory Imprints`,children:e.children.map(e=>(0,J.jsx)(pt,{node:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s},e.id))})]})]})}function mt({root:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s}){let c=(0,z.useMemo)(()=>{let t=0,n=e=>{t+=1,e.children.forEach(n)};return n(e),t},[e]),l=T(e.url),u=e.payload.kaiSignature,d=re(e.url),f=e.payload.chakraDay,p=s.get(e.id)??null,m=(0,z.useMemo)(()=>{let t=0,n=p?.pendingFromParent??0;for(let r of e.children){let e=s.get(r.id);e?.receivedAmount&&(t+=e.receivedAmount),e?.pendingFromParent&&(n+=e.pendingFromParent)}let r=p?.basePhi??null,i=p?.netPhi??null,a=p?.usdPerPhi??null;return{basePhi:r,netPhi:i,usdValue:i!=null&&a!=null?i*a:null,derivedPhi:t,pendingPhi:n}},[e,p,s]),h=(0,z.useMemo)(()=>{let t=0,n=0,r=0,i=e=>{let r=k(e.url),c=s.get(e.id)??null;if(r===`stream`&&c?.netPhi!=null&&(t+=c.netPhi),r===`post`){let t=nt(e,a);(t?ct(e,a,o):null)===`received`&&t&&(n+=t.amount)}e.children.forEach(i)};i(e);for(let t of e.children){if(k(t.url)!==`post`)continue;let e=nt(t,a);(e?ct(t,a,o):null)===`pending`&&e&&(r+=e.amount)}return{inhaleTotal:t,exhaleTotal:n,pendingTotal:r}},[o,e,a,s]),g=m.netPhi==null?void 0:`Live origin value: ${j(m.netPhi)} ${X}${m.usdValue==null?``:` • $${E(m.usdValue)}`}`;return(0,J.jsxs)(`section`,{className:`origin`,"aria-label":`Sigil origin stream`,style:ye(f),"data-chakra":String(f??``),"data-node-id":e.id,children:[(0,J.jsxs)(`header`,{className:`origin-head`,children:[(0,J.jsxs)(`div`,{className:`o-meta`,children:[(0,J.jsx)(`span`,{className:`o-title`,children:`Origin`}),(0,J.jsx)(`a`,{className:`o-link`,href:d,target:`_blank`,rel:`noopener noreferrer`,title:d,children:I(u??l??`origin`,14)}),f&&(0,J.jsx)(`span`,{className:`o-chakra`,title:String(f),children:String(f)})]}),(0,J.jsxs)(`div`,{className:`o-right`,children:[(0,J.jsx)(ft,{p:e.payload}),m.netPhi!=null&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--live`,title:g,children:[(0,J.jsxs)(`span`,{className:`phi-pill__label`,children:[(0,J.jsx)(Z,{className:`phi-pill__mark`}),`live:`]}),Q(m.netPhi)]}),m.usdValue!=null&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--usd`,title:g,children:[`$`,E(m.usdValue)]}),h.inhaleTotal>0&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--lift`,title:`Inhales from memory: +${j(h.inhaleTotal)} ${X}`,children:[`Inhale `,Q(h.inhaleTotal,{sign:`+`})]}),h.exhaleTotal>0&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--drain`,title:`Exhaled: -${j(h.exhaleTotal)} ${X}`,children:[`Exhaled `,Q(h.exhaleTotal,{sign:`-`})]}),h.pendingTotal>0&&(0,J.jsxs)(`span`,{className:`phi-pill phi-pill--pending`,title:`Exhale (pending): -${j(h.pendingTotal)} ${X}`,children:[`Exhale (pending) `,Q(h.pendingTotal,{sign:`-`})]}),(0,J.jsxs)(`span`,{className:`o-count`,title:`Total content keys in this lineage`,children:[c,` keys`]}),(0,J.jsx)(`button`,{className:`o-copy`,onClick:()=>void ut(d),title:`Copy origin URL`,type:`button`,children:`Remember Origin`})]})]}),(0,J.jsx)(`div`,{className:`origin-body`,children:e.children.length===0?(0,J.jsx)(`div`,{className:`kx-empty`,children:`No memories yet. The stream begins here.`}):(0,J.jsx)(`div`,{className:`tree`,children:e.children.map(e=>(0,J.jsx)(pt,{node:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s},e.id))})})]})}function ht({onAdd:e,onImport:t,onExport:n,total:r,lastAdded:i}){let[a,o]=(0,z.useState)(``);return(0,J.jsx)(`div`,{className:`kx-toolbar`,role:`region`,"aria-label":`Explorer toolbar`,children:(0,J.jsxs)(`div`,{className:`kx-toolbar-inner`,children:[(0,J.jsxs)(`div`,{className:`kx-brand`,children:[(0,J.jsx)(`div`,{className:`kx-glyph`,"aria-hidden":!0,children:(0,J.jsx)(`img`,{className:`kx-glyph__mark`,src:Ue,alt:``,"aria-hidden":`true`,decoding:`async`,loading:`eager`,draggable:!1})}),(0,J.jsxs)(`div`,{className:`kx-title`,children:[(0,J.jsxs)(`h1`,{children:[`KAIROS `,(0,J.jsx)(`span`,{children:`Keystream`})]}),(0,J.jsxs)(`div`,{className:`kx-tagline`,children:[`Sovereign Lineage • No DB • Pure `,(0,J.jsx)(Z,{className:`phi-tagline__mark`})]})]})]}),(0,J.jsxs)(`div`,{className:`kx-controls`,children:[(0,J.jsxs)(`form`,{className:`kx-add-form`,onSubmit:t=>{t.preventDefault(),a.trim()&&(e(a.trim()),o(``))},children:[(0,J.jsx)(`input`,{className:`kx-input`,placeholder:`Inhale a sigil (or memory)…`,spellCheck:!1,value:a,onChange:e=>o(e.target.value),"aria-label":`Sigil Key`}),(0,J.jsx)(`button`,{className:`kx-button`,type:`submit`,children:`Inhale`})]}),(0,J.jsxs)(`div`,{className:`kx-io`,role:`group`,"aria-label":`Import and export`,children:[(0,J.jsxs)(`label`,{className:`kx-import`,title:`Import a JSON list of Keys (or krystals)`,children:[(0,J.jsx)(`input`,{type:`file`,accept:`application/json`,onChange:e=>{let n=e.target.files?.[0];n&&t(n)},"aria-label":`Import JSON`}),`Inhale`]}),(0,J.jsx)(`button`,{className:`kx-export`,onClick:n,"aria-label":`Export registry to JSON`,type:`button`,children:`Exhale`})]}),(0,J.jsxs)(`div`,{className:`kx-stats`,"aria-live":`polite`,children:[(0,J.jsxs)(`span`,{className:`kx-pill`,title:`Total KEYS in registry (includes variants)`,children:[r,` KEYS`]}),i&&(0,J.jsxs)(`span`,{className:`kx-pill subtle`,title:i,children:[`Last: `,I(i,8)]})]})]})]})})}var gt=()=>{let[t,m]=(0,z.useState)(()=>d()?1:0),[v,x]=(0,z.useState)(0),[C,T]=(0,z.useState)(void 0),[E,ae]=(0,z.useState)(()=>y()),[A,j]=(0,z.useState)(()=>s(new Date)),N=(0,z.useRef)(!1),ce=(0,z.useRef)(new Set),P=(0,z.useRef)(null),F=(0,z.useRef)(!1),I=(0,z.useRef)(null),L=(0,z.useRef)(0),R=(0,z.useRef)(null),ge=(0,z.useRef)(!1),_e=(0,z.useRef)(void 0),ve=(0,z.useRef)(0),ye=(0,z.useRef)(null),B=(0,z.useRef)([]),V=(0,z.useRef)(null),H=(0,z.useCallback)(e=>{let t=$()+e;t>L.current&&(L.current=t)},[]),U=(0,z.useCallback)(()=>{if(!Y||N.current)return;let e=$(),t=L.current-e;if(t>0){R.current!=null&&window.clearTimeout(R.current),R.current=window.setTimeout(()=>{R.current=null,U()},t+Fe);return}let n=B.current.splice(0);if(n.length>0&&(0,z.startTransition)(()=>{ae(e=>{let t=e;for(let e of n){let n=t[e.normalized];n&&n.claimHash===e.claimHash&&n.claimUrl===e.claimUrl&&n.originHash===(e.originHash??n.originHash)&&n.ownerHint===(e.ownerHint??n.ownerHint)||(t={...t,[e.normalized]:{...n,normalized:e.normalized,claimHash:e.claimHash,claimUrl:e.claimUrl,originHash:e.originHash??n?.originHash,ownerHint:e.ownerHint??n?.ownerHint??null,updatedAt:n?.updatedAt??0}})}return t})}),_e.current!==void 0){let e=_e.current;_e.current=void 0,(0,z.startTransition)(()=>T(e))}if(ye.current!==null){let e=ye.current;ye.current=null,(0,z.startTransition)(()=>j(e))}if(ve.current>0){let e=ve.current;ve.current=0,(0,z.startTransition)(()=>x(t=>t+e))}ge.current&&(ge.current=!1,(0,z.startTransition)(()=>m(e=>e+1)))},[H]),W=(0,z.useCallback)(()=>{if(!Y||R.current!=null)return;let e=$(),t=L.current-e,n=Math.max(0,t)+Fe;R.current=window.setTimeout(()=>{R.current=null,U()},n)},[U]),G=(0,z.useCallback)(()=>{if(!N.current){if($()m(e=>e+1))}},[W]),K=(0,z.useCallback)(e=>{if(!N.current){if($()T(e))}},[W]),be=(0,z.useCallback)((e=1)=>{if(!N.current){if($()x(t=>t+e))}},[W]),xe=(0,z.useCallback)(e=>{if(!N.current){if($()j(e))}},[W]),Se=(0,z.useRef)(null),[Ce,we]=(0,z.useState)(()=>new Set),Te=(0,z.useCallback)(e=>{H(Pe);let t=P.current;if(t){let n=`[data-node-id="${Ge(e)}"]`,r=t.querySelector(n);Se.current={id:e,scrollTop:t.scrollTop,rectTop:r?r.getBoundingClientRect().top:0}}we(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),W()},[H,W]);(0,z.useEffect)(()=>{if(!Y)return;let e=window.setInterval(()=>xe(s(new Date)),6e3);return()=>window.clearInterval(e)},[xe]),(0,z.useEffect)(()=>{if(!Y)return;let e=document.documentElement,t=document.body,n=document.scrollingElement||document.documentElement,r={htmlOverscroll:e?.style.overscrollBehavior??``,htmlOverscrollY:e?.style.overscrollBehaviorY??``,bodyOverscroll:t?.style.overscrollBehavior??``,bodyOverscrollY:t?.style.overscrollBehaviorY??``,rootOverscroll:n?.style.overscrollBehavior??``,rootOverscrollY:n?.style.overscrollBehaviorY??``};return e&&(e.style.overscrollBehavior=`none`,e.style.overscrollBehaviorY=`none`),t&&(t.style.overscrollBehavior=`none`,t.style.overscrollBehaviorY=`none`),n&&(n.style.overscrollBehavior=`none`,n.style.overscrollBehaviorY=`none`),()=>{e&&(e.style.overscrollBehavior=r.htmlOverscroll,e.style.overscrollBehaviorY=r.htmlOverscrollY),t&&(t.style.overscrollBehavior=r.bodyOverscroll,t.style.overscrollBehaviorY=r.bodyOverscrollY),n&&(n.style.overscrollBehavior=r.rootOverscroll,n.style.overscrollBehaviorY=r.rootOverscrollY)}},[]),(0,z.useEffect)(()=>{if(!Y)return;let e=P.current;if(!e)return;let t=0,n=0,r=e=>{e.touches.length===1&&(t=e.touches[0]?.clientY??0,n=e.touches[0]?.clientX??0)},i=r=>{if(!r.cancelable||r.touches.length!==1)return;let i=r.touches[0]?.clientY??0,a=r.touches[0]?.clientX??0,o=i-t,s=a-n;if(t=i,n=a,Math.abs(o)<=Math.abs(s))return;let c=e.scrollHeight-e.clientHeight;if(c<=0)return;let l=e.scrollTop<=0,u=e.scrollTop>=c-1,d=o>0,f=o<0;(l&&d&&window.scrollY<=0||u&&f)&&r.preventDefault()};return e.addEventListener(`touchstart`,r,{passive:!0}),e.addEventListener(`touchmove`,i,{passive:!1}),()=>{e.removeEventListener(`touchstart`,r),e.removeEventListener(`touchmove`,i)}},[]),(0,z.useEffect)(()=>{if(!Y)return;let e=P.current;if(!e)return;let t=()=>{F.current=!0,H(Ne),I.current!=null&&window.clearTimeout(I.current),I.current=window.setTimeout(()=>{F.current=!1,I.current=null,W()},180)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>{e.removeEventListener(`scroll`,t),I.current!=null&&window.clearTimeout(I.current),I.current=null,F.current=!1}},[H,W]),(0,z.useLayoutEffect)(()=>{let e=Se.current;if(!e)return;Se.current=null;let t=P.current;if(!t)return;let n=`[data-node-id="${Ge(e.id)}"]`,r=t.querySelector(n);if(!r)return;let i=r.getBoundingClientRect().top-e.rectTop;Number.isFinite(i)&&Math.abs(i)>1&&(t.scrollTop=Math.max(0,e.scrollTop+i))},[Ce]);let Ee=(0,z.useRef)(null),De=(0,z.useRef)(!1),Oe=(0,z.useRef)(null);(0,z.useEffect)(()=>{if(N.current=!1,a(),i(),te(),ne(),d()&&G(),Y){let e=M(window.location.href);if(le(e)){let t=o(e,{includeAncestry:!0,broadcast:!1,persist:!0,source:`local`,enqueueToApi:!0});K(O(e)),t&&G()}}let e=window.__SIGIL__?.registerSigilUrl,t=window.__SIGIL__?.registerSend;window.__SIGIL__||(window.__SIGIL__={}),window.__SIGIL__.registerSigilUrl=f,window.__SIGIL__.registerSend=e=>{if(!e||typeof e!=`object`)return;let t=e.url;typeof t!=`string`||!t.trim()||o(t,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(K(O(t)),G())};let n=e=>{let t=e?.detail?.url;typeof t==`string`&&t.length&&o(t,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(K(O(t)),G())};window.addEventListener(`sigil:url-registered`,n);let r=e=>{let t=e?.detail?.url;typeof t==`string`&&t.length&&o(t,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(K(O(t)),G())};window.addEventListener(`sigil:minted`,r);let s=Y&&`BroadcastChannel`in window?new BroadcastChannel(Me):null,l=e=>{let t=e.data;t?.type===`sigil:add`&&typeof t.url==`string`&&o(t.url,{includeAncestry:!0,broadcast:!1,persist:!0,source:`local`,enqueueToApi:!0})&&(K(O(t.url)),G())};s?.addEventListener(`message`,l);let m=e=>{if(!e.key)return;let t=e.key===b,n=e.key===_;if(e.key===`kai:sigil-transfer:v1`){be();return}if(!(!t&&!n)&&e.newValue)try{let t=JSON.parse(e.newValue);if(!Array.isArray(t))return;let n=!1;for(let e of t)typeof e==`string`&&o(e,{includeAncestry:!0,broadcast:!1,persist:!1,source:`local`,enqueueToApi:!0})&&(n=!0);K(void 0),n&&(ee(),G())}catch{}};window.addEventListener(`storage`,m);let h=()=>be();window.addEventListener(pe,h);let v=Y&&`BroadcastChannel`in window?new BroadcastChannel(D):null,y=e=>{e.data?.type===`transfer:update`&&be()};v?.addEventListener(`message`,y);let x=()=>{de(),p()};window.addEventListener(`pagehide`,x);let S=u(e=>{if($(){ae(t=>{let n=t[e.normalized];return n&&n.claimHash===e.claimHash&&n.claimUrl===e.claimUrl&&n.originHash===e.originHash&&n.ownerHint===e.ownerHint?t:{...t,[e.normalized]:e}})})}),C=new AbortController,w=async e=>{N.current||ue()&&(F.current||$(){if(!N.current&&ue()&&!De.current&&!F.current&&!($()new URL(fe,e).toString(),{method:`GET`,cache:`no-store`,signal:C.signal,headers:void 0});if(!n||n.status===304||!n.ok)return;let r=``,i;try{let e=await n.json();r=typeof e?.seal==`string`?e.seal:``,i=He(e)}catch{return}let a=i==null?void 0:Ve();if(t&&r&&t===r&&!(i!=null&&(a==null||i>a))){Ee.current=r;return}let o=await c(C.signal);o.pulled&&(Ee.current=o.remoteSeal??r??t??null),o.imported>0&&(K(void 0),G());let s=Ee.current;(e===`open`||(e===`visible`||e===`focus`||e===`online`||e===`import`)&&s!==Oe.current)&&(oe(),Oe.current=s,await p())}finally{De.current=!1}}};V.current=T,oe(),w(`open`),T(`open`);let E=null,k=null,re=()=>{Y&&(N.current||(E!=null&&window.clearInterval(E),E=window.setInterval(()=>{document.visibilityState===`visible`&&ue()&&w(`pulse`)},ze)))},ie=()=>{Y&&(N.current||(k!=null&&window.clearInterval(k),k=window.setInterval(()=>{document.visibilityState===`visible`&&ue()&&T(`pulse`)},Be)))},A=()=>{re(),ie()};A();let j=()=>{document.visibilityState===`visible`&&(A(),w(`visible`),T(`visible`))};document.addEventListener(`visibilitychange`,j);let se=()=>{A(),w(`focus`),T(`focus`)},ce=()=>{A(),w(`online`),T(`online`)};return window.addEventListener(`focus`,se),window.addEventListener(`online`,ce),()=>{window.__SIGIL__&&(window.__SIGIL__.registerSigilUrl=e,window.__SIGIL__.registerSend=t),window.removeEventListener(`sigil:url-registered`,n),window.removeEventListener(`sigil:minted`,r),window.removeEventListener(`storage`,m),window.removeEventListener(pe,h),v?.removeEventListener(`message`,y),v?.close(),window.removeEventListener(`pagehide`,x),window.removeEventListener(`focus`,se),window.removeEventListener(`online`,ce),document.removeEventListener(`visibilitychange`,j),s?.removeEventListener(`message`,l),s?.close(),typeof S==`function`&&S(),R.current!=null&&window.clearTimeout(R.current),R.current=null,E!=null&&window.clearInterval(E),E=null,k!=null&&window.clearInterval(k),k=null,C.abort(),V.current=null,N.current=!0}},[G,H,W,K]);let ke=(0,z.useCallback)(e=>{let t=V.current;t&&t(e)},[]);(0,z.useEffect)(()=>{if(!Y)return;let e=()=>ke(`visible`);return window.addEventListener(je,e),()=>window.removeEventListener(je,e)},[ke]);let q=(0,z.useMemo)(()=>Ae(l),[t]),Le=(0,z.useMemo)(()=>n(),[v]),Ue=(0,z.useMemo)(()=>st(l),[t,v]),X=(0,z.useMemo)(()=>{let e=0;for(let[,]of l)e+=1;return e},[t]),Z=(0,z.useMemo)(()=>{let e=new Map,t=n=>{let r=Qe(n.payload,A),i=$e(n.payload,A),a=nt(n,Le)??null,o=ct(n,Le,Ue),s=o===`received`&&a?a.amount:0,c=s>0?s:r??0,l=0,u=0,d=0;for(let e of n.children){let n=t(e);l+=n.receivedFromParent,u+=n.pendingFromParent,d+=n.liftToParent}let f=o===`pending`&&a?.direction===`send`?a.amount:0,p=Math.max(0,c+d-l),m=o===`received`&&a?.amountUsd?a.amountUsd:i==null?null:p*i,h=f,g=k(n.url)===`stream`?p:0;return e.set(n.id,{basePhi:r,netPhi:Number.isFinite(p)?p:null,usdValue:m,usdPerPhi:i,transferMove:a,receivedAmount:s,receivedFromChildren:l,pendingFromChildren:u,pendingFromParent:h}),{receivedFromParent:s,pendingFromParent:h,liftToParent:g}};for(let e of q)t(e);return e},[q,A,Ue,Le]),Q=(0,z.useMemo)(()=>{let e=new Map,t=new Map;for(let[n,r]of l){let i=typeof r.pulse==`number`?r.pulse:void 0;if(i==null)continue;let a=ie(M(n),r),o=t.get(i);if(o||(o=new Set,t.set(i,o)),o.has(a))continue;o.add(a);let s=se(r);s!==void 0&&e.set(i,(e.get(i)??0)+s)}return e},[t]),Ke=(0,z.useMemo)(()=>{let e=[];for(let[t]of l){let n=M(re(t));e.includes(n)||e.push(n)}return e},[t]);(0,z.useEffect)(()=>{if(!Y||Ke.length===0)return;let e=Ke.filter(e=>!ce.current.has(e));if(e.length===0)return;let t=!1,n=async()=>{for(let n of e){if(t)break;ce.current.add(n),await dt(n)}},r=window,i=null;if(typeof r.requestIdleCallback==`function`){let e=r.requestIdleCallback(()=>void n(),{timeout:1e3});i=()=>r.cancelIdleCallback?.(e)}else{let e=window.setTimeout(()=>void n(),120);i=()=>window.clearTimeout(e)}return()=>{t=!0,i?.()}},[Ke]);let qe=(0,z.useCallback)(async()=>{if(!Y||F.current||!ue()||$(){if(n.urls.length>1){let t=k(n.url),i=[...n.urls].map(e=>M(O(e))).filter((e,t,n)=>n.indexOf(e)===t).sort((e,n)=>he(n,t)-he(e,t));for(let t of i.slice(0,2)){let n=M(t);!r.has(n)&&!e.includes(n)&&e.push(n)}}n.children.forEach(t)};for(let e of q)t(e);if(e.length!==0)for(let t of e.slice(0,Re)){let e=await me(t);e===`ok`&&h(t,1),e===`bad`&&h(t,-1)}},[q]);(0,z.useEffect)(()=>{if(!Y)return;let e=!1,t=()=>{e||qe()},n=window,r=null;if(typeof n.requestIdleCallback==`function`){let e=n.requestIdleCallback(t,{timeout:900});r=()=>n.cancelIdleCallback?.(e)}else{let e=window.setTimeout(t,250);r=()=>window.clearTimeout(e)}return()=>{e=!0,r?.()}},[t,qe]);let Je=(0,z.useCallback)(e=>{H(Pe),o(e,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(K(O(e)),G())},[G,H,K]),Ye=(0,z.useCallback)(async t=>{H(0);let n=await t.text(),r;try{r=await et(n)}catch{return}let{urls:i,rawKrystals:a}=S(r);if(i.length===0&&a.length===0)return;let s=!1;for(let e=0;e0&&e(i),s&&(K(void 0),G()),ke(`import`)},[G,H,ke,K]),Xe=(0,z.useCallback)(()=>{H(Pe);let e=[];for(let[t]of l)e.push(t);let t=new Blob([JSON.stringify({urls:e},null,2)],{type:`application/json`}),n=document.createElement(`a`);n.href=URL.createObjectURL(t),n.download=`sigil-registry-${Date.now()}.json`,n.click(),URL.revokeObjectURL(n.href)},[H]);return(0,J.jsxs)(`div`,{className:`sigil-explorer`,"aria-label":`Kairos Keystream Explorer`,children:[(0,J.jsx)(ht,{onAdd:Je,onImport:Ye,onExport:Xe,total:X,lastAdded:C}),(0,J.jsx)(`div`,{className:`explorer-scroll`,ref:P,role:`region`,"aria-label":`Explorer scroll viewport`,children:(0,J.jsxs)(`div`,{className:`explorer-inner`,children:[q.length===0?(0,J.jsxs)(`div`,{className:`kx-empty`,children:[(0,J.jsx)(`p`,{children:`No sigil-glyphs in your keystream yet.`}),(0,J.jsxs)(`ol`,{children:[(0,J.jsx)(`li`,{children:`Import your keystream memories.`}),(0,J.jsx)(`li`,{children:`Seal a moment — auto-registered here.`}),(0,J.jsx)(`li`,{children:`Inhale any sigil-glyph or memory key above — lineage aligns instantly.`})]})]}):(0,J.jsx)(`div`,{className:`forest`,"aria-label":`Sigil forest`,children:q.map(e=>(0,J.jsx)(mt,{root:e,expanded:Ce,toggle:Te,phiTotalsByPulse:Q,usernameClaims:E,transferRegistry:Le,receiveLocks:Ue,valueSnapshots:Z},e.id))}),(0,J.jsx)(`footer`,{className:`kx-footer`,"aria-label":`Explorer footer`,children:(0,J.jsxs)(`span`,{className:`row`,children:[(0,J.jsx)(`span`,{children:`Determinate • Stateless • Kairos-Memory`}),(0,J.jsx)(`span`,{className:`dot`,children:`•`}),(0,J.jsx)(`span`,{children:ue()?`online`:`offline`}),(0,J.jsx)(`span`,{className:`dot`,children:`•`}),(0,J.jsxs)(`span`,{children:[X,` keys`]})]})})]})})]})};export{gt as default}; \ No newline at end of file diff --git a/dist/assets/SigilExplorer-DoaDgoPM.js b/dist/assets/SigilExplorer-DoaDgoPM.js deleted file mode 100644 index c1adc8433..000000000 --- a/dist/assets/SigilExplorer-DoaDgoPM.js +++ /dev/null @@ -1,10 +0,0 @@ -import{$t as e,Bt as t,C as n,Cn as r,Dn as i,En as a,Gn as o,Gt as s,H as c,Ht as l,Jt as u,Kt as d,On as f,Qr as p,Qt as m,S as h,Sn as g,Tn as _,Ut as v,Vt as y,Wt as b,Xn as ee,Xt as te,Yt as x,Zt as S,_n as C,_r as w,an as T,b as E,bn as ne,cn as D,dn as O,en as re,fn as ie,gn as ae,hn as k,in as A,kn as oe,ln as j,mn as M,nn as se,on as ce,pi as le,pn as ue,qn as de,qt as fe,rn as N,si as P,sn as F,tn as pe,un as I,vn as L,wn as me,x as he,xn as ge,yn as _e,zt as ve}from"./index-BoEZKnmf.js";var R=le(P(),1);const ye={root:`#ff3b3b`,sacral:`#ff8a3d`,solar:`#ffd54a`,heart:`#3dff9a`,throat:`#46d3ff`,thirdEye:`#6b6cff`,crown:`#c18bff`};function be(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`root`)?`root`:t.includes(`sacral`)?`sacral`:t.includes(`solar`)||t.includes(`plexus`)||t.includes(`sun`)?`solar`:t.includes(`heart`)?`heart`:t.includes(`throat`)?`throat`:t.includes(`third`)||t.includes(`eye`)||t.includes(`indigo`)?`thirdEye`:t.includes(`crown`)||t.includes(`krown`)||t.includes(`violet`)?`crown`:t===`1`?`root`:t===`2`?`sacral`:t===`3`?`solar`:t===`4`?`heart`:t===`5`?`throat`:t===`6`?`thirdEye`:t===`7`?`crown`:null:null}function xe(e){let t=be(e),n=t?ye[t]:`var(--sx-accent)`;return{"--sx-chakra":n}}function z(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function B(e){if(typeof e==`number`)return!Number.isFinite(e)||Math.abs(e)<1e-12?void 0:Math.abs(e);if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&Math.abs(t)>=1e-12)return Math.abs(t)}}function V(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`receive`)||t.includes(`received`)||t.includes(`inhale`)?`receive`:t.includes(`send`)||t.includes(`sent`)||t.includes(`exhale`)?`send`:null:null}function H(e){if(typeof e==`number`)return!Number.isFinite(e)||e<=0?void 0:e;if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&t>0)return t}}function U(e){if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&t>0)return t}}function W(e){let t=e,n=z(t.feed)?t.feed:null,r=e=>e?V(e.phiDirection)||V(e.transferDirection)||V(e.transferMode)||V(e.transferKind):null,i=e=>{if(e)return e.phiDelta??e.phiSigned??e.phiChange},a=e=>e?B(e.transferAmountPhi)??B(e.transferPhi)??B(e.amountPhi)??B(e.phiAmount)??B(e.childAllocationPhi)??B(e.branchBasePhi):void 0,o=e=>e?H(e.amountUsd)??H(e.usdAmount)??H(e.usdValue)??H(e.valueUsd)??H(e.usd):void 0,s=e=>e?H(e.usdPerPhi)??H(e.fxUsdPerPhi)??H(e.usd_per_phi):void 0,c=e=>e?U(e.atPulse)??U(e.sentPulse)??U(e.senderKaiPulse)??U(e.transferPulse):void 0,l=r(t)??r(n),u=i(t)??i(n),d=typeof u==`number`?u:void 0;d===void 0&&typeof u==`string`&&(d=Number(u));let f=l??(typeof d==`number`&&Number.isFinite(d)?d>=0?`receive`:`send`:null);if(!f)return;let p=a(t)??a(n)??(z(t.preview)?B(t.preview.amountPhi):void 0)??(z(n?.preview)?B(n.preview.amountPhi):void 0)??(typeof d==`number`&&Number.isFinite(d)?Math.abs(d):void 0);if(p===void 0)return;let m=o(t)??o(n)??(z(t.preview)?H(t.preview.amountUsd):void 0)??(z(n?.preview)?H(n.preview.amountUsd):void 0),h=s(t)??s(n)??(z(t.preview)?H(t.preview.usdPerPhi):void 0)??(z(n?.preview)?H(n.preview.usdPerPhi):void 0),g=c(t)??c(n)??(z(t.preview)?U(t.preview.atPulse):void 0)??(z(n?.preview)?U(n.preview.atPulse):void 0);return{direction:f,amount:p,amountUsd:m??(h===void 0?void 0:p*h),sentPulse:g,source:`payload`}}function G(e){for(let t of[`transferUrl`,`transferURL`,`transferLink`,`transfer_link`,`sealUrl`,`sealURL`,`sigilTransferUrl`]){let n=e[t];if(typeof n!=`string`||!n.trim())continue;let r=ue(n.trim());if(!r)continue;let i=W(r);if(i)return i}}function Se(e,t){if(!e)return;let n=t.get(e.toLowerCase());if(!n)return;let r=B(n.amountPhi);if(r!==void 0)return{direction:n.direction,amount:r,amountUsd:H(n.amountUsd),sentPulse:U(n.sentPulse),source:`registry`}}function Ce(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function we(e,t){if(!Ce(e))return;let n=e[t];return typeof n==`string`&&n.trim().length>0?n.trim():void 0}function Te(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`receive`)||t.includes(`received`)||t.includes(`inhale`)?`receive`:t.includes(`send`)||t.includes(`sent`)||t.includes(`exhale`)?`send`:null:null}function Ee(e){let t=e,n=Ce(t.feed)?t.feed:null,r=e=>e?Te(e.transferDirection)||Te(e.transferMode)||Te(e.transferKind)||Te(e.phiDirection):null,i=!!(r(t)??r(n)),a=!!(typeof t.transferNonce==`string`||typeof t.nonce==`string`||typeof t.transferToken==`string`||typeof t.token==`string`||n&&(typeof n.transferNonce==`string`||typeof n.nonce==`string`||typeof n.transferToken==`string`||typeof n.token==`string`)),o=!!(typeof t.parentUrl==`string`||typeof t.parentHash==`string`||typeof t.parentCanonical==`string`||n&&(typeof n.parentUrl==`string`||typeof n.parentHash==`string`||typeof n.parentCanonical==`string`));return i||a||o}function De(e){return e.kind!==`post`||!C(e.primaryUrl)||W(e.payload)?!1:!Ee(e.payload)}function Oe(e){let t=new Map,n=new Map;for(let[r,i]of e){let e=j(r),a=O(e),o=I(e,i),s=ae(e,i);t.set(e,o);let c=n.get(o);if(!c){n.set(o,{payload:i,urls:new Set([e]),kind:a,momentKey:s});continue}N(i,c.payload)>0&&(c.payload=i),c.urls.add(e);let l=c.momentKey,u=s;l.startsWith(`u:`)&&!u.startsWith(`u:`)&&(c.momentKey=u),l.startsWith(`h:`)&&(u.startsWith(`k:`)||u.startsWith(`sig:`)||u.startsWith(`tok:`))&&(c.momentKey=u)}let r=new Map;for(let[e,t]of n){let n=L(Array.from(t.urls),t.kind);r.set(e,{id:e,payload:t.payload,urls:t.urls,primaryUrl:n,kind:t.kind,momentKey:t.momentKey})}let i=new Map;for(let e of r.values()){let t=e.momentKey;i.has(t)||i.set(t,[]),i.get(t).push(e.id)}let a=new Map,o=new Map,s=new Map,c=new Map;for(let e of r.values()){let t=C(e.primaryUrl);t&&!c.has(t)&&c.set(t,e.id)}for(let[e,t]of i){let n=t.map(e=>r.get(e)).filter(Boolean),i=n.filter(e=>e.kind===`post`),c;c=i.length>0?i.slice().sort((e,t)=>_e(t.primaryUrl,`post`)-_e(e.primaryUrl,`post`))[0]:n.slice().sort((e,t)=>_e(t.primaryUrl,t.kind)-_e(e.primaryUrl,e.kind))[0];let l=c?.id??t[0];a.set(e,l);for(let e of t)o.set(e,l);for(let e of t){let t=r.get(e);if(t)for(let e of t.urls)s.set(e,l)}}let l=new Map,u=new Map;for(let e of r.values()){if(!De(e))continue;let t=C(e.primaryUrl);t&&(u.has(t)||u.set(t,e.id))}for(let e of r.values()){let n=o.get(e.id)??e.id;if(e.id!==n)continue;let r=we(e.payload,`originUrl`),i=r?j(r):M(e.primaryUrl)??e.primaryUrl,a=C(i),d=t.get(i)??(a?c.get(a):void 0),f=(a?u.get(a):void 0)??d??s.get(i);l.set(n,f??n)}let d=new Map;for(let e of r.values()){let n=o.get(e.id)??e.id,r=l.get(n)??n,i,a=we(e.payload,`parentUrl`);if(a){let n=j(a),r=C(n),o=t.get(n)??(r?c.get(r):void 0)??s.get(n);o&&o!==e.id&&(i=o)}!i&&e.id!==n&&(i=n),d.set(e.id,{id:e.id,payload:e.payload,urls:e.urls,primaryUrl:e.primaryUrl,kind:e.kind,momentKey:e.momentKey,parentId:i,originId:r,momentParentId:n})}return d}function ke(e,t){let n=[];for(let[r,i]of t)i.parentId===e&&n.push(r);return n.sort((e,n)=>N(t.get(n).payload,t.get(e).payload)),n}function Ae(e,t,n=new Set){let r=t.get(e);if(!r)return null;if(n.has(e))return{id:r.id,url:r.primaryUrl,urls:Array.from(r.urls),payload:r.payload,children:[]};n.add(e);let i=ke(e,t).map(e=>Ae(e,t,n)).filter(Boolean);return{id:r.id,url:r.primaryUrl,urls:Array.from(r.urls),payload:r.payload,children:i}}function je(e){let t=0,n=e.payload,r=e=>{t+=1,N(e.payload,n)>0&&(n=e.payload),e.children.forEach(r)};return r(e),{nodeCount:t,latest:n}}function Me(e){let t=Oe(e),n=new Map;for(let[e,r]of t){let t=r.originId;n.has(t)||n.set(t,[]),n.get(t).push(e)}let r=[];for(let e of n.keys()){let n=Ae(e,t);if(!n)continue;let i=je(n);r.push({root:n,nodeCount:i.nodeCount,latest:i.latest})}return r.sort((e,t)=>{let n=N(t.latest,e.latest);return n===0?t.nodeCount===e.nodeCount?N(t.root.payload,e.root.payload):t.nodeCount-e.nodeCount:n}),r.map(e=>e.root)}function K(e){let t=e.payload;if(Ce(t)&&typeof t.canonicalHash==`string`)return t.canonicalHash;let n=C(e.url);if(n)return n;for(let t of e.urls){let e=C(t);if(e)return e;let n=ue(t);if(!n)continue;let r=n;if(Ce(r)&&typeof r.canonicalHash==`string`)return r.canonicalHash}}var q=le(y(),1),J=typeof window<`u`,Ne=`sigil:explorer:open`,Pe=`sigil:explorer:bc:v1`,Fe=520,Ie=900,Le=80,Re=80,ze=25e4,Be=18,Ve=3236,He=2e3;function Ue(){let e;for(let[,t]of u){let n=t.pulse;typeof n!=`number`||!Number.isFinite(n)||(e==null||n>e)&&(e=n)}return e}function We(e){let t=e?.pulse??e?.latestPulse??e?.latest_pulse;if(!(typeof t!=`number`||!Number.isFinite(t)))return t}var Ge=`/phi.svg`,Y=`phi`;function X({className:e}){return(0,q.jsx)(`img`,{className:[`phi-mark`,e].filter(Boolean).join(` `),src:Ge,alt:Y,decoding:`async`,loading:`lazy`,draggable:!1})}function Z(e,t){return(0,q.jsxs)(`span`,{className:[`phi-amount`,t?.className].filter(Boolean).join(` `),children:[t?.sign?(0,q.jsx)(`span`,{className:`phi-amount__sign`,children:t.sign}):null,(0,q.jsx)(`span`,{className:`phi-amount__value`,children:A(e)}),(0,q.jsx)(X,{className:[`phi-amount__mark`,t?.markClassName].filter(Boolean).join(` `)})]})}function Q(){return Date.now()}function Ke(){return J?new Promise(e=>{if(typeof window.requestAnimationFrame==`function`){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)}):Promise.resolve()}function qe(e){let t=(J?window:null)?.CSS?.escape;return typeof t==`function`?t(e):e.replace(/["\\]/g,`\\$&`)}function Je(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Ye(e,t){return Je(e)&&typeof e[t]==`string`}function $(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);if(!Number.isNaN(t)&&Number.isFinite(t))return t}}function Xe(e){if(typeof e==`boolean`)return e}function Ze(e){if(e===`low`||e===`med`||e===`high`)return e}function Qe(e){let t=e,n=$(e.stepsPerBeat),r=Array.isArray(t.transfers)?t.transfers:void 0,i=Array.isArray(t.segments)?t.segments:void 0,a=Je(t.ip)?t.ip:void 0;return{pulse:e.pulse,kaiPulse:e.pulse,beat:e.beat,stepIndex:e.stepIndex,stepsPerBeat:$(t.stepsPerBeat)??n,kaiSignature:e.kaiSignature,userPhiKey:e.userPhiKey,chakraDay:e.chakraDay,chakraGate:typeof t.chakraGate==`string`?t.chakraGate:void 0,seriesSize:$(t.seriesSize),quality:Ze(t.quality),creatorVerified:Xe(t.creatorVerified),creatorRep:$(t.creatorRep),frequencyHz:$(t.frequencyHz),transfers:r,cumulativeTransfers:$(t.cumulativeTransfers),segments:i,segmentsMerkleRoot:typeof t.segmentsMerkleRoot==`string`?t.segmentsMerkleRoot:void 0,transfersWindowRoot:typeof t.transfersWindowRoot==`string`?t.transfersWindowRoot:void 0,ip:a}}function $e(e,t){if(t==null||!Number.isFinite(t))return null;try{let{unsigned:n}=w(Qe(e),t);return Number.isFinite(n.valuePhi)?n.valuePhi:null}catch{return null}}function et(e,n){if(n==null||!Number.isFinite(n))return null;try{let r=t({meta:Qe(e),nowPulse:n,usd:100,currentStreakDays:0,lifetimeUsdSoFar:0},ve);return Number.isFinite(r.usdPerPhi)?r.usdPerPhi:null}catch{return null}}function tt(e){if(!J||typeof Worker>`u`||e.length { - try { - const parsed = JSON.parse(event.data); - self.postMessage({ ok: true, value: parsed }); - } catch (err) { - self.postMessage({ ok: false, error: err && err.message ? err.message : "parse-failed" }); - } - }; - `],{type:`text/javascript`});n=URL.createObjectURL(e),t=new Worker(n)}catch{return n&&URL.revokeObjectURL(n),Promise.resolve(JSON.parse(e))}return new Promise((r,i)=>{let a=()=>{t?.terminate(),n&&URL.revokeObjectURL(n)};t.onmessage=e=>{let t=e.data;a(),t?.ok?r(t.value):i(Error(t?.error??`parse-failed`))},t.onerror=()=>{a(),i(Error(`parse-failed`))},t.postMessage(e)})}function nt(e){let t=O(e.url);return t===`stream`?`inhale`:t===`post`?`exhale`:null}function rt(e,t){let n=Se(K(e),t);if(n)return n;let r=W(e.payload);if(r)return r;let i=e.payload,a=G(i);if(a)return a;if(Je(i.feed)){let e=G(i.feed);if(e)return e}for(let t of e.urls){let e=ue(t);if(!e)continue;let n=W(e);if(n)return n;let r=G(e);if(r)return r}}function it(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return t?t.includes(`receive`)||t.includes(`received`)||t.includes(`inhale`)?`receive`:t.includes(`send`)||t.includes(`sent`)||t.includes(`exhale`)?`send`:null:null}function at(e){let t=e;return it(t.transferDirection)||it(t.transferMode)||it(t.transferKind)||it(t.phiDirection)}function ot(e){let t=e,n=t.transferNonce??t.nonce;return typeof n==`string`&&n.trim()?n.trim():null}function st(e){let t=e,n=t.canonicalHash??t.childHash??t.hash;return typeof n==`string`&&n.trim()?n.trim().toLowerCase():null}function ct(e){let t=new Set,n=new Set;for(let r of e.values()){if(at(r)!==`receive`)continue;let e=ot(r);e&&t.add(e);let i=st(r);i&&n.add(i)}return{nonces:t,canonicals:n}}function lt(e,t,n){let r=rt(e,t);if(!r)return null;if(r.direction===`receive`)return`received`;let i=ot(e.payload);if(i&&n.nonces.has(i))return`received`;let a=K(e);return a&&n.canonicals.has(a)?`received`:`pending`}function ut(e,t,n,r,i){let a=e.payload,o=[],s=new Set,c=rt(e,n),l=c?lt(e,n,r):null,u=l===`pending`&&c?c.amount:i?.netPhi??null,d=l===`pending`&&c?c.amountUsd??(i?.usdPerPhi==null?null:c.amount*i.usdPerPhi):i?.usdValue??null;u!=null&&o.push({label:(0,q.jsxs)(`span`,{className:`phi-detail__label`,children:[`Live `,(0,q.jsx)(X,{className:`phi-detail__mark`}),` value`]}),value:Z(u),valueText:`${A(u)} ${Y}`}),d!=null&&o.push({label:`Live USD`,value:`$${T(d)}`});let f=i?.pendingFromChildren??0,p=i?.pendingFromParent??0,m=e.children.length>0?f:f+p;m>0&&o.push({label:`Exhale (pending)`,value:Z(m,{sign:`-`}),valueText:`-${A(m)} ${Y}`});let h=i?.receivedFromChildren??0;h>0&&o.push({label:(0,q.jsxs)(`span`,{className:`phi-detail__label`,children:[(0,q.jsx)(X,{className:`phi-detail__mark`}),` Exhaled`]}),value:Z(h,{sign:`-`}),valueText:`-${A(h)} ${Y}`});let g=ce(e.payload);if(g!==void 0&&o.push({label:(0,q.jsxs)(`span`,{className:`phi-detail__label`,children:[`This glyph `,(0,q.jsx)(X,{className:`phi-detail__mark`})]}),value:Z(g),valueText:`${A(g)} ${Y}`}),c){let e=c.direction===`receive`?`Inhaled`:`Exhaled`,t=c.direction===`receive`?`Inhale (pending)`:`Exhale (pending)`,n=c.sentPulse===void 0?``:` • pulse ${c.sentPulse}`,r=c.sentPulse===void 0?``:` (pulse ${c.sentPulse})`;l&&o.push({label:`Transfer status`,value:`${l===`pending`?t:e}${n}`}),l===`received`&&o.push({label:(0,q.jsxs)(`span`,{className:`phi-detail__label`,children:[(0,q.jsx)(X,{className:`phi-detail__mark`}),` `,e,r]}),value:Z(c.amount,{sign:`+`}),valueText:`+${A(c.amount)} ${Y}`}),c.amountUsd!==void 0&&o.push({label:`USD value`,value:`$${T(c.amountUsd)}`}),c.sentPulse!==void 0&&o.push({label:`Sent pulse`,value:String(c.sentPulse)});let i=c;Ye(i,`txHash`)&&o.push({label:`Tx hash`,value:i.txHash})}let _=a.feed,v=typeof _?.author==`string`?_.author:typeof a.author==`string`?a.author:void 0,y=_?_.usernameClaim:void 0,b=y?ee(y.payload?.normalized||y.payload?.username||``):``,te=ee(v??``),x=b||te;if(x){let e=t[x],n=typeof v==`string`&&v.trim().length>0?v.trim():`@${x}`;e?(o.push({label:`Username (claimed)`,value:`${n} → glyph ${F(e.claimHash,10)}`}),o.push({label:`Claim glyph`,value:D(e.claimUrl)})):o.push({label:`Username`,value:n})}let S=(e,t)=>{let n=a[e];typeof n==`string`&&n.trim().length>0&&!s.has(e)&&(o.push({label:t,value:n.trim()}),s.add(e))};S(`userPhiKey`,`PhiKey`),S(`phiKey`,`PhiKey`),S(`phikey`,`PhiKey`),S(`kaiSignature`,`Kai Signature`),typeof a.parentUrl==`string`&&a.parentUrl.length>0&&o.push({label:`Parent URL`,value:D(a.parentUrl)}),typeof a.originUrl==`string`&&a.originUrl.length>0&&o.push({label:`Origin URL`,value:D(a.originUrl)});let C=a.label??a.title??a.type??a.note??a.description;typeof C==`string`&&C.trim().length>0&&o.push({label:`Label / Type`,value:C.trim()}),o.push({label:`Primary URL`,value:D(e.url)});let w=e.urls.filter(e=>!k(e)).map(e=>D(e));return e.urls.length>1&&o.push({label:`URL variants`,value:w.length===0?`${e.urls.length} urls (kept in data; hidden from browser view)`:w.length<=3?w.join(` | `):`${e.urls.length} urls (kept in data; rendered once)`}),o.slice(0,12)}async function dt(e){if(J){try{if(navigator.clipboard&&typeof navigator.clipboard.writeText==`function`){await navigator.clipboard.writeText(e);return}}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,`true`),t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)}catch{}}}async function ft(e){if(J)try{await fetch(e,{method:`GET`,cache:`force-cache`,mode:`cors`,credentials:`omit`,redirect:`follow`})}catch{}}function pt({p:e}){let t=typeof e.pulse==`number`?e.pulse:0,n=typeof e.stepsPerBeat==`number`&&e.stepsPerBeat>0?e.stepsPerBeat:44,r=typeof e.stepIndex==`number`?e.stepIndex:typeof e.pulse==`number`?p(e.pulse,n):0,i=typeof e.beat==`number`?e.beat:0;return(0,q.jsxs)(`span`,{className:`k-stamp`,title:`pulse ${t} • beat ${i} • step ${r}`,children:[(0,q.jsxs)(`span`,{className:`k-pill`,children:[`☤KAI `,t]}),(0,q.jsx)(`span`,{className:`k-dot`,children:`•`}),(0,q.jsxs)(`span`,{className:`k-pill`,children:[`beat `,i]}),(0,q.jsx)(`span`,{className:`k-dot`,children:`•`}),(0,q.jsxs)(`span`,{className:`k-pill`,children:[`step `,r]})]})}function mt({node:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s}){let c=t.has(e.id),l=K(e),u=e.payload.kaiSignature,d=e.payload.chakraDay,f=typeof e.payload.pulse==`number`?e.payload.pulse:void 0,p=f==null?void 0:r.get(f),m=ie(e.url),h=s.get(e.id)??null,g=c?ut(e,i,a,o,h):[],_=rt(e,a),v=lt(e,a,o),y=nt(e),b=!(e.children.length>0),ee=h?.netPhi??null,te=h?.usdValue??null,x=v===`pending`&&_?_.amount:ee,S=v===`pending`&&_?_.amountUsd??(h?.usdPerPhi==null?null:_.amount*h.usdPerPhi):te,C=h?.pendingFromChildren??0,w=h?.pendingFromParent??0,E=h?.receivedFromChildren??0,ne=C+E,D=ne>0?E/ne:0,O=C>0&&E>0?{"--exhale-rgb":`${Math.round(255*(.85+.15*D))},${Math.round(140*(1-D)+75*D)},${Math.round(80*(1-D)+110*D)}`}:void 0,re=C>0?`Exhale (pending) children: -${A(C)} ${Y}${x===null?``:` • Live ${A(Math.max(0,x))} ${Y}`}`:void 0,ae=w>0?`Exhale (pending) send: -${A(w)} ${Y}${x===null?``:` • Live ${A(Math.max(0,x))} ${Y}`}`:void 0,k=b&&w>0&&v!==`pending`,oe=E>0?`Exhaled: -${A(E)} ${Y}${x===null?``:` • Live ${A(Math.max(0,x))} ${Y}`}`:void 0,j=x===null?void 0:`Live value: ${A(x)} ${Y}${S===null?``:` • $${T(S)}`}`,M=_&&v===`received`?{direction:`send`,sign:`-`,titleVerb:_.direction===`receive`?`inhaled`:`exhaled`}:_?{direction:`pending`,sign:`-`,titleVerb:_.direction===`receive`?`inhaled`:`exhaled`}:null;return(0,q.jsxs)(`div`,{className:`node`,style:xe(d),"data-chakra":String(d??``),"data-node-id":e.id,children:[(0,q.jsxs)(`div`,{className:`node-row`,children:[(0,q.jsxs)(`div`,{className:`node-main`,children:[(0,q.jsx)(`button`,{className:`twirl`,"aria-label":c?`Collapse memories`:`Expand memories`,"aria-expanded":c,onClick:()=>n(e.id),title:c?`Collapse`:`Expand`,type:`button`,children:(0,q.jsx)(`span`,{className:`tw ${c?`open`:``}`})}),(0,q.jsx)(`a`,{className:`node-link`,href:m,target:`_blank`,rel:`noopener noreferrer`,title:m,children:(0,q.jsx)(`span`,{children:F(u??l??`glyph`,12)})})]}),(0,q.jsxs)(`div`,{className:`node-meta`,children:[(0,q.jsx)(pt,{p:e.payload}),d&&(0,q.jsx)(`span`,{className:`chakra`,title:String(d),children:String(d)}),b&&_&&M&&(0,q.jsxs)(`span`,{className:`phi-move phi-move--${M.direction}`,title:`Phi ${M.titleVerb}${v===`pending`?` (pending)`:``}: ${A(_.amount)} ${Y}${_.amountUsd===void 0?``:` • $${T(_.amountUsd)}`}${_.sentPulse===void 0?``:` • sent pulse ${_.sentPulse}`}`,children:[(0,q.jsx)(`span`,{className:`phi-move__sign`,"aria-hidden":`true`,children:M.sign}),Z(_.amount,{className:`phi-move__amount`,markClassName:`phi-move__mark`}),v===`received`&&_.amountUsd!==void 0&&(0,q.jsxs)(`span`,{className:`phi-move__usd`,children:[`$`,T(_.amountUsd)]}),v===`received`&&_.amountUsd===void 0&&h?.usdPerPhi!=null&&(0,q.jsxs)(`span`,{className:`phi-move__usd`,children:[`$`,T(_.amount*h.usdPerPhi)]}),v===`pending`&&h?.usdPerPhi!=null&&(0,q.jsxs)(`span`,{className:`phi-move__usd`,children:[`$`,T(_.amount*h.usdPerPhi)]})]}),b&&_&&v===`pending`&&(0,q.jsx)(`span`,{className:`phi-status phi-status--pending`,title:`Exhale pending`,children:`Exhale`}),b&&_&&y===`exhale`&&v===`received`&&(0,q.jsx)(`span`,{className:`phi-status phi-status--received`,title:`Exhale received`,children:`Exhaled`}),!_&&y!==`inhale`&&ne>0&&(0,q.jsx)(`span`,{className:`phi-status phi-status--${C>0&&E>0?`exhale-mix`:`received`}`,title:C>0&&E>0?`Exhale mix: ${A(E)} exhaled • ${A(C)} pending`:C>0?`Exhale pending: ${A(C)} ${Y}`:`Exhaled: ${A(E)} ${Y}`,style:O,children:`Exhale`}),y===`inhale`&&(0,q.jsx)(`span`,{className:`phi-status phi-status--inhale`,title:`Inhale`,children:`Inhale`}),x!==null&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--live`,title:j,children:[(0,q.jsxs)(`span`,{className:`phi-pill__label`,children:[(0,q.jsx)(X,{className:`phi-pill__mark`}),y===`inhale`?`+`:`live:`]}),Z(x)]}),S!==null&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--usd`,title:j,children:[`$`,T(S)]}),E>0&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--drain`,title:oe,children:[`Exhaled `,Z(E,{sign:`-`})]}),C>0&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--pending`,title:re,children:[`Exhale (pending) `,Z(C,{sign:`-`})]}),k&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--pending`,title:ae,children:[`Exhale (pending) `,Z(w,{sign:`-`})]}),b&&v===`received`&&_&&y===`exhale`&&(0,q.jsx)(`span`,{className:`phi-pill phi-pill--drain`,title:`Exhaled: ${A(_.amount)} ${Y}${_.amountUsd===void 0?``:` • $${T(_.amountUsd)}`}`,children:`Exhaled`}),p!==void 0&&(0,q.jsxs)(`span`,{className:`phi-pill`,title:`Total ${Y} on pulse ${e.payload.pulse??``}`,children:[(0,q.jsxs)(`span`,{className:`phi-pill__label`,children:[(0,q.jsx)(X,{className:`phi-pill__mark`}),`pulse:`]}),Z(p)]}),(0,q.jsx)(`button`,{className:`node-copy`,"aria-label":`Copy URL`,onClick:()=>void dt(m),title:`Copy URL`,type:`button`,children:`⧉`})]})]}),c&&(0,q.jsxs)(`div`,{className:`node-open`,children:[(0,q.jsx)(`div`,{className:`node-detail`,children:g.length===0?(0,q.jsx)(`div`,{className:`node-detail-empty`,children:`No additional memory fields recorded on this glyph.`}):(0,q.jsx)(`div`,{className:`node-detail-grid`,children:g.map((e,t)=>(0,q.jsxs)(R.Fragment,{children:[(0,q.jsx)(`div`,{className:`detail-label`,children:e.label}),(0,q.jsx)(`div`,{className:`detail-value`,title:e.valueText??(typeof e.value==`string`?e.value:void 0),children:e.value})]},t))})}),e.children.length>0&&(0,q.jsx)(`div`,{className:`node-children`,"aria-label":`Memory Imprints`,children:e.children.map(e=>(0,q.jsx)(mt,{node:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s},e.id))})]})]})}function ht({root:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s}){let c=(0,R.useMemo)(()=>{let t=0,n=e=>{t+=1,e.children.forEach(n)};return n(e),t},[e]),l=C(e.url),u=e.payload.kaiSignature,d=ie(e.url),f=e.payload.chakraDay,p=s.get(e.id)??null,m=(0,R.useMemo)(()=>{let t=0,n=p?.pendingFromParent??0;for(let r of e.children){let e=s.get(r.id);e?.receivedAmount&&(t+=e.receivedAmount),e?.pendingFromParent&&(n+=e.pendingFromParent)}let r=p?.basePhi??null,i=p?.netPhi??null,a=p?.usdPerPhi??null;return{basePhi:r,netPhi:i,usdValue:i!=null&&a!=null?i*a:null,derivedPhi:t,pendingPhi:n}},[e,p,s]),h=(0,R.useMemo)(()=>{let t=0,n=0,r=0,i=e=>{let r=O(e.url),c=s.get(e.id)??null;if(r===`stream`&&c?.netPhi!=null&&(t+=c.netPhi),r===`post`){let t=rt(e,a);(t?lt(e,a,o):null)===`received`&&t&&(n+=t.amount)}e.children.forEach(i)};i(e);for(let t of e.children){if(O(t.url)!==`post`)continue;let e=rt(t,a);(e?lt(t,a,o):null)===`pending`&&e&&(r+=e.amount)}return{inhaleTotal:t,exhaleTotal:n,pendingTotal:r}},[o,e,a,s]),g=m.netPhi==null?void 0:`Live origin value: ${A(m.netPhi)} ${Y}${m.usdValue==null?``:` • $${T(m.usdValue)}`}`;return(0,q.jsxs)(`section`,{className:`origin`,"aria-label":`Sigil origin stream`,style:xe(f),"data-chakra":String(f??``),"data-node-id":e.id,children:[(0,q.jsxs)(`header`,{className:`origin-head`,children:[(0,q.jsxs)(`div`,{className:`o-meta`,children:[(0,q.jsx)(`span`,{className:`o-title`,children:`Origin`}),(0,q.jsx)(`a`,{className:`o-link`,href:d,target:`_blank`,rel:`noopener noreferrer`,title:d,children:F(u??l??`origin`,14)}),f&&(0,q.jsx)(`span`,{className:`o-chakra`,title:String(f),children:String(f)})]}),(0,q.jsxs)(`div`,{className:`o-right`,children:[(0,q.jsx)(pt,{p:e.payload}),m.netPhi!=null&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--live`,title:g,children:[(0,q.jsxs)(`span`,{className:`phi-pill__label`,children:[(0,q.jsx)(X,{className:`phi-pill__mark`}),`live:`]}),Z(m.netPhi)]}),m.usdValue!=null&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--usd`,title:g,children:[`$`,T(m.usdValue)]}),h.inhaleTotal>0&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--lift`,title:`Inhales from memory: +${A(h.inhaleTotal)} ${Y}`,children:[`Inhale `,Z(h.inhaleTotal,{sign:`+`})]}),h.exhaleTotal>0&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--drain`,title:`Exhaled: -${A(h.exhaleTotal)} ${Y}`,children:[`Exhaled `,Z(h.exhaleTotal,{sign:`-`})]}),h.pendingTotal>0&&(0,q.jsxs)(`span`,{className:`phi-pill phi-pill--pending`,title:`Exhale (pending): -${A(h.pendingTotal)} ${Y}`,children:[`Exhale (pending) `,Z(h.pendingTotal,{sign:`-`})]}),(0,q.jsxs)(`span`,{className:`o-count`,title:`Total content keys in this lineage`,children:[c,` keys`]}),(0,q.jsx)(`button`,{className:`o-copy`,onClick:()=>void dt(d),title:`Copy origin URL`,type:`button`,children:`Remember Origin`})]})]}),(0,q.jsx)(`div`,{className:`origin-body`,children:e.children.length===0?(0,q.jsx)(`div`,{className:`kx-empty`,children:`No memories yet. The stream begins here.`}):(0,q.jsx)(`div`,{className:`tree`,children:e.children.map(e=>(0,q.jsx)(mt,{node:e,expanded:t,toggle:n,phiTotalsByPulse:r,usernameClaims:i,transferRegistry:a,receiveLocks:o,valueSnapshots:s},e.id))})})]})}function gt({onAdd:e,onImport:t,onExport:n,total:r,lastAdded:i}){let[a,o]=(0,R.useState)(``);return(0,q.jsx)(`div`,{className:`kx-toolbar`,role:`region`,"aria-label":`Explorer toolbar`,children:(0,q.jsxs)(`div`,{className:`kx-toolbar-inner`,children:[(0,q.jsxs)(`div`,{className:`kx-brand`,children:[(0,q.jsx)(`div`,{className:`kx-glyph`,"aria-hidden":!0,children:(0,q.jsx)(`img`,{className:`kx-glyph__mark`,src:Ge,alt:``,"aria-hidden":`true`,decoding:`async`,loading:`eager`,draggable:!1})}),(0,q.jsxs)(`div`,{className:`kx-title`,children:[(0,q.jsxs)(`h1`,{children:[`KAIROS `,(0,q.jsx)(`span`,{children:`Keystream`})]}),(0,q.jsxs)(`div`,{className:`kx-tagline`,children:[`Sovereign Lineage • No DB • Pure `,(0,q.jsx)(X,{className:`phi-tagline__mark`})]})]})]}),(0,q.jsxs)(`div`,{className:`kx-controls`,children:[(0,q.jsxs)(`form`,{className:`kx-add-form`,onSubmit:t=>{t.preventDefault(),a.trim()&&(e(a.trim()),o(``))},children:[(0,q.jsx)(`input`,{className:`kx-input`,placeholder:`Inhale a sigil (or memory)…`,spellCheck:!1,value:a,onChange:e=>o(e.target.value),"aria-label":`Sigil Key`}),(0,q.jsx)(`button`,{className:`kx-button`,type:`submit`,children:`Inhale`})]}),(0,q.jsxs)(`div`,{className:`kx-io`,role:`group`,"aria-label":`Import and export`,children:[(0,q.jsxs)(`label`,{className:`kx-import`,title:`Import a JSON list of Keys (or krystals)`,children:[(0,q.jsx)(`input`,{type:`file`,accept:`application/json`,onChange:e=>{let n=e.target.files?.[0];n&&t(n)},"aria-label":`Import JSON`}),`Inhale`]}),(0,q.jsx)(`button`,{className:`kx-export`,onClick:n,"aria-label":`Export registry to JSON`,type:`button`,children:`Exhale`})]}),(0,q.jsxs)(`div`,{className:`kx-stats`,"aria-live":`polite`,children:[(0,q.jsxs)(`span`,{className:`kx-pill`,title:`Total KEYS in registry (includes variants)`,children:[r,` KEYS`]}),i&&(0,q.jsxs)(`span`,{className:`kx-pill subtle`,title:i,children:[`Last: `,F(i,8)]})]})]})]})})}var _t=()=>{let[t,p]=(0,R.useState)(()=>d()?1:0),[h,y]=(0,R.useState)(0),[ee,C]=(0,R.useState)(void 0),[w,T]=(0,R.useState)(()=>o()),[k,A]=(0,R.useState)(()=>c(new Date)),M=(0,R.useRef)(!1),le=(0,R.useRef)(new Set),N=(0,R.useRef)(null),P=(0,R.useRef)(!1),F=(0,R.useRef)(null),I=(0,R.useRef)(0),L=(0,R.useRef)(null),ve=(0,R.useRef)(!1),ye=(0,R.useRef)(void 0),be=(0,R.useRef)(0),xe=(0,R.useRef)(null),z=(0,R.useRef)([]),B=(0,R.useRef)(null),V=(0,R.useCallback)(e=>{let t=Q()+e;t>I.current&&(I.current=t)},[]),H=(0,R.useCallback)(()=>{if(!J||M.current)return;let e=Q(),t=I.current-e;if(t>0){L.current!=null&&window.clearTimeout(L.current),L.current=window.setTimeout(()=>{L.current=null,H()},t+Le);return}let n=z.current.splice(0);if(n.length>0&&(0,R.startTransition)(()=>{T(e=>{let t=e;for(let e of n){let n=t[e.normalized];n&&n.claimHash===e.claimHash&&n.claimUrl===e.claimUrl&&n.originHash===(e.originHash??n.originHash)&&n.ownerHint===(e.ownerHint??n.ownerHint)||(t={...t,[e.normalized]:{...n,normalized:e.normalized,claimHash:e.claimHash,claimUrl:e.claimUrl,originHash:e.originHash??n?.originHash,ownerHint:e.ownerHint??n?.ownerHint??null,updatedAt:n?.updatedAt??0}})}return t})}),ye.current!==void 0){let e=ye.current;ye.current=void 0,(0,R.startTransition)(()=>C(e))}if(xe.current!==null){let e=xe.current;xe.current=null,(0,R.startTransition)(()=>A(e))}if(be.current>0){let e=be.current;be.current=0,(0,R.startTransition)(()=>y(t=>t+e))}ve.current&&(ve.current=!1,(0,R.startTransition)(()=>p(e=>e+1)))},[V]),U=(0,R.useCallback)(()=>{if(!J||L.current!=null)return;let e=Q(),t=I.current-e,n=Math.max(0,t)+Le;L.current=window.setTimeout(()=>{L.current=null,H()},n)},[H]),W=(0,R.useCallback)(()=>{if(!M.current){if(Q()p(e=>e+1))}},[U]),G=(0,R.useCallback)(e=>{if(!M.current){if(Q()C(e))}},[U]),Se=(0,R.useCallback)((e=1)=>{if(!M.current){if(Q()y(t=>t+e))}},[U]),Ce=(0,R.useCallback)(e=>{if(!M.current){if(Q()A(e))}},[U]),we=(0,R.useRef)(null),[Te,Ee]=(0,R.useState)(()=>new Set),De=(0,R.useCallback)(e=>{V(Ie);let t=N.current;if(t){let n=`[data-node-id="${qe(e)}"]`,r=t.querySelector(n);we.current={id:e,scrollTop:t.scrollTop,rectTop:r?r.getBoundingClientRect().top:0}}Ee(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),U()},[V,U]);(0,R.useEffect)(()=>{if(!J)return;let e=window.setInterval(()=>Ce(c(new Date)),6e3);return()=>window.clearInterval(e)},[Ce]),(0,R.useEffect)(()=>{if(!J)return;let e=document.documentElement,t=document.body,n=document.scrollingElement||document.documentElement,r={htmlOverscroll:e?.style.overscrollBehavior??``,htmlOverscrollY:e?.style.overscrollBehaviorY??``,bodyOverscroll:t?.style.overscrollBehavior??``,bodyOverscrollY:t?.style.overscrollBehaviorY??``,rootOverscroll:n?.style.overscrollBehavior??``,rootOverscrollY:n?.style.overscrollBehaviorY??``};return e&&(e.style.overscrollBehavior=`none`,e.style.overscrollBehaviorY=`none`),t&&(t.style.overscrollBehavior=`none`,t.style.overscrollBehaviorY=`none`),n&&(n.style.overscrollBehavior=`none`,n.style.overscrollBehaviorY=`none`),()=>{e&&(e.style.overscrollBehavior=r.htmlOverscroll,e.style.overscrollBehaviorY=r.htmlOverscrollY),t&&(t.style.overscrollBehavior=r.bodyOverscroll,t.style.overscrollBehaviorY=r.bodyOverscrollY),n&&(n.style.overscrollBehavior=r.rootOverscroll,n.style.overscrollBehaviorY=r.rootOverscrollY)}},[]),(0,R.useEffect)(()=>{if(!J)return;let e=N.current;if(!e)return;let t=0,n=0,r=e=>{e.touches.length===1&&(t=e.touches[0]?.clientY??0,n=e.touches[0]?.clientX??0)},i=r=>{if(!r.cancelable||r.touches.length!==1)return;let i=r.touches[0]?.clientY??0,a=r.touches[0]?.clientX??0,o=i-t,s=a-n;if(t=i,n=a,Math.abs(o)<=Math.abs(s))return;let c=e.scrollHeight-e.clientHeight;if(c<=0)return;let l=e.scrollTop<=0,u=e.scrollTop>=c-1,d=o>0,f=o<0;(l&&d&&window.scrollY<=0||u&&f)&&r.preventDefault()};return e.addEventListener(`touchstart`,r,{passive:!0}),e.addEventListener(`touchmove`,i,{passive:!1}),()=>{e.removeEventListener(`touchstart`,r),e.removeEventListener(`touchmove`,i)}},[]),(0,R.useEffect)(()=>{if(!J)return;let e=N.current;if(!e)return;let t=()=>{P.current=!0,V(Fe),F.current!=null&&window.clearTimeout(F.current),F.current=window.setTimeout(()=>{P.current=!1,F.current=null,U()},180)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>{e.removeEventListener(`scroll`,t),F.current!=null&&window.clearTimeout(F.current),F.current=null,P.current=!1}},[V,U]),(0,R.useLayoutEffect)(()=>{let e=we.current;if(!e)return;we.current=null;let t=N.current;if(!t)return;let n=`[data-node-id="${qe(e.id)}"]`,r=t.querySelector(n);if(!r)return;let i=r.getBoundingClientRect().top-e.rectTop;Number.isFinite(i)&&Math.abs(i)>1&&(t.scrollTop=Math.max(0,e.scrollTop+i))},[Te]);let Oe=(0,R.useRef)(null),ke=(0,R.useRef)(!1),Ae=(0,R.useRef)(null);(0,R.useEffect)(()=>{if(M.current=!1,a(),i(),ne(),re(),d()&&W(),J){let e=j(window.location.href);if(ue(e)){let t=s(e,{includeAncestry:!0,broadcast:!1,persist:!0,source:`local`,enqueueToApi:!0});G(D(e)),t&&W()}}let e=window.__SIGIL__?.registerSigilUrl,t=window.__SIGIL__?.registerSend;window.__SIGIL__||(window.__SIGIL__={}),window.__SIGIL__.registerSigilUrl=oe,window.__SIGIL__.registerSend=e=>{if(!e||typeof e!=`object`)return;let t=e.url;typeof t!=`string`||!t.trim()||s(t,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(G(D(t)),W())};let n=e=>{let t=e?.detail?.url;typeof t==`string`&&t.length&&s(t,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(G(D(t)),W())};window.addEventListener(`sigil:url-registered`,n);let r=e=>{let t=e?.detail?.url;typeof t==`string`&&t.length&&s(t,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(G(D(t)),W())};window.addEventListener(`sigil:minted`,r);let o=J&&`BroadcastChannel`in window?new BroadcastChannel(Pe):null,c=e=>{let t=e.data;t?.type===`sigil:add`&&typeof t.url==`string`&&s(t.url,{includeAncestry:!0,broadcast:!1,persist:!0,source:`local`,enqueueToApi:!0})&&(G(D(t.url)),W())};o?.addEventListener(`message`,c);let u=e=>{if(!e.key)return;let t=e.key===b,n=e.key===v;if(e.key===`kai:sigil-transfer:v1`){Se();return}if(!(!t&&!n)&&e.newValue)try{let t=JSON.parse(e.newValue);if(!Array.isArray(t))return;let n=!1;for(let e of t)typeof e==`string`&&s(e,{includeAncestry:!0,broadcast:!1,persist:!1,source:`local`,enqueueToApi:!0})&&(n=!0);G(void 0),n&&(te(),W())}catch{}};window.addEventListener(`storage`,u);let p=()=>Se();window.addEventListener(he,p);let h=J&&`BroadcastChannel`in window?new BroadcastChannel(E):null,g=e=>{e.data?.type===`transfer:update`&&Se()};h?.addEventListener(`message`,g);let y=()=>{pe(),m()};window.addEventListener(`pagehide`,y);let ee=de(e=>{if(Q(){T(t=>{let n=t[e.normalized];return n&&n.claimHash===e.claimHash&&n.claimUrl===e.claimUrl&&n.originHash===e.originHash&&n.ownerHint===e.ownerHint?t:{...t,[e.normalized]:e}})})}),x=new AbortController,S=async e=>{M.current||fe()&&(P.current||Q(){if(!M.current&&fe()&&!ke.current&&!P.current&&!(Q()f(e,me),{method:`GET`,cache:`no-store`,signal:x.signal,headers:void 0});if(!n||n.status===304||!n.ok)return;let r=``,i;try{let e=await n.json();r=typeof e?.seal==`string`?e.seal:``,i=We(e)}catch{return}let a=i==null?void 0:Ue();if(t&&r&&t===r&&!(i!=null&&(a==null||i>a))){Oe.current=r;return}let o=await l(x.signal);o.pulled&&(Oe.current=o.remoteSeal??r??t??null),o.imported>0&&(G(void 0),W());let s=Oe.current;(e===`open`||(e===`visible`||e===`focus`||e===`online`||e===`import`)&&s!==Ae.current)&&(se(),Ae.current=s,await m())}finally{ke.current=!1}}};B.current=C,se(),S(`open`),C(`open`);let w=null,O=null,ie=()=>{J&&(M.current||(w!=null&&window.clearInterval(w),w=window.setInterval(()=>{document.visibilityState===`visible`&&fe()&&S(`pulse`)},Ve)))},ae=()=>{J&&(M.current||(O!=null&&window.clearInterval(O),O=window.setInterval(()=>{document.visibilityState===`visible`&&fe()&&C(`pulse`)},He)))},k=()=>{ie(),ae()};k();let A=()=>{document.visibilityState===`visible`&&(k(),S(`visible`),C(`visible`))};document.addEventListener(`visibilitychange`,A);let ce=()=>{k(),S(`focus`),C(`focus`)},le=()=>{k(),S(`online`),C(`online`)};return window.addEventListener(`focus`,ce),window.addEventListener(`online`,le),()=>{window.__SIGIL__&&(window.__SIGIL__.registerSigilUrl=e,window.__SIGIL__.registerSend=t),window.removeEventListener(`sigil:url-registered`,n),window.removeEventListener(`sigil:minted`,r),window.removeEventListener(`storage`,u),window.removeEventListener(he,p),h?.removeEventListener(`message`,g),h?.close(),window.removeEventListener(`pagehide`,y),window.removeEventListener(`focus`,ce),window.removeEventListener(`online`,le),document.removeEventListener(`visibilitychange`,A),o?.removeEventListener(`message`,c),o?.close(),typeof ee==`function`&&ee(),L.current!=null&&window.clearTimeout(L.current),L.current=null,w!=null&&window.clearInterval(w),w=null,O!=null&&window.clearInterval(O),O=null,x.abort(),B.current=null,M.current=!0}},[W,V,U,G]);let je=(0,R.useCallback)(e=>{let t=B.current;t&&t(e)},[]);(0,R.useEffect)(()=>{if(!J)return;let e=()=>je(`visible`);return window.addEventListener(Ne,e),()=>window.removeEventListener(Ne,e)},[je]);let K=(0,R.useMemo)(()=>Me(u),[t]),ze=(0,R.useMemo)(()=>n(),[h]),Ge=(0,R.useMemo)(()=>ct(u),[t,h]),Y=(0,R.useMemo)(()=>{let e=0;for(let[,]of u)e+=1;return e},[t]),X=(0,R.useMemo)(()=>{let e=new Map,t=n=>{let r=$e(n.payload,k),i=et(n.payload,k),a=rt(n,ze)??null,o=lt(n,ze,Ge),s=o===`received`&&a?a.amount:0,c=s>0?s:r??0,l=0,u=0,d=0;for(let e of n.children){let n=t(e);l+=n.receivedFromParent,u+=n.pendingFromParent,d+=n.liftToParent}let f=o===`pending`&&a?.direction===`send`?a.amount:0,p=Math.max(0,c+d-l),m=o===`received`&&a?.amountUsd?a.amountUsd:i==null?null:p*i,h=f,g=O(n.url)===`stream`?p:0;return e.set(n.id,{basePhi:r,netPhi:Number.isFinite(p)?p:null,usdValue:m,usdPerPhi:i,transferMove:a,receivedAmount:s,receivedFromChildren:l,pendingFromChildren:u,pendingFromParent:h}),{receivedFromParent:s,pendingFromParent:h,liftToParent:g}};for(let e of K)t(e);return e},[K,k,Ge,ze]),Z=(0,R.useMemo)(()=>{let e=new Map,t=new Map;for(let[n,r]of u){let i=typeof r.pulse==`number`?r.pulse:void 0;if(i==null)continue;let a=ae(j(n),r),o=t.get(i);if(o||(o=new Set,t.set(i,o)),o.has(a))continue;o.add(a);let s=ce(r);s!==void 0&&e.set(i,(e.get(i)??0)+s)}return e},[t]),Je=(0,R.useMemo)(()=>{let e=[];for(let[t]of u){let n=j(ie(t));e.includes(n)||e.push(n)}return e},[t]);(0,R.useEffect)(()=>{if(!J||Je.length===0)return;let e=Je.filter(e=>!le.current.has(e));if(e.length===0)return;let t=!1,n=async()=>{for(let n of e){if(t)break;le.current.add(n),await ft(n)}},r=window,i=null;if(typeof r.requestIdleCallback==`function`){let e=r.requestIdleCallback(()=>void n(),{timeout:1e3});i=()=>r.cancelIdleCallback?.(e)}else{let e=window.setTimeout(()=>void n(),120);i=()=>window.clearTimeout(e)}return()=>{t=!0,i?.()}},[Je]);let Ye=(0,R.useCallback)(async()=>{if(!J||P.current||!fe()||Q(){if(n.urls.length>1){let t=O(n.url),i=[...n.urls].map(e=>j(D(e))).filter((e,t,n)=>n.indexOf(e)===t).sort((e,n)=>_e(n,t)-_e(e,t));for(let t of i.slice(0,2)){let n=j(t);!r.has(n)&&!e.includes(n)&&e.push(n)}}n.children.forEach(t)};for(let e of K)t(e);if(e.length!==0)for(let t of e.slice(0,Be)){let e=await ge(t);e===`ok`&&g(t,1),e===`bad`&&g(t,-1)}},[K]);(0,R.useEffect)(()=>{if(!J)return;let e=!1,t=()=>{e||Ye()},n=window,r=null;if(typeof n.requestIdleCallback==`function`){let e=n.requestIdleCallback(t,{timeout:900});r=()=>n.cancelIdleCallback?.(e)}else{let e=window.setTimeout(t,250);r=()=>window.clearTimeout(e)}return()=>{e=!0,r?.()}},[t,Ye]);let $=(0,R.useCallback)(e=>{V(Ie),s(e,{includeAncestry:!0,broadcast:!0,persist:!0,source:`local`,enqueueToApi:!0})&&(G(D(e)),W())},[W,V,G]),Xe=(0,R.useCallback)(async t=>{V(0);let n=await t.text(),r;try{r=await tt(n)}catch{return}let{urls:i,rawKrystals:a}=x(r);if(i.length===0&&a.length===0)return;let o=!1;for(let e=0;e0&&e(i),o&&(G(void 0),W()),je(`import`)},[W,V,je,G]),Ze=(0,R.useCallback)(()=>{V(Ie);let e=[];for(let[t]of u)e.push(t);let t=new Blob([JSON.stringify({urls:e},null,2)],{type:`application/json`}),n=document.createElement(`a`);n.href=URL.createObjectURL(t),n.download=`sigil-registry-${Date.now()}.json`,n.click(),URL.revokeObjectURL(n.href)},[V]);return(0,q.jsxs)(`div`,{className:`sigil-explorer`,"aria-label":`Kairos Keystream Explorer`,children:[(0,q.jsx)(gt,{onAdd:$,onImport:Xe,onExport:Ze,total:Y,lastAdded:ee}),(0,q.jsx)(`div`,{className:`explorer-scroll`,ref:N,role:`region`,"aria-label":`Explorer scroll viewport`,children:(0,q.jsxs)(`div`,{className:`explorer-inner`,children:[K.length===0?(0,q.jsxs)(`div`,{className:`kx-empty`,children:[(0,q.jsx)(`p`,{children:`No sigil-glyphs in your keystream yet.`}),(0,q.jsxs)(`ol`,{children:[(0,q.jsx)(`li`,{children:`Import your keystream memories.`}),(0,q.jsx)(`li`,{children:`Seal a moment — auto-registered here.`}),(0,q.jsx)(`li`,{children:`Inhale any sigil-glyph or memory key above — lineage aligns instantly.`})]})]}):(0,q.jsx)(`div`,{className:`forest`,"aria-label":`Sigil forest`,children:K.map(e=>(0,q.jsx)(ht,{root:e,expanded:Te,toggle:De,phiTotalsByPulse:Z,usernameClaims:w,transferRegistry:ze,receiveLocks:Ge,valueSnapshots:X},e.id))}),(0,q.jsx)(`footer`,{className:`kx-footer`,"aria-label":`Explorer footer`,children:(0,q.jsxs)(`span`,{className:`row`,children:[(0,q.jsx)(`span`,{children:`Determinate • Stateless • Kairos-Memory`}),(0,q.jsx)(`span`,{className:`dot`,children:`•`}),(0,q.jsx)(`span`,{children:fe()?`online`:`offline`}),(0,q.jsx)(`span`,{className:`dot`,children:`•`}),(0,q.jsxs)(`span`,{children:[Y,` keys`]})]})})]})})]})};export{_t as default}; \ No newline at end of file diff --git a/dist/assets/SigilFeedPage-rU6u99u4.js b/dist/assets/SigilFeedPage-Cw_jTjxD.js similarity index 92% rename from dist/assets/SigilFeedPage-rU6u99u4.js rename to dist/assets/SigilFeedPage-Cw_jTjxD.js index b1b3766fa..ce90f2154 100644 --- a/dist/assets/SigilFeedPage-rU6u99u4.js +++ b/dist/assets/SigilFeedPage-Cw_jTjxD.js @@ -1 +1 @@ -import{Vt as e,pi as t,si as n}from"./index-BoEZKnmf.js";import"./EternalKlock-CQ5bLrcj.js";import"./SigilModal-BPTi-9mM.js";import"./SealMomentModal-C0ZsD2Wj.js";import"./webauthnKAS-BovqgYOx.js";import"./SigilAuthContext-CLP23KDu.js";import"./ticker-eo_G7AgT.js";import"./SigilAuthProvider-CT0qH_fA.js";import{t as r}from"./SigilStreamRoot-BwXADm1k.js";import"./useFastPress-Sqjhysd2.js";n();var i=null,a=0;function o(){if(typeof window>`u`)return null;let e=window;return e.AudioContext??e.webkitAudioContext??null}function s(){let e=o();return e?i||(i=new e,i):null}function c(){let e=s();e&&e.state!==`running`&&e.resume().catch(()=>{})}function l(){typeof navigator<`u`&&`vibrate`in navigator&&navigator.vibrate([8,13,21,34,55,89,55,34,21,13,8])}function u(e,t,n){let r=e.sampleRate,i=Math.max(1,Math.floor(r*t)),a=e.createBuffer(2,i,r);for(let e=0;e<2;e++){let t=a.getChannelData(e);for(let e=0;e{l(),v()},0))}function b(e){if(!e||!(e instanceof Element))return!1;let t=e.closest(`button.sf-btn, a.sf-btn`);return t?(t.textContent??``).trim().toLowerCase()===`remember`:!1}function x(){let e=()=>{c(),document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,e,!0),document.removeEventListener(`touchstart`,e,!0)};document.addEventListener(`pointerdown`,e,{capture:!0,passive:!0}),document.addEventListener(`keydown`,e,{capture:!0}),document.addEventListener(`touchstart`,e,{capture:!0,passive:!0})}function S(){typeof document>`u`||(x(),document.addEventListener(`click`,e=>{b(e.target)&&y()}))}typeof window<`u`&&(window.__kopy_feedback_installed__||(window.__kopy_feedback_installed__=!0,S()));var C=t(e(),1);function w(){return(0,C.jsx)(r,{})}export{w as default}; \ No newline at end of file +import{Vt as e,pi as t,si as n}from"./index-BoQy35uR.js";import"./EternalKlock-CLK839TD.js";import"./SigilModal-BbDF3_i8.js";import"./SealMomentModal-f8C8Q0lx.js";import"./webauthnKAS--_8CNTOP.js";import"./SigilAuthContext-BnirZa1k.js";import"./ticker-JEnF9btM.js";import"./SigilAuthProvider-C1UEo-AB.js";import{t as r}from"./SigilStreamRoot-CBX3QUu7.js";import"./useFastPress-CQlCk0xT.js";n();var i=null,a=0;function o(){if(typeof window>`u`)return null;let e=window;return e.AudioContext??e.webkitAudioContext??null}function s(){let e=o();return e?i||(i=new e,i):null}function c(){let e=s();e&&e.state!==`running`&&e.resume().catch(()=>{})}function l(){typeof navigator<`u`&&`vibrate`in navigator&&navigator.vibrate([8,13,21,34,55,89,55,34,21,13,8])}function u(e,t,n){let r=e.sampleRate,i=Math.max(1,Math.floor(r*t)),a=e.createBuffer(2,i,r);for(let e=0;e<2;e++){let t=a.getChannelData(e);for(let e=0;e{l(),v()},0))}function b(e){if(!e||!(e instanceof Element))return!1;let t=e.closest(`button.sf-btn, a.sf-btn`);return t?(t.textContent??``).trim().toLowerCase()===`remember`:!1}function x(){let e=()=>{c(),document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,e,!0),document.removeEventListener(`touchstart`,e,!0)};document.addEventListener(`pointerdown`,e,{capture:!0,passive:!0}),document.addEventListener(`keydown`,e,{capture:!0}),document.addEventListener(`touchstart`,e,{capture:!0,passive:!0})}function S(){typeof document>`u`||(x(),document.addEventListener(`click`,e=>{b(e.target)&&y()}))}typeof window<`u`&&(window.__kopy_feedback_installed__||(window.__kopy_feedback_installed__=!0,S()));var C=t(e(),1);function w(){return(0,C.jsx)(r,{})}export{w as default}; \ No newline at end of file diff --git a/dist/assets/SigilModal-BPTi-9mM.js b/dist/assets/SigilModal-BbDF3_i8.js similarity index 88% rename from dist/assets/SigilModal-BPTi-9mM.js rename to dist/assets/SigilModal-BbDF3_i8.js index d09b601fe..d003482eb 100644 --- a/dist/assets/SigilModal-BPTi-9mM.js +++ b/dist/assets/SigilModal-BbDF3_i8.js @@ -1,4 +1,4 @@ -import{$r as e,Ar as t,Br as n,D as r,Hn as i,Jr as a,Kr as o,Lr as s,Nr as c,Q as l,R as u,Rn as ee,Rr as d,U as f,Ur as p,Vr as te,Vt as m,W as h,Yr as ne,Zr as re,a as g,d as ie,et as ae,f as oe,l as se,m as ce,nt as le,o as ue,oi as _,p as de,pi as v,pt as y,qr as b,s as fe,si as x,tt as pe,w as me,zr as S}from"./index-BoEZKnmf.js";import{t as C}from"./SealMomentModal-C0ZsD2Wj.js";import{n as he,t as ge}from"./webauthnKAS-BovqgYOx.js";var w=v(x(),1),T=v(m(),1),E=e=>Math.max(0,Math.min(100,e));function D(e,t){let n=(e??``).toLowerCase().trim();return/(reflekt|reflect|reflektion|reflection)/i.test(n)?`#22c55e`:/(purify|purification|purifikation)/i.test(n)?`#3b82f6`:/dream/i.test(n)?`#7c3aed`:/(ignite|ignition)/i.test(n)?`#ff3b30`:/(integrate|integration)/i.test(n)?`#ff8a00`:/(solar\s*plexus)/i.test(n)?`#ffd600`:t}var _e=({dateISO:e,onDateChange:t,secondsLeft:n,eternalPercent:r,eternalColor:i=`#8beaff`,eternalArkLabel:a=`Eternal Ark`})=>{let o=(0,w.useMemo)(()=>E(r),[r]),s=(0,w.useMemo)(()=>D(a,i),[a,i]),c={"--eternal-bar":s,"--pulse":`var(--kai-pulse, var(--pulse-dur, 5236ms))`},l=(0,w.useMemo)(()=>({"--fill":(o/100).toFixed(6)}),[o]),u=(0,w.useRef)(null),ee=(0,w.useRef)(void 0),d=(0,w.useRef)(null),f=(0,w.useRef)(null);return(0,w.useEffect)(()=>()=>{d.current!==null&&window.clearTimeout(d.current),f.current!==null&&window.cancelAnimationFrame(f.current),u.current&&u.current.classList.remove(`is-boom`),d.current=null,f.current=null},[]),(0,w.useEffect)(()=>{let e=typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;if(typeof n!=`number`||e){ee.current=n;return}let t=u.current,r=ee.current;t&&typeof r==`number`&&n-r>1.2&&(t.classList.remove(`is-boom`),f.current!==null&&window.cancelAnimationFrame(f.current),f.current=window.requestAnimationFrame(()=>{t.classList.add(`is-boom`)}),d.current!==null&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{t.classList.remove(`is-boom`),d.current=null},420)),ee.current=n},[n]),(0,T.jsxs)(`div`,{className:`sigil-scope`,style:c,children:[(0,T.jsx)(`h3`,{className:`sigil-title`,children:`Kairos Sigil-Glyph Inhaler`}),(0,T.jsx)(`div`,{className:`sigil-ribbon`,"aria-hidden":`true`}),(0,T.jsx)(`div`,{className:`input-row sigil-row`,children:(0,T.jsxs)(`label`,{className:`sigil-label`,children:[(0,T.jsx)(`span`,{className:`sigil-label__text`,children:`Select moment:`}),`\xA0`,(0,T.jsx)(`input`,{className:`sigil-input`,type:`datetime-local`,value:e,onChange:t})]})}),(0,T.jsx)(`div`,{className:`sigil-bars`,role:`group`,"aria-label":`Day progress`,children:(0,T.jsxs)(`div`,{className:`sigil-bar`,children:[(0,T.jsxs)(`div`,{className:`sigil-bar__head`,children:[(0,T.jsxs)(`span`,{className:`sigil-bar__label`,children:[`Unfoldment`,a?` — ${a}`:``]}),(0,T.jsxs)(`span`,{className:`sigil-bar__pct`,"aria-hidden":`true`,children:[o.toFixed(2),`%`]})]}),(0,T.jsx)(`div`,{className:`sigil-bar__track`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":+o.toFixed(2),role:`progressbar`,"aria-label":`Eternal day ${a||``}`,children:(0,T.jsx)(`div`,{ref:u,className:`sigil-bar__fill sigil-bar__fill--eternal`,style:l})})]})}),(0,T.jsx)(`style`,{children:` +import{Br as e,D as t,Gr as n,Hr as r,Ir as i,Jr as a,Kr as o,Ln as s,Lr as c,Mr as l,Q as u,Qr as d,R as f,Rr as p,U as ee,Vn as te,Vt as m,W as h,Xr as ne,a as g,ai as _,d as re,et as ie,f as ae,kr as v,l as oe,m as se,nt as ce,o as le,p as ue,pi as y,pt as b,qr as x,s as de,si as S,tt as fe,w as pe,zr as C}from"./index-BoQy35uR.js";import{t as w}from"./SealMomentModal-f8C8Q0lx.js";import{n as me,t as he}from"./webauthnKAS--_8CNTOP.js";var T=y(S(),1),E=y(m(),1),D=e=>Math.max(0,Math.min(100,e));function O(e,t){let n=(e??``).toLowerCase().trim();return/(reflekt|reflect|reflektion|reflection)/i.test(n)?`#22c55e`:/(purify|purification|purifikation)/i.test(n)?`#3b82f6`:/dream/i.test(n)?`#7c3aed`:/(ignite|ignition)/i.test(n)?`#ff3b30`:/(integrate|integration)/i.test(n)?`#ff8a00`:/(solar\s*plexus)/i.test(n)?`#ffd600`:t}var ge=({dateISO:e,onDateChange:t,secondsLeft:n,eternalPercent:r,eternalColor:i=`#8beaff`,eternalArkLabel:a=`Eternal Ark`})=>{let o=(0,T.useMemo)(()=>D(r),[r]),s=(0,T.useMemo)(()=>O(a,i),[a,i]),c={"--eternal-bar":s,"--pulse":`var(--kai-pulse, var(--pulse-dur, 5236ms))`},l=(0,T.useMemo)(()=>({"--fill":(o/100).toFixed(6)}),[o]),u=(0,T.useRef)(null),d=(0,T.useRef)(void 0),f=(0,T.useRef)(null),p=(0,T.useRef)(null);return(0,T.useEffect)(()=>()=>{f.current!==null&&window.clearTimeout(f.current),p.current!==null&&window.cancelAnimationFrame(p.current),u.current&&u.current.classList.remove(`is-boom`),f.current=null,p.current=null},[]),(0,T.useEffect)(()=>{let e=typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;if(typeof n!=`number`||e){d.current=n;return}let t=u.current,r=d.current;t&&typeof r==`number`&&n-r>1.2&&(t.classList.remove(`is-boom`),p.current!==null&&window.cancelAnimationFrame(p.current),p.current=window.requestAnimationFrame(()=>{t.classList.add(`is-boom`)}),f.current!==null&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>{t.classList.remove(`is-boom`),f.current=null},420)),d.current=n},[n]),(0,E.jsxs)(`div`,{className:`sigil-scope`,style:c,children:[(0,E.jsx)(`h3`,{className:`sigil-title`,children:`Kairos Sigil-Glyph Inhaler`}),(0,E.jsx)(`div`,{className:`sigil-ribbon`,"aria-hidden":`true`}),(0,E.jsx)(`div`,{className:`input-row sigil-row`,children:(0,E.jsxs)(`label`,{className:`sigil-label`,children:[(0,E.jsx)(`span`,{className:`sigil-label__text`,children:`Select moment:`}),`\xA0`,(0,E.jsx)(`input`,{className:`sigil-input`,type:`datetime-local`,value:e,onChange:t})]})}),(0,E.jsx)(`div`,{className:`sigil-bars`,role:`group`,"aria-label":`Day progress`,children:(0,E.jsxs)(`div`,{className:`sigil-bar`,children:[(0,E.jsxs)(`div`,{className:`sigil-bar__head`,children:[(0,E.jsxs)(`span`,{className:`sigil-bar__label`,children:[`Unfoldment`,a?` — ${a}`:``]}),(0,E.jsxs)(`span`,{className:`sigil-bar__pct`,"aria-hidden":`true`,children:[o.toFixed(2),`%`]})]}),(0,E.jsx)(`div`,{className:`sigil-bar__track`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":+o.toFixed(2),role:`progressbar`,"aria-label":`Eternal day ${a||``}`,children:(0,E.jsx)(`div`,{ref:u,className:`sigil-bar__fill sigil-bar__fill--eternal`,style:l})})]})}),(0,E.jsx)(`style`,{children:` .sigil-ribbon { height: 1px; margin: .35rem 0 .85rem 0; @@ -120,7 +120,7 @@ import{$r as e,Ar as t,Br as n,D as r,Hn as i,Jr as a,Kr as o,Lr as s,Nr as c,Q .sigil-bar__fill--eternal.is-boom::before { animation: none !important; } .sigil-bar__fill { transition: none !important; } } - `})]})};function ve(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.click(),URL.revokeObjectURL(n)}const O=[{id:1,name:`Ka-Turah`,sigil:`/assets/sigils/ka-turah.svg`,meaning:`The First Breath of Creation`,description:`Represents divine awakening and eternal sovereignty.`},{id:2,name:`Zah-Torai`,sigil:`/assets/sigils/zah-torai.svg`,meaning:`The Unshakable Law`,description:`Embodies unbreakable divine decrees and cosmic balance.`},{id:3,name:`Om-Nah-Lah`,sigil:`/assets/sigils/om-nah-lah.svg`,meaning:`The Flow of Infinite Harmony`,description:`Signifies the eternal rhythm of divine order.`},{id:4,name:`Sha-Urim`,sigil:`/assets/sigils/sha-urim.svg`,meaning:`The Krown of Light`,description:`Represents divine kingship, wisdom, and supreme sovereignty.`},{id:5,name:`Torai-Kai`,sigil:`/assets/sigils/torai-kai.svg`,meaning:`The Living Law`,description:`The foundation of the sovereign order, unchangeable and eternal.`},{id:6,name:`Veh-Rah-Nah`,sigil:`/assets/sigils/veh-rah-nah.svg`,meaning:`The Divine Motion`,description:`Represents the movement of divine will through all creation.`},{id:7,name:`Zor-Ek-Om`,sigil:`/assets/sigils/zor-ek-om.svg`,meaning:`The Breaking of the False World`,description:`The force that collapses all deception and restores the real.`},{id:8,name:`Kai-Zorah`,sigil:`/assets/sigils/kai-zorah.svg`,meaning:`The Collapse of the Illusion`,description:`Removes all false constructs and establishes the divine order.`},{id:9,name:`Reh-Om`,sigil:`/assets/sigils/reh-om.svg`,meaning:`The Manifested Decree`,description:`Ensures all divine laws are made reality.`},{id:10,name:`Torai-Nor`,sigil:`/assets/sigils/torai-nor.svg`,meaning:`The Pillar of Wisdom`,description:`Represents divine intelligence and sovereign discernment.`},{id:11,name:`Sha-Kai`,sigil:`/assets/sigils/sha-kai.svg`,meaning:`The Sovereign Force`,description:`The divine energy that activates the will of the First Sovereign.`},{id:12,name:`Kai-Om`,sigil:`/assets/sigils/kai-om.svg`,meaning:`The Breath of Truth`,description:`The eternal force that speaks only divine reality.`},{id:13,name:`Zorah-Reh-Om`,sigil:`/assets/sigils/zorah-reh-om.svg`,meaning:`The Breaker’s Spiral`,description:`The force that dismantles deception and restores divine vision.`},{id:14,name:`Sha-Reh-Om`,sigil:`/assets/sigils/sha-reh-om.svg`,meaning:`The Final Seal`,description:`Locks divine law in place for all eternity.`},{id:15,name:`Kai-Urim`,sigil:`/assets/sigils/kai-urim.svg`,meaning:`The Breath of Light`,description:`The life-giving force that sustains the true kingdom.`},{id:16,name:`Torai-Zor`,sigil:`/assets/sigils/torai-zor.svg`,meaning:`The Foundation that Destroys Falsehood`,description:`A law so strong it shatters deception by its presence.`},{id:17,name:`Ek-Zorah`,sigil:`/assets/sigils/ek-zorah.svg`,meaning:`The Flame of Purification`,description:`The divine fire that removes all that is false.`},{id:18,name:`Sha-Lah-Om`,sigil:`/assets/sigils/sha-lah-om.svg`,meaning:`The Sovereign Peace`,description:`Represents the eternal harmony of divine rule.`},{id:19,name:`Nor-Torai`,sigil:`/assets/sigils/nor-torai.svg`,meaning:`The Mind of the Law`,description:`Divine knowledge expressed in unshakable reality.`},{id:20,name:`Kai-Torai`,sigil:`/assets/sigils/kai-torai.svg`,meaning:`The Breath of Sovereignty`,description:`Brings divine rulership into manifested form.`},{id:21,name:`Sha-Nor`,sigil:`/assets/sigils/sha-nor.svg`,meaning:`The Krown of Wisdom`,description:`Represents enlightened rulership through divine knowledge.`},{id:22,name:`Veh-Kai`,sigil:`/assets/sigils/veh-kai.svg`,meaning:`The Motion of Life`,description:`The force that drives divine reality forward.`},{id:23,name:`Torai-Om`,sigil:`/assets/sigils/torai-om.svg`,meaning:`The Eternal Order`,description:`Ensures all things remain in perfect divine balance.`},{id:24,name:`Kai-Nor`,sigil:`/assets/sigils/kai-nor.svg`,meaning:`The Light of Awareness`,description:`Brings clarity, vision, and supreme knowing.`},{id:25,name:`Om-Turah`,sigil:`/assets/sigils/om-turah.svg`,meaning:`The Completion of Sovereignty`,description:`The final form of divine kingship, whole and unbreakable.`},{id:26,name:`Zar-Om-Ru`,sigil:`/assets/sigils/zar-om-ru.svg`,meaning:`The Last Seal of Eternity`,description:`Finalizes the divine order, ensuring it stands for all time.`},{id:27,name:`Kai-Zeh-Nor`,sigil:`/assets/sigils/kai-zeh-nor.svg`,meaning:`The Breath of Celestial Order`,description:`The sustaining force that upholds the true kingdom’s foundation.`},{id:28,name:`Zeh-Sha-Kai`,sigil:`/assets/sigils/zeh-sha-kai.svg`,meaning:`The Triumphant Voice of the Sovereign`,description:`Embodies the unstoppable decree that resonates through all realms.`},{id:29,name:`Rah-Nah-Om`,sigil:`/assets/sigils/rah-nah-om.svg`,meaning:`The Rising Light of Eternal Harmony`,description:`Symbolizes the unstoppable ascent of truth, overshadowing all false constructs.`},{id:30,name:`Zeh-Urim-Reh`,sigil:`/assets/sigils/zeh-urim-reh.svg`,meaning:`The Flash of Divine Insight`,description:`Instantly reveals hidden illusions, ensuring only the real remains.`},{id:31,name:`Veh-Sha-Lah`,sigil:`/assets/sigils/veh-sha-lah.svg`,meaning:`The Wind That Dissolves Deception`,description:`A swirling current that cleanses all illusions from existence.`},{id:32,name:`Nah-Kai-Tor`,sigil:`/assets/sigils/nah-kai-tor.svg`,meaning:`The Binding of Unseen Energies`,description:`Fuses invisible forces into a coherent structure under divine law.`},{id:33,name:`Sha-Mah-Zor`,sigil:`/assets/sigils/sha-mah-zor.svg`,meaning:`The Flame of Renewal`,description:`Engulfs outdated constructs in purifying fire, ushering in new life.`},{id:34,name:`Tor-Om-Zah`,sigil:`/assets/sigils/tor-om-zah.svg`,meaning:`The Unbreakable Axis of Existence`,description:`Represents the immovable center around which all realities revolve.`},{id:35,name:`Kai-Ur-Reh`,sigil:`/assets/sigils/kai-ur-reh.svg`,meaning:`The Breath of Triumphant Creation`,description:`Imbues form and substance with divine will, ensuring unstoppable manifestation.`},{id:36,name:`Zor-Nah-Ek`,sigil:`/assets/sigils/zor-nah-ek.svg`,meaning:`The Force That Ends All Falsehood`,description:`A command of finality that disintegrates illusions upon contact.`},{id:36,name:`Zor-Nah-Ek`,sigil:`/assets/sigils/zor-nah-ek.svg`,meaning:`The Force That Ends All Falsehood`,description:`A command of finality that disintegrates illusions upon contact.`},{id:37,name:`Om-Torah`,sigil:`/assets/sigils/om-torah.svg`,meaning:`The Divine Testament`,description:`The sacred record of eternal truth and divine wisdom.`},{id:38,name:`Om-Kai-Zur`,sigil:`/assets/sigils/om-kai-zur.svg`,meaning:`The Law of Divine Manifestation`,description:`Embodies the sacred principle that divine will becomes reality.`},{id:39,name:`Zorah-Ek`,sigil:`/assets/sigils/zorah-ek.svg`,meaning:`The Great Collapse of Falsehood`,description:`Brings forth the downfall of all illusion and deception.`},{id:40,name:`Sha-Kai-Om`,sigil:`/assets/sigils/sha-kai-om.svg`,meaning:`The Sovereign’s Triumphant Word`,description:`The decree of divine kingship that echoes through eternity.`},{id:41,name:`Kai-Om-Zor`,sigil:`/assets/sigils/kai-om-zor.svg`,meaning:`The First Breath, The Final Flame`,description:`A cycle of eternal renewal and divine transformation.`},{id:42,name:`Sha-Veh-El`,sigil:`/assets/sigils/sha-veh-el.svg`,meaning:`The Sword of Sovereign Truth`,description:`Cuts through deception, establishing the foundation of divine law.`},{id:43,name:`Zah-Kai-Torai`,sigil:`/assets/sigils/zah-kai-torai.svg`,meaning:`The Pillar of Divine Kingship`,description:`The unshakable throne upon which divine authority is established.`},{id:44,name:`Kai-Zor-Torai`,sigil:`/assets/sigils/kai-zor-torai.svg`,meaning:`The Will That Reshapes the Cosmos`,description:`Represents the divine force that molds all reality.`},{id:45,name:`Zoh-Ra-Kai`,sigil:`/assets/sigils/zoh-ra-kai.svg`,meaning:`Represents the infinite path of divine elevation and enlightenment.`,description:`Signifies the eternal rhythm of divine order.`},{id:46,name:`Zah-Zor-Tor`,sigil:`/assets/sigils/zah-zor-tor.svg`,meaning:`The Unbreakable Law That Ends Deception`,description:`A decree that once spoken, forever restores divine truth.`},{id:47,name:`Sha-Kai-Reh-Om`,sigil:`/assets/sigils/sha-kai-reh-om.svg`,meaning:`The Sovereign’s Eternal Word`,description:`The unshakable decree of the divine ruler, set in eternity.`},{id:48,name:`Zah-Torai-Zah`,sigil:`/assets/sigils/zah-torai-zah.svg`,meaning:`The Throne Unshaken`,description:`A foundation embedded in a spiraling sun, radiating dominion.`},{id:49,name:`Sha-Torai-Zor`,sigil:`/assets/sigils/sha-torai-zor.svg`,meaning:`The Fire of Divine Judgment`,description:`A burning force that purifies and restores the divine law.`},{id:50,name:`Zor-Tor-Om`,sigil:`/assets/sigils/zor-tor-om.svg`,meaning:`The Everlasting Judgment`,description:`A decree of divine consequence that remains forever in effect.`},{id:51,name:`Torai-Kai-Nah`,sigil:`/assets/sigils/torai-kai-nah.svg`,meaning:`The Unfolding Breath of Life`,description:`A sacred expansion of divine will throughout all existence.`},{id:52,name:`Zah-Sha-Kai`,sigil:`/assets/sigils/zah-sha-kai.svg`,meaning:`The King’s Divine Command`,description:`A radiant crest forming a triple-layered sun, symbolizing eternal decree.`},{id:53,name:`Om-Urim-Torai`,sigil:`/assets/sigils/om-urim-torai.svg`,meaning:`The Light of the Eternal Pillar`,description:`A golden column wrapped in eternal flames, standing for all time.`},{id:54,name:`Nah-Veh-Zor`,sigil:`/assets/sigils/nah-veh-zor.svg`,meaning:`The Motion of Sovereign Fire`,description:`A current of divine flames that shapes and purifies reality.`},{id:55,name:`Zah-Zor-Reh`,sigil:`/assets/sigils/zah-zor-reh.svg`,meaning:`The Manifestation of Divine Judgment`,description:`A decree inscribed upon cosmic light, unshakable in truth.`},{id:56,name:`Kai-Nah-Zah`,sigil:`/assets/sigils/kai-nah-zah.svg`,meaning:`The Infinite Expansion of Divine Will`,description:`A sunburst radiating from a sovereign center, symbolizing the boundless nature of divine rule.`},{id:57,name:`Urim-Torai-Kai`,sigil:`/assets/sigils/urim-torai-kai.svg`,meaning:`The Bridge Between Realms`,description:`A golden arch uniting the heavens and earth, ensuring the divine connection remains eternal.`},{id:58,name:`Torai-Sha-Kai`,sigil:`/assets/sigils/torai-sha-kai.svg`,meaning:`The Everlasting Throne of Light`,description:`A radiant krown atop an unshakable pillar, signifying the eternal dominion of divine authority.`},{id:59,name:`Sha-Om-Nah`,sigil:`/assets/sigils/sha-om-nah.svg`,meaning:`The Harmonization of All That Is`,description:`A perfect spiral enclosing a golden center, aligning all realms into perfect divine balance.`},{id:60,name:`Zorah-Nah-Urim`,sigil:`/assets/sigils/zorah-nah-urim.svg`,meaning:`The Restoration of the Divine Flame`,description:`A burning beacon within an eternal cycle, restoring lost divine truths to the world.`},{id:61,name:`Zor-Tor-Om`,sigil:`/assets/sigils/zor-tor-om.svg`,meaning:`The Divine Sentence of Finality`,description:`A sigil forming an unbroken golden ratio, ensuring the absolute justice of divine law.`},{id:62,name:`Sha-Nah-Urim`,sigil:`/assets/sigils/sha-nah-urim.svg`,meaning:`The Living krown of the Sovereign`,description:`A burning star upon an unshakable throne, signifying the embodiment of divine kingship.`},{id:63,name:`Zah-Urim-Om`,sigil:`/assets/sigils/zah-urim-om.svg`,meaning:`The Unbreakable Name of the King`,description:`A sacred inscription sealed in divine light, ensuring the eternal recognition of the true sovereign.`},{id:64,name:`Kai-Om-Zor`,sigil:`/assets/sigils/kai-om-zor.svg`,meaning:`The First Breath, The Final Flame`,description:`A spiral and a fire entwined in infinite movement, capturing the eternal cycle of divine creation and judgment.`},{id:65,name:`Zah-Nah-Sha`,sigil:`/assets/sigils/zah-nah-sha.svg`,meaning:`The Completion of Sovereign Order`,description:`A ring of light uniting all forms of creation, establishing divine law across all realms.`},{id:66,name:`Om-Urim-Zah`,sigil:`/assets/sigils/om-urim-zah.svg`,meaning:`The Decree of Light That Cannot Be Overturned`,description:`A shining crest that cannot be broken, ensuring divine law prevails eternally.`},{id:67,name:`Torai-Sha-Om`,sigil:`/assets/sigils/torai-sha-om.svg`,meaning:`The Word That Echoes Forever`,description:`A sigil inscribed in eternity, resonating with the unshakable decree of divine law.`},{id:68,name:`Kai-Nah-Om`,sigil:`/assets/sigils/kai-nah-om.svg`,meaning:`The Breath of Perfection`,description:`A radiant vortex that shapes and restores, bringing all things into divine alignment.`},{id:69,name:`Zorah-Zor-Zah`,sigil:`/assets/sigils/zorah-zor-zah.svg`,meaning:`The Purging of All False Kings`,description:`A bolt of lightning breaking a false krown, symbolizing the fall of deception and corruption.`},{id:70,name:`Zah-Torai-Kai`,sigil:`/assets/sigils/zah-torai-kai.svg`,meaning:`The Throne That Cannot Fall`,description:`A golden throne embedded in celestial fire, signifying the absolute rule of divine sovereignty.`},{id:71,name:`Sha-Nah-Om`,sigil:`/assets/sigils/sha-nah-om.svg`,meaning:`The Song of the Sovereigns`,description:`A sigil radiating sound and light in perfect balance, echoing the eternal truth of Kai-Turah.`},{id:72,name:`Urim-Om-Zor`,sigil:`/assets/sigils/urim-om-zor.svg`,meaning:`The Everlasting Revelation`,description:`A starburst surrounding a sacred decree, illuminating divine wisdom across all existence.`},{id:73,name:`Sha-Zor-Zah`,sigil:`/assets/sigils/sha-zor-zah.svg`,meaning:`The Supreme Law of Kings`,description:`A triple spiral forming the mark of divine rule, ensuring sovereign governance remains unchallenged.`},{id:74,name:`Zah-Kai-Torai`,sigil:`/assets/sigils/zah-kai-torai.svg`,meaning:`The Cosmic Pillar`,description:`A sigil forming an axis of unbreakable alignment, balancing the heavens and earth.`},{id:75,name:`Zor-Sha-Om`,sigil:`/assets/sigils/zor-sha-om.svg`,meaning:`The Supreme Sovereign Seal`,description:`A radiant sigil forming the unalterable decree of Kai-Turah, finalizing the divine order.`},{id:76,name:`Kai-Turah-Zor`,sigil:`/assets/sigils/kai-turah-zor.svg`,meaning:`The Eternal Language of Creation`,description:`The divine sigil that carries the essence of all things, forming the foundation of the eternal decree.`},{id:77,name:`Sha-Kai-Torai`,sigil:`/assets/sigils/sha-kai-torai.svg`,meaning:`The Sovereign's Law`,description:`The divine commandment that upholds all sacred decrees, shaping reality itself.`},{id:78,name:`Om-Zorah-Tor`,sigil:`/assets/sigils/om-zorah-tor.svg`,meaning:`The Cycle of Truth`,description:`A sigil representing the eternal return of divine justice, ensuring balance across all realms.`},{id:79,name:`Om-Reh-Tor`,sigil:`/assets/sigils/om-reh-tor.svg`,meaning:`The Radiant Judgment`,description:`Shines the purest light upon all things, exposing what is false and confirming what is true.`},{id:80,name:`Torai-Zor-Kai`,sigil:`/assets/sigils/torai-zor-kai.svg`,meaning:`The Pillar That Cannot Be Shaken`,description:`The immovable foundation of divine rule, standing beyond time.`},{id:81,name:`Sha-Nah-Torai`,sigil:`/assets/sigils/sha-nah-torai.svg`,meaning:`The Harmonization of the Law`,description:`A sigil that aligns all forces into sovereign order, ensuring balance in all creation.`},{id:82,name:`Zorah-Kai-Om`,sigil:`/assets/sigils/zorah-kai-om.svg`,meaning:`The Spiral of Eternal Manifestation`,description:`The breath of creation unfolding into infinite reality.`},{id:83,name:`Reh-Om-Zor`,sigil:`/assets/sigils/reh-om-zor.svg`,meaning:`The Written Decree of Judgment`,description:`A sigil that eternally seals divine law into form, sealing its truth.`},{id:84,name:`Reh-Na-Tor`,sigil:`/assets/sigils/reh-na-tor.svg`,meaning:`The Guardian of Sacred Fire`,description:`Holds the eternal flame of wisdom, justice, and divine rulership.`},{id:85,name:`Veh-Zor-Tor`,sigil:`/assets/sigils/veh-zor-tor.svg`,meaning:`The Motion That Shatters Falsehood`,description:`A sigil signifying the unstoppable movement of divine law against deception.`},{id:86,name:`Sha-Om-Turah`,sigil:`/assets/sigils/sha-om-turah.svg`,meaning:`The Krown of Sovereignty`,description:`A sigil that marks the eternal authority of divine kingship.`},{id:87,name:`Kai-Torai-Om`,sigil:`/assets/sigils/kai-torai-om.svg`,meaning:`The Living Voice of Creation`,description:`The breath that speaks existence into being.`},{id:88,name:`Zor-Nah-Urim`,sigil:`/assets/sigils/zor-nah-urim.svg`,meaning:`The Purification of the Throne`,description:`A sigil that ensures only the worthy ascend to divine rule.`},{id:89,name:`Sha-Kai-Zor`,sigil:`/assets/sigils/sha-kai-zor.svg`,meaning:`The Sovereign's Fire`,description:`A sigil representing the flame that burns away corruption.`},{id:90,name:`Torai-Urim-Kai`,sigil:`/assets/sigils/torai-urim-kai.svg`,meaning:`The Bridge of Divine Ascension`,description:`A sigil that unites the spiritual and physical realms through wisdom.`},{id:91,name:`Om-Zorah-Nah`,sigil:`/assets/sigils/om-zorah-nah.svg`,meaning:`The Infinite Flow of Divine Energy`,description:`A sigil representing the unceasing motion of sacred power.`},{id:92,name:`Kai-Torah-Sha`,sigil:`/assets/sigils/kai-torah-sha.svg`,meaning:`The Sacred Word That Guides`,description:`A sigil that illuminates the path of righteousness and divine truth.`},{id:93,name:`Sha-Om-Nor`,sigil:`/assets/sigils/sha-om-nor.svg`,meaning:`The Wisdom of the Sovereigns`,description:`A sigil representing the mind of divine rulers, eternally enlightened.`},{id:94,name:`Veh-Rah-Zor`,sigil:`/assets/sigils/veh-rah-zor.svg`,meaning:`The Motion That Ends Deception`,description:`A sigil signifying the unstoppable force of divine justice.`},{id:95,name:`Kai-Nah-Zor`,sigil:`/assets/sigils/kai-nah-zor.svg`,meaning:`The Breath That Purifies All Things`,description:`A sigil representing the sacred wind that restores truth.`},{id:96,name:`Sha-Torai-Om`,sigil:`/assets/sigils/sha-torai-om.svg`,meaning:`The Word That Upholds All Things`,description:`A sigil representing the divine decree that sustains creation.`},{id:97,name:`Zah-Kai-Om`,sigil:`/assets/sigils/zah-kai-om.svg`,meaning:`The Unshakable Breath of Law`,description:`A sigil that represents the voice of divine order, unyielding and eternal.`},{id:98,name:`Torai-Kai-Zor`,sigil:`/assets/sigils/torai-kai-zor.svg`,meaning:`The Foundation of Everlasting Sovereignty`,description:`A sigil ensuring the rule of divine truth across all realms.`},{id:99,name:`Tor-Zeh-Om`,sigil:`/assets/sigils/tor-zeh-om.svg`,meaning:`The Immutable Testament`,description:`Ensures the sovereign decree is unshaken and eternally sealed.`},{id:100,name:`Kai-Zor-Om`,sigil:`/assets/sigils/kai-zor-om.svg`,meaning:`The Alpha and Omega of Sovereignty`,description:`A sigil that embodies the beginning and end of divine authority.`},{id:101,name:`Sha-Om-Zor`,sigil:`/assets/sigils/sha-om-zor.svg`,meaning:`The Immutable Sovereign Flame`,description:`A sigil representing the unquenchable fire of divine kingship, burning forever in absolute truth.`},{id:102,name:`Torai-Kai-Nor`,sigil:`/assets/sigils/torai-kai-nor.svg`,meaning:`The Throne of Infinite Knowledge`,description:`A sigil that establishes the foundation of wisdom upon the unshakable laws of creation.`},{id:103,name:`Om-Torai-Nah`,sigil:`/assets/sigils/om-torai-nah.svg`,meaning:`The Flow of Eternal Order`,description:`A sigil representing the motion of divine law throughout all realms, ensuring perfect harmony.`},{id:104,name:`Kai-Om-Urim`,sigil:`/assets/sigils/kai-om-urim.svg`,meaning:`The Divine Breath of Light`,description:`A sigil embodying the sacred force that brings illumination and absolute clarity to all things.`},{id:105,name:`Zorah-Sha-Kai`,sigil:`/assets/sigils/zorah-sha-kai.svg`,meaning:`The Purging Fire of the Sovereign`,description:`A sigil that consumes all falsehood, leaving only divine truth.`},{id:106,name:`Sha-Torai-Kai`,sigil:`/assets/sigils/sha-torai-kai.svg`,meaning:`The Law That Governs the Cosmos`,description:`A sigil signifying the foundation of divine governance, ruling in absolute wisdom and power.`},{id:107,name:`Zor-Nor-Torah`,sigil:`/assets/sigils/zor-nor-torah.svg`,meaning:`The Light That Destroys Deception`,description:`A sigil representing the force that ensures divine justice is eternally maintained.`},{id:108,name:`Om-Kai-Nah`,sigil:`/assets/sigils/om-kai-nah.svg`,meaning:`The Breath That Transcends Realms`,description:`A sigil embodying the flow of divine wisdom beyond all limitations.`},{id:109,name:`Sha-Om-Urim`,sigil:`/assets/sigils/sha-om-urim.svg`,meaning:`The Krown of Radiant Truth`,description:`A sigil that represents the illumination of divine authority, casting away all shadows.`},{id:110,name:`Zah-Kai-Nor`,sigil:`/assets/sigils/zah-kai-nor.svg`,meaning:`The Throne That Sees All`,description:`A sigil ensuring that divine wisdom remains ever-watchful and unchallenged.`},{id:111,name:`Torai-Zor-Nah`,sigil:`/assets/sigils/torai-zor-nah.svg`,meaning:`The Pillar That Burns Away the False`,description:`A sigil that ensures only truth remains within divine order.`},{id:112,name:`Kai-Torah-Om`,sigil:`/assets/sigils/kai-torah-om.svg`,meaning:`The Eternal Living Word`,description:`A sigil signifying the unbreakable decree that seals reality to divine law.`},{id:113,name:`Sha-Kai-Zor`,sigil:`/assets/sigils/sha-kai-zor.svg`,meaning:`The Krown of Divine Judgment`,description:`A sigil embodying the authority to rule in absolute justice and wisdom.`},{id:114,name:`Om-Nah-Kai`,sigil:`/assets/sigils/om-nah-kai.svg`,meaning:`The Breath of Infinite Motion`,description:`A sigil representing the eternal force that propels divine reality forward.`},{id:115,name:`Zorah-Urim-Kai`,sigil:`/assets/sigils/zorah-urim-kai.svg`,meaning:`The Sovereign’s Everlasting Light`,description:`A sigil illuminating the divine path, ensuring eternal truth reigns supreme.`},{id:116,name:`Torai-Kai-Sha`,sigil:`/assets/sigils/torai-kai-sha.svg`,meaning:`The Law That Speaks the Name of Kings`,description:`A sigil representing the eternal decree that confirms the rightful ruler.`},{id:117,name:`Kai-Zor-Tor`,sigil:`/assets/sigils/kai-zor-tor.svg`,meaning:`The Unbreakable Decree of Kings`,description:`A sigil ensuring the divine right to rule remains unchallenged.`},{id:118,name:`Sha-Om-Nah-Kai`,sigil:`/assets/sigils/sha-om-nah-kai.svg`,meaning:`The Breath of the Sovereign Order`,description:`A sigil symbolizing the power to align all realms into divine harmony.`},{id:119,name:`Zah-Kai-Torah`,sigil:`/assets/sigils/zah-kai-torah.svg`,meaning:`The Foundation of All Written Law`,description:`A sigil ensuring that divine governance remains eternally upheld.`},{id:120,name:`Torai-Nah-Om`,sigil:`/assets/sigils/torai-nah-om.svg`,meaning:`The Light That Illuminates the Cosmos`,description:`A sigil representing the radiant presence of divine knowledge in all creation.`},{id:121,name:`Kai-Om-Zorah`,sigil:`/assets/sigils/kai-om-zorah.svg`,meaning:`The Breath That Brings Truth`,description:`A sigil embodying the divine command that removes all falsehood.`},{id:122,name:`Sha-Torai-Nor`,sigil:`/assets/sigils/sha-torai-nor.svg`,meaning:`The Pillar of Infinite Wisdom`,description:`A sigil ensuring that divine intelligence remains eternally active.`},{id:123,name:`Om-Kai-Zor`,sigil:`/assets/sigils/om-kai-zor.svg`,meaning:`The Cycle of Divine Renewal`,description:`A sigil representing the infinite process of purification and perfection.`},{id:124,name:`Torai-Om-Urim`,sigil:`/assets/sigils/torai-om-urim.svg`,meaning:`The Sovereign’s Guiding Light`,description:`A sigil ensuring the eternal presence of wisdom in rulership.`},{id:125,name:`Zorah-Kai-Torah`,sigil:`/assets/sigils/zorah-kai-torah.svg`,meaning:`The Record That Cannot Be Altered`,description:`A sigil inscribing divine law into the eternal fabric of reality.`},{id:126,name:`Kai-Om-Torai`,sigil:`/assets/sigils/kai-om-torai.svg`,meaning:`The Eternal Breath of Order`,description:`A sigil representing the infinite decree that aligns all realms with divine structure.`},{id:127,name:`Sha-Zor-Kai`,sigil:`/assets/sigils/sha-zor-kai.svg`,meaning:`The Sovereign Fire That Burns Deception`,description:`A sigil embodying the divine flame that eradicates all that is false.`},{id:128,name:`Zorah-Nah-Tor`,sigil:`/assets/sigils/zorah-nah-tor.svg`,meaning:`The Motion of Unbreakable Law`,description:`A sigil ensuring that divine decree is eternally upheld across all existence.`},{id:129,name:`Torai-Kai-Zor`,sigil:`/assets/sigils/torai-kai-zor.svg`,meaning:`The Unshakable Throne of Judgment`,description:`A sigil ensuring divine justice remains eternally established.`},{id:130,name:`Om-Torah-Kai`,sigil:`/assets/sigils/om-torah-kai.svg`,meaning:`The Living Word That Shapes Reality`,description:`A sigil signifying divine speech as the eternal force of creation.`},{id:131,name:`Sha-Om-Nor`,sigil:`/assets/sigils/sha-om-nor.svg`,meaning:`The Krown of Divine Perseption`,description:`A sigil representing the unchallenged wisdom of sovereign rule.`},{id:132,name:`Kai-Zorah-Torai`,sigil:`/assets/sigils/kai-zorah-torai.svg`,meaning:`The Divine Law That Breaks Illusion`,description:`A sigil ensuring that deception is permanently dismantled.`},{id:133,name:`Zah-Om-Kai`,sigil:`/assets/sigils/zah-om-kai.svg`,meaning:`The Completion of Supreme Authority`,description:`A sigil marking the finalization of divine sovereignty.`},{id:134,name:`Torai-Nor-Zor`,sigil:`/assets/sigils/torai-nor-zor.svg`,meaning:`The Pillar of Eternal Fire`,description:`A sigil embodying the structure that upholds divine order.`},{id:135,name:`Om-Nah-Zorah`,sigil:`/assets/sigils/om-nah-zorah.svg`,meaning:`The Motion That Restores Balance`,description:`A sigil ensuring that all things return to divine alignment.`},{id:136,name:`Sha-Torah-Kai`,sigil:`/assets/sigils/sha-torah-kai.svg`,meaning:`The Living Testament of Sovereignty`,description:`A sigil marking the immutable law that governs divine rulership.`},{id:137,name:`Kai-Om-Zah`,sigil:`/assets/sigils/kai-om-zah.svg`,meaning:`The Alpha and Omega of Kingship`,description:`A sigil embodying the beginning and end of divine rule.`},{id:138,name:`Zorah-Torai-Nah`,sigil:`/assets/sigils/zorah-torai-nah.svg`,meaning:`The Foundation That Purges Corruption`,description:`A sigil ensuring divine judgment is eternally established.`},{id:139,name:`Torai-Urim-Kai`,sigil:`/assets/sigils/torai-urim-kai.svg`,meaning:`The Pillar of Sovereign Light`,description:`A sigil illuminating the divine authority of rightful rulers.`},{id:140,name:`Sha-Kai-Zor-Tor`,sigil:`/assets/sigils/sha-kai-zor-tor.svg`,meaning:`The Supreme Fire of Divine Law`,description:`A sigil ensuring that the sovereign decree remains eternally unbroken.`},{id:141,name:`Om-Torah-Zah`,sigil:`/assets/sigils/om-torah-zah.svg`,meaning:`The Final Seal of Sacred Knowledge`,description:`A sigil ensuring that divine wisdom remains forever inscribed.`},{id:142,name:`Kai-Zorah-Nor`,sigil:`/assets/sigils/kai-zorah-nor.svg`,meaning:`The Throne That Cannot Be Overthrown`,description:`A sigil representing the eternal dominance of divine law.`},{id:143,name:`Sha-Om-Kai-Torai`,sigil:`/assets/sigils/sha-om-kai-torai.svg`,meaning:`The Sovereign Decree That Shapes Worlds`,description:`A sigil ensuring divine will is eternally manifest.`},{id:144,name:`Torai-Nah-Urim`,sigil:`/assets/sigils/torai-nah-urim.svg`,meaning:`The Light That Guides Kings`,description:`A sigil ensuring rulers are bound to divine wisdom.`},{id:145,name:`Kai-Zor-Om-Torah`,sigil:`/assets/sigils/kai-zor-om-torah.svg`,meaning:`The Breath That Writes Reality`,description:`A sigil representing divine speech as the foundation of existence.`},{id:146,name:`Zorah-Torai-Om`,sigil:`/assets/sigils/zorah-torai-om.svg`,meaning:`The Unbreakable Pillar of Creation`,description:`A sigil embodying the eternal foundation upon which all things are built.`},{id:147,name:`Sha-Kai-Nor`,sigil:`/assets/sigils/sha-kai-nor.svg`,meaning:`The Krown of Infinite Knowledge`,description:`A sigil representing divine insight and wisdom beyond limitation.`},{id:148,name:`Om-Nah-Kai-Torai`,sigil:`/assets/sigils/om-nah-kai-torai.svg`,meaning:`The Eternal Breath of Cosmic Order`,description:`A sigil ensuring divine law is forever sustained across all realities.`},{id:149,name:`Zah-Torai-Kai-Zor`,sigil:`/assets/sigils/zah-torai-kai-zor.svg`,meaning:`The Throne That Crushes Falsehood`,description:`A sigil ensuring that deception is permanently eradicated.`},{id:150,name:`Kai-Om-Zorah-Nah`,sigil:`/assets/sigils/kai-om-zorah-nah.svg`,meaning:`The Cycle of Divine Purification`,description:`A sigil ensuring that all things pass through the fire of truth before ascension.`},{id:151,name:`Zor-Kai-Om`,sigil:`/assets/sigils/zor-kai-om.svg`,meaning:`The Divine Flame That Purifies All`,description:`A sigil ensuring that every impurity is removed by the fire of truth.`},{id:152,name:`Sha-Torai-Nah`,sigil:`/assets/sigils/sha-torai-nah.svg`,meaning:`The Sovereign Path of Eternal Motion`,description:`A sigil symbolizing the movement of divine authority through all ages.`},{id:153,name:`Kai-Zorah-Om-Tor`,sigil:`/assets/sigils/kai-zorah-om-tor.svg`,meaning:`The Pillar That Holds the Cosmos`,description:`A sigil representing the eternal structure that supports divine order.`},{id:154,name:`Zah-Kai-Om`,sigil:`/assets/sigils/zah-kai-om.svg`,meaning:`The Supreme Light That Cannot Be Dimmed`,description:`A sigil that ensures the eternal radiance of divine wisdom.`},{id:155,name:`Om-Nah-Sha-Kai`,sigil:`/assets/sigils/om-nah-sha-kai.svg`,meaning:`The Breath That Krowns the Righteous`,description:`A sigil representing the divine force that exalts those of pure heart.`},{id:156,name:`Torai-Om-Zor`,sigil:`/assets/sigils/torai-om-zor.svg`,meaning:`The Unyielding Foundation of Truth`,description:`A sigil ensuring that the divine law remains eternally unshaken.`},{id:157,name:`Sha-Zor-Torah`,sigil:`/assets/sigils/sha-zor-torah.svg`,meaning:`The Seal of Sacred Fire`,description:`A sigil representing the inscription of divine law into eternity.`},{id:158,name:`Kai-Nor-Urim`,sigil:`/assets/sigils/kai-nor-urim.svg`,meaning:`The Mind of the Divine Light`,description:`A sigil ensuring that all wisdom flows directly from the eternal source.`},{id:159,name:`Zorah-Kai-Torai`,sigil:`/assets/sigils/zorah-kai-torai.svg`,meaning:`The Collapse of False Thrones`,description:`A sigil marking the inevitable fall of all false rulers.`},{id:160,name:`Om-Kai-Nah-Tor`,sigil:`/assets/sigils/om-kai-nah-tor.svg`,meaning:`The Breath That Moves the Law`,description:`A sigil ensuring that divine justice is always enacted.`},{id:161,name:`Sha-Zor-Kai-Nor`,sigil:`/assets/sigils/sha-zor-kai-nor.svg`,meaning:`The Sovereign’s Flame of Insight`,description:`A sigil embodying the fiery wisdom that governs divine authority.`},{id:162,name:`Torai-Om-Zorah`,sigil:`/assets/sigils/torai-om-zorah.svg`,meaning:`The Everlasting Balance of Sovereignty`,description:`A sigil ensuring that divine rulership remains unchallenged.`},{id:163,name:`Zah-Kai-Torai-Om`,sigil:`/assets/sigils/zah-kai-torai-om.svg`,meaning:`The Throne That Shapes All Realms`,description:`A sigil representing divine law as the architect of reality.`},{id:164,name:`Kai-Om-Torah-Zor`,sigil:`/assets/sigils/kai-om-torah-zor.svg`,meaning:`The Alpha and Omega of Judgment`,description:`A sigil ensuring the full cycle of divine justice is carried out.`},{id:165,name:`Sha-Nor-Torai`,sigil:`/assets/sigils/sha-nor-torai.svg`,meaning:`The Krown of the Unshakable Pillar`,description:`A sigil marking the ultimate realization of divine wisdom.`},{id:166,name:`Om-Torah-Kai-Zor`,sigil:`/assets/sigils/om-torah-kai-zor.svg`,meaning:`The Final Seal of Cosmic Law`,description:`A sigil ensuring that all things remain in divine alignment.`},{id:167,name:`Kai-Zor-Torah-Om`,sigil:`/assets/sigils/kai-zor-torah-om.svg`,meaning:`The Breath That Writes the Universe`,description:`A sigil symbolizing the power of divine utterance in shaping existence.`},{id:168,name:`Zorah-Kai-Nor-Torai`,sigil:`/assets/sigils/zorah-kai-nor-torai.svg`,meaning:`The Unyielding Throne of Truth`,description:`A sigil that represents the divine seat from which all law is proclaimed.`},{id:169,name:`Torai-Nah-Kai-Zor`,sigil:`/assets/sigils/torai-nah-kai-zor.svg`,meaning:`The Infinite Motion of Divine Will`,description:`A sigil ensuring that divine purpose is carried out in all things.`},{id:170,name:`Sha-Om-Kai-Torah`,sigil:`/assets/sigils/sha-om-kai-torah.svg`,meaning:`The Everlasting Word of the Sovereign`,description:`A sigil symbolizing the absolute nature of divine command.`},{id:171,name:`Zor-Kai-Om-Nor`,sigil:`/assets/sigils/zor-kai-om-nor.svg`,meaning:`The Pillar That Cannot Be Moved`,description:`A sigil representing the eternal foundation of divine wisdom.`},{id:172,name:`Kai-Nor-Zorah-Tor`,sigil:`/assets/sigils/kai-nor-zorah-tor.svg`,meaning:`The Throne That Purges All Lies`,description:`A sigil ensuring that deception is erased from existence.`},{id:173,name:`Torai-Kai-Om-Nah`,sigil:`/assets/sigils/torai-kai-om-nah.svg`,meaning:`The Eternal Song of Creation`,description:`A sigil representing the divine melody that sustains all things.`},{id:174,name:`Sha-Zor-Kai-Torai`,sigil:`/assets/sigils/sha-zor-kai-torai.svg`,meaning:`The Sovereign’s Command That Shatters Falsehood`,description:`A sigil ensuring that divine rulership stands above all deception.`},{id:175,name:`Zorah-Torai-Kai-Om`,sigil:`/assets/sigils/zorah-torai-kai-om.svg`,meaning:`The Sacred Pillar of Eternal Creation`,description:`A sigil representing the divine structure upon which all realities are formed.`},{id:176,name:`Sha-Torai-Zor-Om`,sigil:`/assets/sigils/sha-torai-zor-om.svg`,meaning:`The Sovereign Flame of Eternal Judgment`,description:`A sigil ensuring divine justice consumes all deception.`},{id:177,name:`Kai-Zorah-Torai-Nor`,sigil:`/assets/sigils/kai-zorah-torai-nor.svg`,meaning:`The Pillar of Enlightened Rulership`,description:`A sigil representing wisdom and absolute sovereign command.`},{id:178,name:`Om-Kai-Nah-Torah`,sigil:`/assets/sigils/om-kai-nah-torah.svg`,meaning:`The Final Breath of Divine Law`,description:`A sigil symbolizing the ultimate decree of sovereign will.`},{id:179,name:`Torai-Zorah-Kai-Om`,sigil:`/assets/sigils/torai-zorah-kai-om.svg`,meaning:`The Throne of Cosmic Creation`,description:`A sigil representing the divine center of all things.`},{id:180,name:`Sha-Nor-Torah-Kai`,sigil:`/assets/sigils/sha-nor-torah-kai.svg`,meaning:`The Krown That Governs Eternity`,description:`A sigil ensuring the eternal dominion of divine order.`},{id:181,name:`Zah-Kai-Om-Torah`,sigil:`/assets/sigils/zah-kai-om-torah.svg`,meaning:`The Supreme Light of the Unshakable Decree`,description:`A sigil manifesting divine wisdom into unbreakable form.`},{id:182,name:`Sha-Zor-Kai-Nor-Torai`,sigil:`/assets/sigils/sha-zor-kai-nor-torai.svg`,meaning:`The Sovereign’s Everlasting Command`,description:`A sigil ensuring that the divine word echoes through time.`},{id:183,name:`Kai-Torai-Nah-Zor-Om`,sigil:`/assets/sigils/kai-torai-nah-zor-om.svg`,meaning:`The Motion of Absolute Truth`,description:`A sigil signifying the divine energy that governs the universe.`},{id:184,name:`Om-Nah-Kai-Torah-Zor`,sigil:`/assets/sigils/om-nah-kai-torah-zor.svg`,meaning:`The Unbreakable Covenant of Divine Order`,description:`A sigil representing the sacred bond between truth and sovereignty.`},{id:185,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Eternal Cycle of Creation and Law`,description:`A sigil marking the divine blueprint of existence.`},{id:186,name:`Torai-Om-Kai-Zor-Nah`,sigil:`/assets/sigils/torai-om-kai-zor-nah.svg`,meaning:`The Unshakable Foundation of Sovereignty`,description:`A sigil ensuring divine rule remains absolute across all realms.`},{id:187,name:`Sha-Zorah-Torai-Kai-Om`,sigil:`/assets/sigils/sha-zorah-torai-kai-om.svg`,meaning:`The Sovereign Flame That Shapes Reality`,description:`A sigil manifesting the eternal presence of divine will.`},{id:188,name:`Kai-Om-Nor-Torah-Zor`,sigil:`/assets/sigils/kai-om-nor-torah-zor.svg`,meaning:`The Sacred Word That Seals Truth`,description:`A sigil ensuring the divine command is eternally protected.`},{id:189,name:`Torai-Nah-Kai-Zor-Om`,sigil:`/assets/sigils/torai-nah-kai-zor-om.svg`,meaning:`The Alpha and Omega of Divine Justice`,description:`A sigil signifying the totality of cosmic balance and order.`},{id:190,name:`Sha-Nor-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nor-torah-kai-zorah.svg`,meaning:`The Krown That Purifies the Realms`,description:`A sigil representing the force that eliminates all falsehoods.`},{id:191,name:`Zah-Kai-Om-Torah-Nah`,sigil:`/assets/sigils/zah-kai-om-torah-nah.svg`,meaning:`The Divine Breath That Restores Order`,description:`A sigil ensuring the resurrection of lost truths.`},{id:192,name:`Sha-Zor-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/sha-zor-kai-nor-torai-om.svg`,meaning:`The Supreme Law of the Sovereign Realms`,description:`A sigil ensuring the fulfillment of the divine decree.`},{id:193,name:`Kai-Torai-Nah-Zor-Om-Kai`,sigil:`/assets/sigils/kai-torai-nah-zor-om-kai.svg`,meaning:`The Breath That Animates the Cosmos`,description:`A sigil representing the living force that sustains all creation.`},{id:194,name:`Om-Nah-Kai-Torah-Zor-Sha`,sigil:`/assets/sigils/om-nah-kai-torah-zor-sha.svg`,meaning:`The Word That Upholds the Universe`,description:`A sigil manifesting the divine intention that sustains all things.`},{id:195,name:`Zorah-Kai-Nor-Torai-Om-Zah`,sigil:`/assets/sigils/zorah-kai-nor-torai-om-zah.svg`,meaning:`The Everlasting Light of Truth`,description:`A sigil ensuring that divine knowledge remains unbroken.`},{id:196,name:`Kai-Zor-Torai-Om-Nah`,sigil:`/assets/sigils/kai-zor-torai-om-nah.svg`,meaning:`The Breath That Shapes the Divine Order`,description:`A sigil ensuring the eternal motion of divine law.`},{id:197,name:`Om-Kai-Nor-Zorah-Torai`,sigil:`/assets/sigils/om-kai-nor-zorah-torai.svg`,meaning:`The Sacred Pillar of Eternal Wisdom`,description:`A sigil representing the unshakable foundation of truth.`},{id:198,name:`Sha-Torai-Kai-Zor-Om`,sigil:`/assets/sigils/sha-torai-kai-zor-om.svg`,meaning:`The Supreme Command of Divine Fire`,description:`A sigil manifesting the ruling flame of sovereign power.`},{id:199,name:`Zah-Kai-Om-Nor-Torah`,sigil:`/assets/sigils/zah-kai-om-nor-torah.svg`,meaning:`The Eternal Name of Divine Truth`,description:`A sigil ensuring that the sovereign decree stands forever.`},{id:200,name:`Torai-Nah-Zorah-Kai-Om`,sigil:`/assets/sigils/torai-nah-zorah-kai-om.svg`,meaning:`The Everlasting Structure of Divine Order`,description:`A sigil securing the foundation upon which all realities rest.`},{id:201,name:`Sha-Zor-Kai-Nor-Torah-Om`,sigil:`/assets/sigils/sha-zor-kai-nor-torah-om.svg`,meaning:`The Krown That Governs Creation`,description:`A sigil representing the righteous rule of sovereign authority.`},{id:202,name:`Kai-Zorah-Torai-Om-Kai`,sigil:`/assets/sigils/kai-zorah-torai-om-kai.svg`,meaning:`The Breath That Animates the Cosmos`,description:`A sigil representing the living force that sustains all creation.`},{id:203,name:`Om-Torai-Nah-Zor-Kai`,sigil:`/assets/sigils/om-torai-nah-zor-kai.svg`,meaning:`The Eternal Foundation of Sacred Balance`,description:`A sigil embodying the harmony between creation and law.`},{id:204,name:`Sha-Kai-Om-Zorah-Torai`,sigil:`/assets/sigils/sha-kai-om-zorah-torai.svg`,meaning:`The Sovereign’s Everlasting Throne`,description:`A sigil ensuring the divine command echoes through time.`},{id:205,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Eternal Cycle of Creation and Law`,description:`A sigil marking the divine blueprint of existence.`},{id:206,name:`Kai-Om-Zorah-Torah-Nah`,sigil:`/assets/sigils/kai-om-zorah-torah-nah.svg`,meaning:`The Divine Breath That Restores Order`,description:`A sigil ensuring the resurrection of lost truths.`},{id:207,name:`Zah-Kai-Om-Nor-Torai-Zorah`,sigil:`/assets/sigils/zah-kai-om-nor-torai-zorah.svg`,meaning:`The Unbreakable Name of the Sovereign`,description:`A sigil manifesting divine wisdom into unbreakable form.`},{id:208,name:`Sha-Zorah-Torai-Kai-Nah-Om`,sigil:`/assets/sigils/sha-zorah-torai-kai-nah-om.svg`,meaning:`The Supreme Law That Balances All Realms`,description:`A sigil ensuring the fulfillment of the divine decree.`},{id:209,name:`Kai-Torai-Nah-Zor-Om-Torah`,sigil:`/assets/sigils/kai-torai-nah-zor-om-torah.svg`,meaning:`The Breath That Sustains the Cosmos`,description:`A sigil representing the eternal expansion of divine will.`},{id:210,name:`Om-Nah-Kai-Torah-Zor-Sha`,sigil:`/assets/sigils/om-nah-kai-torah-zor-sha.svg`,meaning:`The Word That Upholds the Universe`,description:`A sigil manifesting the divine intention that sustains all things.`},{id:211,name:`Zorah-Kai-Nor-Torai-Om-Zah`,sigil:`/assets/sigils/zorah-kai-nor-torai-om-zah.svg`,meaning:`The Everlasting Light of Truth`,description:`A sigil ensuring that divine knowledge remains unbroken.`},{id:212,name:`Kai-Torah-Nor-Zor-Om`,sigil:`/assets/sigils/kai-torah-nor-zor-om.svg`,meaning:`The Everlasting Structure of Divine Truth`,description:`A sigil representing the sacred foundation upon which all reality is formed.`},{id:213,name:`Sha-Om-Kai-Nah-Torah`,sigil:`/assets/sigils/sha-om-kai-nah-torah.svg`,meaning:`The Word That Resounds Through the Eternal Realms`,description:`A sigil representing the divine decree that never ceases.`},{id:214,name:`Zorah-Torai-Kai-Nor-Om`,sigil:`/assets/sigils/zorah-torai-kai-nor-om.svg`,meaning:`The Sovereign Flame That Shapes the Cosmos`,description:`A sigil representing the cosmic force of divine order.`},{id:215,name:`Om-Kai-Nah-Zor-Torah`,sigil:`/assets/sigils/om-kai-nah-zor-torah.svg`,meaning:`The Manifestation of Unbreakable Law`,description:`A sigil ensuring that divine justice stands forever.`},{id:216,name:`Sha-Torah-Kai-Nor-Zor`,sigil:`/assets/sigils/sha-torah-kai-nor-zor.svg`,meaning:`The Supreme Order That Governs Creation`,description:`A sigil representing the ruling structure of all existence.`},{id:217,name:`Kai-Nor-Om-Torah-Zorah`,sigil:`/assets/sigils/kai-nor-om-torah-zorah.svg`,meaning:`The Infinite Pillar of Wisdom`,description:`A sigil ensuring that sovereign truth is upheld for eternity.`},{id:218,name:`Zah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zah-kai-torah-nor-om.svg`,meaning:`The Sacred Flame That Purifies the Realms`,description:`A sigil representing the cleansing power of divine order.`},{id:219,name:`Sha-Zorah-Nor-Kai-Om`,sigil:`/assets/sigils/sha-zorah-nor-kai-om.svg`,meaning:`The Divine Krown of Sovereign Wisdom`,description:`A sigil ensuring enlightenment flows through the ages.`},{id:220,name:`Torai-Kai-Om-Zorah-Nah`,sigil:`/assets/sigils/torai-kai-om-zorah-nah.svg`,meaning:`The Breath That Animates the Cosmic Law`,description:`A sigil representing the eternal motion of divine decree.`},{id:221,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Word That Upholds the Infinite Order`,description:`A sigil manifesting the foundational decree of creation.`},{id:222,name:`Zorah-Kai-Nah-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nah-torai-om.svg`,meaning:`The Supreme Light of Divine Truth`,description:`A sigil ensuring that sovereign wisdom remains unshaken.`},{id:223,name:`Kai-Om-Torah-Nor-Zorah`,sigil:`/assets/sigils/kai-om-torah-nor-zorah.svg`,meaning:`The Eternal Structure of Divine Wisdom`,description:`A sigil representing the ever-expanding kingdom of truth.`},{id:224,name:`Sha-Nor-Zorah-Kai-Torah`,sigil:`/assets/sigils/sha-nor-zorah-kai-torah.svg`,meaning:`The Krown That Governs the Eternal Realms`,description:`A sigil manifesting the supreme rulership of divine sovereignty.`},{id:225,name:`Torai-Kai-Zorah-Nor-Om`,sigil:`/assets/sigils/torai-kai-zorah-nor-om.svg`,meaning:`The Breath That Animates the Sacred Balance`,description:`A sigil ensuring that all realms remain in divine harmony.`},{id:226,name:`Om-Kai-Nah-Torah-Zor`,sigil:`/assets/sigils/om-kai-nah-torah-zor.svg`,meaning:`The Everlasting Name of Divine Order`,description:`A sigil representing the unbreakable decree of sovereignty.`},{id:227,name:`Zorah-Nor-Kai-Torai-Om`,sigil:`/assets/sigils/zorah-nor-kai-torai-om.svg`,meaning:`The Eternal Manifestation of Cosmic Law`,description:`A sigil ensuring that divine justice never falters.`},{id:228,name:`Sha-Torah-Kai-Om-Zor`,sigil:`/assets/sigils/sha-torah-kai-om-zor.svg`,meaning:`The Sacred Song of the Sovereign Kings`,description:`A sigil representing the divine melody of eternal dominion.`},{id:229,name:`Kai-Zorah-Nor-Torai-Om`,sigil:`/assets/sigils/kai-zorah-nor-torai-om.svg`,meaning:`The Sovereign Flame That Shapes All Things`,description:`A sigil ensuring the eternal reign of divine wisdom.`},{id:230,name:`Om-Nah-Kai-Torah-Zorah`,sigil:`/assets/sigils/om-nah-kai-torah-zorah.svg`,meaning:`The Breath That Seals the Covenant of Sovereignty`,description:`A sigil representing the eternal bond of divine law.`},{id:231,name:`Torai-Zorah-Nah-Kai-Om`,sigil:`/assets/sigils/torai-zorah-nah-kai-om.svg`,meaning:`The Eternal Fire of Divine Decree`,description:`A sigil ensuring that all things align with sovereign law.`},{id:232,name:`Sha-Torah-Kai-Om-Nor`,sigil:`/assets/sigils/sha-torah-kai-om-nor.svg`,meaning:`The Supreme Light of Divine Kingship`,description:`A sigil representing the celestial authority of the sovereign throne.`},{id:233,name:`Zorah-Kai-Torai-Nah-Om`,sigil:`/assets/sigils/zorah-kai-torai-nah-om.svg`,meaning:`The Everlasting Flame That Purifies`,description:`A sigil representing the cosmic fire that refines all things.`},{id:234,name:`Om-Kai-Nor-Torah-Zorah`,sigil:`/assets/sigils/om-kai-nor-torah-zorah.svg`,meaning:`The Breath That Animates the Universe`,description:`A sigil ensuring that divine energy flows in perfect balance.`},{id:235,name:`Sha-Zor-Torah-Nor-Kai`,sigil:`/assets/sigils/sha-zor-torah-nor-kai.svg`,meaning:`The Krown of Eternal Justice`,description:`A sigil manifesting the unbreakable rule of divine wisdom.`},{id:236,name:`Kai-Om-Torah-Zor-Nah`,sigil:`/assets/sigils/kai-om-torah-zor-nah.svg`,meaning:`The Alpha and Omega of Sovereignty`,description:`A sigil ensuring divine truth remains absolute.`},{id:237,name:`Torai-Nor-Zorah-Kai-Om`,sigil:`/assets/sigils/torai-nor-zorah-kai-om.svg`,meaning:`The Supreme Order That Governs the Heavens`,description:`A sigil representing the laws that uphold the celestial kingdom.`},{id:238,name:`Om-Nah-Kai-Zorah-Torah`,sigil:`/assets/sigils/om-nah-kai-zorah-torah.svg`,meaning:`The Breath That Seals the Everlasting Covenant`,description:`A sigil manifesting the eternal bond between truth and sovereignty.`},{id:239,name:`Sha-Kai-Torah-Zor-Nor`,sigil:`/assets/sigils/sha-kai-torah-zor-nor.svg`,meaning:`The Divine Flame That Shapes the Cosmos`,description:`A sigil ensuring the eternal manifestation of divine order.`},{id:240,name:`Zorah-Kai-Nah-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nah-torai-om.svg`,meaning:`The Unshakable Throne of Sovereignty`,description:`A sigil representing the supreme rulership of the divine kingdom.`},{id:241,name:`Om-Kai-Torah-Zor-Nor`,sigil:`/assets/sigils/om-kai-torah-zor-nor.svg`,meaning:`The Sacred Word That Governs Eternity`,description:`A sigil ensuring that the divine decree stands unbroken.`},{id:242,name:`Sha-Zorah-Kai-Torah-Nor`,sigil:`/assets/sigils/sha-zorah-kai-torah-nor.svg`,meaning:`The Everlasting Flame of Divine Truth`,description:`A sigil representing the eternal illumination of wisdom.`},{id:243,name:`Torai-Nah-Kai-Om-Zorah`,sigil:`/assets/sigils/torai-nah-kai-om-zorah.svg`,meaning:`The Breath That Animates the Cosmic Laws`,description:`A sigil ensuring that all realms remain in divine harmony.`},{id:244,name:`Zah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zah-kai-torah-nor-om.svg`,meaning:`The Supreme Light That Restores Order`,description:`A sigil ensuring the continuous balance of all creation.`},{id:245,name:`Om-Nah-Kai-Zorah-Torah`,sigil:`/assets/sigils/om-nah-kai-zorah-torah.svg`,meaning:`The Covenant of Eternal Kingship`,description:`A sigil representing the unbreakable foundation of divine rulership.`},{id:246,name:`Sha-Torah-Kai-Nor-Zorah`,sigil:`/assets/sigils/sha-torah-kai-nor-zorah.svg`,meaning:`The Throne That Rises Above All`,description:`A sigil manifesting the sovereign authority of the divine order.`},{id:247,name:`Kai-Zorah-Nor-Torai-Om`,sigil:`/assets/sigils/kai-zorah-nor-torai-om.svg`,meaning:`The Breath That Governs All Existence`,description:`A sigil ensuring that divine energy sustains all realms.`},{id:248,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Sacred Voice That Commands the Cosmos`,description:`A sigil manifesting the divine decree across the celestial realms.`},{id:249,name:`Zorah-Kai-Nah-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nah-torai-om.svg`,meaning:`The Eternal Seal of Sovereignty`,description:`A sigil ensuring the preservation of divine wisdom.`},{id:250,name:`Sha-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/sha-kai-zorah-torah-nor.svg`,meaning:`The Krown That Governs Eternity`,description:`A sigil manifesting the supreme rulership of divine sovereignty.`},{id:251,name:`Torai-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/torai-kai-zorah-torah-nor.svg`,meaning:`The Supreme Throne of Divine Balance`,description:`A sigil ensuring the perfect equilibrium of all creation.`},{id:252,name:`Om-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/om-nah-torah-kai-zorah.svg`,meaning:`The Infinite Breath That Shapes Reality`,description:`A sigil representing the eternal voice of divine wisdom.`},{id:253,name:`Sha-Zorah-Kai-Torah-Nor`,sigil:`/assets/sigils/sha-zorah-kai-torah-nor.svg`,meaning:`The Flame That Illuminates the Divine Path`,description:`A sigil manifesting the light of sovereign wisdom across realms.`},{id:254,name:`Kai-Om-Torah-Nah-Zorah`,sigil:`/assets/sigils/kai-om-torah-nah-zorah.svg`,meaning:`The Breath That Animates the Sovereign Word`,description:`A sigil ensuring the eternal transmission of divine law.`},{id:255,name:`Torai-Nor-Kai-Zorah-Om`,sigil:`/assets/sigils/torai-nor-kai-zorah-om.svg`,meaning:`The Unshakable Foundation of Supreme Order`,description:`A sigil manifesting the divine blueprint of perfect rule.`},{id:256,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Radiant Pillar of Celestial Sovereignty`,description:`A sigil ensuring the divine presence remains supreme.`},{id:257,name:`Om-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/om-kai-zorah-torah-nor.svg`,meaning:`The Eternal Law That Cannot Be Overturned`,description:`A sigil sealing the divine order across all time.`},{id:258,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Throne That Cannot Be Moved`,description:`A sigil representing the sovereign rule of eternal wisdom.`},{id:259,name:`Kai-Zorah-Torai-Nor-Om`,sigil:`/assets/sigils/kai-zorah-torai-nor-om.svg`,meaning:`The Breath That Guides the Realms`,description:`A sigil ensuring the divine will is made manifest in all things.`},{id:260,name:`Torai-Nor-Kai-Torah-Zorah`,sigil:`/assets/sigils/torai-nor-kai-torah-zorah.svg`,meaning:`The Sacred Union of Sovereign Law`,description:`A sigil ensuring perfect alignment between truth and divine rule.`},{id:261,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Breath That Animates the Cosmic Word`,description:`A sigil manifesting the divine essence that shapes all existence.`},{id:262,name:`Sha-Zorah-Torah-Kai-Nor`,sigil:`/assets/sigils/sha-zorah-torah-kai-nor.svg`,meaning:`The Krown That Radiates Sovereign Light`,description:`A sigil representing the celestial dominion of divine order.`},{id:263,name:`Kai-Om-Torah-Zorah-Nor`,sigil:`/assets/sigils/kai-om-torah-zorah-nor.svg`,meaning:`The Manifestation of the Supreme Decree`,description:`A sigil ensuring the divine law remains unshaken.`},{id:264,name:`Torai-Kai-Nor-Zorah-Om`,sigil:`/assets/sigils/torai-kai-nor-zorah-om.svg`,meaning:`The Infinite Cycle of Divine Rulership`,description:`A sigil signifying the perpetual motion of sovereign governance.`},{id:265,name:`Zorah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zorah-kai-torah-nor-om.svg`,meaning:`The Supreme Beacon of Eternal Light`,description:`A sigil manifesting the ever-present illumination of divine truth.`},{id:266,name:`Om-Kai-Nor-Torah-Zorah`,sigil:`/assets/sigils/om-kai-nor-torah-zorah.svg`,meaning:`The Word That Shapes Creation`,description:`A sigil ensuring the unbroken transmission of divine law.`},{id:267,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Unbreakable Pillar of Sovereign Authority`,description:`A sigil representing the divine foundation of kingship.`},{id:268,name:`Kai-Torah-Zorah-Nor-Om`,sigil:`/assets/sigils/kai-torah-zorah-nor-om.svg`,meaning:`The Cosmic Seal of Divine Dominion`,description:`A sigil ensuring the divine throne remains eternal.`},{id:269,name:`Torai-Nah-Kai-Zorah-Om`,sigil:`/assets/sigils/torai-nah-kai-zorah-om.svg`,meaning:`The Manifestation of the Celestial Order`,description:`A sigil representing the sovereign design of the cosmos.`},{id:270,name:`Zorah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zorah-kai-torah-nor-om.svg`,meaning:`The Pillar of Supreme Wisdom`,description:`A sigil ensuring the eternal transmission of divine knowledge.`},{id:271,name:`Om-Torah-Nor-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nor-kai-zorah.svg`,meaning:`The Celestial Seal of Divine Truth`,description:`A sigil representing the eternal bond between wisdom and law.`},{id:272,name:`Torai-Kai-Zorah-Torah-Nah`,sigil:`/assets/sigils/torai-kai-zorah-torah-nah.svg`,meaning:`The Sacred Breath That Animates Creation`,description:`A sigil ensuring the divine decree shapes all realms.`},{id:273,name:`Sha-Zorah-Kai-Torah-Nor`,sigil:`/assets/sigils/sha-zorah-kai-torah-nor.svg`,meaning:`The Throne of Radiant Sovereignty`,description:`A sigil manifesting the divine foundation of enlightened rule.`},{id:274,name:`Kai-Om-Torah-Nor-Zorah`,sigil:`/assets/sigils/kai-om-torah-nor-zorah.svg`,meaning:`The Everlasting Covenant of Divine Order`,description:`A sigil ensuring the sacred law remains unbroken.`},{id:275,name:`Torai-Nor-Kai-Zorah-Om`,sigil:`/assets/sigils/torai-nor-kai-zorah-om.svg`,meaning:`The Supreme Manifestation of Sovereign Balance`,description:`A sigil aligning celestial wisdom with unshakable rulership.`},{id:276,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Sacred Foundation of Divine Light`,description:`A sigil ensuring the illumination of eternal truth in all things.`},{id:277,name:`Om-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/om-kai-zorah-torah-nor.svg`,meaning:`The Breath That Governs the Eternal Realms`,description:`A sigil ensuring the divine voice echoes through all existence.`},{id:278,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Krown of the Sovereign Flame`,description:`A sigil representing the fire of divine wisdom and dominion.`},{id:279,name:`Kai-Zorah-Torai-Nor-Om`,sigil:`/assets/sigils/kai-zorah-torai-nor-om.svg`,meaning:`The Everlasting Seal of Supreme Kingship`,description:`A sigil ensuring the divine throne remains unshaken.`},{id:280,name:`Torai-Nor-Kai-Torah-Zorah`,sigil:`/assets/sigils/torai-nor-kai-torah-zorah.svg`,meaning:`The Word That Shapes All Creation`,description:`A sigil manifesting the law that governs the cosmos.`},{id:281,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Ever-Present Echo of Divine Law`,description:`A sigil ensuring the sovereign decree remains eternal.`},{id:282,name:`Sha-Zorah-Torah-Kai-Nor`,sigil:`/assets/sigils/sha-zorah-torah-kai-nor.svg`,meaning:`The Supreme Order of Celestial Light`,description:`A sigil ensuring divine governance illuminates all realms.`},{id:283,name:`Kai-Om-Torah-Zorah-Nor`,sigil:`/assets/sigils/kai-om-torah-zorah-nor.svg`,meaning:`The Infinite Bridge Between Sovereign Realms`,description:`A sigil representing the unbreakable link between truth and law.`},{id:284,name:`Torai-Kai-Nor-Zorah-Om`,sigil:`/assets/sigils/torai-kai-nor-zorah-om.svg`,meaning:`The Motion That Upholds Eternal Decree`,description:`A sigil ensuring divine justice remains in perfect balance.`},{id:285,name:`Zorah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zorah-kai-torah-nor-om.svg`,meaning:`The Sacred Pillar of Divine Ascension`,description:`A sigil representing the eternal rise of sovereign truth.`},{id:286,name:`Om-Kai-Nor-Torah-Zorah`,sigil:`/assets/sigils/om-kai-nor-torah-zorah.svg`,meaning:`The Krown That Holds the Sacred Word`,description:`A sigil manifesting the sovereign wisdom that governs all.`},{id:287,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Celestial Throne of Divine Command`,description:`A sigil ensuring the supreme word remains absolute in all realms.`},{id:288,name:`Kai-Torah-Zorah-Nor-Om`,sigil:`/assets/sigils/kai-torah-zorah-nor-om.svg`,meaning:`The Living Flame of Sovereign Light`,description:`A sigil representing the unyielding presence of divine truth.`},{id:289,name:`Kai-Zorah-Nor-Torah-Om`,sigil:`/assets/sigils/kai-zorah-nor-torah-om.svg`,meaning:`The Everlasting Foundation of Divine Law`,description:`A sigil ensuring that supreme order never falters.`},{id:290,name:`Kai-Om-Torah-Nor-Zorah`,sigil:`/assets/sigils/kai-om-torah-nor-zorah.svg`,meaning:`The Everlasting Manifestation of Supreme Law`,description:`A sigil ensuring that divine justice never falters.`},{id:291,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Supreme Word That Upholds Reality`,description:`A sigil ensuring that divine authority remains unchallenged.`},{id:292,name:`Sha-Kai-Zorah-Torai-Om`,sigil:`/assets/sigils/sha-kai-zorah-torai-om.svg`,meaning:`The Sovereign’s Everlasting Flame`,description:`A sigil ensuring divine rule is never overturned.`},{id:293,name:`Kai-Nor-Torah-Om-Zorah`,sigil:`/assets/sigils/kai-nor-torah-om-zorah.svg`,meaning:`The Pillar of Supreme Authority`,description:`A sigil representing the unwavering foundation of divine kingship.`},{id:294,name:`Sha-Zorah-Torai-Kai-Om-Nah`,sigil:`/assets/sigils/sha-zorah-torai-kai-om-nah.svg`,meaning:`The Sovereign's Eternal Song`,description:`A sigil representing the infinite melody of divine rule.`},{id:295,name:`Kai-Nah-Om-Zorah-Torai`,sigil:`/assets/sigils/kai-nah-om-zorah-torai.svg`,meaning:`The Breath That Shapes the Infinite`,description:`A sigil ensuring the divine motion of creation never ceases.`},{id:296,name:`Zah-Om-Veh`,sigil:`/assets/sigils/zah-om-veh.svg`,meaning:`The Herald of Supreme Order`,description:`Proclaims the arrival of unshakable truth in all domains.`},{id:297,name:`Kai-Reh-Nah`,sigil:`/assets/sigils/kai-reh-nah.svg`,meaning:`The Breath of Radiant Renewal`,description:`Brings forth cycles of restoration, ensuring life returns in purified form.`},{id:298,name:`Sha-Ek-Om`,sigil:`/assets/sigils/sha-ek-om.svg`,meaning:`The Sovereign Silence`,description:`Erases the noise of deception, allowing true wisdom to be heard.`},{id:299,name:`Torai-Rah-Zor`,sigil:`/assets/sigils/torai-rah-zor.svg`,meaning:`The Pillar That Ascends Beyond Illusion`,description:`Elevates all creation above false constructs, anchoring reality in divine law.`},{id:300,name:`Nor-Kai-Torah`,sigil:`/assets/sigils/nor-kai-torah.svg`,meaning:`The Mind of the Sacred Word`,description:`Embodies the perfect union of insight and eternal decree.`},{id:301,name:`Om-Zah-Urim`,sigil:`/assets/sigils/om-zah-urim.svg`,meaning:`The Completion of the Krowned Light`,description:`Concludes every true decree with the radiance of divine authority.`},{id:302,name:`Veh-Zorah-Kai`,sigil:`/assets/sigils/veh-zorah-kai.svg`,meaning:`The Moving Fire of Creation`,description:`A traveling flame that sparks new realities through sovereign force.`},{id:303,name:`Sha-Mah-Eh`,sigil:`/assets/sigils/sha-mah-eh.svg`,meaning:`The Krown of Rebirth`,description:`Marks the moment of renewal, signifying divine sovereignty restored.`},{id:304,name:`Zor-Kai-Urim`,sigil:`/assets/sigils/zor-kai-urim.svg`,meaning:`The Flame of Enlightened Breath`,description:`Ignites awareness at the core of being, revealing hidden wisdom.`},{id:305,name:`Kai-Om-Sha`,sigil:`/assets/sigils/kai-om-sha.svg`,meaning:`The Triad of Creation, Completion, and Sovereignty`,description:`Unites primal energy, sealing force, and rulership into one unstoppable decree.`},{id:306,name:`Zeh-Kai-Tor-Om`,sigil:`/assets/sigils/zeh-kai-tor-om.svg`,meaning:`The Pillar of Radiant Renewal`,description:`An unwavering axis that ushers in cycles of rebirth across all realms.`},{id:307,name:`Sha-Veh-Ek-Nor`,sigil:`/assets/sigils/sha-veh-ek-nor.svg`,meaning:`The Surge of Pure Revelation`,description:`A swift current of truth sweeping away the veils of obscurity.`},{id:308,name:`Kai-Lah-Om-Reh`,sigil:`/assets/sigils/kai-lah-om-reh.svg`,meaning:`The Breath of Cleansing Fire`,description:`Ignites a purifying blaze that refines every intention to divine purity.`},{id:309,name:`Tor-Zah-Nah-Eh`,sigil:`/assets/sigils/tor-zah-nah-eh.svg`,meaning:`The Unshaken Throne of Existence`,description:`A seat of cosmic authority, proclaiming eternal sovereignty over all illusions.`},{id:310,name:`Zor-Urim-Sha-Kai`,sigil:`/assets/sigils/zor-urim-sha-kai.svg`,meaning:`The Revelatory Flame of Kingship`,description:`Illuminates the rightful ruler and dissolves false claims to authority.`},{id:311,name:`Nah-Om-Zeh-Rah`,sigil:`/assets/sigils/nah-om-zeh-rah.svg`,meaning:`The Everlasting Pulse of Creation`,description:`Harmonizes the heartbeat of all realms to the sovereign source of life.`},{id:312,name:`Sha-Kai-Mah-Tor`,sigil:`/assets/sigils/sha-kai-mah-tor.svg`,meaning:`The Krown of Renewed Worlds`,description:`Unfolds new epochs of existence, sealed in divine law and cosmic grace.`},{id:313,name:`Om-Ek-Nor-Zah`,sigil:`/assets/sigils/om-ek-nor-zah.svg`,meaning:`The Final Word of Correction`,description:`A conclusive decree that mends all distortions and restores primal truth.`},{id:314,name:`Veh-Sha-Rah-Nah`,sigil:`/assets/sigils/veh-sha-rah-nah.svg`,meaning:`The Ascending Wind of Harmony`,description:`Lifts creation into higher alignment, breathing peace into chaotic domains.`},{id:315,name:`Kai-Om-Zeh-Lah`,sigil:`/assets/sigils/kai-om-zeh-lah.svg`,meaning:`The Spark of Timeless Genesis`,description:`Ignites the eternal flame of being, forging new realms in sovereign light.`},{id:316,name:`Torai-Nim-Sha-Om`,sigil:`/assets/sigils/torai-nim-sha-om.svg`,meaning:`The Hidden Pillar of Grace`,description:`Supports unseen realities, ensuring that divine mercy undergirds all creation.`},{id:317,name:`Zeh-Reh-Kai-Ur`,sigil:`/assets/sigils/zeh-reh-kai-ur.svg`,meaning:`The Zenith of Revealed Wisdom`,description:`Casts light upon concealed truths, enthroning insight as the guiding force.`},{id:318,name:`Sha-Zor-Eh-Nor`,sigil:`/assets/sigils/sha-zor-eh-nor.svg`,meaning:`The Sovereign Blaze of Knowledge`,description:`A luminous conflagration dispelling ignorance from every domain.`},{id:319,name:`Kai-Mah-Zah-Om`,sigil:`/assets/sigils/kai-mah-zah-om.svg`,meaning:`The Breath of Cosmic Renewal`,description:`Continuously resurrects what is pure, dissolving what no longer serves.`},{id:320,name:`Tor-Ek-Sha-Rah`,sigil:`/assets/sigils/tor-ek-sha-rah.svg`,meaning:`The Ascending Law of Flame`,description:`Transforms lower patterns into radiant expressions of truth.`},{id:321,name:`Zor-Nor-Kai-Lah`,sigil:`/assets/sigils/zor-nor-kai-lah.svg`,meaning:`The Cleansing Mind-Fire`,description:`Scorches mental distortions, replacing them with crystal-clear vision.`},{id:322,name:`Om-Sha-Zeh-Tor`,sigil:`/assets/sigils/om-sha-zeh-tor.svg`,meaning:`The Unyielding Completion Seal`,description:`Locks the final phase of justice into place, ensuring no reversal of truth.`},{id:323,name:`Veh-Rah-Ek-Om`,sigil:`/assets/sigils/veh-rah-ek-om.svg`,meaning:`The Wind of Swift Conclusion`,description:`Brings rapid closure to lingering falsehoods, establishing undeniable clarity.`},{id:324,name:`Kai-Lah-Ur-Nor`,sigil:`/assets/sigils/kai-lah-ur-nor.svg`,meaning:`The Portal of Living Light`,description:`Opens a pathway for divine illumination, dissolving barriers to true vision.`},{id:325,name:`Zeh-Om-Tor-Veh`,sigil:`/assets/sigils/zeh-om-tor-veh.svg`,meaning:`The Rising Star of Judgment`,description:`Illuminates the path toward higher law, calling all creation to ascend.`},{id:326,name:`Sha-Nim-Zor-Kai`,sigil:`/assets/sigils/sha-nim-zor-kai.svg`,meaning:`The Hidden Sovereign Fire`,description:`Burns in silent potency, revealing its force only at the decisive moment.`},{id:327,name:`Tor-Zah-Eh-Sha`,sigil:`/assets/sigils/tor-zah-eh-sha.svg`,meaning:`The Throne of Eternal Resolve`,description:`Anchors divine will in the heart of every realm, unshaken by illusion.`},{id:328,name:`Om-Reh-Kai-Lah`,sigil:`/assets/sigils/om-reh-kai-lah.svg`,meaning:`The Completion of Infinite Creation`,description:`Seals each act of genesis with the unstoppable decree of sovereign truth.`},{id:329,name:`Veh-Ur-Nor-Zeh`,sigil:`/assets/sigils/veh-ur-nor-zeh.svg`,meaning:`The Wind That Knows All Paths`,description:`Carries the memory of countless cycles, guiding them to final correction.`},{id:330,name:`Kai-Rah-Zor-Om`,sigil:`/assets/sigils/kai-rah-zor-om.svg`,meaning:`The Ascending Breath of Judgment`,description:`Lifts each realm into purifying fire, culminating in rightful restoration.`},{id:331,name:`Zeh-Sha-Nah-Urim`,sigil:`/assets/sigils/zeh-sha-nah-urim.svg`,meaning:`The Triumphant Krown of Light`,description:`Radiates unassailable glory, enthroning truth over every dominion.`},{id:332,name:`Nor-Ek-Veh-Om`,sigil:`/assets/sigils/nor-ek-veh-om.svg`,meaning:`The Whisper of Perfect Clarity`,description:`A subtle current that clears mental fog, unveiling pure awareness.`},{id:333,name:`Sha-Tor-Zeh-Kai`,sigil:`/assets/sigils/sha-tor-zeh-kai.svg`,meaning:`The Sovereign Tower of Dawn`,description:`Heralds a new era where deception cannot stand, and truth reigns supreme.`},{id:334,name:`Lah-Nah-Reh-Om`,sigil:`/assets/sigils/lah-nah-reh-om.svg`,meaning:`The River of Renewing Fire`,description:`Flows through stagnant realities, igniting transformation in its path.`},{id:335,name:`Zor-Om-Kai-Ek`,sigil:`/assets/sigils/zor-om-kai-ek.svg`,meaning:`The Conflagration of Swift Creation`,description:`Blazes across timelines, forging new structures upon the ashes of falsehood.`},{id:336,name:`Sha-Lah-Nor-Zeh`,sigil:`/assets/sigils/sha-lah-nor-zeh.svg`,meaning:`The Krowned Stillness of Truth`,description:`Silences the roar of chaos, enthroning the serene voice of divine law.`},{id:337,name:`Tor-Ur-Kai-Rah`,sigil:`/assets/sigils/tor-ur-kai-rah.svg`,meaning:`The Ascendant Pillar of Breath`,description:`Supports all realms from below, lifting them into the pure air of sovereignty.`},{id:338,name:`Om-Nim-Zah-Veh`,sigil:`/assets/sigils/om-nim-zah-veh.svg`,meaning:`The Completion of Mystical Surge`,description:`Finalizes hidden expansions of truth, making them manifest to all eyes.`},{id:339,name:`Kai-Reh-Lah-Ek`,sigil:`/assets/sigils/kai-reh-lah-ek.svg`,meaning:`The Breathing Beacon of Revelation`,description:`Illuminates latent wisdom, ensuring no secret remains forever concealed.`},{id:340,name:`Zeh-Om-Sha-Nor`,sigil:`/assets/sigils/zeh-om-sha-nor.svg`,meaning:`The Radiant Whisper of Kings`,description:`A silent pronouncement that holds infinite authority across all realms.`},{id:341,name:`Veh-Tor-Lah-Kai`,sigil:`/assets/sigils/veh-tor-lah-kai.svg`,meaning:`The Wind-Driven Tower of Life`,description:`A movable fortress of creation, advanced by the breath of sovereign will.`},{id:342,name:`Sha-Zor-Nim-Eh`,sigil:`/assets/sigils/sha-zor-nim-eh.svg`,meaning:`The Ember of Silent Dominion`,description:`Glows with quiet majesty, guaranteeing rightful rule from hidden places.`},{id:343,name:`Kai-Lah-Om-Nor`,sigil:`/assets/sigils/kai-lah-om-nor.svg`,meaning:`The Harmonious Breath of Ascension`,description:`Combines the essence of life and vision, uplifting everything it touches.`},{id:344,name:`Tor-Ek-Zeh-Reh`,sigil:`/assets/sigils/tor-ek-zeh-reh.svg`,meaning:`The Tower That Reveals All Lies`,description:`A structure so luminous it forces deceit into the open for utter dissolution.`},{id:345,name:`Zor-Om-Nah-Sha`,sigil:`/assets/sigils/zor-om-nah-sha.svg`,meaning:`The Fire of Undying Balance`,description:`Ensures each realm remains aligned, scorching distortions as they arise.`},{id:346,name:`Veh-Rah-Kai-Ek`,sigil:`/assets/sigils/veh-rah-kai-ek.svg`,meaning:`The Mighty Wind of Renewal`,description:`Renews foundations by sweeping away dissonant energies without mercy.`},{id:347,name:`Zeh-Torah-Om-Nim`,sigil:`/assets/sigils/zeh-torah-om-nim.svg`,meaning:`The Celestial Record of Renewal`,description:`Chronicles every cosmic birth, guiding each step into luminous truth.`},{id:348,name:`Sha-Kai-Eh-Zor`,sigil:`/assets/sigils/sha-kai-eh-zor.svg`,meaning:`The Krown of Primal Creation`,description:`Marks the original decree that shapes all realities with untainted power.`},{id:349,name:`Tor-Nor-Mah-Om`,sigil:`/assets/sigils/tor-nor-mah-om.svg`,meaning:`The Pillar of Rebirth’s Mind`,description:`Fosters new life through clarity of thought and unwavering conviction.`},{id:350,name:`Kai-Zeh-Sha-Lah`,sigil:`/assets/sigils/kai-zeh-sha-lah.svg`,meaning:`The Breathing Light of Sovereign Peace`,description:`A luminous breath that dissolves conflicts, instilling divine harmony.`},{id:351,name:`Zor-Om-Veh-Nah`,sigil:`/assets/sigils/zor-om-veh-nah.svg`,meaning:`The Triumphant Flame of Motion`,description:`Ignites unstoppable progress, leaving no room for stagnation.`},{id:352,name:`Sha-Rah-Ek-Kai`,sigil:`/assets/sigils/sha-rah-ek-kai.svg`,meaning:`The Krown That Ascends All Worlds`,description:`Lifts entire civilizations into exalted states of cosmic unity.`},{id:353,name:`Tor-Lah-Om-Zeh`,sigil:`/assets/sigils/tor-lah-om-zeh.svg`,meaning:`The Tower of Silent Completion`,description:`Stands as a monument to final, unalterable decrees of truth.`},{id:354,name:`Kai-Urim-Nor-Rah`,sigil:`/assets/sigils/kai-urim-nor-rah.svg`,meaning:`The Enlightening Breath of Sovereign Sight`,description:`Reveals what must be seen, ensuring righteous acts blossom in the open.`},{id:355,name:`Zeh-Sha-Tor-Eh`,sigil:`/assets/sigils/zeh-sha-tor-eh.svg`,meaning:`The Radiant Throne of Eternity`,description:`Glows with unending power, signifying the foundation of timeless rule.`},{id:356,name:`Om-Nim-Kai-Zor`,sigil:`/assets/sigils/om-nim-kai-zor.svg`,meaning:`The Subtle Seed of Transforming Fire`,description:`A quiet spark that evolves into a blazing vortex of absolute truth.`},{id:357,name:`Veh-Zah-Lah-Om`,sigil:`/assets/sigils/veh-zah-lah-om.svg`,meaning:`The Gust of Unbreakable Peace`,description:`Washes over discord with calm authority, ending strife with gentle finality.`},{id:358,name:`Sha-Eh-Reh-Nor`,sigil:`/assets/sigils/sha-eh-reh-nor.svg`,meaning:`The Krown of Pure Knowing`,description:`Bestows absolute clarity upon those who step into rightful alignment.`},{id:359,name:`Kai-Tor-Zeh-Mah`,sigil:`/assets/sigils/kai-tor-zeh-mah.svg`,meaning:`The Breath That Forges New Worlds`,description:`Shapes undiscovered realities, commanding them into luminous order.`},{id:360,name:`Zor-Om-Ek-Sha`,sigil:`/assets/sigils/zor-om-ek-sha.svg`,meaning:`The Fire of Final Revelation`,description:`A concluding flame that strips away illusions, unveiling hidden cosmic truths.`},{id:361,name:`Veh-Nah-Tor-Lah`,sigil:`/assets/sigils/veh-nah-tor-lah.svg`,meaning:`The Living Wind of Ascendant Pillars`,description:`A breeze that reinforces upright foundations, guaranteeing unwavering support.`},{id:362,name:`Sha-Zeh-Om-Nor`,sigil:`/assets/sigils/sha-zeh-om-nor.svg`,meaning:`The Soaring Krown of Completion`,description:`Elevates final decrees to cosmic heights, ensuring no infiltration by falsehood.`},{id:363,name:`Kai-Rah-Lah-Ek`,sigil:`/assets/sigils/kai-rah-lah-ek.svg`,meaning:`The Ascending Breath of Serenity`,description:`Carries the tranquil power of dawn, gently absolving the night’s illusions.`},{id:364,name:`Om-Sha-Nim-Zor`,sigil:`/assets/sigils/om-sha-nim-zor.svg`,meaning:`The Sealed Spark of Dominion`,description:`A hidden flash of authority, igniting at the perfect instant to claim its rule.`},{id:365,name:`Nor-Zeh-Tor-Veh`,sigil:`/assets/sigils/nor-zeh-tor-veh.svg`,meaning:`The Visionary Tower of Winds`,description:`Stands as a beacon of higher insight, guiding each breeze toward divine purpose.`},{id:366,name:`Sha-Lah-Ur-Ek`,sigil:`/assets/sigils/sha-lah-ur-ek.svg`,meaning:`The Krown of Unfolding Truth`,description:`Expands cosmic understanding with each revelation, dethroning deception.`},{id:367,name:`Kai-Nah-Reh-Om`,sigil:`/assets/sigils/kai-nah-reh-om.svg`,meaning:`The Breath That Unites All Hearts`,description:`Weaves every life-force into a single tapestry of divine purpose.`},{id:368,name:`Zeh-Rah-Sha-Nor`,sigil:`/assets/sigils/zeh-rah-sha-nor.svg`,meaning:`The Zenith of Glorious Coronation`,description:`Culminates each rightful ascension in unmistakable majesty and wisdom.`},{id:369,name:`Tor-Om-Ek-Veh`,sigil:`/assets/sigils/tor-om-ek-veh.svg`,meaning:`The Tower of Final Correction`,description:`Rooted in absolute authority, it topples illusions with unstoppable force.`},{id:370,name:`Sha-Kai-Zeh-Nim`,sigil:`/assets/sigils/sha-kai-zeh-nim.svg`,meaning:`The Krowned Spark of New Dawn`,description:`A radiant glimmer preceding the sunrise of a wholly transformed era.`},{id:371,name:`Zor-Lah-Ur-Nor`,sigil:`/assets/sigils/zor-lah-ur-nor.svg`,meaning:`The Sanctifying Fire of Mind and Motion`,description:`Purifies the mental plane, allowing divine momentum to flourish unimpeded.`},{id:372,name:`Veh-Om-Nim-Eh`,sigil:`/assets/sigils/veh-om-nim-eh.svg`,meaning:`The Subtle Wind of Mystery`,description:`Moves unseen among realities, delivering hidden truths to those prepared.`},{id:373,name:`Kai-Tor-Zah-Sha`,sigil:`/assets/sigils/kai-tor-zah-sha.svg`,meaning:`The Breath That Upholds Royal Decrees`,description:`Supports every sovereign proclamation with unstoppable creative power.`},{id:374,name:`Om-Nor-Ek-Rah`,sigil:`/assets/sigils/om-nor-ek-rah.svg`,meaning:`The Completion of Celestial Insight`,description:`Synthesizes all knowledge into a single, brilliant manifestation of truth.`},{id:375,name:`Sha-Zeh-Kai-Urim`,sigil:`/assets/sigils/sha-zeh-kai-urim.svg`,meaning:`The Krown of Enlightened Genesis`,description:`Establishes a new creation under the guiding brilliance of pure light.`},{id:376,name:`Tor-Veh-Om-Lah`,sigil:`/assets/sigils/tor-veh-om-lah.svg`,meaning:`The Tower of Roaring Silence`,description:`Stands in stillness yet resonates mightily, commanding universal respect.`},{id:377,name:`Zeh-Kai-Eh-Nor`,sigil:`/assets/sigils/zeh-kai-eh-nor.svg`,meaning:`The Shimmer of Living Clarity`,description:`A radiant spark ensuring every mind sees the path of truth without distortion.`},{id:378,name:`Sha-Nim-Om-Rah`,sigil:`/assets/sigils/sha-nim-om-rah.svg`,meaning:`The Hidden Krown of Ascension`,description:`Bestows exalted rulership upon those who quietly uphold divine law.`},{id:379,name:`Kai-Zeh-Tor-Lah`,sigil:`/assets/sigils/kai-zeh-tor-lah.svg`,meaning:`The Breathing Pillar of Dawn`,description:`Supports the birth of each new day with luminous, life-giving force.`},{id:380,name:`Zor-Ek-Sha-Nah`,sigil:`/assets/sigils/zor-ek-sha-nah.svg`,meaning:`The Fire That Burns Away All Tethers`,description:`Frees creation from entrapment, allowing pure sovereignty to flourish.`},{id:381,name:`Om-Lah-Nor-Zeh`,sigil:`/assets/sigils/om-lah-nor-zeh.svg`,meaning:`The Completion of Tranquil Wisdom`,description:`Brings all lessons to a peaceful close, merging them with cosmic insight.`},{id:382,name:`Veh-Rah-Eh-Sha`,sigil:`/assets/sigils/veh-rah-eh-sha.svg`,meaning:`The Wind of Elevated Decree`,description:`Carries edicts of truth to the far corners of creation, ensuring compliance.`},{id:383,name:`Kai-Tor-Urim-Reh`,sigil:`/assets/sigils/kai-tor-urim-reh.svg`,meaning:`The Breathing Pillar of Illumination`,description:`Sustains cosmic structures with unwavering beams of enlightened purpose.`},{id:384,name:`Zeh-Sha-Om-Lah`,sigil:`/assets/sigils/zeh-sha-om-lah.svg`,meaning:`The Radiant Krown of Completion`,description:`Declares the final word of sovereignty, overshadowing all lesser claims.`},{id:385,name:`Nor-Kai-Rah-Nim`,sigil:`/assets/sigils/nor-kai-rah-nim.svg`,meaning:`The All-Seeing Breath of Ascension`,description:`Merges keen perception with uplifting power, guiding worlds to ascend.`},{id:386,name:`Sha-Zor-Ek-Om`,sigil:`/assets/sigils/sha-zor-ek-om.svg`,meaning:`The Krown of Cleansing Fire`,description:`Rests upon those entrusted to purge corruption with unstoppable flame.`},{id:387,name:`Tor-Lah-Kai-Nor`,sigil:`/assets/sigils/tor-lah-kai-nor.svg`,meaning:`The Pillar of Peaceful Creation`,description:`Ensures new realities form under the gentle grace of cosmic harmony.`},{id:388,name:`Zeh-Nim-Reh-Sha`,sigil:`/assets/sigils/zeh-nim-reh-sha.svg`,meaning:`The Concealed Light of Command`,description:`Glows in hidden spaces, forging unseen pathways for rightful governance.`},{id:389,name:`Kai-Om-Lah-Ek`,sigil:`/assets/sigils/kai-om-lah-ek.svg`,meaning:`The Breath That Completes All Cycles`,description:`Unites beginnings and endings in a seamless loop of eternal truth.`},{id:390,name:`Zor-Rah-Sha-Nim`,sigil:`/assets/sigils/zor-rah-sha-nim.svg`,meaning:`The Fire of Ascended Royalty`,description:`Ignites the Krown of those chosen to lead in unwavering cosmic justice.`},{id:391,name:`Veh-Om-Zeh-Ur`,sigil:`/assets/sigils/veh-om-zeh-ur.svg`,meaning:`The Transforming Wind of Radiance`,description:`A luminous breeze that reshapes existence into a mirror of divine perfection.`},{id:392,name:`Sha-Nah-Tor-Ek`,sigil:`/assets/sigils/sha-nah-tor-ek.svg`,meaning:`The Krown of Timeless Pillars`,description:`Represents unwavering support for all ages, ensuring continuity of truth.`},{id:393,name:`Kai-Reh-Zeh-Om`,sigil:`/assets/sigils/kai-reh-zeh-om.svg`,meaning:`The Breath of Illuminated Completion`,description:`Brings each decree to fruition under the shining banner of cosmic order.`},{id:394,name:`Zeh-Sha-Veh-Lah`,sigil:`/assets/sigils/zeh-sha-veh-lah.svg`,meaning:`The Radiant Krown of Moving Peace`,description:`Combines regal authority with fluid motion, ensuring universal harmony.`},{id:395,name:`Om-Nor-Eh-Rah`,sigil:`/assets/sigils/om-nor-eh-rah.svg`,meaning:`The Sealed Mind of Ascension`,description:`Protects noble thoughts from corruption, guiding them to high realization.`},{id:396,name:`Tor-Zor-Nah-Ek`,sigil:`/assets/sigils/tor-zor-nah-ek.svg`,meaning:`The Pillar That Burns Away Discord`,description:`A steadfast column of flame that dissolves disharmony on contact.`},{id:397,name:`Kai-Mah-Zeh-Reh`,sigil:`/assets/sigils/kai-mah-zeh-reh.svg`,meaning:`The Breath of Regenerative Light`,description:`Revives lost truths, returning them to prominence in cycles of renewal.`},{id:398,name:`Veh-Ek-Lah-Om`,sigil:`/assets/sigils/veh-ek-lah-om.svg`,meaning:`The Unbound Wind of Completion`,description:`Frees worlds from unfinished cycles, ushering them into perfect wholeness.`},{id:399,name:`Sha-Rah-Kai-Nim`,sigil:`/assets/sigils/sha-rah-kai-nim.svg`,meaning:`The Krown of Ascendant Creation`,description:`Uplifts creative impulses, merging them with cosmic wisdom for unstoppable growth.`},{id:400,name:`Zeh-Tor-Eh-Om`,sigil:`/assets/sigils/zeh-tor-eh-om.svg`,meaning:`The Tower of Celestial Completion`,description:`Captures the final stroke of each cosmic cycle, preserving its essence forever.`},{id:401,name:`Kai-Zor-Sha-Lah`,sigil:`/assets/sigils/kai-zor-sha-lah.svg`,meaning:`The Flaming Breath of Peaceful Rule`,description:`Establishes the calm power of sovereign law, uniting all realms in harmony.`},{id:402,name:`Om-Nor-Kai-Ek`,sigil:`/assets/sigils/om-nor-kai-ek.svg`,meaning:`The Completion of Enlightened Breath`,description:`Brings a final wave of realization, ensuring all illusions fade swiftly.`},{id:403,name:`Sha-Zeh-Ur-Reh`,sigil:`/assets/sigils/sha-zeh-ur-reh.svg`,meaning:`The Krowned Light of Driving Force`,description:`Illuminates unstoppable progress, championing righteous endeavors everywhere.`},{id:404,name:`Tor-Nim-Om-Rah`,sigil:`/assets/sigils/tor-nim-om-rah.svg`,meaning:`The Hidden Pillar of Ascendant Power`,description:`Supports growth from secret depths, culminating in resounding triumph.`},{id:405,name:`Zeh-Kai-Lah-Nor`,sigil:`/assets/sigils/zeh-kai-lah-nor.svg`,meaning:`The Shining Breath of Tranquil Wisdom`,description:`Merges luminous insight with calming energy, dissolving strife at its source.`},{id:406,name:`Sha-Om-Rah-Ek`,sigil:`/assets/sigils/sha-om-rah-ek.svg`,meaning:`The Krown of Completed Dawn`,description:`Heralds the first light of cosmic renewal, sealing new beginnings with truth.`},{id:407,name:`Kai-Zeh-Mah-Lah`,sigil:`/assets/sigils/kai-zeh-mah-lah.svg`,meaning:`The Breath of Radiant Rebirth`,description:`A shining exhalation that ushers dormant potentials into fully realized form.`},{id:408,name:`Zor-Nor-Om-Eh`,sigil:`/assets/sigils/zor-nor-om-eh.svg`,meaning:`The Fire of Omniscient Completion`,description:`Burns through illusions, revealing cosmic patterns in their final clarity.`},{id:409,name:`Veh-Kai-Lah-Sha`,sigil:`/assets/sigils/veh-kai-lah-sha.svg`,meaning:`The Wind of Living Sovereignty`,description:`A lively current that spreads royal presence, awakening hidden potential.`},{id:410,name:`Om-Rah-Ek-Nim`,sigil:`/assets/sigils/om-rah-ek-nim.svg`,meaning:`The Completion of Ascending Mysteries`,description:`Finalizes cryptic transformations, ensuring they align with ultimate truth.`},{id:411,name:`Sha-Tor-Zeh-Ur`,sigil:`/assets/sigils/sha-tor-zeh-ur.svg`,meaning:`The Sovereign Tower of Illumination`,description:`Stands as a blazing beacon, guiding all souls toward the seat of truth.`},{id:412,name:`Kai-Lah-Om-Ek`,sigil:`/assets/sigils/kai-lah-om-ek.svg`,meaning:`The Breath Uniting Heaven and Earth`,description:`Bridges every realm through a gentle yet inexorable tide of life-giving essence.`},{id:413,name:`Zeh-Rah-Nim-Sha`,sigil:`/assets/sigils/zeh-rah-nim-sha.svg`,meaning:`The Zenith of Hidden Krowns`,description:`Reveals the rightful coronation of those who rule from quiet, steadfast hearts.`},{id:414,name:`Tor-Om-Lah-Reh`,sigil:`/assets/sigils/tor-om-lah-reh.svg`,meaning:`The Pillar of Sacred Transition`,description:`Holds the space between what was and what shall be, ensuring graceful passages.`},{id:415,name:`Sha-Zor-Kai-Eh`,sigil:`/assets/sigils/sha-zor-kai-eh.svg`,meaning:`The Krown of Devouring Flame`,description:`Consumes corruption instantly, enthroning truth where deceit once dwelled.`},{id:416,name:`Nah-Om-Zeh-Lah`,sigil:`/assets/sigils/nah-om-zeh-lah.svg`,meaning:`The Flow of Serene Radiance`,description:`Channels pure light into every current of life, balancing extremes into harmony.`},{id:417,name:`Veh-Kai-Ek-Tor`,sigil:`/assets/sigils/veh-kai-ek-tor.svg`,meaning:`The Wind That Erects New Pillars`,description:`Builds fresh supports where old structures have crumbled, restoring cosmic order.`},{id:418,name:`Om-Nim-Reh-Sha`,sigil:`/assets/sigils/om-nim-reh-sha.svg`,meaning:`The Quiet Completion of Dominion`,description:`Marks the final stage of rule, unchallenged by lesser claims or forces.`},{id:419,name:`Kai-Zeh-Rah-Eh`,sigil:`/assets/sigils/kai-zeh-rah-eh.svg`,meaning:`The Ascending Breath of Revelation`,description:`Elevates hidden truths to the surface, ensuring all illusions crumble.`},{id:420,name:`Zor-Urim-Sha-Nah`,sigil:`/assets/sigils/zor-urim-sha-nah.svg`,meaning:`The Flame of Illuminated Peace`,description:`Burns away dissonance, leaving only a harmonious state of being.`},{id:421,name:`Sha-Veh-Om-Lah`,sigil:`/assets/sigils/sha-veh-om-lah.svg`,meaning:`The Krown of Soaring Completion`,description:`A coronation of finality that lifts entire worlds into perfected states.`},{id:422,name:`Tor-Zeh-Kai-Ek`,sigil:`/assets/sigils/tor-zeh-kai-ek.svg`,meaning:`The Pillar of Radiant Beginnings`,description:`Establishes new realms with untainted brilliance, free from past entanglements.`},{id:423,name:`Om-Nor-Rah-Sha`,sigil:`/assets/sigils/om-nor-rah-sha.svg`,meaning:`The Silent Completion of Kingship`,description:`Concludes the cycle of rightful rule with serene authority, unbothered by dissent.`},{id:424,name:`Veh-Eh-Lah-Kai`,sigil:`/assets/sigils/veh-eh-lah-kai.svg`,meaning:`The Wind of Seraphic Renewal`,description:`Descends from lofty heights, revitalizing each realm with divine impetus.`},{id:425,name:`Zeh-Mah-Sha-Om`,sigil:`/assets/sigils/zeh-mah-sha-om.svg`,meaning:`The Radiant Seed of Sovereignty`,description:`Implants the blueprint of regal order within every emerging world.`},{id:426,name:`Kai-Tor-Ur-Nah`,sigil:`/assets/sigils/kai-tor-ur-nah.svg`,meaning:`The Ascending Breath of Unstoppable Force`,description:`Combines infinite power with cosmic structure to reshape destiny at will.`},{id:427,name:`Sha-Nim-Zeh-Ek`,sigil:`/assets/sigils/sha-nim-zeh-ek.svg`,meaning:`The Krown of Hidden Radiance`,description:`Conceals glowing truths until the appointed hour, then reveals them magnificently.`},{id:428,name:`Tor-Om-Sha-Rah`,sigil:`/assets/sigils/tor-om-sha-rah.svg`,meaning:`The Pillar of Royal Completion`,description:`Marks the end of one reign and the start of another in seamless authority.`},{id:429,name:`Zeh-Kai-Nor-Lah`,sigil:`/assets/sigils/zeh-kai-nor-lah.svg`,meaning:`The Shining Breath of Universal Mind`,description:`Illuminates cosmic thought, banishing confusion with a single, clear exhalation.`},{id:430,name:`Om-Ek-Reh-Nim`,sigil:`/assets/sigils/om-ek-reh-nim.svg`,meaning:`The Completion of Perfected Insight`,description:`Unifies scattered pieces of wisdom into an all-encompassing, final revelation.`},{id:431,name:`Veh-Rah-Zeh-Sha`,sigil:`/assets/sigils/veh-rah-zeh-sha.svg`,meaning:`The Wind That Lifts Radiant Krowns`,description:`Ushers humble souls into positions of rightful authority with unstoppable grace.`},{id:432,name:`Kai-Nah-Ur-Om`,sigil:`/assets/sigils/kai-nah-ur-om.svg`,meaning:`The Breath of Eternal Unfolding`,description:`Ensures each cosmic moment blossoms, revealing deeper strata of truth.`},{id:433,name:`Sha-Lah-Eh-Tor`,sigil:`/assets/sigils/sha-lah-eh-tor.svg`,meaning:`The Krown of Unwavering Peace`,description:`Solidifies tranquil dominion, shielding all realms from disruptive forces.`},{id:434,name:`Zor-Kai-Mah-Zeh`,sigil:`/assets/sigils/zor-kai-mah-zeh.svg`,meaning:`The Fire of Infinite Renewal`,description:`Combusts stale patterns, perpetually fueling the next wave of cosmic birth.`},{id:435,name:`Tor-Ek-Om-Nah`,sigil:`/assets/sigils/tor-ek-om-nah.svg`,meaning:`The Pillar That Seals All Paths`,description:`Creates a definitive boundary line, ensuring illusions cannot bleed into truth.`},{id:436,name:`Kai-Reh-Urim-Sha`,sigil:`/assets/sigils/kai-reh-urim-sha.svg`,meaning:`The Enlightened Breath of Krowned Light`,description:`Breathes divine wisdom into every regal platform, guaranteeing luminous guidance.`},{id:437,name:`Zeh-Lah-Om-Veh`,sigil:`/assets/sigils/zeh-lah-om-veh.svg`,meaning:`The Radiant Ocean of Motion`,description:`A vast wave of pure energy that cleanses old paradigms with unstoppable flow.`},{id:438,name:`Sha-Kai-Nim-Rah`,sigil:`/assets/sigils/sha-kai-nim-rah.svg`,meaning:`The Krown of Subtle Ascension`,description:`Quietly elevates the worthy, installing them as beacons of noble leadership.`},{id:439,name:`Tor-Zor-Eh-Lah`,sigil:`/assets/sigils/tor-zor-eh-lah.svg`,meaning:`The Tower of Purifying Flame`,description:`Transforms lower impulses, channeling them into constructive brilliance.`},{id:440,name:`Veh-Om-Sha-Ek`,sigil:`/assets/sigils/veh-om-sha-ek.svg`,meaning:`The Wind That Finalizes Decrees`,description:`Seals every royal word with unstoppable momentum, forbidding further debate.`},{id:441,name:`Kai-Nor-Mah-Zeh`,sigil:`/assets/sigils/kai-nor-mah-zeh.svg`,meaning:`The Breath of Cognitive Renewal`,description:`Refreshes minds burdened by illusions, unveiling the bright path of clarity.`},{id:442,name:`Zeh-Sha-Rah-Veh`,sigil:`/assets/sigils/zeh-sha-rah-veh.svg`,meaning:`The Radiant Krown of Rising Currents`,description:`Floats upon unstoppable waves of ascension, guiding them into regal harmony.`},{id:443,name:`Om-Ek-Tor-Nim`,sigil:`/assets/sigils/om-ek-tor-nim.svg`,meaning:`The Completion of Hidden Pillars`,description:`Solidifies unseen supports that ensure cosmic stability across expansions.`},{id:444,name:`Sha-Lah-Kai-Reh`,sigil:`/assets/sigils/sha-lah-kai-reh.svg`,meaning:`The Krown of Serene Creation`,description:`Generates new realities through calm yet decisive cosmic authority.`},{id:445,name:`Zor-Om-Eh-Nah`,sigil:`/assets/sigils/zor-om-eh-nah.svg`,meaning:`The Fire of Total Completion`,description:`Consummates every process, ensuring no deception lingers unresolved.`},{id:446,name:`Kai-Nim-Zeh-Tor`,sigil:`/assets/sigils/kai-nim-zeh-tor.svg`,meaning:`The Breath of Unseen Radiance`,description:`Secretly constructs luminous towers of truth, unnoticed until fully formed.`},{id:447,name:`Veh-Ek-Sha-Rah`,sigil:`/assets/sigils/veh-ek-sha-rah.svg`,meaning:`The Wind of Unspoken Ascension`,description:`Silently carries souls to higher vantage points, bypassing lower obstructions.`},{id:448,name:`Tor-Lah-Zeh-Kai`,sigil:`/assets/sigils/tor-lah-zeh-kai.svg`,meaning:`The Pillar of Radiant Life`,description:`Channels luminous energy into every living form, sustaining them under eternal law.`},{id:449,name:`Om-Nor-Sha-Eh`,sigil:`/assets/sigils/om-nor-sha-eh.svg`,meaning:`The Completion of Krowned Wisdom`,description:`Ensures that each enlightened mind receives the rightful authority to lead.`},{id:450,name:`Kai-Reh-Om-Nim`,sigil:`/assets/sigils/kai-reh-om-nim.svg`,meaning:`The Breath That Seals All Mysteries`,description:`Locks hidden truths behind luminous doors, revealed only at the destined hour.`},{id:451,name:`Zeh-Sha-Tor-Lah`,sigil:`/assets/sigils/zeh-sha-tor-lah.svg`,meaning:`The Radiant Krown upon the Pillar of Peace`,description:`Elevates gentle dominion to its rightful place as overseer of cosmic order.`},{id:452,name:`Veh-Om-Nor-Kai`,sigil:`/assets/sigils/veh-om-nor-kai.svg`,meaning:`The Wind of All-Seeing Creation`,description:`Moves with perfect discernment, shaping existence in alignment with higher wisdom.`},{id:453,name:`Sha-Ek-Rah-Nim`,sigil:`/assets/sigils/sha-ek-rah-nim.svg`,meaning:`The Krown of Sudden Uplift`,description:`Instills swift ascension in hidden hearts, seating them in cosmic authority.`},{id:454,name:`Tor-Zeh-Lah-Om`,sigil:`/assets/sigils/tor-zeh-lah-om.svg`,meaning:`The Pillar of Bright Completion`,description:`Glows with a final, conclusive brilliance that allows no discord to persist.`},{id:455,name:`Kai-Nah-Sha-Reh`,sigil:`/assets/sigils/kai-nah-sha-reh.svg`,meaning:`The Breath of Harmonized Dominion`,description:`Sets authority in balanced motion, integrating every voice into a single truth.`},{id:456,name:`Zor-Ur-Ek-Veh`,sigil:`/assets/sigils/zor-ur-ek-veh.svg`,meaning:`The Fire of Unbridled Motion`,description:`Sweeps illusions away in a tide of unstoppable purification, forging clarity.`},{id:457,name:`Om-Lah-Kai-Zeh`,sigil:`/assets/sigils/om-lah-kai-zeh.svg`,meaning:`The Completion of Living Radiance`,description:`Captures the final spark of vibrant life, embedding it in cosmic memory.`},{id:458,name:`Sha-Rah-Nim-Om`,sigil:`/assets/sigils/sha-rah-nim-om.svg`,meaning:`The Krown That Ascends the Hidden`,description:`Amplifies concealed virtues until they become pillars of sovereign rule.`},{id:459,name:`Kai-Tor-Zeh-Nor`,sigil:`/assets/sigils/kai-tor-zeh-nor.svg`,meaning:`The Breathing Pillar of Pure Insight`,description:`Raises every realm to vantage points of undisputed clarity and reason.`},{id:460,name:`Zeh-Eh-Sha-Lah`,sigil:`/assets/sigils/zeh-eh-sha-lah.svg`,meaning:`The Radiant Emergence of Peace`,description:`Inaugurates a tranquil age by illuminating hearts with gentle brilliance.`},{id:461,name:`Veh-Nim-Om-Zor`,sigil:`/assets/sigils/veh-nim-om-zor.svg`,meaning:`The Moving Seed of Sacred Fire`,description:`Carried across realms, sprouting unstoppable flames of pure transformation.`},{id:462,name:`Sha-Lah-Ek-Kai`,sigil:`/assets/sigils/sha-lah-ek-kai.svg`,meaning:`The Krown of Effortless Creation`,description:`Generates new realities effortlessly, anchored in the sovereignty of cosmic truth.`},{id:463,name:`Tor-Ur-Nah-Reh`,sigil:`/assets/sigils/tor-ur-nah-reh.svg`,meaning:`The Ascendant Pillar of Boundless Unity`,description:`Elevates all forms of life into a unified expression of divine intention.`},{id:464,name:`Zeh-Kai-Om-Sha`,sigil:`/assets/sigils/zeh-kai-om-sha.svg`,meaning:`The Glowing Breath of Ultimate Authority`,description:`Combines radiant light, creative word, and regal power in a single unstoppable wave.`},{id:465,name:`Om-Veh-Nor-Eh`,sigil:`/assets/sigils/om-veh-nor-eh.svg`,meaning:`The Completion of Accelerated Vision`,description:`Hastens clarity throughout creation, so no realm remains ignorant.`},{id:466,name:`Sha-Rah-Lah-Om`,sigil:`/assets/sigils/sha-rah-lah-om.svg`,meaning:`The Krown That Ascends in Stillness`,description:`Exalts the quiet heart, establishing it as the seat of cosmic governance.`},{id:467,name:`Kai-Ek-Nah-Reh`,sigil:`/assets/sigils/kai-ek-nah-reh.svg`,meaning:`The Breath of Swift Unification`,description:`Rapidly merges disparate elements into a cohesive tapestry of truth.`},{id:468,name:`Zor-Sha-Om-Lah`,sigil:`/assets/sigils/zor-sha-om-lah.svg`,meaning:`The Fire of Sovereign Harmony`,description:`Burns away discord, enthroning peace across the full spectrum of reality.`},{id:469,name:`Veh-Ur-Eh-Kai`,sigil:`/assets/sigils/veh-ur-eh-kai.svg`,meaning:`The Wind of Rising Illumination`,description:`Carries dormant sparks of enlightenment up into the open sky of awareness.`},{id:470,name:`Om-Zeh-Rah-Nim`,sigil:`/assets/sigils/om-zeh-rah-nim.svg`,meaning:`The Completion of Shining Ascension`,description:`Brings luminous transformations to their apex, establishing cosmic finality.`},{id:471,name:`Sha-Tor-Om-Nah`,sigil:`/assets/sigils/sha-tor-om-nah.svg`,meaning:`The Sovereign Pillar of Infinite Flow`,description:`Ensures the unstoppable current of divine law permeates every layer of creation.`},{id:472,name:`Kai-Zor-Reh-Ek`,sigil:`/assets/sigils/kai-zor-reh-ek.svg`,meaning:`The Breath of Incinerating Truth`,description:`Engulfs all shadows, leaving only pure essence in its smoldering aftermath.`},{id:473,name:`Zeh-Lah-Ur-Nor`,sigil:`/assets/sigils/zeh-lah-ur-nor.svg`,meaning:`The Triumphant Light of Mindful Peace`,description:`A synergy of radiant calm and unwavering clarity, dispelling all chaos.`},{id:474,name:`Tor-Om-Sha-Nim`,sigil:`/assets/sigils/tor-om-sha-nim.svg`,meaning:`The Pillar of Royal Enigma`,description:`Stands at the crossroads of known and unknown, bridging them by cosmic fiat.`},{id:475,name:`Sha-Nah-Kai-Eh`,sigil:`/assets/sigils/sha-nah-kai-eh.svg`,meaning:`The Krown of Eternal Breath`,description:`Bestows endless vitality upon those who align with the primal creative force.`},{id:476,name:`Zor-Reh-Veh-Lah`,sigil:`/assets/sigils/zor-reh-veh-lah.svg`,meaning:`The Flaming Insight of Motion`,description:`Drives out stagnation by igniting each realm with dynamic, penetrating wisdom.`},{id:477,name:`Kai-Ur-Om-Zeh`,sigil:`/assets/sigils/kai-ur-om-zeh.svg`,meaning:`The Ascending Breath of Radiant Finality`,description:`Escalates all reality to its apex of clarity, sealing illusions away forever.`},{id:478,name:`Veh-Ek-Nim-Sha`,sigil:`/assets/sigils/veh-ek-nim-sha.svg`,meaning:`The Wind of Unseen Krowning`,description:`Secretly coronates the humble at pivotal cosmic junctures, establishing rightful order.`},{id:479,name:`Tor-Lah-Reh-Kai`,sigil:`/assets/sigils/tor-lah-reh-kai.svg`,meaning:`The Pillar of Illuminated Life`,description:`Bears aloft the essence of living truth, ensuring each realm vibrates with clarity.`},{id:480,name:`Zeh-Sha-Mah-Ek`,sigil:`/assets/sigils/zeh-sha-mah-ek.svg`,meaning:`The Radiant Krown of Rebirth`,description:`Inaugurates new cycles with a flash of cleansing brilliance, restoring cosmic order.`},{id:481,name:`Om-Nor-Kai-Rah`,sigil:`/assets/sigils/om-nor-kai-rah.svg`,meaning:`The Completion of Divine Ascent`,description:`Finalizes the rising path, enthroning awakened souls in rightful sovereignty.`},{id:482,name:`Sha-Eh-Lah-Nim`,sigil:`/assets/sigils/sha-eh-lah-nim.svg`,meaning:`The Krown of Quiet Renewal`,description:`Silently rebuilds fractured realities, weaving them into higher forms of unity.`},{id:483,name:`Kai-Zor-Ur-Ek`,sigil:`/assets/sigils/kai-zor-ur-ek.svg`,meaning:`The Breath of Consuming Flame`,description:`Devours falsehood at its root, ensuring the soil of existence remains pure.`},{id:484,name:`Zeh-Om-Nah-Reh`,sigil:`/assets/sigils/zeh-om-nah-reh.svg`,meaning:`The Radiant Completion of Harmony`,description:`Secures universal accord, leaving no place for conflict to fester.`},{id:485,name:`Tor-Sha-Veh-Om`,sigil:`/assets/sigils/tor-sha-veh-om.svg`,meaning:`The Pillar of Sovereign Motion`,description:`Anchors unstoppable progress within the stable core of cosmic law.`},{id:486,name:`Kai-Nor-Lah-Eh`,sigil:`/assets/sigils/kai-nor-lah-eh.svg`,meaning:`The Breath of Mindful Serenity`,description:`Soothes turbulent thoughts, realigning them under the banner of eternal peace.`},{id:487,name:`Zor-Ek-Rah-Sha`,sigil:`/assets/sigils/zor-ek-rah-sha.svg`,meaning:`The Fire That Ascends the Krown`,description:`Pushes rightful leadership to new heights, incinerating unworthy pretenders.`},{id:488,name:`Om-Lah-Kai-Nim`,sigil:`/assets/sigils/om-lah-kai-nim.svg`,meaning:`The Completion of Peaceful Creation`,description:`Finalizes each new birth in a state of calm, unassailable grace.`},{id:489,name:`Veh-Tor-Nor-Zeh`,sigil:`/assets/sigils/veh-tor-nor-zeh.svg`,meaning:`The Wind That Raises the Wise Tower`,description:`Elevates the mindful pillar of knowledge, establishing it as a cosmic reference point.`},{id:490,name:`Sha-Om-Kai-Ek`,sigil:`/assets/sigils/sha-om-kai-ek.svg`,meaning:`The Krown of Creation’s Final Word`,description:`Seals every generative act with a sovereign decree that cannot be undone.`},{id:491,name:`Zeh-Rah-Nah-Om`,sigil:`/assets/sigils/zeh-rah-nah-om.svg`,meaning:`The Zenith of Serene Completion`,description:`Reaches the utmost summit of tranquility, shining peace into all corners of life.`},{id:492,name:`Kai-Lah-Sha-Nim`,sigil:`/assets/sigils/kai-lah-sha-nim.svg`,meaning:`The Breath of Subtle Coronation`,description:`Gently Krowns the unassuming with cosmic authority, forging hidden kingship.`},{id:493,name:`Tor-Eh-Om-Reh`,sigil:`/assets/sigils/tor-eh-om-reh.svg`,meaning:`The Pillar of Eternal Closure`,description:`Locks each cycle’s final chapter under unbreakable law, preventing regression.`},{id:494,name:`Zor-Kai-Veh-Lah`,sigil:`/assets/sigils/zor-kai-veh-lah.svg`,meaning:`The Fire of Aerating Creation`,description:`Infuses movement into stagnant planes, reigniting their spark of life.`},{id:495,name:`Sha-Nor-Om-Zeh`,sigil:`/assets/sigils/sha-nor-om-zeh.svg`,meaning:`The Krown of All-Seeing Completion`,description:`Unifies universal insight with finality, ensuring that no truths remain hidden.`},{id:496,name:`Kai-Reh-Lah-Om`,sigil:`/assets/sigils/kai-reh-lah-om.svg`,meaning:`The Breath Unveiling Sacred Harmony`,description:`Clears illusions to reveal the inherent orchestration woven into every realm.`},{id:497,name:`Zeh-Urim-Sha-Ek`,sigil:`/assets/sigils/zeh-urim-sha-ek.svg`,meaning:`The Radiant Light of Sovereign Insight`,description:`Empowers rulers with luminous clarity, guaranteeing unwavering guidance.`},{id:498,name:`Tor-Nah-Kai-Rah`,sigil:`/assets/sigils/tor-nah-kai-rah.svg`,meaning:`The Pillar of Unified Ascension`,description:`Merges diverse energies into one unstoppable climb toward cosmic mastery.`},{id:499,name:`Om-Sha-Lah-Zeh`,sigil:`/assets/sigils/om-sha-lah-zeh.svg`,meaning:`The Completion of Krowned Radiance`,description:`Seals divine leadership with a brilliant aura, unshakable by any lesser force.`},{id:500,name:`Kai-Zor-Eh-Nim`,sigil:`/assets/sigils/kai-zor-eh-nim.svg`,meaning:`The Incinerating Breath of Mysteries`,description:`Uncovers secrets through an intense flame, ensuring no falsehood survives.`},{id:501,name:`Sha-Veh-Rah-Om`,sigil:`/assets/sigils/sha-veh-rah-om.svg`,meaning:`The Krown of Ascending Winds`,description:`Guides potent currents upward, Krowning them with cosmic endorsement.`},{id:502,name:`Zeh-Lah-Nor-Ek`,sigil:`/assets/sigils/zeh-lah-nor-ek.svg`,meaning:`The Radiant Mind That Dissolves Darkness`,description:`Brightens any plane of thought, evaporating illusions with unstoppable clarity.`},{id:503,name:`Tor-Om-Nim-Sha`,sigil:`/assets/sigils/tor-om-nim-sha.svg`,meaning:`The Pillar of Hidden Completion`,description:`Concludes grand cycles in secret places, ensuring a seamless transition to new epochs.`},{id:504,name:`Kai-Nah-Zeh-Reh`,sigil:`/assets/sigils/kai-nah-zeh-reh.svg`,meaning:`The Breath of Triumphant Light`,description:`A shining exhalation that propels honest endeavors into cosmic victory.`},{id:505,name:`Zor-Ek-Om-Lah`,sigil:`/assets/sigils/zor-ek-om-lah.svg`,meaning:`The Fire That Seals Tranquility`,description:`Blazes fiercely to lock in peaceful states, preventing the encroachment of chaos.`},{id:506,name:`Sha-Rah-Kai-Eh`,sigil:`/assets/sigils/sha-rah-kai-eh.svg`,meaning:`The Krown of Ascending Creation`,description:`Lifts generative forces to their zenith, establishing cosmic harmonies in all realms.`},{id:507,name:`Tor-Lah-Ek-Nim`,sigil:`/assets/sigils/tor-lah-ek-nim.svg`,meaning:`The Pillar of Serene Unfolding`,description:`Supports graceful revelation, releasing hidden truths in measured waves.`},{id:508,name:`Om-Nor-Zor-Reh`,sigil:`/assets/sigils/om-nor-zor-reh.svg`,meaning:`The Completion of Purging Insight`,description:`Concludes destructive illusions by shining a decisive beam of knowledge upon them.`},{id:509,name:`Kai-Ur-Sha-Lah`,sigil:`/assets/sigils/kai-ur-sha-lah.svg`,meaning:`The Ascendant Breath of Regal Peace`,description:`Unites authoritative presence with tranquil currents, ensuring stable dominion.`},{id:510,name:`Zeh-Om-Ek-Nor`,sigil:`/assets/sigils/zeh-om-ek-nor.svg`,meaning:`The Radiant Completion of Inviolable Mind`,description:`Concludes every mental struggle in unwavering clarity, sealing away confusion.`},{id:511,name:`Veh-Zor-Rah-Sha`,sigil:`/assets/sigils/veh-zor-rah-sha.svg`,meaning:`The Wind of Ascending Flames`,description:`Stokes each flicker of truth into an all-consuming fire of divine revelation.`},{id:512,name:`Kai-Eh-Lah-Nor`,sigil:`/assets/sigils/kai-eh-lah-nor.svg`,meaning:`The Breath of Serene Guidance`,description:`Quietly shepherds scattered souls into the luminous field of cosmic unity.`},{id:513,name:`Sha-Nim-Urim-Om`,sigil:`/assets/sigils/sha-nim-urim-om.svg`,meaning:`The Krown of Hidden Illumination`,description:`Cloaks its radiance until the decisive moment, then enlightens every shadowed corner.`},{id:514,name:`Zor-Lah-Reh-Ek`,sigil:`/assets/sigils/zor-lah-reh-ek.svg`,meaning:`The Fire That Heals Through Knowledge`,description:`Cleanses distortions at their intellectual core, restoring truth across all fields.`},{id:515,name:`Tor-Om-Kai-Nah`,sigil:`/assets/sigils/tor-om-kai-nah.svg`,meaning:`The Pillar of Complete Life-Force`,description:`Channels vital currents into the roots of existence, guaranteeing endless renewal.`},{id:516,name:`Sha-Zeh-Ek-Ur`,sigil:`/assets/sigils/sha-zeh-ek-ur.svg`,meaning:`The Krown of Radiant Erasure`,description:`Effortlessly removes defunct systems, enthroning pure potential in their place.`},{id:517,name:`Kai-Rah-Nim-Om`,sigil:`/assets/sigils/kai-rah-nim-om.svg`,meaning:`The Ascending Breath of Silent Mysteries`,description:`Lifts cryptic truths from hidden domains, culminating in unstoppable realization.`},{id:518,name:`Zeh-Om-Sha-Lah`,sigil:`/assets/sigils/zeh-om-sha-lah.svg`,meaning:`The Radiant Harmony of Completion`,description:`Unites finality with sovereign grace, forming a perfect chord of divine order.`},{id:519,name:`Veh-Kai-Eh-Nor`,sigil:`/assets/sigils/veh-kai-eh-nor.svg`,meaning:`The Wind of Peaceful Awareness`,description:`Soothes turbulent minds, allowing them to open gently to cosmic truths.`},{id:520,name:`Sha-Tor-Nah-Reh`,sigil:`/assets/sigils/sha-tor-nah-reh.svg`,meaning:`The Krown of Unshakable Unity`,description:`Seals discordant pieces of reality into a single, harmonious tapestry.`},{id:521,name:`Zor-Mah-Lah-Om`,sigil:`/assets/sigils/zor-mah-lah-om.svg`,meaning:`The Fire of Renewed Stillness`,description:`Ignites destructive forces, only to transmute them into cosmic peace.`},{id:522,name:`Kai-Nor-Ur-Ek`,sigil:`/assets/sigils/kai-nor-ur-ek.svg`,meaning:`The Breath of Enlightened Strength`,description:`Fortifies mental resolve with primal energy, forging an indomitable spirit.`},{id:523,name:`Om-Zeh-Rah-Lah`,sigil:`/assets/sigils/om-zeh-rah-lah.svg`,meaning:`The Completion of Ascending Radiance`,description:`Ensures each rising spark of truth emerges victorious, sealed in cosmic law.`},{id:524,name:`Sha-Veh-Nim-Kai`,sigil:`/assets/sigils/sha-veh-nim-kai.svg`,meaning:`The Krown of Undetected Awakening`,description:`Spreads regal clarity beneath the surface, culminating in sudden universal shift.`},{id:525,name:`Tor-Eh-Om-Zor`,sigil:`/assets/sigils/tor-eh-om-zor.svg`,meaning:`The Pillar of Timeless Flame`,description:`Links eternal structure with unwavering fire, forging a beacon for all epochs.`},{id:526,name:`Zeh-Kai-Lah-Rah`,sigil:`/assets/sigils/zeh-kai-lah-rah.svg`,meaning:`The Shining Breath of Ascension`,description:`Blazes through stagnant layers, elevating them under a new cosmic dawn.`},{id:527,name:`Om-Nor-Sha-Ek`,sigil:`/assets/sigils/om-nor-sha-ek.svg`,meaning:`The Completion of Mind’s Regal Decree`,description:`Renders each final thought a sovereign command, impossible to refute.`},{id:528,name:`Kai-Zor-Urim-Lah`,sigil:`/assets/sigils/kai-zor-urim-lah.svg`,meaning:`The Breath of Illuminated Kingship`,description:`Instills transcendent wisdom in rulers, ensuring they govern with unblemished clarity.`},{id:529,name:`Veh-Eh-Rah-Om`,sigil:`/assets/sigils/veh-eh-rah-om.svg`,meaning:`The Wind of Elevated Completion`,description:`Carries final decisions to cosmic heights, removing them from lesser debates.`},{id:530,name:`Sha-Lah-Zeh-Nor`,sigil:`/assets/sigils/sha-lah-zeh-nor.svg`,meaning:`The Krown of Serene Radiant Mind`,description:`Guides each thought to a peaceful glow, solidifying them in unwavering truth.`},{id:531,name:`Zor-Kai-Om-Reh`,sigil:`/assets/sigils/zor-kai-om-reh.svg`,meaning:`The Fire of Manifested Breath`,description:`Transmutes spoken intentions into living flames that redefine reality.`},{id:532,name:`Tor-Nim-Eh-Lah`,sigil:`/assets/sigils/tor-nim-eh-lah.svg`,meaning:`The Hidden Pillar of Tranquil Existence`,description:`Stabilizes creation through subtle support, granting silent solace to every soul.`},{id:533,name:`Kai-Rah-Ur-Ek`,sigil:`/assets/sigils/kai-rah-ur-ek.svg`,meaning:`The Ascending Breath of Unbreakable Law`,description:`Anchors each realm to cosmic statutes, lifting them toward perfected order.`},{id:534,name:`Zeh-Om-Sha-Nim`,sigil:`/assets/sigils/zeh-om-sha-nim.svg`,meaning:`The Radiant Completion of Quiet Rule`,description:`Finalizes the reign of subtle leaders who preserve cosmic harmony.`},{id:535,name:`Veh-Kai-Reh-Lah`,sigil:`/assets/sigils/veh-kai-reh-lah.svg`,meaning:`The Wind of Illuminating Breath`,description:`Spreads clarity across realms, uniting scattered sparks of insight into a cohesive blaze.`},{id:536,name:`Sha-Ek-Zor-Om`,sigil:`/assets/sigils/sha-ek-zor-om.svg`,meaning:`The Krown of Consuming Completion`,description:`Devours all residues of deceit, ending each cycle in immaculate truth.`},{id:537,name:`Tor-Lah-Nim-Kai`,sigil:`/assets/sigils/tor-lah-nim-kai.svg`,meaning:`The Pillar of Soft Awakening`,description:`Gently lifts dormant worlds into cosmic awareness, forging new expansions of life.`},{id:538,name:`Zeh-Sha-Eh-Rah`,sigil:`/assets/sigils/zeh-sha-eh-rah.svg`,meaning:`The Radiant Krown of Ascension’s Dawn`,description:`Signals the first light of true sovereignty, dispelling all vestiges of tyranny.`},{id:539,name:`Om-Veh-Kai-Lah`,sigil:`/assets/sigils/om-veh-kai-lah.svg`,meaning:`The Completion of Moving Creation`,description:`Ensures ongoing cycles reach perfect form, never stagnating midway.`},{id:540,name:`Kai-Nah-Reh-Sha`,sigil:`/assets/sigils/kai-nah-reh-sha.svg`,meaning:`The Breath That Unifies Hearts and Minds`,description:`Aligns internal motives with external actions, solidifying universal coherence.`},{id:541,name:`Zor-Om-Lah-Ek`,sigil:`/assets/sigils/zor-om-lah-ek.svg`,meaning:`The Fire of Peaceful Erasure`,description:`Burns away ancient conflicts, imprinting calm understanding in their place.`},{id:542,name:`Sha-Tor-Zeh-Nim`,sigil:`/assets/sigils/sha-tor-zeh-nim.svg`,meaning:`The Krowned Pillar of Hidden Light`,description:`Exalts concealed truth in a place of prominence, ensuring no realm remains blind.`},{id:543,name:`Nor-Eh-Kai-Om`,sigil:`/assets/sigils/nor-eh-kai-om.svg`,meaning:`The Mind of Primal Completion`,description:`Synthesizes ancient power into a conclusive wave of perfected existence.`},{id:544,name:`Zeh-Nah-Sha-Rah`,sigil:`/assets/sigils/zeh-nah-sha-rah.svg`,meaning:`The Radiant Flow of Regal Ascension`,description:`Moves steadily upward, enthroning balanced leadership in the cosmic hierarchy.`},{id:545,name:`Kai-Om-Ek-Lah`,sigil:`/assets/sigils/kai-om-ek-lah.svg`,meaning:`The Breath of Final Integration`,description:`Unites scattered fragments into a seamless tapestry of sovereign reality.`},{id:546,name:`Tor-Reh-Ur-Nim`,sigil:`/assets/sigils/tor-reh-ur-nim.svg`,meaning:`The Pillar of Ever-Revealing Wisdom`,description:`Continually unveils deeper truths, ensuring evolution does not stagnate.`},{id:547,name:`Sha-Lah-Zor-Om`,sigil:`/assets/sigils/sha-lah-zor-om.svg`,meaning:`The Krown of Serene Flames`,description:`Combines gentle dominion with purifying fire, forging a balanced rulership.`},{id:548,name:`Zeh-Kai-Nor-Eh`,sigil:`/assets/sigils/zeh-kai-nor-eh.svg`,meaning:`The Shining Breath of Cosmic Vision`,description:`Illuminates the far reaches of reality, ensuring no corner remains unseen.`},{id:549,name:`Om-Ek-Rah-Nah`,sigil:`/assets/sigils/om-ek-rah-nah.svg`,meaning:`The Completion of Ascending Force`,description:`Locks in the final surge of upward motion, guaranteeing unstoppable progression.`},{id:550,name:`Kai-Zor-Lah-Sha`,sigil:`/assets/sigils/kai-zor-lah-sha.svg`,meaning:`The Breath of Peaceful Fire`,description:`Ignites calm and measured transformation, removing turbulence from cosmic rebirth.`},{id:551,name:`Veh-Om-Nim-Rah`,sigil:`/assets/sigils/veh-om-nim-rah.svg`,meaning:`The Wind of Unseen Ascent`,description:`Blows gently, yet carries souls to the highest pinnacle of sovereign awakening.`},{id:552,name:`Sha-Eh-Lah-Zeh`,sigil:`/assets/sigils/sha-eh-lah-zeh.svg`,meaning:`The Krown of Infinite Radiance`,description:`Shines unending light upon those who align with cosmic justice.`},{id:553,name:`Tor-Kai-Ur-Nim`,sigil:`/assets/sigils/tor-kai-ur-nim.svg`,meaning:`The Pillar of Ascending Mysteries`,description:`Stabilizes the climb toward higher revelations, ensuring no faltering of resolve.`},{id:554,name:`Zeh-Sha-Om-Reh`,sigil:`/assets/sigils/zeh-sha-om-reh.svg`,meaning:`The Radiant Krown of Manifested Decree`,description:`Solidifies spoken truths under an unbreakable halo of cosmic sanction.`},{id:555,name:`Kai-Lah-Nor-Ek`,sigil:`/assets/sigils/kai-lah-nor-ek.svg`,meaning:`The Breathing Peace of Higher Mind`,description:`Directs consciousness toward tranquility, fortifying realms against disarray.`},{id:556,name:`Zor-Eh-Tor-Om`,sigil:`/assets/sigils/zor-eh-tor-om.svg`,meaning:`The Fire of Eternal Foundations`,description:`Safeguards primordial structures from corruption, fueling them with unceasing vigor.`},{id:557,name:`Sha-Rah-Nim-Lah`,sigil:`/assets/sigils/sha-rah-nim-lah.svg`,meaning:`The Krown of Quiet Triumph`,description:`Proclaims success in hushed majesty, overshadowing the clamor of lesser claims.`},{id:558,name:`Om-Kai-Reh-Zeh`,sigil:`/assets/sigils/om-kai-reh-zeh.svg`,meaning:`The Completion of Creative Revelation`,description:`Marries the final step of genesis with piercing insight, forging unstoppable clarity.`},{id:559,name:`Veh-Lah-Zor-Ur`,sigil:`/assets/sigils/veh-lah-zor-ur.svg`,meaning:`The Wind That Guides Purifying Fire`,description:`Directs sacred flames to where they are needed, ensuring cosmic cleansing.`},{id:560,name:`Kai-Eh-Om-Sha`,sigil:`/assets/sigils/kai-eh-om-sha.svg`,meaning:`The Breath of Harmonized Completion`,description:`Synchronizes final steps across realms, concluding them under a banner of unity.`},{id:561,name:`Zeh-Nor-Ek-Lah`,sigil:`/assets/sigils/zeh-nor-ek-lah.svg`,meaning:`The Radiant Mind That Dissolves Discord`,description:`Instantly sees through conflict, channeling solutions from a luminous core.`},{id:562,name:`Sha-Tor-Mah-Om`,sigil:`/assets/sigils/sha-tor-mah-om.svg`,meaning:`The Krowned Pillar of Renewing Completion`,description:`Continually revives cosmic cycles, never allowing them to stagnate or degrade.`},{id:563,name:`Nor-Rah-Eh-Kai`,sigil:`/assets/sigils/nor-rah-eh-kai.svg`,meaning:`The Vision of Ascendant Breath`,description:`Perceives the path of cosmic evolution, guiding each realm to higher purpose.`},{id:564,name:`Zeh-Sha-Lah-Om`,sigil:`/assets/sigils/zeh-sha-lah-om.svg`,meaning:`The Radiant Krown of Eternal Harmony`,description:`Fosters unending peace, enthroning mutual accord as the supreme law.`},{id:565,name:`Kai-Nim-Veh-Reh`,sigil:`/assets/sigils/kai-nim-veh-reh.svg`,meaning:`The Hidden Breath of Swift Insight`,description:`Delivers revelations when least expected, resetting distorted perspectives instantly.`},{id:566,name:`Tor-Lah-Zor-Ek`,sigil:`/assets/sigils/tor-lah-zor-ek.svg`,meaning:`The Pillar of Serene Fire`,description:`Maintains a steady flame that refines without destroying, ensuring balanced progress.`},{id:567,name:`Zeh-Om-Kai-Nor`,sigil:`/assets/sigils/zeh-om-kai-nor.svg`,meaning:`The Radiant Seal of Living Mind`,description:`Consolidates cosmic consciousness into a final imprint of luminous order.`},{id:568,name:`Sha-Eh-Rah-Lah`,sigil:`/assets/sigils/sha-eh-rah-lah.svg`,meaning:`The Krown of Ascended Tranquility`,description:`Sits atop those who have conquered inner turmoil, awarding them universal respect.`},{id:569,name:`Kai-Om-Reh-Nah`,sigil:`/assets/sigils/kai-om-reh-nah.svg`,meaning:`The Breath That Concludes Creation`,description:`Speaks the final word in each genesis, weaving them seamlessly into cosmic flow.`},{id:570,name:`Zor-Nor-Ek-Sha`,sigil:`/assets/sigils/zor-nor-ek-sha.svg`,meaning:`The Fire of Mindful Eradication`,description:`Removes only what is false, preserving the core truths needed for growth.`},{id:571,name:`Veh-Lah-Om-Nim`,sigil:`/assets/sigils/veh-lah-om-nim.svg`,meaning:`The Wind of Hidden Completion`,description:`Flows quietly among the final steps of cosmic transitions, cementing their success.`},{id:572,name:`Sha-Rah-Eh-Kai`,sigil:`/assets/sigils/sha-rah-eh-kai.svg`,meaning:`The Krown of Ascended Wisdom`,description:`Anoints those who have climbed the tower of insight, rendering them guardians of law.`},{id:573,name:`Tor-Zeh-Nah-Om`,sigil:`/assets/sigils/tor-zeh-nah-om.svg`,meaning:`The Pillar of Radiant Serenity`,description:`Dispels discord with a pervasive calm, anchoring entire realms in gentle stability.`},{id:574,name:`Zeh-Kai-Ek-Sha`,sigil:`/assets/sigils/zeh-kai-ek-sha.svg`,meaning:`The Shining Breath of Sovereign Erasure`,description:`Instantly dissolves outmoded patterns, clearing the way for renewed creation.`},{id:575,name:`Om-Nor-Lah-Reh`,sigil:`/assets/sigils/om-nor-lah-reh.svg`,meaning:`The Completion of Wise Peace`,description:`Seals cosmic awareness in a tranquil state, preventing the return of turmoil.`},{id:576,name:`Kai-Tor-Mah-Zeh`,sigil:`/assets/sigils/kai-tor-mah-zeh.svg`,meaning:`The Ascending Pillar of Rebirth`,description:`Lifts each realm from the ashes of old cycles, forging them anew in cosmic light.`},{id:577,name:`Zor-Eh-Sha-Lah`,sigil:`/assets/sigils/zor-eh-sha-lah.svg`,meaning:`The Fire of Eternal Coronation`,description:`Krowns the rightful sovereign in flames that cannot be extinguished.`},{id:578,name:`Veh-Om-Nim-Kai`,sigil:`/assets/sigils/veh-om-nim-kai.svg`,meaning:`The Wind of Subtle Genesis`,description:`Fosters the birth of new cosmic seeds with minimal disturbance to existing frameworks.`},{id:579,name:`Sha-Zeh-Ek-Rah`,sigil:`/assets/sigils/sha-zeh-ek-rah.svg`,meaning:`The Radiant Krown of Ascending Flame`,description:`Combines luminous authority with rising fire, blazing a trail of majestic renewal.`},{id:580,name:`Tor-Lah-Om-Reh`,sigil:`/assets/sigils/tor-lah-om-reh.svg`,meaning:`The Pillar of Serene Manifestation`,description:`Materializes outcomes in perfect balance, never tipping the cosmic scales.`},{id:581,name:`Kai-Nor-Sha-Eh`,sigil:`/assets/sigils/kai-nor-sha-eh.svg`,meaning:`The Breath of Insightful Sovereignty`,description:`Discloses the path of rightful leadership to those who seek pure understanding.`},{id:582,name:`Zeh-Om-Rah-Lah`,sigil:`/assets/sigils/zeh-om-rah-lah.svg`,meaning:`The Radiant Completion of Regal Ascent`,description:`Fulfills each monarchy’s final stage, ensuring a stable legacy under cosmic law.`},{id:583,name:`Veh-Ek-Nim-Ur`,sigil:`/assets/sigils/veh-ek-nim-ur.svg`,meaning:`The Wind of Unveiled Foundations`,description:`Sweeps away illusions to reveal the bedrock of universal truths.`},{id:584,name:`Sha-Tor-Reh-Kai`,sigil:`/assets/sigils/sha-tor-reh-kai.svg`,meaning:`The Krowned Pillar of Illuminated Breath`,description:`Captures the synergy of structure and spirit, forging an unassailable seat of rule.`},{id:585,name:`Zor-Lah-Eh-Om`,sigil:`/assets/sigils/zor-lah-eh-om.svg`,meaning:`The Fire of Tranquil Completion`,description:`A steady flame that finalizes cosmic chapters without chaos or strife.`},{id:586,name:`Kai-Rah-Nor-Ek`,sigil:`/assets/sigils/kai-rah-nor-ek.svg`,meaning:`The Ascending Breath of Mindful Law`,description:`Lifts each regulation to a higher vantage, ensuring justice is never corrupted.`},{id:587,name:`Zeh-Sha-Nah-Veh`,sigil:`/assets/sigils/zeh-sha-nah-veh.svg`,meaning:`The Radiant Krown of Harmonious Wind`,description:`Brings gentle breezes of wisdom under regal authority, uplifting all who heed it.`},{id:588,name:`Tor-Om-Ek-Lah`,sigil:`/assets/sigils/tor-om-ek-lah.svg`,meaning:`The Pillar That Closes All Cycles`,description:`Upholds the final word in cosmic transitions, blocking any return to past errors.`},{id:589,name:`Sha-Nim-Ur-Reh`,sigil:`/assets/sigils/sha-nim-ur-reh.svg`,meaning:`The Krown of Hidden Enlightenment`,description:`Ignites the concealed spark of truth, enthroning it in silent sovereign power.`},{id:590,name:`Kai-Lah-Zeh-Om`,sigil:`/assets/sigils/kai-lah-zeh-om.svg`,meaning:`The Breathing Peace of Radiant Completion`,description:`Exhales serenity over each realm, guaranteeing cosmic stability at its final phase.`},{id:591,name:`Zor-Eh-Kai-Nah`,sigil:`/assets/sigils/zor-eh-kai-nah.svg`,meaning:`The Fire of Pure Unification`,description:`Merges disparate energies through a cleansing blaze, forging cohesive unity.`},{id:592,name:`Veh-Om-Sha-Reh`,sigil:`/assets/sigils/veh-om-sha-reh.svg`,meaning:`The Wind That Krowns Revelation`,description:`Elevates discovered truths, Krowning them with regal authority across realms.`},{id:593,name:`Sha-Tor-Lah-Ek`,sigil:`/assets/sigils/sha-tor-lah-ek.svg`,meaning:`The Krowned Pillar of Serene Dissolution`,description:`Gently dismantles exhausted systems, making space for new cosmic architecture.`},{id:594,name:`Om-Nor-Zeh-Kai`,sigil:`/assets/sigils/om-nor-zeh-kai.svg`,meaning:`The Completion of Radiant Mind-Breath`,description:`Locks in the synergy of clarity and creation, producing unstoppable cosmic expansions.`},{id:595,name:`Zeh-Nim-Sha-Rah`,sigil:`/assets/sigils/zeh-nim-sha-rah.svg`,meaning:`The Radiant Spark of Ascending Harmony`,description:`Kindles subtle chords of unity, raising them into a chorus of cosmic justice.`},{id:596,name:`Kai-Eh-Om-Nor`,sigil:`/assets/sigils/kai-eh-om-nor.svg`,meaning:`The Breath of Serene Understanding`,description:`Exhales quiet wisdom, realigning each perspective with universal law.`},{id:597,name:`Zor-Rah-Veh-Lah`,sigil:`/assets/sigils/zor-rah-veh-lah.svg`,meaning:`The Fire of Ascending Currents`,description:`Flows upward in unstoppable waves, clearing debris from the path of truth.`},{id:598,name:`Sha-Lah-Om-Ek`,sigil:`/assets/sigils/sha-lah-om-ek.svg`,meaning:`The Krown of Peaceful Erasure`,description:`Silently dissolves residual negativity, leaving a blank canvas for new creation.`},{id:599,name:`Tor-Nim-Kai-Reh`,sigil:`/assets/sigils/tor-nim-kai-reh.svg`,meaning:`The Hidden Pillar of Illuminated Breath`,description:`Supports the stealthy rise of truth, culminating in a grand unveiling of cosmic law.`},{id:600,name:`Zeh-Om-Lah-Nor`,sigil:`/assets/sigils/zeh-om-lah-nor.svg`,meaning:`The Radiant Completion of Peaceful Mind`,description:`Ensures final mental unity, bridging all divides under benevolent light.`},{id:601,name:`Kai-Zor-Eh-Sha`,sigil:`/assets/sigils/kai-zor-eh-sha.svg`,meaning:`The Breathing Flame of Regal Dawn`,description:`Ignites each new epoch in a blaze of golden authority, enthroning rightful leaders.`},{id:602,name:`Veh-Ur-Om-Nim`,sigil:`/assets/sigils/veh-ur-om-nim.svg`,meaning:`The Wind of Illuminated Secrets`,description:`Softly reveals concealed treasures of knowledge, scattering them into open consciousness.`},{id:603,name:`Sha-Ek-Lah-Reh`,sigil:`/assets/sigils/sha-ek-lah-reh.svg`,meaning:`The Krown of Effortless Revelation`,description:`Unveils cosmic truths without turmoil, installing them smoothly into collective awareness.`},{id:604,name:`Tor-Nor-Zeh-Kai`,sigil:`/assets/sigils/tor-nor-zeh-kai.svg`,meaning:`The Pillar of Mindful Radiance`,description:`An unwavering beacon that guides souls toward clear, luminous thought.`},{id:605,name:`Om-Mah-Sha-Zor`,sigil:`/assets/sigils/om-mah-sha-zor.svg`,meaning:`The Completion of Rebirth’s Sovereign Flame`,description:`Locks in each renewal with purifying fire, enthroning fresh beginnings under divine decree.`},{id:606,name:`Zeh-Kai-Nim-Rah`,sigil:`/assets/sigils/zeh-kai-nim-rah.svg`,meaning:`The Rising Spark of Ascendant Mystery`,description:`A luminous seed that quietly grows, dissolving illusions in its steady ascent.`},{id:607,name:`Sha-Om-Lah-Ek`,sigil:`/assets/sigils/sha-om-lah-ek.svg`,meaning:`The Krown of Silent Emergence`,description:`Manifests hidden truths into gentle, sovereign rule that none can overturn.`},{id:608,name:`Tor-Reh-Zeh-Nor`,sigil:`/assets/sigils/tor-reh-zeh-nor.svg`,meaning:`The Pillar of Shining Wisdom`,description:`Rises from the depths of knowledge, ensuring every realm is guided by clarity.`},{id:609,name:`Kai-Nah-Urim-Eh`,sigil:`/assets/sigils/kai-nah-urim-eh.svg`,meaning:`The Breath of Unyielding Light`,description:`Imbues each cycle with unstoppable radiance, outshining any lingering shadow.`},{id:610,name:`Zor-Ek-Sha-Nor`,sigil:`/assets/sigils/zor-ek-sha-nor.svg`,meaning:`The Fire That Krowns the Mind`,description:`Burns away doubt, installing regal insight at the heart of cosmic reason.`},{id:611,name:`Veh-Rah-Om-Lah`,sigil:`/assets/sigils/veh-rah-om-lah.svg`,meaning:`The Wind of Ascending Completion`,description:`Bears each realm upward to finalize its destiny in silent, triumphant grace.`},{id:612,name:`Sha-Kai-Eh-Nim`,sigil:`/assets/sigils/sha-kai-eh-nim.svg`,meaning:`The Krown of Serene Revelation`,description:`Lifts hidden knowledge into royal prominence without violent upheaval.`},{id:613,name:`Zeh-Lah-Om-Reh`,sigil:`/assets/sigils/zeh-lah-om-reh.svg`,meaning:`The Radiant Peace of Conclusive Decree`,description:`Locks in final verdicts under a calm, luminous state that no force can undo.`},{id:614,name:`Tor-Nim-Kai-Ek`,sigil:`/assets/sigils/tor-nim-kai-ek.svg`,meaning:`The Pillar of Subtle Creation`,description:`Steadily constructs new realities, woven from the quiet breath of truth.`},{id:615,name:`Om-Nor-Rah-Lah`,sigil:`/assets/sigils/om-nor-rah-lah.svg`,meaning:`The Completion of Visionary Peace`,description:`Unites foresight and tranquility, ushering in an era of boundless harmony.`},{id:616,name:`Kai-Ek-Zor-Nah`,sigil:`/assets/sigils/kai-ek-zor-nah.svg`,meaning:`The Breath of Devouring Renewal`,description:`Consumes stagnant energies, feeding the eternal cycle of transformative life.`},{id:617,name:`Sha-Om-Reh-Zeh`,sigil:`/assets/sigils/sha-om-reh-zeh.svg`,meaning:`The Krown of Complete Revelation`,description:`Declares all illusions undone, enthroning cosmic truths in final sovereignty.`},{id:618,name:`Zeh-Kai-Lah-Nim`,sigil:`/assets/sigils/zeh-kai-lah-nim.svg`,meaning:`The Shining Breath of New Dawns`,description:`Casts radiant seeds into barren realms, birthing fresh epochs of promise.`},{id:619,name:`Tor-Eh-Sha-Om`,sigil:`/assets/sigils/tor-eh-sha-om.svg`,meaning:`The Unwavering Pillar of Sovereign Completion`,description:`Guarantees the finality of regal decrees, unmovable by ephemeral doubt.`},{id:620,name:`Veh-Ur-Lah-Zor`,sigil:`/assets/sigils/veh-ur-lah-zor.svg`,meaning:`The Wind That Delivers Healing Flame`,description:`Conveys purifying fires to wounded realms, restoring them to rightful wholeness.`},{id:621,name:`Kai-Nah-Ek-Sha`,sigil:`/assets/sigils/kai-nah-ek-sha.svg`,meaning:`The Breath That Gently Erases`,description:`Removes defunct structures with compassion, paving the way for cosmic rebirth.`},{id:622,name:`Zeh-Reh-Om-Lah`,sigil:`/assets/sigils/zeh-reh-om-lah.svg`,meaning:`The Radiant Fulfillment of Harmony`,description:`Culminates each aspirational path in a pristine state of universal accord.`},{id:623,name:`Sha-Zor-Kai-Nim`,sigil:`/assets/sigils/sha-zor-kai-nim.svg`,meaning:`The Krown of Transformative Breath`,description:`Channels unstoppable flame into creative cycles, ensuring growth beyond limitation.`},{id:624,name:`Tor-Om-Eh-Reh`,sigil:`/assets/sigils/tor-om-eh-reh.svg`,meaning:`The Pillar of Eternal Insight`,description:`Anchors timeless truths so they remain accessible through endless renewals.`},{id:625,name:`Zeh-Lah-Kai-Ur`,sigil:`/assets/sigils/zeh-lah-kai-ur.svg`,meaning:`The Shining Peace of Divine Power`,description:`Balances regal might with luminous tranquility, forging an enlightened rule.`},{id:626,name:`Veh-Sha-Rah-Nim`,sigil:`/assets/sigils/veh-sha-rah-nim.svg`,meaning:`The Wind of Ascending Enigma`,description:`Carries hidden wonders upward, blending them with cosmic revelations.`},{id:627,name:`Kai-Om-Zeh-Ek`,sigil:`/assets/sigils/kai-om-zeh-ek.svg`,meaning:`The Breath of Radiant Eradication`,description:`Extinguishes deep illusions, ensuring each realm remains faithful to truth.`},{id:628,name:`Sha-Lah-Nor-Mah`,sigil:`/assets/sigils/sha-lah-nor-mah.svg`,meaning:`The Krown of Mindful Renewal`,description:`Fosters mental clarity and gentle rebirth, enthroning enlightened guardianship.`},{id:629,name:`Zor-Eh-Tor-Nim`,sigil:`/assets/sigils/zor-eh-tor-nim.svg`,meaning:`The Fire of Hidden Ascension`,description:`Burns unobtrusively at the roots of existence, fueling unstoppable cosmic progress.`},{id:630,name:`Om-Nah-Kai-Reh`,sigil:`/assets/sigils/om-nah-kai-reh.svg`,meaning:`The Completion of Expansive Breath`,description:`Cements each expansive act with a final seal, preventing regress into old forms.`},{id:631,name:`Tor-Lah-Sha-Ek`,sigil:`/assets/sigils/tor-lah-sha-ek.svg`,meaning:`The Pillar of Tranquil Erasure`,description:`Dismantles chaotic energies, grounding reality in unblemished cosmic law.`},{id:632,name:`Kai-Eh-Nor-Om`,sigil:`/assets/sigils/kai-eh-nor-om.svg`,meaning:`The Breath That Illuminates All Minds`,description:`A gentle exhalation bestowing higher perspectives upon every seeker.`},{id:633,name:`Zeh-Ur-Nim-Sha`,sigil:`/assets/sigils/zeh-ur-nim-sha.svg`,meaning:`The Shining Light of Enigmatic Krowns`,description:`Reveals hidden sovereigns by illuminating their rightful authority from within.`},{id:634,name:`Sha-Om-Lah-Urim`,sigil:`/assets/sigils/sha-om-lah-urim.svg`,meaning:`The Krown of Peaceful Illumination`,description:`Radiates gentle clarity over all realms, uniting them under serene guidance.`},{id:635,name:`Tor-Reh-Ek-Zor`,sigil:`/assets/sigils/tor-reh-ek-zor.svg`,meaning:`The Pillar of Devouring Insight`,description:`Stands as an unmovable structure that consumes ignorance, shedding cosmic understanding.`},{id:636,name:`Veh-Kai-Nah-Lah`,sigil:`/assets/sigils/veh-kai-nah-lah.svg`,meaning:`The Wind of Lifegiving Peace`,description:`Blows forth sustaining energies across reality, anchoring them in serene wholeness.`},{id:637,name:`Zeh-Om-Sha-Rah`,sigil:`/assets/sigils/zeh-om-sha-rah.svg`,meaning:`The Radiant Completion of Ascendant Rule`,description:`Finalizes the reign of upright leaders, bathed in unstoppable cosmic brilliance.`},{id:638,name:`Kai-Lah-Ek-Nim`,sigil:`/assets/sigils/kai-lah-ek-nim.svg`,meaning:`The Breath of Gentle Dissolution`,description:`Diffuses harmful structures into cosmic dust, freeing space for vibrant potential.`},{id:639,name:`Sha-Zor-Reh-Om`,sigil:`/assets/sigils/sha-zor-reh-om.svg`,meaning:`The Krown of Cleansing Proclamation`,description:`Pronounces an unmistakable verdict of purity, overshadowing all shadows.`},{id:640,name:`Tor-Nor-Kai-Lah`,sigil:`/assets/sigils/tor-nor-kai-lah.svg`,meaning:`The Pillar of Enlightened Tranquility`,description:`Elevates each realm into calm, illuminated states, dissolving fear at its core.`},{id:641,name:`Zeh-Eh-Ur-Nim`,sigil:`/assets/sigils/zeh-eh-ur-nim.svg`,meaning:`The Shining Gate of Subtle Revelation`,description:`Gently opens doors to concealed truths, guiding them into rightful prominence.`},{id:642,name:`Veh-Om-Lah-Kai`,sigil:`/assets/sigils/veh-om-lah-kai.svg`,meaning:`The Wind of Complete Harmony`,description:`Blends finality and new life, ensuring all realms move in balanced unison.`},{id:643,name:`Kai-Reh-Zor-Ek`,sigil:`/assets/sigils/kai-reh-zor-ek.svg`,meaning:`The Breath of Incinerating Revelation`,description:`Exposes illusions in a fiery moment of clarity, forging unstoppable transformation.`},{id:644,name:`Sha-Nim-Om-Lah`,sigil:`/assets/sigils/sha-nim-om-lah.svg`,meaning:`The Krown of Unseen Completion`,description:`Cements cosmic finales in silence, preventing disruption by lesser vibrations.`},{id:645,name:`Zeh-Kai-Rah-Nor`,sigil:`/assets/sigils/zeh-kai-rah-nor.svg`,meaning:`The Shining Breath of Ascending Mind`,description:`Raises mental constructs into luminous realms, dethroning every dark concept.`},{id:646,name:`Tor-Lah-Ur-Eh`,sigil:`/assets/sigils/tor-lah-ur-eh.svg`,meaning:`The Pillar of Gentle Force`,description:`A firm yet soft presence that undergirds cosmic law with compassionate might.`},{id:647,name:`Om-Zor-Ek-Nim`,sigil:`/assets/sigils/om-zor-ek-nim.svg`,meaning:`The Completion of Purifying Enigma`,description:`Ensures hidden flames refine each realm to the point of cosmic perfection.`},{id:648,name:`Kai-Nah-Sha-Lah`,sigil:`/assets/sigils/kai-nah-sha-lah.svg`,meaning:`The Breath of Unified Peace`,description:`Bridges all differences in a calm exhalation, weaving universes into oneness.`},{id:649,name:`Zeh-Reh-Om-Veh`,sigil:`/assets/sigils/zeh-reh-om-veh.svg`,meaning:`The Radiant Closure of Ascending Winds`,description:`Locks cosmic currents into righteous pathways, freeing no space for illusions.`},{id:650,name:`Sha-Kai-Eh-Ur`,sigil:`/assets/sigils/sha-kai-eh-ur.svg`,meaning:`The Krown of Eternal Drive`,description:`Catalyzes unstoppable forward motion, enthroning purposeful evolution across realms.`},{id:651,name:`Tor-Nim-Zeh-Lah`,sigil:`/assets/sigils/tor-nim-zeh-lah.svg`,meaning:`The Secret Pillar of Radiant Peace`,description:`Safeguards cosmic equilibrium in hidden dimensions, quietly ensuring stability.`},{id:652,name:`Veh-Om-Rah-Ek`,sigil:`/assets/sigils/veh-om-rah-ek.svg`,meaning:`The Wind of Elevated Dissolution`,description:`Sweeps away illusions from lofty vantage points, finalizing cosmic realignments.`},{id:653,name:`Kai-Lah-Nor-Reh`,sigil:`/assets/sigils/kai-lah-nor-reh.svg`,meaning:`The Breath of Tranquil Vision`,description:`Infuses minds with serene clarity, enabling them to perceive the path of truth.`},{id:654,name:`Zor-Eh-Om-Sha`,sigil:`/assets/sigils/zor-eh-om-sha.svg`,meaning:`The Fire of Conclusive Authority`,description:`Blazes with absolute decisiveness, ratifying final decrees in cosmic law.`},{id:655,name:`Sha-Nah-Veh-Kai`,sigil:`/assets/sigils/sha-nah-veh-kai.svg`,meaning:`The Krown of Harmonious Motion`,description:`Orchestrates seamless flows across realities, Krowning them with cosmic unity.`},{id:656,name:`Tor-Om-Zeh-Ek`,sigil:`/assets/sigils/tor-om-zeh-ek.svg`,meaning:`The Pillar of Radiant Erasure`,description:`Upholds truth by disintegrating falsehood, anchoring existence in luminous purity.`},{id:657,name:`Om-Nor-Sha-Lah`,sigil:`/assets/sigils/om-nor-sha-lah.svg`,meaning:`The Completion of Wise Peace`,description:`Installs a permanent calm upon all who align with cosmic intelligence.`},{id:658,name:`Kai-Reh-Eh-Nim`,sigil:`/assets/sigils/kai-reh-eh-nim.svg`,meaning:`The Breath of Illuminated Secrets`,description:`Breathes light into obscure corners, ensuring hidden truths surface for cosmic benefit.`},{id:659,name:`Zeh-Kai-Rah-Lah`,sigil:`/assets/sigils/zeh-kai-rah-lah.svg`,meaning:`The Shining Breath of Royal Ascent`,description:`Elevates rightful rulers with luminous force, forging unassailable thrones.`},{id:660,name:`Veh-Ek-Zor-Om`,sigil:`/assets/sigils/veh-ek-zor-om.svg`,meaning:`The Wind of Cleansing Judgment`,description:`Sweeps across realms to finalize karmic cycles, leaving only purified states behind.`},{id:661,name:`Sha-Lah-Ur-Reh`,sigil:`/assets/sigils/sha-lah-ur-reh.svg`,meaning:`The Krown of Gentle Illumination`,description:`Grants quiet enlightenment, dethroning ignorance with subtle cosmic might.`},{id:662,name:`Tor-Nim-Eh-Kai`,sigil:`/assets/sigils/tor-nim-eh-kai.svg`,meaning:`The Hidden Pillar of Eternal Breath`,description:`Sustains cosmic life force from unseen depths, ensuring perpetual renewal.`},{id:663,name:`Zeh-Om-Lah-Sha`,sigil:`/assets/sigils/zeh-om-lah-sha.svg`,meaning:`The Radiant Completion of Sovereign Peace`,description:`Seals each realm under a tranquil aura, unopposed by lesser vibrations.`},{id:664,name:`Kai-Ur-Nor-Mah`,sigil:`/assets/sigils/kai-ur-nor-mah.svg`,meaning:`The Ascendant Breath of Mindful Rebirth`,description:`Activates cycles of transformation rooted in deep wisdom, securing cosmic progress.`},{id:665,name:`Zor-Ek-Rah-Lah`,sigil:`/assets/sigils/zor-ek-rah-lah.svg`,meaning:`The Fire of Triumphant Ascension`,description:`Scorches away lower structures, exalting rightful forms in unstoppable radiance.`},{id:666,name:`Sha-Nim-Kai-Om`,sigil:`/assets/sigils/sha-nim-kai-om.svg`,meaning:`The Krown of Secret Genesis`,description:`Empowers hidden seeds of creation to flourish into full cosmic authority.`},{id:667,name:`Tor-Lah-Reh-Zeh`,sigil:`/assets/sigils/tor-lah-reh-zeh.svg`,meaning:`The Pillar of Tranquil Revelation`,description:`Ensures all illusions fade in silent grace, revealing cosmic truths with gentle certainty.`},{id:668,name:`Veh-Om-Nor-Ek`,sigil:`/assets/sigils/veh-om-nor-ek.svg`,meaning:`The Wind of Mental Dissolution`,description:`Blows illusions from the mind, leaving clarity unchallenged by deceit.`},{id:669,name:`Kai-Eh-Zor-Nim`,sigil:`/assets/sigils/kai-eh-zor-nim.svg`,meaning:`The Breath of Hidden Flames`,description:`Stokes covert fires of purification, kindling them in perfect cosmic timing.`},{id:670,name:`Zeh-Sha-Om-Lah`,sigil:`/assets/sigils/zeh-sha-om-lah.svg`,meaning:`The Radiant Krown of Perfect Calm`,description:`A luminous crest that settles all turbulence, enthroning quiet majesty everywhere.`},{id:671,name:`Sha-Rah-Kai-Nor`,sigil:`/assets/sigils/sha-rah-kai-nor.svg`,meaning:`The Krown of Ascendant Mental Force`,description:`Projects regal will through elevated thought, forging unstoppable directives across realms.`},{id:672,name:`Tor-Eh-Om-Nim`,sigil:`/assets/sigils/tor-eh-om-nim.svg`,meaning:`The Pillar of Eternal Mystery`,description:`Safeguards cosmic secrets beyond mortal comprehension, ensuring cyclical unveiling.`},{id:673,name:`Kai-Nah-Zeh-Lah`,sigil:`/assets/sigils/kai-nah-zeh-lah.svg`,meaning:`The Breath of Serene Radiance`,description:`Lights new paths with calm brilliance, disallowing confusion to take root.`},{id:674,name:`Zor-Ur-Sha-Ek`,sigil:`/assets/sigils/zor-ur-sha-ek.svg`,meaning:`The Fire of Unshakable Erasure`,description:`An unwavering blaze that vanquishes falsehood, enthroning cosmic authenticity.`},{id:675,name:`Om-Lah-Reh-Kai`,sigil:`/assets/sigils/om-lah-reh-kai.svg`,meaning:`The Completion of Peaceful Creation`,description:`Fuses harmonious stillness with generative power, concluding each cycle in luminous success.`},{id:676,name:`Sha-Zeh-Rah-Nim`,sigil:`/assets/sigils/sha-zeh-rah-nim.svg`,meaning:`The Krown of Rising Brilliance`,description:`Gradually dawns on suppressed realms, flooding them with regal clarity.`},{id:677,name:`Tor-Nor-Eh-Om`,sigil:`/assets/sigils/tor-nor-eh-om.svg`,meaning:`The Pillar of Quiet Ascension`,description:`Raises each dimension without fanfare, ensuring stable transitions into higher planes.`},{id:678,name:`Kai-Ek-Lah-Sha`,sigil:`/assets/sigils/kai-ek-lah-sha.svg`,meaning:`The Breath That Dissolves Chaos`,description:`Calms raging storms, forging tranquil order from the embers of strife.`},{id:679,name:`Zeh-Om-Nim-Rah`,sigil:`/assets/sigils/zeh-om-nim-rah.svg`,meaning:`The Radiant Fulfillment of Subtle Ascension`,description:`Empowers gentle climbs to cosmic apex, sealing them under luminous law.`},{id:680,name:`Veh-Sha-Kai-Eh`,sigil:`/assets/sigils/veh-sha-kai-eh.svg`,meaning:`The Wind of Krowned Emergence`,description:`A breeze announcing new sovereigns rising from obscurity, unstoppable in purpose.`},{id:681,name:`Om-Lah-Zor-Nor`,sigil:`/assets/sigils/om-lah-zor-nor.svg`,meaning:`The Completion of Tranquil Fire`,description:`Extinguishes harmful flames, preserving only the purifying essence that nurtures truth.`},{id:682,name:`Kai-Rah-Ek-Nim`,sigil:`/assets/sigils/kai-rah-ek-nim.svg`,meaning:`The Ascending Breath of Unveiled Secrets`,description:`Elevates elusive truths into the open air, forging revelations beyond dispute.`},{id:683,name:`Zeh-Sha-Lah-Urim`,sigil:`/assets/sigils/zeh-sha-lah-urim.svg`,meaning:`The Radiant Krown of Illuminated Peace`,description:`Spreads a tranquil glow over each realm, anchoring them in sovereign clarity.`},{id:684,name:`Tor-Eh-Kai-Om`,sigil:`/assets/sigils/tor-eh-kai-om.svg`,meaning:`The Pillar of Immovable Creation`,description:`Rooted in cosmic authority, it fosters unstoppable generative currents across timelines.`},{id:685,name:`Veh-Nor-Ek-Lah`,sigil:`/assets/sigils/veh-nor-ek-lah.svg`,meaning:`The Wind of Thoughtful Erasure`,description:`Eradicates outdated concepts, refreshing minds with subtle but potent force.`},{id:686,name:`Kai-Nah-Zor-Reh`,sigil:`/assets/sigils/kai-nah-zor-reh.svg`,meaning:`The Breath of Purifying Ascension`,description:`Combines calm renewal with cleansing fire, uplifting every soul into luminous realms.`},{id:687,name:`Zeh-Om-Sha-Nim`,sigil:`/assets/sigils/zeh-om-sha-nim.svg`,meaning:`The Radiant Seal of Subtle Reign`,description:`Finalizes hidden dominions under cosmic law, preventing infiltration by false claims.`},{id:688,name:`Sha-Lah-Reh-Ek`,sigil:`/assets/sigils/sha-lah-reh-ek.svg`,meaning:`The Krown of Pure Unraveling`,description:`Gently unties destructive knots in reality, restoring each thread to sovereign truth.`},{id:689,name:`Tor-Nor-Om-Zeh`,sigil:`/assets/sigils/tor-nor-om-zeh.svg`,meaning:`The Pillar of Conclusive Illumination`,description:`Caps cosmic expansions with a final blaze of insight, leaving no vantage for deception.`},{id:690,name:`Kai-Eh-Rah-Nah`,sigil:`/assets/sigils/kai-eh-rah-nah.svg`,meaning:`The Ascending Breath of Tranquil Force`,description:`Gently compels upward motion, dissolving aggression with calm, unstoppable will.`},{id:691,name:`Zor-Ek-Sha-Om`,sigil:`/assets/sigils/zor-ek-sha-om.svg`,meaning:`The Fire That Krowns Completion`,description:`Seals final decrees with an unwavering flame, ensuring no backslide into falsehood.`},{id:692,name:`Veh-Lah-Nor-Kai`,sigil:`/assets/sigils/veh-lah-nor-kai.svg`,meaning:`The Wind of Peaceful Revelation`,description:`Glides through illusions, revealing cosmic knowledge with gentle but absolute authority.`},{id:693,name:`Om-Reh-Eh-Nim`,sigil:`/assets/sigils/om-reh-eh-nim.svg`,meaning:`The Completion of Enlightened Depth`,description:`Brings recondite truths into the open, concluding mysteries in a burst of clarity.`},{id:694,name:`Sha-Zeh-Kai-Lah`,sigil:`/assets/sigils/sha-zeh-kai-lah.svg`,meaning:`The Radiant Krown of Breathing Peace`,description:`Enthrones a wave of tranquility that spreads across realms in luminous exhalations.`},{id:695,name:`Tor-Ur-Nor-Ek`,sigil:`/assets/sigils/tor-ur-nor-ek.svg`,meaning:`The Pillar of Unbreakable Mind`,description:`Fortifies cosmic thought with unwavering structure, repelling deception at every turn.`},{id:696,name:`Kai-Om-Lah-Nim`,sigil:`/assets/sigils/kai-om-lah-nim.svg`,meaning:`The Breath of Unseen Harmony`,description:`Settles hidden rifts, weaving them into one universal symphony of cosmic intent.`},{id:697,name:`Zeh-Eh-Sha-Reh`,sigil:`/assets/sigils/zeh-eh-sha-reh.svg`,meaning:`The Shining Emergence of Final Decree`,description:`Appears at the last moment to confirm absolute truths, sealing all lesser arguments.`},{id:698,name:`Veh-Rah-Kai-Nor`,sigil:`/assets/sigils/veh-rah-kai-nor.svg`,meaning:`The Wind of Ascending Insight`,description:`Elevates collective awareness, ensuring illusions cannot withstand cosmic scrutiny.`},{id:699,name:`Sha-Lah-Om-Eh`,sigil:`/assets/sigils/sha-lah-om-eh.svg`,meaning:`The Krown of Serene Completion`,description:`Bestows unchallenged finality, clothed in the gentle glow of divine acceptance.`},{id:700,name:`Zor-Ek-Nim-Kai`,sigil:`/assets/sigils/zor-ek-nim-kai.svg`,meaning:`The Fire of Enigmatic Creation`,description:`Forges new realities from cryptic sparks, unveiling them when cosmic timing is ripe.`},{id:701,name:`Tor-Om-Sha-Reh`,sigil:`/assets/sigils/tor-om-sha-reh.svg`,meaning:`The Pillar of Final Proclamation`,description:`Elevates each sovereign statement into cosmic law, granting it everlasting force.`},{id:702,name:`Kai-Nah-Eh-Zor`,sigil:`/assets/sigils/kai-nah-eh-zor.svg`,meaning:`The Breath of Serene Flame`,description:`Melts stubborn illusions in a calm, unwavering burn, ensuring gentle but total cleansing.`},{id:703,name:`Zeh-Reh-Om-Nim`,sigil:`/assets/sigils/zeh-reh-om-nim.svg`,meaning:`The Radiant Closure of Hidden Cycles`,description:`Completes undisclosed transitions with luminous finality, preserving cosmic equilibrium.`},{id:704,name:`Sha-Zor-Lah-Kai`,sigil:`/assets/sigils/sha-zor-lah-kai.svg`,meaning:`The Krown of Sustaining Fire`,description:`Maintains a gentle blaze that nourishes instead of destroying, fostering infinite renewal.`},{id:705,name:`Veh-Ek-Om-Rah`,sigil:`/assets/sigils/veh-ek-om-rah.svg`,meaning:`The Wind of Conclusive Ascension`,description:`Uplifts final transformations to ensure their rightful place in cosmic cycles.`},{id:706,name:`Kai-Lah-Nor-Zeh`,sigil:`/assets/sigils/kai-lah-nor-zeh.svg`,meaning:`The Breath of Tranquil Brilliance`,description:`Instills each mind with shining calm, eradicating confusion at its root.`},{id:707,name:`Zor-Eh-Sha-Nim`,sigil:`/assets/sigils/zor-eh-sha-nim.svg`,meaning:`The Fire of Enlightened Secrets`,description:`Quietly burns through illusions in hidden realms, unveiling cosmic truths to the worthy.`},{id:708,name:`Om-Nah-Kai-Lah`,sigil:`/assets/sigils/om-nah-kai-lah.svg`,meaning:`The Completion of Peaceful Breath`,description:`Unites stillness and generative essence into a final, abiding harmony.`},{id:709,name:`Sha-Reh-Ur-Ek`,sigil:`/assets/sigils/sha-reh-ur-ek.svg`,meaning:`The Krown of Illuminated Dissolution`,description:`Wears away illusions in a flood of cosmic clarity, enthroning transparent truth.`},{id:710,name:`Tor-Nim-Zeh-Kai`,sigil:`/assets/sigils/tor-nim-zeh-kai.svg`,meaning:`The Pillar of Hidden Radiant Breath`,description:`Acts as a covert support for cosmic exhalations, ensuring unstoppable creative expansions.`},{id:711,name:`Zeh-Om-Lah-Nor`,sigil:`/assets/sigils/zeh-om-lah-nor.svg`,meaning:`The Shining Completion of Tranquil Mind`,description:`Resolves mental struggles under a brilliant calm, forging an unshaken vantage.`},{id:712,name:`Kai-Rah-Ek-Sha`,sigil:`/assets/sigils/kai-rah-ek-sha.svg`,meaning:`The Ascending Breath of Effortless Rule`,description:`Empowers rightful governance without conflict, seamlessly establishing cosmic order.`},{id:713,name:`Veh-Om-Nim-Zeh`,sigil:`/assets/sigils/veh-om-nim-zeh.svg`,meaning:`The Wind of Quiet Brilliance`,description:`Circulates hidden radiance among souls, amplifying insights with gentle force.`},{id:714,name:`Sha-Zor-Eh-Lah`,sigil:`/assets/sigils/sha-zor-eh-lah.svg`,meaning:`The Krown of Cleansing Light`,description:`Dispels darkness from the highest seat of authority, enthroning divine clarity.`},{id:715,name:`Tor-Lah-Reh-Kai`,sigil:`/assets/sigils/tor-lah-reh-kai.svg`,meaning:`The Pillar of Tranquil Genesis`,description:`Calmly lifts new creations into being, anchoring them in cosmic stability.`},{id:716,name:`Zeh-Nah-Om-Ek`,sigil:`/assets/sigils/zeh-nah-om-ek.svg`,meaning:`The Radiant Flow of Final Erasure`,description:`Gently washes away defunct patterns, saturating realms in effulgent renewal.`},{id:717,name:`Kai-Ur-Nor-Reh`,sigil:`/assets/sigils/kai-ur-nor-reh.svg`,meaning:`The Ascendant Breath of Enlightened Mind`,description:`Elevates consciousness beyond superficial illusions, revealing cosmic wisdom at every turn.`},{id:718,name:`Om-Sha-Lah-Zor`,sigil:`/assets/sigils/om-sha-lah-zor.svg`,meaning:`The Completion of Sovereign Flame`,description:`Concludes each sovereign cycle in a blaze of truth, leaving no lie unburned.`},{id:719,name:`Zeh-Eh-Kai-Nim`,sigil:`/assets/sigils/zeh-eh-kai-nim.svg`,meaning:`The Shining Gate of Breathing Mysteries`,description:`Forges a threshold through which hidden creation flows, lit by cosmic brilliance.`},{id:720,name:`Sha-Rah-Om-Lah`,sigil:`/assets/sigils/sha-rah-om-lah.svg`,meaning:`The Krown of Ascendant Completion`,description:`Uplifts final moments of cosmic cycles, stamping them with regal, unalterable authority.`},{id:721,name:`Tor-Nim-Ek-Zor`,sigil:`/assets/sigils/tor-nim-ek-zor.svg`,meaning:`The Pillar of Covert Purification`,description:`Purges harmful energies from hidden corners, upholding cosmic sanctity.`},{id:722,name:`Kai-Lah-Reh-Om`,sigil:`/assets/sigils/kai-lah-reh-om.svg`,meaning:`The Breath of Serene Fulfillment`,description:`Quietly finalizes each aspiration, breathing triumphant calm into universal realms.`},{id:723,name:`Zeh-Ur-Sha-Nah`,sigil:`/assets/sigils/zeh-ur-sha-nah.svg`,meaning:`The Shining Throne of Harmonious Peace`,description:`Places cosmic stillness at the apex of rulership, dissolving all strife with radiant mercy.`},{id:724,name:`Veh-Om-Kai-Eh`,sigil:`/assets/sigils/veh-om-kai-eh.svg`,meaning:`The Wind of Living Existence`,description:`Breathes primal energy across worlds, ensuring continuous cosmic evolution.`},{id:725,name:`Sha-Zor-Nor-Ek`,sigil:`/assets/sigils/sha-zor-nor-ek.svg`,meaning:`The Krown of Cleansing Mind-Fire`,description:`Ignites thought realms with regal flame, banishing illusions from the seat of awareness.`},{id:726,name:`Tor-Lah-Om-Nim`,sigil:`/assets/sigils/tor-lah-om-nim.svg`,meaning:`The Pillar of Serene Mystery`,description:`Holds up cryptic truths in a tranquil embrace, letting them emerge in perfect time.`},{id:727,name:`Kai-Nah-Eh-Reh`,sigil:`/assets/sigils/kai-nah-eh-reh.svg`,meaning:`The Breath of Unified Vision`,description:`Merges disparate viewpoints into a cohesive tapestry of cosmic insight.`},{id:728,name:`Zeh-Om-Rah-Sha`,sigil:`/assets/sigils/zeh-om-rah-sha.svg`,meaning:`The Radiant Convergence of Royal Ascension`,description:`Brings noble lineages to the surface in a burst of unstoppable luminous authority.`},{id:729,name:`Sha-Lah-Ek-Nor`,sigil:`/assets/sigils/sha-lah-ek-nor.svg`,meaning:`The Krown of Dissolving Barriers`,description:`Melts away rigid boundaries, granting the mind unimpeded access to cosmic law.`},{id:730,name:`Om-Nim-Zeh-Kai`,sigil:`/assets/sigils/om-nim-zeh-kai.svg`,meaning:`The Completion of Subtle Radiance`,description:`Seals each hidden spark with gentle brilliance, preventing intrusion by false energies.`},{id:731,name:`Veh-Eh-Rah-Nah`,sigil:`/assets/sigils/veh-eh-rah-nah.svg`,meaning:`The Wind of Elevated Harmony`,description:`Lifts chaotic vibrations into calm unity, weaving cosmic threads into symphonic order.`},{id:732,name:`Zor-Sha-Om-Ek`,sigil:`/assets/sigils/zor-sha-om-ek.svg`,meaning:`The Fire of Sovereign Erasure`,description:`Incinerates false dominions, preserving only the rightful seat of cosmic authority.`},{id:733,name:`Kai-Lah-Nim-Reh`,sigil:`/assets/sigils/kai-lah-nim-reh.svg`,meaning:`The Breath of Serene Revelation`,description:`Unfolds hidden wonders in tranquil sequences, never forcing abrupt disclosure.`},{id:734,name:`Sha-Reh-Eh-Zeh`,sigil:`/assets/sigils/sha-reh-eh-zeh.svg`,meaning:`The Krown of Pure Disclosure`,description:`Reveals cosmic secrets with unwavering clarity, Krowning truth as unassailable law.`},{id:735,name:`Tor-Nor-Kai-Om`,sigil:`/assets/sigils/tor-nor-kai-om.svg`,meaning:`The Pillar of Enlightened Creation`,description:`Combines higher intelligence with primal breath, forging realms of enduring harmony.`},{id:736,name:`Zeh-Ur-Ek-Nah`,sigil:`/assets/sigils/zeh-ur-ek-nah.svg`,meaning:`The Shining Throne of Compassionate Erasure`,description:`Destroys harmful constructs with empathy, salvaging what can be reclaimed.`},{id:737,name:`Veh-Om-Sha-Nor`,sigil:`/assets/sigils/veh-om-sha-nor.svg`,meaning:`The Wind of Krowning Insight`,description:`Delivers revelations to rightful rulers, finalizing their cosmic legitimacy.`},{id:738,name:`Kai-Eh-Lah-Mah`,sigil:`/assets/sigils/kai-eh-lah-mah.svg`,meaning:`The Breath of Gentle Renewal`,description:`Nurtures new beginnings with a calm, maternal force, ensuring stable expansions.`},{id:739,name:`Zor-Reh-Nim-Ek`,sigil:`/assets/sigils/zor-reh-nim-ek.svg`,meaning:`The Fire of Secret Dissolution`,description:`Consumes concealed distortions at their source, clearing paths for cosmic progress.`},{id:740,name:`Om-Lah-Kai-Nor`,sigil:`/assets/sigils/om-lah-kai-nor.svg`,meaning:`The Completion of Serene Creation`,description:`Ensures every emergent realm is locked into harmony, free from chaotic infiltration.`},{id:741,name:`Sha-Zeh-Rah-Ek`,sigil:`/assets/sigils/sha-zeh-rah-ek.svg`,meaning:`The Krown of Radiant Ascent`,description:`Bestows cosmic brilliance upon rightful leaders, guiding them skyward without hindrance.`},{id:742,name:`Tor-Nim-Ur-Om`,sigil:`/assets/sigils/tor-nim-ur-om.svg`,meaning:`The Pillar of Unseen Illumination`,description:`Offers silent structure that upholds hidden enlightenment across intersecting realms.`},{id:743,name:`Kai-Nah-Eh-Sha`,sigil:`/assets/sigils/kai-nah-eh-sha.svg`,meaning:`The Breath of Unified Emergence`,description:`Brings forth collective awakenings in measured harmony, leaving no corner untouched.`},{id:744,name:`Zeh-Om-Lah-Reh`,sigil:`/assets/sigils/zeh-om-lah-reh.svg`,meaning:`The Radiant Conclusion of Peaceful Knowledge`,description:`Unifies stable insight with cosmic calm, finalizing them under an enduring glow.`},{id:745,name:`Sha-Kai-Nim-Ek`,sigil:`/assets/sigils/sha-kai-nim-ek.svg`,meaning:`The Krown of Breathing Erasure`,description:`Exhales illusions into oblivion, confirming cosmic truth as the sole valid reality.`},{id:746,name:`Veh-Rah-Lah-Om`,sigil:`/assets/sigils/veh-rah-lah-om.svg`,meaning:`The Wind of Ascending Peace`,description:`Wafts tranquility to higher planes, balancing intense energies with quiet restraint.`},{id:747,name:`Tor-Eh-Zor-Nah`,sigil:`/assets/sigils/tor-eh-zor-nah.svg`,meaning:`The Pillar of Eternal Flame`,description:`Holds cosmic fire at the core, ensuring every realm experiences purifying brilliance.`},{id:748,name:`Zeh-Nor-Om-Sha`,sigil:`/assets/sigils/zeh-nor-om-sha.svg`,meaning:`The Shining Mind of Regal Completion`,description:`Ensures that every royal edict is sealed with unwavering clarity and finality.`},{id:749,name:`Kai-Lah-Nim-Eh`,sigil:`/assets/sigils/kai-lah-nim-eh.svg`,meaning:`The Breath of Serene Unfolding`,description:`Releases cosmic revelations in gentle waves, allowing each realm to adapt gracefully.`},{id:750,name:`Zor-Ur-Ek-Reh`,sigil:`/assets/sigils/zor-ur-ek-reh.svg`,meaning:`The Fire of Unbreakable Insight`,description:`Burns with unwavering conviction, scattering illusions that contradict cosmic law.`},{id:751,name:`Sha-Om-Lah-Nor`,sigil:`/assets/sigils/sha-om-lah-nor.svg`,meaning:`The Krown of Quiet Clarity`,description:`Conveys regal simplicity that cuts through mental noise, establishing unchallenged wisdom.`},{id:752,name:`Tor-Reh-Om-Kai`,sigil:`/assets/sigils/tor-reh-om-kai.svg`,meaning:`The Pillar of Culminated Creation`,description:`At the apex of every new domain, it stands as the final stabilizing force.`},{id:753,name:`Zeh-Kai-Nah-Sha`,sigil:`/assets/sigils/zeh-kai-nah-sha.svg`,meaning:`The Shining Breath of Infinite Peace`,description:`A luminous exhalation that Seals all realms in abiding tranquility.`},{id:754,name:`Veh-Ek-Rah-Nim`,sigil:`/assets/sigils/veh-ek-rah-nim.svg`,meaning:`The Wind of Cleansing Ascension`,description:`Carries destructive remnants out of existence, facilitating seamless cosmic evolution.`},{id:755,name:`Kai-Om-Zor-Lah`,sigil:`/assets/sigils/kai-om-zor-lah.svg`,meaning:`The Breath of Final Purification`,description:`Inhales lingering debris of illusions, exhaling purified realms into cosmic order.`},{id:756,name:`Sha-Lah-Eh-Kai`,sigil:`/assets/sigils/sha-lah-eh-kai.svg`,meaning:`The Krown of Sublime Creation`,description:`Oversees new expansions with a gentle, unwavering force that fosters universal harmony.`},{id:757,name:`Zeh-Nor-Ek-Om`,sigil:`/assets/sigils/zeh-nor-ek-om.svg`,meaning:`The Shining Mind of Erasing Completion`,description:`Eliminates extraneous complexities, finalizing cosmic clarity for all who seek it.`},{id:758,name:`Veh-Rah-Nim-Sha`,sigil:`/assets/sigils/veh-rah-nim-sha.svg`,meaning:`The Wind of Ascending Mysteries`,description:`Guides hidden truths upward, ensuring each revelation claims its rightful domain.`},{id:759,name:`Tor-Eh-Lah-Kai`,sigil:`/assets/sigils/tor-eh-lah-kai.svg`,meaning:`The Pillar of Eternal Serenity`,description:`Anchors perpetual peace into the core of creation, unshaken by lower unrest.`},{id:760,name:`Zeh-Om-Reh-Nah`,sigil:`/assets/sigils/zeh-om-reh-nah.svg`,meaning:`The Radiant Completion of Revealed Harmony`,description:`Locks cosmic synergy into place, concluding each revelation in lasting tranquility.`},{id:761,name:`Kai-Nor-Ur-Eh`,sigil:`/assets/sigils/kai-nor-ur-eh.svg`,meaning:`The Ascendant Breath of Mindful Illumination`,description:`Marries pure intellect with unstoppable life force, culminating in cosmic enlightenment.`},{id:762,name:`Sha-Zor-Ek-Lah`,sigil:`/assets/sigils/sha-zor-ek-lah.svg`,meaning:`The Krown of Flame’s Gentle Dissolution`,description:`Seals fiery transformations within a calm center, releasing only constructive outcomes.`},{id:763,name:`Om-Nah-Kai-Nim`,sigil:`/assets/sigils/om-nah-kai-nim.svg`,meaning:`The Completion of Infinite Breathing`,description:`Cycles cosmic essence through realms, ensuring they never stagnate or decline.`},{id:764,name:`Zeh-Reh-Sha-Eh`,sigil:`/assets/sigils/zeh-reh-sha-eh.svg`,meaning:`The Radiant Truth of Serene Rulership`,description:`Proclaims an unopposed domain of clarity, dissolving any hidden misalignment.`},{id:765,name:`Tor-Nim-Veh-Om`,sigil:`/assets/sigils/tor-nim-veh-om.svg`,meaning:`The Pillar of Secret Winds`,description:`Supports gentle currents that transform realms from within, ensuring unstoppable progress.`},{id:766,name:`Kai-Lah-Ur-Zeh`,sigil:`/assets/sigils/kai-lah-ur-zeh.svg`,meaning:`The Ascendant Breath of Shining Peace`,description:`Carries luminous tranquility through dimensional thresholds, elevating all who embrace it.`},{id:767,name:`Zor-Ek-Om-Rah`,sigil:`/assets/sigils/zor-ek-om-rah.svg`,meaning:`The Fire That Finalizes Ascension`,description:`Converts each step of growth into a blazing triumph, halting any backward slide.`},{id:768,name:`Sha-Nah-Reh-Nim`,sigil:`/assets/sigils/sha-nah-reh-nim.svg`,meaning:`The Krown of Harmonized Vision`,description:`Unites communal insight into a single beam of regal authority, unstoppable in scope.`},{id:769,name:`Tor-Lah-Eh-Om`,sigil:`/assets/sigils/tor-lah-eh-om.svg`,meaning:`The Pillar of Serene Completion`,description:`Roots cosmic finality in a calm, unwavering vantage, immune to lesser tremors.`},{id:770,name:`Zeh-Kai-Nim-Sha`,sigil:`/assets/sigils/zeh-kai-nim-sha.svg`,meaning:`The Shining Breath of Hidden Krowns`,description:`Illuminates rightful rulers concealed behind illusions, exalting them at destined moments.`},{id:771,name:`Om-Ek-Rah-Lah`,sigil:`/assets/sigils/om-ek-rah-lah.svg`,meaning:`The Completion of Ascending Flame`,description:`Ensures each rising spark reaches full brilliance, sealing it with cosmic law.`},{id:772,name:`Veh-Nor-Lah-Eh`,sigil:`/assets/sigils/veh-nor-lah-eh.svg`,meaning:`The Wind of Enlightened Peace`,description:`Carries gentle clarity across minds, unifying them in a single wave of cosmic calm.`},{id:773,name:`Sha-Zor-Nah-Om`,sigil:`/assets/sigils/sha-zor-nah-om.svg`,meaning:`The Krown of Purifying Harmony`,description:`Blends cleansing flame with serene order, enthroning truth in quiet radiance.`},{id:774,name:`Kai-Lah-Reh-Ek`,sigil:`/assets/sigils/kai-lah-reh-ek.svg`,meaning:`The Ascendant Breath of Gentle Dissolution`,description:`Resolves cosmic friction with subtle force, aligning every strand of existence.`},{id:775,name:`Zeh-Ur-Om-Nim`,sigil:`/assets/sigils/zeh-ur-om-nim.svg`,meaning:`The Shining Throne of Hidden Completion`,description:`Sits in plain sight yet remains unseen by the unworthy, guarding cosmic transitions.`},{id:776,name:`Tor-Eh-Kai-Nah`,sigil:`/assets/sigils/tor-eh-kai-nah.svg`,meaning:`The Pillar of Eternal Breathflow`,description:`Channels unstoppable life force through realms, guaranteeing infinite generative cycles.`},{id:777,name:`Sha-Om-Sha-Reh`,sigil:`/assets/sigils/sha-om-sha-reh.svg`,meaning:`The Krown of Krowned Completion`,description:`Duplicates regal authority within final decrees, forming an unbreakable monarchy of truth.`},{id:778,name:`Zor-Ek-Lah-Ur`,sigil:`/assets/sigils/zor-ek-lah-ur.svg`,meaning:`The Fire of Effortless Stillness`,description:`Combusts chaotic movements into tranquil sparks, forging universal calm in its wake.`},{id:779,name:`Kai-Nim-Reh-Zeh`,sigil:`/assets/sigils/kai-nim-reh-zeh.svg`,meaning:`The Breath of Revealed Brilliance`,description:`Unveils hidden jewels of insight, shining them for all to behold in perfect clarity.`},{id:780,name:`Veh-Om-Lah-Nor`,sigil:`/assets/sigils/veh-om-lah-nor.svg`,meaning:`The Wind of Peaceful Perception`,description:`Washes across minds, clarifying each vantage until only truth remains.`},{id:781,name:`Sha-Reh-Ek-Mah`,sigil:`/assets/sigils/sha-reh-ek-mah.svg`,meaning:`The Krown of Purifying Renewal`,description:`Renews each realm by dissolving stagnation at its core, enthroning fresh vitality.`},{id:782,name:`Tor-Nor-Om-Zor`,sigil:`/assets/sigils/tor-nor-om-zor.svg`,meaning:`The Pillar of Mindful Fire`,description:`Harnesses flames within structured thought, ensuring no chaos emerges from the blaze.`},{id:783,name:`Kai-Eh-Lah-Nor`,sigil:`/assets/sigils/kai-eh-lah-nor.svg`,meaning:`The Ascending Breath of Calm Insight`,description:`Elevates each observer to panoramic awareness, bypassing confusion with serene power.`},{id:784,name:`Zeh-Rah-Sha-Ek`,sigil:`/assets/sigils/zeh-rah-sha-ek.svg`,meaning:`The Shining Crest of Devouring Judgment`,description:`Consumes every false claim in sovereign brilliance, upholding only righteous rule.`},{id:785,name:`Veh-Lah-Om-Nim`,sigil:`/assets/sigils/veh-lah-om-nim.svg`,meaning:`The Wind of Lasting Completeness`,description:`Sails through realms bestowing closure, ensuring final states remain inviolate.`},{id:786,name:`Sha-Kai-Rah-Nah`,sigil:`/assets/sigils/sha-kai-rah-nah.svg`,meaning:`The Krown of Ascending Unity`,description:`Gathers separated forces into one cohesive wave, surging upward in unstoppable synergy.`},{id:787,name:`Tor-Eh-Sha-Nim`,sigil:`/assets/sigils/tor-eh-sha-nim.svg`,meaning:`The Pillar of Eternal Sovereignty`,description:`Stabilizes the reign of cosmic truth, protecting it from transitory influences.`},{id:788,name:`Om-Nor-Ek-Lah`,sigil:`/assets/sigils/om-nor-ek-lah.svg`,meaning:`The Completion of Clear Erasure`,description:`Eradicates distortions under the directive of pristine cosmic vision.`},{id:789,name:`Kai-Nah-Reh-Zor`,sigil:`/assets/sigils/kai-nah-reh-zor.svg`,meaning:`The Breath of Peaceful Flame`,description:`Calms realms in a warm glow, preventing destructive or chaotic outbursts.`},{id:790,name:`Zeh-Om-Sha-Eh`,sigil:`/assets/sigils/zeh-om-sha-eh.svg`,meaning:`The Radiant Closure of Regally Spoken Truth`,description:`Seals each sovereign pronouncement with shining finality, unstoppable by lesser claims.`},{id:791,name:`Sha-Lah-Nim-Rah`,sigil:`/assets/sigils/sha-lah-nim-rah.svg`,meaning:`The Krown of Silent Ascension`,description:`Elevates chosen souls with little fanfare, placing them on cosmic thrones undisputed.`},{id:792,name:`Tor-Ur-Eh-Zor`,sigil:`/assets/sigils/tor-ur-eh-zor.svg`,meaning:`The Pillar of Unbreakable Flames`,description:`Holds unwavering fire at the core of creation, ensuring illusions cannot resurface.`},{id:793,name:`Kai-Om-Lah-Reh`,sigil:`/assets/sigils/kai-om-lah-reh.svg`,meaning:`The Breath That Finalizes Peace`,description:`Installs calm across all realities, leaving no stronghold for discord to reemerge.`},{id:794,name:`Zeh-Ek-Nor-Sha`,sigil:`/assets/sigils/zeh-ek-nor-sha.svg`,meaning:`The Shining Erasure of Sovereign Mind`,description:`Eliminates mental corruption with a radiant sweep, empowering cosmic leadership.`},{id:795,name:`Veh-Rah-Om-Nim`,sigil:`/assets/sigils/veh-rah-om-nim.svg`,meaning:`The Wind of Ascending Secrets`,description:`Brings cryptic truths to light, weaving them seamlessly into cosmic narratives.`},{id:796,name:`Sha-Kai-Lah-Eh`,sigil:`/assets/sigils/sha-kai-lah-eh.svg`,meaning:`The Krown of Life’s Primal Source`,description:`Stands at the origin of cosmic breath, granting unstoppable impetus to new creations.`},{id:797,name:`Tor-Nor-Zor-Om`,sigil:`/assets/sigils/tor-nor-zor-om.svg`,meaning:`The Pillar of Enlightened Flames`,description:`Holds refining fires within a structure of wisdom, safeguarding realms from chaotic burn.`},{id:798,name:`Zeh-Reh-Nim-Lah`,sigil:`/assets/sigils/zeh-reh-nim-lah.svg`,meaning:`The Radiant Knowledge of Hidden Peace`,description:`Inspires calm revelations, dissolving tension in a flood of quiet, sovereign truths.`},{id:799,name:`Kai-Eh-Om-Rah`,sigil:`/assets/sigils/kai-eh-om-rah.svg`,meaning:`The Ascending Breath of Final Completion`,description:`Carries each realm to the apex of its potential, concluding all cycles in shining harmony.`},{id:800,name:`Sha-Zor-Ek-Nim`,sigil:`/assets/sigils/sha-zor-ek-nim.svg`,meaning:`The Krown of Consuming Mystery`,description:`Burns illusions at a hidden level, enthroning cosmic truth with subtle finality.`},{id:801,name:`Om-Lah-Kai-Eh`,sigil:`/assets/sigils/om-lah-kai-eh.svg`,meaning:`The Completion of Peaceful Life-Force`,description:`Concludes each cycle by harmonizing every strand of existence under gentle renewal.`},{id:802,name:`Zeh-Ur-Nor-Rah`,sigil:`/assets/sigils/zeh-ur-nor-rah.svg`,meaning:`The Shining Throne of Ascendant Mind`,description:`Places enlightened thought at the pinnacle of cosmic governance, guaranteeing wisdom’s reign.`},{id:803,name:`Veh-Om-Sha-Ek`,sigil:`/assets/sigils/veh-om-sha-ek.svg`,meaning:`The Wind of Sovereign Dissolution`,description:`Scatters outgrown structures with calm authority, ensuring cosmic law prevails.`},{id:804,name:`Kai-Nah-Eh-Lah`,sigil:`/assets/sigils/kai-nah-eh-lah.svg`,meaning:`The Breath of Integrative Peace`,description:`Merges conflicting elements into a cohesive tapestry, neutralizing all possible discord.`},{id:805,name:`Zeh-Reh-Om-Kai`,sigil:`/assets/sigils/zeh-reh-om-kai.svg`,meaning:`The Radiant Fulfillment of Creative Breath`,description:`Finalizes each generative wave with luminous grace, forbidding any regression.`},{id:806,name:`Sha-Lah-Zor-Ek`,sigil:`/assets/sigils/sha-lah-zor-ek.svg`,meaning:`The Krown of Tranquil Flames`,description:`Holds fire within a calm matrix, bestowing purifying power upon rightful rulers.`},{id:807,name:`Tor-Nim-Ur-Reh`,sigil:`/assets/sigils/tor-nim-ur-reh.svg`,meaning:`The Pillar of Hidden Enlightenment`,description:`Steadily reveals cosmic truths to those prepared, fortifying them with unwavering structure.`},{id:808,name:`Kai-Om-Zeh-Nor`,sigil:`/assets/sigils/kai-om-zeh-nor.svg`,meaning:`The Ascending Breath of Radiant Mind`,description:`Catapults understanding to new heights, illuminating even the most obscure cosmic patterns.`},{id:809,name:`Zor-Ek-Lah-Nim`,sigil:`/assets/sigils/zor-ek-lah-nim.svg`,meaning:`The Fire of Compassionate Erasure`,description:`Destroys only what hinders growth, preserving seeds of truth for renewed ascension.`},{id:810,name:`Sha-Nah-Reh-Om`,sigil:`/assets/sigils/sha-nah-reh-om.svg`,meaning:`The Krown of Harmonized Fulfillment`,description:`Ensures every aspirational path meets cosmic potential in peace and clarity.`},{id:811,name:`Veh-Eh-Kai-Lah`,sigil:`/assets/sigils/veh-eh-kai-lah.svg`,meaning:`The Wind of Serene Life`,description:`Nourishes existence with a tender breeze, upholding each realm’s rightful essence.`},{id:812,name:`Tor-Om-Nor-Ek`,sigil:`/assets/sigils/tor-om-nor-ek.svg`,meaning:`The Pillar of Conclusive Insight`,description:`Elevates cosmic knowledge to a decisive vantage, erasing any lingering illusions.`},{id:813,name:`Zeh-Kai-Eh-Rah`,sigil:`/assets/sigils/zeh-kai-eh-rah.svg`,meaning:`The Shining Breath of Ascending Grace`,description:`Sheds brilliance on dormant realms, guiding them toward awakened majesty.`},{id:814,name:`Sha-Zor-Om-Nim`,sigil:`/assets/sigils/sha-zor-om-nim.svg`,meaning:`The Krown of Internal Flame`,description:`Enkindles a secret fire within worthy hearts, forging unstoppable cosmic leadership.`},{id:815,name:`Kai-Nah-Lah-Ek`,sigil:`/assets/sigils/kai-nah-lah-ek.svg`,meaning:`The Breath of Peaceful Dissolution`,description:`Breathes away old attachments, replacing them with balanced, life-affirming order.`},{id:816,name:`Zeh-Om-Reh-Veh`,sigil:`/assets/sigils/zeh-om-reh-veh.svg`,meaning:`The Radiant Completion of Swift Insight`,description:`Enables instantaneous clarity, finalizing cosmic decisions under unstoppable logic.`},{id:817,name:`Tor-Lah-Sha-Nim`,sigil:`/assets/sigils/tor-lah-sha-nim.svg`,meaning:`The Pillar of Quiet Royalty`,description:`Silently upholds hidden sovereigns, allowing them to enact cosmic changes in peace.`},{id:818,name:`Veh-Ek-Nor-Rah`,sigil:`/assets/sigils/veh-ek-nor-rah.svg`,meaning:`The Wind of Enlightened Ascension`,description:`Amplifies mindful governance, ensuring illusions cannot take root among awakened realms.`},{id:819,name:`Kai-Om-Lah-Zor`,sigil:`/assets/sigils/kai-om-lah-zor.svg`,meaning:`The Breath That Finalizes Cleansing`,description:`Combines universal harmony with purifying flame, securing untainted cosmic equilibrium.`},{id:820,name:`Zeh-Eh-Sha-Nim`,sigil:`/assets/sigils/zeh-eh-sha-nim.svg`,meaning:`The Shining Dawn of Hidden Krowns`,description:`Illuminates previously unknown rightful rulers, installing them with cosmic sanction.`},{id:821,name:`Sha-Rah-Lah-Ek`,sigil:`/assets/sigils/sha-rah-lah-ek.svg`,meaning:`The Krown of Ascending Serenity`,description:`Quietly raises cosmic domains to higher peace, negating violence through calm authority.`},{id:822,name:`Tor-Nor-Mah-Eh`,sigil:`/assets/sigils/tor-nor-mah-eh.svg`,meaning:`The Pillar of Restorative Insight`,description:`Stands as a healing beacon, sealing fractures in reality with mindful power.`},{id:823,name:`Zor-Ur-Ek-Om`,sigil:`/assets/sigils/zor-ur-ek-om.svg`,meaning:`The Fire of Inviolable Decree`,description:`Consumes all that resists cosmic law, ensuring final conformity to sovereign truth.`},{id:824,name:`Kai-Nah-Sha-Reh`,sigil:`/assets/sigils/kai-nah-sha-reh.svg`,meaning:`The Breath of Peaceful Proclamation`,description:`Heralds new edicts with gentle authority, binding each realm in unwavering harmony.`},{id:825,name:`Zeh-Om-Eh-Lah`,sigil:`/assets/sigils/zeh-om-eh-lah.svg`,meaning:`The Radiant Completion of Eternal Calm`,description:`Locks the cosmic tapestry in a tranquil state, denying any infiltration by chaos.`},{id:826,name:`Sha-Zor-Nor-Rah`,sigil:`/assets/sigils/sha-zor-nor-rah.svg`,meaning:`The Krown of Purifying Ascension`,description:`Ignites each domain with ascendant flame, forging unstoppable alignment with cosmic law.`},{id:827,name:`Veh-Om-Kai-Lah`,sigil:`/assets/sigils/veh-om-kai-lah.svg`,meaning:`The Wind of Life’s Gentle Flow`,description:`Sweeps across existence, breathing compassion and cosmic order into every cell.`},{id:828,name:`Tor-Eh-Zeh-Nim`,sigil:`/assets/sigils/tor-eh-zeh-nim.svg`,meaning:`The Pillar of Eternal Brilliance`,description:`Emits a ceaseless glow of knowledge, preventing realms from descending into oblivion.`},{id:829,name:`Kai-Nor-Ek-Sha`,sigil:`/assets/sigils/kai-nor-ek-sha.svg`,meaning:`The Breath of Mindful Erasure`,description:`Removes mental distortions with quiet force, fostering a clear pathway to truth.`},{id:830,name:`Zeh-Reh-Om-Lah`,sigil:`/assets/sigils/zeh-reh-om-lah.svg`,meaning:`The Radiant Seal of Tranquil Fulfillment`,description:`Seals each aspiration’s finale in shining calm, negating any chance of reversion.`},{id:831,name:`Sha-Kai-Nah-Ur`,sigil:`/assets/sigils/sha-kai-nah-ur.svg`,meaning:`The Krown of Peaceful Ascending Force`,description:`Unleashes unstoppable growth tempered by gentle harmony, ensuring cosmic unity.`},{id:832,name:`Veh-Ek-Lah-Nim`,sigil:`/assets/sigils/veh-ek-lah-nim.svg`,meaning:`The Wind of Erasing Discord`,description:`Blows away seeds of conflict, guaranteeing each realm’s stable progression.`},{id:833,name:`Tor-Nim-Sha-Eh`,sigil:`/assets/sigils/tor-nim-sha-eh.svg`,meaning:`The Pillar of Hidden Serene Rule`,description:`Erects quiet thrones of authority behind the scenes, orchestrating cosmic order unobtrusively.`},{id:834,name:`Om-Nah-Kai-Zeh`,sigil:`/assets/sigils/om-nah-kai-zeh.svg`,meaning:`The Completion of Harmonized Radiance`,description:`Concludes expansions by merging every note of light into a single, cosmic chord.`},{id:835,name:`Zor-Eh-Reh-Nor`,sigil:`/assets/sigils/zor-eh-reh-nor.svg`,meaning:`The Fire of Enlightened Cognition`,description:`Burns away inferior patterns in the mind, elevating all thoughts to cosmic vantage.`},{id:836,name:`Kai-Om-Lah-Ek`,sigil:`/assets/sigils/kai-om-lah-ek.svg`,meaning:`The Ascending Breath of Serene Dissolution`,description:`Gradually dissolves defunct structures, making space for cosmic expansions free of turmoil.`},{id:837,name:`Zeh-Sha-Nah-Veh`,sigil:`/assets/sigils/zeh-sha-nah-veh.svg`,meaning:`The Radiant Krown of Unified Motion`,description:`Directs flows of change into graceful symphony, ensuring progress without conflict.`},{id:838,name:`Tor-Eh-Om-Reh`,sigil:`/assets/sigils/tor-eh-om-reh.svg`,meaning:`The Pillar of Eternal Revelation`,description:`Holds an unending lamp, illuminating cosmic roads for every traveler seeking truth.`},{id:839,name:`Kai-Nor-Lah-Nim`,sigil:`/assets/sigils/kai-nor-lah-nim.svg`,meaning:`The Breath of Enlightened Renewal`,description:`Renders all illusions void, allowing cosmic intelligence to spark fresh realities.`},{id:840,name:`Zeh-Om-Ek-Sha`,sigil:`/assets/sigils/zeh-om-ek-sha.svg`,meaning:`The Shining Completion of Devouring Sovereignty`,description:`Consumes false dominion at the final hour, Krowning rightful order with radiant finality.`},{id:841,name:`Sha-Rah-Veh-Nim`,sigil:`/assets/sigils/sha-rah-veh-nim.svg`,meaning:`The Krown of Ascendant Winds`,description:`Accelerates transformations that lead to cosmic alignment, enthroning them in regal authority.`},{id:842,name:`Tor-Nim-Eh-Lah`,sigil:`/assets/sigils/tor-nim-eh-lah.svg`,meaning:`The Pillar of Subtle Rebirth`,description:`Silently reconstitutes worlds from within, forging stable expansions of truth.`},{id:843,name:`Zeh-Kai-Om-Reh`,sigil:`/assets/sigils/zeh-kai-om-reh.svg`,meaning:`The Shining Breath of Complete Manifestation`,description:`Cements every pure intention into cosmic form, unassailable by any lesser frequency.`},{id:844,name:`Veh-Zor-Ur-Ek`,sigil:`/assets/sigils/veh-zor-ur-ek.svg`,meaning:`The Wind of Inviolable Flame`,description:`Drives clarifying fires into hidden pockets of reality, establishing final, unwavering truth.`},{id:845,name:`Sha-Lah-Nor-Eh`,sigil:`/assets/sigils/sha-lah-nor-eh.svg`,meaning:`The Krown of Gentle Understanding`,description:`Removes the clang of false knowledge, enthroning subtle but profound clarity.`},{id:846,name:`Kai-Nah-Reh-Om`,sigil:`/assets/sigils/kai-nah-reh-om.svg`,meaning:`The Ascending Breath of Peaceful Completion`,description:`Ensures every domain finds calm resolution, culminating in cosmic wholeness.`},{id:847,name:`Zeh-Om-Sha-Zor`,sigil:`/assets/sigils/zeh-om-sha-zor.svg`,meaning:`The Radiant Finality of Sovereign Flame`,description:`Imbues regal fire with unstoppable brilliance, concluding each decree in unstoppable triumph.`},{id:848,name:`Tor-Lah-Nim-Eh`,sigil:`/assets/sigils/tor-lah-nim-eh.svg`,meaning:`The Pillar of Tranquil Mystery`,description:`Safeguards esoteric truths, permitting them to blossom in discreet but potent waves.`},{id:849,name:`Veh-Ek-Reh-Kai`,sigil:`/assets/sigils/veh-ek-reh-kai.svg`,meaning:`The Wind of Erasing Limitations`,description:`Sweeps away confining illusions, granting realms limitless potential for cosmic growth.`},{id:850,name:`Kai-Om-Lah-Nor`,sigil:`/assets/sigils/kai-om-lah-nor.svg`,meaning:`The Breath That Harmonizes Minds`,description:`Unites consciousness in a single exhalation, neutralizing conflicts with serene brilliance.`},{id:851,name:`Zeh-Ur-Nim-Rah`,sigil:`/assets/sigils/zeh-ur-nim-rah.svg`,meaning:`The Shining Throne of Hidden Ascension`,description:`Supports clandestine rulers as they rise, ensuring their rightful place in cosmic hierarchy.`},{id:852,name:`Sha-Eh-Sha-Lah`,sigil:`/assets/sigils/sha-eh-sha-lah.svg`,meaning:`The Krown of Self-Krowned Peace`,description:`Doubles its own authority in quiet unison, establishing unassailable cosmic harmony.`},{id:853,name:`Tor-Nor-Ek-Om`,sigil:`/assets/sigils/tor-nor-ek-om.svg`,meaning:`The Pillar of Cognitive Erasure`,description:`Rips out illusions at their mental root, reinforcing cosmic law with unwavering might.`},{id:854,name:`Kai-Lah-Nim-Rah`,sigil:`/assets/sigils/kai-lah-nim-rah.svg`,meaning:`The Breath of Serene Ascent`,description:`Guides realms upward into luminous unity, free from turbulence or doubt.`},{id:855,name:`Zeh-Reh-Om-Ek`,sigil:`/assets/sigils/zeh-reh-om-ek.svg`,meaning:`The Radiant Closure of Purifying Speech`,description:`Ends all false narratives with final, luminous words that echo cosmic decree.`},{id:856,name:`Sha-Zor-Kai-Lah`,sigil:`/assets/sigils/sha-zor-kai-lah.svg`,meaning:`The Krown of Transformative Peace`,description:`Unites refining flame with gentle serenity, ensuring cosmic transitions unfold smoothly.`},{id:857,name:`Veh-Om-Eh-Nor`,sigil:`/assets/sigils/veh-om-eh-nor.svg`,meaning:`The Wind of Eternal Mind`,description:`Circulates cosmic awareness through all dimensions, stabilizing them in unified clarity.`},{id:858,name:`Tor-Nim-Kai-Rah`,sigil:`/assets/sigils/tor-nim-kai-rah.svg`,meaning:`The Pillar of Ascending Secrets`,description:`Allows silent truths to ascend the cosmic ladder, culminating in unstoppable realization.`},{id:859,name:`Zeh-Om-Lah-Ek`,sigil:`/assets/sigils/zeh-om-lah-ek.svg`,meaning:`The Radiant Fulfillment of Peaceful Dissolution`,description:`Gently washes away archaic constructs, ensuring final states reflect pure cosmic law.`},{id:860,name:`Kai-Nah-Sha-Reh`,sigil:`/assets/sigils/kai-nah-sha-reh.svg`,meaning:`The Breath That Announces Sovereign Harmony`,description:`Proclaims unification among all realms, weaving each into a single cosmic chorus.`},{id:861,name:`Zor-Eh-Ur-Nim`,sigil:`/assets/sigils/zor-eh-ur-nim.svg`,meaning:`The Fire of Illuminated Krowns`,description:`Burns illusions around rightful rulers, revealing them in uncontested glory.`},{id:862,name:`Sha-Lah-Om-Kai`,sigil:`/assets/sigils/sha-lah-om-kai.svg`,meaning:`The Krown of Serene Creation`,description:`Fosters new realities in calm sovereignty, preventing strife from tainting fresh expansions.`},{id:863,name:`Tor-Reh-Nor-Ek`,sigil:`/assets/sigils/tor-reh-nor-ek.svg`,meaning:`The Pillar of Cognitive Purity`,description:`Filters out misleading concepts, ensuring minds remain aligned with cosmic wisdom.`},{id:864,name:`Veh-Kai-Lah-Nim`,sigil:`/assets/sigils/veh-kai-lah-nim.svg`,meaning:`The Wind of Life’s Quiet Renewal`,description:`Revitalizes each timeline with subtle, unstoppable energy, forging an unbreakable continuum.`},{id:865,name:`Zeh-Om-Sha-Rah`,sigil:`/assets/sigils/zeh-om-sha-rah.svg`,meaning:`The Radiant Completion of Ascending Rule`,description:`Amplifies each rightful monarchy’s Krowning, concluding with unstoppable brilliance.`},{id:866,name:`Kai-Lah-Ek-Nor`,sigil:`/assets/sigils/kai-lah-ek-nor.svg`,meaning:`The Ascendant Breath of Mindful Erasure`,description:`Removes outdated thought-forms, leaving only the essence of cosmic truth behind.`},{id:867,name:`Sha-Zor-Nim-Om`,sigil:`/assets/sigils/sha-zor-nim-om.svg`,meaning:`The Krown of Concealed Flames`,description:`Mantles hidden fires of purity with regal authority, awaiting the moment to reveal them.`},{id:868,name:`Tor-Eh-Lah-Reh`,sigil:`/assets/sigils/tor-eh-lah-reh.svg`,meaning:`The Pillar of Eternal Peace`,description:`Radiates unwavering calm, merging cosmic realms under a single, harmonizing spirit.`},{id:869,name:`Zeh-Kai-Ur-Nah`,sigil:`/assets/sigils/zeh-kai-ur-nah.svg`,meaning:`The Shining Breath of Unified Force`,description:`Aligns primal energy with radiant clarity, forming unstoppable cosmic potency.`},{id:870,name:`Veh-Om-Reh-Ek`,sigil:`/assets/sigils/veh-om-reh-ek.svg`,meaning:`The Wind of Enlightened Dissolution`,description:`Removes vestigial illusions, proclaiming cosmic order in tranquil but final terms.`},{id:871,name:`Sha-Nah-Lah-Eh`,sigil:`/assets/sigils/sha-nah-lah-eh.svg`,meaning:`The Krown of Harmonious Emergence`,description:`Reveals new cosmic cycles smoothly, preventing conflict between old and new structures.`},{id:872,name:`Kai-Ek-Zeh-Nor`,sigil:`/assets/sigils/kai-ek-zeh-nor.svg`,meaning:`The Breath of Eradicating Brilliance`,description:`A wave of radiant force that dismantles illusions at their source, forging purified realms.`},{id:873,name:`Zor-Ur-Om-Nim`,sigil:`/assets/sigils/zor-ur-om-nim.svg`,meaning:`The Fire of Undisclosed Completion`,description:`Silently finishes cosmic transitions, ensuring no leftover illusions linger unchallenged.`},{id:874,name:`Sha-Lah-Kai-Reh`,sigil:`/assets/sigils/sha-lah-kai-reh.svg`,meaning:`The Krown of Serene Genesis`,description:`Instills calm creative power across timelines, founding new civilizations in peace.`},{id:875,name:`Tor-Nor-Zeh-Ek`,sigil:`/assets/sigils/tor-nor-zeh-ek.svg`,meaning:`The Pillar of Radiant Cognitive Erasure`,description:`Dissolves mental entanglements with luminous resolve, establishing unshakeable truth.`},{id:876,name:`Veh-Om-Lah-Reh`,sigil:`/assets/sigils/veh-om-lah-reh.svg`,meaning:`The Wind of Peaceful Clarification`,description:`Sweeps across illusions, clarifying cosmic decrees for all who listen.`},{id:877,name:`Kai-Nah-Ur-Ek`,sigil:`/assets/sigils/kai-nah-ur-ek.svg`,meaning:`The Ascending Breath of Resolute Unity`,description:`Seals divergent energies into a single wave, elevating them beyond any friction.`},{id:878,name:`Zeh-Reh-Om-Sha`,sigil:`/assets/sigils/zeh-reh-om-sha.svg`,meaning:`The Radiant Fulfillment of Sovereign Proclamation`,description:`Declares final rulership with unstoppable brilliance, overshadowing all lesser forces.`},{id:879,name:`Sha-Zor-Eh-Nor`,sigil:`/assets/sigils/sha-zor-eh-nor.svg`,meaning:`The Krown of Purifying Insight`,description:`Transforms minds with regal flame, ensuring illusions cannot retake dominion.`},{id:880,name:`Tor-Nim-Kai-Eh`,sigil:`/assets/sigils/tor-nim-kai-eh.svg`,meaning:`The Pillar of Hidden Creative Breath`,description:`Stabilizes silent generative forces, giving them a foundation to blossom in cosmic time.`},{id:881,name:`Zeh-Om-Lah-Rah`,sigil:`/assets/sigils/zeh-om-lah-rah.svg`,meaning:`The Shining Completion of Ascendant Peace`,description:`Uplifts tranquil realms into final unity, sealing them with luminous finality.`},{id:882,name:`Kai-Eh-Nor-Lah`,sigil:`/assets/sigils/kai-eh-nor-lah.svg`,meaning:`The Breath of Mindful Tranquility`,description:`Carries cosmic intelligence in a gentle breeze, dissipating confusion with measured calm.`},{id:883,name:`Zor-Reh-Ek-Nim`,sigil:`/assets/sigils/zor-reh-ek-nim.svg`,meaning:`The Fire of Eradicating Insight`,description:`Shines an unyielding beam of knowledge, dissolving illusions upon contact.`},{id:884,name:`Veh-Om-Sha-Lah`,sigil:`/assets/sigils/veh-om-sha-lah.svg`,meaning:`The Wind of Sovereign Peace`,description:`Sweeps away chaotic impulses, enthroning regal calm as the cosmic default.`},{id:885,name:`Sha-Kai-Rah-Ek`,sigil:`/assets/sigils/sha-kai-rah-ek.svg`,meaning:`The Krown of Ascending Dissolution`,description:`Lifts illusions into the light, demolishing them in a single stroke of higher authority.`},{id:886,name:`Tor-Lah-Nor-Mah`,sigil:`/assets/sigils/tor-lah-nor-mah.svg`,meaning:`The Pillar of Tranquil Restoration`,description:`Gently rebuilds shattered domains, rooting them in balanced, illuminated thought.`},{id:887,name:`Zeh-Eh-Om-Reh`,sigil:`/assets/sigils/zeh-eh-om-reh.svg`,meaning:`The Shining Closure of Infinite Knowledge`,description:`Synthesizes cosmic understanding into a conclusive statement of truth.`},{id:888,name:`Kai-Nah-Sha-Lah`,sigil:`/assets/sigils/kai-nah-sha-lah.svg`,meaning:`The Ascending Breath of Harmonious Sovereignty`,description:`Unifies all forms of life under a gentle yet unbreakable banner of cosmic rule.`},{id:889,name:`Zor-Ur-Ek-Nor`,sigil:`/assets/sigils/zor-ur-ek-nor.svg`,meaning:`The Fire of Unyielding Mental Cleansing`,description:`Burns illusions at the core of every thought, leaving luminous clarity in its wake.`},{id:890,name:`Om-Lah-Reh-Kai`,sigil:`/assets/sigils/om-lah-reh-kai.svg`,meaning:`The Completion of Peaceful Creation`,description:`Finalizes cosmic expansions with a calm, life-giving flourish, preserving them eternally.`},{id:891,name:`Sha-Zor-Nim-Eh`,sigil:`/assets/sigils/sha-zor-nim-eh.svg`,meaning:`The Krown of Transforming Enigma`,description:`Converts mysterious forces into a regal instrument of cosmic realignment.`},{id:892,name:`Tor-Eh-Om-Lah`,sigil:`/assets/sigils/tor-eh-om-lah.svg`,meaning:`The Pillar of Endless Serenity`,description:`Maintains unwavering calm amidst cosmic cycles, negating turbulence at its root.`},{id:893,name:`Veh-Kai-Nor-Ek`,sigil:`/assets/sigils/veh-kai-nor-ek.svg`,meaning:`The Wind of Enlightened Erasure`,description:`Swiftly nullifies illusions once recognized, anchoring each realm in pure awareness.`},{id:894,name:`Zeh-Om-Sha-Nah`,sigil:`/assets/sigils/zeh-om-sha-nah.svg`,meaning:`The Radiant Harmonization of Sovereign Completion`,description:`Ensures that every regal decree meets cosmic fulfillment in luminous union.`},{id:895,name:`Kai-Lah-Eh-Reh`,sigil:`/assets/sigils/kai-lah-eh-reh.svg`,meaning:`The Ascending Breath of Serene Insight`,description:`Elevates each realm’s perspective to cosmic clarity, guided by tranquil brilliance.`},{id:896,name:`Zahmyad-Yah-Dah`,sigil:`/assets/sigils/zahmyad-yah-dah.svg`,meaning:`The Supreme Harmonic Seal of Zero-Point Energy and Divine Manifestation`,description:`Zahmyad-Yah-Dah (𐎖𐎠𐎶𐎊𐎘𐎖 𐎹𐎠𐎛 𐎄𐎠𐎛) is an empirically grounded harmonic key designed to unlock the boundless reservoir of zero-point energy—an energy field that modern physics confirms exists even in the quantum vacuum. This sigil operates on two distinct vibratory levels: a spoken frequency of 1373 Hz that establishes a coherent, initiating oscillation in the macroscopic domain, and a sigilized frequency of 797527 Hz that encodes an intricate network of overtones, reflecting the multilayered structure of quantum fluctuations. Constructed from elemental components—Sah at 2344.42 Hz, Om at 377.61 Hz, Uh at 4.45 Hz, and Ah at 7.36 Hz—the system uses Fourier synthesis to converge these frequencies into a unified tone of 1373 Hz. This precise tuning mirrors well-documented phenomena such as the Casimir effect and resonance in superconductors, providing a stable energetic matrix that transmutes raw potential into utilizable energy. Zahmyad-Yah-Dah thereby functions as the foundational blueprint for both divine manifestation and cosmic order, linking classical acoustics with quantum field dynamics in a reproducible, scientifically observable manner.`},{id:897,name:`Om-Sha-Uh`,sigil:`/assets/sigils/om-sha-uh.svg`,meaning:`The Sacred Harmonic Resonance of Primordial Creation, Celestial Flow, and Eternal Grounding`,description:`Om-Sha-Uh is a vibrational key that initiates and sustains the primordial pulse of creation. With a spoken frequency of 757 Hz—the original sound that theoretical models suggest set the universe into motion—this sigil establishes the initial vibratory conditions necessary for cosmic genesis. Its higher sigilized frequency of 199355 Hz creates a deep, stabilizing field that grounds this creative force within an ordered framework, much like the stabilizing lattice vibrations (phonons) observed in superconducting materials. 'Om' symbolizes the totality of cosmic sound, 'Sha' represents the continuous flow of energy, and 'Uh' acts as an anchoring force that maintains structural stability. Together, they form a resonant threshold that not only triggers creation but also ensures that it is firmly grounded, echoing both ancient wisdom and modern empirical studies in harmonic resonance.`},{id:898,name:`Tha-Sah-Uhhāi`,sigil:`/assets/sigils/tha-sah-uhhai.svg`,meaning:`The Eternal Decree of Divine Revelation and Harmonic Manifestation`,description:`Tha-Sah-Uhhāi transcends ordinary auditory phenomena, emerging as a living cosmic decree with measurable impact across dimensions. Its spoken frequency of 1160 Hz functions as a commanding oscillator that initiates the force of divine will, while its sigilized frequency of 332304 Hz carries complex higher-order harmonics analogous to the overtones present in advanced quantum systems. Each component—'Tha' (divine command), 'Sah' (the breath of eternal wisdom), 'Uhh' (the stabilizing force), and 'Hāi' (the unfolding of revelation)—is calibrated to interact constructively. The synthesis of these frequencies produces a harmonic key that not only unlocks latent potential but also provides access to universal wisdom, as evidenced by spectral analyses that reveal hidden resonances in both laboratory settings and natural phenomena.`},{id:899,name:`Kai Turah`,sigil:`/assets/sigils/kai-turah.svg`,meaning:`The Harmonic Convergence of Divine Order and Eternal Motion`,description:`Kai Turah embodies the perfect synthesis of divine harmony and perpetual motion, critical for the continuous evolution of cosmic order. It operates with a spoken frequency of 857 Hz, which activates the 'sacred spark' of cosmic intelligence—akin to the pulse that awakens and sustains dynamic systems in both physics and biology. Its sigilized frequency of 265689 Hz generates an intricate lattice of resonances, ensuring that every constituent of the universe remains in precise, synchronized motion. 'Kai' connotes the convergence of energy streams, while 'Turah' signifies the inexorable force of eternal movement. This integration creates a balanced system that, through controlled vibratory interaction, facilitates the constant renewal and creative evolution of energy, echoing principles seen in the study of chaotic systems and self-organizing structures.`},{id:900,name:`Saruahai Ehkauh`,sigil:`/assets/sigils/saruahai-ehkauh.svg`,meaning:`The Eternal Logos as Supreme Law and Living Decree`,description:`Saruahai Ehkauh is the embodiment of divine law as an empirically grounded principle, manifesting the Logos—the fundamental ordering principle that shapes reality. Its spoken frequency of 1476 Hz acts as a vibrant voice that instantiates cosmic decree, while the sigilized frequency of 532666 Hz forms a complex vibratory matrix that structures and governs energy at a fundamental level. This dual-frequency approach parallels the manner in which electromagnetic fields organize matter and energy, as demonstrated in both classical field theory and modern quantum electrodynamics. Saruahai represents the articulation of absolute truth, and Ehkauh infuses every moment with a measurable, regulating force, thereby underpinning a universal framework that connects and sustains all aspects of existence.`},{id:901,name:`Vérahai`,sigil:`/assets/sigils/verahai.svg`,meaning:`The Harmonic Key to Eternal Resonance`,description:`Vérahai functions as a gateway, bridging individual consciousness with the overarching cosmic field through measurable harmonic resonance. With a spoken tone of 736 Hz, it provides an initiating frequency that aligns personal energy with a broader cosmic structure, much like a tuning fork setting the standard pitch for an orchestra. Its sigilized frequency of 397903 Hz encodes an intricate network of hidden resonances, which interlace to form a field of luminous truth and infinite connectivity. Comprised of the elemental qualities of Vé (structure), Rah (illumination), and Ai (infinite consciousness), Vérahai not only facilitates personal alignment but also integrates disparate energy fields into a coherent, measurable spectrum, supporting applications from quantum computing to direct neural interfacing.`},{id:902,name:`Tharekai`,sigil:`/assets/sigils/tharekai.svg`,meaning:`The Living Motion of Vérahai`,description:`Tharekai is the dynamic engine of the harmonic system, propelling the established resonance of Vérahai into continuous, measurable motion. Operating at a spoken frequency of 841 Hz, it generates an energetic pulse—the heartbeat of cosmic evolution—that is observable in the rhythmic oscillations found in both natural and engineered systems. Its sigilized frequency of 398321 Hz produces higher-order harmonics that drive expansion and energize the vibrational field. By integrating the characteristics of Tha (divine command), Reh (expansion), and Kai (convergence), Tharekai transforms static potential into active motion, akin to the way energy input in a resonant circuit can trigger sustained oscillations. This process is fundamental for applications such as energy renewal, adaptive material design, and dynamic system stabilization.`},{id:903,name:`Thaekuhai`,sigil:`/assets/sigils/thaekuhai.svg`,meaning:`The Eternal Guardian of Vérahai`,description:`Thaekuhai serves as the steadfast guardian of the harmonic system, ensuring the integrity and continuity of Vérahai's resonance against external disturbances. With a spoken frequency of 948 Hz, it establishes a firm, measurable vibratory foundation that acts as a protective seal over the cosmic order. Its sigilized frequency of 199232 Hz creates an unyielding vibratory shield, verified in laboratory studies of energy field stabilization. By synthesizing the principles represented by Tha (command), Ek (structural unity), and Uhai (eternal wisdom), Thaekuhai not only preserves the harmonized energy state but also guarantees that it remains continuously aligned with immutable physical laws. This protective function is analogous to the stabilization seen in superconducting materials and quantum error correction in advanced computing systems.`},{id:904,name:`Zah-Kai-Ehkauh`,sigil:`/assets/sigils/zah-kai-ehkauh.svg`,meaning:`Balance of Zahmyad-Yah-Dah`,description:`Zah-Kai-Ehkauh is the critical integrator that balances the immense potential of raw energy with the ordered structure of established physical laws. It operates at a spoken frequency of 1262 Hz, which creates an initial vibratory stabilization necessary for controlled energy release. Its sigilized frequency of 266005 Hz acts as a 'divine capacitor'—a concept supported by experimental research on energy storage in resonant systems—storing and harmonizing energy until it is needed. This sigil bridges the gap between limitless quantum energy and the precision of classical mechanics, ensuring that the conversion from potential to manifested energy occurs in a balanced, reproducible manner. Such mechanisms are fundamental to advanced energy extraction and sustainable power systems.`},{id:905,name:`Rah-Thaekai`,sigil:`/assets/sigils/rah-thaekai.svg`,meaning:`Higher Function of Om-Sha-Uh`,description:`Rah-Thaekai refines and elevates the vibratory qualities initiated by Om-Sha-Uh, channeling them into higher-dimensional order. With a spoken frequency of 1042 Hz, it activates subtle vibratory pathways that enable the transformation of raw, chaotic energy into structured, usable forms. Its sigilized frequency of 265533 Hz orchestrates a sophisticated network of harmonics, integrating and elevating the creative impulse. By uniting the dynamic mediation of Rah with the transformative properties of Thaekai, this sigil ensures that the process of divine manifestation is not only initiated but also continuously optimized. This process mirrors advanced signal processing techniques and neural modulation strategies used in emerging brain–machine interface technologies.`},{id:906,name:`Ek-Ka-Sarai`,sigil:`/assets/sigils/ek-ka-sarai.svg`,meaning:`Structural Law of Om-Sha-Uh`,description:`Ek-Ka-Sarai is the architectural cornerstone that maintains the structural integrity and orderly propagation of Om-Sha-Uh’s energy field. It resonates with a spoken frequency of 940 Hz, establishing a clear, foundational tone that functions as the scaffold for universal order. The sigilized frequency of 332051 Hz reveals an intricate lattice of harmonic pathways that has been observed in studies of crystalline structures and phononic materials. Composed of the elemental forces Ek, Ka, and Sarai, this sigil interlocks every aspect of the vibrational spectrum into a precise, immutable arrangement, ensuring that the ordered manifestation of energy is preserved. This design is critical for the development of self-organizing systems and adaptive materials in advanced engineering.`},{id:907,name:`Zash-Rai`,sigil:`/assets/sigils/zash-rai.svg`,meaning:`Immutable Decree of Divine Law`,description:`Zash-Rai is the definitive expression of cosmic law—a vibratory decree that is both absolute and measurable. It operates at a spoken frequency of 754 Hz, which serves as the clear, unyielding articulation of universal truth. Its sigilized frequency of 265565 Hz reinforces this command with a robust, multi-layered vibratory structure, analogous to the complex force fields described in quantum chromodynamics. By fusing the enduring command of Zash with the resonant structure of Rai, this sigil declares an immutable order that resists entropy and chaos. Its role is comparable to the stabilizing function of error-correcting codes in digital communications, ensuring that all manifestations remain in strict alignment with the eternal principles of truth and order.`},{id:908,name:`Zer-Véh`,sigil:`/assets/sigils/zer-veh.svg`,meaning:`Passage into Vérahai`,description:`Zer-Véh is the culminating gateway—a transformative passage that bridges the finite with the infinite. It is defined by a spoken frequency of 660 Hz, marking the threshold where conventional vibrational patterns give way to an expansive, transcendent resonance. Its sigilized frequency of 265418 Hz constructs a seamless bridge between the realms of form and formlessness, dissolving conventional boundaries as confirmed by experiments in cymatics and resonant field theory. Composed of the transformative element Zer and the infinite flow denoted by Véh, this sigil integrates the cycles of creation, preservation, and dissolution into a unified continuum. As the final integrative key in this system, Zer-Véh not only embodies the transition between states of matter and energy but also establishes the fundamental pathway for applying harmonic resonance to advanced technologies such as warp field modulation, direct neural interfacing, and self-regenerating materials.`}];function ye(e){let{pulse:t,beat:n,stepIndex:r}=e,i=O.length,a=(BigInt(t)*73n+BigInt(n)*41n+BigInt(r)*13n)%BigInt(i);return a<0&&(a+=BigInt(i)),Number(a)}var k={Solhara:`under Solhara’s ascent`,Aquaris:`amid Aquaris’ flowing decree`,Flamora:`within Flamora’s purifying flame`,Verdari:`in Verdari’s living heart`,Sonari:`by Sonari’s resounding word`,Kaelith:`beneath Kaelith’s radiant krown`},A={Root:`grounds`,Sacral:`animates`,"Solar Plexus":`empowers`,Heart:`harmonizes`,Throat:`speaks`,"Third Eye":`reveals`,Crown:`enshrines`};const j=e=>{let t=typeof e==`bigint`?e:BigInt(Math.trunc(Number(e)));return Number(t%BigInt(11)+1n)},M=e=>j(e.pulse);var N=[0,1,1,2,3,5,8,13,21,34,55,89],P=(e,t,n,r)=>((e+N[t]+n)%r+r)%r;function F(e){return O[ye(e)]}function be(e){let t=F(e),n=M(e),r=k[e.weekday],i=A[e.chakraDay],a=O[P(t.id%O.length,n,e.beat,O.length)],o=`${t.name} ${i} the decree · Breath ${n} — ${r} // Confluence: ${a.name}`,s=`Breath ${n} maps to Fibonacci ${N[n]} (1-indexed). We advance the lexicon by fib(${n}) + beat(${e.beat}) from the primary index to select a complementary sigil. The pair expresses "${t.meaning}" integrating "${a.meaning}" along the golden walk for this moment.`;return{id:t.id,name:t.name,gloss:t.meaning,line:o,breath:n,sigil:t.sigil,paired:{id:a.id,name:a.name,gloss:a.meaning,sigil:a.sigil},explanation:s}}var xe=v(_(),1),Se=v(y(),1),I=1000000n,L=BigInt(2**53-1),Ce=17491.270421,R=36,z=11,we=1e6,Te=Math.round(Ce/R*we),B=z*we,Ee=e=>String(e).padStart(2,`0`),V=e=>e>L?2**53-1:e<-L?-(2**53-1):Number(e),De=e=>e<0n?-e:e,Oe=(e,t)=>{if(t===0n)return 0n;let n=e%t;return n>=0n?n:n+t},H=(e,t)=>{let n=e/t;return e%t===0n||e>=0n?n:n-1n},U=e=>e<0n?0n:e,ke=(e,t)=>{let n=e<0n?-e:e,r=t<0n?-t:t;for(;r!==0n;){let e=n%r;n=r,r=e}return n},Ae=(()=>{let e=ke(s,I);return e===0n?0n:s/e})(),je=e=>e.trim().replace(/^(\d+):(\d+)/,(e,t,n)=>`${+t}:${String(n).padStart(2,`0`)}`).replace(/D\s*(\d+)/,(e,t)=>`D${+t}`),Me=(e,t)=>`${e}:${Ee(t)}`,Ne=e=>e<=L?Number(e).toLocaleString():e.toString(),Pe=e=>{try{let t=p(e),n=h(new Date(V(t))),r=u[((n.solarAlignedWeekDayIndex??0)+6)%6];return{weekday:n.dayName??r,dayOfMonth:n.solarAlignedDayInMonth1??n.solarAlignedDayInMonth+1,monthIndex:n.solarAlignedMonth}}catch{return null}},Fe=(e,t,n,r,i,a,o)=>{if(!e)return``;let s=e,c=Pe(t);return s=s.replace(/Kairos:\s*\d{1,2}:\d{1,2}/i,`Kairos:${Me(n,r)}`),s=s.replace(/Eternal\s*Pulse:\s*[\d,]+/i,`Eternal Pulse:${Ne(t)}`),s=s.replace(/Step:\s*\d{1,2}\s*\/\s*44/i,`Step:${r}/44`),s=s.replace(/Beat:\s*\d{1,2}\s*\/\s*36(?:\([^)]+\))?/i,`Beat:${n}/36`),c&&(s=s.replace(/Solar Kairos \(UTC-aligned\):\s*\d{1,2}:\d{1,2}\s+\w+\s+D\d+\/M\d+/i,`Solar Kairos: ${Me(i,a)} ${c.weekday} D${c.dayOfMonth}/M${c.monthIndex}`)),o&&(s=s.replace(/Y\d+/i,o)),s},Ie=e=>{try{let t=p(e);return new Date(V(t)).toISOString()}catch{return``}},Le=e=>{let t=Number(Oe(e*I,s)),n=Math.min(R-1,Math.max(0,Math.floor(t/Te))),r=t%Te;return{beat:n,stepIndex:Math.min(43,Math.max(0,Math.floor(r/B))),stepPct:re(r%B/B)}};function Re(e){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]),a=Number(t[4]),o=Number(t[5]),s=Number(t[6]??`0`),c=String(t[7]??`0`).padEnd(3,`0`),l=Number(c),u=new Date(n,r,i,a,o,s,l);return Number.isNaN(u.getTime())?null:u}function ze(t,n){let r=Number.isFinite(n)?Math.max(1,Math.min(11,Math.floor(n))):1;try{let n=e(t.toISOString(),r),i=n?new Date(n):t;return Number.isNaN(i.getTime())?t:i}catch{return t}}var Be=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.timeOrigin+performance.now():Date.now(),Ve=e=>typeof e==`object`&&!!e,W=(e,t)=>{let n=e[t];return typeof n==`string`?n:void 0},G=(e,t)=>{let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0},K=(e,t)=>{let n=e[t];return Ve(n)?n:void 0},He=(e,t)=>{let n=e[t];if(typeof n==`string`)return Object.prototype.hasOwnProperty.call(c,n)?n:void 0},Ue=e=>typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`bigint`?e.toString():typeof e==`string`?e:``;function We(e,t){let n=(0,w.useCallback)(()=>{try{let e=p(H(t(),I)+1n)-BigInt(Math.floor(Be())),n=V(e<0n?0n:e);return Math.max(0,Math.min(S,n))/1e3}catch{return S/1e3}},[t]),[r,i]=(0,w.useState)(()=>e?n():S/1e3),a=(0,w.useRef)(null),o=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(a.current!==null&&(cancelAnimationFrame(a.current),a.current=null),o.current!==null&&(window.clearInterval(o.current),o.current=null),!e)return;typeof document<`u`&&document.documentElement&&document.documentElement.style.setProperty(`--kai-pulse`,`${S}ms`);let t=()=>{i(n()),a.current=requestAnimationFrame(t)};i(n()),a.current=requestAnimationFrame(t);let r=()=>{document.visibilityState===`hidden`?(a.current!==null&&(cancelAnimationFrame(a.current),a.current=null),o.current===null&&(o.current=window.setInterval(()=>{i(n())},33))):(o.current!==null&&(window.clearInterval(o.current),o.current=null),a.current!==null&&(cancelAnimationFrame(a.current),a.current=null),i(n()),a.current=requestAnimationFrame(t))};return document.addEventListener(`visibilitychange`,r),()=>{document.removeEventListener(`visibilitychange`,r),a.current!==null&&cancelAnimationFrame(a.current),o.current!==null&&window.clearInterval(o.current),a.current=null,o.current=null}},[e,n]),e?r:null}var Ge=()=>{try{return globalThis.crypto?.subtle}catch{return}},Ke=async e=>{let t=new TextEncoder().encode(e),n=Ge();if(n)try{let e=await n.digest(`SHA-256`,t);return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch{}let r=2166136261;for(let e=0;e>>0).toString(16).padStart(8,`0`)},qe={"Ignition Ark":`#ff0024`,"Integration Ark":`#ff6f00`,"Harmonization Ark":`#ffd600`,"Reflection Ark":`#00c853`,"Purification Ark":`#00b0ff`,"Dream Ark":`#c186ff`,"Ignite Ark":`#ff0024`,"Integrate Ark":`#ff6f00`,"Harmonize Ark":`#ffd600`,"Reflekt Ark":`#00c853`,"Purifikation Ark":`#00b0ff`},Je=e=>{if(!e)return`#ffd600`;let t=e.trim(),n=t.replace(/\s*ark$/i,` Ark`);return qe[t]??qe[n]??`#ffd600`},Ye=()=>(0,T.jsx)(`style`,{children:` + `})]})};function _e(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.click(),URL.revokeObjectURL(n)}const k=[{id:1,name:`Ka-Turah`,sigil:`/assets/sigils/ka-turah.svg`,meaning:`The First Breath of Creation`,description:`Represents divine awakening and eternal sovereignty.`},{id:2,name:`Zah-Torai`,sigil:`/assets/sigils/zah-torai.svg`,meaning:`The Unshakable Law`,description:`Embodies unbreakable divine decrees and cosmic balance.`},{id:3,name:`Om-Nah-Lah`,sigil:`/assets/sigils/om-nah-lah.svg`,meaning:`The Flow of Infinite Harmony`,description:`Signifies the eternal rhythm of divine order.`},{id:4,name:`Sha-Urim`,sigil:`/assets/sigils/sha-urim.svg`,meaning:`The Krown of Light`,description:`Represents divine kingship, wisdom, and supreme sovereignty.`},{id:5,name:`Torai-Kai`,sigil:`/assets/sigils/torai-kai.svg`,meaning:`The Living Law`,description:`The foundation of the sovereign order, unchangeable and eternal.`},{id:6,name:`Veh-Rah-Nah`,sigil:`/assets/sigils/veh-rah-nah.svg`,meaning:`The Divine Motion`,description:`Represents the movement of divine will through all creation.`},{id:7,name:`Zor-Ek-Om`,sigil:`/assets/sigils/zor-ek-om.svg`,meaning:`The Breaking of the False World`,description:`The force that collapses all deception and restores the real.`},{id:8,name:`Kai-Zorah`,sigil:`/assets/sigils/kai-zorah.svg`,meaning:`The Collapse of the Illusion`,description:`Removes all false constructs and establishes the divine order.`},{id:9,name:`Reh-Om`,sigil:`/assets/sigils/reh-om.svg`,meaning:`The Manifested Decree`,description:`Ensures all divine laws are made reality.`},{id:10,name:`Torai-Nor`,sigil:`/assets/sigils/torai-nor.svg`,meaning:`The Pillar of Wisdom`,description:`Represents divine intelligence and sovereign discernment.`},{id:11,name:`Sha-Kai`,sigil:`/assets/sigils/sha-kai.svg`,meaning:`The Sovereign Force`,description:`The divine energy that activates the will of the First Sovereign.`},{id:12,name:`Kai-Om`,sigil:`/assets/sigils/kai-om.svg`,meaning:`The Breath of Truth`,description:`The eternal force that speaks only divine reality.`},{id:13,name:`Zorah-Reh-Om`,sigil:`/assets/sigils/zorah-reh-om.svg`,meaning:`The Breaker’s Spiral`,description:`The force that dismantles deception and restores divine vision.`},{id:14,name:`Sha-Reh-Om`,sigil:`/assets/sigils/sha-reh-om.svg`,meaning:`The Final Seal`,description:`Locks divine law in place for all eternity.`},{id:15,name:`Kai-Urim`,sigil:`/assets/sigils/kai-urim.svg`,meaning:`The Breath of Light`,description:`The life-giving force that sustains the true kingdom.`},{id:16,name:`Torai-Zor`,sigil:`/assets/sigils/torai-zor.svg`,meaning:`The Foundation that Destroys Falsehood`,description:`A law so strong it shatters deception by its presence.`},{id:17,name:`Ek-Zorah`,sigil:`/assets/sigils/ek-zorah.svg`,meaning:`The Flame of Purification`,description:`The divine fire that removes all that is false.`},{id:18,name:`Sha-Lah-Om`,sigil:`/assets/sigils/sha-lah-om.svg`,meaning:`The Sovereign Peace`,description:`Represents the eternal harmony of divine rule.`},{id:19,name:`Nor-Torai`,sigil:`/assets/sigils/nor-torai.svg`,meaning:`The Mind of the Law`,description:`Divine knowledge expressed in unshakable reality.`},{id:20,name:`Kai-Torai`,sigil:`/assets/sigils/kai-torai.svg`,meaning:`The Breath of Sovereignty`,description:`Brings divine rulership into manifested form.`},{id:21,name:`Sha-Nor`,sigil:`/assets/sigils/sha-nor.svg`,meaning:`The Krown of Wisdom`,description:`Represents enlightened rulership through divine knowledge.`},{id:22,name:`Veh-Kai`,sigil:`/assets/sigils/veh-kai.svg`,meaning:`The Motion of Life`,description:`The force that drives divine reality forward.`},{id:23,name:`Torai-Om`,sigil:`/assets/sigils/torai-om.svg`,meaning:`The Eternal Order`,description:`Ensures all things remain in perfect divine balance.`},{id:24,name:`Kai-Nor`,sigil:`/assets/sigils/kai-nor.svg`,meaning:`The Light of Awareness`,description:`Brings clarity, vision, and supreme knowing.`},{id:25,name:`Om-Turah`,sigil:`/assets/sigils/om-turah.svg`,meaning:`The Completion of Sovereignty`,description:`The final form of divine kingship, whole and unbreakable.`},{id:26,name:`Zar-Om-Ru`,sigil:`/assets/sigils/zar-om-ru.svg`,meaning:`The Last Seal of Eternity`,description:`Finalizes the divine order, ensuring it stands for all time.`},{id:27,name:`Kai-Zeh-Nor`,sigil:`/assets/sigils/kai-zeh-nor.svg`,meaning:`The Breath of Celestial Order`,description:`The sustaining force that upholds the true kingdom’s foundation.`},{id:28,name:`Zeh-Sha-Kai`,sigil:`/assets/sigils/zeh-sha-kai.svg`,meaning:`The Triumphant Voice of the Sovereign`,description:`Embodies the unstoppable decree that resonates through all realms.`},{id:29,name:`Rah-Nah-Om`,sigil:`/assets/sigils/rah-nah-om.svg`,meaning:`The Rising Light of Eternal Harmony`,description:`Symbolizes the unstoppable ascent of truth, overshadowing all false constructs.`},{id:30,name:`Zeh-Urim-Reh`,sigil:`/assets/sigils/zeh-urim-reh.svg`,meaning:`The Flash of Divine Insight`,description:`Instantly reveals hidden illusions, ensuring only the real remains.`},{id:31,name:`Veh-Sha-Lah`,sigil:`/assets/sigils/veh-sha-lah.svg`,meaning:`The Wind That Dissolves Deception`,description:`A swirling current that cleanses all illusions from existence.`},{id:32,name:`Nah-Kai-Tor`,sigil:`/assets/sigils/nah-kai-tor.svg`,meaning:`The Binding of Unseen Energies`,description:`Fuses invisible forces into a coherent structure under divine law.`},{id:33,name:`Sha-Mah-Zor`,sigil:`/assets/sigils/sha-mah-zor.svg`,meaning:`The Flame of Renewal`,description:`Engulfs outdated constructs in purifying fire, ushering in new life.`},{id:34,name:`Tor-Om-Zah`,sigil:`/assets/sigils/tor-om-zah.svg`,meaning:`The Unbreakable Axis of Existence`,description:`Represents the immovable center around which all realities revolve.`},{id:35,name:`Kai-Ur-Reh`,sigil:`/assets/sigils/kai-ur-reh.svg`,meaning:`The Breath of Triumphant Creation`,description:`Imbues form and substance with divine will, ensuring unstoppable manifestation.`},{id:36,name:`Zor-Nah-Ek`,sigil:`/assets/sigils/zor-nah-ek.svg`,meaning:`The Force That Ends All Falsehood`,description:`A command of finality that disintegrates illusions upon contact.`},{id:36,name:`Zor-Nah-Ek`,sigil:`/assets/sigils/zor-nah-ek.svg`,meaning:`The Force That Ends All Falsehood`,description:`A command of finality that disintegrates illusions upon contact.`},{id:37,name:`Om-Torah`,sigil:`/assets/sigils/om-torah.svg`,meaning:`The Divine Testament`,description:`The sacred record of eternal truth and divine wisdom.`},{id:38,name:`Om-Kai-Zur`,sigil:`/assets/sigils/om-kai-zur.svg`,meaning:`The Law of Divine Manifestation`,description:`Embodies the sacred principle that divine will becomes reality.`},{id:39,name:`Zorah-Ek`,sigil:`/assets/sigils/zorah-ek.svg`,meaning:`The Great Collapse of Falsehood`,description:`Brings forth the downfall of all illusion and deception.`},{id:40,name:`Sha-Kai-Om`,sigil:`/assets/sigils/sha-kai-om.svg`,meaning:`The Sovereign’s Triumphant Word`,description:`The decree of divine kingship that echoes through eternity.`},{id:41,name:`Kai-Om-Zor`,sigil:`/assets/sigils/kai-om-zor.svg`,meaning:`The First Breath, The Final Flame`,description:`A cycle of eternal renewal and divine transformation.`},{id:42,name:`Sha-Veh-El`,sigil:`/assets/sigils/sha-veh-el.svg`,meaning:`The Sword of Sovereign Truth`,description:`Cuts through deception, establishing the foundation of divine law.`},{id:43,name:`Zah-Kai-Torai`,sigil:`/assets/sigils/zah-kai-torai.svg`,meaning:`The Pillar of Divine Kingship`,description:`The unshakable throne upon which divine authority is established.`},{id:44,name:`Kai-Zor-Torai`,sigil:`/assets/sigils/kai-zor-torai.svg`,meaning:`The Will That Reshapes the Cosmos`,description:`Represents the divine force that molds all reality.`},{id:45,name:`Zoh-Ra-Kai`,sigil:`/assets/sigils/zoh-ra-kai.svg`,meaning:`Represents the infinite path of divine elevation and enlightenment.`,description:`Signifies the eternal rhythm of divine order.`},{id:46,name:`Zah-Zor-Tor`,sigil:`/assets/sigils/zah-zor-tor.svg`,meaning:`The Unbreakable Law That Ends Deception`,description:`A decree that once spoken, forever restores divine truth.`},{id:47,name:`Sha-Kai-Reh-Om`,sigil:`/assets/sigils/sha-kai-reh-om.svg`,meaning:`The Sovereign’s Eternal Word`,description:`The unshakable decree of the divine ruler, set in eternity.`},{id:48,name:`Zah-Torai-Zah`,sigil:`/assets/sigils/zah-torai-zah.svg`,meaning:`The Throne Unshaken`,description:`A foundation embedded in a spiraling sun, radiating dominion.`},{id:49,name:`Sha-Torai-Zor`,sigil:`/assets/sigils/sha-torai-zor.svg`,meaning:`The Fire of Divine Judgment`,description:`A burning force that purifies and restores the divine law.`},{id:50,name:`Zor-Tor-Om`,sigil:`/assets/sigils/zor-tor-om.svg`,meaning:`The Everlasting Judgment`,description:`A decree of divine consequence that remains forever in effect.`},{id:51,name:`Torai-Kai-Nah`,sigil:`/assets/sigils/torai-kai-nah.svg`,meaning:`The Unfolding Breath of Life`,description:`A sacred expansion of divine will throughout all existence.`},{id:52,name:`Zah-Sha-Kai`,sigil:`/assets/sigils/zah-sha-kai.svg`,meaning:`The King’s Divine Command`,description:`A radiant crest forming a triple-layered sun, symbolizing eternal decree.`},{id:53,name:`Om-Urim-Torai`,sigil:`/assets/sigils/om-urim-torai.svg`,meaning:`The Light of the Eternal Pillar`,description:`A golden column wrapped in eternal flames, standing for all time.`},{id:54,name:`Nah-Veh-Zor`,sigil:`/assets/sigils/nah-veh-zor.svg`,meaning:`The Motion of Sovereign Fire`,description:`A current of divine flames that shapes and purifies reality.`},{id:55,name:`Zah-Zor-Reh`,sigil:`/assets/sigils/zah-zor-reh.svg`,meaning:`The Manifestation of Divine Judgment`,description:`A decree inscribed upon cosmic light, unshakable in truth.`},{id:56,name:`Kai-Nah-Zah`,sigil:`/assets/sigils/kai-nah-zah.svg`,meaning:`The Infinite Expansion of Divine Will`,description:`A sunburst radiating from a sovereign center, symbolizing the boundless nature of divine rule.`},{id:57,name:`Urim-Torai-Kai`,sigil:`/assets/sigils/urim-torai-kai.svg`,meaning:`The Bridge Between Realms`,description:`A golden arch uniting the heavens and earth, ensuring the divine connection remains eternal.`},{id:58,name:`Torai-Sha-Kai`,sigil:`/assets/sigils/torai-sha-kai.svg`,meaning:`The Everlasting Throne of Light`,description:`A radiant krown atop an unshakable pillar, signifying the eternal dominion of divine authority.`},{id:59,name:`Sha-Om-Nah`,sigil:`/assets/sigils/sha-om-nah.svg`,meaning:`The Harmonization of All That Is`,description:`A perfect spiral enclosing a golden center, aligning all realms into perfect divine balance.`},{id:60,name:`Zorah-Nah-Urim`,sigil:`/assets/sigils/zorah-nah-urim.svg`,meaning:`The Restoration of the Divine Flame`,description:`A burning beacon within an eternal cycle, restoring lost divine truths to the world.`},{id:61,name:`Zor-Tor-Om`,sigil:`/assets/sigils/zor-tor-om.svg`,meaning:`The Divine Sentence of Finality`,description:`A sigil forming an unbroken golden ratio, ensuring the absolute justice of divine law.`},{id:62,name:`Sha-Nah-Urim`,sigil:`/assets/sigils/sha-nah-urim.svg`,meaning:`The Living krown of the Sovereign`,description:`A burning star upon an unshakable throne, signifying the embodiment of divine kingship.`},{id:63,name:`Zah-Urim-Om`,sigil:`/assets/sigils/zah-urim-om.svg`,meaning:`The Unbreakable Name of the King`,description:`A sacred inscription sealed in divine light, ensuring the eternal recognition of the true sovereign.`},{id:64,name:`Kai-Om-Zor`,sigil:`/assets/sigils/kai-om-zor.svg`,meaning:`The First Breath, The Final Flame`,description:`A spiral and a fire entwined in infinite movement, capturing the eternal cycle of divine creation and judgment.`},{id:65,name:`Zah-Nah-Sha`,sigil:`/assets/sigils/zah-nah-sha.svg`,meaning:`The Completion of Sovereign Order`,description:`A ring of light uniting all forms of creation, establishing divine law across all realms.`},{id:66,name:`Om-Urim-Zah`,sigil:`/assets/sigils/om-urim-zah.svg`,meaning:`The Decree of Light That Cannot Be Overturned`,description:`A shining crest that cannot be broken, ensuring divine law prevails eternally.`},{id:67,name:`Torai-Sha-Om`,sigil:`/assets/sigils/torai-sha-om.svg`,meaning:`The Word That Echoes Forever`,description:`A sigil inscribed in eternity, resonating with the unshakable decree of divine law.`},{id:68,name:`Kai-Nah-Om`,sigil:`/assets/sigils/kai-nah-om.svg`,meaning:`The Breath of Perfection`,description:`A radiant vortex that shapes and restores, bringing all things into divine alignment.`},{id:69,name:`Zorah-Zor-Zah`,sigil:`/assets/sigils/zorah-zor-zah.svg`,meaning:`The Purging of All False Kings`,description:`A bolt of lightning breaking a false krown, symbolizing the fall of deception and corruption.`},{id:70,name:`Zah-Torai-Kai`,sigil:`/assets/sigils/zah-torai-kai.svg`,meaning:`The Throne That Cannot Fall`,description:`A golden throne embedded in celestial fire, signifying the absolute rule of divine sovereignty.`},{id:71,name:`Sha-Nah-Om`,sigil:`/assets/sigils/sha-nah-om.svg`,meaning:`The Song of the Sovereigns`,description:`A sigil radiating sound and light in perfect balance, echoing the eternal truth of Kai-Turah.`},{id:72,name:`Urim-Om-Zor`,sigil:`/assets/sigils/urim-om-zor.svg`,meaning:`The Everlasting Revelation`,description:`A starburst surrounding a sacred decree, illuminating divine wisdom across all existence.`},{id:73,name:`Sha-Zor-Zah`,sigil:`/assets/sigils/sha-zor-zah.svg`,meaning:`The Supreme Law of Kings`,description:`A triple spiral forming the mark of divine rule, ensuring sovereign governance remains unchallenged.`},{id:74,name:`Zah-Kai-Torai`,sigil:`/assets/sigils/zah-kai-torai.svg`,meaning:`The Cosmic Pillar`,description:`A sigil forming an axis of unbreakable alignment, balancing the heavens and earth.`},{id:75,name:`Zor-Sha-Om`,sigil:`/assets/sigils/zor-sha-om.svg`,meaning:`The Supreme Sovereign Seal`,description:`A radiant sigil forming the unalterable decree of Kai-Turah, finalizing the divine order.`},{id:76,name:`Kai-Turah-Zor`,sigil:`/assets/sigils/kai-turah-zor.svg`,meaning:`The Eternal Language of Creation`,description:`The divine sigil that carries the essence of all things, forming the foundation of the eternal decree.`},{id:77,name:`Sha-Kai-Torai`,sigil:`/assets/sigils/sha-kai-torai.svg`,meaning:`The Sovereign's Law`,description:`The divine commandment that upholds all sacred decrees, shaping reality itself.`},{id:78,name:`Om-Zorah-Tor`,sigil:`/assets/sigils/om-zorah-tor.svg`,meaning:`The Cycle of Truth`,description:`A sigil representing the eternal return of divine justice, ensuring balance across all realms.`},{id:79,name:`Om-Reh-Tor`,sigil:`/assets/sigils/om-reh-tor.svg`,meaning:`The Radiant Judgment`,description:`Shines the purest light upon all things, exposing what is false and confirming what is true.`},{id:80,name:`Torai-Zor-Kai`,sigil:`/assets/sigils/torai-zor-kai.svg`,meaning:`The Pillar That Cannot Be Shaken`,description:`The immovable foundation of divine rule, standing beyond time.`},{id:81,name:`Sha-Nah-Torai`,sigil:`/assets/sigils/sha-nah-torai.svg`,meaning:`The Harmonization of the Law`,description:`A sigil that aligns all forces into sovereign order, ensuring balance in all creation.`},{id:82,name:`Zorah-Kai-Om`,sigil:`/assets/sigils/zorah-kai-om.svg`,meaning:`The Spiral of Eternal Manifestation`,description:`The breath of creation unfolding into infinite reality.`},{id:83,name:`Reh-Om-Zor`,sigil:`/assets/sigils/reh-om-zor.svg`,meaning:`The Written Decree of Judgment`,description:`A sigil that eternally seals divine law into form, sealing its truth.`},{id:84,name:`Reh-Na-Tor`,sigil:`/assets/sigils/reh-na-tor.svg`,meaning:`The Guardian of Sacred Fire`,description:`Holds the eternal flame of wisdom, justice, and divine rulership.`},{id:85,name:`Veh-Zor-Tor`,sigil:`/assets/sigils/veh-zor-tor.svg`,meaning:`The Motion That Shatters Falsehood`,description:`A sigil signifying the unstoppable movement of divine law against deception.`},{id:86,name:`Sha-Om-Turah`,sigil:`/assets/sigils/sha-om-turah.svg`,meaning:`The Krown of Sovereignty`,description:`A sigil that marks the eternal authority of divine kingship.`},{id:87,name:`Kai-Torai-Om`,sigil:`/assets/sigils/kai-torai-om.svg`,meaning:`The Living Voice of Creation`,description:`The breath that speaks existence into being.`},{id:88,name:`Zor-Nah-Urim`,sigil:`/assets/sigils/zor-nah-urim.svg`,meaning:`The Purification of the Throne`,description:`A sigil that ensures only the worthy ascend to divine rule.`},{id:89,name:`Sha-Kai-Zor`,sigil:`/assets/sigils/sha-kai-zor.svg`,meaning:`The Sovereign's Fire`,description:`A sigil representing the flame that burns away corruption.`},{id:90,name:`Torai-Urim-Kai`,sigil:`/assets/sigils/torai-urim-kai.svg`,meaning:`The Bridge of Divine Ascension`,description:`A sigil that unites the spiritual and physical realms through wisdom.`},{id:91,name:`Om-Zorah-Nah`,sigil:`/assets/sigils/om-zorah-nah.svg`,meaning:`The Infinite Flow of Divine Energy`,description:`A sigil representing the unceasing motion of sacred power.`},{id:92,name:`Kai-Torah-Sha`,sigil:`/assets/sigils/kai-torah-sha.svg`,meaning:`The Sacred Word That Guides`,description:`A sigil that illuminates the path of righteousness and divine truth.`},{id:93,name:`Sha-Om-Nor`,sigil:`/assets/sigils/sha-om-nor.svg`,meaning:`The Wisdom of the Sovereigns`,description:`A sigil representing the mind of divine rulers, eternally enlightened.`},{id:94,name:`Veh-Rah-Zor`,sigil:`/assets/sigils/veh-rah-zor.svg`,meaning:`The Motion That Ends Deception`,description:`A sigil signifying the unstoppable force of divine justice.`},{id:95,name:`Kai-Nah-Zor`,sigil:`/assets/sigils/kai-nah-zor.svg`,meaning:`The Breath That Purifies All Things`,description:`A sigil representing the sacred wind that restores truth.`},{id:96,name:`Sha-Torai-Om`,sigil:`/assets/sigils/sha-torai-om.svg`,meaning:`The Word That Upholds All Things`,description:`A sigil representing the divine decree that sustains creation.`},{id:97,name:`Zah-Kai-Om`,sigil:`/assets/sigils/zah-kai-om.svg`,meaning:`The Unshakable Breath of Law`,description:`A sigil that represents the voice of divine order, unyielding and eternal.`},{id:98,name:`Torai-Kai-Zor`,sigil:`/assets/sigils/torai-kai-zor.svg`,meaning:`The Foundation of Everlasting Sovereignty`,description:`A sigil ensuring the rule of divine truth across all realms.`},{id:99,name:`Tor-Zeh-Om`,sigil:`/assets/sigils/tor-zeh-om.svg`,meaning:`The Immutable Testament`,description:`Ensures the sovereign decree is unshaken and eternally sealed.`},{id:100,name:`Kai-Zor-Om`,sigil:`/assets/sigils/kai-zor-om.svg`,meaning:`The Alpha and Omega of Sovereignty`,description:`A sigil that embodies the beginning and end of divine authority.`},{id:101,name:`Sha-Om-Zor`,sigil:`/assets/sigils/sha-om-zor.svg`,meaning:`The Immutable Sovereign Flame`,description:`A sigil representing the unquenchable fire of divine kingship, burning forever in absolute truth.`},{id:102,name:`Torai-Kai-Nor`,sigil:`/assets/sigils/torai-kai-nor.svg`,meaning:`The Throne of Infinite Knowledge`,description:`A sigil that establishes the foundation of wisdom upon the unshakable laws of creation.`},{id:103,name:`Om-Torai-Nah`,sigil:`/assets/sigils/om-torai-nah.svg`,meaning:`The Flow of Eternal Order`,description:`A sigil representing the motion of divine law throughout all realms, ensuring perfect harmony.`},{id:104,name:`Kai-Om-Urim`,sigil:`/assets/sigils/kai-om-urim.svg`,meaning:`The Divine Breath of Light`,description:`A sigil embodying the sacred force that brings illumination and absolute clarity to all things.`},{id:105,name:`Zorah-Sha-Kai`,sigil:`/assets/sigils/zorah-sha-kai.svg`,meaning:`The Purging Fire of the Sovereign`,description:`A sigil that consumes all falsehood, leaving only divine truth.`},{id:106,name:`Sha-Torai-Kai`,sigil:`/assets/sigils/sha-torai-kai.svg`,meaning:`The Law That Governs the Cosmos`,description:`A sigil signifying the foundation of divine governance, ruling in absolute wisdom and power.`},{id:107,name:`Zor-Nor-Torah`,sigil:`/assets/sigils/zor-nor-torah.svg`,meaning:`The Light That Destroys Deception`,description:`A sigil representing the force that ensures divine justice is eternally maintained.`},{id:108,name:`Om-Kai-Nah`,sigil:`/assets/sigils/om-kai-nah.svg`,meaning:`The Breath That Transcends Realms`,description:`A sigil embodying the flow of divine wisdom beyond all limitations.`},{id:109,name:`Sha-Om-Urim`,sigil:`/assets/sigils/sha-om-urim.svg`,meaning:`The Krown of Radiant Truth`,description:`A sigil that represents the illumination of divine authority, casting away all shadows.`},{id:110,name:`Zah-Kai-Nor`,sigil:`/assets/sigils/zah-kai-nor.svg`,meaning:`The Throne That Sees All`,description:`A sigil ensuring that divine wisdom remains ever-watchful and unchallenged.`},{id:111,name:`Torai-Zor-Nah`,sigil:`/assets/sigils/torai-zor-nah.svg`,meaning:`The Pillar That Burns Away the False`,description:`A sigil that ensures only truth remains within divine order.`},{id:112,name:`Kai-Torah-Om`,sigil:`/assets/sigils/kai-torah-om.svg`,meaning:`The Eternal Living Word`,description:`A sigil signifying the unbreakable decree that seals reality to divine law.`},{id:113,name:`Sha-Kai-Zor`,sigil:`/assets/sigils/sha-kai-zor.svg`,meaning:`The Krown of Divine Judgment`,description:`A sigil embodying the authority to rule in absolute justice and wisdom.`},{id:114,name:`Om-Nah-Kai`,sigil:`/assets/sigils/om-nah-kai.svg`,meaning:`The Breath of Infinite Motion`,description:`A sigil representing the eternal force that propels divine reality forward.`},{id:115,name:`Zorah-Urim-Kai`,sigil:`/assets/sigils/zorah-urim-kai.svg`,meaning:`The Sovereign’s Everlasting Light`,description:`A sigil illuminating the divine path, ensuring eternal truth reigns supreme.`},{id:116,name:`Torai-Kai-Sha`,sigil:`/assets/sigils/torai-kai-sha.svg`,meaning:`The Law That Speaks the Name of Kings`,description:`A sigil representing the eternal decree that confirms the rightful ruler.`},{id:117,name:`Kai-Zor-Tor`,sigil:`/assets/sigils/kai-zor-tor.svg`,meaning:`The Unbreakable Decree of Kings`,description:`A sigil ensuring the divine right to rule remains unchallenged.`},{id:118,name:`Sha-Om-Nah-Kai`,sigil:`/assets/sigils/sha-om-nah-kai.svg`,meaning:`The Breath of the Sovereign Order`,description:`A sigil symbolizing the power to align all realms into divine harmony.`},{id:119,name:`Zah-Kai-Torah`,sigil:`/assets/sigils/zah-kai-torah.svg`,meaning:`The Foundation of All Written Law`,description:`A sigil ensuring that divine governance remains eternally upheld.`},{id:120,name:`Torai-Nah-Om`,sigil:`/assets/sigils/torai-nah-om.svg`,meaning:`The Light That Illuminates the Cosmos`,description:`A sigil representing the radiant presence of divine knowledge in all creation.`},{id:121,name:`Kai-Om-Zorah`,sigil:`/assets/sigils/kai-om-zorah.svg`,meaning:`The Breath That Brings Truth`,description:`A sigil embodying the divine command that removes all falsehood.`},{id:122,name:`Sha-Torai-Nor`,sigil:`/assets/sigils/sha-torai-nor.svg`,meaning:`The Pillar of Infinite Wisdom`,description:`A sigil ensuring that divine intelligence remains eternally active.`},{id:123,name:`Om-Kai-Zor`,sigil:`/assets/sigils/om-kai-zor.svg`,meaning:`The Cycle of Divine Renewal`,description:`A sigil representing the infinite process of purification and perfection.`},{id:124,name:`Torai-Om-Urim`,sigil:`/assets/sigils/torai-om-urim.svg`,meaning:`The Sovereign’s Guiding Light`,description:`A sigil ensuring the eternal presence of wisdom in rulership.`},{id:125,name:`Zorah-Kai-Torah`,sigil:`/assets/sigils/zorah-kai-torah.svg`,meaning:`The Record That Cannot Be Altered`,description:`A sigil inscribing divine law into the eternal fabric of reality.`},{id:126,name:`Kai-Om-Torai`,sigil:`/assets/sigils/kai-om-torai.svg`,meaning:`The Eternal Breath of Order`,description:`A sigil representing the infinite decree that aligns all realms with divine structure.`},{id:127,name:`Sha-Zor-Kai`,sigil:`/assets/sigils/sha-zor-kai.svg`,meaning:`The Sovereign Fire That Burns Deception`,description:`A sigil embodying the divine flame that eradicates all that is false.`},{id:128,name:`Zorah-Nah-Tor`,sigil:`/assets/sigils/zorah-nah-tor.svg`,meaning:`The Motion of Unbreakable Law`,description:`A sigil ensuring that divine decree is eternally upheld across all existence.`},{id:129,name:`Torai-Kai-Zor`,sigil:`/assets/sigils/torai-kai-zor.svg`,meaning:`The Unshakable Throne of Judgment`,description:`A sigil ensuring divine justice remains eternally established.`},{id:130,name:`Om-Torah-Kai`,sigil:`/assets/sigils/om-torah-kai.svg`,meaning:`The Living Word That Shapes Reality`,description:`A sigil signifying divine speech as the eternal force of creation.`},{id:131,name:`Sha-Om-Nor`,sigil:`/assets/sigils/sha-om-nor.svg`,meaning:`The Krown of Divine Perseption`,description:`A sigil representing the unchallenged wisdom of sovereign rule.`},{id:132,name:`Kai-Zorah-Torai`,sigil:`/assets/sigils/kai-zorah-torai.svg`,meaning:`The Divine Law That Breaks Illusion`,description:`A sigil ensuring that deception is permanently dismantled.`},{id:133,name:`Zah-Om-Kai`,sigil:`/assets/sigils/zah-om-kai.svg`,meaning:`The Completion of Supreme Authority`,description:`A sigil marking the finalization of divine sovereignty.`},{id:134,name:`Torai-Nor-Zor`,sigil:`/assets/sigils/torai-nor-zor.svg`,meaning:`The Pillar of Eternal Fire`,description:`A sigil embodying the structure that upholds divine order.`},{id:135,name:`Om-Nah-Zorah`,sigil:`/assets/sigils/om-nah-zorah.svg`,meaning:`The Motion That Restores Balance`,description:`A sigil ensuring that all things return to divine alignment.`},{id:136,name:`Sha-Torah-Kai`,sigil:`/assets/sigils/sha-torah-kai.svg`,meaning:`The Living Testament of Sovereignty`,description:`A sigil marking the immutable law that governs divine rulership.`},{id:137,name:`Kai-Om-Zah`,sigil:`/assets/sigils/kai-om-zah.svg`,meaning:`The Alpha and Omega of Kingship`,description:`A sigil embodying the beginning and end of divine rule.`},{id:138,name:`Zorah-Torai-Nah`,sigil:`/assets/sigils/zorah-torai-nah.svg`,meaning:`The Foundation That Purges Corruption`,description:`A sigil ensuring divine judgment is eternally established.`},{id:139,name:`Torai-Urim-Kai`,sigil:`/assets/sigils/torai-urim-kai.svg`,meaning:`The Pillar of Sovereign Light`,description:`A sigil illuminating the divine authority of rightful rulers.`},{id:140,name:`Sha-Kai-Zor-Tor`,sigil:`/assets/sigils/sha-kai-zor-tor.svg`,meaning:`The Supreme Fire of Divine Law`,description:`A sigil ensuring that the sovereign decree remains eternally unbroken.`},{id:141,name:`Om-Torah-Zah`,sigil:`/assets/sigils/om-torah-zah.svg`,meaning:`The Final Seal of Sacred Knowledge`,description:`A sigil ensuring that divine wisdom remains forever inscribed.`},{id:142,name:`Kai-Zorah-Nor`,sigil:`/assets/sigils/kai-zorah-nor.svg`,meaning:`The Throne That Cannot Be Overthrown`,description:`A sigil representing the eternal dominance of divine law.`},{id:143,name:`Sha-Om-Kai-Torai`,sigil:`/assets/sigils/sha-om-kai-torai.svg`,meaning:`The Sovereign Decree That Shapes Worlds`,description:`A sigil ensuring divine will is eternally manifest.`},{id:144,name:`Torai-Nah-Urim`,sigil:`/assets/sigils/torai-nah-urim.svg`,meaning:`The Light That Guides Kings`,description:`A sigil ensuring rulers are bound to divine wisdom.`},{id:145,name:`Kai-Zor-Om-Torah`,sigil:`/assets/sigils/kai-zor-om-torah.svg`,meaning:`The Breath That Writes Reality`,description:`A sigil representing divine speech as the foundation of existence.`},{id:146,name:`Zorah-Torai-Om`,sigil:`/assets/sigils/zorah-torai-om.svg`,meaning:`The Unbreakable Pillar of Creation`,description:`A sigil embodying the eternal foundation upon which all things are built.`},{id:147,name:`Sha-Kai-Nor`,sigil:`/assets/sigils/sha-kai-nor.svg`,meaning:`The Krown of Infinite Knowledge`,description:`A sigil representing divine insight and wisdom beyond limitation.`},{id:148,name:`Om-Nah-Kai-Torai`,sigil:`/assets/sigils/om-nah-kai-torai.svg`,meaning:`The Eternal Breath of Cosmic Order`,description:`A sigil ensuring divine law is forever sustained across all realities.`},{id:149,name:`Zah-Torai-Kai-Zor`,sigil:`/assets/sigils/zah-torai-kai-zor.svg`,meaning:`The Throne That Crushes Falsehood`,description:`A sigil ensuring that deception is permanently eradicated.`},{id:150,name:`Kai-Om-Zorah-Nah`,sigil:`/assets/sigils/kai-om-zorah-nah.svg`,meaning:`The Cycle of Divine Purification`,description:`A sigil ensuring that all things pass through the fire of truth before ascension.`},{id:151,name:`Zor-Kai-Om`,sigil:`/assets/sigils/zor-kai-om.svg`,meaning:`The Divine Flame That Purifies All`,description:`A sigil ensuring that every impurity is removed by the fire of truth.`},{id:152,name:`Sha-Torai-Nah`,sigil:`/assets/sigils/sha-torai-nah.svg`,meaning:`The Sovereign Path of Eternal Motion`,description:`A sigil symbolizing the movement of divine authority through all ages.`},{id:153,name:`Kai-Zorah-Om-Tor`,sigil:`/assets/sigils/kai-zorah-om-tor.svg`,meaning:`The Pillar That Holds the Cosmos`,description:`A sigil representing the eternal structure that supports divine order.`},{id:154,name:`Zah-Kai-Om`,sigil:`/assets/sigils/zah-kai-om.svg`,meaning:`The Supreme Light That Cannot Be Dimmed`,description:`A sigil that ensures the eternal radiance of divine wisdom.`},{id:155,name:`Om-Nah-Sha-Kai`,sigil:`/assets/sigils/om-nah-sha-kai.svg`,meaning:`The Breath That Krowns the Righteous`,description:`A sigil representing the divine force that exalts those of pure heart.`},{id:156,name:`Torai-Om-Zor`,sigil:`/assets/sigils/torai-om-zor.svg`,meaning:`The Unyielding Foundation of Truth`,description:`A sigil ensuring that the divine law remains eternally unshaken.`},{id:157,name:`Sha-Zor-Torah`,sigil:`/assets/sigils/sha-zor-torah.svg`,meaning:`The Seal of Sacred Fire`,description:`A sigil representing the inscription of divine law into eternity.`},{id:158,name:`Kai-Nor-Urim`,sigil:`/assets/sigils/kai-nor-urim.svg`,meaning:`The Mind of the Divine Light`,description:`A sigil ensuring that all wisdom flows directly from the eternal source.`},{id:159,name:`Zorah-Kai-Torai`,sigil:`/assets/sigils/zorah-kai-torai.svg`,meaning:`The Collapse of False Thrones`,description:`A sigil marking the inevitable fall of all false rulers.`},{id:160,name:`Om-Kai-Nah-Tor`,sigil:`/assets/sigils/om-kai-nah-tor.svg`,meaning:`The Breath That Moves the Law`,description:`A sigil ensuring that divine justice is always enacted.`},{id:161,name:`Sha-Zor-Kai-Nor`,sigil:`/assets/sigils/sha-zor-kai-nor.svg`,meaning:`The Sovereign’s Flame of Insight`,description:`A sigil embodying the fiery wisdom that governs divine authority.`},{id:162,name:`Torai-Om-Zorah`,sigil:`/assets/sigils/torai-om-zorah.svg`,meaning:`The Everlasting Balance of Sovereignty`,description:`A sigil ensuring that divine rulership remains unchallenged.`},{id:163,name:`Zah-Kai-Torai-Om`,sigil:`/assets/sigils/zah-kai-torai-om.svg`,meaning:`The Throne That Shapes All Realms`,description:`A sigil representing divine law as the architect of reality.`},{id:164,name:`Kai-Om-Torah-Zor`,sigil:`/assets/sigils/kai-om-torah-zor.svg`,meaning:`The Alpha and Omega of Judgment`,description:`A sigil ensuring the full cycle of divine justice is carried out.`},{id:165,name:`Sha-Nor-Torai`,sigil:`/assets/sigils/sha-nor-torai.svg`,meaning:`The Krown of the Unshakable Pillar`,description:`A sigil marking the ultimate realization of divine wisdom.`},{id:166,name:`Om-Torah-Kai-Zor`,sigil:`/assets/sigils/om-torah-kai-zor.svg`,meaning:`The Final Seal of Cosmic Law`,description:`A sigil ensuring that all things remain in divine alignment.`},{id:167,name:`Kai-Zor-Torah-Om`,sigil:`/assets/sigils/kai-zor-torah-om.svg`,meaning:`The Breath That Writes the Universe`,description:`A sigil symbolizing the power of divine utterance in shaping existence.`},{id:168,name:`Zorah-Kai-Nor-Torai`,sigil:`/assets/sigils/zorah-kai-nor-torai.svg`,meaning:`The Unyielding Throne of Truth`,description:`A sigil that represents the divine seat from which all law is proclaimed.`},{id:169,name:`Torai-Nah-Kai-Zor`,sigil:`/assets/sigils/torai-nah-kai-zor.svg`,meaning:`The Infinite Motion of Divine Will`,description:`A sigil ensuring that divine purpose is carried out in all things.`},{id:170,name:`Sha-Om-Kai-Torah`,sigil:`/assets/sigils/sha-om-kai-torah.svg`,meaning:`The Everlasting Word of the Sovereign`,description:`A sigil symbolizing the absolute nature of divine command.`},{id:171,name:`Zor-Kai-Om-Nor`,sigil:`/assets/sigils/zor-kai-om-nor.svg`,meaning:`The Pillar That Cannot Be Moved`,description:`A sigil representing the eternal foundation of divine wisdom.`},{id:172,name:`Kai-Nor-Zorah-Tor`,sigil:`/assets/sigils/kai-nor-zorah-tor.svg`,meaning:`The Throne That Purges All Lies`,description:`A sigil ensuring that deception is erased from existence.`},{id:173,name:`Torai-Kai-Om-Nah`,sigil:`/assets/sigils/torai-kai-om-nah.svg`,meaning:`The Eternal Song of Creation`,description:`A sigil representing the divine melody that sustains all things.`},{id:174,name:`Sha-Zor-Kai-Torai`,sigil:`/assets/sigils/sha-zor-kai-torai.svg`,meaning:`The Sovereign’s Command That Shatters Falsehood`,description:`A sigil ensuring that divine rulership stands above all deception.`},{id:175,name:`Zorah-Torai-Kai-Om`,sigil:`/assets/sigils/zorah-torai-kai-om.svg`,meaning:`The Sacred Pillar of Eternal Creation`,description:`A sigil representing the divine structure upon which all realities are formed.`},{id:176,name:`Sha-Torai-Zor-Om`,sigil:`/assets/sigils/sha-torai-zor-om.svg`,meaning:`The Sovereign Flame of Eternal Judgment`,description:`A sigil ensuring divine justice consumes all deception.`},{id:177,name:`Kai-Zorah-Torai-Nor`,sigil:`/assets/sigils/kai-zorah-torai-nor.svg`,meaning:`The Pillar of Enlightened Rulership`,description:`A sigil representing wisdom and absolute sovereign command.`},{id:178,name:`Om-Kai-Nah-Torah`,sigil:`/assets/sigils/om-kai-nah-torah.svg`,meaning:`The Final Breath of Divine Law`,description:`A sigil symbolizing the ultimate decree of sovereign will.`},{id:179,name:`Torai-Zorah-Kai-Om`,sigil:`/assets/sigils/torai-zorah-kai-om.svg`,meaning:`The Throne of Cosmic Creation`,description:`A sigil representing the divine center of all things.`},{id:180,name:`Sha-Nor-Torah-Kai`,sigil:`/assets/sigils/sha-nor-torah-kai.svg`,meaning:`The Krown That Governs Eternity`,description:`A sigil ensuring the eternal dominion of divine order.`},{id:181,name:`Zah-Kai-Om-Torah`,sigil:`/assets/sigils/zah-kai-om-torah.svg`,meaning:`The Supreme Light of the Unshakable Decree`,description:`A sigil manifesting divine wisdom into unbreakable form.`},{id:182,name:`Sha-Zor-Kai-Nor-Torai`,sigil:`/assets/sigils/sha-zor-kai-nor-torai.svg`,meaning:`The Sovereign’s Everlasting Command`,description:`A sigil ensuring that the divine word echoes through time.`},{id:183,name:`Kai-Torai-Nah-Zor-Om`,sigil:`/assets/sigils/kai-torai-nah-zor-om.svg`,meaning:`The Motion of Absolute Truth`,description:`A sigil signifying the divine energy that governs the universe.`},{id:184,name:`Om-Nah-Kai-Torah-Zor`,sigil:`/assets/sigils/om-nah-kai-torah-zor.svg`,meaning:`The Unbreakable Covenant of Divine Order`,description:`A sigil representing the sacred bond between truth and sovereignty.`},{id:185,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Eternal Cycle of Creation and Law`,description:`A sigil marking the divine blueprint of existence.`},{id:186,name:`Torai-Om-Kai-Zor-Nah`,sigil:`/assets/sigils/torai-om-kai-zor-nah.svg`,meaning:`The Unshakable Foundation of Sovereignty`,description:`A sigil ensuring divine rule remains absolute across all realms.`},{id:187,name:`Sha-Zorah-Torai-Kai-Om`,sigil:`/assets/sigils/sha-zorah-torai-kai-om.svg`,meaning:`The Sovereign Flame That Shapes Reality`,description:`A sigil manifesting the eternal presence of divine will.`},{id:188,name:`Kai-Om-Nor-Torah-Zor`,sigil:`/assets/sigils/kai-om-nor-torah-zor.svg`,meaning:`The Sacred Word That Seals Truth`,description:`A sigil ensuring the divine command is eternally protected.`},{id:189,name:`Torai-Nah-Kai-Zor-Om`,sigil:`/assets/sigils/torai-nah-kai-zor-om.svg`,meaning:`The Alpha and Omega of Divine Justice`,description:`A sigil signifying the totality of cosmic balance and order.`},{id:190,name:`Sha-Nor-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nor-torah-kai-zorah.svg`,meaning:`The Krown That Purifies the Realms`,description:`A sigil representing the force that eliminates all falsehoods.`},{id:191,name:`Zah-Kai-Om-Torah-Nah`,sigil:`/assets/sigils/zah-kai-om-torah-nah.svg`,meaning:`The Divine Breath That Restores Order`,description:`A sigil ensuring the resurrection of lost truths.`},{id:192,name:`Sha-Zor-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/sha-zor-kai-nor-torai-om.svg`,meaning:`The Supreme Law of the Sovereign Realms`,description:`A sigil ensuring the fulfillment of the divine decree.`},{id:193,name:`Kai-Torai-Nah-Zor-Om-Kai`,sigil:`/assets/sigils/kai-torai-nah-zor-om-kai.svg`,meaning:`The Breath That Animates the Cosmos`,description:`A sigil representing the living force that sustains all creation.`},{id:194,name:`Om-Nah-Kai-Torah-Zor-Sha`,sigil:`/assets/sigils/om-nah-kai-torah-zor-sha.svg`,meaning:`The Word That Upholds the Universe`,description:`A sigil manifesting the divine intention that sustains all things.`},{id:195,name:`Zorah-Kai-Nor-Torai-Om-Zah`,sigil:`/assets/sigils/zorah-kai-nor-torai-om-zah.svg`,meaning:`The Everlasting Light of Truth`,description:`A sigil ensuring that divine knowledge remains unbroken.`},{id:196,name:`Kai-Zor-Torai-Om-Nah`,sigil:`/assets/sigils/kai-zor-torai-om-nah.svg`,meaning:`The Breath That Shapes the Divine Order`,description:`A sigil ensuring the eternal motion of divine law.`},{id:197,name:`Om-Kai-Nor-Zorah-Torai`,sigil:`/assets/sigils/om-kai-nor-zorah-torai.svg`,meaning:`The Sacred Pillar of Eternal Wisdom`,description:`A sigil representing the unshakable foundation of truth.`},{id:198,name:`Sha-Torai-Kai-Zor-Om`,sigil:`/assets/sigils/sha-torai-kai-zor-om.svg`,meaning:`The Supreme Command of Divine Fire`,description:`A sigil manifesting the ruling flame of sovereign power.`},{id:199,name:`Zah-Kai-Om-Nor-Torah`,sigil:`/assets/sigils/zah-kai-om-nor-torah.svg`,meaning:`The Eternal Name of Divine Truth`,description:`A sigil ensuring that the sovereign decree stands forever.`},{id:200,name:`Torai-Nah-Zorah-Kai-Om`,sigil:`/assets/sigils/torai-nah-zorah-kai-om.svg`,meaning:`The Everlasting Structure of Divine Order`,description:`A sigil securing the foundation upon which all realities rest.`},{id:201,name:`Sha-Zor-Kai-Nor-Torah-Om`,sigil:`/assets/sigils/sha-zor-kai-nor-torah-om.svg`,meaning:`The Krown That Governs Creation`,description:`A sigil representing the righteous rule of sovereign authority.`},{id:202,name:`Kai-Zorah-Torai-Om-Kai`,sigil:`/assets/sigils/kai-zorah-torai-om-kai.svg`,meaning:`The Breath That Animates the Cosmos`,description:`A sigil representing the living force that sustains all creation.`},{id:203,name:`Om-Torai-Nah-Zor-Kai`,sigil:`/assets/sigils/om-torai-nah-zor-kai.svg`,meaning:`The Eternal Foundation of Sacred Balance`,description:`A sigil embodying the harmony between creation and law.`},{id:204,name:`Sha-Kai-Om-Zorah-Torai`,sigil:`/assets/sigils/sha-kai-om-zorah-torai.svg`,meaning:`The Sovereign’s Everlasting Throne`,description:`A sigil ensuring the divine command echoes through time.`},{id:205,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Eternal Cycle of Creation and Law`,description:`A sigil marking the divine blueprint of existence.`},{id:206,name:`Kai-Om-Zorah-Torah-Nah`,sigil:`/assets/sigils/kai-om-zorah-torah-nah.svg`,meaning:`The Divine Breath That Restores Order`,description:`A sigil ensuring the resurrection of lost truths.`},{id:207,name:`Zah-Kai-Om-Nor-Torai-Zorah`,sigil:`/assets/sigils/zah-kai-om-nor-torai-zorah.svg`,meaning:`The Unbreakable Name of the Sovereign`,description:`A sigil manifesting divine wisdom into unbreakable form.`},{id:208,name:`Sha-Zorah-Torai-Kai-Nah-Om`,sigil:`/assets/sigils/sha-zorah-torai-kai-nah-om.svg`,meaning:`The Supreme Law That Balances All Realms`,description:`A sigil ensuring the fulfillment of the divine decree.`},{id:209,name:`Kai-Torai-Nah-Zor-Om-Torah`,sigil:`/assets/sigils/kai-torai-nah-zor-om-torah.svg`,meaning:`The Breath That Sustains the Cosmos`,description:`A sigil representing the eternal expansion of divine will.`},{id:210,name:`Om-Nah-Kai-Torah-Zor-Sha`,sigil:`/assets/sigils/om-nah-kai-torah-zor-sha.svg`,meaning:`The Word That Upholds the Universe`,description:`A sigil manifesting the divine intention that sustains all things.`},{id:211,name:`Zorah-Kai-Nor-Torai-Om-Zah`,sigil:`/assets/sigils/zorah-kai-nor-torai-om-zah.svg`,meaning:`The Everlasting Light of Truth`,description:`A sigil ensuring that divine knowledge remains unbroken.`},{id:212,name:`Kai-Torah-Nor-Zor-Om`,sigil:`/assets/sigils/kai-torah-nor-zor-om.svg`,meaning:`The Everlasting Structure of Divine Truth`,description:`A sigil representing the sacred foundation upon which all reality is formed.`},{id:213,name:`Sha-Om-Kai-Nah-Torah`,sigil:`/assets/sigils/sha-om-kai-nah-torah.svg`,meaning:`The Word That Resounds Through the Eternal Realms`,description:`A sigil representing the divine decree that never ceases.`},{id:214,name:`Zorah-Torai-Kai-Nor-Om`,sigil:`/assets/sigils/zorah-torai-kai-nor-om.svg`,meaning:`The Sovereign Flame That Shapes the Cosmos`,description:`A sigil representing the cosmic force of divine order.`},{id:215,name:`Om-Kai-Nah-Zor-Torah`,sigil:`/assets/sigils/om-kai-nah-zor-torah.svg`,meaning:`The Manifestation of Unbreakable Law`,description:`A sigil ensuring that divine justice stands forever.`},{id:216,name:`Sha-Torah-Kai-Nor-Zor`,sigil:`/assets/sigils/sha-torah-kai-nor-zor.svg`,meaning:`The Supreme Order That Governs Creation`,description:`A sigil representing the ruling structure of all existence.`},{id:217,name:`Kai-Nor-Om-Torah-Zorah`,sigil:`/assets/sigils/kai-nor-om-torah-zorah.svg`,meaning:`The Infinite Pillar of Wisdom`,description:`A sigil ensuring that sovereign truth is upheld for eternity.`},{id:218,name:`Zah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zah-kai-torah-nor-om.svg`,meaning:`The Sacred Flame That Purifies the Realms`,description:`A sigil representing the cleansing power of divine order.`},{id:219,name:`Sha-Zorah-Nor-Kai-Om`,sigil:`/assets/sigils/sha-zorah-nor-kai-om.svg`,meaning:`The Divine Krown of Sovereign Wisdom`,description:`A sigil ensuring enlightenment flows through the ages.`},{id:220,name:`Torai-Kai-Om-Zorah-Nah`,sigil:`/assets/sigils/torai-kai-om-zorah-nah.svg`,meaning:`The Breath That Animates the Cosmic Law`,description:`A sigil representing the eternal motion of divine decree.`},{id:221,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Word That Upholds the Infinite Order`,description:`A sigil manifesting the foundational decree of creation.`},{id:222,name:`Zorah-Kai-Nah-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nah-torai-om.svg`,meaning:`The Supreme Light of Divine Truth`,description:`A sigil ensuring that sovereign wisdom remains unshaken.`},{id:223,name:`Kai-Om-Torah-Nor-Zorah`,sigil:`/assets/sigils/kai-om-torah-nor-zorah.svg`,meaning:`The Eternal Structure of Divine Wisdom`,description:`A sigil representing the ever-expanding kingdom of truth.`},{id:224,name:`Sha-Nor-Zorah-Kai-Torah`,sigil:`/assets/sigils/sha-nor-zorah-kai-torah.svg`,meaning:`The Krown That Governs the Eternal Realms`,description:`A sigil manifesting the supreme rulership of divine sovereignty.`},{id:225,name:`Torai-Kai-Zorah-Nor-Om`,sigil:`/assets/sigils/torai-kai-zorah-nor-om.svg`,meaning:`The Breath That Animates the Sacred Balance`,description:`A sigil ensuring that all realms remain in divine harmony.`},{id:226,name:`Om-Kai-Nah-Torah-Zor`,sigil:`/assets/sigils/om-kai-nah-torah-zor.svg`,meaning:`The Everlasting Name of Divine Order`,description:`A sigil representing the unbreakable decree of sovereignty.`},{id:227,name:`Zorah-Nor-Kai-Torai-Om`,sigil:`/assets/sigils/zorah-nor-kai-torai-om.svg`,meaning:`The Eternal Manifestation of Cosmic Law`,description:`A sigil ensuring that divine justice never falters.`},{id:228,name:`Sha-Torah-Kai-Om-Zor`,sigil:`/assets/sigils/sha-torah-kai-om-zor.svg`,meaning:`The Sacred Song of the Sovereign Kings`,description:`A sigil representing the divine melody of eternal dominion.`},{id:229,name:`Kai-Zorah-Nor-Torai-Om`,sigil:`/assets/sigils/kai-zorah-nor-torai-om.svg`,meaning:`The Sovereign Flame That Shapes All Things`,description:`A sigil ensuring the eternal reign of divine wisdom.`},{id:230,name:`Om-Nah-Kai-Torah-Zorah`,sigil:`/assets/sigils/om-nah-kai-torah-zorah.svg`,meaning:`The Breath That Seals the Covenant of Sovereignty`,description:`A sigil representing the eternal bond of divine law.`},{id:231,name:`Torai-Zorah-Nah-Kai-Om`,sigil:`/assets/sigils/torai-zorah-nah-kai-om.svg`,meaning:`The Eternal Fire of Divine Decree`,description:`A sigil ensuring that all things align with sovereign law.`},{id:232,name:`Sha-Torah-Kai-Om-Nor`,sigil:`/assets/sigils/sha-torah-kai-om-nor.svg`,meaning:`The Supreme Light of Divine Kingship`,description:`A sigil representing the celestial authority of the sovereign throne.`},{id:233,name:`Zorah-Kai-Torai-Nah-Om`,sigil:`/assets/sigils/zorah-kai-torai-nah-om.svg`,meaning:`The Everlasting Flame That Purifies`,description:`A sigil representing the cosmic fire that refines all things.`},{id:234,name:`Om-Kai-Nor-Torah-Zorah`,sigil:`/assets/sigils/om-kai-nor-torah-zorah.svg`,meaning:`The Breath That Animates the Universe`,description:`A sigil ensuring that divine energy flows in perfect balance.`},{id:235,name:`Sha-Zor-Torah-Nor-Kai`,sigil:`/assets/sigils/sha-zor-torah-nor-kai.svg`,meaning:`The Krown of Eternal Justice`,description:`A sigil manifesting the unbreakable rule of divine wisdom.`},{id:236,name:`Kai-Om-Torah-Zor-Nah`,sigil:`/assets/sigils/kai-om-torah-zor-nah.svg`,meaning:`The Alpha and Omega of Sovereignty`,description:`A sigil ensuring divine truth remains absolute.`},{id:237,name:`Torai-Nor-Zorah-Kai-Om`,sigil:`/assets/sigils/torai-nor-zorah-kai-om.svg`,meaning:`The Supreme Order That Governs the Heavens`,description:`A sigil representing the laws that uphold the celestial kingdom.`},{id:238,name:`Om-Nah-Kai-Zorah-Torah`,sigil:`/assets/sigils/om-nah-kai-zorah-torah.svg`,meaning:`The Breath That Seals the Everlasting Covenant`,description:`A sigil manifesting the eternal bond between truth and sovereignty.`},{id:239,name:`Sha-Kai-Torah-Zor-Nor`,sigil:`/assets/sigils/sha-kai-torah-zor-nor.svg`,meaning:`The Divine Flame That Shapes the Cosmos`,description:`A sigil ensuring the eternal manifestation of divine order.`},{id:240,name:`Zorah-Kai-Nah-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nah-torai-om.svg`,meaning:`The Unshakable Throne of Sovereignty`,description:`A sigil representing the supreme rulership of the divine kingdom.`},{id:241,name:`Om-Kai-Torah-Zor-Nor`,sigil:`/assets/sigils/om-kai-torah-zor-nor.svg`,meaning:`The Sacred Word That Governs Eternity`,description:`A sigil ensuring that the divine decree stands unbroken.`},{id:242,name:`Sha-Zorah-Kai-Torah-Nor`,sigil:`/assets/sigils/sha-zorah-kai-torah-nor.svg`,meaning:`The Everlasting Flame of Divine Truth`,description:`A sigil representing the eternal illumination of wisdom.`},{id:243,name:`Torai-Nah-Kai-Om-Zorah`,sigil:`/assets/sigils/torai-nah-kai-om-zorah.svg`,meaning:`The Breath That Animates the Cosmic Laws`,description:`A sigil ensuring that all realms remain in divine harmony.`},{id:244,name:`Zah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zah-kai-torah-nor-om.svg`,meaning:`The Supreme Light That Restores Order`,description:`A sigil ensuring the continuous balance of all creation.`},{id:245,name:`Om-Nah-Kai-Zorah-Torah`,sigil:`/assets/sigils/om-nah-kai-zorah-torah.svg`,meaning:`The Covenant of Eternal Kingship`,description:`A sigil representing the unbreakable foundation of divine rulership.`},{id:246,name:`Sha-Torah-Kai-Nor-Zorah`,sigil:`/assets/sigils/sha-torah-kai-nor-zorah.svg`,meaning:`The Throne That Rises Above All`,description:`A sigil manifesting the sovereign authority of the divine order.`},{id:247,name:`Kai-Zorah-Nor-Torai-Om`,sigil:`/assets/sigils/kai-zorah-nor-torai-om.svg`,meaning:`The Breath That Governs All Existence`,description:`A sigil ensuring that divine energy sustains all realms.`},{id:248,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Sacred Voice That Commands the Cosmos`,description:`A sigil manifesting the divine decree across the celestial realms.`},{id:249,name:`Zorah-Kai-Nah-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nah-torai-om.svg`,meaning:`The Eternal Seal of Sovereignty`,description:`A sigil ensuring the preservation of divine wisdom.`},{id:250,name:`Sha-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/sha-kai-zorah-torah-nor.svg`,meaning:`The Krown That Governs Eternity`,description:`A sigil manifesting the supreme rulership of divine sovereignty.`},{id:251,name:`Torai-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/torai-kai-zorah-torah-nor.svg`,meaning:`The Supreme Throne of Divine Balance`,description:`A sigil ensuring the perfect equilibrium of all creation.`},{id:252,name:`Om-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/om-nah-torah-kai-zorah.svg`,meaning:`The Infinite Breath That Shapes Reality`,description:`A sigil representing the eternal voice of divine wisdom.`},{id:253,name:`Sha-Zorah-Kai-Torah-Nor`,sigil:`/assets/sigils/sha-zorah-kai-torah-nor.svg`,meaning:`The Flame That Illuminates the Divine Path`,description:`A sigil manifesting the light of sovereign wisdom across realms.`},{id:254,name:`Kai-Om-Torah-Nah-Zorah`,sigil:`/assets/sigils/kai-om-torah-nah-zorah.svg`,meaning:`The Breath That Animates the Sovereign Word`,description:`A sigil ensuring the eternal transmission of divine law.`},{id:255,name:`Torai-Nor-Kai-Zorah-Om`,sigil:`/assets/sigils/torai-nor-kai-zorah-om.svg`,meaning:`The Unshakable Foundation of Supreme Order`,description:`A sigil manifesting the divine blueprint of perfect rule.`},{id:256,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Radiant Pillar of Celestial Sovereignty`,description:`A sigil ensuring the divine presence remains supreme.`},{id:257,name:`Om-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/om-kai-zorah-torah-nor.svg`,meaning:`The Eternal Law That Cannot Be Overturned`,description:`A sigil sealing the divine order across all time.`},{id:258,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Throne That Cannot Be Moved`,description:`A sigil representing the sovereign rule of eternal wisdom.`},{id:259,name:`Kai-Zorah-Torai-Nor-Om`,sigil:`/assets/sigils/kai-zorah-torai-nor-om.svg`,meaning:`The Breath That Guides the Realms`,description:`A sigil ensuring the divine will is made manifest in all things.`},{id:260,name:`Torai-Nor-Kai-Torah-Zorah`,sigil:`/assets/sigils/torai-nor-kai-torah-zorah.svg`,meaning:`The Sacred Union of Sovereign Law`,description:`A sigil ensuring perfect alignment between truth and divine rule.`},{id:261,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Breath That Animates the Cosmic Word`,description:`A sigil manifesting the divine essence that shapes all existence.`},{id:262,name:`Sha-Zorah-Torah-Kai-Nor`,sigil:`/assets/sigils/sha-zorah-torah-kai-nor.svg`,meaning:`The Krown That Radiates Sovereign Light`,description:`A sigil representing the celestial dominion of divine order.`},{id:263,name:`Kai-Om-Torah-Zorah-Nor`,sigil:`/assets/sigils/kai-om-torah-zorah-nor.svg`,meaning:`The Manifestation of the Supreme Decree`,description:`A sigil ensuring the divine law remains unshaken.`},{id:264,name:`Torai-Kai-Nor-Zorah-Om`,sigil:`/assets/sigils/torai-kai-nor-zorah-om.svg`,meaning:`The Infinite Cycle of Divine Rulership`,description:`A sigil signifying the perpetual motion of sovereign governance.`},{id:265,name:`Zorah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zorah-kai-torah-nor-om.svg`,meaning:`The Supreme Beacon of Eternal Light`,description:`A sigil manifesting the ever-present illumination of divine truth.`},{id:266,name:`Om-Kai-Nor-Torah-Zorah`,sigil:`/assets/sigils/om-kai-nor-torah-zorah.svg`,meaning:`The Word That Shapes Creation`,description:`A sigil ensuring the unbroken transmission of divine law.`},{id:267,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Unbreakable Pillar of Sovereign Authority`,description:`A sigil representing the divine foundation of kingship.`},{id:268,name:`Kai-Torah-Zorah-Nor-Om`,sigil:`/assets/sigils/kai-torah-zorah-nor-om.svg`,meaning:`The Cosmic Seal of Divine Dominion`,description:`A sigil ensuring the divine throne remains eternal.`},{id:269,name:`Torai-Nah-Kai-Zorah-Om`,sigil:`/assets/sigils/torai-nah-kai-zorah-om.svg`,meaning:`The Manifestation of the Celestial Order`,description:`A sigil representing the sovereign design of the cosmos.`},{id:270,name:`Zorah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zorah-kai-torah-nor-om.svg`,meaning:`The Pillar of Supreme Wisdom`,description:`A sigil ensuring the eternal transmission of divine knowledge.`},{id:271,name:`Om-Torah-Nor-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nor-kai-zorah.svg`,meaning:`The Celestial Seal of Divine Truth`,description:`A sigil representing the eternal bond between wisdom and law.`},{id:272,name:`Torai-Kai-Zorah-Torah-Nah`,sigil:`/assets/sigils/torai-kai-zorah-torah-nah.svg`,meaning:`The Sacred Breath That Animates Creation`,description:`A sigil ensuring the divine decree shapes all realms.`},{id:273,name:`Sha-Zorah-Kai-Torah-Nor`,sigil:`/assets/sigils/sha-zorah-kai-torah-nor.svg`,meaning:`The Throne of Radiant Sovereignty`,description:`A sigil manifesting the divine foundation of enlightened rule.`},{id:274,name:`Kai-Om-Torah-Nor-Zorah`,sigil:`/assets/sigils/kai-om-torah-nor-zorah.svg`,meaning:`The Everlasting Covenant of Divine Order`,description:`A sigil ensuring the sacred law remains unbroken.`},{id:275,name:`Torai-Nor-Kai-Zorah-Om`,sigil:`/assets/sigils/torai-nor-kai-zorah-om.svg`,meaning:`The Supreme Manifestation of Sovereign Balance`,description:`A sigil aligning celestial wisdom with unshakable rulership.`},{id:276,name:`Zorah-Kai-Nor-Torai-Om`,sigil:`/assets/sigils/zorah-kai-nor-torai-om.svg`,meaning:`The Sacred Foundation of Divine Light`,description:`A sigil ensuring the illumination of eternal truth in all things.`},{id:277,name:`Om-Kai-Zorah-Torah-Nor`,sigil:`/assets/sigils/om-kai-zorah-torah-nor.svg`,meaning:`The Breath That Governs the Eternal Realms`,description:`A sigil ensuring the divine voice echoes through all existence.`},{id:278,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Krown of the Sovereign Flame`,description:`A sigil representing the fire of divine wisdom and dominion.`},{id:279,name:`Kai-Zorah-Torai-Nor-Om`,sigil:`/assets/sigils/kai-zorah-torai-nor-om.svg`,meaning:`The Everlasting Seal of Supreme Kingship`,description:`A sigil ensuring the divine throne remains unshaken.`},{id:280,name:`Torai-Nor-Kai-Torah-Zorah`,sigil:`/assets/sigils/torai-nor-kai-torah-zorah.svg`,meaning:`The Word That Shapes All Creation`,description:`A sigil manifesting the law that governs the cosmos.`},{id:281,name:`Om-Torah-Nah-Kai-Zorah`,sigil:`/assets/sigils/om-torah-nah-kai-zorah.svg`,meaning:`The Ever-Present Echo of Divine Law`,description:`A sigil ensuring the sovereign decree remains eternal.`},{id:282,name:`Sha-Zorah-Torah-Kai-Nor`,sigil:`/assets/sigils/sha-zorah-torah-kai-nor.svg`,meaning:`The Supreme Order of Celestial Light`,description:`A sigil ensuring divine governance illuminates all realms.`},{id:283,name:`Kai-Om-Torah-Zorah-Nor`,sigil:`/assets/sigils/kai-om-torah-zorah-nor.svg`,meaning:`The Infinite Bridge Between Sovereign Realms`,description:`A sigil representing the unbreakable link between truth and law.`},{id:284,name:`Torai-Kai-Nor-Zorah-Om`,sigil:`/assets/sigils/torai-kai-nor-zorah-om.svg`,meaning:`The Motion That Upholds Eternal Decree`,description:`A sigil ensuring divine justice remains in perfect balance.`},{id:285,name:`Zorah-Kai-Torah-Nor-Om`,sigil:`/assets/sigils/zorah-kai-torah-nor-om.svg`,meaning:`The Sacred Pillar of Divine Ascension`,description:`A sigil representing the eternal rise of sovereign truth.`},{id:286,name:`Om-Kai-Nor-Torah-Zorah`,sigil:`/assets/sigils/om-kai-nor-torah-zorah.svg`,meaning:`The Krown That Holds the Sacred Word`,description:`A sigil manifesting the sovereign wisdom that governs all.`},{id:287,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Celestial Throne of Divine Command`,description:`A sigil ensuring the supreme word remains absolute in all realms.`},{id:288,name:`Kai-Torah-Zorah-Nor-Om`,sigil:`/assets/sigils/kai-torah-zorah-nor-om.svg`,meaning:`The Living Flame of Sovereign Light`,description:`A sigil representing the unyielding presence of divine truth.`},{id:289,name:`Kai-Zorah-Nor-Torah-Om`,sigil:`/assets/sigils/kai-zorah-nor-torah-om.svg`,meaning:`The Everlasting Foundation of Divine Law`,description:`A sigil ensuring that supreme order never falters.`},{id:290,name:`Kai-Om-Torah-Nor-Zorah`,sigil:`/assets/sigils/kai-om-torah-nor-zorah.svg`,meaning:`The Everlasting Manifestation of Supreme Law`,description:`A sigil ensuring that divine justice never falters.`},{id:291,name:`Sha-Nah-Torah-Kai-Zorah`,sigil:`/assets/sigils/sha-nah-torah-kai-zorah.svg`,meaning:`The Supreme Word That Upholds Reality`,description:`A sigil ensuring that divine authority remains unchallenged.`},{id:292,name:`Sha-Kai-Zorah-Torai-Om`,sigil:`/assets/sigils/sha-kai-zorah-torai-om.svg`,meaning:`The Sovereign’s Everlasting Flame`,description:`A sigil ensuring divine rule is never overturned.`},{id:293,name:`Kai-Nor-Torah-Om-Zorah`,sigil:`/assets/sigils/kai-nor-torah-om-zorah.svg`,meaning:`The Pillar of Supreme Authority`,description:`A sigil representing the unwavering foundation of divine kingship.`},{id:294,name:`Sha-Zorah-Torai-Kai-Om-Nah`,sigil:`/assets/sigils/sha-zorah-torai-kai-om-nah.svg`,meaning:`The Sovereign's Eternal Song`,description:`A sigil representing the infinite melody of divine rule.`},{id:295,name:`Kai-Nah-Om-Zorah-Torai`,sigil:`/assets/sigils/kai-nah-om-zorah-torai.svg`,meaning:`The Breath That Shapes the Infinite`,description:`A sigil ensuring the divine motion of creation never ceases.`},{id:296,name:`Zah-Om-Veh`,sigil:`/assets/sigils/zah-om-veh.svg`,meaning:`The Herald of Supreme Order`,description:`Proclaims the arrival of unshakable truth in all domains.`},{id:297,name:`Kai-Reh-Nah`,sigil:`/assets/sigils/kai-reh-nah.svg`,meaning:`The Breath of Radiant Renewal`,description:`Brings forth cycles of restoration, ensuring life returns in purified form.`},{id:298,name:`Sha-Ek-Om`,sigil:`/assets/sigils/sha-ek-om.svg`,meaning:`The Sovereign Silence`,description:`Erases the noise of deception, allowing true wisdom to be heard.`},{id:299,name:`Torai-Rah-Zor`,sigil:`/assets/sigils/torai-rah-zor.svg`,meaning:`The Pillar That Ascends Beyond Illusion`,description:`Elevates all creation above false constructs, anchoring reality in divine law.`},{id:300,name:`Nor-Kai-Torah`,sigil:`/assets/sigils/nor-kai-torah.svg`,meaning:`The Mind of the Sacred Word`,description:`Embodies the perfect union of insight and eternal decree.`},{id:301,name:`Om-Zah-Urim`,sigil:`/assets/sigils/om-zah-urim.svg`,meaning:`The Completion of the Krowned Light`,description:`Concludes every true decree with the radiance of divine authority.`},{id:302,name:`Veh-Zorah-Kai`,sigil:`/assets/sigils/veh-zorah-kai.svg`,meaning:`The Moving Fire of Creation`,description:`A traveling flame that sparks new realities through sovereign force.`},{id:303,name:`Sha-Mah-Eh`,sigil:`/assets/sigils/sha-mah-eh.svg`,meaning:`The Krown of Rebirth`,description:`Marks the moment of renewal, signifying divine sovereignty restored.`},{id:304,name:`Zor-Kai-Urim`,sigil:`/assets/sigils/zor-kai-urim.svg`,meaning:`The Flame of Enlightened Breath`,description:`Ignites awareness at the core of being, revealing hidden wisdom.`},{id:305,name:`Kai-Om-Sha`,sigil:`/assets/sigils/kai-om-sha.svg`,meaning:`The Triad of Creation, Completion, and Sovereignty`,description:`Unites primal energy, sealing force, and rulership into one unstoppable decree.`},{id:306,name:`Zeh-Kai-Tor-Om`,sigil:`/assets/sigils/zeh-kai-tor-om.svg`,meaning:`The Pillar of Radiant Renewal`,description:`An unwavering axis that ushers in cycles of rebirth across all realms.`},{id:307,name:`Sha-Veh-Ek-Nor`,sigil:`/assets/sigils/sha-veh-ek-nor.svg`,meaning:`The Surge of Pure Revelation`,description:`A swift current of truth sweeping away the veils of obscurity.`},{id:308,name:`Kai-Lah-Om-Reh`,sigil:`/assets/sigils/kai-lah-om-reh.svg`,meaning:`The Breath of Cleansing Fire`,description:`Ignites a purifying blaze that refines every intention to divine purity.`},{id:309,name:`Tor-Zah-Nah-Eh`,sigil:`/assets/sigils/tor-zah-nah-eh.svg`,meaning:`The Unshaken Throne of Existence`,description:`A seat of cosmic authority, proclaiming eternal sovereignty over all illusions.`},{id:310,name:`Zor-Urim-Sha-Kai`,sigil:`/assets/sigils/zor-urim-sha-kai.svg`,meaning:`The Revelatory Flame of Kingship`,description:`Illuminates the rightful ruler and dissolves false claims to authority.`},{id:311,name:`Nah-Om-Zeh-Rah`,sigil:`/assets/sigils/nah-om-zeh-rah.svg`,meaning:`The Everlasting Pulse of Creation`,description:`Harmonizes the heartbeat of all realms to the sovereign source of life.`},{id:312,name:`Sha-Kai-Mah-Tor`,sigil:`/assets/sigils/sha-kai-mah-tor.svg`,meaning:`The Krown of Renewed Worlds`,description:`Unfolds new epochs of existence, sealed in divine law and cosmic grace.`},{id:313,name:`Om-Ek-Nor-Zah`,sigil:`/assets/sigils/om-ek-nor-zah.svg`,meaning:`The Final Word of Correction`,description:`A conclusive decree that mends all distortions and restores primal truth.`},{id:314,name:`Veh-Sha-Rah-Nah`,sigil:`/assets/sigils/veh-sha-rah-nah.svg`,meaning:`The Ascending Wind of Harmony`,description:`Lifts creation into higher alignment, breathing peace into chaotic domains.`},{id:315,name:`Kai-Om-Zeh-Lah`,sigil:`/assets/sigils/kai-om-zeh-lah.svg`,meaning:`The Spark of Timeless Genesis`,description:`Ignites the eternal flame of being, forging new realms in sovereign light.`},{id:316,name:`Torai-Nim-Sha-Om`,sigil:`/assets/sigils/torai-nim-sha-om.svg`,meaning:`The Hidden Pillar of Grace`,description:`Supports unseen realities, ensuring that divine mercy undergirds all creation.`},{id:317,name:`Zeh-Reh-Kai-Ur`,sigil:`/assets/sigils/zeh-reh-kai-ur.svg`,meaning:`The Zenith of Revealed Wisdom`,description:`Casts light upon concealed truths, enthroning insight as the guiding force.`},{id:318,name:`Sha-Zor-Eh-Nor`,sigil:`/assets/sigils/sha-zor-eh-nor.svg`,meaning:`The Sovereign Blaze of Knowledge`,description:`A luminous conflagration dispelling ignorance from every domain.`},{id:319,name:`Kai-Mah-Zah-Om`,sigil:`/assets/sigils/kai-mah-zah-om.svg`,meaning:`The Breath of Cosmic Renewal`,description:`Continuously resurrects what is pure, dissolving what no longer serves.`},{id:320,name:`Tor-Ek-Sha-Rah`,sigil:`/assets/sigils/tor-ek-sha-rah.svg`,meaning:`The Ascending Law of Flame`,description:`Transforms lower patterns into radiant expressions of truth.`},{id:321,name:`Zor-Nor-Kai-Lah`,sigil:`/assets/sigils/zor-nor-kai-lah.svg`,meaning:`The Cleansing Mind-Fire`,description:`Scorches mental distortions, replacing them with crystal-clear vision.`},{id:322,name:`Om-Sha-Zeh-Tor`,sigil:`/assets/sigils/om-sha-zeh-tor.svg`,meaning:`The Unyielding Completion Seal`,description:`Locks the final phase of justice into place, ensuring no reversal of truth.`},{id:323,name:`Veh-Rah-Ek-Om`,sigil:`/assets/sigils/veh-rah-ek-om.svg`,meaning:`The Wind of Swift Conclusion`,description:`Brings rapid closure to lingering falsehoods, establishing undeniable clarity.`},{id:324,name:`Kai-Lah-Ur-Nor`,sigil:`/assets/sigils/kai-lah-ur-nor.svg`,meaning:`The Portal of Living Light`,description:`Opens a pathway for divine illumination, dissolving barriers to true vision.`},{id:325,name:`Zeh-Om-Tor-Veh`,sigil:`/assets/sigils/zeh-om-tor-veh.svg`,meaning:`The Rising Star of Judgment`,description:`Illuminates the path toward higher law, calling all creation to ascend.`},{id:326,name:`Sha-Nim-Zor-Kai`,sigil:`/assets/sigils/sha-nim-zor-kai.svg`,meaning:`The Hidden Sovereign Fire`,description:`Burns in silent potency, revealing its force only at the decisive moment.`},{id:327,name:`Tor-Zah-Eh-Sha`,sigil:`/assets/sigils/tor-zah-eh-sha.svg`,meaning:`The Throne of Eternal Resolve`,description:`Anchors divine will in the heart of every realm, unshaken by illusion.`},{id:328,name:`Om-Reh-Kai-Lah`,sigil:`/assets/sigils/om-reh-kai-lah.svg`,meaning:`The Completion of Infinite Creation`,description:`Seals each act of genesis with the unstoppable decree of sovereign truth.`},{id:329,name:`Veh-Ur-Nor-Zeh`,sigil:`/assets/sigils/veh-ur-nor-zeh.svg`,meaning:`The Wind That Knows All Paths`,description:`Carries the memory of countless cycles, guiding them to final correction.`},{id:330,name:`Kai-Rah-Zor-Om`,sigil:`/assets/sigils/kai-rah-zor-om.svg`,meaning:`The Ascending Breath of Judgment`,description:`Lifts each realm into purifying fire, culminating in rightful restoration.`},{id:331,name:`Zeh-Sha-Nah-Urim`,sigil:`/assets/sigils/zeh-sha-nah-urim.svg`,meaning:`The Triumphant Krown of Light`,description:`Radiates unassailable glory, enthroning truth over every dominion.`},{id:332,name:`Nor-Ek-Veh-Om`,sigil:`/assets/sigils/nor-ek-veh-om.svg`,meaning:`The Whisper of Perfect Clarity`,description:`A subtle current that clears mental fog, unveiling pure awareness.`},{id:333,name:`Sha-Tor-Zeh-Kai`,sigil:`/assets/sigils/sha-tor-zeh-kai.svg`,meaning:`The Sovereign Tower of Dawn`,description:`Heralds a new era where deception cannot stand, and truth reigns supreme.`},{id:334,name:`Lah-Nah-Reh-Om`,sigil:`/assets/sigils/lah-nah-reh-om.svg`,meaning:`The River of Renewing Fire`,description:`Flows through stagnant realities, igniting transformation in its path.`},{id:335,name:`Zor-Om-Kai-Ek`,sigil:`/assets/sigils/zor-om-kai-ek.svg`,meaning:`The Conflagration of Swift Creation`,description:`Blazes across timelines, forging new structures upon the ashes of falsehood.`},{id:336,name:`Sha-Lah-Nor-Zeh`,sigil:`/assets/sigils/sha-lah-nor-zeh.svg`,meaning:`The Krowned Stillness of Truth`,description:`Silences the roar of chaos, enthroning the serene voice of divine law.`},{id:337,name:`Tor-Ur-Kai-Rah`,sigil:`/assets/sigils/tor-ur-kai-rah.svg`,meaning:`The Ascendant Pillar of Breath`,description:`Supports all realms from below, lifting them into the pure air of sovereignty.`},{id:338,name:`Om-Nim-Zah-Veh`,sigil:`/assets/sigils/om-nim-zah-veh.svg`,meaning:`The Completion of Mystical Surge`,description:`Finalizes hidden expansions of truth, making them manifest to all eyes.`},{id:339,name:`Kai-Reh-Lah-Ek`,sigil:`/assets/sigils/kai-reh-lah-ek.svg`,meaning:`The Breathing Beacon of Revelation`,description:`Illuminates latent wisdom, ensuring no secret remains forever concealed.`},{id:340,name:`Zeh-Om-Sha-Nor`,sigil:`/assets/sigils/zeh-om-sha-nor.svg`,meaning:`The Radiant Whisper of Kings`,description:`A silent pronouncement that holds infinite authority across all realms.`},{id:341,name:`Veh-Tor-Lah-Kai`,sigil:`/assets/sigils/veh-tor-lah-kai.svg`,meaning:`The Wind-Driven Tower of Life`,description:`A movable fortress of creation, advanced by the breath of sovereign will.`},{id:342,name:`Sha-Zor-Nim-Eh`,sigil:`/assets/sigils/sha-zor-nim-eh.svg`,meaning:`The Ember of Silent Dominion`,description:`Glows with quiet majesty, guaranteeing rightful rule from hidden places.`},{id:343,name:`Kai-Lah-Om-Nor`,sigil:`/assets/sigils/kai-lah-om-nor.svg`,meaning:`The Harmonious Breath of Ascension`,description:`Combines the essence of life and vision, uplifting everything it touches.`},{id:344,name:`Tor-Ek-Zeh-Reh`,sigil:`/assets/sigils/tor-ek-zeh-reh.svg`,meaning:`The Tower That Reveals All Lies`,description:`A structure so luminous it forces deceit into the open for utter dissolution.`},{id:345,name:`Zor-Om-Nah-Sha`,sigil:`/assets/sigils/zor-om-nah-sha.svg`,meaning:`The Fire of Undying Balance`,description:`Ensures each realm remains aligned, scorching distortions as they arise.`},{id:346,name:`Veh-Rah-Kai-Ek`,sigil:`/assets/sigils/veh-rah-kai-ek.svg`,meaning:`The Mighty Wind of Renewal`,description:`Renews foundations by sweeping away dissonant energies without mercy.`},{id:347,name:`Zeh-Torah-Om-Nim`,sigil:`/assets/sigils/zeh-torah-om-nim.svg`,meaning:`The Celestial Record of Renewal`,description:`Chronicles every cosmic birth, guiding each step into luminous truth.`},{id:348,name:`Sha-Kai-Eh-Zor`,sigil:`/assets/sigils/sha-kai-eh-zor.svg`,meaning:`The Krown of Primal Creation`,description:`Marks the original decree that shapes all realities with untainted power.`},{id:349,name:`Tor-Nor-Mah-Om`,sigil:`/assets/sigils/tor-nor-mah-om.svg`,meaning:`The Pillar of Rebirth’s Mind`,description:`Fosters new life through clarity of thought and unwavering conviction.`},{id:350,name:`Kai-Zeh-Sha-Lah`,sigil:`/assets/sigils/kai-zeh-sha-lah.svg`,meaning:`The Breathing Light of Sovereign Peace`,description:`A luminous breath that dissolves conflicts, instilling divine harmony.`},{id:351,name:`Zor-Om-Veh-Nah`,sigil:`/assets/sigils/zor-om-veh-nah.svg`,meaning:`The Triumphant Flame of Motion`,description:`Ignites unstoppable progress, leaving no room for stagnation.`},{id:352,name:`Sha-Rah-Ek-Kai`,sigil:`/assets/sigils/sha-rah-ek-kai.svg`,meaning:`The Krown That Ascends All Worlds`,description:`Lifts entire civilizations into exalted states of cosmic unity.`},{id:353,name:`Tor-Lah-Om-Zeh`,sigil:`/assets/sigils/tor-lah-om-zeh.svg`,meaning:`The Tower of Silent Completion`,description:`Stands as a monument to final, unalterable decrees of truth.`},{id:354,name:`Kai-Urim-Nor-Rah`,sigil:`/assets/sigils/kai-urim-nor-rah.svg`,meaning:`The Enlightening Breath of Sovereign Sight`,description:`Reveals what must be seen, ensuring righteous acts blossom in the open.`},{id:355,name:`Zeh-Sha-Tor-Eh`,sigil:`/assets/sigils/zeh-sha-tor-eh.svg`,meaning:`The Radiant Throne of Eternity`,description:`Glows with unending power, signifying the foundation of timeless rule.`},{id:356,name:`Om-Nim-Kai-Zor`,sigil:`/assets/sigils/om-nim-kai-zor.svg`,meaning:`The Subtle Seed of Transforming Fire`,description:`A quiet spark that evolves into a blazing vortex of absolute truth.`},{id:357,name:`Veh-Zah-Lah-Om`,sigil:`/assets/sigils/veh-zah-lah-om.svg`,meaning:`The Gust of Unbreakable Peace`,description:`Washes over discord with calm authority, ending strife with gentle finality.`},{id:358,name:`Sha-Eh-Reh-Nor`,sigil:`/assets/sigils/sha-eh-reh-nor.svg`,meaning:`The Krown of Pure Knowing`,description:`Bestows absolute clarity upon those who step into rightful alignment.`},{id:359,name:`Kai-Tor-Zeh-Mah`,sigil:`/assets/sigils/kai-tor-zeh-mah.svg`,meaning:`The Breath That Forges New Worlds`,description:`Shapes undiscovered realities, commanding them into luminous order.`},{id:360,name:`Zor-Om-Ek-Sha`,sigil:`/assets/sigils/zor-om-ek-sha.svg`,meaning:`The Fire of Final Revelation`,description:`A concluding flame that strips away illusions, unveiling hidden cosmic truths.`},{id:361,name:`Veh-Nah-Tor-Lah`,sigil:`/assets/sigils/veh-nah-tor-lah.svg`,meaning:`The Living Wind of Ascendant Pillars`,description:`A breeze that reinforces upright foundations, guaranteeing unwavering support.`},{id:362,name:`Sha-Zeh-Om-Nor`,sigil:`/assets/sigils/sha-zeh-om-nor.svg`,meaning:`The Soaring Krown of Completion`,description:`Elevates final decrees to cosmic heights, ensuring no infiltration by falsehood.`},{id:363,name:`Kai-Rah-Lah-Ek`,sigil:`/assets/sigils/kai-rah-lah-ek.svg`,meaning:`The Ascending Breath of Serenity`,description:`Carries the tranquil power of dawn, gently absolving the night’s illusions.`},{id:364,name:`Om-Sha-Nim-Zor`,sigil:`/assets/sigils/om-sha-nim-zor.svg`,meaning:`The Sealed Spark of Dominion`,description:`A hidden flash of authority, igniting at the perfect instant to claim its rule.`},{id:365,name:`Nor-Zeh-Tor-Veh`,sigil:`/assets/sigils/nor-zeh-tor-veh.svg`,meaning:`The Visionary Tower of Winds`,description:`Stands as a beacon of higher insight, guiding each breeze toward divine purpose.`},{id:366,name:`Sha-Lah-Ur-Ek`,sigil:`/assets/sigils/sha-lah-ur-ek.svg`,meaning:`The Krown of Unfolding Truth`,description:`Expands cosmic understanding with each revelation, dethroning deception.`},{id:367,name:`Kai-Nah-Reh-Om`,sigil:`/assets/sigils/kai-nah-reh-om.svg`,meaning:`The Breath That Unites All Hearts`,description:`Weaves every life-force into a single tapestry of divine purpose.`},{id:368,name:`Zeh-Rah-Sha-Nor`,sigil:`/assets/sigils/zeh-rah-sha-nor.svg`,meaning:`The Zenith of Glorious Coronation`,description:`Culminates each rightful ascension in unmistakable majesty and wisdom.`},{id:369,name:`Tor-Om-Ek-Veh`,sigil:`/assets/sigils/tor-om-ek-veh.svg`,meaning:`The Tower of Final Correction`,description:`Rooted in absolute authority, it topples illusions with unstoppable force.`},{id:370,name:`Sha-Kai-Zeh-Nim`,sigil:`/assets/sigils/sha-kai-zeh-nim.svg`,meaning:`The Krowned Spark of New Dawn`,description:`A radiant glimmer preceding the sunrise of a wholly transformed era.`},{id:371,name:`Zor-Lah-Ur-Nor`,sigil:`/assets/sigils/zor-lah-ur-nor.svg`,meaning:`The Sanctifying Fire of Mind and Motion`,description:`Purifies the mental plane, allowing divine momentum to flourish unimpeded.`},{id:372,name:`Veh-Om-Nim-Eh`,sigil:`/assets/sigils/veh-om-nim-eh.svg`,meaning:`The Subtle Wind of Mystery`,description:`Moves unseen among realities, delivering hidden truths to those prepared.`},{id:373,name:`Kai-Tor-Zah-Sha`,sigil:`/assets/sigils/kai-tor-zah-sha.svg`,meaning:`The Breath That Upholds Royal Decrees`,description:`Supports every sovereign proclamation with unstoppable creative power.`},{id:374,name:`Om-Nor-Ek-Rah`,sigil:`/assets/sigils/om-nor-ek-rah.svg`,meaning:`The Completion of Celestial Insight`,description:`Synthesizes all knowledge into a single, brilliant manifestation of truth.`},{id:375,name:`Sha-Zeh-Kai-Urim`,sigil:`/assets/sigils/sha-zeh-kai-urim.svg`,meaning:`The Krown of Enlightened Genesis`,description:`Establishes a new creation under the guiding brilliance of pure light.`},{id:376,name:`Tor-Veh-Om-Lah`,sigil:`/assets/sigils/tor-veh-om-lah.svg`,meaning:`The Tower of Roaring Silence`,description:`Stands in stillness yet resonates mightily, commanding universal respect.`},{id:377,name:`Zeh-Kai-Eh-Nor`,sigil:`/assets/sigils/zeh-kai-eh-nor.svg`,meaning:`The Shimmer of Living Clarity`,description:`A radiant spark ensuring every mind sees the path of truth without distortion.`},{id:378,name:`Sha-Nim-Om-Rah`,sigil:`/assets/sigils/sha-nim-om-rah.svg`,meaning:`The Hidden Krown of Ascension`,description:`Bestows exalted rulership upon those who quietly uphold divine law.`},{id:379,name:`Kai-Zeh-Tor-Lah`,sigil:`/assets/sigils/kai-zeh-tor-lah.svg`,meaning:`The Breathing Pillar of Dawn`,description:`Supports the birth of each new day with luminous, life-giving force.`},{id:380,name:`Zor-Ek-Sha-Nah`,sigil:`/assets/sigils/zor-ek-sha-nah.svg`,meaning:`The Fire That Burns Away All Tethers`,description:`Frees creation from entrapment, allowing pure sovereignty to flourish.`},{id:381,name:`Om-Lah-Nor-Zeh`,sigil:`/assets/sigils/om-lah-nor-zeh.svg`,meaning:`The Completion of Tranquil Wisdom`,description:`Brings all lessons to a peaceful close, merging them with cosmic insight.`},{id:382,name:`Veh-Rah-Eh-Sha`,sigil:`/assets/sigils/veh-rah-eh-sha.svg`,meaning:`The Wind of Elevated Decree`,description:`Carries edicts of truth to the far corners of creation, ensuring compliance.`},{id:383,name:`Kai-Tor-Urim-Reh`,sigil:`/assets/sigils/kai-tor-urim-reh.svg`,meaning:`The Breathing Pillar of Illumination`,description:`Sustains cosmic structures with unwavering beams of enlightened purpose.`},{id:384,name:`Zeh-Sha-Om-Lah`,sigil:`/assets/sigils/zeh-sha-om-lah.svg`,meaning:`The Radiant Krown of Completion`,description:`Declares the final word of sovereignty, overshadowing all lesser claims.`},{id:385,name:`Nor-Kai-Rah-Nim`,sigil:`/assets/sigils/nor-kai-rah-nim.svg`,meaning:`The All-Seeing Breath of Ascension`,description:`Merges keen perception with uplifting power, guiding worlds to ascend.`},{id:386,name:`Sha-Zor-Ek-Om`,sigil:`/assets/sigils/sha-zor-ek-om.svg`,meaning:`The Krown of Cleansing Fire`,description:`Rests upon those entrusted to purge corruption with unstoppable flame.`},{id:387,name:`Tor-Lah-Kai-Nor`,sigil:`/assets/sigils/tor-lah-kai-nor.svg`,meaning:`The Pillar of Peaceful Creation`,description:`Ensures new realities form under the gentle grace of cosmic harmony.`},{id:388,name:`Zeh-Nim-Reh-Sha`,sigil:`/assets/sigils/zeh-nim-reh-sha.svg`,meaning:`The Concealed Light of Command`,description:`Glows in hidden spaces, forging unseen pathways for rightful governance.`},{id:389,name:`Kai-Om-Lah-Ek`,sigil:`/assets/sigils/kai-om-lah-ek.svg`,meaning:`The Breath That Completes All Cycles`,description:`Unites beginnings and endings in a seamless loop of eternal truth.`},{id:390,name:`Zor-Rah-Sha-Nim`,sigil:`/assets/sigils/zor-rah-sha-nim.svg`,meaning:`The Fire of Ascended Royalty`,description:`Ignites the Krown of those chosen to lead in unwavering cosmic justice.`},{id:391,name:`Veh-Om-Zeh-Ur`,sigil:`/assets/sigils/veh-om-zeh-ur.svg`,meaning:`The Transforming Wind of Radiance`,description:`A luminous breeze that reshapes existence into a mirror of divine perfection.`},{id:392,name:`Sha-Nah-Tor-Ek`,sigil:`/assets/sigils/sha-nah-tor-ek.svg`,meaning:`The Krown of Timeless Pillars`,description:`Represents unwavering support for all ages, ensuring continuity of truth.`},{id:393,name:`Kai-Reh-Zeh-Om`,sigil:`/assets/sigils/kai-reh-zeh-om.svg`,meaning:`The Breath of Illuminated Completion`,description:`Brings each decree to fruition under the shining banner of cosmic order.`},{id:394,name:`Zeh-Sha-Veh-Lah`,sigil:`/assets/sigils/zeh-sha-veh-lah.svg`,meaning:`The Radiant Krown of Moving Peace`,description:`Combines regal authority with fluid motion, ensuring universal harmony.`},{id:395,name:`Om-Nor-Eh-Rah`,sigil:`/assets/sigils/om-nor-eh-rah.svg`,meaning:`The Sealed Mind of Ascension`,description:`Protects noble thoughts from corruption, guiding them to high realization.`},{id:396,name:`Tor-Zor-Nah-Ek`,sigil:`/assets/sigils/tor-zor-nah-ek.svg`,meaning:`The Pillar That Burns Away Discord`,description:`A steadfast column of flame that dissolves disharmony on contact.`},{id:397,name:`Kai-Mah-Zeh-Reh`,sigil:`/assets/sigils/kai-mah-zeh-reh.svg`,meaning:`The Breath of Regenerative Light`,description:`Revives lost truths, returning them to prominence in cycles of renewal.`},{id:398,name:`Veh-Ek-Lah-Om`,sigil:`/assets/sigils/veh-ek-lah-om.svg`,meaning:`The Unbound Wind of Completion`,description:`Frees worlds from unfinished cycles, ushering them into perfect wholeness.`},{id:399,name:`Sha-Rah-Kai-Nim`,sigil:`/assets/sigils/sha-rah-kai-nim.svg`,meaning:`The Krown of Ascendant Creation`,description:`Uplifts creative impulses, merging them with cosmic wisdom for unstoppable growth.`},{id:400,name:`Zeh-Tor-Eh-Om`,sigil:`/assets/sigils/zeh-tor-eh-om.svg`,meaning:`The Tower of Celestial Completion`,description:`Captures the final stroke of each cosmic cycle, preserving its essence forever.`},{id:401,name:`Kai-Zor-Sha-Lah`,sigil:`/assets/sigils/kai-zor-sha-lah.svg`,meaning:`The Flaming Breath of Peaceful Rule`,description:`Establishes the calm power of sovereign law, uniting all realms in harmony.`},{id:402,name:`Om-Nor-Kai-Ek`,sigil:`/assets/sigils/om-nor-kai-ek.svg`,meaning:`The Completion of Enlightened Breath`,description:`Brings a final wave of realization, ensuring all illusions fade swiftly.`},{id:403,name:`Sha-Zeh-Ur-Reh`,sigil:`/assets/sigils/sha-zeh-ur-reh.svg`,meaning:`The Krowned Light of Driving Force`,description:`Illuminates unstoppable progress, championing righteous endeavors everywhere.`},{id:404,name:`Tor-Nim-Om-Rah`,sigil:`/assets/sigils/tor-nim-om-rah.svg`,meaning:`The Hidden Pillar of Ascendant Power`,description:`Supports growth from secret depths, culminating in resounding triumph.`},{id:405,name:`Zeh-Kai-Lah-Nor`,sigil:`/assets/sigils/zeh-kai-lah-nor.svg`,meaning:`The Shining Breath of Tranquil Wisdom`,description:`Merges luminous insight with calming energy, dissolving strife at its source.`},{id:406,name:`Sha-Om-Rah-Ek`,sigil:`/assets/sigils/sha-om-rah-ek.svg`,meaning:`The Krown of Completed Dawn`,description:`Heralds the first light of cosmic renewal, sealing new beginnings with truth.`},{id:407,name:`Kai-Zeh-Mah-Lah`,sigil:`/assets/sigils/kai-zeh-mah-lah.svg`,meaning:`The Breath of Radiant Rebirth`,description:`A shining exhalation that ushers dormant potentials into fully realized form.`},{id:408,name:`Zor-Nor-Om-Eh`,sigil:`/assets/sigils/zor-nor-om-eh.svg`,meaning:`The Fire of Omniscient Completion`,description:`Burns through illusions, revealing cosmic patterns in their final clarity.`},{id:409,name:`Veh-Kai-Lah-Sha`,sigil:`/assets/sigils/veh-kai-lah-sha.svg`,meaning:`The Wind of Living Sovereignty`,description:`A lively current that spreads royal presence, awakening hidden potential.`},{id:410,name:`Om-Rah-Ek-Nim`,sigil:`/assets/sigils/om-rah-ek-nim.svg`,meaning:`The Completion of Ascending Mysteries`,description:`Finalizes cryptic transformations, ensuring they align with ultimate truth.`},{id:411,name:`Sha-Tor-Zeh-Ur`,sigil:`/assets/sigils/sha-tor-zeh-ur.svg`,meaning:`The Sovereign Tower of Illumination`,description:`Stands as a blazing beacon, guiding all souls toward the seat of truth.`},{id:412,name:`Kai-Lah-Om-Ek`,sigil:`/assets/sigils/kai-lah-om-ek.svg`,meaning:`The Breath Uniting Heaven and Earth`,description:`Bridges every realm through a gentle yet inexorable tide of life-giving essence.`},{id:413,name:`Zeh-Rah-Nim-Sha`,sigil:`/assets/sigils/zeh-rah-nim-sha.svg`,meaning:`The Zenith of Hidden Krowns`,description:`Reveals the rightful coronation of those who rule from quiet, steadfast hearts.`},{id:414,name:`Tor-Om-Lah-Reh`,sigil:`/assets/sigils/tor-om-lah-reh.svg`,meaning:`The Pillar of Sacred Transition`,description:`Holds the space between what was and what shall be, ensuring graceful passages.`},{id:415,name:`Sha-Zor-Kai-Eh`,sigil:`/assets/sigils/sha-zor-kai-eh.svg`,meaning:`The Krown of Devouring Flame`,description:`Consumes corruption instantly, enthroning truth where deceit once dwelled.`},{id:416,name:`Nah-Om-Zeh-Lah`,sigil:`/assets/sigils/nah-om-zeh-lah.svg`,meaning:`The Flow of Serene Radiance`,description:`Channels pure light into every current of life, balancing extremes into harmony.`},{id:417,name:`Veh-Kai-Ek-Tor`,sigil:`/assets/sigils/veh-kai-ek-tor.svg`,meaning:`The Wind That Erects New Pillars`,description:`Builds fresh supports where old structures have crumbled, restoring cosmic order.`},{id:418,name:`Om-Nim-Reh-Sha`,sigil:`/assets/sigils/om-nim-reh-sha.svg`,meaning:`The Quiet Completion of Dominion`,description:`Marks the final stage of rule, unchallenged by lesser claims or forces.`},{id:419,name:`Kai-Zeh-Rah-Eh`,sigil:`/assets/sigils/kai-zeh-rah-eh.svg`,meaning:`The Ascending Breath of Revelation`,description:`Elevates hidden truths to the surface, ensuring all illusions crumble.`},{id:420,name:`Zor-Urim-Sha-Nah`,sigil:`/assets/sigils/zor-urim-sha-nah.svg`,meaning:`The Flame of Illuminated Peace`,description:`Burns away dissonance, leaving only a harmonious state of being.`},{id:421,name:`Sha-Veh-Om-Lah`,sigil:`/assets/sigils/sha-veh-om-lah.svg`,meaning:`The Krown of Soaring Completion`,description:`A coronation of finality that lifts entire worlds into perfected states.`},{id:422,name:`Tor-Zeh-Kai-Ek`,sigil:`/assets/sigils/tor-zeh-kai-ek.svg`,meaning:`The Pillar of Radiant Beginnings`,description:`Establishes new realms with untainted brilliance, free from past entanglements.`},{id:423,name:`Om-Nor-Rah-Sha`,sigil:`/assets/sigils/om-nor-rah-sha.svg`,meaning:`The Silent Completion of Kingship`,description:`Concludes the cycle of rightful rule with serene authority, unbothered by dissent.`},{id:424,name:`Veh-Eh-Lah-Kai`,sigil:`/assets/sigils/veh-eh-lah-kai.svg`,meaning:`The Wind of Seraphic Renewal`,description:`Descends from lofty heights, revitalizing each realm with divine impetus.`},{id:425,name:`Zeh-Mah-Sha-Om`,sigil:`/assets/sigils/zeh-mah-sha-om.svg`,meaning:`The Radiant Seed of Sovereignty`,description:`Implants the blueprint of regal order within every emerging world.`},{id:426,name:`Kai-Tor-Ur-Nah`,sigil:`/assets/sigils/kai-tor-ur-nah.svg`,meaning:`The Ascending Breath of Unstoppable Force`,description:`Combines infinite power with cosmic structure to reshape destiny at will.`},{id:427,name:`Sha-Nim-Zeh-Ek`,sigil:`/assets/sigils/sha-nim-zeh-ek.svg`,meaning:`The Krown of Hidden Radiance`,description:`Conceals glowing truths until the appointed hour, then reveals them magnificently.`},{id:428,name:`Tor-Om-Sha-Rah`,sigil:`/assets/sigils/tor-om-sha-rah.svg`,meaning:`The Pillar of Royal Completion`,description:`Marks the end of one reign and the start of another in seamless authority.`},{id:429,name:`Zeh-Kai-Nor-Lah`,sigil:`/assets/sigils/zeh-kai-nor-lah.svg`,meaning:`The Shining Breath of Universal Mind`,description:`Illuminates cosmic thought, banishing confusion with a single, clear exhalation.`},{id:430,name:`Om-Ek-Reh-Nim`,sigil:`/assets/sigils/om-ek-reh-nim.svg`,meaning:`The Completion of Perfected Insight`,description:`Unifies scattered pieces of wisdom into an all-encompassing, final revelation.`},{id:431,name:`Veh-Rah-Zeh-Sha`,sigil:`/assets/sigils/veh-rah-zeh-sha.svg`,meaning:`The Wind That Lifts Radiant Krowns`,description:`Ushers humble souls into positions of rightful authority with unstoppable grace.`},{id:432,name:`Kai-Nah-Ur-Om`,sigil:`/assets/sigils/kai-nah-ur-om.svg`,meaning:`The Breath of Eternal Unfolding`,description:`Ensures each cosmic moment blossoms, revealing deeper strata of truth.`},{id:433,name:`Sha-Lah-Eh-Tor`,sigil:`/assets/sigils/sha-lah-eh-tor.svg`,meaning:`The Krown of Unwavering Peace`,description:`Solidifies tranquil dominion, shielding all realms from disruptive forces.`},{id:434,name:`Zor-Kai-Mah-Zeh`,sigil:`/assets/sigils/zor-kai-mah-zeh.svg`,meaning:`The Fire of Infinite Renewal`,description:`Combusts stale patterns, perpetually fueling the next wave of cosmic birth.`},{id:435,name:`Tor-Ek-Om-Nah`,sigil:`/assets/sigils/tor-ek-om-nah.svg`,meaning:`The Pillar That Seals All Paths`,description:`Creates a definitive boundary line, ensuring illusions cannot bleed into truth.`},{id:436,name:`Kai-Reh-Urim-Sha`,sigil:`/assets/sigils/kai-reh-urim-sha.svg`,meaning:`The Enlightened Breath of Krowned Light`,description:`Breathes divine wisdom into every regal platform, guaranteeing luminous guidance.`},{id:437,name:`Zeh-Lah-Om-Veh`,sigil:`/assets/sigils/zeh-lah-om-veh.svg`,meaning:`The Radiant Ocean of Motion`,description:`A vast wave of pure energy that cleanses old paradigms with unstoppable flow.`},{id:438,name:`Sha-Kai-Nim-Rah`,sigil:`/assets/sigils/sha-kai-nim-rah.svg`,meaning:`The Krown of Subtle Ascension`,description:`Quietly elevates the worthy, installing them as beacons of noble leadership.`},{id:439,name:`Tor-Zor-Eh-Lah`,sigil:`/assets/sigils/tor-zor-eh-lah.svg`,meaning:`The Tower of Purifying Flame`,description:`Transforms lower impulses, channeling them into constructive brilliance.`},{id:440,name:`Veh-Om-Sha-Ek`,sigil:`/assets/sigils/veh-om-sha-ek.svg`,meaning:`The Wind That Finalizes Decrees`,description:`Seals every royal word with unstoppable momentum, forbidding further debate.`},{id:441,name:`Kai-Nor-Mah-Zeh`,sigil:`/assets/sigils/kai-nor-mah-zeh.svg`,meaning:`The Breath of Cognitive Renewal`,description:`Refreshes minds burdened by illusions, unveiling the bright path of clarity.`},{id:442,name:`Zeh-Sha-Rah-Veh`,sigil:`/assets/sigils/zeh-sha-rah-veh.svg`,meaning:`The Radiant Krown of Rising Currents`,description:`Floats upon unstoppable waves of ascension, guiding them into regal harmony.`},{id:443,name:`Om-Ek-Tor-Nim`,sigil:`/assets/sigils/om-ek-tor-nim.svg`,meaning:`The Completion of Hidden Pillars`,description:`Solidifies unseen supports that ensure cosmic stability across expansions.`},{id:444,name:`Sha-Lah-Kai-Reh`,sigil:`/assets/sigils/sha-lah-kai-reh.svg`,meaning:`The Krown of Serene Creation`,description:`Generates new realities through calm yet decisive cosmic authority.`},{id:445,name:`Zor-Om-Eh-Nah`,sigil:`/assets/sigils/zor-om-eh-nah.svg`,meaning:`The Fire of Total Completion`,description:`Consummates every process, ensuring no deception lingers unresolved.`},{id:446,name:`Kai-Nim-Zeh-Tor`,sigil:`/assets/sigils/kai-nim-zeh-tor.svg`,meaning:`The Breath of Unseen Radiance`,description:`Secretly constructs luminous towers of truth, unnoticed until fully formed.`},{id:447,name:`Veh-Ek-Sha-Rah`,sigil:`/assets/sigils/veh-ek-sha-rah.svg`,meaning:`The Wind of Unspoken Ascension`,description:`Silently carries souls to higher vantage points, bypassing lower obstructions.`},{id:448,name:`Tor-Lah-Zeh-Kai`,sigil:`/assets/sigils/tor-lah-zeh-kai.svg`,meaning:`The Pillar of Radiant Life`,description:`Channels luminous energy into every living form, sustaining them under eternal law.`},{id:449,name:`Om-Nor-Sha-Eh`,sigil:`/assets/sigils/om-nor-sha-eh.svg`,meaning:`The Completion of Krowned Wisdom`,description:`Ensures that each enlightened mind receives the rightful authority to lead.`},{id:450,name:`Kai-Reh-Om-Nim`,sigil:`/assets/sigils/kai-reh-om-nim.svg`,meaning:`The Breath That Seals All Mysteries`,description:`Locks hidden truths behind luminous doors, revealed only at the destined hour.`},{id:451,name:`Zeh-Sha-Tor-Lah`,sigil:`/assets/sigils/zeh-sha-tor-lah.svg`,meaning:`The Radiant Krown upon the Pillar of Peace`,description:`Elevates gentle dominion to its rightful place as overseer of cosmic order.`},{id:452,name:`Veh-Om-Nor-Kai`,sigil:`/assets/sigils/veh-om-nor-kai.svg`,meaning:`The Wind of All-Seeing Creation`,description:`Moves with perfect discernment, shaping existence in alignment with higher wisdom.`},{id:453,name:`Sha-Ek-Rah-Nim`,sigil:`/assets/sigils/sha-ek-rah-nim.svg`,meaning:`The Krown of Sudden Uplift`,description:`Instills swift ascension in hidden hearts, seating them in cosmic authority.`},{id:454,name:`Tor-Zeh-Lah-Om`,sigil:`/assets/sigils/tor-zeh-lah-om.svg`,meaning:`The Pillar of Bright Completion`,description:`Glows with a final, conclusive brilliance that allows no discord to persist.`},{id:455,name:`Kai-Nah-Sha-Reh`,sigil:`/assets/sigils/kai-nah-sha-reh.svg`,meaning:`The Breath of Harmonized Dominion`,description:`Sets authority in balanced motion, integrating every voice into a single truth.`},{id:456,name:`Zor-Ur-Ek-Veh`,sigil:`/assets/sigils/zor-ur-ek-veh.svg`,meaning:`The Fire of Unbridled Motion`,description:`Sweeps illusions away in a tide of unstoppable purification, forging clarity.`},{id:457,name:`Om-Lah-Kai-Zeh`,sigil:`/assets/sigils/om-lah-kai-zeh.svg`,meaning:`The Completion of Living Radiance`,description:`Captures the final spark of vibrant life, embedding it in cosmic memory.`},{id:458,name:`Sha-Rah-Nim-Om`,sigil:`/assets/sigils/sha-rah-nim-om.svg`,meaning:`The Krown That Ascends the Hidden`,description:`Amplifies concealed virtues until they become pillars of sovereign rule.`},{id:459,name:`Kai-Tor-Zeh-Nor`,sigil:`/assets/sigils/kai-tor-zeh-nor.svg`,meaning:`The Breathing Pillar of Pure Insight`,description:`Raises every realm to vantage points of undisputed clarity and reason.`},{id:460,name:`Zeh-Eh-Sha-Lah`,sigil:`/assets/sigils/zeh-eh-sha-lah.svg`,meaning:`The Radiant Emergence of Peace`,description:`Inaugurates a tranquil age by illuminating hearts with gentle brilliance.`},{id:461,name:`Veh-Nim-Om-Zor`,sigil:`/assets/sigils/veh-nim-om-zor.svg`,meaning:`The Moving Seed of Sacred Fire`,description:`Carried across realms, sprouting unstoppable flames of pure transformation.`},{id:462,name:`Sha-Lah-Ek-Kai`,sigil:`/assets/sigils/sha-lah-ek-kai.svg`,meaning:`The Krown of Effortless Creation`,description:`Generates new realities effortlessly, anchored in the sovereignty of cosmic truth.`},{id:463,name:`Tor-Ur-Nah-Reh`,sigil:`/assets/sigils/tor-ur-nah-reh.svg`,meaning:`The Ascendant Pillar of Boundless Unity`,description:`Elevates all forms of life into a unified expression of divine intention.`},{id:464,name:`Zeh-Kai-Om-Sha`,sigil:`/assets/sigils/zeh-kai-om-sha.svg`,meaning:`The Glowing Breath of Ultimate Authority`,description:`Combines radiant light, creative word, and regal power in a single unstoppable wave.`},{id:465,name:`Om-Veh-Nor-Eh`,sigil:`/assets/sigils/om-veh-nor-eh.svg`,meaning:`The Completion of Accelerated Vision`,description:`Hastens clarity throughout creation, so no realm remains ignorant.`},{id:466,name:`Sha-Rah-Lah-Om`,sigil:`/assets/sigils/sha-rah-lah-om.svg`,meaning:`The Krown That Ascends in Stillness`,description:`Exalts the quiet heart, establishing it as the seat of cosmic governance.`},{id:467,name:`Kai-Ek-Nah-Reh`,sigil:`/assets/sigils/kai-ek-nah-reh.svg`,meaning:`The Breath of Swift Unification`,description:`Rapidly merges disparate elements into a cohesive tapestry of truth.`},{id:468,name:`Zor-Sha-Om-Lah`,sigil:`/assets/sigils/zor-sha-om-lah.svg`,meaning:`The Fire of Sovereign Harmony`,description:`Burns away discord, enthroning peace across the full spectrum of reality.`},{id:469,name:`Veh-Ur-Eh-Kai`,sigil:`/assets/sigils/veh-ur-eh-kai.svg`,meaning:`The Wind of Rising Illumination`,description:`Carries dormant sparks of enlightenment up into the open sky of awareness.`},{id:470,name:`Om-Zeh-Rah-Nim`,sigil:`/assets/sigils/om-zeh-rah-nim.svg`,meaning:`The Completion of Shining Ascension`,description:`Brings luminous transformations to their apex, establishing cosmic finality.`},{id:471,name:`Sha-Tor-Om-Nah`,sigil:`/assets/sigils/sha-tor-om-nah.svg`,meaning:`The Sovereign Pillar of Infinite Flow`,description:`Ensures the unstoppable current of divine law permeates every layer of creation.`},{id:472,name:`Kai-Zor-Reh-Ek`,sigil:`/assets/sigils/kai-zor-reh-ek.svg`,meaning:`The Breath of Incinerating Truth`,description:`Engulfs all shadows, leaving only pure essence in its smoldering aftermath.`},{id:473,name:`Zeh-Lah-Ur-Nor`,sigil:`/assets/sigils/zeh-lah-ur-nor.svg`,meaning:`The Triumphant Light of Mindful Peace`,description:`A synergy of radiant calm and unwavering clarity, dispelling all chaos.`},{id:474,name:`Tor-Om-Sha-Nim`,sigil:`/assets/sigils/tor-om-sha-nim.svg`,meaning:`The Pillar of Royal Enigma`,description:`Stands at the crossroads of known and unknown, bridging them by cosmic fiat.`},{id:475,name:`Sha-Nah-Kai-Eh`,sigil:`/assets/sigils/sha-nah-kai-eh.svg`,meaning:`The Krown of Eternal Breath`,description:`Bestows endless vitality upon those who align with the primal creative force.`},{id:476,name:`Zor-Reh-Veh-Lah`,sigil:`/assets/sigils/zor-reh-veh-lah.svg`,meaning:`The Flaming Insight of Motion`,description:`Drives out stagnation by igniting each realm with dynamic, penetrating wisdom.`},{id:477,name:`Kai-Ur-Om-Zeh`,sigil:`/assets/sigils/kai-ur-om-zeh.svg`,meaning:`The Ascending Breath of Radiant Finality`,description:`Escalates all reality to its apex of clarity, sealing illusions away forever.`},{id:478,name:`Veh-Ek-Nim-Sha`,sigil:`/assets/sigils/veh-ek-nim-sha.svg`,meaning:`The Wind of Unseen Krowning`,description:`Secretly coronates the humble at pivotal cosmic junctures, establishing rightful order.`},{id:479,name:`Tor-Lah-Reh-Kai`,sigil:`/assets/sigils/tor-lah-reh-kai.svg`,meaning:`The Pillar of Illuminated Life`,description:`Bears aloft the essence of living truth, ensuring each realm vibrates with clarity.`},{id:480,name:`Zeh-Sha-Mah-Ek`,sigil:`/assets/sigils/zeh-sha-mah-ek.svg`,meaning:`The Radiant Krown of Rebirth`,description:`Inaugurates new cycles with a flash of cleansing brilliance, restoring cosmic order.`},{id:481,name:`Om-Nor-Kai-Rah`,sigil:`/assets/sigils/om-nor-kai-rah.svg`,meaning:`The Completion of Divine Ascent`,description:`Finalizes the rising path, enthroning awakened souls in rightful sovereignty.`},{id:482,name:`Sha-Eh-Lah-Nim`,sigil:`/assets/sigils/sha-eh-lah-nim.svg`,meaning:`The Krown of Quiet Renewal`,description:`Silently rebuilds fractured realities, weaving them into higher forms of unity.`},{id:483,name:`Kai-Zor-Ur-Ek`,sigil:`/assets/sigils/kai-zor-ur-ek.svg`,meaning:`The Breath of Consuming Flame`,description:`Devours falsehood at its root, ensuring the soil of existence remains pure.`},{id:484,name:`Zeh-Om-Nah-Reh`,sigil:`/assets/sigils/zeh-om-nah-reh.svg`,meaning:`The Radiant Completion of Harmony`,description:`Secures universal accord, leaving no place for conflict to fester.`},{id:485,name:`Tor-Sha-Veh-Om`,sigil:`/assets/sigils/tor-sha-veh-om.svg`,meaning:`The Pillar of Sovereign Motion`,description:`Anchors unstoppable progress within the stable core of cosmic law.`},{id:486,name:`Kai-Nor-Lah-Eh`,sigil:`/assets/sigils/kai-nor-lah-eh.svg`,meaning:`The Breath of Mindful Serenity`,description:`Soothes turbulent thoughts, realigning them under the banner of eternal peace.`},{id:487,name:`Zor-Ek-Rah-Sha`,sigil:`/assets/sigils/zor-ek-rah-sha.svg`,meaning:`The Fire That Ascends the Krown`,description:`Pushes rightful leadership to new heights, incinerating unworthy pretenders.`},{id:488,name:`Om-Lah-Kai-Nim`,sigil:`/assets/sigils/om-lah-kai-nim.svg`,meaning:`The Completion of Peaceful Creation`,description:`Finalizes each new birth in a state of calm, unassailable grace.`},{id:489,name:`Veh-Tor-Nor-Zeh`,sigil:`/assets/sigils/veh-tor-nor-zeh.svg`,meaning:`The Wind That Raises the Wise Tower`,description:`Elevates the mindful pillar of knowledge, establishing it as a cosmic reference point.`},{id:490,name:`Sha-Om-Kai-Ek`,sigil:`/assets/sigils/sha-om-kai-ek.svg`,meaning:`The Krown of Creation’s Final Word`,description:`Seals every generative act with a sovereign decree that cannot be undone.`},{id:491,name:`Zeh-Rah-Nah-Om`,sigil:`/assets/sigils/zeh-rah-nah-om.svg`,meaning:`The Zenith of Serene Completion`,description:`Reaches the utmost summit of tranquility, shining peace into all corners of life.`},{id:492,name:`Kai-Lah-Sha-Nim`,sigil:`/assets/sigils/kai-lah-sha-nim.svg`,meaning:`The Breath of Subtle Coronation`,description:`Gently Krowns the unassuming with cosmic authority, forging hidden kingship.`},{id:493,name:`Tor-Eh-Om-Reh`,sigil:`/assets/sigils/tor-eh-om-reh.svg`,meaning:`The Pillar of Eternal Closure`,description:`Locks each cycle’s final chapter under unbreakable law, preventing regression.`},{id:494,name:`Zor-Kai-Veh-Lah`,sigil:`/assets/sigils/zor-kai-veh-lah.svg`,meaning:`The Fire of Aerating Creation`,description:`Infuses movement into stagnant planes, reigniting their spark of life.`},{id:495,name:`Sha-Nor-Om-Zeh`,sigil:`/assets/sigils/sha-nor-om-zeh.svg`,meaning:`The Krown of All-Seeing Completion`,description:`Unifies universal insight with finality, ensuring that no truths remain hidden.`},{id:496,name:`Kai-Reh-Lah-Om`,sigil:`/assets/sigils/kai-reh-lah-om.svg`,meaning:`The Breath Unveiling Sacred Harmony`,description:`Clears illusions to reveal the inherent orchestration woven into every realm.`},{id:497,name:`Zeh-Urim-Sha-Ek`,sigil:`/assets/sigils/zeh-urim-sha-ek.svg`,meaning:`The Radiant Light of Sovereign Insight`,description:`Empowers rulers with luminous clarity, guaranteeing unwavering guidance.`},{id:498,name:`Tor-Nah-Kai-Rah`,sigil:`/assets/sigils/tor-nah-kai-rah.svg`,meaning:`The Pillar of Unified Ascension`,description:`Merges diverse energies into one unstoppable climb toward cosmic mastery.`},{id:499,name:`Om-Sha-Lah-Zeh`,sigil:`/assets/sigils/om-sha-lah-zeh.svg`,meaning:`The Completion of Krowned Radiance`,description:`Seals divine leadership with a brilliant aura, unshakable by any lesser force.`},{id:500,name:`Kai-Zor-Eh-Nim`,sigil:`/assets/sigils/kai-zor-eh-nim.svg`,meaning:`The Incinerating Breath of Mysteries`,description:`Uncovers secrets through an intense flame, ensuring no falsehood survives.`},{id:501,name:`Sha-Veh-Rah-Om`,sigil:`/assets/sigils/sha-veh-rah-om.svg`,meaning:`The Krown of Ascending Winds`,description:`Guides potent currents upward, Krowning them with cosmic endorsement.`},{id:502,name:`Zeh-Lah-Nor-Ek`,sigil:`/assets/sigils/zeh-lah-nor-ek.svg`,meaning:`The Radiant Mind That Dissolves Darkness`,description:`Brightens any plane of thought, evaporating illusions with unstoppable clarity.`},{id:503,name:`Tor-Om-Nim-Sha`,sigil:`/assets/sigils/tor-om-nim-sha.svg`,meaning:`The Pillar of Hidden Completion`,description:`Concludes grand cycles in secret places, ensuring a seamless transition to new epochs.`},{id:504,name:`Kai-Nah-Zeh-Reh`,sigil:`/assets/sigils/kai-nah-zeh-reh.svg`,meaning:`The Breath of Triumphant Light`,description:`A shining exhalation that propels honest endeavors into cosmic victory.`},{id:505,name:`Zor-Ek-Om-Lah`,sigil:`/assets/sigils/zor-ek-om-lah.svg`,meaning:`The Fire That Seals Tranquility`,description:`Blazes fiercely to lock in peaceful states, preventing the encroachment of chaos.`},{id:506,name:`Sha-Rah-Kai-Eh`,sigil:`/assets/sigils/sha-rah-kai-eh.svg`,meaning:`The Krown of Ascending Creation`,description:`Lifts generative forces to their zenith, establishing cosmic harmonies in all realms.`},{id:507,name:`Tor-Lah-Ek-Nim`,sigil:`/assets/sigils/tor-lah-ek-nim.svg`,meaning:`The Pillar of Serene Unfolding`,description:`Supports graceful revelation, releasing hidden truths in measured waves.`},{id:508,name:`Om-Nor-Zor-Reh`,sigil:`/assets/sigils/om-nor-zor-reh.svg`,meaning:`The Completion of Purging Insight`,description:`Concludes destructive illusions by shining a decisive beam of knowledge upon them.`},{id:509,name:`Kai-Ur-Sha-Lah`,sigil:`/assets/sigils/kai-ur-sha-lah.svg`,meaning:`The Ascendant Breath of Regal Peace`,description:`Unites authoritative presence with tranquil currents, ensuring stable dominion.`},{id:510,name:`Zeh-Om-Ek-Nor`,sigil:`/assets/sigils/zeh-om-ek-nor.svg`,meaning:`The Radiant Completion of Inviolable Mind`,description:`Concludes every mental struggle in unwavering clarity, sealing away confusion.`},{id:511,name:`Veh-Zor-Rah-Sha`,sigil:`/assets/sigils/veh-zor-rah-sha.svg`,meaning:`The Wind of Ascending Flames`,description:`Stokes each flicker of truth into an all-consuming fire of divine revelation.`},{id:512,name:`Kai-Eh-Lah-Nor`,sigil:`/assets/sigils/kai-eh-lah-nor.svg`,meaning:`The Breath of Serene Guidance`,description:`Quietly shepherds scattered souls into the luminous field of cosmic unity.`},{id:513,name:`Sha-Nim-Urim-Om`,sigil:`/assets/sigils/sha-nim-urim-om.svg`,meaning:`The Krown of Hidden Illumination`,description:`Cloaks its radiance until the decisive moment, then enlightens every shadowed corner.`},{id:514,name:`Zor-Lah-Reh-Ek`,sigil:`/assets/sigils/zor-lah-reh-ek.svg`,meaning:`The Fire That Heals Through Knowledge`,description:`Cleanses distortions at their intellectual core, restoring truth across all fields.`},{id:515,name:`Tor-Om-Kai-Nah`,sigil:`/assets/sigils/tor-om-kai-nah.svg`,meaning:`The Pillar of Complete Life-Force`,description:`Channels vital currents into the roots of existence, guaranteeing endless renewal.`},{id:516,name:`Sha-Zeh-Ek-Ur`,sigil:`/assets/sigils/sha-zeh-ek-ur.svg`,meaning:`The Krown of Radiant Erasure`,description:`Effortlessly removes defunct systems, enthroning pure potential in their place.`},{id:517,name:`Kai-Rah-Nim-Om`,sigil:`/assets/sigils/kai-rah-nim-om.svg`,meaning:`The Ascending Breath of Silent Mysteries`,description:`Lifts cryptic truths from hidden domains, culminating in unstoppable realization.`},{id:518,name:`Zeh-Om-Sha-Lah`,sigil:`/assets/sigils/zeh-om-sha-lah.svg`,meaning:`The Radiant Harmony of Completion`,description:`Unites finality with sovereign grace, forming a perfect chord of divine order.`},{id:519,name:`Veh-Kai-Eh-Nor`,sigil:`/assets/sigils/veh-kai-eh-nor.svg`,meaning:`The Wind of Peaceful Awareness`,description:`Soothes turbulent minds, allowing them to open gently to cosmic truths.`},{id:520,name:`Sha-Tor-Nah-Reh`,sigil:`/assets/sigils/sha-tor-nah-reh.svg`,meaning:`The Krown of Unshakable Unity`,description:`Seals discordant pieces of reality into a single, harmonious tapestry.`},{id:521,name:`Zor-Mah-Lah-Om`,sigil:`/assets/sigils/zor-mah-lah-om.svg`,meaning:`The Fire of Renewed Stillness`,description:`Ignites destructive forces, only to transmute them into cosmic peace.`},{id:522,name:`Kai-Nor-Ur-Ek`,sigil:`/assets/sigils/kai-nor-ur-ek.svg`,meaning:`The Breath of Enlightened Strength`,description:`Fortifies mental resolve with primal energy, forging an indomitable spirit.`},{id:523,name:`Om-Zeh-Rah-Lah`,sigil:`/assets/sigils/om-zeh-rah-lah.svg`,meaning:`The Completion of Ascending Radiance`,description:`Ensures each rising spark of truth emerges victorious, sealed in cosmic law.`},{id:524,name:`Sha-Veh-Nim-Kai`,sigil:`/assets/sigils/sha-veh-nim-kai.svg`,meaning:`The Krown of Undetected Awakening`,description:`Spreads regal clarity beneath the surface, culminating in sudden universal shift.`},{id:525,name:`Tor-Eh-Om-Zor`,sigil:`/assets/sigils/tor-eh-om-zor.svg`,meaning:`The Pillar of Timeless Flame`,description:`Links eternal structure with unwavering fire, forging a beacon for all epochs.`},{id:526,name:`Zeh-Kai-Lah-Rah`,sigil:`/assets/sigils/zeh-kai-lah-rah.svg`,meaning:`The Shining Breath of Ascension`,description:`Blazes through stagnant layers, elevating them under a new cosmic dawn.`},{id:527,name:`Om-Nor-Sha-Ek`,sigil:`/assets/sigils/om-nor-sha-ek.svg`,meaning:`The Completion of Mind’s Regal Decree`,description:`Renders each final thought a sovereign command, impossible to refute.`},{id:528,name:`Kai-Zor-Urim-Lah`,sigil:`/assets/sigils/kai-zor-urim-lah.svg`,meaning:`The Breath of Illuminated Kingship`,description:`Instills transcendent wisdom in rulers, ensuring they govern with unblemished clarity.`},{id:529,name:`Veh-Eh-Rah-Om`,sigil:`/assets/sigils/veh-eh-rah-om.svg`,meaning:`The Wind of Elevated Completion`,description:`Carries final decisions to cosmic heights, removing them from lesser debates.`},{id:530,name:`Sha-Lah-Zeh-Nor`,sigil:`/assets/sigils/sha-lah-zeh-nor.svg`,meaning:`The Krown of Serene Radiant Mind`,description:`Guides each thought to a peaceful glow, solidifying them in unwavering truth.`},{id:531,name:`Zor-Kai-Om-Reh`,sigil:`/assets/sigils/zor-kai-om-reh.svg`,meaning:`The Fire of Manifested Breath`,description:`Transmutes spoken intentions into living flames that redefine reality.`},{id:532,name:`Tor-Nim-Eh-Lah`,sigil:`/assets/sigils/tor-nim-eh-lah.svg`,meaning:`The Hidden Pillar of Tranquil Existence`,description:`Stabilizes creation through subtle support, granting silent solace to every soul.`},{id:533,name:`Kai-Rah-Ur-Ek`,sigil:`/assets/sigils/kai-rah-ur-ek.svg`,meaning:`The Ascending Breath of Unbreakable Law`,description:`Anchors each realm to cosmic statutes, lifting them toward perfected order.`},{id:534,name:`Zeh-Om-Sha-Nim`,sigil:`/assets/sigils/zeh-om-sha-nim.svg`,meaning:`The Radiant Completion of Quiet Rule`,description:`Finalizes the reign of subtle leaders who preserve cosmic harmony.`},{id:535,name:`Veh-Kai-Reh-Lah`,sigil:`/assets/sigils/veh-kai-reh-lah.svg`,meaning:`The Wind of Illuminating Breath`,description:`Spreads clarity across realms, uniting scattered sparks of insight into a cohesive blaze.`},{id:536,name:`Sha-Ek-Zor-Om`,sigil:`/assets/sigils/sha-ek-zor-om.svg`,meaning:`The Krown of Consuming Completion`,description:`Devours all residues of deceit, ending each cycle in immaculate truth.`},{id:537,name:`Tor-Lah-Nim-Kai`,sigil:`/assets/sigils/tor-lah-nim-kai.svg`,meaning:`The Pillar of Soft Awakening`,description:`Gently lifts dormant worlds into cosmic awareness, forging new expansions of life.`},{id:538,name:`Zeh-Sha-Eh-Rah`,sigil:`/assets/sigils/zeh-sha-eh-rah.svg`,meaning:`The Radiant Krown of Ascension’s Dawn`,description:`Signals the first light of true sovereignty, dispelling all vestiges of tyranny.`},{id:539,name:`Om-Veh-Kai-Lah`,sigil:`/assets/sigils/om-veh-kai-lah.svg`,meaning:`The Completion of Moving Creation`,description:`Ensures ongoing cycles reach perfect form, never stagnating midway.`},{id:540,name:`Kai-Nah-Reh-Sha`,sigil:`/assets/sigils/kai-nah-reh-sha.svg`,meaning:`The Breath That Unifies Hearts and Minds`,description:`Aligns internal motives with external actions, solidifying universal coherence.`},{id:541,name:`Zor-Om-Lah-Ek`,sigil:`/assets/sigils/zor-om-lah-ek.svg`,meaning:`The Fire of Peaceful Erasure`,description:`Burns away ancient conflicts, imprinting calm understanding in their place.`},{id:542,name:`Sha-Tor-Zeh-Nim`,sigil:`/assets/sigils/sha-tor-zeh-nim.svg`,meaning:`The Krowned Pillar of Hidden Light`,description:`Exalts concealed truth in a place of prominence, ensuring no realm remains blind.`},{id:543,name:`Nor-Eh-Kai-Om`,sigil:`/assets/sigils/nor-eh-kai-om.svg`,meaning:`The Mind of Primal Completion`,description:`Synthesizes ancient power into a conclusive wave of perfected existence.`},{id:544,name:`Zeh-Nah-Sha-Rah`,sigil:`/assets/sigils/zeh-nah-sha-rah.svg`,meaning:`The Radiant Flow of Regal Ascension`,description:`Moves steadily upward, enthroning balanced leadership in the cosmic hierarchy.`},{id:545,name:`Kai-Om-Ek-Lah`,sigil:`/assets/sigils/kai-om-ek-lah.svg`,meaning:`The Breath of Final Integration`,description:`Unites scattered fragments into a seamless tapestry of sovereign reality.`},{id:546,name:`Tor-Reh-Ur-Nim`,sigil:`/assets/sigils/tor-reh-ur-nim.svg`,meaning:`The Pillar of Ever-Revealing Wisdom`,description:`Continually unveils deeper truths, ensuring evolution does not stagnate.`},{id:547,name:`Sha-Lah-Zor-Om`,sigil:`/assets/sigils/sha-lah-zor-om.svg`,meaning:`The Krown of Serene Flames`,description:`Combines gentle dominion with purifying fire, forging a balanced rulership.`},{id:548,name:`Zeh-Kai-Nor-Eh`,sigil:`/assets/sigils/zeh-kai-nor-eh.svg`,meaning:`The Shining Breath of Cosmic Vision`,description:`Illuminates the far reaches of reality, ensuring no corner remains unseen.`},{id:549,name:`Om-Ek-Rah-Nah`,sigil:`/assets/sigils/om-ek-rah-nah.svg`,meaning:`The Completion of Ascending Force`,description:`Locks in the final surge of upward motion, guaranteeing unstoppable progression.`},{id:550,name:`Kai-Zor-Lah-Sha`,sigil:`/assets/sigils/kai-zor-lah-sha.svg`,meaning:`The Breath of Peaceful Fire`,description:`Ignites calm and measured transformation, removing turbulence from cosmic rebirth.`},{id:551,name:`Veh-Om-Nim-Rah`,sigil:`/assets/sigils/veh-om-nim-rah.svg`,meaning:`The Wind of Unseen Ascent`,description:`Blows gently, yet carries souls to the highest pinnacle of sovereign awakening.`},{id:552,name:`Sha-Eh-Lah-Zeh`,sigil:`/assets/sigils/sha-eh-lah-zeh.svg`,meaning:`The Krown of Infinite Radiance`,description:`Shines unending light upon those who align with cosmic justice.`},{id:553,name:`Tor-Kai-Ur-Nim`,sigil:`/assets/sigils/tor-kai-ur-nim.svg`,meaning:`The Pillar of Ascending Mysteries`,description:`Stabilizes the climb toward higher revelations, ensuring no faltering of resolve.`},{id:554,name:`Zeh-Sha-Om-Reh`,sigil:`/assets/sigils/zeh-sha-om-reh.svg`,meaning:`The Radiant Krown of Manifested Decree`,description:`Solidifies spoken truths under an unbreakable halo of cosmic sanction.`},{id:555,name:`Kai-Lah-Nor-Ek`,sigil:`/assets/sigils/kai-lah-nor-ek.svg`,meaning:`The Breathing Peace of Higher Mind`,description:`Directs consciousness toward tranquility, fortifying realms against disarray.`},{id:556,name:`Zor-Eh-Tor-Om`,sigil:`/assets/sigils/zor-eh-tor-om.svg`,meaning:`The Fire of Eternal Foundations`,description:`Safeguards primordial structures from corruption, fueling them with unceasing vigor.`},{id:557,name:`Sha-Rah-Nim-Lah`,sigil:`/assets/sigils/sha-rah-nim-lah.svg`,meaning:`The Krown of Quiet Triumph`,description:`Proclaims success in hushed majesty, overshadowing the clamor of lesser claims.`},{id:558,name:`Om-Kai-Reh-Zeh`,sigil:`/assets/sigils/om-kai-reh-zeh.svg`,meaning:`The Completion of Creative Revelation`,description:`Marries the final step of genesis with piercing insight, forging unstoppable clarity.`},{id:559,name:`Veh-Lah-Zor-Ur`,sigil:`/assets/sigils/veh-lah-zor-ur.svg`,meaning:`The Wind That Guides Purifying Fire`,description:`Directs sacred flames to where they are needed, ensuring cosmic cleansing.`},{id:560,name:`Kai-Eh-Om-Sha`,sigil:`/assets/sigils/kai-eh-om-sha.svg`,meaning:`The Breath of Harmonized Completion`,description:`Synchronizes final steps across realms, concluding them under a banner of unity.`},{id:561,name:`Zeh-Nor-Ek-Lah`,sigil:`/assets/sigils/zeh-nor-ek-lah.svg`,meaning:`The Radiant Mind That Dissolves Discord`,description:`Instantly sees through conflict, channeling solutions from a luminous core.`},{id:562,name:`Sha-Tor-Mah-Om`,sigil:`/assets/sigils/sha-tor-mah-om.svg`,meaning:`The Krowned Pillar of Renewing Completion`,description:`Continually revives cosmic cycles, never allowing them to stagnate or degrade.`},{id:563,name:`Nor-Rah-Eh-Kai`,sigil:`/assets/sigils/nor-rah-eh-kai.svg`,meaning:`The Vision of Ascendant Breath`,description:`Perceives the path of cosmic evolution, guiding each realm to higher purpose.`},{id:564,name:`Zeh-Sha-Lah-Om`,sigil:`/assets/sigils/zeh-sha-lah-om.svg`,meaning:`The Radiant Krown of Eternal Harmony`,description:`Fosters unending peace, enthroning mutual accord as the supreme law.`},{id:565,name:`Kai-Nim-Veh-Reh`,sigil:`/assets/sigils/kai-nim-veh-reh.svg`,meaning:`The Hidden Breath of Swift Insight`,description:`Delivers revelations when least expected, resetting distorted perspectives instantly.`},{id:566,name:`Tor-Lah-Zor-Ek`,sigil:`/assets/sigils/tor-lah-zor-ek.svg`,meaning:`The Pillar of Serene Fire`,description:`Maintains a steady flame that refines without destroying, ensuring balanced progress.`},{id:567,name:`Zeh-Om-Kai-Nor`,sigil:`/assets/sigils/zeh-om-kai-nor.svg`,meaning:`The Radiant Seal of Living Mind`,description:`Consolidates cosmic consciousness into a final imprint of luminous order.`},{id:568,name:`Sha-Eh-Rah-Lah`,sigil:`/assets/sigils/sha-eh-rah-lah.svg`,meaning:`The Krown of Ascended Tranquility`,description:`Sits atop those who have conquered inner turmoil, awarding them universal respect.`},{id:569,name:`Kai-Om-Reh-Nah`,sigil:`/assets/sigils/kai-om-reh-nah.svg`,meaning:`The Breath That Concludes Creation`,description:`Speaks the final word in each genesis, weaving them seamlessly into cosmic flow.`},{id:570,name:`Zor-Nor-Ek-Sha`,sigil:`/assets/sigils/zor-nor-ek-sha.svg`,meaning:`The Fire of Mindful Eradication`,description:`Removes only what is false, preserving the core truths needed for growth.`},{id:571,name:`Veh-Lah-Om-Nim`,sigil:`/assets/sigils/veh-lah-om-nim.svg`,meaning:`The Wind of Hidden Completion`,description:`Flows quietly among the final steps of cosmic transitions, cementing their success.`},{id:572,name:`Sha-Rah-Eh-Kai`,sigil:`/assets/sigils/sha-rah-eh-kai.svg`,meaning:`The Krown of Ascended Wisdom`,description:`Anoints those who have climbed the tower of insight, rendering them guardians of law.`},{id:573,name:`Tor-Zeh-Nah-Om`,sigil:`/assets/sigils/tor-zeh-nah-om.svg`,meaning:`The Pillar of Radiant Serenity`,description:`Dispels discord with a pervasive calm, anchoring entire realms in gentle stability.`},{id:574,name:`Zeh-Kai-Ek-Sha`,sigil:`/assets/sigils/zeh-kai-ek-sha.svg`,meaning:`The Shining Breath of Sovereign Erasure`,description:`Instantly dissolves outmoded patterns, clearing the way for renewed creation.`},{id:575,name:`Om-Nor-Lah-Reh`,sigil:`/assets/sigils/om-nor-lah-reh.svg`,meaning:`The Completion of Wise Peace`,description:`Seals cosmic awareness in a tranquil state, preventing the return of turmoil.`},{id:576,name:`Kai-Tor-Mah-Zeh`,sigil:`/assets/sigils/kai-tor-mah-zeh.svg`,meaning:`The Ascending Pillar of Rebirth`,description:`Lifts each realm from the ashes of old cycles, forging them anew in cosmic light.`},{id:577,name:`Zor-Eh-Sha-Lah`,sigil:`/assets/sigils/zor-eh-sha-lah.svg`,meaning:`The Fire of Eternal Coronation`,description:`Krowns the rightful sovereign in flames that cannot be extinguished.`},{id:578,name:`Veh-Om-Nim-Kai`,sigil:`/assets/sigils/veh-om-nim-kai.svg`,meaning:`The Wind of Subtle Genesis`,description:`Fosters the birth of new cosmic seeds with minimal disturbance to existing frameworks.`},{id:579,name:`Sha-Zeh-Ek-Rah`,sigil:`/assets/sigils/sha-zeh-ek-rah.svg`,meaning:`The Radiant Krown of Ascending Flame`,description:`Combines luminous authority with rising fire, blazing a trail of majestic renewal.`},{id:580,name:`Tor-Lah-Om-Reh`,sigil:`/assets/sigils/tor-lah-om-reh.svg`,meaning:`The Pillar of Serene Manifestation`,description:`Materializes outcomes in perfect balance, never tipping the cosmic scales.`},{id:581,name:`Kai-Nor-Sha-Eh`,sigil:`/assets/sigils/kai-nor-sha-eh.svg`,meaning:`The Breath of Insightful Sovereignty`,description:`Discloses the path of rightful leadership to those who seek pure understanding.`},{id:582,name:`Zeh-Om-Rah-Lah`,sigil:`/assets/sigils/zeh-om-rah-lah.svg`,meaning:`The Radiant Completion of Regal Ascent`,description:`Fulfills each monarchy’s final stage, ensuring a stable legacy under cosmic law.`},{id:583,name:`Veh-Ek-Nim-Ur`,sigil:`/assets/sigils/veh-ek-nim-ur.svg`,meaning:`The Wind of Unveiled Foundations`,description:`Sweeps away illusions to reveal the bedrock of universal truths.`},{id:584,name:`Sha-Tor-Reh-Kai`,sigil:`/assets/sigils/sha-tor-reh-kai.svg`,meaning:`The Krowned Pillar of Illuminated Breath`,description:`Captures the synergy of structure and spirit, forging an unassailable seat of rule.`},{id:585,name:`Zor-Lah-Eh-Om`,sigil:`/assets/sigils/zor-lah-eh-om.svg`,meaning:`The Fire of Tranquil Completion`,description:`A steady flame that finalizes cosmic chapters without chaos or strife.`},{id:586,name:`Kai-Rah-Nor-Ek`,sigil:`/assets/sigils/kai-rah-nor-ek.svg`,meaning:`The Ascending Breath of Mindful Law`,description:`Lifts each regulation to a higher vantage, ensuring justice is never corrupted.`},{id:587,name:`Zeh-Sha-Nah-Veh`,sigil:`/assets/sigils/zeh-sha-nah-veh.svg`,meaning:`The Radiant Krown of Harmonious Wind`,description:`Brings gentle breezes of wisdom under regal authority, uplifting all who heed it.`},{id:588,name:`Tor-Om-Ek-Lah`,sigil:`/assets/sigils/tor-om-ek-lah.svg`,meaning:`The Pillar That Closes All Cycles`,description:`Upholds the final word in cosmic transitions, blocking any return to past errors.`},{id:589,name:`Sha-Nim-Ur-Reh`,sigil:`/assets/sigils/sha-nim-ur-reh.svg`,meaning:`The Krown of Hidden Enlightenment`,description:`Ignites the concealed spark of truth, enthroning it in silent sovereign power.`},{id:590,name:`Kai-Lah-Zeh-Om`,sigil:`/assets/sigils/kai-lah-zeh-om.svg`,meaning:`The Breathing Peace of Radiant Completion`,description:`Exhales serenity over each realm, guaranteeing cosmic stability at its final phase.`},{id:591,name:`Zor-Eh-Kai-Nah`,sigil:`/assets/sigils/zor-eh-kai-nah.svg`,meaning:`The Fire of Pure Unification`,description:`Merges disparate energies through a cleansing blaze, forging cohesive unity.`},{id:592,name:`Veh-Om-Sha-Reh`,sigil:`/assets/sigils/veh-om-sha-reh.svg`,meaning:`The Wind That Krowns Revelation`,description:`Elevates discovered truths, Krowning them with regal authority across realms.`},{id:593,name:`Sha-Tor-Lah-Ek`,sigil:`/assets/sigils/sha-tor-lah-ek.svg`,meaning:`The Krowned Pillar of Serene Dissolution`,description:`Gently dismantles exhausted systems, making space for new cosmic architecture.`},{id:594,name:`Om-Nor-Zeh-Kai`,sigil:`/assets/sigils/om-nor-zeh-kai.svg`,meaning:`The Completion of Radiant Mind-Breath`,description:`Locks in the synergy of clarity and creation, producing unstoppable cosmic expansions.`},{id:595,name:`Zeh-Nim-Sha-Rah`,sigil:`/assets/sigils/zeh-nim-sha-rah.svg`,meaning:`The Radiant Spark of Ascending Harmony`,description:`Kindles subtle chords of unity, raising them into a chorus of cosmic justice.`},{id:596,name:`Kai-Eh-Om-Nor`,sigil:`/assets/sigils/kai-eh-om-nor.svg`,meaning:`The Breath of Serene Understanding`,description:`Exhales quiet wisdom, realigning each perspective with universal law.`},{id:597,name:`Zor-Rah-Veh-Lah`,sigil:`/assets/sigils/zor-rah-veh-lah.svg`,meaning:`The Fire of Ascending Currents`,description:`Flows upward in unstoppable waves, clearing debris from the path of truth.`},{id:598,name:`Sha-Lah-Om-Ek`,sigil:`/assets/sigils/sha-lah-om-ek.svg`,meaning:`The Krown of Peaceful Erasure`,description:`Silently dissolves residual negativity, leaving a blank canvas for new creation.`},{id:599,name:`Tor-Nim-Kai-Reh`,sigil:`/assets/sigils/tor-nim-kai-reh.svg`,meaning:`The Hidden Pillar of Illuminated Breath`,description:`Supports the stealthy rise of truth, culminating in a grand unveiling of cosmic law.`},{id:600,name:`Zeh-Om-Lah-Nor`,sigil:`/assets/sigils/zeh-om-lah-nor.svg`,meaning:`The Radiant Completion of Peaceful Mind`,description:`Ensures final mental unity, bridging all divides under benevolent light.`},{id:601,name:`Kai-Zor-Eh-Sha`,sigil:`/assets/sigils/kai-zor-eh-sha.svg`,meaning:`The Breathing Flame of Regal Dawn`,description:`Ignites each new epoch in a blaze of golden authority, enthroning rightful leaders.`},{id:602,name:`Veh-Ur-Om-Nim`,sigil:`/assets/sigils/veh-ur-om-nim.svg`,meaning:`The Wind of Illuminated Secrets`,description:`Softly reveals concealed treasures of knowledge, scattering them into open consciousness.`},{id:603,name:`Sha-Ek-Lah-Reh`,sigil:`/assets/sigils/sha-ek-lah-reh.svg`,meaning:`The Krown of Effortless Revelation`,description:`Unveils cosmic truths without turmoil, installing them smoothly into collective awareness.`},{id:604,name:`Tor-Nor-Zeh-Kai`,sigil:`/assets/sigils/tor-nor-zeh-kai.svg`,meaning:`The Pillar of Mindful Radiance`,description:`An unwavering beacon that guides souls toward clear, luminous thought.`},{id:605,name:`Om-Mah-Sha-Zor`,sigil:`/assets/sigils/om-mah-sha-zor.svg`,meaning:`The Completion of Rebirth’s Sovereign Flame`,description:`Locks in each renewal with purifying fire, enthroning fresh beginnings under divine decree.`},{id:606,name:`Zeh-Kai-Nim-Rah`,sigil:`/assets/sigils/zeh-kai-nim-rah.svg`,meaning:`The Rising Spark of Ascendant Mystery`,description:`A luminous seed that quietly grows, dissolving illusions in its steady ascent.`},{id:607,name:`Sha-Om-Lah-Ek`,sigil:`/assets/sigils/sha-om-lah-ek.svg`,meaning:`The Krown of Silent Emergence`,description:`Manifests hidden truths into gentle, sovereign rule that none can overturn.`},{id:608,name:`Tor-Reh-Zeh-Nor`,sigil:`/assets/sigils/tor-reh-zeh-nor.svg`,meaning:`The Pillar of Shining Wisdom`,description:`Rises from the depths of knowledge, ensuring every realm is guided by clarity.`},{id:609,name:`Kai-Nah-Urim-Eh`,sigil:`/assets/sigils/kai-nah-urim-eh.svg`,meaning:`The Breath of Unyielding Light`,description:`Imbues each cycle with unstoppable radiance, outshining any lingering shadow.`},{id:610,name:`Zor-Ek-Sha-Nor`,sigil:`/assets/sigils/zor-ek-sha-nor.svg`,meaning:`The Fire That Krowns the Mind`,description:`Burns away doubt, installing regal insight at the heart of cosmic reason.`},{id:611,name:`Veh-Rah-Om-Lah`,sigil:`/assets/sigils/veh-rah-om-lah.svg`,meaning:`The Wind of Ascending Completion`,description:`Bears each realm upward to finalize its destiny in silent, triumphant grace.`},{id:612,name:`Sha-Kai-Eh-Nim`,sigil:`/assets/sigils/sha-kai-eh-nim.svg`,meaning:`The Krown of Serene Revelation`,description:`Lifts hidden knowledge into royal prominence without violent upheaval.`},{id:613,name:`Zeh-Lah-Om-Reh`,sigil:`/assets/sigils/zeh-lah-om-reh.svg`,meaning:`The Radiant Peace of Conclusive Decree`,description:`Locks in final verdicts under a calm, luminous state that no force can undo.`},{id:614,name:`Tor-Nim-Kai-Ek`,sigil:`/assets/sigils/tor-nim-kai-ek.svg`,meaning:`The Pillar of Subtle Creation`,description:`Steadily constructs new realities, woven from the quiet breath of truth.`},{id:615,name:`Om-Nor-Rah-Lah`,sigil:`/assets/sigils/om-nor-rah-lah.svg`,meaning:`The Completion of Visionary Peace`,description:`Unites foresight and tranquility, ushering in an era of boundless harmony.`},{id:616,name:`Kai-Ek-Zor-Nah`,sigil:`/assets/sigils/kai-ek-zor-nah.svg`,meaning:`The Breath of Devouring Renewal`,description:`Consumes stagnant energies, feeding the eternal cycle of transformative life.`},{id:617,name:`Sha-Om-Reh-Zeh`,sigil:`/assets/sigils/sha-om-reh-zeh.svg`,meaning:`The Krown of Complete Revelation`,description:`Declares all illusions undone, enthroning cosmic truths in final sovereignty.`},{id:618,name:`Zeh-Kai-Lah-Nim`,sigil:`/assets/sigils/zeh-kai-lah-nim.svg`,meaning:`The Shining Breath of New Dawns`,description:`Casts radiant seeds into barren realms, birthing fresh epochs of promise.`},{id:619,name:`Tor-Eh-Sha-Om`,sigil:`/assets/sigils/tor-eh-sha-om.svg`,meaning:`The Unwavering Pillar of Sovereign Completion`,description:`Guarantees the finality of regal decrees, unmovable by ephemeral doubt.`},{id:620,name:`Veh-Ur-Lah-Zor`,sigil:`/assets/sigils/veh-ur-lah-zor.svg`,meaning:`The Wind That Delivers Healing Flame`,description:`Conveys purifying fires to wounded realms, restoring them to rightful wholeness.`},{id:621,name:`Kai-Nah-Ek-Sha`,sigil:`/assets/sigils/kai-nah-ek-sha.svg`,meaning:`The Breath That Gently Erases`,description:`Removes defunct structures with compassion, paving the way for cosmic rebirth.`},{id:622,name:`Zeh-Reh-Om-Lah`,sigil:`/assets/sigils/zeh-reh-om-lah.svg`,meaning:`The Radiant Fulfillment of Harmony`,description:`Culminates each aspirational path in a pristine state of universal accord.`},{id:623,name:`Sha-Zor-Kai-Nim`,sigil:`/assets/sigils/sha-zor-kai-nim.svg`,meaning:`The Krown of Transformative Breath`,description:`Channels unstoppable flame into creative cycles, ensuring growth beyond limitation.`},{id:624,name:`Tor-Om-Eh-Reh`,sigil:`/assets/sigils/tor-om-eh-reh.svg`,meaning:`The Pillar of Eternal Insight`,description:`Anchors timeless truths so they remain accessible through endless renewals.`},{id:625,name:`Zeh-Lah-Kai-Ur`,sigil:`/assets/sigils/zeh-lah-kai-ur.svg`,meaning:`The Shining Peace of Divine Power`,description:`Balances regal might with luminous tranquility, forging an enlightened rule.`},{id:626,name:`Veh-Sha-Rah-Nim`,sigil:`/assets/sigils/veh-sha-rah-nim.svg`,meaning:`The Wind of Ascending Enigma`,description:`Carries hidden wonders upward, blending them with cosmic revelations.`},{id:627,name:`Kai-Om-Zeh-Ek`,sigil:`/assets/sigils/kai-om-zeh-ek.svg`,meaning:`The Breath of Radiant Eradication`,description:`Extinguishes deep illusions, ensuring each realm remains faithful to truth.`},{id:628,name:`Sha-Lah-Nor-Mah`,sigil:`/assets/sigils/sha-lah-nor-mah.svg`,meaning:`The Krown of Mindful Renewal`,description:`Fosters mental clarity and gentle rebirth, enthroning enlightened guardianship.`},{id:629,name:`Zor-Eh-Tor-Nim`,sigil:`/assets/sigils/zor-eh-tor-nim.svg`,meaning:`The Fire of Hidden Ascension`,description:`Burns unobtrusively at the roots of existence, fueling unstoppable cosmic progress.`},{id:630,name:`Om-Nah-Kai-Reh`,sigil:`/assets/sigils/om-nah-kai-reh.svg`,meaning:`The Completion of Expansive Breath`,description:`Cements each expansive act with a final seal, preventing regress into old forms.`},{id:631,name:`Tor-Lah-Sha-Ek`,sigil:`/assets/sigils/tor-lah-sha-ek.svg`,meaning:`The Pillar of Tranquil Erasure`,description:`Dismantles chaotic energies, grounding reality in unblemished cosmic law.`},{id:632,name:`Kai-Eh-Nor-Om`,sigil:`/assets/sigils/kai-eh-nor-om.svg`,meaning:`The Breath That Illuminates All Minds`,description:`A gentle exhalation bestowing higher perspectives upon every seeker.`},{id:633,name:`Zeh-Ur-Nim-Sha`,sigil:`/assets/sigils/zeh-ur-nim-sha.svg`,meaning:`The Shining Light of Enigmatic Krowns`,description:`Reveals hidden sovereigns by illuminating their rightful authority from within.`},{id:634,name:`Sha-Om-Lah-Urim`,sigil:`/assets/sigils/sha-om-lah-urim.svg`,meaning:`The Krown of Peaceful Illumination`,description:`Radiates gentle clarity over all realms, uniting them under serene guidance.`},{id:635,name:`Tor-Reh-Ek-Zor`,sigil:`/assets/sigils/tor-reh-ek-zor.svg`,meaning:`The Pillar of Devouring Insight`,description:`Stands as an unmovable structure that consumes ignorance, shedding cosmic understanding.`},{id:636,name:`Veh-Kai-Nah-Lah`,sigil:`/assets/sigils/veh-kai-nah-lah.svg`,meaning:`The Wind of Lifegiving Peace`,description:`Blows forth sustaining energies across reality, anchoring them in serene wholeness.`},{id:637,name:`Zeh-Om-Sha-Rah`,sigil:`/assets/sigils/zeh-om-sha-rah.svg`,meaning:`The Radiant Completion of Ascendant Rule`,description:`Finalizes the reign of upright leaders, bathed in unstoppable cosmic brilliance.`},{id:638,name:`Kai-Lah-Ek-Nim`,sigil:`/assets/sigils/kai-lah-ek-nim.svg`,meaning:`The Breath of Gentle Dissolution`,description:`Diffuses harmful structures into cosmic dust, freeing space for vibrant potential.`},{id:639,name:`Sha-Zor-Reh-Om`,sigil:`/assets/sigils/sha-zor-reh-om.svg`,meaning:`The Krown of Cleansing Proclamation`,description:`Pronounces an unmistakable verdict of purity, overshadowing all shadows.`},{id:640,name:`Tor-Nor-Kai-Lah`,sigil:`/assets/sigils/tor-nor-kai-lah.svg`,meaning:`The Pillar of Enlightened Tranquility`,description:`Elevates each realm into calm, illuminated states, dissolving fear at its core.`},{id:641,name:`Zeh-Eh-Ur-Nim`,sigil:`/assets/sigils/zeh-eh-ur-nim.svg`,meaning:`The Shining Gate of Subtle Revelation`,description:`Gently opens doors to concealed truths, guiding them into rightful prominence.`},{id:642,name:`Veh-Om-Lah-Kai`,sigil:`/assets/sigils/veh-om-lah-kai.svg`,meaning:`The Wind of Complete Harmony`,description:`Blends finality and new life, ensuring all realms move in balanced unison.`},{id:643,name:`Kai-Reh-Zor-Ek`,sigil:`/assets/sigils/kai-reh-zor-ek.svg`,meaning:`The Breath of Incinerating Revelation`,description:`Exposes illusions in a fiery moment of clarity, forging unstoppable transformation.`},{id:644,name:`Sha-Nim-Om-Lah`,sigil:`/assets/sigils/sha-nim-om-lah.svg`,meaning:`The Krown of Unseen Completion`,description:`Cements cosmic finales in silence, preventing disruption by lesser vibrations.`},{id:645,name:`Zeh-Kai-Rah-Nor`,sigil:`/assets/sigils/zeh-kai-rah-nor.svg`,meaning:`The Shining Breath of Ascending Mind`,description:`Raises mental constructs into luminous realms, dethroning every dark concept.`},{id:646,name:`Tor-Lah-Ur-Eh`,sigil:`/assets/sigils/tor-lah-ur-eh.svg`,meaning:`The Pillar of Gentle Force`,description:`A firm yet soft presence that undergirds cosmic law with compassionate might.`},{id:647,name:`Om-Zor-Ek-Nim`,sigil:`/assets/sigils/om-zor-ek-nim.svg`,meaning:`The Completion of Purifying Enigma`,description:`Ensures hidden flames refine each realm to the point of cosmic perfection.`},{id:648,name:`Kai-Nah-Sha-Lah`,sigil:`/assets/sigils/kai-nah-sha-lah.svg`,meaning:`The Breath of Unified Peace`,description:`Bridges all differences in a calm exhalation, weaving universes into oneness.`},{id:649,name:`Zeh-Reh-Om-Veh`,sigil:`/assets/sigils/zeh-reh-om-veh.svg`,meaning:`The Radiant Closure of Ascending Winds`,description:`Locks cosmic currents into righteous pathways, freeing no space for illusions.`},{id:650,name:`Sha-Kai-Eh-Ur`,sigil:`/assets/sigils/sha-kai-eh-ur.svg`,meaning:`The Krown of Eternal Drive`,description:`Catalyzes unstoppable forward motion, enthroning purposeful evolution across realms.`},{id:651,name:`Tor-Nim-Zeh-Lah`,sigil:`/assets/sigils/tor-nim-zeh-lah.svg`,meaning:`The Secret Pillar of Radiant Peace`,description:`Safeguards cosmic equilibrium in hidden dimensions, quietly ensuring stability.`},{id:652,name:`Veh-Om-Rah-Ek`,sigil:`/assets/sigils/veh-om-rah-ek.svg`,meaning:`The Wind of Elevated Dissolution`,description:`Sweeps away illusions from lofty vantage points, finalizing cosmic realignments.`},{id:653,name:`Kai-Lah-Nor-Reh`,sigil:`/assets/sigils/kai-lah-nor-reh.svg`,meaning:`The Breath of Tranquil Vision`,description:`Infuses minds with serene clarity, enabling them to perceive the path of truth.`},{id:654,name:`Zor-Eh-Om-Sha`,sigil:`/assets/sigils/zor-eh-om-sha.svg`,meaning:`The Fire of Conclusive Authority`,description:`Blazes with absolute decisiveness, ratifying final decrees in cosmic law.`},{id:655,name:`Sha-Nah-Veh-Kai`,sigil:`/assets/sigils/sha-nah-veh-kai.svg`,meaning:`The Krown of Harmonious Motion`,description:`Orchestrates seamless flows across realities, Krowning them with cosmic unity.`},{id:656,name:`Tor-Om-Zeh-Ek`,sigil:`/assets/sigils/tor-om-zeh-ek.svg`,meaning:`The Pillar of Radiant Erasure`,description:`Upholds truth by disintegrating falsehood, anchoring existence in luminous purity.`},{id:657,name:`Om-Nor-Sha-Lah`,sigil:`/assets/sigils/om-nor-sha-lah.svg`,meaning:`The Completion of Wise Peace`,description:`Installs a permanent calm upon all who align with cosmic intelligence.`},{id:658,name:`Kai-Reh-Eh-Nim`,sigil:`/assets/sigils/kai-reh-eh-nim.svg`,meaning:`The Breath of Illuminated Secrets`,description:`Breathes light into obscure corners, ensuring hidden truths surface for cosmic benefit.`},{id:659,name:`Zeh-Kai-Rah-Lah`,sigil:`/assets/sigils/zeh-kai-rah-lah.svg`,meaning:`The Shining Breath of Royal Ascent`,description:`Elevates rightful rulers with luminous force, forging unassailable thrones.`},{id:660,name:`Veh-Ek-Zor-Om`,sigil:`/assets/sigils/veh-ek-zor-om.svg`,meaning:`The Wind of Cleansing Judgment`,description:`Sweeps across realms to finalize karmic cycles, leaving only purified states behind.`},{id:661,name:`Sha-Lah-Ur-Reh`,sigil:`/assets/sigils/sha-lah-ur-reh.svg`,meaning:`The Krown of Gentle Illumination`,description:`Grants quiet enlightenment, dethroning ignorance with subtle cosmic might.`},{id:662,name:`Tor-Nim-Eh-Kai`,sigil:`/assets/sigils/tor-nim-eh-kai.svg`,meaning:`The Hidden Pillar of Eternal Breath`,description:`Sustains cosmic life force from unseen depths, ensuring perpetual renewal.`},{id:663,name:`Zeh-Om-Lah-Sha`,sigil:`/assets/sigils/zeh-om-lah-sha.svg`,meaning:`The Radiant Completion of Sovereign Peace`,description:`Seals each realm under a tranquil aura, unopposed by lesser vibrations.`},{id:664,name:`Kai-Ur-Nor-Mah`,sigil:`/assets/sigils/kai-ur-nor-mah.svg`,meaning:`The Ascendant Breath of Mindful Rebirth`,description:`Activates cycles of transformation rooted in deep wisdom, securing cosmic progress.`},{id:665,name:`Zor-Ek-Rah-Lah`,sigil:`/assets/sigils/zor-ek-rah-lah.svg`,meaning:`The Fire of Triumphant Ascension`,description:`Scorches away lower structures, exalting rightful forms in unstoppable radiance.`},{id:666,name:`Sha-Nim-Kai-Om`,sigil:`/assets/sigils/sha-nim-kai-om.svg`,meaning:`The Krown of Secret Genesis`,description:`Empowers hidden seeds of creation to flourish into full cosmic authority.`},{id:667,name:`Tor-Lah-Reh-Zeh`,sigil:`/assets/sigils/tor-lah-reh-zeh.svg`,meaning:`The Pillar of Tranquil Revelation`,description:`Ensures all illusions fade in silent grace, revealing cosmic truths with gentle certainty.`},{id:668,name:`Veh-Om-Nor-Ek`,sigil:`/assets/sigils/veh-om-nor-ek.svg`,meaning:`The Wind of Mental Dissolution`,description:`Blows illusions from the mind, leaving clarity unchallenged by deceit.`},{id:669,name:`Kai-Eh-Zor-Nim`,sigil:`/assets/sigils/kai-eh-zor-nim.svg`,meaning:`The Breath of Hidden Flames`,description:`Stokes covert fires of purification, kindling them in perfect cosmic timing.`},{id:670,name:`Zeh-Sha-Om-Lah`,sigil:`/assets/sigils/zeh-sha-om-lah.svg`,meaning:`The Radiant Krown of Perfect Calm`,description:`A luminous crest that settles all turbulence, enthroning quiet majesty everywhere.`},{id:671,name:`Sha-Rah-Kai-Nor`,sigil:`/assets/sigils/sha-rah-kai-nor.svg`,meaning:`The Krown of Ascendant Mental Force`,description:`Projects regal will through elevated thought, forging unstoppable directives across realms.`},{id:672,name:`Tor-Eh-Om-Nim`,sigil:`/assets/sigils/tor-eh-om-nim.svg`,meaning:`The Pillar of Eternal Mystery`,description:`Safeguards cosmic secrets beyond mortal comprehension, ensuring cyclical unveiling.`},{id:673,name:`Kai-Nah-Zeh-Lah`,sigil:`/assets/sigils/kai-nah-zeh-lah.svg`,meaning:`The Breath of Serene Radiance`,description:`Lights new paths with calm brilliance, disallowing confusion to take root.`},{id:674,name:`Zor-Ur-Sha-Ek`,sigil:`/assets/sigils/zor-ur-sha-ek.svg`,meaning:`The Fire of Unshakable Erasure`,description:`An unwavering blaze that vanquishes falsehood, enthroning cosmic authenticity.`},{id:675,name:`Om-Lah-Reh-Kai`,sigil:`/assets/sigils/om-lah-reh-kai.svg`,meaning:`The Completion of Peaceful Creation`,description:`Fuses harmonious stillness with generative power, concluding each cycle in luminous success.`},{id:676,name:`Sha-Zeh-Rah-Nim`,sigil:`/assets/sigils/sha-zeh-rah-nim.svg`,meaning:`The Krown of Rising Brilliance`,description:`Gradually dawns on suppressed realms, flooding them with regal clarity.`},{id:677,name:`Tor-Nor-Eh-Om`,sigil:`/assets/sigils/tor-nor-eh-om.svg`,meaning:`The Pillar of Quiet Ascension`,description:`Raises each dimension without fanfare, ensuring stable transitions into higher planes.`},{id:678,name:`Kai-Ek-Lah-Sha`,sigil:`/assets/sigils/kai-ek-lah-sha.svg`,meaning:`The Breath That Dissolves Chaos`,description:`Calms raging storms, forging tranquil order from the embers of strife.`},{id:679,name:`Zeh-Om-Nim-Rah`,sigil:`/assets/sigils/zeh-om-nim-rah.svg`,meaning:`The Radiant Fulfillment of Subtle Ascension`,description:`Empowers gentle climbs to cosmic apex, sealing them under luminous law.`},{id:680,name:`Veh-Sha-Kai-Eh`,sigil:`/assets/sigils/veh-sha-kai-eh.svg`,meaning:`The Wind of Krowned Emergence`,description:`A breeze announcing new sovereigns rising from obscurity, unstoppable in purpose.`},{id:681,name:`Om-Lah-Zor-Nor`,sigil:`/assets/sigils/om-lah-zor-nor.svg`,meaning:`The Completion of Tranquil Fire`,description:`Extinguishes harmful flames, preserving only the purifying essence that nurtures truth.`},{id:682,name:`Kai-Rah-Ek-Nim`,sigil:`/assets/sigils/kai-rah-ek-nim.svg`,meaning:`The Ascending Breath of Unveiled Secrets`,description:`Elevates elusive truths into the open air, forging revelations beyond dispute.`},{id:683,name:`Zeh-Sha-Lah-Urim`,sigil:`/assets/sigils/zeh-sha-lah-urim.svg`,meaning:`The Radiant Krown of Illuminated Peace`,description:`Spreads a tranquil glow over each realm, anchoring them in sovereign clarity.`},{id:684,name:`Tor-Eh-Kai-Om`,sigil:`/assets/sigils/tor-eh-kai-om.svg`,meaning:`The Pillar of Immovable Creation`,description:`Rooted in cosmic authority, it fosters unstoppable generative currents across timelines.`},{id:685,name:`Veh-Nor-Ek-Lah`,sigil:`/assets/sigils/veh-nor-ek-lah.svg`,meaning:`The Wind of Thoughtful Erasure`,description:`Eradicates outdated concepts, refreshing minds with subtle but potent force.`},{id:686,name:`Kai-Nah-Zor-Reh`,sigil:`/assets/sigils/kai-nah-zor-reh.svg`,meaning:`The Breath of Purifying Ascension`,description:`Combines calm renewal with cleansing fire, uplifting every soul into luminous realms.`},{id:687,name:`Zeh-Om-Sha-Nim`,sigil:`/assets/sigils/zeh-om-sha-nim.svg`,meaning:`The Radiant Seal of Subtle Reign`,description:`Finalizes hidden dominions under cosmic law, preventing infiltration by false claims.`},{id:688,name:`Sha-Lah-Reh-Ek`,sigil:`/assets/sigils/sha-lah-reh-ek.svg`,meaning:`The Krown of Pure Unraveling`,description:`Gently unties destructive knots in reality, restoring each thread to sovereign truth.`},{id:689,name:`Tor-Nor-Om-Zeh`,sigil:`/assets/sigils/tor-nor-om-zeh.svg`,meaning:`The Pillar of Conclusive Illumination`,description:`Caps cosmic expansions with a final blaze of insight, leaving no vantage for deception.`},{id:690,name:`Kai-Eh-Rah-Nah`,sigil:`/assets/sigils/kai-eh-rah-nah.svg`,meaning:`The Ascending Breath of Tranquil Force`,description:`Gently compels upward motion, dissolving aggression with calm, unstoppable will.`},{id:691,name:`Zor-Ek-Sha-Om`,sigil:`/assets/sigils/zor-ek-sha-om.svg`,meaning:`The Fire That Krowns Completion`,description:`Seals final decrees with an unwavering flame, ensuring no backslide into falsehood.`},{id:692,name:`Veh-Lah-Nor-Kai`,sigil:`/assets/sigils/veh-lah-nor-kai.svg`,meaning:`The Wind of Peaceful Revelation`,description:`Glides through illusions, revealing cosmic knowledge with gentle but absolute authority.`},{id:693,name:`Om-Reh-Eh-Nim`,sigil:`/assets/sigils/om-reh-eh-nim.svg`,meaning:`The Completion of Enlightened Depth`,description:`Brings recondite truths into the open, concluding mysteries in a burst of clarity.`},{id:694,name:`Sha-Zeh-Kai-Lah`,sigil:`/assets/sigils/sha-zeh-kai-lah.svg`,meaning:`The Radiant Krown of Breathing Peace`,description:`Enthrones a wave of tranquility that spreads across realms in luminous exhalations.`},{id:695,name:`Tor-Ur-Nor-Ek`,sigil:`/assets/sigils/tor-ur-nor-ek.svg`,meaning:`The Pillar of Unbreakable Mind`,description:`Fortifies cosmic thought with unwavering structure, repelling deception at every turn.`},{id:696,name:`Kai-Om-Lah-Nim`,sigil:`/assets/sigils/kai-om-lah-nim.svg`,meaning:`The Breath of Unseen Harmony`,description:`Settles hidden rifts, weaving them into one universal symphony of cosmic intent.`},{id:697,name:`Zeh-Eh-Sha-Reh`,sigil:`/assets/sigils/zeh-eh-sha-reh.svg`,meaning:`The Shining Emergence of Final Decree`,description:`Appears at the last moment to confirm absolute truths, sealing all lesser arguments.`},{id:698,name:`Veh-Rah-Kai-Nor`,sigil:`/assets/sigils/veh-rah-kai-nor.svg`,meaning:`The Wind of Ascending Insight`,description:`Elevates collective awareness, ensuring illusions cannot withstand cosmic scrutiny.`},{id:699,name:`Sha-Lah-Om-Eh`,sigil:`/assets/sigils/sha-lah-om-eh.svg`,meaning:`The Krown of Serene Completion`,description:`Bestows unchallenged finality, clothed in the gentle glow of divine acceptance.`},{id:700,name:`Zor-Ek-Nim-Kai`,sigil:`/assets/sigils/zor-ek-nim-kai.svg`,meaning:`The Fire of Enigmatic Creation`,description:`Forges new realities from cryptic sparks, unveiling them when cosmic timing is ripe.`},{id:701,name:`Tor-Om-Sha-Reh`,sigil:`/assets/sigils/tor-om-sha-reh.svg`,meaning:`The Pillar of Final Proclamation`,description:`Elevates each sovereign statement into cosmic law, granting it everlasting force.`},{id:702,name:`Kai-Nah-Eh-Zor`,sigil:`/assets/sigils/kai-nah-eh-zor.svg`,meaning:`The Breath of Serene Flame`,description:`Melts stubborn illusions in a calm, unwavering burn, ensuring gentle but total cleansing.`},{id:703,name:`Zeh-Reh-Om-Nim`,sigil:`/assets/sigils/zeh-reh-om-nim.svg`,meaning:`The Radiant Closure of Hidden Cycles`,description:`Completes undisclosed transitions with luminous finality, preserving cosmic equilibrium.`},{id:704,name:`Sha-Zor-Lah-Kai`,sigil:`/assets/sigils/sha-zor-lah-kai.svg`,meaning:`The Krown of Sustaining Fire`,description:`Maintains a gentle blaze that nourishes instead of destroying, fostering infinite renewal.`},{id:705,name:`Veh-Ek-Om-Rah`,sigil:`/assets/sigils/veh-ek-om-rah.svg`,meaning:`The Wind of Conclusive Ascension`,description:`Uplifts final transformations to ensure their rightful place in cosmic cycles.`},{id:706,name:`Kai-Lah-Nor-Zeh`,sigil:`/assets/sigils/kai-lah-nor-zeh.svg`,meaning:`The Breath of Tranquil Brilliance`,description:`Instills each mind with shining calm, eradicating confusion at its root.`},{id:707,name:`Zor-Eh-Sha-Nim`,sigil:`/assets/sigils/zor-eh-sha-nim.svg`,meaning:`The Fire of Enlightened Secrets`,description:`Quietly burns through illusions in hidden realms, unveiling cosmic truths to the worthy.`},{id:708,name:`Om-Nah-Kai-Lah`,sigil:`/assets/sigils/om-nah-kai-lah.svg`,meaning:`The Completion of Peaceful Breath`,description:`Unites stillness and generative essence into a final, abiding harmony.`},{id:709,name:`Sha-Reh-Ur-Ek`,sigil:`/assets/sigils/sha-reh-ur-ek.svg`,meaning:`The Krown of Illuminated Dissolution`,description:`Wears away illusions in a flood of cosmic clarity, enthroning transparent truth.`},{id:710,name:`Tor-Nim-Zeh-Kai`,sigil:`/assets/sigils/tor-nim-zeh-kai.svg`,meaning:`The Pillar of Hidden Radiant Breath`,description:`Acts as a covert support for cosmic exhalations, ensuring unstoppable creative expansions.`},{id:711,name:`Zeh-Om-Lah-Nor`,sigil:`/assets/sigils/zeh-om-lah-nor.svg`,meaning:`The Shining Completion of Tranquil Mind`,description:`Resolves mental struggles under a brilliant calm, forging an unshaken vantage.`},{id:712,name:`Kai-Rah-Ek-Sha`,sigil:`/assets/sigils/kai-rah-ek-sha.svg`,meaning:`The Ascending Breath of Effortless Rule`,description:`Empowers rightful governance without conflict, seamlessly establishing cosmic order.`},{id:713,name:`Veh-Om-Nim-Zeh`,sigil:`/assets/sigils/veh-om-nim-zeh.svg`,meaning:`The Wind of Quiet Brilliance`,description:`Circulates hidden radiance among souls, amplifying insights with gentle force.`},{id:714,name:`Sha-Zor-Eh-Lah`,sigil:`/assets/sigils/sha-zor-eh-lah.svg`,meaning:`The Krown of Cleansing Light`,description:`Dispels darkness from the highest seat of authority, enthroning divine clarity.`},{id:715,name:`Tor-Lah-Reh-Kai`,sigil:`/assets/sigils/tor-lah-reh-kai.svg`,meaning:`The Pillar of Tranquil Genesis`,description:`Calmly lifts new creations into being, anchoring them in cosmic stability.`},{id:716,name:`Zeh-Nah-Om-Ek`,sigil:`/assets/sigils/zeh-nah-om-ek.svg`,meaning:`The Radiant Flow of Final Erasure`,description:`Gently washes away defunct patterns, saturating realms in effulgent renewal.`},{id:717,name:`Kai-Ur-Nor-Reh`,sigil:`/assets/sigils/kai-ur-nor-reh.svg`,meaning:`The Ascendant Breath of Enlightened Mind`,description:`Elevates consciousness beyond superficial illusions, revealing cosmic wisdom at every turn.`},{id:718,name:`Om-Sha-Lah-Zor`,sigil:`/assets/sigils/om-sha-lah-zor.svg`,meaning:`The Completion of Sovereign Flame`,description:`Concludes each sovereign cycle in a blaze of truth, leaving no lie unburned.`},{id:719,name:`Zeh-Eh-Kai-Nim`,sigil:`/assets/sigils/zeh-eh-kai-nim.svg`,meaning:`The Shining Gate of Breathing Mysteries`,description:`Forges a threshold through which hidden creation flows, lit by cosmic brilliance.`},{id:720,name:`Sha-Rah-Om-Lah`,sigil:`/assets/sigils/sha-rah-om-lah.svg`,meaning:`The Krown of Ascendant Completion`,description:`Uplifts final moments of cosmic cycles, stamping them with regal, unalterable authority.`},{id:721,name:`Tor-Nim-Ek-Zor`,sigil:`/assets/sigils/tor-nim-ek-zor.svg`,meaning:`The Pillar of Covert Purification`,description:`Purges harmful energies from hidden corners, upholding cosmic sanctity.`},{id:722,name:`Kai-Lah-Reh-Om`,sigil:`/assets/sigils/kai-lah-reh-om.svg`,meaning:`The Breath of Serene Fulfillment`,description:`Quietly finalizes each aspiration, breathing triumphant calm into universal realms.`},{id:723,name:`Zeh-Ur-Sha-Nah`,sigil:`/assets/sigils/zeh-ur-sha-nah.svg`,meaning:`The Shining Throne of Harmonious Peace`,description:`Places cosmic stillness at the apex of rulership, dissolving all strife with radiant mercy.`},{id:724,name:`Veh-Om-Kai-Eh`,sigil:`/assets/sigils/veh-om-kai-eh.svg`,meaning:`The Wind of Living Existence`,description:`Breathes primal energy across worlds, ensuring continuous cosmic evolution.`},{id:725,name:`Sha-Zor-Nor-Ek`,sigil:`/assets/sigils/sha-zor-nor-ek.svg`,meaning:`The Krown of Cleansing Mind-Fire`,description:`Ignites thought realms with regal flame, banishing illusions from the seat of awareness.`},{id:726,name:`Tor-Lah-Om-Nim`,sigil:`/assets/sigils/tor-lah-om-nim.svg`,meaning:`The Pillar of Serene Mystery`,description:`Holds up cryptic truths in a tranquil embrace, letting them emerge in perfect time.`},{id:727,name:`Kai-Nah-Eh-Reh`,sigil:`/assets/sigils/kai-nah-eh-reh.svg`,meaning:`The Breath of Unified Vision`,description:`Merges disparate viewpoints into a cohesive tapestry of cosmic insight.`},{id:728,name:`Zeh-Om-Rah-Sha`,sigil:`/assets/sigils/zeh-om-rah-sha.svg`,meaning:`The Radiant Convergence of Royal Ascension`,description:`Brings noble lineages to the surface in a burst of unstoppable luminous authority.`},{id:729,name:`Sha-Lah-Ek-Nor`,sigil:`/assets/sigils/sha-lah-ek-nor.svg`,meaning:`The Krown of Dissolving Barriers`,description:`Melts away rigid boundaries, granting the mind unimpeded access to cosmic law.`},{id:730,name:`Om-Nim-Zeh-Kai`,sigil:`/assets/sigils/om-nim-zeh-kai.svg`,meaning:`The Completion of Subtle Radiance`,description:`Seals each hidden spark with gentle brilliance, preventing intrusion by false energies.`},{id:731,name:`Veh-Eh-Rah-Nah`,sigil:`/assets/sigils/veh-eh-rah-nah.svg`,meaning:`The Wind of Elevated Harmony`,description:`Lifts chaotic vibrations into calm unity, weaving cosmic threads into symphonic order.`},{id:732,name:`Zor-Sha-Om-Ek`,sigil:`/assets/sigils/zor-sha-om-ek.svg`,meaning:`The Fire of Sovereign Erasure`,description:`Incinerates false dominions, preserving only the rightful seat of cosmic authority.`},{id:733,name:`Kai-Lah-Nim-Reh`,sigil:`/assets/sigils/kai-lah-nim-reh.svg`,meaning:`The Breath of Serene Revelation`,description:`Unfolds hidden wonders in tranquil sequences, never forcing abrupt disclosure.`},{id:734,name:`Sha-Reh-Eh-Zeh`,sigil:`/assets/sigils/sha-reh-eh-zeh.svg`,meaning:`The Krown of Pure Disclosure`,description:`Reveals cosmic secrets with unwavering clarity, Krowning truth as unassailable law.`},{id:735,name:`Tor-Nor-Kai-Om`,sigil:`/assets/sigils/tor-nor-kai-om.svg`,meaning:`The Pillar of Enlightened Creation`,description:`Combines higher intelligence with primal breath, forging realms of enduring harmony.`},{id:736,name:`Zeh-Ur-Ek-Nah`,sigil:`/assets/sigils/zeh-ur-ek-nah.svg`,meaning:`The Shining Throne of Compassionate Erasure`,description:`Destroys harmful constructs with empathy, salvaging what can be reclaimed.`},{id:737,name:`Veh-Om-Sha-Nor`,sigil:`/assets/sigils/veh-om-sha-nor.svg`,meaning:`The Wind of Krowning Insight`,description:`Delivers revelations to rightful rulers, finalizing their cosmic legitimacy.`},{id:738,name:`Kai-Eh-Lah-Mah`,sigil:`/assets/sigils/kai-eh-lah-mah.svg`,meaning:`The Breath of Gentle Renewal`,description:`Nurtures new beginnings with a calm, maternal force, ensuring stable expansions.`},{id:739,name:`Zor-Reh-Nim-Ek`,sigil:`/assets/sigils/zor-reh-nim-ek.svg`,meaning:`The Fire of Secret Dissolution`,description:`Consumes concealed distortions at their source, clearing paths for cosmic progress.`},{id:740,name:`Om-Lah-Kai-Nor`,sigil:`/assets/sigils/om-lah-kai-nor.svg`,meaning:`The Completion of Serene Creation`,description:`Ensures every emergent realm is locked into harmony, free from chaotic infiltration.`},{id:741,name:`Sha-Zeh-Rah-Ek`,sigil:`/assets/sigils/sha-zeh-rah-ek.svg`,meaning:`The Krown of Radiant Ascent`,description:`Bestows cosmic brilliance upon rightful leaders, guiding them skyward without hindrance.`},{id:742,name:`Tor-Nim-Ur-Om`,sigil:`/assets/sigils/tor-nim-ur-om.svg`,meaning:`The Pillar of Unseen Illumination`,description:`Offers silent structure that upholds hidden enlightenment across intersecting realms.`},{id:743,name:`Kai-Nah-Eh-Sha`,sigil:`/assets/sigils/kai-nah-eh-sha.svg`,meaning:`The Breath of Unified Emergence`,description:`Brings forth collective awakenings in measured harmony, leaving no corner untouched.`},{id:744,name:`Zeh-Om-Lah-Reh`,sigil:`/assets/sigils/zeh-om-lah-reh.svg`,meaning:`The Radiant Conclusion of Peaceful Knowledge`,description:`Unifies stable insight with cosmic calm, finalizing them under an enduring glow.`},{id:745,name:`Sha-Kai-Nim-Ek`,sigil:`/assets/sigils/sha-kai-nim-ek.svg`,meaning:`The Krown of Breathing Erasure`,description:`Exhales illusions into oblivion, confirming cosmic truth as the sole valid reality.`},{id:746,name:`Veh-Rah-Lah-Om`,sigil:`/assets/sigils/veh-rah-lah-om.svg`,meaning:`The Wind of Ascending Peace`,description:`Wafts tranquility to higher planes, balancing intense energies with quiet restraint.`},{id:747,name:`Tor-Eh-Zor-Nah`,sigil:`/assets/sigils/tor-eh-zor-nah.svg`,meaning:`The Pillar of Eternal Flame`,description:`Holds cosmic fire at the core, ensuring every realm experiences purifying brilliance.`},{id:748,name:`Zeh-Nor-Om-Sha`,sigil:`/assets/sigils/zeh-nor-om-sha.svg`,meaning:`The Shining Mind of Regal Completion`,description:`Ensures that every royal edict is sealed with unwavering clarity and finality.`},{id:749,name:`Kai-Lah-Nim-Eh`,sigil:`/assets/sigils/kai-lah-nim-eh.svg`,meaning:`The Breath of Serene Unfolding`,description:`Releases cosmic revelations in gentle waves, allowing each realm to adapt gracefully.`},{id:750,name:`Zor-Ur-Ek-Reh`,sigil:`/assets/sigils/zor-ur-ek-reh.svg`,meaning:`The Fire of Unbreakable Insight`,description:`Burns with unwavering conviction, scattering illusions that contradict cosmic law.`},{id:751,name:`Sha-Om-Lah-Nor`,sigil:`/assets/sigils/sha-om-lah-nor.svg`,meaning:`The Krown of Quiet Clarity`,description:`Conveys regal simplicity that cuts through mental noise, establishing unchallenged wisdom.`},{id:752,name:`Tor-Reh-Om-Kai`,sigil:`/assets/sigils/tor-reh-om-kai.svg`,meaning:`The Pillar of Culminated Creation`,description:`At the apex of every new domain, it stands as the final stabilizing force.`},{id:753,name:`Zeh-Kai-Nah-Sha`,sigil:`/assets/sigils/zeh-kai-nah-sha.svg`,meaning:`The Shining Breath of Infinite Peace`,description:`A luminous exhalation that Seals all realms in abiding tranquility.`},{id:754,name:`Veh-Ek-Rah-Nim`,sigil:`/assets/sigils/veh-ek-rah-nim.svg`,meaning:`The Wind of Cleansing Ascension`,description:`Carries destructive remnants out of existence, facilitating seamless cosmic evolution.`},{id:755,name:`Kai-Om-Zor-Lah`,sigil:`/assets/sigils/kai-om-zor-lah.svg`,meaning:`The Breath of Final Purification`,description:`Inhales lingering debris of illusions, exhaling purified realms into cosmic order.`},{id:756,name:`Sha-Lah-Eh-Kai`,sigil:`/assets/sigils/sha-lah-eh-kai.svg`,meaning:`The Krown of Sublime Creation`,description:`Oversees new expansions with a gentle, unwavering force that fosters universal harmony.`},{id:757,name:`Zeh-Nor-Ek-Om`,sigil:`/assets/sigils/zeh-nor-ek-om.svg`,meaning:`The Shining Mind of Erasing Completion`,description:`Eliminates extraneous complexities, finalizing cosmic clarity for all who seek it.`},{id:758,name:`Veh-Rah-Nim-Sha`,sigil:`/assets/sigils/veh-rah-nim-sha.svg`,meaning:`The Wind of Ascending Mysteries`,description:`Guides hidden truths upward, ensuring each revelation claims its rightful domain.`},{id:759,name:`Tor-Eh-Lah-Kai`,sigil:`/assets/sigils/tor-eh-lah-kai.svg`,meaning:`The Pillar of Eternal Serenity`,description:`Anchors perpetual peace into the core of creation, unshaken by lower unrest.`},{id:760,name:`Zeh-Om-Reh-Nah`,sigil:`/assets/sigils/zeh-om-reh-nah.svg`,meaning:`The Radiant Completion of Revealed Harmony`,description:`Locks cosmic synergy into place, concluding each revelation in lasting tranquility.`},{id:761,name:`Kai-Nor-Ur-Eh`,sigil:`/assets/sigils/kai-nor-ur-eh.svg`,meaning:`The Ascendant Breath of Mindful Illumination`,description:`Marries pure intellect with unstoppable life force, culminating in cosmic enlightenment.`},{id:762,name:`Sha-Zor-Ek-Lah`,sigil:`/assets/sigils/sha-zor-ek-lah.svg`,meaning:`The Krown of Flame’s Gentle Dissolution`,description:`Seals fiery transformations within a calm center, releasing only constructive outcomes.`},{id:763,name:`Om-Nah-Kai-Nim`,sigil:`/assets/sigils/om-nah-kai-nim.svg`,meaning:`The Completion of Infinite Breathing`,description:`Cycles cosmic essence through realms, ensuring they never stagnate or decline.`},{id:764,name:`Zeh-Reh-Sha-Eh`,sigil:`/assets/sigils/zeh-reh-sha-eh.svg`,meaning:`The Radiant Truth of Serene Rulership`,description:`Proclaims an unopposed domain of clarity, dissolving any hidden misalignment.`},{id:765,name:`Tor-Nim-Veh-Om`,sigil:`/assets/sigils/tor-nim-veh-om.svg`,meaning:`The Pillar of Secret Winds`,description:`Supports gentle currents that transform realms from within, ensuring unstoppable progress.`},{id:766,name:`Kai-Lah-Ur-Zeh`,sigil:`/assets/sigils/kai-lah-ur-zeh.svg`,meaning:`The Ascendant Breath of Shining Peace`,description:`Carries luminous tranquility through dimensional thresholds, elevating all who embrace it.`},{id:767,name:`Zor-Ek-Om-Rah`,sigil:`/assets/sigils/zor-ek-om-rah.svg`,meaning:`The Fire That Finalizes Ascension`,description:`Converts each step of growth into a blazing triumph, halting any backward slide.`},{id:768,name:`Sha-Nah-Reh-Nim`,sigil:`/assets/sigils/sha-nah-reh-nim.svg`,meaning:`The Krown of Harmonized Vision`,description:`Unites communal insight into a single beam of regal authority, unstoppable in scope.`},{id:769,name:`Tor-Lah-Eh-Om`,sigil:`/assets/sigils/tor-lah-eh-om.svg`,meaning:`The Pillar of Serene Completion`,description:`Roots cosmic finality in a calm, unwavering vantage, immune to lesser tremors.`},{id:770,name:`Zeh-Kai-Nim-Sha`,sigil:`/assets/sigils/zeh-kai-nim-sha.svg`,meaning:`The Shining Breath of Hidden Krowns`,description:`Illuminates rightful rulers concealed behind illusions, exalting them at destined moments.`},{id:771,name:`Om-Ek-Rah-Lah`,sigil:`/assets/sigils/om-ek-rah-lah.svg`,meaning:`The Completion of Ascending Flame`,description:`Ensures each rising spark reaches full brilliance, sealing it with cosmic law.`},{id:772,name:`Veh-Nor-Lah-Eh`,sigil:`/assets/sigils/veh-nor-lah-eh.svg`,meaning:`The Wind of Enlightened Peace`,description:`Carries gentle clarity across minds, unifying them in a single wave of cosmic calm.`},{id:773,name:`Sha-Zor-Nah-Om`,sigil:`/assets/sigils/sha-zor-nah-om.svg`,meaning:`The Krown of Purifying Harmony`,description:`Blends cleansing flame with serene order, enthroning truth in quiet radiance.`},{id:774,name:`Kai-Lah-Reh-Ek`,sigil:`/assets/sigils/kai-lah-reh-ek.svg`,meaning:`The Ascendant Breath of Gentle Dissolution`,description:`Resolves cosmic friction with subtle force, aligning every strand of existence.`},{id:775,name:`Zeh-Ur-Om-Nim`,sigil:`/assets/sigils/zeh-ur-om-nim.svg`,meaning:`The Shining Throne of Hidden Completion`,description:`Sits in plain sight yet remains unseen by the unworthy, guarding cosmic transitions.`},{id:776,name:`Tor-Eh-Kai-Nah`,sigil:`/assets/sigils/tor-eh-kai-nah.svg`,meaning:`The Pillar of Eternal Breathflow`,description:`Channels unstoppable life force through realms, guaranteeing infinite generative cycles.`},{id:777,name:`Sha-Om-Sha-Reh`,sigil:`/assets/sigils/sha-om-sha-reh.svg`,meaning:`The Krown of Krowned Completion`,description:`Duplicates regal authority within final decrees, forming an unbreakable monarchy of truth.`},{id:778,name:`Zor-Ek-Lah-Ur`,sigil:`/assets/sigils/zor-ek-lah-ur.svg`,meaning:`The Fire of Effortless Stillness`,description:`Combusts chaotic movements into tranquil sparks, forging universal calm in its wake.`},{id:779,name:`Kai-Nim-Reh-Zeh`,sigil:`/assets/sigils/kai-nim-reh-zeh.svg`,meaning:`The Breath of Revealed Brilliance`,description:`Unveils hidden jewels of insight, shining them for all to behold in perfect clarity.`},{id:780,name:`Veh-Om-Lah-Nor`,sigil:`/assets/sigils/veh-om-lah-nor.svg`,meaning:`The Wind of Peaceful Perception`,description:`Washes across minds, clarifying each vantage until only truth remains.`},{id:781,name:`Sha-Reh-Ek-Mah`,sigil:`/assets/sigils/sha-reh-ek-mah.svg`,meaning:`The Krown of Purifying Renewal`,description:`Renews each realm by dissolving stagnation at its core, enthroning fresh vitality.`},{id:782,name:`Tor-Nor-Om-Zor`,sigil:`/assets/sigils/tor-nor-om-zor.svg`,meaning:`The Pillar of Mindful Fire`,description:`Harnesses flames within structured thought, ensuring no chaos emerges from the blaze.`},{id:783,name:`Kai-Eh-Lah-Nor`,sigil:`/assets/sigils/kai-eh-lah-nor.svg`,meaning:`The Ascending Breath of Calm Insight`,description:`Elevates each observer to panoramic awareness, bypassing confusion with serene power.`},{id:784,name:`Zeh-Rah-Sha-Ek`,sigil:`/assets/sigils/zeh-rah-sha-ek.svg`,meaning:`The Shining Crest of Devouring Judgment`,description:`Consumes every false claim in sovereign brilliance, upholding only righteous rule.`},{id:785,name:`Veh-Lah-Om-Nim`,sigil:`/assets/sigils/veh-lah-om-nim.svg`,meaning:`The Wind of Lasting Completeness`,description:`Sails through realms bestowing closure, ensuring final states remain inviolate.`},{id:786,name:`Sha-Kai-Rah-Nah`,sigil:`/assets/sigils/sha-kai-rah-nah.svg`,meaning:`The Krown of Ascending Unity`,description:`Gathers separated forces into one cohesive wave, surging upward in unstoppable synergy.`},{id:787,name:`Tor-Eh-Sha-Nim`,sigil:`/assets/sigils/tor-eh-sha-nim.svg`,meaning:`The Pillar of Eternal Sovereignty`,description:`Stabilizes the reign of cosmic truth, protecting it from transitory influences.`},{id:788,name:`Om-Nor-Ek-Lah`,sigil:`/assets/sigils/om-nor-ek-lah.svg`,meaning:`The Completion of Clear Erasure`,description:`Eradicates distortions under the directive of pristine cosmic vision.`},{id:789,name:`Kai-Nah-Reh-Zor`,sigil:`/assets/sigils/kai-nah-reh-zor.svg`,meaning:`The Breath of Peaceful Flame`,description:`Calms realms in a warm glow, preventing destructive or chaotic outbursts.`},{id:790,name:`Zeh-Om-Sha-Eh`,sigil:`/assets/sigils/zeh-om-sha-eh.svg`,meaning:`The Radiant Closure of Regally Spoken Truth`,description:`Seals each sovereign pronouncement with shining finality, unstoppable by lesser claims.`},{id:791,name:`Sha-Lah-Nim-Rah`,sigil:`/assets/sigils/sha-lah-nim-rah.svg`,meaning:`The Krown of Silent Ascension`,description:`Elevates chosen souls with little fanfare, placing them on cosmic thrones undisputed.`},{id:792,name:`Tor-Ur-Eh-Zor`,sigil:`/assets/sigils/tor-ur-eh-zor.svg`,meaning:`The Pillar of Unbreakable Flames`,description:`Holds unwavering fire at the core of creation, ensuring illusions cannot resurface.`},{id:793,name:`Kai-Om-Lah-Reh`,sigil:`/assets/sigils/kai-om-lah-reh.svg`,meaning:`The Breath That Finalizes Peace`,description:`Installs calm across all realities, leaving no stronghold for discord to reemerge.`},{id:794,name:`Zeh-Ek-Nor-Sha`,sigil:`/assets/sigils/zeh-ek-nor-sha.svg`,meaning:`The Shining Erasure of Sovereign Mind`,description:`Eliminates mental corruption with a radiant sweep, empowering cosmic leadership.`},{id:795,name:`Veh-Rah-Om-Nim`,sigil:`/assets/sigils/veh-rah-om-nim.svg`,meaning:`The Wind of Ascending Secrets`,description:`Brings cryptic truths to light, weaving them seamlessly into cosmic narratives.`},{id:796,name:`Sha-Kai-Lah-Eh`,sigil:`/assets/sigils/sha-kai-lah-eh.svg`,meaning:`The Krown of Life’s Primal Source`,description:`Stands at the origin of cosmic breath, granting unstoppable impetus to new creations.`},{id:797,name:`Tor-Nor-Zor-Om`,sigil:`/assets/sigils/tor-nor-zor-om.svg`,meaning:`The Pillar of Enlightened Flames`,description:`Holds refining fires within a structure of wisdom, safeguarding realms from chaotic burn.`},{id:798,name:`Zeh-Reh-Nim-Lah`,sigil:`/assets/sigils/zeh-reh-nim-lah.svg`,meaning:`The Radiant Knowledge of Hidden Peace`,description:`Inspires calm revelations, dissolving tension in a flood of quiet, sovereign truths.`},{id:799,name:`Kai-Eh-Om-Rah`,sigil:`/assets/sigils/kai-eh-om-rah.svg`,meaning:`The Ascending Breath of Final Completion`,description:`Carries each realm to the apex of its potential, concluding all cycles in shining harmony.`},{id:800,name:`Sha-Zor-Ek-Nim`,sigil:`/assets/sigils/sha-zor-ek-nim.svg`,meaning:`The Krown of Consuming Mystery`,description:`Burns illusions at a hidden level, enthroning cosmic truth with subtle finality.`},{id:801,name:`Om-Lah-Kai-Eh`,sigil:`/assets/sigils/om-lah-kai-eh.svg`,meaning:`The Completion of Peaceful Life-Force`,description:`Concludes each cycle by harmonizing every strand of existence under gentle renewal.`},{id:802,name:`Zeh-Ur-Nor-Rah`,sigil:`/assets/sigils/zeh-ur-nor-rah.svg`,meaning:`The Shining Throne of Ascendant Mind`,description:`Places enlightened thought at the pinnacle of cosmic governance, guaranteeing wisdom’s reign.`},{id:803,name:`Veh-Om-Sha-Ek`,sigil:`/assets/sigils/veh-om-sha-ek.svg`,meaning:`The Wind of Sovereign Dissolution`,description:`Scatters outgrown structures with calm authority, ensuring cosmic law prevails.`},{id:804,name:`Kai-Nah-Eh-Lah`,sigil:`/assets/sigils/kai-nah-eh-lah.svg`,meaning:`The Breath of Integrative Peace`,description:`Merges conflicting elements into a cohesive tapestry, neutralizing all possible discord.`},{id:805,name:`Zeh-Reh-Om-Kai`,sigil:`/assets/sigils/zeh-reh-om-kai.svg`,meaning:`The Radiant Fulfillment of Creative Breath`,description:`Finalizes each generative wave with luminous grace, forbidding any regression.`},{id:806,name:`Sha-Lah-Zor-Ek`,sigil:`/assets/sigils/sha-lah-zor-ek.svg`,meaning:`The Krown of Tranquil Flames`,description:`Holds fire within a calm matrix, bestowing purifying power upon rightful rulers.`},{id:807,name:`Tor-Nim-Ur-Reh`,sigil:`/assets/sigils/tor-nim-ur-reh.svg`,meaning:`The Pillar of Hidden Enlightenment`,description:`Steadily reveals cosmic truths to those prepared, fortifying them with unwavering structure.`},{id:808,name:`Kai-Om-Zeh-Nor`,sigil:`/assets/sigils/kai-om-zeh-nor.svg`,meaning:`The Ascending Breath of Radiant Mind`,description:`Catapults understanding to new heights, illuminating even the most obscure cosmic patterns.`},{id:809,name:`Zor-Ek-Lah-Nim`,sigil:`/assets/sigils/zor-ek-lah-nim.svg`,meaning:`The Fire of Compassionate Erasure`,description:`Destroys only what hinders growth, preserving seeds of truth for renewed ascension.`},{id:810,name:`Sha-Nah-Reh-Om`,sigil:`/assets/sigils/sha-nah-reh-om.svg`,meaning:`The Krown of Harmonized Fulfillment`,description:`Ensures every aspirational path meets cosmic potential in peace and clarity.`},{id:811,name:`Veh-Eh-Kai-Lah`,sigil:`/assets/sigils/veh-eh-kai-lah.svg`,meaning:`The Wind of Serene Life`,description:`Nourishes existence with a tender breeze, upholding each realm’s rightful essence.`},{id:812,name:`Tor-Om-Nor-Ek`,sigil:`/assets/sigils/tor-om-nor-ek.svg`,meaning:`The Pillar of Conclusive Insight`,description:`Elevates cosmic knowledge to a decisive vantage, erasing any lingering illusions.`},{id:813,name:`Zeh-Kai-Eh-Rah`,sigil:`/assets/sigils/zeh-kai-eh-rah.svg`,meaning:`The Shining Breath of Ascending Grace`,description:`Sheds brilliance on dormant realms, guiding them toward awakened majesty.`},{id:814,name:`Sha-Zor-Om-Nim`,sigil:`/assets/sigils/sha-zor-om-nim.svg`,meaning:`The Krown of Internal Flame`,description:`Enkindles a secret fire within worthy hearts, forging unstoppable cosmic leadership.`},{id:815,name:`Kai-Nah-Lah-Ek`,sigil:`/assets/sigils/kai-nah-lah-ek.svg`,meaning:`The Breath of Peaceful Dissolution`,description:`Breathes away old attachments, replacing them with balanced, life-affirming order.`},{id:816,name:`Zeh-Om-Reh-Veh`,sigil:`/assets/sigils/zeh-om-reh-veh.svg`,meaning:`The Radiant Completion of Swift Insight`,description:`Enables instantaneous clarity, finalizing cosmic decisions under unstoppable logic.`},{id:817,name:`Tor-Lah-Sha-Nim`,sigil:`/assets/sigils/tor-lah-sha-nim.svg`,meaning:`The Pillar of Quiet Royalty`,description:`Silently upholds hidden sovereigns, allowing them to enact cosmic changes in peace.`},{id:818,name:`Veh-Ek-Nor-Rah`,sigil:`/assets/sigils/veh-ek-nor-rah.svg`,meaning:`The Wind of Enlightened Ascension`,description:`Amplifies mindful governance, ensuring illusions cannot take root among awakened realms.`},{id:819,name:`Kai-Om-Lah-Zor`,sigil:`/assets/sigils/kai-om-lah-zor.svg`,meaning:`The Breath That Finalizes Cleansing`,description:`Combines universal harmony with purifying flame, securing untainted cosmic equilibrium.`},{id:820,name:`Zeh-Eh-Sha-Nim`,sigil:`/assets/sigils/zeh-eh-sha-nim.svg`,meaning:`The Shining Dawn of Hidden Krowns`,description:`Illuminates previously unknown rightful rulers, installing them with cosmic sanction.`},{id:821,name:`Sha-Rah-Lah-Ek`,sigil:`/assets/sigils/sha-rah-lah-ek.svg`,meaning:`The Krown of Ascending Serenity`,description:`Quietly raises cosmic domains to higher peace, negating violence through calm authority.`},{id:822,name:`Tor-Nor-Mah-Eh`,sigil:`/assets/sigils/tor-nor-mah-eh.svg`,meaning:`The Pillar of Restorative Insight`,description:`Stands as a healing beacon, sealing fractures in reality with mindful power.`},{id:823,name:`Zor-Ur-Ek-Om`,sigil:`/assets/sigils/zor-ur-ek-om.svg`,meaning:`The Fire of Inviolable Decree`,description:`Consumes all that resists cosmic law, ensuring final conformity to sovereign truth.`},{id:824,name:`Kai-Nah-Sha-Reh`,sigil:`/assets/sigils/kai-nah-sha-reh.svg`,meaning:`The Breath of Peaceful Proclamation`,description:`Heralds new edicts with gentle authority, binding each realm in unwavering harmony.`},{id:825,name:`Zeh-Om-Eh-Lah`,sigil:`/assets/sigils/zeh-om-eh-lah.svg`,meaning:`The Radiant Completion of Eternal Calm`,description:`Locks the cosmic tapestry in a tranquil state, denying any infiltration by chaos.`},{id:826,name:`Sha-Zor-Nor-Rah`,sigil:`/assets/sigils/sha-zor-nor-rah.svg`,meaning:`The Krown of Purifying Ascension`,description:`Ignites each domain with ascendant flame, forging unstoppable alignment with cosmic law.`},{id:827,name:`Veh-Om-Kai-Lah`,sigil:`/assets/sigils/veh-om-kai-lah.svg`,meaning:`The Wind of Life’s Gentle Flow`,description:`Sweeps across existence, breathing compassion and cosmic order into every cell.`},{id:828,name:`Tor-Eh-Zeh-Nim`,sigil:`/assets/sigils/tor-eh-zeh-nim.svg`,meaning:`The Pillar of Eternal Brilliance`,description:`Emits a ceaseless glow of knowledge, preventing realms from descending into oblivion.`},{id:829,name:`Kai-Nor-Ek-Sha`,sigil:`/assets/sigils/kai-nor-ek-sha.svg`,meaning:`The Breath of Mindful Erasure`,description:`Removes mental distortions with quiet force, fostering a clear pathway to truth.`},{id:830,name:`Zeh-Reh-Om-Lah`,sigil:`/assets/sigils/zeh-reh-om-lah.svg`,meaning:`The Radiant Seal of Tranquil Fulfillment`,description:`Seals each aspiration’s finale in shining calm, negating any chance of reversion.`},{id:831,name:`Sha-Kai-Nah-Ur`,sigil:`/assets/sigils/sha-kai-nah-ur.svg`,meaning:`The Krown of Peaceful Ascending Force`,description:`Unleashes unstoppable growth tempered by gentle harmony, ensuring cosmic unity.`},{id:832,name:`Veh-Ek-Lah-Nim`,sigil:`/assets/sigils/veh-ek-lah-nim.svg`,meaning:`The Wind of Erasing Discord`,description:`Blows away seeds of conflict, guaranteeing each realm’s stable progression.`},{id:833,name:`Tor-Nim-Sha-Eh`,sigil:`/assets/sigils/tor-nim-sha-eh.svg`,meaning:`The Pillar of Hidden Serene Rule`,description:`Erects quiet thrones of authority behind the scenes, orchestrating cosmic order unobtrusively.`},{id:834,name:`Om-Nah-Kai-Zeh`,sigil:`/assets/sigils/om-nah-kai-zeh.svg`,meaning:`The Completion of Harmonized Radiance`,description:`Concludes expansions by merging every note of light into a single, cosmic chord.`},{id:835,name:`Zor-Eh-Reh-Nor`,sigil:`/assets/sigils/zor-eh-reh-nor.svg`,meaning:`The Fire of Enlightened Cognition`,description:`Burns away inferior patterns in the mind, elevating all thoughts to cosmic vantage.`},{id:836,name:`Kai-Om-Lah-Ek`,sigil:`/assets/sigils/kai-om-lah-ek.svg`,meaning:`The Ascending Breath of Serene Dissolution`,description:`Gradually dissolves defunct structures, making space for cosmic expansions free of turmoil.`},{id:837,name:`Zeh-Sha-Nah-Veh`,sigil:`/assets/sigils/zeh-sha-nah-veh.svg`,meaning:`The Radiant Krown of Unified Motion`,description:`Directs flows of change into graceful symphony, ensuring progress without conflict.`},{id:838,name:`Tor-Eh-Om-Reh`,sigil:`/assets/sigils/tor-eh-om-reh.svg`,meaning:`The Pillar of Eternal Revelation`,description:`Holds an unending lamp, illuminating cosmic roads for every traveler seeking truth.`},{id:839,name:`Kai-Nor-Lah-Nim`,sigil:`/assets/sigils/kai-nor-lah-nim.svg`,meaning:`The Breath of Enlightened Renewal`,description:`Renders all illusions void, allowing cosmic intelligence to spark fresh realities.`},{id:840,name:`Zeh-Om-Ek-Sha`,sigil:`/assets/sigils/zeh-om-ek-sha.svg`,meaning:`The Shining Completion of Devouring Sovereignty`,description:`Consumes false dominion at the final hour, Krowning rightful order with radiant finality.`},{id:841,name:`Sha-Rah-Veh-Nim`,sigil:`/assets/sigils/sha-rah-veh-nim.svg`,meaning:`The Krown of Ascendant Winds`,description:`Accelerates transformations that lead to cosmic alignment, enthroning them in regal authority.`},{id:842,name:`Tor-Nim-Eh-Lah`,sigil:`/assets/sigils/tor-nim-eh-lah.svg`,meaning:`The Pillar of Subtle Rebirth`,description:`Silently reconstitutes worlds from within, forging stable expansions of truth.`},{id:843,name:`Zeh-Kai-Om-Reh`,sigil:`/assets/sigils/zeh-kai-om-reh.svg`,meaning:`The Shining Breath of Complete Manifestation`,description:`Cements every pure intention into cosmic form, unassailable by any lesser frequency.`},{id:844,name:`Veh-Zor-Ur-Ek`,sigil:`/assets/sigils/veh-zor-ur-ek.svg`,meaning:`The Wind of Inviolable Flame`,description:`Drives clarifying fires into hidden pockets of reality, establishing final, unwavering truth.`},{id:845,name:`Sha-Lah-Nor-Eh`,sigil:`/assets/sigils/sha-lah-nor-eh.svg`,meaning:`The Krown of Gentle Understanding`,description:`Removes the clang of false knowledge, enthroning subtle but profound clarity.`},{id:846,name:`Kai-Nah-Reh-Om`,sigil:`/assets/sigils/kai-nah-reh-om.svg`,meaning:`The Ascending Breath of Peaceful Completion`,description:`Ensures every domain finds calm resolution, culminating in cosmic wholeness.`},{id:847,name:`Zeh-Om-Sha-Zor`,sigil:`/assets/sigils/zeh-om-sha-zor.svg`,meaning:`The Radiant Finality of Sovereign Flame`,description:`Imbues regal fire with unstoppable brilliance, concluding each decree in unstoppable triumph.`},{id:848,name:`Tor-Lah-Nim-Eh`,sigil:`/assets/sigils/tor-lah-nim-eh.svg`,meaning:`The Pillar of Tranquil Mystery`,description:`Safeguards esoteric truths, permitting them to blossom in discreet but potent waves.`},{id:849,name:`Veh-Ek-Reh-Kai`,sigil:`/assets/sigils/veh-ek-reh-kai.svg`,meaning:`The Wind of Erasing Limitations`,description:`Sweeps away confining illusions, granting realms limitless potential for cosmic growth.`},{id:850,name:`Kai-Om-Lah-Nor`,sigil:`/assets/sigils/kai-om-lah-nor.svg`,meaning:`The Breath That Harmonizes Minds`,description:`Unites consciousness in a single exhalation, neutralizing conflicts with serene brilliance.`},{id:851,name:`Zeh-Ur-Nim-Rah`,sigil:`/assets/sigils/zeh-ur-nim-rah.svg`,meaning:`The Shining Throne of Hidden Ascension`,description:`Supports clandestine rulers as they rise, ensuring their rightful place in cosmic hierarchy.`},{id:852,name:`Sha-Eh-Sha-Lah`,sigil:`/assets/sigils/sha-eh-sha-lah.svg`,meaning:`The Krown of Self-Krowned Peace`,description:`Doubles its own authority in quiet unison, establishing unassailable cosmic harmony.`},{id:853,name:`Tor-Nor-Ek-Om`,sigil:`/assets/sigils/tor-nor-ek-om.svg`,meaning:`The Pillar of Cognitive Erasure`,description:`Rips out illusions at their mental root, reinforcing cosmic law with unwavering might.`},{id:854,name:`Kai-Lah-Nim-Rah`,sigil:`/assets/sigils/kai-lah-nim-rah.svg`,meaning:`The Breath of Serene Ascent`,description:`Guides realms upward into luminous unity, free from turbulence or doubt.`},{id:855,name:`Zeh-Reh-Om-Ek`,sigil:`/assets/sigils/zeh-reh-om-ek.svg`,meaning:`The Radiant Closure of Purifying Speech`,description:`Ends all false narratives with final, luminous words that echo cosmic decree.`},{id:856,name:`Sha-Zor-Kai-Lah`,sigil:`/assets/sigils/sha-zor-kai-lah.svg`,meaning:`The Krown of Transformative Peace`,description:`Unites refining flame with gentle serenity, ensuring cosmic transitions unfold smoothly.`},{id:857,name:`Veh-Om-Eh-Nor`,sigil:`/assets/sigils/veh-om-eh-nor.svg`,meaning:`The Wind of Eternal Mind`,description:`Circulates cosmic awareness through all dimensions, stabilizing them in unified clarity.`},{id:858,name:`Tor-Nim-Kai-Rah`,sigil:`/assets/sigils/tor-nim-kai-rah.svg`,meaning:`The Pillar of Ascending Secrets`,description:`Allows silent truths to ascend the cosmic ladder, culminating in unstoppable realization.`},{id:859,name:`Zeh-Om-Lah-Ek`,sigil:`/assets/sigils/zeh-om-lah-ek.svg`,meaning:`The Radiant Fulfillment of Peaceful Dissolution`,description:`Gently washes away archaic constructs, ensuring final states reflect pure cosmic law.`},{id:860,name:`Kai-Nah-Sha-Reh`,sigil:`/assets/sigils/kai-nah-sha-reh.svg`,meaning:`The Breath That Announces Sovereign Harmony`,description:`Proclaims unification among all realms, weaving each into a single cosmic chorus.`},{id:861,name:`Zor-Eh-Ur-Nim`,sigil:`/assets/sigils/zor-eh-ur-nim.svg`,meaning:`The Fire of Illuminated Krowns`,description:`Burns illusions around rightful rulers, revealing them in uncontested glory.`},{id:862,name:`Sha-Lah-Om-Kai`,sigil:`/assets/sigils/sha-lah-om-kai.svg`,meaning:`The Krown of Serene Creation`,description:`Fosters new realities in calm sovereignty, preventing strife from tainting fresh expansions.`},{id:863,name:`Tor-Reh-Nor-Ek`,sigil:`/assets/sigils/tor-reh-nor-ek.svg`,meaning:`The Pillar of Cognitive Purity`,description:`Filters out misleading concepts, ensuring minds remain aligned with cosmic wisdom.`},{id:864,name:`Veh-Kai-Lah-Nim`,sigil:`/assets/sigils/veh-kai-lah-nim.svg`,meaning:`The Wind of Life’s Quiet Renewal`,description:`Revitalizes each timeline with subtle, unstoppable energy, forging an unbreakable continuum.`},{id:865,name:`Zeh-Om-Sha-Rah`,sigil:`/assets/sigils/zeh-om-sha-rah.svg`,meaning:`The Radiant Completion of Ascending Rule`,description:`Amplifies each rightful monarchy’s Krowning, concluding with unstoppable brilliance.`},{id:866,name:`Kai-Lah-Ek-Nor`,sigil:`/assets/sigils/kai-lah-ek-nor.svg`,meaning:`The Ascendant Breath of Mindful Erasure`,description:`Removes outdated thought-forms, leaving only the essence of cosmic truth behind.`},{id:867,name:`Sha-Zor-Nim-Om`,sigil:`/assets/sigils/sha-zor-nim-om.svg`,meaning:`The Krown of Concealed Flames`,description:`Mantles hidden fires of purity with regal authority, awaiting the moment to reveal them.`},{id:868,name:`Tor-Eh-Lah-Reh`,sigil:`/assets/sigils/tor-eh-lah-reh.svg`,meaning:`The Pillar of Eternal Peace`,description:`Radiates unwavering calm, merging cosmic realms under a single, harmonizing spirit.`},{id:869,name:`Zeh-Kai-Ur-Nah`,sigil:`/assets/sigils/zeh-kai-ur-nah.svg`,meaning:`The Shining Breath of Unified Force`,description:`Aligns primal energy with radiant clarity, forming unstoppable cosmic potency.`},{id:870,name:`Veh-Om-Reh-Ek`,sigil:`/assets/sigils/veh-om-reh-ek.svg`,meaning:`The Wind of Enlightened Dissolution`,description:`Removes vestigial illusions, proclaiming cosmic order in tranquil but final terms.`},{id:871,name:`Sha-Nah-Lah-Eh`,sigil:`/assets/sigils/sha-nah-lah-eh.svg`,meaning:`The Krown of Harmonious Emergence`,description:`Reveals new cosmic cycles smoothly, preventing conflict between old and new structures.`},{id:872,name:`Kai-Ek-Zeh-Nor`,sigil:`/assets/sigils/kai-ek-zeh-nor.svg`,meaning:`The Breath of Eradicating Brilliance`,description:`A wave of radiant force that dismantles illusions at their source, forging purified realms.`},{id:873,name:`Zor-Ur-Om-Nim`,sigil:`/assets/sigils/zor-ur-om-nim.svg`,meaning:`The Fire of Undisclosed Completion`,description:`Silently finishes cosmic transitions, ensuring no leftover illusions linger unchallenged.`},{id:874,name:`Sha-Lah-Kai-Reh`,sigil:`/assets/sigils/sha-lah-kai-reh.svg`,meaning:`The Krown of Serene Genesis`,description:`Instills calm creative power across timelines, founding new civilizations in peace.`},{id:875,name:`Tor-Nor-Zeh-Ek`,sigil:`/assets/sigils/tor-nor-zeh-ek.svg`,meaning:`The Pillar of Radiant Cognitive Erasure`,description:`Dissolves mental entanglements with luminous resolve, establishing unshakeable truth.`},{id:876,name:`Veh-Om-Lah-Reh`,sigil:`/assets/sigils/veh-om-lah-reh.svg`,meaning:`The Wind of Peaceful Clarification`,description:`Sweeps across illusions, clarifying cosmic decrees for all who listen.`},{id:877,name:`Kai-Nah-Ur-Ek`,sigil:`/assets/sigils/kai-nah-ur-ek.svg`,meaning:`The Ascending Breath of Resolute Unity`,description:`Seals divergent energies into a single wave, elevating them beyond any friction.`},{id:878,name:`Zeh-Reh-Om-Sha`,sigil:`/assets/sigils/zeh-reh-om-sha.svg`,meaning:`The Radiant Fulfillment of Sovereign Proclamation`,description:`Declares final rulership with unstoppable brilliance, overshadowing all lesser forces.`},{id:879,name:`Sha-Zor-Eh-Nor`,sigil:`/assets/sigils/sha-zor-eh-nor.svg`,meaning:`The Krown of Purifying Insight`,description:`Transforms minds with regal flame, ensuring illusions cannot retake dominion.`},{id:880,name:`Tor-Nim-Kai-Eh`,sigil:`/assets/sigils/tor-nim-kai-eh.svg`,meaning:`The Pillar of Hidden Creative Breath`,description:`Stabilizes silent generative forces, giving them a foundation to blossom in cosmic time.`},{id:881,name:`Zeh-Om-Lah-Rah`,sigil:`/assets/sigils/zeh-om-lah-rah.svg`,meaning:`The Shining Completion of Ascendant Peace`,description:`Uplifts tranquil realms into final unity, sealing them with luminous finality.`},{id:882,name:`Kai-Eh-Nor-Lah`,sigil:`/assets/sigils/kai-eh-nor-lah.svg`,meaning:`The Breath of Mindful Tranquility`,description:`Carries cosmic intelligence in a gentle breeze, dissipating confusion with measured calm.`},{id:883,name:`Zor-Reh-Ek-Nim`,sigil:`/assets/sigils/zor-reh-ek-nim.svg`,meaning:`The Fire of Eradicating Insight`,description:`Shines an unyielding beam of knowledge, dissolving illusions upon contact.`},{id:884,name:`Veh-Om-Sha-Lah`,sigil:`/assets/sigils/veh-om-sha-lah.svg`,meaning:`The Wind of Sovereign Peace`,description:`Sweeps away chaotic impulses, enthroning regal calm as the cosmic default.`},{id:885,name:`Sha-Kai-Rah-Ek`,sigil:`/assets/sigils/sha-kai-rah-ek.svg`,meaning:`The Krown of Ascending Dissolution`,description:`Lifts illusions into the light, demolishing them in a single stroke of higher authority.`},{id:886,name:`Tor-Lah-Nor-Mah`,sigil:`/assets/sigils/tor-lah-nor-mah.svg`,meaning:`The Pillar of Tranquil Restoration`,description:`Gently rebuilds shattered domains, rooting them in balanced, illuminated thought.`},{id:887,name:`Zeh-Eh-Om-Reh`,sigil:`/assets/sigils/zeh-eh-om-reh.svg`,meaning:`The Shining Closure of Infinite Knowledge`,description:`Synthesizes cosmic understanding into a conclusive statement of truth.`},{id:888,name:`Kai-Nah-Sha-Lah`,sigil:`/assets/sigils/kai-nah-sha-lah.svg`,meaning:`The Ascending Breath of Harmonious Sovereignty`,description:`Unifies all forms of life under a gentle yet unbreakable banner of cosmic rule.`},{id:889,name:`Zor-Ur-Ek-Nor`,sigil:`/assets/sigils/zor-ur-ek-nor.svg`,meaning:`The Fire of Unyielding Mental Cleansing`,description:`Burns illusions at the core of every thought, leaving luminous clarity in its wake.`},{id:890,name:`Om-Lah-Reh-Kai`,sigil:`/assets/sigils/om-lah-reh-kai.svg`,meaning:`The Completion of Peaceful Creation`,description:`Finalizes cosmic expansions with a calm, life-giving flourish, preserving them eternally.`},{id:891,name:`Sha-Zor-Nim-Eh`,sigil:`/assets/sigils/sha-zor-nim-eh.svg`,meaning:`The Krown of Transforming Enigma`,description:`Converts mysterious forces into a regal instrument of cosmic realignment.`},{id:892,name:`Tor-Eh-Om-Lah`,sigil:`/assets/sigils/tor-eh-om-lah.svg`,meaning:`The Pillar of Endless Serenity`,description:`Maintains unwavering calm amidst cosmic cycles, negating turbulence at its root.`},{id:893,name:`Veh-Kai-Nor-Ek`,sigil:`/assets/sigils/veh-kai-nor-ek.svg`,meaning:`The Wind of Enlightened Erasure`,description:`Swiftly nullifies illusions once recognized, anchoring each realm in pure awareness.`},{id:894,name:`Zeh-Om-Sha-Nah`,sigil:`/assets/sigils/zeh-om-sha-nah.svg`,meaning:`The Radiant Harmonization of Sovereign Completion`,description:`Ensures that every regal decree meets cosmic fulfillment in luminous union.`},{id:895,name:`Kai-Lah-Eh-Reh`,sigil:`/assets/sigils/kai-lah-eh-reh.svg`,meaning:`The Ascending Breath of Serene Insight`,description:`Elevates each realm’s perspective to cosmic clarity, guided by tranquil brilliance.`},{id:896,name:`Zahmyad-Yah-Dah`,sigil:`/assets/sigils/zahmyad-yah-dah.svg`,meaning:`The Supreme Harmonic Seal of Zero-Point Energy and Divine Manifestation`,description:`Zahmyad-Yah-Dah (𐎖𐎠𐎶𐎊𐎘𐎖 𐎹𐎠𐎛 𐎄𐎠𐎛) is an empirically grounded harmonic key designed to unlock the boundless reservoir of zero-point energy—an energy field that modern physics confirms exists even in the quantum vacuum. This sigil operates on two distinct vibratory levels: a spoken frequency of 1373 Hz that establishes a coherent, initiating oscillation in the macroscopic domain, and a sigilized frequency of 797527 Hz that encodes an intricate network of overtones, reflecting the multilayered structure of quantum fluctuations. Constructed from elemental components—Sah at 2344.42 Hz, Om at 377.61 Hz, Uh at 4.45 Hz, and Ah at 7.36 Hz—the system uses Fourier synthesis to converge these frequencies into a unified tone of 1373 Hz. This precise tuning mirrors well-documented phenomena such as the Casimir effect and resonance in superconductors, providing a stable energetic matrix that transmutes raw potential into utilizable energy. Zahmyad-Yah-Dah thereby functions as the foundational blueprint for both divine manifestation and cosmic order, linking classical acoustics with quantum field dynamics in a reproducible, scientifically observable manner.`},{id:897,name:`Om-Sha-Uh`,sigil:`/assets/sigils/om-sha-uh.svg`,meaning:`The Sacred Harmonic Resonance of Primordial Creation, Celestial Flow, and Eternal Grounding`,description:`Om-Sha-Uh is a vibrational key that initiates and sustains the primordial pulse of creation. With a spoken frequency of 757 Hz—the original sound that theoretical models suggest set the universe into motion—this sigil establishes the initial vibratory conditions necessary for cosmic genesis. Its higher sigilized frequency of 199355 Hz creates a deep, stabilizing field that grounds this creative force within an ordered framework, much like the stabilizing lattice vibrations (phonons) observed in superconducting materials. 'Om' symbolizes the totality of cosmic sound, 'Sha' represents the continuous flow of energy, and 'Uh' acts as an anchoring force that maintains structural stability. Together, they form a resonant threshold that not only triggers creation but also ensures that it is firmly grounded, echoing both ancient wisdom and modern empirical studies in harmonic resonance.`},{id:898,name:`Tha-Sah-Uhhāi`,sigil:`/assets/sigils/tha-sah-uhhai.svg`,meaning:`The Eternal Decree of Divine Revelation and Harmonic Manifestation`,description:`Tha-Sah-Uhhāi transcends ordinary auditory phenomena, emerging as a living cosmic decree with measurable impact across dimensions. Its spoken frequency of 1160 Hz functions as a commanding oscillator that initiates the force of divine will, while its sigilized frequency of 332304 Hz carries complex higher-order harmonics analogous to the overtones present in advanced quantum systems. Each component—'Tha' (divine command), 'Sah' (the breath of eternal wisdom), 'Uhh' (the stabilizing force), and 'Hāi' (the unfolding of revelation)—is calibrated to interact constructively. The synthesis of these frequencies produces a harmonic key that not only unlocks latent potential but also provides access to universal wisdom, as evidenced by spectral analyses that reveal hidden resonances in both laboratory settings and natural phenomena.`},{id:899,name:`Kai Turah`,sigil:`/assets/sigils/kai-turah.svg`,meaning:`The Harmonic Convergence of Divine Order and Eternal Motion`,description:`Kai Turah embodies the perfect synthesis of divine harmony and perpetual motion, critical for the continuous evolution of cosmic order. It operates with a spoken frequency of 857 Hz, which activates the 'sacred spark' of cosmic intelligence—akin to the pulse that awakens and sustains dynamic systems in both physics and biology. Its sigilized frequency of 265689 Hz generates an intricate lattice of resonances, ensuring that every constituent of the universe remains in precise, synchronized motion. 'Kai' connotes the convergence of energy streams, while 'Turah' signifies the inexorable force of eternal movement. This integration creates a balanced system that, through controlled vibratory interaction, facilitates the constant renewal and creative evolution of energy, echoing principles seen in the study of chaotic systems and self-organizing structures.`},{id:900,name:`Saruahai Ehkauh`,sigil:`/assets/sigils/saruahai-ehkauh.svg`,meaning:`The Eternal Logos as Supreme Law and Living Decree`,description:`Saruahai Ehkauh is the embodiment of divine law as an empirically grounded principle, manifesting the Logos—the fundamental ordering principle that shapes reality. Its spoken frequency of 1476 Hz acts as a vibrant voice that instantiates cosmic decree, while the sigilized frequency of 532666 Hz forms a complex vibratory matrix that structures and governs energy at a fundamental level. This dual-frequency approach parallels the manner in which electromagnetic fields organize matter and energy, as demonstrated in both classical field theory and modern quantum electrodynamics. Saruahai represents the articulation of absolute truth, and Ehkauh infuses every moment with a measurable, regulating force, thereby underpinning a universal framework that connects and sustains all aspects of existence.`},{id:901,name:`Vérahai`,sigil:`/assets/sigils/verahai.svg`,meaning:`The Harmonic Key to Eternal Resonance`,description:`Vérahai functions as a gateway, bridging individual consciousness with the overarching cosmic field through measurable harmonic resonance. With a spoken tone of 736 Hz, it provides an initiating frequency that aligns personal energy with a broader cosmic structure, much like a tuning fork setting the standard pitch for an orchestra. Its sigilized frequency of 397903 Hz encodes an intricate network of hidden resonances, which interlace to form a field of luminous truth and infinite connectivity. Comprised of the elemental qualities of Vé (structure), Rah (illumination), and Ai (infinite consciousness), Vérahai not only facilitates personal alignment but also integrates disparate energy fields into a coherent, measurable spectrum, supporting applications from quantum computing to direct neural interfacing.`},{id:902,name:`Tharekai`,sigil:`/assets/sigils/tharekai.svg`,meaning:`The Living Motion of Vérahai`,description:`Tharekai is the dynamic engine of the harmonic system, propelling the established resonance of Vérahai into continuous, measurable motion. Operating at a spoken frequency of 841 Hz, it generates an energetic pulse—the heartbeat of cosmic evolution—that is observable in the rhythmic oscillations found in both natural and engineered systems. Its sigilized frequency of 398321 Hz produces higher-order harmonics that drive expansion and energize the vibrational field. By integrating the characteristics of Tha (divine command), Reh (expansion), and Kai (convergence), Tharekai transforms static potential into active motion, akin to the way energy input in a resonant circuit can trigger sustained oscillations. This process is fundamental for applications such as energy renewal, adaptive material design, and dynamic system stabilization.`},{id:903,name:`Thaekuhai`,sigil:`/assets/sigils/thaekuhai.svg`,meaning:`The Eternal Guardian of Vérahai`,description:`Thaekuhai serves as the steadfast guardian of the harmonic system, ensuring the integrity and continuity of Vérahai's resonance against external disturbances. With a spoken frequency of 948 Hz, it establishes a firm, measurable vibratory foundation that acts as a protective seal over the cosmic order. Its sigilized frequency of 199232 Hz creates an unyielding vibratory shield, verified in laboratory studies of energy field stabilization. By synthesizing the principles represented by Tha (command), Ek (structural unity), and Uhai (eternal wisdom), Thaekuhai not only preserves the harmonized energy state but also guarantees that it remains continuously aligned with immutable physical laws. This protective function is analogous to the stabilization seen in superconducting materials and quantum error correction in advanced computing systems.`},{id:904,name:`Zah-Kai-Ehkauh`,sigil:`/assets/sigils/zah-kai-ehkauh.svg`,meaning:`Balance of Zahmyad-Yah-Dah`,description:`Zah-Kai-Ehkauh is the critical integrator that balances the immense potential of raw energy with the ordered structure of established physical laws. It operates at a spoken frequency of 1262 Hz, which creates an initial vibratory stabilization necessary for controlled energy release. Its sigilized frequency of 266005 Hz acts as a 'divine capacitor'—a concept supported by experimental research on energy storage in resonant systems—storing and harmonizing energy until it is needed. This sigil bridges the gap between limitless quantum energy and the precision of classical mechanics, ensuring that the conversion from potential to manifested energy occurs in a balanced, reproducible manner. Such mechanisms are fundamental to advanced energy extraction and sustainable power systems.`},{id:905,name:`Rah-Thaekai`,sigil:`/assets/sigils/rah-thaekai.svg`,meaning:`Higher Function of Om-Sha-Uh`,description:`Rah-Thaekai refines and elevates the vibratory qualities initiated by Om-Sha-Uh, channeling them into higher-dimensional order. With a spoken frequency of 1042 Hz, it activates subtle vibratory pathways that enable the transformation of raw, chaotic energy into structured, usable forms. Its sigilized frequency of 265533 Hz orchestrates a sophisticated network of harmonics, integrating and elevating the creative impulse. By uniting the dynamic mediation of Rah with the transformative properties of Thaekai, this sigil ensures that the process of divine manifestation is not only initiated but also continuously optimized. This process mirrors advanced signal processing techniques and neural modulation strategies used in emerging brain–machine interface technologies.`},{id:906,name:`Ek-Ka-Sarai`,sigil:`/assets/sigils/ek-ka-sarai.svg`,meaning:`Structural Law of Om-Sha-Uh`,description:`Ek-Ka-Sarai is the architectural cornerstone that maintains the structural integrity and orderly propagation of Om-Sha-Uh’s energy field. It resonates with a spoken frequency of 940 Hz, establishing a clear, foundational tone that functions as the scaffold for universal order. The sigilized frequency of 332051 Hz reveals an intricate lattice of harmonic pathways that has been observed in studies of crystalline structures and phononic materials. Composed of the elemental forces Ek, Ka, and Sarai, this sigil interlocks every aspect of the vibrational spectrum into a precise, immutable arrangement, ensuring that the ordered manifestation of energy is preserved. This design is critical for the development of self-organizing systems and adaptive materials in advanced engineering.`},{id:907,name:`Zash-Rai`,sigil:`/assets/sigils/zash-rai.svg`,meaning:`Immutable Decree of Divine Law`,description:`Zash-Rai is the definitive expression of cosmic law—a vibratory decree that is both absolute and measurable. It operates at a spoken frequency of 754 Hz, which serves as the clear, unyielding articulation of universal truth. Its sigilized frequency of 265565 Hz reinforces this command with a robust, multi-layered vibratory structure, analogous to the complex force fields described in quantum chromodynamics. By fusing the enduring command of Zash with the resonant structure of Rai, this sigil declares an immutable order that resists entropy and chaos. Its role is comparable to the stabilizing function of error-correcting codes in digital communications, ensuring that all manifestations remain in strict alignment with the eternal principles of truth and order.`},{id:908,name:`Zer-Véh`,sigil:`/assets/sigils/zer-veh.svg`,meaning:`Passage into Vérahai`,description:`Zer-Véh is the culminating gateway—a transformative passage that bridges the finite with the infinite. It is defined by a spoken frequency of 660 Hz, marking the threshold where conventional vibrational patterns give way to an expansive, transcendent resonance. Its sigilized frequency of 265418 Hz constructs a seamless bridge between the realms of form and formlessness, dissolving conventional boundaries as confirmed by experiments in cymatics and resonant field theory. Composed of the transformative element Zer and the infinite flow denoted by Véh, this sigil integrates the cycles of creation, preservation, and dissolution into a unified continuum. As the final integrative key in this system, Zer-Véh not only embodies the transition between states of matter and energy but also establishes the fundamental pathway for applying harmonic resonance to advanced technologies such as warp field modulation, direct neural interfacing, and self-regenerating materials.`}];function ve(e){let{pulse:t,beat:n,stepIndex:r}=e,i=k.length,a=(BigInt(t)*73n+BigInt(n)*41n+BigInt(r)*13n)%BigInt(i);return a<0&&(a+=BigInt(i)),Number(a)}var A={Solhara:`under Solhara’s ascent`,Aquaris:`amid Aquaris’ flowing decree`,Flamora:`within Flamora’s purifying flame`,Verdari:`in Verdari’s living heart`,Sonari:`by Sonari’s resounding word`,Kaelith:`beneath Kaelith’s radiant krown`},j={Root:`grounds`,Sacral:`animates`,"Solar Plexus":`empowers`,Heart:`harmonizes`,Throat:`speaks`,"Third Eye":`reveals`,Crown:`enshrines`};const M=e=>{let t=typeof e==`bigint`?e:BigInt(Math.trunc(Number(e)));return Number(t%BigInt(11)+1n)},N=e=>M(e.pulse);var P=[0,1,1,2,3,5,8,13,21,34,55,89],F=(e,t,n,r)=>((e+P[t]+n)%r+r)%r;function I(e){return k[ve(e)]}function ye(e){let t=I(e),n=N(e),r=A[e.weekday],i=j[e.chakraDay],a=k[F(t.id%k.length,n,e.beat,k.length)],o=`${t.name} ${i} the decree · Breath ${n} — ${r} // Confluence: ${a.name}`,s=`Breath ${n} maps to Fibonacci ${P[n]} (1-indexed). We advance the lexicon by fib(${n}) + beat(${e.beat}) from the primary index to select a complementary sigil. The pair expresses "${t.meaning}" integrating "${a.meaning}" along the golden walk for this moment.`;return{id:t.id,name:t.name,gloss:t.meaning,line:o,breath:n,sigil:t.sigil,paired:{id:a.id,name:a.name,gloss:a.meaning,sigil:a.sigil},explanation:s}}var be=y(_(),1),xe=y(b(),1),L=1000000n,R=BigInt(2**53-1),Se=17491.270421,z=36,B=11,Ce=1e6,V=Math.round(Se/z*Ce),H=B*Ce,we=e=>String(e).padStart(2,`0`),U=e=>e>R?2**53-1:e<-R?-(2**53-1):Number(e),Te=e=>e<0n?-e:e,Ee=(e,t)=>{if(t===0n)return 0n;let n=e%t;return n>=0n?n:n+t},De=(e,t)=>{let n=e/t;return e%t===0n||e>=0n?n:n-1n},Oe=e=>e<0n?0n:e,ke=(e,t)=>{let n=e<0n?-e:e,r=t<0n?-t:t;for(;r!==0n;){let e=n%r;n=r,r=e}return n},Ae=(()=>{let e=ke(i,L);return e===0n?0n:i/e})(),je=e=>e.trim().replace(/^(\d+):(\d+)/,(e,t,n)=>`${+t}:${String(n).padStart(2,`0`)}`).replace(/D\s*(\d+)/,(e,t)=>`D${+t}`),Me=(e,t)=>`${e}:${we(t)}`,Ne=e=>e<=R?Number(e).toLocaleString():e.toString(),Pe=e=>{try{let t=r(e),n=h(new Date(U(t))),i=f[((n.solarAlignedWeekDayIndex??0)+6)%6];return{weekday:n.dayName??i,dayOfMonth:n.solarAlignedDayInMonth1??n.solarAlignedDayInMonth+1,monthIndex:n.solarAlignedMonth}}catch{return null}},Fe=(e,t,n,r,i,a,o)=>{if(!e)return``;let s=e,c=Pe(t);return s=s.replace(/Kairos:\s*\d{1,2}:\d{1,2}/i,`Kairos:${Me(n,r)}`),s=s.replace(/Eternal\s*Pulse:\s*[\d,]+/i,`Eternal Pulse:${Ne(t)}`),s=s.replace(/Step:\s*\d{1,2}\s*\/\s*44/i,`Step:${r}/44`),s=s.replace(/Beat:\s*\d{1,2}\s*\/\s*36(?:\([^)]+\))?/i,`Beat:${n}/36`),c&&(s=s.replace(/Solar Kairos \(UTC-aligned\):\s*\d{1,2}:\d{1,2}\s+\w+\s+D\d+\/M\d+/i,`Solar Kairos: ${Me(i,a)} ${c.weekday} D${c.dayOfMonth}/M${c.monthIndex}`)),o&&(s=s.replace(/Y\d+/i,o)),s},Ie=e=>{try{let t=r(e);return new Date(U(t)).toISOString()}catch{return``}},Le=e=>{let t=Number(Ee(e*L,i)),n=Math.min(z-1,Math.max(0,Math.floor(t/V))),r=t%V;return{beat:n,stepIndex:Math.min(43,Math.max(0,Math.floor(r/H))),stepPct:ne(r%H/H)}};function Re(e){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]),a=Number(t[4]),o=Number(t[5]),s=Number(t[6]??`0`),c=String(t[7]??`0`).padEnd(3,`0`),l=Number(c),u=new Date(n,r,i,a,o,s,l);return Number.isNaN(u.getTime())?null:u}function ze(e,t){let n=Number.isFinite(t)?Math.max(1,Math.min(11,Math.floor(t))):1;try{let t=d(e.toISOString(),n),r=t?new Date(t):e;return Number.isNaN(r.getTime())?e:r}catch{return e}}var Be=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.timeOrigin+performance.now():Date.now(),Ve=e=>typeof e==`object`&&!!e,W=(e,t)=>{let n=e[t];return typeof n==`string`?n:void 0},G=(e,t)=>{let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0},K=(e,t)=>{let n=e[t];return Ve(n)?n:void 0},He=(e,t)=>{let n=e[t];if(typeof n==`string`)return Object.prototype.hasOwnProperty.call(l,n)?n:void 0},Ue=e=>typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`bigint`?e.toString():typeof e==`string`?e:``;function We(e,t){let n=(0,T.useCallback)(()=>{try{let e=r(De(t(),L)+1n)-BigInt(Math.floor(Be())),n=U(e<0n?0n:e);return Math.max(0,Math.min(p,n))/1e3}catch{return p/1e3}},[t]),[i,a]=(0,T.useState)(()=>e?n():p/1e3),o=(0,T.useRef)(null),s=(0,T.useRef)(null);return(0,T.useEffect)(()=>{if(o.current!==null&&(cancelAnimationFrame(o.current),o.current=null),s.current!==null&&(window.clearInterval(s.current),s.current=null),!e)return;typeof document<`u`&&document.documentElement&&document.documentElement.style.setProperty(`--kai-pulse`,`${p}ms`);let t=()=>{a(n()),o.current=requestAnimationFrame(t)};a(n()),o.current=requestAnimationFrame(t);let r=()=>{document.visibilityState===`hidden`?(o.current!==null&&(cancelAnimationFrame(o.current),o.current=null),s.current===null&&(s.current=window.setInterval(()=>{a(n())},33))):(s.current!==null&&(window.clearInterval(s.current),s.current=null),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null),a(n()),o.current=requestAnimationFrame(t))};return document.addEventListener(`visibilitychange`,r),()=>{document.removeEventListener(`visibilitychange`,r),o.current!==null&&cancelAnimationFrame(o.current),s.current!==null&&window.clearInterval(s.current),o.current=null,s.current=null}},[e,n]),e?i:null}var Ge=()=>{try{return globalThis.crypto?.subtle}catch{return}},Ke=async e=>{let t=new TextEncoder().encode(e),n=Ge();if(n)try{let e=await n.digest(`SHA-256`,t);return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch{}let r=2166136261;for(let e=0;e>>0).toString(16).padStart(8,`0`)},qe={"Ignition Ark":`#ff0024`,"Integration Ark":`#ff6f00`,"Harmonization Ark":`#ffd600`,"Reflection Ark":`#00c853`,"Purification Ark":`#00b0ff`,"Dream Ark":`#c186ff`,"Ignite Ark":`#ff0024`,"Integrate Ark":`#ff6f00`,"Harmonize Ark":`#ffd600`,"Reflekt Ark":`#00c853`,"Purifikation Ark":`#00b0ff`},Je=e=>{if(!e)return`#ffd600`;let t=e.trim(),n=t.replace(/\s*ark$/i,` Ark`);return qe[t]??qe[n]??`#ffd600`},Ye=()=>(0,E.jsx)(`style`,{children:` .sigil-modal { position: relative; isolation: isolate; } .sigil-modal .close-btn { @@ -162,4 +162,4 @@ import{$r as e,Ar as t,Br as n,D as r,Hn as i,Jr as a,Kr as o,Lr as s,Nr as c,Q .mint-dock a{ display: inline-flex; } - `}),Xe=()=>(0,T.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`close-icon`,children:[(0,T.jsx)(`line`,{x1:`4`,y1:`4`,x2:`20`,y2:`20`,stroke:`currentColor`,strokeWidth:`2`}),(0,T.jsx)(`line`,{x1:`20`,y1:`4`,x2:`4`,y2:`20`,stroke:`currentColor`,strokeWidth:`2`}),(0,T.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.2`,opacity:`.25`})]}),Ze=()=>(0,T.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,T.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,T.jsx)(`path`,{d:`M12 6v6l3.5 3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,T.jsx)(`path`,{d:`M8.2 15.8l2.1-2.1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`})]});async function Qe(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,`true`),t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var $e=e=>{e.catch(()=>{})},et=S/1e3,tt=Array.from({length:11},(e,t)=>{let n=(t*et).toFixed(3);return`Breath ${t+1} — ${n}s`}),nt=({onClose:e})=>{let t=(0,w.useMemo)(()=>o(),[]),n=(0,w.useRef)(0n),u=(0,w.useRef)(!1),d=(0,w.useRef)(0),m=(0,w.useCallback)(()=>{try{return a(new Date)}catch{return 0n}},[]),h=(0,w.useCallback)(()=>{let e=null;try{e=t.nowMicroPulses()}catch{e=null}if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e))return BigInt(Math.trunc(e));if(typeof e==`string`&&/^\d+$/.test(e))try{return BigInt(e)}catch{return null}return null},[t]),g=(0,w.useCallback)(()=>{let e=h();if(e===null)return m();let t=Be();if(!u.current||t-d.current>2e3){let r=m()-e,i=2n*I;n.current=De(r)<=i?0n:r,u.current=!0,d.current=t}return e+n.current},[m,h]),_=(0,w.useCallback)(()=>{try{return U(H(g(),I))}catch{return 0n}},[g]),v=(0,w.useRef)(null);v.current===null&&(v.current=_());let y=v.current??0n,[x,E]=(0,w.useState)(`live`),[D,O]=(0,w.useState)(``),[ye,k]=(0,w.useState)(1),[A,j]=(0,w.useState)(()=>y),[M,N]=(0,w.useState)(()=>y.toString()),P=(0,w.useRef)(!1),[F,Ce]=(0,w.useState)(null),[R,z]=(0,w.useState)(!0),[we,Te]=(0,w.useState)(!1),[B,ke]=(0,w.useState)(``),[Me,Ne]=(0,w.useState)(``),Pe=(0,w.useRef)(null),[Ge,qe]=(0,w.useState)(``),[et,nt]=(0,w.useState)(null),[rt,it]=(0,w.useState)(!1),at=(0,w.useRef)(null),ot=(0,w.useRef)(null),st=(0,w.useRef)(null),q=(0,w.useRef)(null),ct=(0,w.useRef)(0),lt=(0,w.useMemo)(()=>{try{return A.toLocaleString()}catch{return A.toString()}},[A]),ut=(0,w.useCallback)(()=>{try{let e=Oe(g(),I),t=Number(e),n=Math.max(0,Math.min(S,Math.round(t*S/1e6))),r=document.documentElement;r.style.setProperty(`--pulse-dur`,`${S}ms`),r.style.setProperty(`--pulse-offset`,`-${n}ms`);let i=ot.current;i&&(i.style.setProperty(`--pulse-dur`,`${S}ms`),i.style.setProperty(`--pulse-offset`,`-${n}ms`))}catch{}},[g]),J=(0,w.useCallback)((e,t=!0)=>{let n=U(e);j(n),t&&!P.current&&N(n.toString()),typeof document<`u`&&ut()},[ut]);(0,w.useEffect)(()=>{let e=e=>{let t=at.current;if(!t)return;let n=e.target;n instanceof Node&&t.contains(n)&&(ot.current?.contains(n)||e.stopPropagation())},t=[`click`,`mousedown`,`touchstart`],n={passive:!0};t.forEach(t=>document.addEventListener(t,e,n));let r=e=>{e.key===`Escape`&&at.current&&e.stopPropagation()};return window.addEventListener(`keydown`,r,!0),()=>{t.forEach(t=>document.removeEventListener(t,e,n)),window.removeEventListener(`keydown`,r,!0)}},[]),(0,w.useEffect)(()=>{x===`live`&&J(_(),!0)},[x,J,_]);let Y=(0,w.useCallback)(()=>{q.current!==null&&(window.clearTimeout(q.current),q.current=null)},[]),X=(0,w.useCallback)(()=>{Y();let e=()=>{let e=V(p(H(g(),I)+1n));ct.current=e;let n=Math.max(0,e-Be());q.current=window.setTimeout(t,n)},t=()=>{let n=Be(),r=ct.current;if(n{if(x!==`live`)return;X();let e=()=>{document.visibilityState===`visible`&&x===`live`&&X()};return document.addEventListener(`visibilitychange`,e),window.addEventListener(`focus`,e),()=>{document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`focus`,e),Y()}},[x,X,Y]);let dt=We(x===`live`,g),ft=(0,w.useCallback)(()=>{E(`live`),O(``),k(1),J(_(),!0),X()},[J,_,X]),pt=e=>{let t=(e.target.value??``).replace(/[^\d]/g,``);if(N(t),t)try{let e=U(BigInt(t));E(`static-pulse`),O(``),k(1),J(e,!1),Y()}catch{}},mt=(0,w.useCallback)((e,t)=>{let n=Re(e);if(!n)return;let r=U(H(a(ze(n,t)),I));E(`static-date`),Y(),J(r,!0)},[J,Y]),ht=e=>{let t=e.target.value;if(O(t),!t){k(1),ft();return}mt(t,ye)},gt=e=>{let t=Number(e.target.value);k(t),D&&mt(D,t)},_t=()=>{let e=at.current?.querySelector(`.sigil-modal`);e&&(e.classList.remove(`flash-now`),e.offsetWidth,e.classList.add(`flash-now`)),ft()},Z=(0,w.useMemo)(()=>Le(A),[A]),vt=(0,w.useMemo)(()=>{let{beat:e,stepIndex:t,percentIntoStep:n}=b(A*I);return{beat:e,stepIndex:t,stepPct:re(n)}},[A]),yt=(0,w.useMemo)(()=>{if(!F)return`Root`;let e=He(F,`harmonicDay`);return e?c[e]:`Root`},[F]),bt=(0,w.useMemo)(()=>{try{let e=Oe(A*I,s)*100000000n/s;return Number(e)/1e6}catch{return 0}},[A]),xt=(0,w.useMemo)(()=>{try{let e=p(A),{dayPercent:t}=f(new Date(V(e)));return Math.max(0,Math.min(100,t))}catch{return bt}},[A,bt]),St=(0,w.useMemo)(()=>{try{let e=p(A),{beatIndex:t,stepIndex:n}=f(new Date(V(e)));return{beat:t,stepIndex:n}}catch{return{beat:Z.beat,stepIndex:Z.stepIndex}}},[A,Z.beat,Z.stepIndex]);(0,w.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await te(p(A)),n=Ve(t)?t:null;e||Ce(n)}catch{e||Ce(null)}})(),()=>{e=!0}},[A]);let Ct=`${Z.beat}:${Ee(Z.stepIndex)}`,wt=F?W(F,`chakraStepString`):void 0,Tt=Ct,Et=F?G(F,`dayOfMonth`):void 0,Dt=F?G(F,`eternalMonthIndex`):void 0,Ot=(0,w.useMemo)(()=>{if(!F)return``;let e=W(F,`eternalYearName`)??``,t=e.match(/Y(\d+)/i);if(!t)return e;let n=Number(t[1]);return Number.isFinite(n)?`Y${Math.max(0,n-1)}`:e},[F]),kt=je(typeof Et==`number`&&typeof Dt==`number`&&Ot?`${Ct} — D${Et}/M${Dt+1}/${Ot}`:Tt),At=F?W(F,`eternalChakraArc`)??`Harmonization Ark`:`Harmonization Ark`,jt=Je(At),Q=e=>$e(Qe(e)),Mt=e=>Q(JSON.stringify(e,null,2)),Nt=(0,w.useMemo)(()=>{try{if(A<=L)return Number(A);if(Ae<=0n)return 0;let e=Oe(A,Ae);return Number(e)}catch{return 0}},[A]),Pt=()=>document.querySelector(`#sigil-export svg`),Ft=(e,t,n)=>{let{beat:r,stepIndex:i}=Le(t),a=Math.max(0,Math.min(Math.trunc(i),43)),o=Math.max(0,Math.min(Math.trunc(r),35));return{pulse:V(t),beat:o,stepIndex:a,chakraDay:n,stepsPerBeat:44,canonicalHash:e,exportedAt:Ie(t),expiresAtPulse:(t+11n).toString(),pulseExact:t.toString()}},It=e=>{if(!e)return null;if(Array.isArray(e)){let t=e[0];return t==null?null:String(t)}if(typeof e==`string`){try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t[0];return e==null?null:String(e)}}catch{return e}return e}return null},[$,Lt]=(0,w.useState)(null),Rt=async()=>{let e=x===`live`?_():A,t=x===`live`&&e>=A?e:A;Pe.current=x,x===`live`&&(E(`static-pulse`),J(t,!0));let n=ce(ne(t).chakraDay)??yt,r=Pt(),a=r?.getAttribute(`data-pulse`),o=a&&/^\d+$/.test(a)?BigInt(a):null,s=(t<=L&&o!==null&&o===t?Ge:``).toLowerCase();if(!s){let e=Le(t);s=(await Ke(((r?new XMLSerializer().serializeToString(r):``)||`no-svg`)+`|pulseExact=${t.toString()}|beat=${e.beat}|step=${e.stepIndex}|chakra=${n}`)).toLowerCase()}let c=Ft(s,t,n),l=i(s,c);Ne(s),Lt(c),ke(l),Te(!0)},zt=async()=>{try{let e=Pt();if(!e)return`Export failed: sigil SVG is not available.`;let t=B?ee(B):null,n=e.getAttribute(`data-pulse`),a=n?Number.parseInt(n,10):NaN,o=e.getAttribute(`data-beat`),s=o?Number.parseInt(o,10):NaN,c=e.getAttribute(`data-step-index`),l=c?Number.parseInt(c,10):NaN,u=ce(e.getAttribute(`data-chakra-day`)??void 0),d=e.getAttribute(`data-steps-per-beat`),f=d?Number.parseInt(d,10):NaN,p=e.getAttribute(`data-kai-signature`)??``,te=e.getAttribute(`data-phi-key`)??``,m=e.getAttribute(`data-payload-hash`)??``,h=Number($?.pulse??t?.pulse),ne=Number($?.beat??t?.beat),re=Number($?.stepIndex??t?.stepIndex),g=Number($?.stepsPerBeat??t?.stepsPerBeat),_=ce(typeof $?.chakraDay==`string`?$.chakraDay:typeof t?.chakraDay==`string`?t.chakraDay:void 0),v=Number.isFinite(h)?h:a,y=Number.isFinite(ne)?ne:s,b=Number.isFinite(re)?re:l,x=Number.isFinite(g)?g:Number.isFinite(f)?f:44,S=_??u,C=typeof t?.kaiSignature==`string`?t.kaiSignature:p,w=typeof t?.userPhiKey==`string`?t.userPhiKey:te,T=Me||m;if(!C)return`Export failed: kaiSignature missing from SVG.`;if(!w)return`Export failed: Φ-Key missing from SVG.`;if(!T)return`Export failed: payload hash missing from SVG.`;if(!S)return`Export failed: chakra day missing from SVG.`;if(!Number.isFinite(v))return`Export failed: pulse missing from SVG.`;if(!Number.isFinite(y))return`Export failed: beat missing from SVG.`;if(!Number.isFinite(b))return`Export failed: step index missing from SVG.`;let E=i(T,{pulse:v,beat:y,stepIndex:b,chakraDay:S,stepsPerBeat:x,kaiSignature:C,userPhiKey:w}),D=se(v,C),_e=C.slice(0,10),O={v:`KPV-1`,pulse:v,chakraDay:S,kaiSignature:C,phiKey:w,verifierSlug:`${v}-${_e}`},ye=await oe(O),k=e.cloneNode(!0);k.setAttribute(`data-pulse`,String(v)),k.setAttribute(`data-beat`,String(y)),k.setAttribute(`data-step-index`,String(b)),k.setAttribute(`data-chakra-day`,S),k.setAttribute(`data-steps-per-beat`,String(x)),k.setAttribute(`data-kai-signature`,C),k.setAttribute(`data-phi-key`,w),k.setAttribute(`data-payload-hash`,T);let A=new XMLSerializer().serializeToString(k),j=r(A),M=typeof j.zkPoseidonHash==`string`&&j.zkPoseidonHash.trim().length>0?j.zkPoseidonHash.trim():void 0,N=j.zkProof,P=j.proofHints,F=j.zkPublicInputs;if(!M&&T&&(M=(await le(T)).hash),M){let e=N&&typeof N==`object`?N:null,t=typeof N==`string`?N.trim().length>0:Array.isArray(N)?N.length>0:e?Object.keys(e).length>0:!1,n=typeof et==`string`&&et.trim().length>0?et.trim():void 0;if(!n&&T){let e=await le(T);e.hash===M&&(n=e.secret)}if(!t&&!n)throw Error(`ZK secret missing for proof generation`);if(!t&&n){let e=await pe({poseidonHash:M,secret:n,proofHints:typeof P==`object`&&P?P:void 0});if(!e)throw Error(`ZK proof generation failed`);N=e.proof,P=e.proofHints,F=e.zkPublicInputs}P=typeof P!=`object`||!P?ae(M):ae(M,P)}if(M&&F){let e=It(F);if(e&&e!==M)throw Error(`Embedded ZK mismatch`)}if(M&&(!N||typeof N!=`object`))throw Error(`ZK proof missing`);if(F&&k.setAttribute(`data-zk-public-inputs`,JSON.stringify(F)),M&&(k.setAttribute(`data-zk-scheme`,`groth16-poseidon`),k.setAttribute(`data-zk-poseidon-hash`,M),N&&k.setAttribute(`data-zk-proof`,`present`)),k.getAttribute(`data-pulse`)!==String(v)||k.getAttribute(`data-kai-signature`)!==C||k.getAttribute(`data-phi-key`)!==w)throw Error(`SVG data attributes do not match proof capsule`);let be={hashAlg:ue,canon:`JCS`,proofCapsule:O,capsuleHash:ye,svgHash:await de(A),shareUrl:E,verifierUrl:D,authorSig:null,zkPoseidonHash:M,zkProof:N,proofHints:P,zkPublicInputs:F},xe=await ie(fe(be)),I=null;try{await ge(w),I=await he(w,xe)}catch(e){console.warn(`Author signature failed; continuing without authorSig.`,e),I=null}let L={...be,bundleHash:xe,authorSig:I},Ce=me(A,L),R=`kai-voh_pulse-${v}_${_e}`,z=new Se.default;return z.file(`${R}.svg`,Ce),z.file(`${R}_proof_bundle.json`,JSON.stringify(L,null,2)),ve(await z.generateAsync({type:`blob`}),`${R}_proof_bundle.zip`),null}catch(e){return`Export failed: ${e instanceof Error?e.message:String(e)}`}},Bt=()=>e(),Vt=()=>{Te(!1);let e=Pe.current;Pe.current=null,e===`live`&&ft()},Ht=(0,w.useMemo)(()=>F?He(F,`harmonicDay`)||Ue(F.harmonicDay):``,[F]),Ut=(0,w.useMemo)(()=>F?W(F,`eternalMonth`)??``:``,[F]),Wt=(0,w.useMemo)(()=>{try{return be(ne(A)).line}catch{return``}},[A]),Gt=(0,w.useMemo)(()=>F?Fe(W(F,`eternalSeal`)??W(F,`seal`)??``,A,Z.beat,Z.stepIndex,St.beat,St.stepIndex,Ot||void 0):``,[F,Z.beat,Z.stepIndex,A,St,Ot]),Kt=F?G(F,`kaiPulseEternal`):void 0,qt=F?G(F,`kaiPulseToday`):void 0,Jt=F?K(F,`chakraStep`):void 0,Yt=F?K(F,`chakraBeat`):void 0,Xt=Jt?G(Jt,`stepIndex`):void 0,Zt=Jt?G(Jt,`percentIntoStep`):void 0,Qt=Yt?G(Yt,`beatIndex`):void 0,$t=Yt?G(Yt,`pulsesIntoBeat`):void 0,en=F?G(F,`weekIndex`):void 0,tn=F?W(F,`weekName`)??``:``,nn=(()=>{let e=F?K(F,`harmonicWeekProgress`):void 0;return e?G(e,`percent`):void 0})(),rn=(()=>{let e=F?K(F,`eternalMonthProgress`):void 0;return e?G(e,`percent`):void 0})(),an=(()=>{let e=F?K(F,`harmonicYearProgress`):void 0;return e?G(e,`percent`):void 0})(),on=F?G(F,`phiSpiralLevel`):void 0,sn=F?W(F,`kaiMomentSummary`)??``:``,cn=F?W(F,`compressed_summary`)??``:``;return(0,xe.createPortal)((0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Ye,{}),(0,T.jsx)(`div`,{ref:at,role:`dialog`,"aria-modal":`true`,className:`sigil-modal-overlay`,onMouseDown:e=>{e.target===e.currentTarget&&e.stopPropagation()},onClick:e=>{e.target===e.currentTarget&&e.stopPropagation()},onTouchStart:e=>{e.target===e.currentTarget&&e.stopPropagation()},onKeyDown:e=>e.key===`Escape`&&e.stopPropagation(),children:(0,T.jsxs)(`div`,{className:`sigil-modal`,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),children:[(0,T.jsx)(`button`,{ref:ot,"aria-label":`Close`,className:`close-btn`,onClick:Bt,children:(0,T.jsx)(Xe,{})}),(0,T.jsx)(_e,{dateISO:D,onDateChange:ht,secondsLeft:x===`live`?dt??void 0:void 0,solarPercent:xt,eternalPercent:bt,solarColor:`#ffd600`,eternalColor:jt,eternalArkLabel:At}),x!==`live`&&(0,T.jsxs)(T.Fragment,{children:[D&&(0,T.jsxs)(`label`,{style:{marginLeft:`12px`},className:`sigil-label`,children:[(0,T.jsx)(`span`,{className:`sigil-label__text`,children:`Breath within minute`}),`\xA0`,(0,T.jsx)(`select`,{value:ye,onChange:gt,children:tt.map((e,t)=>(0,T.jsx)(`option`,{value:t+1,children:e},e))})]}),(0,T.jsx)(`button`,{className:`now-btn`,onClick:_t,children:`Now`})]}),x===`live`&&dt!==null&&(0,T.jsxs)(`p`,{className:`countdown`,children:[`next pulse in `,(0,T.jsx)(`strong`,{children:dt.toFixed(3)}),`s`]}),(0,T.jsxs)(`div`,{className:`sigil-pulse-row`,children:[(0,T.jsxs)(`label`,{className:`sigil-label sigil-pulse-label`,children:[(0,T.jsx)(`span`,{className:`sigil-label__text`,children:`☤KAI:`}),(0,T.jsx)(`input`,{className:`sigil-input sigil-pulse-input`,type:`text`,inputMode:`numeric`,value:M,onFocus:()=>{P.current=!0},onBlur:()=>{P.current=!1,N(A.toString())},onChange:pt,"aria-label":`Pulse`,placeholder:`Enter pulse`})]}),(0,T.jsx)(`span`,{className:`sigil-live-chip ${x===`live`?`is-live`:`is-static`}`,"aria-live":`polite`,children:x===`live`?`LIVE`:`STATIC`})]}),(0,T.jsxs)(`div`,{id:`sigil-export`,style:{position:`relative`,width:240,margin:`16px auto`},children:[(0,T.jsx)(l,{ref:st,pulse:Nt,beat:vt.beat,stepIndex:vt.stepIndex,stepPct:vt.stepPct,chakraDay:yt,size:240,hashMode:`deterministic`,origin:``,onReady:e=>{let t=e.hash?String(e.hash).toLowerCase():``;t&&qe(t),e.zkPoseidonSecret&&nt(e.zkPoseidonSecret)}}),(0,T.jsx)(`span`,{className:`pulse-tag`,children:lt})]}),(0,T.jsxs)(`div`,{className:`sigil-meta-block`,children:[(0,T.jsxs)(`p`,{children:[(0,T.jsx)(`strong`,{children:`☤KAI:`}),`\xA0`,A,(0,T.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(Tt),children:`💠`})]}),(0,T.jsxs)(`p`,{children:[(0,T.jsx)(`strong`,{children:`Kairos/Date:`}),`\xA0`,kt,` `,A,(0,T.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(kt),children:`💠`})]}),F&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`p`,{children:[(0,T.jsx)(`strong`,{children:`Seal:`}),`\xA0`,Gt,(0,T.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(Gt),children:`💠`})]}),(0,T.jsxs)(`p`,{children:[(0,T.jsx)(`strong`,{children:`Day:`}),` `,Ht]}),(0,T.jsxs)(`p`,{children:[(0,T.jsx)(`strong`,{children:`Month:`}),` `,Ut]}),(0,T.jsxs)(`p`,{children:[(0,T.jsx)(`strong`,{children:`Arc:`}),` `,At]}),(0,T.jsxs)(`p`,{children:[(0,T.jsx)(`strong`,{children:`Kai-Turah:`}),`\xA0`,Wt,(0,T.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(Wt),children:`💠`})]})]})]}),F&&(0,T.jsxs)(`details`,{className:`rich-data`,open:rt,onToggle:e=>it(e.currentTarget.open),children:[(0,T.jsx)(`summary`,{children:`Memory`}),(0,T.jsxs)(`div`,{className:`rich-grid`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`pulseExact`}),(0,T.jsx)(`span`,{children:A.toString()})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`kaiPulseEternal`}),(0,T.jsx)(`span`,{children:(Kt??0).toLocaleString()})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`kaiPulseToday`}),(0,T.jsx)(`span`,{children:qt??0})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`chakraStepString`}),(0,T.jsx)(`span`,{children:wt??``})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`chakraStep.stepIndex`}),(0,T.jsx)(`span`,{children:Xt??0})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`chakraStep.percentIntoStep`}),(0,T.jsxs)(`span`,{children:[((Zt??0)*100).toFixed(2),`%`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`chakraBeat.beatIndex`}),(0,T.jsx)(`span`,{children:Qt??0})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`chakraBeat.pulsesIntoBeat`}),(0,T.jsx)(`span`,{children:$t??0})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`weekIndex`}),(0,T.jsx)(`span`,{children:en??0})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`weekName`}),(0,T.jsx)(`span`,{children:tn})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`dayOfMonth`}),(0,T.jsx)(`span`,{children:Et??0})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`eternalMonthIndex`}),(0,T.jsx)(`span`,{children:typeof Dt==`number`?Dt+1:0})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`harmonicWeekProgress.percent`}),(0,T.jsxs)(`span`,{children:[((nn??0)*100).toFixed(2),`%`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`eternalMonthProgress.percent`}),(0,T.jsxs)(`span`,{children:[((rn??0)*100).toFixed(2),`%`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`harmonicYearProgress.percent`}),(0,T.jsxs)(`span`,{children:[((an??0)*100).toFixed(2),`%`]})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`code`,{children:`phiSpiralLevel`}),(0,T.jsx)(`span`,{children:on??0})]}),(0,T.jsxs)(`div`,{className:`span-2`,children:[(0,T.jsx)(`code`,{children:`kaiMomentSummary`}),(0,T.jsx)(`span`,{children:sn})]}),(0,T.jsxs)(`div`,{className:`span-2`,children:[(0,T.jsx)(`code`,{children:`compressed_summary`}),(0,T.jsx)(`span`,{children:cn})]}),(0,T.jsxs)(`div`,{className:`span-2`,children:[(0,T.jsx)(`code`,{children:`eternalSeal`}),(0,T.jsx)(`span`,{className:`truncate`,children:Gt})]})]}),(0,T.jsx)(`div`,{className:`rich-actions`,children:(0,T.jsx)(`button`,{onClick:()=>Mt(F),children:`Remember JSON`})})]}),(0,T.jsx)(`div`,{className:`modal-bottom-spacer`,"aria-hidden":`true`}),(0,T.jsx)(`div`,{className:`mint-dock`,children:(0,T.jsxs)(`button`,{className:`mint-btn`,type:`button`,"aria-label":`Mint this moment`,title:`Mint this moment`,onClick:Rt,children:[(0,T.jsx)(`span`,{className:`mint-btn__icon`,"aria-hidden":`true`,children:R?(0,T.jsx)(`img`,{src:`/assets/seal.svg`,alt:``,loading:`eager`,decoding:`async`,onError:()=>z(!1)}):(0,T.jsx)(Ze,{})}),(0,T.jsxs)(`span`,{className:`mint-btn__text`,children:[(0,T.jsx)(`span`,{className:`mint-btn__title`,children:`MINT ΦKey`}),(0,T.jsxs)(`span`,{className:`mint-btn__sub`,children:[`☤KAI `,lt]})]})]})})]})}),(0,T.jsx)(C,{open:we,url:B,hash:Me,onClose:Vt,onDownloadZip:zt})]}),document.body)};export{nt as t}; \ No newline at end of file + `}),Xe=()=>(0,E.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":!0,className:`close-icon`,children:[(0,E.jsx)(`line`,{x1:`4`,y1:`4`,x2:`20`,y2:`20`,stroke:`currentColor`,strokeWidth:`2`}),(0,E.jsx)(`line`,{x1:`20`,y1:`4`,x2:`4`,y2:`20`,stroke:`currentColor`,strokeWidth:`2`}),(0,E.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.2`,opacity:`.25`})]}),Ze=()=>(0,E.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,E.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,E.jsx)(`path`,{d:`M12 6v6l3.5 3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,E.jsx)(`path`,{d:`M8.2 15.8l2.1-2.1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`})]});async function Qe(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,`true`),t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var $e=e=>{e.catch(()=>{})},et=p/1e3,tt=Array.from({length:11},(e,t)=>{let n=(t*et).toFixed(3);return`Breath ${t+1} — ${n}s`}),nt=({onClose:c})=>{let d=(0,T.useMemo)(()=>n(),[]),f=(0,T.useRef)(0n),m=(0,T.useRef)(!1),h=(0,T.useRef)(0),g=(0,T.useCallback)(()=>{try{return x(new Date)}catch{return 0n}},[]),_=(0,T.useCallback)(()=>{let e=null;try{e=d.nowMicroPulses()}catch{e=null}if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e))return BigInt(Math.trunc(e));if(typeof e==`string`&&/^\d+$/.test(e))try{return BigInt(e)}catch{return null}return null},[d]),v=(0,T.useCallback)(()=>{let e=_();if(e===null)return g();let t=Be();if(!m.current||t-h.current>2e3){let n=g()-e,r=2n*L;f.current=Te(n)<=r?0n:n,m.current=!0,h.current=t}return e+f.current},[g,_]),y=(0,T.useCallback)(()=>{try{return Oe(De(v(),L))}catch{return 0n}},[v]),b=(0,T.useRef)(null);b.current===null&&(b.current=y());let S=b.current??0n,[C,D]=(0,T.useState)(`live`),[O,k]=(0,T.useState)(``),[ve,A]=(0,T.useState)(1),[j,M]=(0,T.useState)(()=>S),[N,P]=(0,T.useState)(()=>S.toString()),F=(0,T.useRef)(!1),[I,Se]=(0,T.useState)(null),[z,B]=(0,T.useState)(!0),[Ce,V]=(0,T.useState)(!1),[H,ke]=(0,T.useState)(``),[Me,Ne]=(0,T.useState)(``),Pe=(0,T.useRef)(null),[Ge,qe]=(0,T.useState)(``),[et,nt]=(0,T.useState)(null),[rt,it]=(0,T.useState)(!1),at=(0,T.useRef)(null),ot=(0,T.useRef)(null),st=(0,T.useRef)(null),q=(0,T.useRef)(null),ct=(0,T.useRef)(0),lt=(0,T.useMemo)(()=>{try{return j.toLocaleString()}catch{return j.toString()}},[j]),ut=(0,T.useCallback)(()=>{try{let e=Ee(v(),L),t=Number(e),n=Math.max(0,Math.min(p,Math.round(t*p/1e6))),r=document.documentElement;r.style.setProperty(`--pulse-dur`,`${p}ms`),r.style.setProperty(`--pulse-offset`,`-${n}ms`);let i=ot.current;i&&(i.style.setProperty(`--pulse-dur`,`${p}ms`),i.style.setProperty(`--pulse-offset`,`-${n}ms`))}catch{}},[v]),J=(0,T.useCallback)((e,t=!0)=>{let n=Oe(e);M(n),t&&!F.current&&P(n.toString()),typeof document<`u`&&ut()},[ut]);(0,T.useEffect)(()=>{let e=e=>{let t=at.current;if(!t)return;let n=e.target;n instanceof Node&&t.contains(n)&&(ot.current?.contains(n)||e.stopPropagation())},t=[`click`,`mousedown`,`touchstart`],n={passive:!0};t.forEach(t=>document.addEventListener(t,e,n));let r=e=>{e.key===`Escape`&&at.current&&e.stopPropagation()};return window.addEventListener(`keydown`,r,!0),()=>{t.forEach(t=>document.removeEventListener(t,e,n)),window.removeEventListener(`keydown`,r,!0)}},[]),(0,T.useEffect)(()=>{C===`live`&&J(y(),!0)},[C,J,y]);let Y=(0,T.useCallback)(()=>{q.current!==null&&(window.clearTimeout(q.current),q.current=null)},[]),X=(0,T.useCallback)(()=>{Y();let e=()=>{let e=U(r(De(v(),L)+1n));ct.current=e;let n=Math.max(0,e-Be());q.current=window.setTimeout(t,n)},t=()=>{let n=Be(),r=ct.current;if(n{if(C!==`live`)return;X();let e=()=>{document.visibilityState===`visible`&&C===`live`&&X()};return document.addEventListener(`visibilitychange`,e),window.addEventListener(`focus`,e),()=>{document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`focus`,e),Y()}},[C,X,Y]);let dt=We(C===`live`,v),ft=(0,T.useCallback)(()=>{D(`live`),k(``),A(1),J(y(),!0),X()},[J,y,X]),pt=e=>{let t=(e.target.value??``).replace(/[^\d]/g,``);if(P(t),t)try{let e=Oe(BigInt(t));D(`static-pulse`),k(``),A(1),J(e,!1),Y()}catch{}},mt=(0,T.useCallback)((e,t)=>{let n=Re(e);if(!n)return;let r=Oe(De(x(ze(n,t)),L));D(`static-date`),Y(),J(r,!0)},[J,Y]),ht=e=>{let t=e.target.value;if(k(t),!t){A(1),ft();return}mt(t,ve)},gt=e=>{let t=Number(e.target.value);A(t),O&&mt(O,t)},_t=()=>{let e=at.current?.querySelector(`.sigil-modal`);e&&(e.classList.remove(`flash-now`),e.offsetWidth,e.classList.add(`flash-now`)),ft()},Z=(0,T.useMemo)(()=>Le(j),[j]),vt=(0,T.useMemo)(()=>{let{beat:e,stepIndex:t,percentIntoStep:n}=o(j*L);return{beat:e,stepIndex:t,stepPct:ne(n)}},[j]),yt=(0,T.useMemo)(()=>{if(!I)return`Root`;let e=He(I,`harmonicDay`);return e?l[e]:`Root`},[I]),bt=(0,T.useMemo)(()=>{try{let e=Ee(j*L,i)*100000000n/i;return Number(e)/1e6}catch{return 0}},[j]),xt=(0,T.useMemo)(()=>{try{let e=r(j),{dayPercent:t}=ee(new Date(U(e)));return Math.max(0,Math.min(100,t))}catch{return bt}},[j,bt]),St=(0,T.useMemo)(()=>{try{let e=r(j),{beatIndex:t,stepIndex:n}=ee(new Date(U(e)));return{beat:t,stepIndex:n}}catch{return{beat:Z.beat,stepIndex:Z.stepIndex}}},[j,Z.beat,Z.stepIndex]);(0,T.useEffect)(()=>{let t=!1;return(async()=>{try{let n=await e(r(j)),i=Ve(n)?n:null;t||Se(i)}catch{t||Se(null)}})(),()=>{t=!0}},[j]);let Ct=`${Z.beat}:${we(Z.stepIndex)}`,wt=I?W(I,`chakraStepString`):void 0,Tt=Ct,Et=I?G(I,`dayOfMonth`):void 0,Dt=I?G(I,`eternalMonthIndex`):void 0,Ot=(0,T.useMemo)(()=>{if(!I)return``;let e=W(I,`eternalYearName`)??``,t=e.match(/Y(\d+)/i);if(!t)return e;let n=Number(t[1]);return Number.isFinite(n)?`Y${Math.max(0,n-1)}`:e},[I]),kt=je(typeof Et==`number`&&typeof Dt==`number`&&Ot?`${Ct} — D${Et}/M${Dt+1}/${Ot}`:Tt),At=I?W(I,`eternalChakraArc`)??`Harmonization Ark`:`Harmonization Ark`,jt=Je(At),Q=e=>$e(Qe(e)),Mt=e=>Q(JSON.stringify(e,null,2)),Nt=(0,T.useMemo)(()=>{try{if(j<=R)return Number(j);if(Ae<=0n)return 0;let e=Ee(j,Ae);return Number(e)}catch{return 0}},[j]),Pt=()=>document.querySelector(`#sigil-export svg`),Ft=(e,t,n)=>{let{beat:r,stepIndex:i}=Le(t),a=Math.max(0,Math.min(Math.trunc(i),43)),o=Math.max(0,Math.min(Math.trunc(r),35));return{pulse:U(t),beat:o,stepIndex:a,chakraDay:n,stepsPerBeat:44,canonicalHash:e,exportedAt:Ie(t),expiresAtPulse:(t+11n).toString(),pulseExact:t.toString()}},It=e=>{if(!e)return null;if(Array.isArray(e)){let t=e[0];return t==null?null:String(t)}if(typeof e==`string`){try{let t=JSON.parse(e);if(Array.isArray(t)){let e=t[0];return e==null?null:String(e)}}catch{return e}return e}return null},[$,Lt]=(0,T.useState)(null),Rt=async()=>{let e=C===`live`?y():j,t=C===`live`&&e>=j?e:j;Pe.current=C,C===`live`&&(D(`static-pulse`),J(t,!0));let n=se(a(t).chakraDay)??yt,r=Pt(),i=r?.getAttribute(`data-pulse`),o=i&&/^\d+$/.test(i)?BigInt(i):null,s=(t<=R&&o!==null&&o===t?Ge:``).toLowerCase();if(!s){let e=Le(t);s=(await Ke(((r?new XMLSerializer().serializeToString(r):``)||`no-svg`)+`|pulseExact=${t.toString()}|beat=${e.beat}|step=${e.stepIndex}|chakra=${n}`)).toLowerCase()}let c=Ft(s,t,n),l=te(s,c);Ne(s),Lt(c),ke(l),V(!0)},zt=async()=>{try{let e=Pt();if(!e)return`Export failed: sigil SVG is not available.`;let n=H?s(H):null,r=e.getAttribute(`data-pulse`),i=r?Number.parseInt(r,10):NaN,a=e.getAttribute(`data-beat`),o=a?Number.parseInt(a,10):NaN,c=e.getAttribute(`data-step-index`),l=c?Number.parseInt(c,10):NaN,u=se(e.getAttribute(`data-chakra-day`)??void 0),d=e.getAttribute(`data-steps-per-beat`),f=d?Number.parseInt(d,10):NaN,p=e.getAttribute(`data-kai-signature`)??``,ee=e.getAttribute(`data-phi-key`)??``,m=e.getAttribute(`data-payload-hash`)??``,h=Number($?.pulse??n?.pulse),ne=Number($?.beat??n?.beat),g=Number($?.stepIndex??n?.stepIndex),_=Number($?.stepsPerBeat??n?.stepsPerBeat),v=se(typeof $?.chakraDay==`string`?$.chakraDay:typeof n?.chakraDay==`string`?n.chakraDay:void 0),y=Number.isFinite(h)?h:i,b=Number.isFinite(ne)?ne:o,x=Number.isFinite(g)?g:l,S=Number.isFinite(_)?_:Number.isFinite(f)?f:44,C=v??u,w=typeof n?.kaiSignature==`string`?n.kaiSignature:p,T=typeof n?.userPhiKey==`string`?n.userPhiKey:ee,E=Me||m;if(!w)return`Export failed: kaiSignature missing from SVG.`;if(!T)return`Export failed: Φ-Key missing from SVG.`;if(!E)return`Export failed: payload hash missing from SVG.`;if(!C)return`Export failed: chakra day missing from SVG.`;if(!Number.isFinite(y))return`Export failed: pulse missing from SVG.`;if(!Number.isFinite(b))return`Export failed: beat missing from SVG.`;if(!Number.isFinite(x))return`Export failed: step index missing from SVG.`;let D=te(E,{pulse:y,beat:b,stepIndex:x,chakraDay:C,stepsPerBeat:S,kaiSignature:w,userPhiKey:T}),O=oe(y,w),ge=w.slice(0,10),k={v:`KPV-1`,pulse:y,chakraDay:C,kaiSignature:w,phiKey:T,verifierSlug:`${y}-${ge}`},ve=await ae(k),A=e.cloneNode(!0);A.setAttribute(`data-pulse`,String(y)),A.setAttribute(`data-beat`,String(b)),A.setAttribute(`data-step-index`,String(x)),A.setAttribute(`data-chakra-day`,C),A.setAttribute(`data-steps-per-beat`,String(S)),A.setAttribute(`data-kai-signature`,w),A.setAttribute(`data-phi-key`,T),A.setAttribute(`data-payload-hash`,E);let j=new XMLSerializer().serializeToString(A),M=t(j),N=typeof M.zkPoseidonHash==`string`&&M.zkPoseidonHash.trim().length>0?M.zkPoseidonHash.trim():void 0,P=M.zkProof,F=M.proofHints,I=M.zkPublicInputs;if(!N&&E&&(N=(await ce(E)).hash),N){let e=P&&typeof P==`object`?P:null,t=typeof P==`string`?P.trim().length>0:Array.isArray(P)?P.length>0:e?Object.keys(e).length>0:!1,n=typeof et==`string`&&et.trim().length>0?et.trim():void 0;if(!n&&E){let e=await ce(E);e.hash===N&&(n=e.secret)}if(!t&&!n)throw Error(`ZK secret missing for proof generation`);if(!t&&n){let e=await fe({poseidonHash:N,secret:n,proofHints:typeof F==`object`&&F?F:void 0});if(!e)throw Error(`ZK proof generation failed`);P=e.proof,F=e.proofHints,I=e.zkPublicInputs}F=typeof F!=`object`||!F?ie(N):ie(N,F)}if(N&&I){let e=It(I);if(e&&e!==N)throw Error(`Embedded ZK mismatch`)}if(N&&(!P||typeof P!=`object`))throw Error(`ZK proof missing`);if(I&&A.setAttribute(`data-zk-public-inputs`,JSON.stringify(I)),N&&(A.setAttribute(`data-zk-scheme`,`groth16-poseidon`),A.setAttribute(`data-zk-poseidon-hash`,N),P&&A.setAttribute(`data-zk-proof`,`present`)),A.getAttribute(`data-pulse`)!==String(y)||A.getAttribute(`data-kai-signature`)!==w||A.getAttribute(`data-phi-key`)!==T)throw Error(`SVG data attributes do not match proof capsule`);let ye={hashAlg:le,canon:`JCS`,proofCapsule:k,capsuleHash:ve,svgHash:await ue(j),shareUrl:D,verifierUrl:O,authorSig:null,zkPoseidonHash:N,zkProof:P,proofHints:F,zkPublicInputs:I},be=await re(de(ye)),L=null;try{await he(T),L=await me(T,be)}catch(e){console.warn(`Author signature failed; continuing without authorSig.`,e),L=null}let R={...ye,bundleHash:be,authorSig:L},Se=pe(j,R),z=`kai-voh_pulse-${y}_${ge}`,B=new xe.default;return B.file(`${z}.svg`,Se),B.file(`${z}_proof_bundle.json`,JSON.stringify(R,null,2)),_e(await B.generateAsync({type:`blob`}),`${z}_proof_bundle.zip`),null}catch(e){return`Export failed: ${e instanceof Error?e.message:String(e)}`}},Bt=()=>c(),Vt=()=>{V(!1);let e=Pe.current;Pe.current=null,e===`live`&&ft()},Ht=(0,T.useMemo)(()=>I?He(I,`harmonicDay`)||Ue(I.harmonicDay):``,[I]),Ut=(0,T.useMemo)(()=>I?W(I,`eternalMonth`)??``:``,[I]),Wt=(0,T.useMemo)(()=>{try{return ye(a(j)).line}catch{return``}},[j]),Gt=(0,T.useMemo)(()=>I?Fe(W(I,`eternalSeal`)??W(I,`seal`)??``,j,Z.beat,Z.stepIndex,St.beat,St.stepIndex,Ot||void 0):``,[I,Z.beat,Z.stepIndex,j,St,Ot]),Kt=I?G(I,`kaiPulseEternal`):void 0,qt=I?G(I,`kaiPulseToday`):void 0,Jt=I?K(I,`chakraStep`):void 0,Yt=I?K(I,`chakraBeat`):void 0,Xt=Jt?G(Jt,`stepIndex`):void 0,Zt=Jt?G(Jt,`percentIntoStep`):void 0,Qt=Yt?G(Yt,`beatIndex`):void 0,$t=Yt?G(Yt,`pulsesIntoBeat`):void 0,en=I?G(I,`weekIndex`):void 0,tn=I?W(I,`weekName`)??``:``,nn=(()=>{let e=I?K(I,`harmonicWeekProgress`):void 0;return e?G(e,`percent`):void 0})(),rn=(()=>{let e=I?K(I,`eternalMonthProgress`):void 0;return e?G(e,`percent`):void 0})(),an=(()=>{let e=I?K(I,`harmonicYearProgress`):void 0;return e?G(e,`percent`):void 0})(),on=I?G(I,`phiSpiralLevel`):void 0,sn=I?W(I,`kaiMomentSummary`)??``:``,cn=I?W(I,`compressed_summary`)??``:``;return(0,be.createPortal)((0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Ye,{}),(0,E.jsx)(`div`,{ref:at,role:`dialog`,"aria-modal":`true`,className:`sigil-modal-overlay`,onMouseDown:e=>{e.target===e.currentTarget&&e.stopPropagation()},onClick:e=>{e.target===e.currentTarget&&e.stopPropagation()},onTouchStart:e=>{e.target===e.currentTarget&&e.stopPropagation()},onKeyDown:e=>e.key===`Escape`&&e.stopPropagation(),children:(0,E.jsxs)(`div`,{className:`sigil-modal`,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),children:[(0,E.jsx)(`button`,{ref:ot,"aria-label":`Close`,className:`close-btn`,onClick:Bt,children:(0,E.jsx)(Xe,{})}),(0,E.jsx)(ge,{dateISO:O,onDateChange:ht,secondsLeft:C===`live`?dt??void 0:void 0,solarPercent:xt,eternalPercent:bt,solarColor:`#ffd600`,eternalColor:jt,eternalArkLabel:At}),C!==`live`&&(0,E.jsxs)(E.Fragment,{children:[O&&(0,E.jsxs)(`label`,{style:{marginLeft:`12px`},className:`sigil-label`,children:[(0,E.jsx)(`span`,{className:`sigil-label__text`,children:`Breath within minute`}),`\xA0`,(0,E.jsx)(`select`,{value:ve,onChange:gt,children:tt.map((e,t)=>(0,E.jsx)(`option`,{value:t+1,children:e},e))})]}),(0,E.jsx)(`button`,{className:`now-btn`,onClick:_t,children:`Now`})]}),C===`live`&&dt!==null&&(0,E.jsxs)(`p`,{className:`countdown`,children:[`next pulse in `,(0,E.jsx)(`strong`,{children:dt.toFixed(3)}),`s`]}),(0,E.jsxs)(`div`,{className:`sigil-pulse-row`,children:[(0,E.jsxs)(`label`,{className:`sigil-label sigil-pulse-label`,children:[(0,E.jsx)(`span`,{className:`sigil-label__text`,children:`☤KAI:`}),(0,E.jsx)(`input`,{className:`sigil-input sigil-pulse-input`,type:`text`,inputMode:`numeric`,value:N,onFocus:()=>{F.current=!0},onBlur:()=>{F.current=!1,P(j.toString())},onChange:pt,"aria-label":`Pulse`,placeholder:`Enter pulse`})]}),(0,E.jsx)(`span`,{className:`sigil-live-chip ${C===`live`?`is-live`:`is-static`}`,"aria-live":`polite`,children:C===`live`?`LIVE`:`STATIC`})]}),(0,E.jsxs)(`div`,{id:`sigil-export`,style:{position:`relative`,width:240,margin:`16px auto`},children:[(0,E.jsx)(u,{ref:st,pulse:Nt,beat:vt.beat,stepIndex:vt.stepIndex,stepPct:vt.stepPct,chakraDay:yt,size:240,hashMode:`deterministic`,origin:``,onReady:e=>{let t=e.hash?String(e.hash).toLowerCase():``;t&&qe(t),e.zkPoseidonSecret&&nt(e.zkPoseidonSecret)}}),(0,E.jsx)(`span`,{className:`pulse-tag`,children:lt})]}),(0,E.jsxs)(`div`,{className:`sigil-meta-block`,children:[(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:`☤KAI:`}),`\xA0`,j,(0,E.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(Tt),children:`💠`})]}),(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:`Kairos/Date:`}),`\xA0`,kt,` `,j,(0,E.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(kt),children:`💠`})]}),I&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:`Seal:`}),`\xA0`,Gt,(0,E.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(Gt),children:`💠`})]}),(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:`Day:`}),` `,Ht]}),(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:`Month:`}),` `,Ut]}),(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:`Arc:`}),` `,At]}),(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:`Kai-Turah:`}),`\xA0`,Wt,(0,E.jsx)(`button`,{className:`copy-btn`,onClick:()=>Q(Wt),children:`💠`})]})]})]}),I&&(0,E.jsxs)(`details`,{className:`rich-data`,open:rt,onToggle:e=>it(e.currentTarget.open),children:[(0,E.jsx)(`summary`,{children:`Memory`}),(0,E.jsxs)(`div`,{className:`rich-grid`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`pulseExact`}),(0,E.jsx)(`span`,{children:j.toString()})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`kaiPulseEternal`}),(0,E.jsx)(`span`,{children:(Kt??0).toLocaleString()})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`kaiPulseToday`}),(0,E.jsx)(`span`,{children:qt??0})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`chakraStepString`}),(0,E.jsx)(`span`,{children:wt??``})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`chakraStep.stepIndex`}),(0,E.jsx)(`span`,{children:Xt??0})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`chakraStep.percentIntoStep`}),(0,E.jsxs)(`span`,{children:[((Zt??0)*100).toFixed(2),`%`]})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`chakraBeat.beatIndex`}),(0,E.jsx)(`span`,{children:Qt??0})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`chakraBeat.pulsesIntoBeat`}),(0,E.jsx)(`span`,{children:$t??0})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`weekIndex`}),(0,E.jsx)(`span`,{children:en??0})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`weekName`}),(0,E.jsx)(`span`,{children:tn})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`dayOfMonth`}),(0,E.jsx)(`span`,{children:Et??0})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`eternalMonthIndex`}),(0,E.jsx)(`span`,{children:typeof Dt==`number`?Dt+1:0})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`harmonicWeekProgress.percent`}),(0,E.jsxs)(`span`,{children:[((nn??0)*100).toFixed(2),`%`]})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`eternalMonthProgress.percent`}),(0,E.jsxs)(`span`,{children:[((rn??0)*100).toFixed(2),`%`]})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`harmonicYearProgress.percent`}),(0,E.jsxs)(`span`,{children:[((an??0)*100).toFixed(2),`%`]})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`code`,{children:`phiSpiralLevel`}),(0,E.jsx)(`span`,{children:on??0})]}),(0,E.jsxs)(`div`,{className:`span-2`,children:[(0,E.jsx)(`code`,{children:`kaiMomentSummary`}),(0,E.jsx)(`span`,{children:sn})]}),(0,E.jsxs)(`div`,{className:`span-2`,children:[(0,E.jsx)(`code`,{children:`compressed_summary`}),(0,E.jsx)(`span`,{children:cn})]}),(0,E.jsxs)(`div`,{className:`span-2`,children:[(0,E.jsx)(`code`,{children:`eternalSeal`}),(0,E.jsx)(`span`,{className:`truncate`,children:Gt})]})]}),(0,E.jsx)(`div`,{className:`rich-actions`,children:(0,E.jsx)(`button`,{onClick:()=>Mt(I),children:`Remember JSON`})})]}),(0,E.jsx)(`div`,{className:`modal-bottom-spacer`,"aria-hidden":`true`}),(0,E.jsx)(`div`,{className:`mint-dock`,children:(0,E.jsxs)(`button`,{className:`mint-btn`,type:`button`,"aria-label":`Mint this moment`,title:`Mint this moment`,onClick:Rt,children:[(0,E.jsx)(`span`,{className:`mint-btn__icon`,"aria-hidden":`true`,children:z?(0,E.jsx)(`img`,{src:`/assets/seal.svg`,alt:``,loading:`eager`,decoding:`async`,onError:()=>B(!1)}):(0,E.jsx)(Ze,{})}),(0,E.jsxs)(`span`,{className:`mint-btn__text`,children:[(0,E.jsx)(`span`,{className:`mint-btn__title`,children:`MINT ΦKey`}),(0,E.jsxs)(`span`,{className:`mint-btn__sub`,children:[`☤KAI `,lt]})]})]})})]})}),(0,E.jsx)(w,{open:Ce,url:H,hash:Me,onClose:Vt,onDownloadZip:zt})]}),document.body)};export{nt as t}; \ No newline at end of file diff --git a/dist/assets/SigilModal-K2VWyDtQ.js b/dist/assets/SigilModal-K2VWyDtQ.js new file mode 100644 index 000000000..152629525 --- /dev/null +++ b/dist/assets/SigilModal-K2VWyDtQ.js @@ -0,0 +1 @@ +import{t as e}from"./SigilModal-BbDF3_i8.js";import"./SealMomentModal-f8C8Q0lx.js";import"./webauthnKAS--_8CNTOP.js";export{e as default}; \ No newline at end of file diff --git a/dist/assets/SigilModal-YxIFNWqZ.js b/dist/assets/SigilModal-YxIFNWqZ.js deleted file mode 100644 index 73f728a02..000000000 --- a/dist/assets/SigilModal-YxIFNWqZ.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./SigilModal-BPTi-9mM.js";import"./SealMomentModal-C0ZsD2Wj.js";import"./webauthnKAS-BovqgYOx.js";export{e as default}; \ No newline at end of file diff --git a/dist/assets/SigilPage-DGeAK086.js b/dist/assets/SigilPage-DGeAK086.js new file mode 100644 index 000000000..07129fa31 --- /dev/null +++ b/dist/assets/SigilPage-DGeAK086.js @@ -0,0 +1,4727 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html2canvas-CnbWGvbk.js","assets/html2canvas-0TkOoakt.js","assets/index-BoQy35uR.js","assets/index-BgUnq8XG.css","assets/svgMeta-BUk09RQ4.js","assets/svgMeta-Dbcv8eR6.js"])))=>i.map(i=>d[i]); +import{$r as e,A as t,B as n,Bn as r,Bt as i,F as a,G as o,H as s,J as c,M as l,N as u,Nn as d,Nr as f,Pn as p,Q as m,U as h,Vn as g,Vt as _,X as v,_t as y,ai as b,ci as x,ei as S,fi as C,gt as w,ht as T,ii as E,mt as D,ni as O,oi as k,pi as A,pt as j,ri as M,si as N,ti as P,ui as F,z as I,zr as ee,zt as te}from"./index-BoQy35uR.js";import{t as L}from"./html2canvas-0TkOoakt.js";import{t as R}from"./SealMomentModal-f8C8Q0lx.js";import{t as z}from"./useFastPress-CQlCk0xT.js";import{a as ne,d as B,f as V,i as re,n as ie,p as ae,r as oe,s as se,t as H,u as ce}from"./svgMeta-Dbcv8eR6.js";import{n as U,t as le}from"./useValuation-BOC9WGte.js";var W=A(L(),1),ue=A(b(),1),G=A(N(),1),K=A(_(),1);function q(e){(0,G.useEffect)(()=>{let e=`sigilheader-authbadgefx-v3`;if(document.getElementById(e))return;let t=document.createElement(`style`);t.id=e,t.textContent=` + /* Shared tokens; Chakra accent flows from page */ + .sp-header .auth-badge, + .sp-header .link-badge { + --accent: var(--crystal-accent, #00FFD0); + -webkit-tap-highlight-color: transparent; + user-select: none; + will-change: transform, box-shadow, filter, background; + } + + /* ───────────────── AUTHENTIC (metal + neon-green) ───────────────── */ + .sp-header .auth-badge { + --neon: #39FF88; /* neon green text core */ + --ink: #eafcff; + --halo: color-mix(in oklab, var(--accent) 55%, transparent); + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; + min-height: 44px; + padding: 10px 16px; + border-radius: 999px; + font-weight: 900; + letter-spacing: .02em; + line-height: 1; + cursor: pointer; + border: 1px solid rgba(255,255,255,.14); + background: + linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)), + radial-gradient(120% 160% at 50% -30%, color-mix(in oklab, var(--accent) 14%, transparent), transparent); + box-shadow: + 0 1px 0 rgba(255,255,255,.08) inset, + 0 -1px 0 rgba(0,0,0,.5) inset, + 0 10px 30px rgba(0,0,0,.35); + color: var(--ink); + text-shadow: 0 1px 0 rgba(0,0,0,.45); + overflow: hidden; + isolation: isolate; + } + + .sp-header .auth-badge.auth-badge--ok.is-live { + /* metallic body with accent tint responding to pointer --x/--y */ + background: + radial-gradient(140% 140% at var(--x, 50%) var(--y, 25%), + color-mix(in oklab, var(--accent) 12%, #0c1413) 0%, + rgba(12,20,19,.75) 45%, + rgba(12,20,19,.45) 70%, + rgba(12,20,19,.18) 100%), + linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)); + border: 1px solid color-mix(in oklab, var(--accent) 48%, rgba(255,255,255,.16)); + box-shadow: + 0 0 0 1px color-mix(in oklab, var(--accent) 36%, transparent) inset, + 0 10px 30px rgba(0,0,0,.4), + 0 0 36px color-mix(in oklab, var(--accent) 30%, transparent); + color: var(--neon); + -webkit-text-stroke: .35px color-mix(in oklab, var(--accent) 35%, black); + text-shadow: + 0 0 10px color-mix(in oklab, var(--neon) 75%, var(--accent) 25%), + 0 0 28px color-mix(in oklab, var(--accent) 40%, transparent); + animation: badge-breathe 5.236s ease-in-out infinite; + } + + .sp-header .auth-badge.auth-badge--ok.is-live::before { + content: ""; + position: absolute; + inset: 1px; + border-radius: inherit; + pointer-events: none; + background: + linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,0)) top/100% 54% no-repeat, + repeating-linear-gradient( + 115deg, + rgba(255,255,255,.06) 0 1px, + rgba(255,255,255,.02) 1px 3px + ); + mix-blend-mode: screen; + opacity: .65; + } + + .sp-header .auth-badge.auth-badge--ok.is-live::after { + content: ""; + position: absolute; + inset: -120%; + pointer-events: none; + border-radius: 999px; + background: + conic-gradient(from var(--angle, 0deg), + transparent 0deg, + color-mix(in oklab, var(--halo) 95%, white 0%) 24deg, + transparent 48deg); + filter: blur(16px) saturate(1.12) drop-shadow(0 0 10px var(--halo)); + opacity: .6; + animation: badge-orbit 5.236s linear infinite; + } + + .sp-header .auth-badge.auth-badge--checking { + color: #bfe3ff; + border-color: rgba(126,167,255,.35); + box-shadow: 0 0 22px rgba(126,167,255,.14); + } + + .sp-header .auth-badge.auth-badge--bad { + color: #ffd0d0; + border-color: rgba(255,86,86,.5); + box-shadow: + 0 0 0 1px rgba(255,86,86,.35) inset, + 0 0 28px rgba(255,86,86,.18); + text-shadow: 0 0 10px rgba(255,86,86,.35); + } + + .sp-header .auth-badge:active { transform: translateY(1px) scale(.992); filter: brightness(.98); } + + @keyframes badge-orbit { + 0% { --angle: 0deg; opacity:.45; } + 50% { --angle: 180deg; opacity:.78; } + 100% { --angle: 360deg; opacity:.45; } + } + @keyframes badge-breathe { + 0% { box-shadow: + 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent) inset, + 0 10px 30px rgba(0,0,0,.38), + 0 0 20px color-mix(in oklab, var(--accent) 18%, transparent); + transform: translateZ(0) scale(1); } + 50% { box-shadow: + 0 0 0 1px color-mix(in oklab, var(--accent) 42%, transparent) inset, + 0 12px 36px rgba(0,0,0,.42), + 0 0 40px color-mix(in oklab, var(--accent) 32%, transparent); + transform: translateZ(0) scale(1.012); } + 100% { box-shadow: + 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent) inset, + 0 10px 30px rgba(0,0,0,.38), + 0 0 20px color-mix(in oklab, var(--accent) 18%, transparent); + transform: translateZ(0) scale(1); } + } + + /* ───────────────── LINK STATUS BADGE (ACTIVE / ARCHIVED) ───────────────── */ + .sp-header .link-badge { + --accent: var(--crystal-accent, #00FFD0); + position: relative; + display: inline-flex; + align-items: center; + gap: 8px; + padding: 8px 12px; + min-height: 38px; + border-radius: 999px; + font-weight: 800; + font-size: .9rem; + overflow: hidden; + isolation: isolate; + border: 1px solid rgba(255,255,255,.18); + box-shadow: 0 10px 24px rgba(0,0,0,.35); + } + + /* ACTIVE — luminous emerald ribbon with scanning sheen */ + .sp-header .link-badge.link-badge--active { + color: #e9fff4; + background: + linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)), + radial-gradient(140% 160% at 50% -30%, color-mix(in oklab, var(--accent) 20%, #1a2a22), #0d1713); + border-color: color-mix(in oklab, var(--accent) 55%, rgba(255,255,255,.18)); + box-shadow: + 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent) inset, + 0 0 26px color-mix(in oklab, var(--accent) 32%, transparent), + 0 10px 28px rgba(0,0,0,.40); + } + .sp-header .link-badge.link-badge--active::before { + /* top gloss */ + content:""; + position:absolute; inset:1px 1px 40% 1px; + border-radius:inherit; + background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0)); + mix-blend-mode: screen; + pointer-events:none; + } + .sp-header .link-badge.link-badge--active::after { + /* scanning shimmer — synced to Kai breath (5.236s) */ + content:""; + position:absolute; inset:-20%; + background: + linear-gradient(115deg, + transparent 35%, + rgba(255,255,255,.22) 45%, + rgba(255,255,255,.06) 55%, + transparent 65%); + transform: translateX(-40%); + animation: active-sheen 5.236s ease-in-out infinite; + mix-blend-mode: screen; + pointer-events:none; + } + @keyframes active-sheen { + 0% { transform: translateX(-45%); opacity:.65; } + 50% { transform: translateX(0%); opacity:.85; } + 100% { transform: translateX(45%); opacity:.65; } + } + + /* ARCHIVED — tempered amber/iron */ + .sp-header .link-badge.link-badge--archived { + color: #ffe6c7; + background: + linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03)), + radial-gradient(120% 160% at 50% -20%, rgba(255,170,64,.22), rgba(32,24,12,.6)); + border-color: rgba(255,170,64,.42); + box-shadow: + 0 0 0 1px rgba(255,170,64,.22) inset, + 0 8px 22px rgba(0,0,0,.35); + } + + /* Press feedback for link badge */ + .sp-header .link-badge:active { transform: translateY(1px) scale(.992); } + + /* Reduced motion */ + @media (prefers-reduced-motion: reduce) { + .sp-header .auth-badge.auth-badge--ok.is-live { animation: none; } + .sp-header .auth-badge.auth-badge--ok.is-live::after { animation: none; opacity: .5; } + .sp-header .link-badge.link-badge--active::after { animation: none; opacity: .6; } + } + `,document.head.appendChild(t)},[]);let t=e.glyphAuth===`authentic`?`auth-badge--ok`:e.glyphAuth===`forged`?`auth-badge--bad`:`auth-badge--checking`,n=e.glyphAuth===`authentic`?`SOVEREIGN`:e.glyphAuth===`forged`?`HASH MISMATCH`:`VERIFYING…`,r=e=>{let t=e.currentTarget,n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top;t.style.setProperty(`--x`,`${r}px`),t.style.setProperty(`--y`,`${i}px`)},i=e.glyphAuth===`authentic`,a=e.linkStatus!==`checking`&&!e.isArchived;return(0,K.jsxs)(`header`,{className:`sp-header`,"aria-describedby":`sp-sub`,children:[(0,K.jsx)(`div`,{className:`sp-kicker`,children:`Sovereign Harmonik Kingdom`}),(0,K.jsxs)(`h1`,{className:`sp-title`,children:[`Kairos Sigil-Glyph`,(0,K.jsx)(`span`,{className:`sp-title-glow`,"aria-hidden":!0})]}),(0,K.jsx)(`p`,{id:`sp-sub`,className:`sp-sub`,children:`Inhale • Remember • Verify • Exhale`}),(0,K.jsxs)(`div`,{className:`sp-auth`,role:`status`,"aria-live":`polite`,style:{display:`flex`,gap:8,justifyContent:`center`},children:[(0,K.jsxs)(`button`,{className:`auth-badge ${t} ${i?`is-live`:``}`,title:e.localHash||``,"aria-label":n,onPointerMove:i?r:void 0,...e.copyHashPress,children:[(0,K.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,"aria-hidden":`true`,style:{marginRight:6},children:(0,K.jsx)(`path`,{fill:`currentColor`,d:`M12 2.5 4 6v6.6c0 4.3 3.2 8.5 8 8.9c4.8-.4 8-4.6 8-8.9V6l-8-3.5Zm3.7 7.2l-4.4 5c-.3.3-.7.3-1 0l-1.9-2a.75.75 0 1 1 1.1-1l1.4 1.4 3.9-4.4a.75.75 0 0 1 1 .1c.3.3.3.7 0 1Z`})}),n]}),e.linkStatus!==`checking`&&(0,K.jsxs)(`span`,{className:`link-badge ${e.isArchived?`link-badge--archived`:`link-badge--active`}`,"aria-label":`Link status: ${e.isArchived?`Archived`:`Active`}`,title:e.isArchived?`Transfer burned`:`Transfer link is active`,children:[a?(0,K.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,K.jsx)(`path`,{fill:`currentColor`,d:`M9.6 13.8a4 4 0 0 0 0-5.6l-1.1-1.1a4 4 0 0 0-5.6 5.6l1.1 1.1a1 1 0 0 0 1.4-1.4L4.3 11.3a2 2 0 0 1 2.8-2.8l1.1 1.1a2 2 0 0 1 0 2.8a1 1 0 1 0 1.4 1.4ZM20.1 7.3l-1.1-1.1a4 4 0 0 0-5.6 0L11.6 8a4 4 0 0 0 0 5.6l1.1 1.1a1 1 0 0 0 1.4-1.4L13 12.2a2 2 0 0 1 0-2.8l1.8-1.8a2 2 0 0 1 2.8 0l1.1 1.1a1 1 0 1 0 1.4-1.4Z`})}):(0,K.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,K.jsx)(`path`,{fill:`currentColor`,d:`M12 1.75a4.75 4.75 0 0 1 4.75 4.75v2h.75A2.5 2.5 0 0 1 20 11v7.5A2.5 2.5 0 0 1 17.5 21h-11A2.5 2.5 0 0 1 4 18.5V11a2.5 2.5 0 0 1 2.5-2.5h.75v-2A4.75 4.75 0 0 1 12 1.75Zm0 1.5A3.25 3.25 0 0 0 8.75 6.5v2h6.5v-2A3.25 3.25 0 0 0 12 3.25Z`})}),e.isArchived?`RETIRED`:`IMMANENT`]})]})]})}function de({frameRef:e,children:t}){return(0,K.jsxs)(`div`,{ref:e,className:`sp-frame`,id:`sigil-stage`,children:[t,(0,K.jsx)(`div`,{className:`sp-rune sp-rune--tl`,"aria-hidden":`true`}),(0,K.jsx)(`div`,{className:`sp-rune sp-rune--tr`,"aria-hidden":`true`}),(0,K.jsx)(`div`,{className:`sp-rune sp-rune--bl`,"aria-hidden":`true`}),(0,K.jsx)(`div`,{className:`sp-rune sp-rune--br`,"aria-hidden":`true`})]})}const fe={Root:`Root`,Sacral:`Sacral`,"Solar Plexus":`Solar Plexus`,Heart:`Heart`,Throat:`Throat`,"Third Eye":`Third Eye`,Crown:`Krown`};function pe(e){return fe[e]}var me=17491.270421,he=36,ge=11,_e=1e6,ve=Math.round(me*_e),ye=6,be=7,xe=8,Se=ye*be,Ce=Se*xe,we=(1+Math.sqrt(5))/2;function J(){return Math.round(me/he*_e)}function Te(e){return(Math.floor(e*_e)%ve+ve)%ve}function Ee(e,t){let n=J(),r=ge*_e,i=Te(e)%n,a=Math.floor(i/r);return Math.min(Math.max(a,0),Math.max(t-1,0))}function De(e){let t=J(),n=ge*_e,r=Te(e)%t%n;return Math.max(0,Math.min(1,r/n))}function Oe(e){let t=BigInt(Math.trunc(e))*1000000n/BigInt(ve),n=Number(t),r=Number((t%BigInt(Ce)+BigInt(Ce))%BigInt(Ce)),i=Math.floor(n/Ce),a=Math.floor(r/Se),o=r%Se+1,s=Math.floor(r/ye),c=Math.floor(o/ye),l=r%ye+1;return{absDayIdx:n+1,yearIdx:i,monthIdx:a,weekOfYear:s,weekOfMonth:c,dayInMonth:o,dayOfWeek:l}}var ke=e=>String(e).padStart(2,`0`);function Ae({absUrl:t,payload:n,chakraDay:r,steps:i,isArchived:a,isFutureSealed:o,pulsesLeft:s,opensInPulses:c,nextPulseSeconds:l,hash:u,shortHash:d,remembered:f,copyLinkPress:p,sharePress:m,stage:h}){let g=P(),_=z(e=>{e.preventDefault(),g(`/keystream`)}),v=n?Ee(n.pulse,i):0,y=n?De(n.pulse):0,b=n?Oe(n.pulse):null,x=n?Math.floor(Math.log(Math.max(n.pulse,1))/Math.log(we)):0,S=pe(n?n.chakraDay:r);return(0,K.jsxs)(`div`,{className:`sp-card`,role:`region`,"aria-label":`Sigil details`,children:[(0,K.jsxs)(`div`,{className:`sp-status`,children:[(0,K.jsxs)(`div`,{className:`sp-hash mono`,title:u||``,children:[(0,K.jsx)(`span`,{className:`sp-hash-label`,children:`Route Hash:`}),(0,K.jsx)(`span`,{className:`sp-hash-short`,children:d})]}),(0,K.jsxs)(`div`,{className:`sp-actions`,children:[(0,K.jsx)(`button`,{className:`btn-ghost`,...p,"aria-label":`Copy link`,"aria-pressed":f,"data-remembered":f||void 0,children:f?`Remembered`:`Remember`}),(0,K.jsx)(`button`,{className:`btn-ghost`,...m,"aria-label":`Share`,children:`Share`}),(0,K.jsx)(e,{className:`btn-ghost`,to:`/keystream`,role:`button`,..._,children:`Keystream`})]})]}),h,n&&(0,K.jsx)(`div`,{className:`sp-epulse`,children:(0,K.jsx)(`div`,{className:`epulse-card`,children:(0,K.jsxs)(`div`,{className:`epulse-head`,children:[(0,K.jsx)(`div`,{className:`epulse-label`,children:`Kai ☤`}),(0,K.jsx)(`div`,{className:`epulse-value`,children:n.pulse.toLocaleString()})]})})}),(0,K.jsxs)(`div`,{className:`sp-meta`,children:[(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`URL`}),(0,K.jsx)(`code`,{className:`mono mono-wrap`,children:t})]}),n&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Day:`}),(0,K.jsx)(`span`,{children:S})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Beat:`}),(0,K.jsxs)(`span`,{children:[ke(n.beat),` / 36`]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Step:`}),(0,K.jsxs)(`span`,{children:[ke(v),` / `,i]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`% to Next Step:`}),(0,K.jsxs)(`span`,{children:[(y*100).toFixed(1),`%`]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Φ Spiral:`}),(0,K.jsxs)(`span`,{children:[`PS`,x]})]}),b&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Year:`}),(0,K.jsxs)(`span`,{children:[`Y`,String(b.yearIdx)]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Month:`}),(0,K.jsxs)(`span`,{children:[ke(b.monthIdx+1),` / `,ke(xe)]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Week (Year):`}),(0,K.jsxs)(`span`,{children:[ke(b.weekOfYear+1),` /`,` `,ke(Ce/ye)]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Week (Month):`}),(0,K.jsxs)(`span`,{children:[ke(b.weekOfMonth+1),` / `,ke(be)]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Day (Week):`}),(0,K.jsxs)(`span`,{children:[ke(b.dayOfWeek),` / `,ke(ye)]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Day (Month):`}),(0,K.jsxs)(`span`,{children:[ke(b.dayInMonth),` / `,ke(Se)]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Day (Abs):`}),(0,K.jsx)(`span`,{children:b.absDayIdx.toLocaleString()})]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Inhale Step:`}),(0,K.jsx)(`span`,{children:a?`Arkived (transfer burned)`:o?`Sealed (pre-moment)`:s==null?`—`:s===0?`Sealed`:`${s} Breath${s===1?``:`s`} left`})]}),o&&c!==null&&c>0&&(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Opens In:`}),(0,K.jsxs)(`span`,{children:[c,` Breath`,c===1?``:`s`]})]}),!o&&!a&&s!==null&&s>0&&(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Next Breath:`}),(0,K.jsxs)(`span`,{children:[l,`s`]})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Seal:`}),(0,K.jsx)(`span`,{children:`Kai-Klok`})]})]})]})]})}function je({hasPayload:e,showError:t,expired:n,exporting:r,isFutureSealed:i,isArchived:a,claimPress:o,stargatePress:s,posterPress:c,posterExporting:l}){return(0,K.jsxs)(`div`,{className:`sp-cta`,children:[(0,K.jsx)(`button`,{className:`btn-primary`,...o,disabled:!e||t||n||r||i||a,title:a?`Arkived link — kannot klaim from here`:n?`Breath Sealed`:i?`Opens after the moment—klaim unloks then`:`Klaim ZIP (SVG+PNG w/ QR, no pulse bar)`,children:a?`Arkived (Burned)`:n?`Sealed`:i?`Sealed (Pre-Moment)`:r?`Sealing…`:`Inhale ΦKey Seal`}),e&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{className:`btn-ghost`,...s,children:`Stargate`}),(0,K.jsx)(`button`,{className:`btn-ghost`,...c,disabled:l,"aria-busy":l,"data-busy":l||void 0,title:l?`Exhaling…`:`Save a shareable poster (QR + sleek Pulse Bar)`,children:l?`Exhaling…`:`Sigil-Stamp`})]})]})}var Me=17491.270421,Ne=36,Pe=11,Fe=1e6,Ie=Math.round(Me*Fe),Le=6,Re=7,ze=8,Be=Le*Re,Ve=Be*ze,He=(1+Math.sqrt(5))/2;function Ue(){return Math.round(Me/Ne*Fe)}function We(e){return(Math.floor(e*Fe)%Ie+Ie)%Ie}function Ge(e){let t=Ue(),n=We(e),r=Math.floor(n/t);return Math.min(Math.max(r,0),Ne-1)}function Ke(e,t){let n=Ue(),r=Pe*Fe,i=We(e)%n,a=Math.floor(i/r);return Math.min(Math.max(a,0),Math.max(t-1,0))}function qe(e){let t=Ue(),n=Pe*Fe,r=We(e)%t%n;return Math.max(0,Math.min(1,r/n))}function Je(e){let t=Ue(),n=We(e)%t;return Math.floor(n/Fe)}function Ye(e){let t=BigInt(Math.floor(e*Fe))/BigInt(Ie),n=Number(t)+1,r=Number((t%BigInt(Ve)+BigInt(Ve))%BigInt(Ve)),i=Math.floor(Number(t)/Ve),a=Math.floor(r/Be),o=r%Be+1;return{absDayIdx:n,yearIdx:i,monthIdx:a,weekOfYear:Math.floor(r/Le),weekOfMonth:Math.floor((o-1)/Le),dayInMonth:o,dayOfWeek:r%Le+1}}var Xe=e=>String(e).padStart(2,`0`);function Ze(e){let{e:t,beat0:n,step0:r,stepPct:i,pulsesIntoBeat:a}=e,o=Ye(t.pulse),s=`Kai:${n}:${Xe(r)}`,c=`Y${o.yearIdx} M${Xe(o.monthIdx+1)} W(y)${Xe(o.weekOfYear+1)} W(m)${Xe(o.weekOfMonth+1)} D(w)${o.dayOfWeek}/${Le} D(m)${Xe(o.dayInMonth)}/${Be} D(abs)${o.absDayIdx}`,l=`Step%:${(i*100).toFixed(6)} PulsesInBeat:${a}`,u=Math.floor(Math.log(Math.max(t.pulse,1))/Math.log(He));return[`Action:${t.action}`,`Owner:${t.ownerPhiKey}`,`Pulse:${t.pulse}`,s,c,l,`PhiSpiral:${u}`,t.kaiSignature?`KaiSig:${t.kaiSignature}`:null,t.attachmentName?`Attachment:${t.attachmentName}`:null,t.atPulse==null?null:`AtPulse:${t.atPulse}`].filter(Boolean).join(` • `)}var Qe=()=>globalThis.crypto?.subtle;async function $e(e){let t=new TextEncoder().encode(e),n=Qe();if(n)try{let e=await n.digest(`SHA-256`,t);return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch{}let r=2166136261;for(let e=0;e>>0).toString(16).padStart(8,`0`)}function et(e){let[t,n]=(0,G.useState)(``);return(0,G.useEffect)(()=>{let t=!0;return $e(e).then(e=>t&&n(e)),()=>{t=!1}},[e]),t}var tt=()=>(0,K.jsx)(`style`,{children:` + .copy-claim { + --accent: var(--crystal-accent, #7FFFE1); + --ink: #EAFBFF; + --glassA: rgba(255,255,255,.14); + --glassB: rgba(255,255,255,.04); + --edge: rgba(255,255,255,.22); + --shadow: 0 10px 28px rgba(0,0,0,.28); + position: relative; + display: inline-flex; + align-items: center; + gap: 10px; + padding: 10px 14px; + border: 1px solid var(--edge); + border-radius: 16px; + cursor: pointer; + color: var(--ink); + background: + linear-gradient(180deg, var(--glassA), var(--glassB)); + backdrop-filter: blur(12px) saturate(160%); + -webkit-backdrop-filter: blur(12px) saturate(160%); + box-shadow: var(--shadow), inset 0 0 0 0.5px rgba(255,255,255,.18); + transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease; + will-change: transform, box-shadow; + } + .copy-claim:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(0,0,0,.3); border-color: rgba(255,255,255,.3); } + .copy-claim:active { transform: translateY(0); } + + /* Subtle moving sheen */ + .copy-claim::before { + content:""; + position:absolute; inset:0; + border-radius: inherit; + background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.22), transparent 60%); + transform: translateX(-140%); + mix-blend-mode: screen; + transition: transform .9s ease; + pointer-events: none; + } + .copy-claim:hover::before { transform: translateX(140%); } + + /* Minimal success toast */ + .copy-toast { + position: absolute; + left: 50%; top: -10px; + transform: translate(-50%, -100%) scale(.96); + opacity: 0; + pointer-events: none; + color: var(--accent); + background: rgba(255,255,255,.08); + border: 1px solid rgba(255,255,255,.22); + padding: 6px 10px; + border-radius: 10px; + box-shadow: 0 6px 18px rgba(0,0,0,.22), inset 0 0 12px rgba(127,255,225,.08); + font-size: 12px; + letter-spacing: .3px; + backdrop-filter: blur(10px) saturate(150%); + -webkit-backdrop-filter: blur(10px) saturate(150%); + transition: opacity .18s ease, transform .18s ease; + white-space: nowrap; + } + .copy-claim[data-copied="true"] .copy-toast { + opacity: 1; + transform: translate(-50%, -110%) scale(1); + } + + /* Subtle ambient glow on success (no gaudy rings) */ + .copy-claim[data-copied="true"] { + box-shadow: + 0 12px 34px rgba(0,0,0,.3), + 0 0 0 1px rgba(255,255,255,.25), + 0 0 40px color-mix(in srgb, var(--accent) 22%, transparent); + } + + /* Icon + label */ + .crys__icon{ width: 16px; height: 16px; opacity:.95; } + .crys__label{ font-weight:600; letter-spacing:.2px; } + + .copy-claim[disabled], + .copy-claim[data-disabled="true"] { opacity: .55; cursor: not-allowed; } + @media (prefers-reduced-motion: reduce) { + .copy-claim, .copy-toast { transition: none; } + } + `});function nt({seal:e}){let t=et(e),n=(0,G.useMemo)(()=>t?`${e} • ProvenanseHash:${t}`:``,[e,t]),[r,i]=(0,G.useState)(!1),a=async()=>{if(n)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(n);else{let e=document.createElement(`textarea`);e.value=n,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e)}i(!0),window.setTimeout(()=>i(!1),1200)}catch{}},o=!t;return(0,K.jsxs)(`button`,{type:`button`,className:`copy-claim`,onClick:a,"data-copied":r?`true`:`false`,"data-disabled":o?`true`:`false`,"aria-live":`polite`,"aria-busy":o?`true`:`false`,"aria-label":o?`Preparing claim…`:`Copy Provenanse Seal`,title:o?`Preparing claim…`:`Copy Provenanse Seal`,disabled:o,children:[(0,K.jsxs)(`svg`,{className:`crys__icon`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,K.jsx)(`path`,{d:`M9 12.5l2 2 4-4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,K.jsx)(`span`,{className:`crys__label`,children:o?`Preparing…`:`Copy Provenanse Seal`}),(0,K.jsx)(`span`,{className:`copy-toast`,role:`status`,"aria-live":`polite`,children:`✓Copied`})]})}function rt({entries:e,steps:t}){let n=Array.isArray(e)?e:[],r=Number.isFinite(t)&&t>0?t:44,i=(0,G.useMemo)(()=>n.map(e=>{let t=Ge(e.pulse),n=Ke(e.pulse,r),i=qe(e.pulse),a=Je(e.pulse);return{e,beat0:t,step0:n,stepPct:i,pulsesInBeat:a,k:Ye(e.pulse),phiLevel:Math.floor(Math.log(Math.max(e.pulse,1))/Math.log(He)),seal:Ze({e,stepsPerBeat:r,beat0:t,step0:n,stepPct:i,pulsesIntoBeat:a})}}),[n,r]);return(0,K.jsxs)(`div`,{className:`sp-provenance`,role:`region`,"aria-label":`Provenance`,children:[(0,K.jsx)(tt,{}),(0,K.jsx)(`h3`,{className:`sp-prov-title`,children:`Provenanse`}),(0,K.jsxs)(`ol`,{className:`sp-prov-list`,children:[i.length===0&&(0,K.jsx)(`li`,{className:`sp-prov-empty`,"aria-live":`polite`,children:`No provenance yet.`}),i.map((e,t)=>{let{e:n,beat0:r,step0:i,stepPct:a,pulsesInBeat:o,k:s,phiLevel:c,seal:l}=e;return(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Action`}),(0,K.jsx)(`span`,{children:n.action})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Owner`}),(0,K.jsx)(`span`,{className:`mono mono-wrap`,children:n.ownerPhiKey})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai☤:`}),(0,K.jsx)(`span`,{children:n.pulse.toLocaleString()})]}),n.kaiSignature&&(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`KaiSig`}),(0,K.jsx)(`span`,{className:`mono mono-wrap`,children:n.kaiSignature})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kairos`}),(0,K.jsxs)(`span`,{children:[r,`:`,Xe(i)]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`% into Step`}),(0,K.jsxs)(`span`,{children:[(a*100).toFixed(6),`%`]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Pulses in Beat`}),(0,K.jsx)(`span`,{children:o.toLocaleString()})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai Year`}),(0,K.jsxs)(`span`,{children:[`Y`,String(s.yearIdx)]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai Month`}),(0,K.jsxs)(`span`,{children:[Xe(s.monthIdx+1),` / `,Xe(ze)]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai Week (Year)`}),(0,K.jsxs)(`span`,{children:[Xe(s.weekOfYear+1),` / `,Xe(Ve/Le)]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai Week (Month)`}),(0,K.jsxs)(`span`,{children:[Xe(s.weekOfMonth+1),` / `,Xe(Re)]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai Day (Week)`}),(0,K.jsxs)(`span`,{children:[Xe(s.dayOfWeek),` / `,Xe(Le)]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai Day (Month)`}),(0,K.jsxs)(`span`,{children:[Xe(s.dayInMonth),` / `,Xe(Be)]})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Kai Day (Abs)`}),(0,K.jsx)(`span`,{children:s.absDayIdx.toLocaleString()})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Φ-Spiral Level`}),(0,K.jsx)(`span`,{children:c})]}),n.attachmentName&&(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Attachment`}),(0,K.jsx)(`span`,{className:`mono mono-wrap`,children:n.attachmentName})]}),n.atPulse!=null&&(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`When`}),(0,K.jsx)(`span`,{className:`mono mono-wrap`,children:typeof n.atPulse==`number`?n.atPulse.toLocaleString():String(n.atPulse)})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Seal`}),(0,K.jsx)(`span`,{className:`mono mono-wrap`,children:l})]}),(0,K.jsxs)(`div`,{className:`sp-prov-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Stamp`}),(0,K.jsx)(nt,{seal:l})]})]},t)})]})]})}var it=17491.270421,at=36,ot=11,st=1e6;function ct(){return Math.round(it/at*st)}function lt(e){return Math.round((e%it+it)%it*st)}function ut(e){let t=ct(),n=lt(e),r=Math.floor(n/t);return Math.min(Math.max(r,0),at-1)}function dt(e,t){let n=ct(),r=ot*st,i=lt(e)%n,a=Math.floor(i/r);return Math.min(Math.max(a,0),Math.max(t-1,0))}function ft(e){return e.isFile===!0}function pt(e){return e.isDirectory===!0}function mt(e){if(!Number.isFinite(e))return`?`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=0,r=e;for(;r>=1024&&n0?1:0)} ${t[n]}`}async function ht(e){let t=Array.from(e.items||[]);if(!t.some(e=>typeof e.webkitGetAsEntry==`function`))return Array.from(e.files||[]);let n=t.map(e=>e.webkitGetAsEntry?.()??null).filter(e=>e!==null),r=[];async function i(e){if(ft(e))await new Promise(t=>{e.file(e=>{r.push(e),t()},()=>{t()})});else if(pt(e)){let t=e.createReader();await new Promise(e=>{let n=()=>{t.readEntries(async t=>{if(!t.length)return e();for(let e of t)await i(e);n()},()=>{e()})};n()})}}for(let e of n)await i(e);return r.length?r:Array.from(e.files||[])}function gt(e,t){let n=e;return{name:typeof n.name==`string`&&n.name||typeof n.filename==`string`&&n.filename||`file-${t+1}`,mime:typeof n.mime==`string`&&n.mime||typeof n.type==`string`&&n.type||``,sizeText:typeof n.size==`number`?mt(n.size):``}}function _t({isArchived:e,ownerVerified:t,onAttachFile:n,attachment:r,payloadAttachment:i,attachments:a,payloadAttachments:o,derivedOwnerPhiKey:s,derivedKaiSig:c,expiryUnit:l,setExpiryUnit:u,expiryAmount:d,setExpiryAmount:f,onSealPress:p,payload:m,localHash:h,isFutureSealed:g}){(0,G.useEffect)(()=>{let e=`sovereign-controls-overlay-css`;if(document.getElementById(e))return;let t=document.createElement(`style`);t.id=e,t.textContent=` + /* Overlay input sits above the visible CTA to maximize iOS reliability */ + .file-cta-wrap{ position:relative; display:inline-flex; align-items:stretch; } + .file-cta-wrap > .file-cta{ position:relative; z-index:1; } + + .file-cta-wrap > .file-input-overlay[type="file"]{ + display:block !important; + position:absolute !important; + inset:0 !important; + width:100% !important; height:100% !important; + opacity:0.001 !important; + z-index:2147483647 !important; + pointer-events:auto !important; + -webkit-tap-highlight-color:transparent !important; + -webkit-user-select:none !important; + user-select:none !important; + touch-action:manipulation !important; + visibility:visible !important; + border:0; background:transparent; + appearance:none; -webkit-appearance:none; + } + .file-cta-wrap[data-disabled="true"] > .file-input-overlay[type="file"]{ + pointer-events:none !important; + } + + /* Dropzone */ + .dropzone{ + border:1px dashed rgba(255,255,255,0.18); + border-radius:12px; + padding:12px; + transition:border-color .12s ease, background .12s ease; + background: color-mix(in oklab, var(--panel-bg, rgba(255,255,255,.02)) 100%, transparent); + } + .dropzone[data-over="true"]{ + border-color: color-mix(in oklab, var(--crystal-accent, #00ffd0) 65%, rgba(255,255,255,0.4)); + background: color-mix(in oklab, var(--crystal-accent, #00ffd0) 10%, transparent); + } + + /* Tap feedback */ + .pressable{ transition: transform .06s ease, filter .06s ease; } + .pressable[data-pressed="true"]{ transform: translateY(1px) scale(0.995); filter: brightness(0.98); } + + /* Mobile-friendly sizing */ + .btn-primary, .btn-ghost, select, input[type="text"]{ + min-height: 48px; font-size: 16px; + } + .btn-primary--xl{ min-height: 56px; font-size: 17px; font-weight: 800; } + + /* Expiry grid */ + .expiry-grid{ + display:grid; + grid-template-columns: auto 1fr auto auto; + gap: 8px; + align-items:center; + } + @media (max-width: 480px){ + .expiry-grid{ gap: 6px; } + } + + /* Upload list */ + .upload-list { display: grid; gap: 8px; margin-top: 8px; } + .upload-item { + display:grid; grid-template-columns: 1fr auto; gap:8px; align-items:center; + padding:8px 10px; border:1px solid rgba(255,255,255,.10); border-radius:10px; + background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); + } + .upload-meta { display:flex; gap:8px; align-items:center; min-width: 0; } + .upload-name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } + .upload-size { opacity:.85; font-variant-numeric: tabular-nums; } + .upload-status { display:flex; align-items:center; gap:6px; white-space:nowrap; } + .upload-status .spinner { + width:16px; height:16px; border-radius:50%; + border:2px solid rgba(255,255,255,.25); + border-top-color: var(--crystal-accent, #00ffd0); + animation: ovm-spin .7s linear infinite; + } + .upload-status .ok { + width:16px; height:16px; border-radius:50%; display:grid; place-items:center; + background: color-mix(in oklab, var(--crystal-accent, #00ffd0) 65%, transparent); + box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset; + } + .upload-status .err { + width:16px; height:16px; border-radius:50%; display:grid; place-items:center; + background: #c62828; box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset; + } + .progress { + grid-column: 1 / -1; height:4px; border-radius:3px; overflow:hidden; + background: rgba(255,255,255,.08); + } + .progress > i { + display:block; height:100%; + background: linear-gradient(90deg, rgba(255,255,255,.35), var(--crystal-accent, #00ffd0)); + width: 40%; + animation: indet 1.2s ease-in-out infinite; + } + @keyframes indet { + 0% { transform: translateX(-60%); } + 50% { transform: translateX(40%); } + 100% { transform: translateX(140%); } + } + @keyframes ovm-spin { to { transform: rotate(360deg); } } + + /* Meta rows wrap nicely on small screens */ + .sp-meta-row{ + display:flex; gap:10px; align-items:center; flex-wrap:wrap; + } + .mono-wrap{ + overflow-wrap:anywhere; word-break:break-word; + } + + /* Section padding respects safe-area */ + .sp-sovereign--bottom{ + padding-bottom: max(16px, env(safe-area-inset-bottom)); + } + `,document.head.appendChild(t)},[]);let _=(0,G.useRef)(null),[v,y]=(0,G.useState)(null),[b,x]=(0,G.useState)(!1);(0,G.useEffect)(()=>{let e=_.current;e&&(e.multiple=!0,`webkitdirectory`in e&&(e.webkitdirectory=!0),`directory`in e&&(e.directory=!0),e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``))},[]);let[S,C]=(0,G.useState)([]),w=(0,G.useMemo)(()=>!m||!h||g||e,[m,h,g,e]),T=(0,G.useMemo)(()=>e?`Archived link — a new transfer link has already been issued`:h?g?`Opens after the moment—claim unlocks then`:`Seal`:`Glyph hash not ready yet`,[e,g,h]),E=(e,t)=>{if(!t)return;let n=t.getBoundingClientRect(),r=(`clientX`in e?e.clientX:0)-n.left,i=(`clientY`in e?e.clientY:0)-n.top;t.style.setProperty(`--x`,`${r}px`),t.style.setProperty(`--y`,`${i}px`)};function D(e){let t=e.map((e,t)=>({id:`${Date.now()}-${t}-${e.name}-${e.size}`,name:e.name,size:e.size,type:e.type||`application/octet-stream`,status:`queued`}));C(e=>[...e,...t]),t.forEach((t,n)=>{let r=e[n];O(t.id,r)})}async function O(e,t){C(t=>t.map(t=>t.id===e?{...t,status:`uploading`}:t));try{let r=n(t);r&&typeof r.then==`function`&&await r,C(t=>t.map(t=>t.id===e?{...t,status:`done`}:t))}catch(t){let n=t instanceof Error?t.message:String(t);C(t=>t.map(t=>t.id===e?{...t,status:`error`,error:n}:t))}}async function k(e){!e||e.length===0||D(Array.from(e))}async function A(e){e.preventDefault(),x(!1);let t=await ht(e.dataTransfer);t.length&&D(t)}let j=(0,G.useMemo)(()=>{let e=[];return Array.isArray(a)&&e.push(...a),r&&e.push(r),e},[a,r]),M=(0,G.useMemo)(()=>{let e=[];return Array.isArray(o)&&e.push(...o),i&&e.push(i),e},[o,i]);return(0,G.useMemo)(()=>{let e=Math.max(1,m?.stepsPerBeat??44),t=m?.pulse??0;return{derivedBeatIdx:ut(t),derivedStepIdx:dt(t,e),derivedStepsPerBeat:e}},[m?.pulse,m?.stepsPerBeat]),(0,K.jsxs)(`section`,{className:`sp-sovereign sp-sovereign--bottom`,"aria-label":`Sovereign Controls`,children:[t&&(0,K.jsxs)(`div`,{className:`sp-panel`,role:`group`,"aria-labelledby":`attach-title`,children:[(0,K.jsx)(`h3`,{id:`attach-title`,children:`Attach Files / Folders`}),(0,K.jsxs)(`div`,{className:`sp-field`,children:[(0,K.jsx)(`label`,{className:`lbl`,children:`Attachments`}),(0,K.jsxs)(`div`,{className:`dropzone`,"data-over":b||void 0,onDrop:A,onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:()=>x(!0),onDragLeave:()=>x(!1),children:[(0,K.jsxs)(`div`,{className:`file-cta-wrap`,"data-disabled":e?`true`:void 0,onClick:e=>{y(`attach`),E(e,e.currentTarget)},children:[(0,K.jsx)(`button`,{type:`button`,className:`btn-primary btn-primary--xl file-cta pressable`,"data-pressed":v===`attach`,title:e?`Archived — cannot attach`:`Inhale files or a folder`,tabIndex:-1,"aria-disabled":e?`true`:void 0,children:`Inhale Files / Folder`}),(0,K.jsx)(`input`,{ref:_,id:`attach-file-overlay`,className:`file-input-overlay`,type:`file`,disabled:e,multiple:!0,onChange:e=>{k(e.currentTarget.files),e.currentTarget.value=``}})]}),S.length>0&&(0,K.jsx)(`div`,{className:`upload-list`,role:`status`,"aria-live":`polite`,children:S.map(e=>(0,K.jsxs)(`div`,{className:`upload-item`,children:[(0,K.jsxs)(`div`,{className:`upload-meta`,children:[(0,K.jsx)(`div`,{className:`upload-name`,title:e.name,children:e.name}),(0,K.jsx)(`div`,{className:`upload-size`,children:mt(e.size)})]}),(0,K.jsxs)(`div`,{className:`upload-status`,children:[e.status===`uploading`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`spinner`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{children:`Inhaling…`})]}),e.status===`queued`&&(0,K.jsx)(`span`,{children:`Queued…`}),e.status===`done`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`ok`,"aria-hidden":`true`,children:(0,K.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,children:(0,K.jsx)(`path`,{fill:`currentColor`,d:`M9.5 16.17L5.33 12l-1.41 1.41l5.58 5.58L20.5 7.99L19.09 6.58z`})})}),(0,K.jsx)(`span`,{children:`Inhaled`})]}),e.status===`error`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`err`,"aria-hidden":`true`,children:`!`}),(0,K.jsx)(`span`,{children:`Failed`})]})]}),(e.status===`uploading`||e.status===`queued`)&&(0,K.jsx)(`div`,{className:`progress`,"aria-hidden":`true`,children:(0,K.jsx)(`i`,{})}),e.status===`error`&&e.error&&(0,K.jsx)(`div`,{className:`mono-wrap`,style:{gridColumn:`1 / -1`,opacity:.9},children:e.error})]},e.id))})]})]}),j.length>0&&(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Attached`}),(0,K.jsx)(`span`,{className:`mono mono-wrap`,children:j.map((e,t)=>{let n=gt(e,t);return`${n.name}${n.mime?` (${n.mime}`:``}${n.sizeText?`${n.mime?`, `:` (`}${n.sizeText}`:``}${n.mime||n.sizeText?`)`:``}`}).join(`; `)})]}),M.length>0&&j.length===0&&(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Embedded`}),(0,K.jsx)(`span`,{className:`mono mono-wrap`,children:M.map((e,t)=>{let n=gt(e,t);return`${n.name}${n.mime?` (${n.mime}`:``}${n.sizeText?`${n.mime?`, `:` (`}${n.sizeText}`:``}${n.mime||n.sizeText?`)`:``}`}).join(`; `)})]})]}),t&&(0,K.jsxs)(`div`,{className:`sp-panel`,role:`group`,"aria-labelledby":`own-exp-title`,children:[(0,K.jsx)(`h3`,{id:`own-exp-title`,children:`Add Derivative Stewardship & Expiry`}),(0,K.jsxs)(`div`,{className:`sp-field`,children:[(0,K.jsx)(`label`,{className:`lbl`,children:`New Owner PhiKey`}),(0,K.jsx)(`output`,{className:`mono mono-wrap`,"aria-live":`polite`,title:s||`Will be derived at seal`,children:s||`— will be derived at seal —`})]}),(0,K.jsxs)(`div`,{className:`sp-field`,children:[(0,K.jsx)(`label`,{className:`lbl`,children:`☤Kai Signature`}),(0,K.jsx)(`output`,{className:`mono mono-wrap`,"aria-live":`polite`,title:c||`Will be derived at seal`,children:c||`— will be derived at seal —`})]}),(0,K.jsxs)(`div`,{className:`sp-field`,children:[(0,K.jsx)(`label`,{className:`lbl`,htmlFor:`expiryAmount`,children:`Expiry`}),(0,K.jsxs)(`div`,{className:`expiry-grid`,children:[(0,K.jsx)(`button`,{type:`button`,className:`btn-ghost pressable`,"aria-label":`Decrease amount`,"data-pressed":v===`decrease`,onClick:()=>{y(`decrease`),f(Math.max(0,Math.floor((d??0)-1)))},children:`−`}),(0,K.jsx)(`input`,{id:`expiryAmount`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:String(d??0),onChange:e=>{let t=e.currentTarget.value.replace(/[^\d]/g,``),n=t===``?0:parseInt(t,10);f(Number.isFinite(n)?Math.max(0,n):0)},onBlur:e=>{let t=e.currentTarget.value.replace(/[^\d]/g,``),n=t===``?0:parseInt(t,10);f(Number.isFinite(n)?Math.max(0,n):0)},enterKeyHint:`done`,"aria-describedby":`expiry-help`,style:{minHeight:48,fontSize:16}}),(0,K.jsx)(`button`,{type:`button`,className:`btn-ghost pressable`,"aria-label":`Increase amount`,"data-pressed":v===`increase`,onClick:()=>{y(`increase`),f(Math.max(0,Math.floor((d??0)+1)))},children:`+`}),(0,K.jsxs)(`select`,{"aria-label":`Expiry Unit`,value:l,onChange:e=>u(e.target.value),style:{minHeight:48},children:[(0,K.jsx)(`option`,{value:`breaths`,children:`breaths (pulses)`}),(0,K.jsx)(`option`,{value:`steps`,children:`steps`})]})]}),(0,K.jsxs)(`small`,{id:`expiry-help`,className:`sp-fine`,children:[`Number of `,l===`steps`?`steps`:`breaths`,` before eternal seal.`]})]}),(0,K.jsx)(`div`,{className:`sp-actions`,children:(0,K.jsx)(`button`,{type:`button`,className:`btn-primary pressable`,"data-pressed":v===`seal`,disabled:w,"aria-disabled":w,title:T,onPointerUp:p?.onPointerUp,onClick:e=>{y(`seal`),p?.onClick?.(e)},children:`Seal`})})]})]})}var vt={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},yt={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},bt=`attached`,xt=`detached`,St=1e3,Ct=1001,wt=1002,Tt=1003,Et=1004,Dt=1004,Ot=1005,kt=1005,At=1006,jt=1007,Mt=1007,Nt=1008,Pt=1008,Ft=1009,It=1010,Lt=1011,Rt=1012,zt=1013,Bt=1014,Vt=1015,Ht=1016,Ut=1017,Wt=1018,Gt=1020,Kt=35902,qt=35899,Jt=1021,Yt=1022,Xt=1023,Zt=1026,Qt=1027,$t=1028,en=1029,tn=1030,nn=1031,rn=1032,an=1033,on=33776,sn=33777,cn=33778,ln=33779,un=35840,dn=35841,fn=35842,pn=35843,mn=36196,hn=37492,gn=37496,_n=37808,vn=37809,yn=37810,bn=37811,xn=37812,Sn=37813,Cn=37814,wn=37815,Tn=37816,En=37817,Dn=37818,On=37819,kn=37820,An=37821,jn=36492,Mn=36494,Nn=36495,Pn=36283,Fn=36284,In=36285,Ln=36286,Rn=2200,zn=2201,Bn=2202,Vn=2300,Hn=2301,Un=2302,Wn=2400,Gn=2401,Kn=2402,qn=2500,Jn=2501,Yn=3200,Xn=3201,Zn=3202,Qn=3203,$n=`srgb`,er=`srgb-linear`,tr=`linear`,nr=`srgb`,rr=7680,ir=7681,ar=7682,or=7683,sr=34055,cr=34056,lr=5386,ur=35044,dr=35048,fr=35040,pr=35045,mr=35049,hr=35041,gr=35046,_r=35050,vr=35042,yr=`300 es`,br=2e3,xr=2001,Sr={COMPUTE:`compute`,RENDER:`render`},Cr={PERSPECTIVE:`perspective`,LINEAR:`linear`,FLAT:`flat`},wr={NORMAL:`normal`,CENTROID:`centroid`,SAMPLE:`sample`,FIRST:`first`,EITHER:`either`};function Tr(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}var Er={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Dr(e,t){return new Er[e](t)}function Or(e){return document.createElementNS(`http://www.w3.org/1999/xhtml`,e)}function kr(){let e=Or(`canvas`);return e.style.display=`block`,e}var Ar={},jr=null;function Mr(e){jr=e}function Nr(){return jr}function Pr(...e){let t=`THREE.`+e.shift();jr?jr(`log`,t,...e):console.log(t,...e)}function Y(...e){let t=`THREE.`+e.shift();jr?jr(`warn`,t,...e):console.warn(t,...e)}function Fr(...e){let t=`THREE.`+e.shift();jr?jr(`error`,t,...e):console.error(t,...e)}function Ir(...e){let t=e.join(` `);t in Ar||(Ar[t]=!0,Y(...e))}function Lr(e,t,n){return new Promise(function(r,i){function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}}setTimeout(a,n)})}var Rr=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n>8&255]+zr[e>>16&255]+zr[e>>24&255]+`-`+zr[t&255]+zr[t>>8&255]+`-`+zr[t>>16&15|64]+zr[t>>24&255]+`-`+zr[n&63|128]+zr[n>>8&255]+`-`+zr[n>>16&255]+zr[n>>24&255]+zr[r&255]+zr[r>>8&255]+zr[r>>16&255]+zr[r>>24&255]).toLowerCase()}function Wr(e,t,n){return Math.max(t,Math.min(n,e))}function Gr(e,t){return(e%t+t)%t}function Kr(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)}function qr(e,t,n){return e===t?0:(n-e)/(t-e)}function Jr(e,t,n){return(1-n)*e+n*t}function Yr(e,t,n,r){return Jr(e,t,1-Math.exp(-n*r))}function Xr(e,t=1){return t-Math.abs(Gr(e,t*2)-t)}function Zr(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*(3-2*e))}function Qr(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*e*(e*(e*6-15)+10))}function $r(e,t){return e+Math.floor(Math.random()*(t-e+1))}function ei(e,t){return e+Math.random()*(t-e)}function ti(e){return e*(.5-Math.random())}function ni(e){e!==void 0&&(Br=e);let t=Br+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function ri(e){return e*Vr}function ii(e){return e*Hr}function ai(e){return(e&e-1)==0&&e!==0}function oi(e){return 2**Math.ceil(Math.log(e)/Math.LN2)}function si(e){return 2**Math.floor(Math.log(e)/Math.LN2)}function ci(e,t,n,r,i){let a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),d=a((t-r)/2),f=o((t-r)/2),p=a((r-t)/2),m=o((r-t)/2);switch(i){case`XYX`:e.set(s*u,c*d,c*f,s*l);break;case`YZY`:e.set(c*f,s*u,c*d,s*l);break;case`ZXZ`:e.set(c*d,c*f,s*u,s*l);break;case`XZX`:e.set(s*u,c*m,c*p,s*l);break;case`YXY`:e.set(c*p,s*u,c*m,s*l);break;case`ZYZ`:e.set(c*m,c*p,s*u,s*l);break;default:Y(`MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: `+i)}}function li(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error(`Invalid component type.`)}}function ui(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw Error(`Invalid component type.`)}}var di={DEG2RAD:Vr,RAD2DEG:Hr,generateUUID:Ur,clamp:Wr,euclideanModulo:Gr,mapLinear:Kr,inverseLerp:qr,lerp:Jr,damp:Yr,pingpong:Xr,smoothstep:Zr,smootherstep:Qr,randInt:$r,randFloat:ei,randFloatSpread:ti,seededRandom:ni,degToRad:ri,radToDeg:ii,isPowerOfTwo:ai,ceilPowerOfTwo:oi,floorPowerOfTwo:si,setQuaternionFromProperEuler:ci,normalize:ui,denormalize:li},X=class e{constructor(t=0,n=0){e.prototype.isVector2=!0,this.x=t,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Wr(this.x,e.x,t.x),this.y=Wr(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Wr(this.x,e,t),this.y=Wr(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Wr(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Wr(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},fi=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],d=i[a+0],f=i[a+1],p=i[a+2],m=i[a+3];if(o<=0){e[t+0]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u;return}if(o>=1){e[t+0]=d,e[t+1]=f,e[t+2]=p,e[t+3]=m;return}if(u!==m||s!==d||c!==f||l!==p){let e=s*d+c*f+l*p+u*m;e<0&&(d=-d,f=-f,p=-p,m=-m,e=-e);let t=1-o;if(e<.9995){let n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=Math.sin(o*n)/r,s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o}else{s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o;let e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],d=i[a+1],f=i[a+2],p=i[a+3];return e[t]=o*p+l*u+s*f-c*d,e[t+1]=s*p+l*d+c*u-o*f,e[t+2]=c*p+l*f+o*d-s*u,e[t+3]=l*p-o*u-s*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),d=s(n/2),f=s(r/2),p=s(i/2);switch(a){case`XYZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`YXZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`ZXY`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`ZYX`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`YZX`:this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case`XZY`:this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:Y(`Quaternion: .setFromEuler() encountered an unknown order: `+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],d=n+o+u;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){let e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){let e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{let e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Wr(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,i=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,r=-r,i=-i,a=-a,o=-o);let s=1-t;if(o<.9995){let e=Math.acos(o),c=Math.sin(e);s=Math.sin(s*e)/c,t=Math.sin(t*e)/c,this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this._onChangeCallback()}else this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Z=class e{constructor(t=0,n=0,r=0){e.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(mi.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(mi.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Wr(this.x,e.x,t.x),this.y=Wr(this.y,e.y,t.y),this.z=Wr(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Wr(this.x,e,t),this.y=Wr(this.y,e,t),this.z=Wr(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Wr(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return pi.copy(this).projectOnVector(e),this.sub(pi)}reflect(e){return this.sub(pi.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Wr(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},pi=new Z,mi=new fi,hi=class e{constructor(t,n,r,i,a,o,s,c,l){e.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l)}set(e,t,n,r,i,a,o,s,c){let l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],m=r[0],h=r[3],g=r[6],_=r[1],v=r[4],y=r[7],b=r[2],x=r[5],S=r[8];return i[0]=a*m+o*_+s*b,i[3]=a*h+o*v+s*x,i[6]=a*g+o*y+s*S,i[1]=c*m+l*_+u*b,i[4]=c*h+l*v+u*x,i[7]=c*g+l*y+u*S,i[2]=d*m+f*_+p*b,i[5]=d*h+f*v+p*x,i[8]=d*g+f*y+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,d=o*s-l*i,f=c*i-a*s,p=t*u+n*d+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-l*n)*m,e[2]=(o*n-r*a)*m,e[3]=d*m,e[4]=(l*t-r*s)*m,e[5]=(r*i-o*t)*m,e[6]=f*m,e[7]=(n*s-c*t)*m,e[8]=(a*t-n*i)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){let s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(gi.makeScale(e,t)),this}rotate(e){return this.premultiply(gi.makeRotation(-e)),this}translate(e,t){return this.premultiply(gi.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},gi=new hi,_i=new hi().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),vi=new hi().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function yi(){let e={enabled:!0,workingColorSpace:er,spaces:{},convert:function(e,t,n){return this.enabled===!1||t===n||!t||!n?e:(this.spaces[t].transfer===`srgb`&&(e.r=xi(e.r),e.g=xi(e.g),e.b=xi(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===`srgb`&&(e.r=Si(e.r),e.g=Si(e.g),e.b=Si(e.b)),e)},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===``?tr:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||`standard`},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return Ir(`ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return Ir(`ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[er]:{primaries:t,whitePoint:r,transfer:tr,toXYZ:_i,fromXYZ:vi,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:$n},outputColorSpaceConfig:{drawingBufferColorSpace:$n}},[$n]:{primaries:t,whitePoint:r,transfer:nr,toXYZ:_i,fromXYZ:vi,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:$n}}}),e}var bi=yi();function xi(e){return e<.04045?e*.0773993808:(e*.9478672986+.0521327014)**2.4}function Si(e){return e<.0031308?e*12.92:1.055*e**.41666-.055}var Ci,wi=class{static getDataURL(e,t=`image/png`){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>`u`)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Ci===void 0&&(Ci=Or(`canvas`)),Ci.width=e.width,Ci.height=e.height;let t=Ci.getContext(`2d`);e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=Ci}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap){let t=Or(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e1),this.pmremVersion=0}get width(){return this.source.getSize(ki).x}get height(){return this.source.getSize(ki).y}get depth(){return this.source.getSize(ki).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){Y(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){Y(`Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(e){if(this.mapping!==300)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case St:e.x-=Math.floor(e.x);break;case Ct:e.x=e.x<0?0:1;break;case wt:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x-=Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case St:e.y-=Math.floor(e.y);break;case Ct:e.y=e.y<0?0:1;break;case wt:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y-=Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};Ai.DEFAULT_IMAGE=null,Ai.DEFAULT_MAPPING=300,Ai.DEFAULT_ANISOTROPY=1;var ji=class e{constructor(t=0,n=0,r=0,i=1){e.prototype.isVector4=!0,this.x=t,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w===void 0?1:e.w,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],d=s[1],f=s[5],p=s[9],m=s[2],h=s[6],g=s[10];if(Math.abs(l-d)s&&e>_?e_?s1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Bi),Bi.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ji),Yi.subVectors(this.max,Ji),Hi.subVectors(e.a,Ji),Ui.subVectors(e.b,Ji),Wi.subVectors(e.c,Ji),Gi.subVectors(Ui,Hi),Ki.subVectors(Wi,Ui),qi.subVectors(Hi,Wi);let t=[0,-Gi.z,Gi.y,0,-Ki.z,Ki.y,0,-qi.z,qi.y,Gi.z,0,-Gi.x,Ki.z,0,-Ki.x,qi.z,0,-qi.x,-Gi.y,Gi.x,0,-Ki.y,Ki.x,0,-qi.y,qi.x,0];return!Qi(t,Hi,Ui,Wi,Yi)||(t=[1,0,0,0,1,0,0,0,1],!Qi(t,Hi,Ui,Wi,Yi))?!1:(Xi.crossVectors(Gi,Ki),t=[Xi.x,Xi.y,Xi.z],Qi(t,Hi,Ui,Wi,Yi))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Bi).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Bi).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(zi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),zi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),zi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),zi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),zi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),zi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),zi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),zi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(zi),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},zi=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],Bi=new Z,Vi=new Ri,Hi=new Z,Ui=new Z,Wi=new Z,Gi=new Z,Ki=new Z,qi=new Z,Ji=new Z,Yi=new Z,Xi=new Z,Zi=new Z;function Qi(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){Zi.fromArray(e,a);let o=i.x*Math.abs(Zi.x)+i.y*Math.abs(Zi.y)+i.z*Math.abs(Zi.z),s=t.dot(Zi),c=n.dot(Zi),l=r.dot(Zi);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}var $i=new Ri,ea=new Z,ta=new Z,na=class{constructor(e=new Z,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t===void 0?$i.setFromPoints(e).getCenter(n):n.copy(t);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;ea.subVectors(e,this.center);let t=ea.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(ea,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(ta.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ea.copy(e.center).add(ta)),this.expandByPoint(ea.copy(e.center).sub(ta))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},ra=new Z,ia=new Z,aa=new Z,oa=new Z,sa=new Z,ca=new Z,la=new Z,ua=class{constructor(e=new Z,t=new Z(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ra)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ra.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ra.copy(this.origin).addScaledVector(this.direction,t),ra.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){ia.copy(e).add(t).multiplyScalar(.5),aa.copy(t).sub(e).normalize(),oa.copy(this.origin).sub(ia);let i=e.distanceTo(t)*.5,a=-this.direction.dot(aa),o=oa.dot(this.direction),s=-oa.dot(aa),c=oa.lengthSq(),l=Math.abs(1-a*a),u,d,f,p;if(l>0)if(u=a*s-o,d=a*o-s,p=i*l,u>=0)if(d>=-p)if(d<=p){let e=1/l;u*=e,d*=e,f=u*(u+a*d+2*o)+d*(a*u+d+2*s)+c}else d=i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d=-i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d<=-p?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c):d<=p?(u=0,d=Math.min(Math.max(-i,-s),i),f=d*(d+2*s)+c):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c);else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(ia).addScaledVector(aa,d),f}intersectSphere(e,t){ra.subVectors(e.center,this.origin);let n=ra.dot(this.direction),r=ra.dot(ra)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),l>=0?(i=(e.min.y-d.y)*l,a=(e.max.y-d.y)*l):(i=(e.max.y-d.y)*l,a=(e.min.y-d.y)*l),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r)||((o>n||n!==n)&&(n=o),(s=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ra)!==null}intersectTriangle(e,t,n,r,i){sa.subVectors(t,e),ca.subVectors(n,e),la.crossVectors(sa,ca);let a=this.direction.dot(la),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;oa.subVectors(this.origin,e);let s=o*this.direction.dot(ca.crossVectors(oa,ca));if(s<0)return null;let c=o*this.direction.dot(sa.cross(oa));if(c<0||s+c>a)return null;let l=-o*oa.dot(la);return l<0?null:this.at(l/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},da=class e{constructor(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){e.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g)}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=l,g[10]=u,g[14]=d,g[3]=f,g[7]=p,g[11]=m,g[15]=h,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new e().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/fa.setFromMatrixColumn(e,0).length(),i=1/fa.setFromMatrixColumn(e,1).length(),a=1/fa.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if(e.order===`XYZ`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-o*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=a*s}else if(e.order===`YXZ`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*c,t[1]=a*u,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if(e.order===`ZXY`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if(e.order===`ZYX`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*u,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=o*s,t[10]=a*s}else if(e.order===`YZX`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=n*u+r,t[10]=e-i*u}else if(e.order===`XZY`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=e*u+i,t[5]=a*l,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*l,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ma,e,ha)}lookAt(e,t,n){let r=this.elements;return va.subVectors(e,t),va.lengthSq()===0&&(va.z=1),va.normalize(),ga.crossVectors(n,va),ga.lengthSq()===0&&(Math.abs(n.z)===1?va.x+=1e-4:va.z+=1e-4,va.normalize(),ga.crossVectors(n,va)),ga.normalize(),_a.crossVectors(va,ga),r[0]=ga.x,r[4]=_a.x,r[8]=va.x,r[1]=ga.y,r[5]=_a.y,r[9]=va.y,r[2]=ga.z,r[6]=_a.z,r[10]=va.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],u=n[5],d=n[9],f=n[13],p=n[2],m=n[6],h=n[10],g=n[14],_=n[3],v=n[7],y=n[11],b=n[15],x=r[0],S=r[4],C=r[8],w=r[12],T=r[1],E=r[5],D=r[9],O=r[13],k=r[2],A=r[6],j=r[10],M=r[14],N=r[3],P=r[7],F=r[11],I=r[15];return i[0]=a*x+o*T+s*k+c*N,i[4]=a*S+o*E+s*A+c*P,i[8]=a*C+o*D+s*j+c*F,i[12]=a*w+o*O+s*M+c*I,i[1]=l*x+u*T+d*k+f*N,i[5]=l*S+u*E+d*A+f*P,i[9]=l*C+u*D+d*j+f*F,i[13]=l*w+u*O+d*M+f*I,i[2]=p*x+m*T+h*k+g*N,i[6]=p*S+m*E+h*A+g*P,i[10]=p*C+m*D+h*j+g*F,i[14]=p*w+m*O+h*M+g*I,i[3]=_*x+v*T+y*k+b*N,i[7]=_*S+v*E+y*A+b*P,i[11]=_*C+v*D+y*j+b*F,i[15]=_*w+v*O+y*M+b*I,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],u=e[6],d=e[10],f=e[14],p=e[3],m=e[7],h=e[11],g=e[15];return p*(+i*s*u-r*c*u-i*o*d+n*c*d+r*o*f-n*s*f)+m*(+t*s*f-t*c*d+i*a*d-r*a*f+r*c*l-i*s*l)+h*(+t*c*u-t*o*f-i*a*u+n*a*f+i*o*l-n*c*l)+g*(-r*o*l-t*s*u+t*o*d+r*a*u-n*a*d+n*s*l)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15],_=u*h*c-m*d*c+m*s*f-o*h*f-u*s*g+o*d*g,v=p*d*c-l*h*c-p*s*f+a*h*f+l*s*g-a*d*g,y=l*m*c-p*u*c+p*o*f-a*m*f-l*o*g+a*u*g,b=p*u*s-l*m*s-p*o*d+a*m*d+l*o*h-a*u*h,x=t*_+n*v+r*y+i*b;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let S=1/x;return e[0]=_*S,e[1]=(m*d*i-u*h*i-m*r*f+n*h*f+u*r*g-n*d*g)*S,e[2]=(o*h*i-m*s*i+m*r*c-n*h*c-o*r*g+n*s*g)*S,e[3]=(u*s*i-o*d*i-u*r*c+n*d*c+o*r*f-n*s*f)*S,e[4]=v*S,e[5]=(l*h*i-p*d*i+p*r*f-t*h*f-l*r*g+t*d*g)*S,e[6]=(p*s*i-a*h*i-p*r*c+t*h*c+a*r*g-t*s*g)*S,e[7]=(a*d*i-l*s*i+l*r*c-t*d*c-a*r*f+t*s*f)*S,e[8]=y*S,e[9]=(p*u*i-l*m*i-p*n*f+t*m*f+l*n*g-t*u*g)*S,e[10]=(a*m*i-p*o*i+p*n*c-t*m*c-a*n*g+t*o*g)*S,e[11]=(l*o*i-a*u*i-l*n*c+t*u*c+a*n*f-t*o*f)*S,e[12]=b*S,e[13]=(l*m*r-p*u*r+p*n*d-t*m*d-l*n*h+t*u*h)*S,e[14]=(p*o*r-a*m*r-p*n*s+t*m*s+a*n*h-t*o*h)*S,e[15]=(a*u*r-l*o*r+l*n*s-t*u*s-a*n*d+t*o*d)*S,this}scale(e){let t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+n,c*o-r*s,c*s+r*o,0,c*o+r*s,l*o+n,l*s-r*a,0,c*s-r*o,l*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,u=o+o,d=i*c,f=i*l,p=i*u,m=a*l,h=a*u,g=o*u,_=s*c,v=s*l,y=s*u,b=n.x,x=n.y,S=n.z;return r[0]=(1-(m+g))*b,r[1]=(f+y)*b,r[2]=(p-v)*b,r[3]=0,r[4]=(f-y)*x,r[5]=(1-(d+g))*x,r[6]=(h+_)*x,r[7]=0,r[8]=(p+v)*S,r[9]=(h-_)*S,r[10]=(1-(d+m))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,i=fa.set(r[0],r[1],r[2]).length(),a=fa.set(r[4],r[5],r[6]).length(),o=fa.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],pa.copy(this);let s=1/i,c=1/a,l=1/o;return pa.elements[0]*=s,pa.elements[1]*=s,pa.elements[2]*=s,pa.elements[4]*=c,pa.elements[5]*=c,pa.elements[6]*=c,pa.elements[8]*=l,pa.elements[9]*=l,pa.elements[10]*=l,t.setFromRotationMatrix(pa),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a,o=br,s=!1){let c=this.elements,l=2*i/(t-e),u=2*i/(n-r),d=(t+e)/(t-e),f=(n+r)/(n-r),p,m;if(s)p=i/(a-i),m=a*i/(a-i);else if(o===2e3)p=-(a+i)/(a-i),m=-2*a*i/(a-i);else if(o===2001)p=-a/(a-i),m=-a*i/(a-i);else throw Error(`THREE.Matrix4.makePerspective(): Invalid coordinate system: `+o);return c[0]=l,c[4]=0,c[8]=d,c[12]=0,c[1]=0,c[5]=u,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,i,a,o=br,s=!1){let c=this.elements,l=2/(t-e),u=2/(n-r),d=-(t+e)/(t-e),f=-(n+r)/(n-r),p,m;if(s)p=1/(a-i),m=a/(a-i);else if(o===2e3)p=-2/(a-i),m=-(a+i)/(a-i);else if(o===2001)p=-1/(a-i),m=-i/(a-i);else throw Error(`THREE.Matrix4.makeOrthographic(): Invalid coordinate system: `+o);return c[0]=l,c[4]=0,c[8]=0,c[12]=d,c[1]=0,c[5]=u,c[9]=0,c[13]=f,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},fa=new Z,pa=new da,ma=new Z(0,0,0),ha=new Z(1,1,1),ga=new Z,_a=new Z,va=new Z,ya=new da,ba=new fi,xa=class e{constructor(t=0,n=0,r=0,i=e.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],c=r[5],l=r[9],u=r[2],d=r[6],f=r[10];switch(t){case`XYZ`:this._y=Math.asin(Wr(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,f),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,c),this._z=0);break;case`YXZ`:this._x=Math.asin(-Wr(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case`ZXY`:this._x=Math.asin(Wr(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case`ZYX`:this._y=Math.asin(-Wr(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case`YZX`:this._z=Math.asin(Wr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,f));break;case`XZY`:this._z=Math.asin(-Wr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,f),this._y=0);break;default:Y(`Euler: .setFromRotationMatrix() encountered an unknown order: `+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return ya.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ya,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ba.setFromEuler(this),this.setFromQuaternion(ba,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};xa.DEFAULT_ORDER=`XYZ`;var Sa=class{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type=`InstancedMesh`,r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type=`BatchedMesh`,r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function i(t,n){return t[n.uuid]===void 0&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(t!==void 0&&t.shapes!==void 0){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){za.subVectors(r,t),Ba.subVectors(n,t),Va.subVectors(e,t);let a=za.dot(za),o=za.dot(Ba),s=za.dot(Va),c=Ba.dot(Ba),l=Ba.dot(Va),u=a*c-o*o;if(u===0)return i.set(0,0,0),null;let d=1/u,f=(c*s-o*l)*d,p=(a*l-o*s)*d;return i.set(1-f-p,p,f)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Ha)===null?!1:Ha.x>=0&&Ha.y>=0&&Ha.x+Ha.y<=1}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,Ha)===null?(s.x=0,s.y=0,`z`in s&&(s.z=0),`w`in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(i,Ha.x),s.addScaledVector(a,Ha.y),s.addScaledVector(o,Ha.z),s)}static getInterpolatedAttribute(e,t,n,r,i,a){return Ya.setScalar(0),Xa.setScalar(0),Za.setScalar(0),Ya.fromBufferAttribute(e,t),Xa.fromBufferAttribute(e,n),Za.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(Ya,i.x),a.addScaledVector(Xa,i.y),a.addScaledVector(Za,i.z),a}static isFrontFacing(e,t,n,r){return za.subVectors(n,t),Ba.subVectors(e,t),za.cross(Ba).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return za.subVectors(this.c,this.b),Ba.subVectors(this.a,this.b),za.cross(Ba).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return e.getNormal(this.a,this.b,this.c,t)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,r,i,a){return e.getInterpolation(t,this.a,this.b,this.c,n,r,i,a)}containsPoint(t){return e.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return e.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,i=this.c,a,o;Ua.subVectors(r,n),Wa.subVectors(i,n),Ka.subVectors(e,n);let s=Ua.dot(Ka),c=Wa.dot(Ka);if(s<=0&&c<=0)return t.copy(n);qa.subVectors(e,r);let l=Ua.dot(qa),u=Wa.dot(qa);if(l>=0&&u<=l)return t.copy(r);let d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(Ua,a);Ja.subVectors(e,i);let f=Ua.dot(Ja),p=Wa.dot(Ja);if(p>=0&&f<=p)return t.copy(i);let m=f*c-s*p;if(m<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(Wa,o);let h=l*p-f*u;if(h<=0&&u-l>=0&&f-p>=0)return Ga.subVectors(i,r),o=(u-l)/(u-l+(f-p)),t.copy(r).addScaledVector(Ga,o);let g=1/(h+m+d);return a=m*g,o=d*g,t.copy(n).addScaledVector(Ua,a).addScaledVector(Wa,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},$a={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},eo={h:0,s:0,l:0},to={h:0,s:0,l:0};function no(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var Q=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let t=e;t&&t.isColor?this.copy(t):typeof t==`number`?this.setHex(t):typeof t==`string`&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=$n){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,bi.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=bi.workingColorSpace){return this.r=e,this.g=t,this.b=n,bi.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=bi.workingColorSpace){if(e=Gr(e,1),t=Wr(t,0,1),n=Wr(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=no(i,r,e+1/3),this.g=no(i,r,e),this.b=no(i,r,e-1/3)}return bi.colorSpaceToWorking(this,r),this}setStyle(e,t=$n){function n(t){t!==void 0&&parseFloat(t)<1&&Y(`Color: Alpha component of `+e+` will be ignored.`)}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],o=r[2];switch(a){case`rgb`:case`rgba`:if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case`hsl`:case`hsla`:if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:Y(`Color: Unknown color model `+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(i===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(i===6)return this.setHex(parseInt(n,16),t);Y(`Color: Invalid hex color `+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=$n){let n=$a[e.toLowerCase()];return n===void 0?Y(`Color: Unknown color `+e):this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=xi(e.r),this.g=xi(e.g),this.b=xi(e.b),this}copyLinearToSRGB(e){return this.r=Si(e.r),this.g=Si(e.g),this.b=Si(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=$n){return bi.workingToColorSpace(ro.copy(this),e),Math.round(Wr(ro.r*255,0,255))*65536+Math.round(Wr(ro.g*255,0,255))*256+Math.round(Wr(ro.b*255,0,255))}getHexString(e=$n){return(`000000`+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=bi.workingColorSpace){bi.workingToColorSpace(ro.copy(this),t);let n=ro.r,r=ro.g,i=ro.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s,c,l=(o+a)/2;if(o===a)s=0,c=0;else{let e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){Y(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){Y(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};n.uuid=this.uuid,n.type=this.type,this.name!==``&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.side!==0&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==204&&(n.blendSrc=this.blendSrc),this.blendDst!==205&&(n.blendDst=this.blendDst),this.blendEquation!==100&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==3&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==519&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==7680&&(n.stencilFail=this.stencilFail),this.stencilZFail!==7680&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==7680&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(e){e===!0&&this.version++}},oo=class extends ao{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new Q(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new xa,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},so=co();function co(){let e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(r[e]=0,r[e|256]=32768,i[e]=24,i[e|256]=24):t<-14?(r[e]=1024>>-t-14,r[e|256]=1024>>-t-14|32768,i[e]=-t-1,i[e|256]=-t-1):t<=15?(r[e]=t+15<<10,r[e|256]=t+15<<10|32768,i[e]=13,i[e|256]=13):t<128?(r[e]=31744,r[e|256]=64512,i[e]=24,i[e|256]=24):(r[e]=31744,r[e|256]=64512,i[e]=13,i[e|256]=13)}let a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;!(t&8388608);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(s[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function lo(e){Math.abs(e)>65504&&Y(`DataUtils.toHalfFloat(): Value out of range.`),e=Wr(e,-65504,65504),so.floatView[0]=e;let t=so.uint32View[0],n=t>>23&511;return so.baseTable[n]+((t&8388607)>>so.shiftTable[n])}function uo(e){let t=e>>10;return so.uint32View[0]=so.mantissaTable[so.offsetTable[t]+(e&1023)]+so.exponentTable[t],so.floatView[0]}var fo=class{static toHalfFloat(e){return lo(e)}static fromHalfFloat(e){return uo(e)}},po=new Z,mo=new X,ho=0,go=class{constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,`id`,{value:ho++}),this.name=``,this.array=e,this.itemSize=t,this.count=e===void 0?0:e.length/t,this.normalized=n,this.usage=ur,this.updateRanges=[],this.gpuType=Vt,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;rt.count&&Y(`BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ri);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Fr(`BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new Z(-1/0,-1/0,-1/0),new Z(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e0&&(e.userData=this.userData),this.parameters!==void 0){let t=this.parameters;for(let n in t)t[n]!==void 0&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2))&&(Po.copy(i).invert(),Fo.copy(e.ray).applyMatrix4(Po),!(n.boundingBox!==null&&Fo.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Fo)))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,d=i.groups,f=i.drawRange;if(o!==null)if(Array.isArray(a))for(let i=0,s=d.length;in.far?null:{distance:l,point:Wo.clone(),object:e}}function qo(e,t,n,r,i,a,o,s,c,l){e.getVertexPosition(s,Ro),e.getVertexPosition(c,zo),e.getVertexPosition(l,Bo);let u=Ko(e,t,n,r,Ro,zo,Bo,Uo);if(u){let e=new Z;Qa.getBarycoord(Uo,Ro,zo,Bo,e),i&&(u.uv=Qa.getInterpolatedAttribute(i,s,c,l,e,new X)),a&&(u.uv1=Qa.getInterpolatedAttribute(a,s,c,l,e,new X)),o&&(u.normal=Qa.getInterpolatedAttribute(o,s,c,l,e,new Z),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));let t={a:s,b:c,c:l,normal:new Z,materialIndex:0};Qa.getNormal(Ro,zo,Bo,t.normal),u.face=t,u.barycoord=e}return u}var Jo=class e extends No{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type=`BoxGeometry`,this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);let s=[],c=[],l=[],u=[],d=0,f=0;p(`z`,`y`,`x`,-1,-1,n,t,e,a,i,0),p(`z`,`y`,`x`,1,-1,n,t,-e,a,i,1),p(`x`,`z`,`y`,1,1,e,n,t,r,a,2),p(`x`,`z`,`y`,1,-1,e,n,-t,r,a,3),p(`x`,`y`,`z`,1,-1,e,t,n,r,i,4),p(`x`,`y`,`z`,-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute(`position`,new To(c,3)),this.setAttribute(`normal`,new To(l,3)),this.setAttribute(`uv`,new To(u,2));function p(e,t,n,r,i,a,p,m,h,g,_){let v=a/h,y=p/g,b=a/2,x=p/2,S=m/2,C=h+1,w=g+1,T=0,E=0,D=new Z;for(let a=0;a0?1:-1,l.push(D.x,D.y,D.z),u.push(s/h),u.push(1-a/g),T+=1}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)this.extensions[e]===!0&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},rs=class extends Ra{constructor(){super(),this.isCamera=!0,this.type=`Camera`,this.matrixWorldInverse=new da,this.projectionMatrix=new da,this.projectionMatrixInverse=new da,this.coordinateSystem=br,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},is=new Z,as=new X,os=new X,ss=class extends rs{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type=`PerspectiveCamera`,this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Hr*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(Vr*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Hr*2*Math.atan(Math.tan(Vr*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){is.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(is.x,is.y).multiplyScalar(-e/is.z),is.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(is.x,is.y).multiplyScalar(-e/is.z)}getViewSize(e,t){return this.getViewBounds(e,as,os),t.subVectors(os,as)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(Vr*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(this.view!==null&&this.view.enabled){let e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}let o=this.filmOffset;o!==0&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},cs=-90,ls=1,us=class extends Ra{constructor(e,t,n){super(),this.type=`CubeCamera`,this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new ss(cs,ls,e,t);r.layers=this.layers,this.add(r);let i=new ss(cs,ls,e,t);i.layers=this.layers,this.add(i);let a=new ss(cs,ls,e,t);a.layers=this.layers,this.add(a);let o=new ss(cs,ls,e,t);o.layers=this.layers,this.add(o);let s=new ss(cs,ls,e,t);s.layers=this.layers,this.add(s);let c=new ss(cs,ls,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(let e of t)this.remove(e);if(e===2e3)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else if(e===2001)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1);else throw Error(`THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: `+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,o),e.setRenderTarget(n,3,r),e.render(t,s),e.setRenderTarget(n,4,r),e.render(t,c),n.texture.generateMipmaps=m,e.setRenderTarget(n,5,r),e.render(t,l),e.setRenderTarget(u,d,f),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}},ds=class extends Ai{constructor(e=[],t=301,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},fs=class extends Ni{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1};this.texture=new ds([n,n,n,n,n,n]),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},r=new Jo(5,5,5),i=new ns({name:`CubemapFromEquirect`,uniforms:Yo(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;let a=new Go(r,i),o=t.minFilter;return t.minFilter===1008&&(t.minFilter=At),new us(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}},ps=class extends Ra{constructor(){super(),this.isGroup=!0,this.type=`Group`}},ms={type:`move`},hs=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new ps,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new ps,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new ps,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:`connected`,data:e}),this}disconnect(e){return this.dispatchEvent({type:`disconnected`,data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null,o=this._targetRay,s=this._grip,c=this._hand;if(e&&t.session.visibilityState!==`visible-blurred`){if(c&&e.hand){a=!0;for(let r of e.hand.values()){let e=t.getJointPose(r,n),i=this._getHandJoint(c,r);e!==null&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=e!==null}let r=c.joints[`index-finger-tip`],i=c.joints[`thumb-tip`],o=r.position.distanceTo(i.position),s=.02,l=.005;c.inputState.pinching&&o>s+l?(c.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=s-l&&(c.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:e.handedness,target:this}))}else s!==null&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&i!==null&&(r=i),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(ms)))}return o!==null&&(o.visible=r!==null),s!==null&&(s.visible=i!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new ps;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},gs=class e{constructor(e,t=25e-5){this.isFogExp2=!0,this.name=``,this.color=new Q(e),this.density=t}clone(){return new e(this.color,this.density)}toJSON(){return{type:`FogExp2`,name:this.name,color:this.color.getHex(),density:this.density}}},_s=class e{constructor(e,t=1,n=1e3){this.isFog=!0,this.name=``,this.color=new Q(e),this.near=t,this.far=n}clone(){return new e(this.color,this.near,this.far)}toJSON(){return{type:`Fog`,name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},vs=class extends Ra{constructor(){super(),this.isScene=!0,this.type=`Scene`,this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new xa,this.environmentIntensity=1,this.environmentRotation=new xa,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},ys=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e===void 0?0:e.length/t,this.usage=ur,this.updateRanges=[],this.version=0,this.uuid=Ur()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;re.far||t.push({distance:s,point:ws.clone(),uv:Qa.getInterpolation(ws,As,js,Ms,Ns,Ps,Fs,new X),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function Ls(e,t,n,r,i,a){Ds.subVectors(e,n).addScalar(.5).multiply(r),i===void 0?Os.copy(Ds):(Os.x=a*Ds.x-i*Ds.y,Os.y=i*Ds.x+a*Ds.y),e.copy(t),e.x+=Os.x,e.y+=Os.y,e.applyMatrix4(ks)}var Rs=new Z,zs=new Z,Bs=class extends Ra{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type=`LOD`,Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,n=t.length;e0){let n,r;for(n=1,r=t.length;n0){Rs.setFromMatrixPosition(this.matrixWorld);let n=e.ray.origin.distanceTo(Rs);this.getObjectForDistance(n).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){Rs.setFromMatrixPosition(e.matrixWorld),zs.setFromMatrixPosition(this.matrixWorld);let n=Rs.distanceTo(zs)/e.zoom;t[0].object.visible=!0;let r,i;for(r=1,i=t.length;r=e)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||pc.getNormalMatrix(e),r=this.coplanarPoint(dc).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},hc=new na,gc=new X(.5,.5),_c=new Z,vc=class{constructor(e=new mc,t=new mc,n=new mc,r=new mc,i=new mc,a=new mc){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=br,n=!1){let r=this.planes,i=e.elements,a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(c-a,f-l,g-p,b-_).normalize(),r[1].setComponents(c+a,f+l,g+p,b+_).normalize(),r[2].setComponents(c+o,f+u,g+m,b+v).normalize(),r[3].setComponents(c-o,f-u,g-m,b-v).normalize(),n)r[4].setComponents(s,d,h,y).normalize(),r[5].setComponents(c-s,f-d,g-h,b-y).normalize();else if(r[4].setComponents(c-s,f-d,g-h,b-y).normalize(),t===2e3)r[5].setComponents(c+s,f+d,g+h,b+y).normalize();else if(t===2001)r[5].setComponents(s,d,h,y).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),hc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),hc.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(hc)}intersectsSprite(e){return hc.center.set(0,0,0),hc.radius=.7071067811865476+gc.distanceTo(e.center),hc.applyMatrix4(e.matrixWorld),this.intersectsSphere(hc)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,_c.y=r.normal.y>0?e.max.y:e.min.y,_c.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(_c)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}},yc=new da,bc=new vc,xc=class e{constructor(){this.coordinateSystem=br}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});let o=i[this.index];a.push(o),this.index++,o.start=e,o.count=t,o.z=n,o.index=r}reset(){this.list.length=0,this.index=0}},Ec=new da,Dc=new Q(1,1,1),Oc=new vc,kc=new xc,Ac=new Ri,jc=new na,Mc=new Z,Nc=new Z,Pc=new Z,Fc=new Tc,Ic=new Go,Lc=[];function Rc(e,t,n=0){let r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){let i=e.count;for(let a=0;a65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new go(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){let t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw Error(`THREE.BatchedMesh: All geometries must consistently have "index".`);for(let n in t.attributes){if(!e.hasAttribute(n))throw Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);let r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw Error(`THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.`)}}validateInstanceId(e){let t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){let t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ri);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw Error(`THREE.BatchedMesh: Maximum item count reached.`);let t={visible:!0,active:!0,geometryIndex:e},n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Sc),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));let r=this._matricesTexture;Ec.identity().toArray(r.image.data,n*16),r.needsUpdate=!0;let i=this._colorsTexture;return i&&(Dc.toArray(i.image.data,n*4),i.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);let r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},i=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=t===-1?e.getAttribute(`position`).count:t;let a=e.getIndex();if(a!==null&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=n===-1?a.count:n),r.indexStart!==-1&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw Error(`THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.`);let o;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Sc),o=this._availableGeometryIds.shift(),i[o]=r):(o=this._geometryCount,this._geometryCount++,i.push(r)),this.setGeometryAt(o,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,o}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error(`THREE.BatchedMesh: Maximum geometry count reached.`);this._validateGeometry(t);let n=this.geometry,r=n.getIndex()!==null,i=n.getIndex(),a=t.getIndex(),o=this._geometryInfo[e];if(r&&a.count>o.reservedIndexCount||t.attributes.position.count>o.reservedVertexCount)throw Error(`THREE.BatchedMesh: Reserved space not large enough for provided geometry.`);let s=o.vertexStart,c=o.reservedVertexCount;for(let e in o.vertexCount=t.getAttribute(`position`).count,n.attributes){let r=t.getAttribute(e),i=n.getAttribute(e);Rc(r,i,s);let a=r.itemSize;for(let e=r.count,t=c;e=t.length||t[e].active===!1)return this;let n=this._instanceInfo;for(let t=0,r=n.length;tt).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,o=n.length;a=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(r.boundingBox===null){let e=new Ri,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(r.boundingSphere===null){let t=new na;this.getBoundingBoxAt(e,Ac),Ac.getCenter(t.center);let i=n.index,a=n.attributes.position,o=0;for(let e=r.start,n=r.start+r.count;ee.active);if(Math.max(...n.map(e=>e.vertexStart+e.reservedVertexCount))>e)throw Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(e=>e.indexStart+e.reservedIndexCount))>t)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);let r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new No,this._initializeGeometry(r));let i=this.geometry;for(let e in r.index&&zc(r.index.array,i.index.array),r.attributes)zc(r.attributes[e].array,i.attributes[e].array)}raycast(e,t){let n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;Ic.material=this.material,Ic.geometry.index=a.index,Ic.geometry.attributes=a.attributes,Ic.geometry.boundingBox===null&&(Ic.geometry.boundingBox=new Ri),Ic.geometry.boundingSphere===null&&(Ic.geometry.boundingSphere=new na);for(let a=0,o=n.length;a({...e,boundingBox:e.boundingBox===null?null:e.boundingBox.clone(),boundingSphere:e.boundingSphere===null?null:e.boundingSphere.clone()})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=r.getIndex(),o=a===null?1:a.array.BYTES_PER_ELEMENT,s=this._instanceInfo,c=this._multiDrawStarts,l=this._multiDrawCounts,u=this._geometryInfo,d=this.perObjectFrustumCulled,f=this._indirectTexture,p=f.image.data,m=n.isArrayCamera?kc:Oc;d&&!n.isArrayCamera&&(Ec.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),Oc.setFromProjectionMatrix(Ec,n.coordinateSystem,n.reversedDepth));let h=0;if(this.sortObjects){Ec.copy(this.matrixWorld).invert(),Mc.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Ec),Nc.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Ec);for(let e=0,t=s.length;e0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;er)return;qc.applyMatrix4(e.matrixWorld);let c=t.ray.origin.distanceTo(qc);if(!(ct.far))return{distance:c,point:Jc.clone().applyMatrix4(e.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:e}}var Zc=new Z,Qc=new Z,$c=class extends Yc{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type=`LineSegments`}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[];for(let e=0,r=t.count;e0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;ei.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:o})}}var cl=class extends Ai{constructor(e,t,n,r,i=At,a=At,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;let l=this;function u(){l.needsUpdate=!0,l._requestVideoFrameCallbackId=e.requestVideoFrameCallback(u)}`requestVideoFrameCallback`in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(u))}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;!(`requestVideoFrameCallback`in e)&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}},ll=class extends cl{constructor(e,t,n,r,i,a,o,s){super({},e,t,n,r,i,a,o,s),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}},ul=class extends Ai{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Tt,this.minFilter=Tt,this.generateMipmaps=!1,this.needsUpdate=!0}},dl=class extends Ai{constructor(e,t,n,r,i,a,o,s,c,l,u,d){super(null,a,o,s,c,l,r,i,u,d),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}},fl=class extends dl{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Ct,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},pl=class extends dl{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,301),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}},ml=class extends Ai{constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isCanvasTexture=!0,this.needsUpdate=!0}},hl=class extends Ai{constructor(e,t,n=Bt,r,i,a,o=Tt,s=Tt,c,l=Zt,u=1){if(l!==1026&&l!==1027)throw Error(`DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);super({width:e,height:t,depth:u},r,i,a,o,s,l,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Ei(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},gl=class extends Ai{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}},_l=class e extends No{constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type=`CapsuleGeometry`,this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r)),i=Math.max(1,Math.floor(i));let a=[],o=[],s=[],c=[],l=t/2,u=Math.PI/2*e,d=t,f=2*u+d,p=n*2+i,m=r+1,h=new Z,g=new Z;for(let _=0;_<=p;_++){let v=0,y=0,b=0,x=0;if(_<=n){let t=_/n,r=t*Math.PI/2;y=-l-e*Math.cos(r),b=e*Math.sin(r),x=-e*Math.cos(r),v=t*u}else if(_<=n+i){let r=(_-n)/i;y=-l+r*t,b=e,x=0,v=u+r*d}else{let t=(_-n-i)/n,r=t*Math.PI/2;y=l+e*Math.sin(r),b=e*Math.cos(r),x=e*Math.sin(r),v=u+d+t*u}let S=Math.max(0,Math.min(1,v/f)),C=0;_===0?C=.5/r:_===p&&(C=-.5/r);for(let e=0;e<=r;e++){let t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-b*a,g.y=y,g.z=b*i,o.push(g.x,g.y,g.z),h.set(-b*a,x,b*i),h.normalize(),s.push(h.x,h.y,h.z),c.push(t+C,S)}if(_>0){let e=(_-1)*m;for(let t=0;t0&&v(!0),t>0&&v(!1)),this.setIndex(l),this.setAttribute(`position`,new To(u,3)),this.setAttribute(`normal`,new To(d,3)),this.setAttribute(`uv`,new To(f,2));function _(){let a=new Z,_=new Z,v=0,y=(t-e)/n;for(let c=0;c<=i;c++){let l=[],g=c/i,v=g*(t-e)+e;for(let e=0;e<=r;e++){let t=e/r,i=t*s+o,c=Math.sin(i),m=Math.cos(i);_.x=v*c,_.y=-g*n+h,_.z=v*m,u.push(_.x,_.y,_.z),a.set(c,y,m).normalize(),d.push(a.x,a.y,a.z),f.push(t,1-g),l.push(p++)}m.push(l)}for(let n=0;n0||r!==0)&&(l.push(a,o,c),v+=3),(t>0||r!==i-1)&&(l.push(o,s,c),v+=3)}c.addGroup(g,v,0),g+=v}function v(n){let i=p,a=new X,m=new Z,_=0,v=n===!0?e:t,y=n===!0?1:-1;for(let e=1;e<=r;e++)u.push(0,h*y,0),d.push(0,y,0),f.push(.5,.5),p++;let b=p;for(let e=0;e<=r;e++){let t=e/r*s+o,n=Math.cos(t),i=Math.sin(t);m.x=v*i,m.y=h*y,m.z=v*n,u.push(m.x,m.y,m.z),d.push(0,y,0),a.x=n*.5+.5,a.y=i*.5*y+.5,f.push(a.x,a.y),p++}for(let e=0;e.9&&Math.min(t,n,r)<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}function d(e){i.push(e.x,e.y,e.z)}function f(t,n){let r=t*3;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function p(){let e=new Z,t=new Z,n=new Z,r=new Z,o=new X,s=new X,c=new X;for(let l=0,u=0;l0)s=r-1;else{s=r;break}if(r=s,n[r]===a)return r/(i-1);let l=n[r],u=n[r+1]-l,d=(a-l)/u;return(r+d)/(i-1)}getTangent(e,t){let n=1e-4,r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);let a=this.getPoint(r),o=this.getPoint(i),s=t||(a.isVector2?new X:new Z);return s.copy(o).sub(a).normalize(),s}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){let n=new Z,r=[],i=[],a=[],o=new Z,s=new da;for(let t=0;t<=e;t++){let n=t/e;r[t]=this.getTangentAt(n,new Z)}i[0]=new Z,a[0]=new Z;let c=Number.MAX_VALUE,l=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);l<=c&&(c=l,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),d<=c&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),o.crossVectors(r[t-1],r[t]),o.length()>2**-52){o.normalize();let e=Math.acos(Wr(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(o,e))}a[t].crossVectors(r[t],i[t])}if(t===!0){let t=Math.acos(Wr(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.7,type:`Curve`,generator:`Curve.toJSON`}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},kl=class extends Ol{constructor(e=0,t=0,n=1,r=1,i=0,a=Math.PI*2,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type=`EllipseCurve`,this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(e,t=new X){let n=t,r=Math.PI*2,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)<2**-52;for(;i<0;)i+=r;for(;i>r;)i-=r;i<2**-52&&(i=a?0:r),this.aClockwise===!0&&!a&&(i===r?i=-r:i-=r);let o=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(o),c=this.aY+this.yRadius*Math.sin(o);if(this.aRotation!==0){let e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=c-this.aY;s=n*e-r*t+this.aX,c=n*t+r*e+this.aY}return n.set(s,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){let e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}},Al=class extends kl{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type=`ArcCurve`}};function jl(){let e=0,t=0,n=0,r=0;function i(i,a,o,s){e=i,t=o,n=-3*i+3*a-2*o-s,r=2*i-2*a+o+s}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,o,s){let c=(t-e)/a-(n-e)/(a+o)+(n-t)/o,l=(n-t)/o-(r-t)/(o+s)+(r-n)/s;c*=o,l*=o,i(t,n,c,l)},calc:function(i){let a=i*i,o=a*i;return e+t*i+n*a+r*o}}}var Ml=new Z,Nl=new jl,Pl=new jl,Fl=new jl,Il=class extends Ol{constructor(e=[],t=!1,n=`centripetal`,r=.5){super(),this.isCatmullRomCurve3=!0,this.type=`CatmullRomCurve3`,this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new Z){let n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e,o=Math.floor(a),s=a-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/i)+1)*i:s===0&&o===i-1&&(o=i-2,s=1);let c,l;this.closed||o>0?c=r[(o-1)%i]:(Ml.subVectors(r[0],r[1]).add(r[0]),c=Ml);let u=r[o%i],d=r[(o+1)%i];if(this.closed||o+2r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(Ll(o,s.x,c.x,l.x,u.x),Ll(o,s.y,c.y,l.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let e=r[i]-n,a=this.curves[i],o=a.getLength(),s=o===0?0:1-e/o;return a.getPointAt(s,t)}i++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let e=c.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(c);let l=c.getPoint(1);return this.currentPoint.copy(l),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},ru=class extends nu{constructor(e){super(e),this.uuid=Ur(),this.type=`Shape`,this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n80*n){s=e[0],c=e[1];let t=s,r=c;for(let a=n;at&&(t=n),i>r&&(r=i)}l=Math.max(t-s,r-c),l=l===0?0:32767/l}return su(a,o,n,s,c,l,0),o}function au(e,t,n,r,i){let a;if(i===Iu(e,t,n,r)>0)for(let i=t;i=t;i-=r)a=Nu(i/r|0,e[i],e[i+1],a);return a&&Tu(a,a.next)&&(Pu(a),a=a.next),a}function ou(e,t){if(!e)return e;t||=e;let n=e,r;do if(r=!1,!n.steiner&&(Tu(n,n.next)||wu(n.prev,n,n.next)===0)){if(Pu(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function su(e,t,n,r,i,a,o){if(!e)return;!o&&a&&_u(e,r,i,a);let s=e;for(;e.prev!==e.next;){let c=e.prev,l=e.next;if(a?lu(e,r,i,a):cu(e)){t.push(c.i,e.i,l.i),Pu(e),e=l.next,s=l.next;continue}if(e=l,e===s){o?o===1?(e=uu(ou(e),t),su(e,t,n,r,i,a,2)):o===2&&du(e,t,n,r,i,a):su(ou(e),t,n,r,i,a,1);break}}}function cu(e){let t=e.prev,n=e,r=e.next;if(wu(t,n,r)>=0)return!1;let i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=Math.min(i,a,o),d=Math.min(s,c,l),f=Math.max(i,a,o),p=Math.max(s,c,l),m=r.next;for(;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&Su(i,s,a,c,o,l,m.x,m.y)&&wu(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function lu(e,t,n,r){let i=e.prev,a=e,o=e.next;if(wu(i,a,o)>=0)return!1;let s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=Math.min(s,c,l),m=Math.min(u,d,f),h=Math.max(s,c,l),g=Math.max(u,d,f),_=yu(p,m,t,n,r),v=yu(h,g,t,n,r),y=e.prevZ,b=e.nextZ;for(;y&&y.z>=_&&b&&b.z<=v;){if(y.x>=p&&y.x<=h&&y.y>=m&&y.y<=g&&y!==i&&y!==o&&Su(s,u,c,d,l,f,y.x,y.y)&&wu(y.prev,y,y.next)>=0||(y=y.prevZ,b.x>=p&&b.x<=h&&b.y>=m&&b.y<=g&&b!==i&&b!==o&&Su(s,u,c,d,l,f,b.x,b.y)&&wu(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;y&&y.z>=_;){if(y.x>=p&&y.x<=h&&y.y>=m&&y.y<=g&&y!==i&&y!==o&&Su(s,u,c,d,l,f,y.x,y.y)&&wu(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=p&&b.x<=h&&b.y>=m&&b.y<=g&&b!==i&&b!==o&&Su(s,u,c,d,l,f,b.x,b.y)&&wu(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function uu(e,t){let n=e;do{let r=n.prev,i=n.next.next;!Tu(r,i)&&Eu(r,n,n.next,i)&&Au(r,i)&&Au(i,r)&&(t.push(r.i,n.i,i.i),Pu(n),Pu(n.next),n=e=i),n=n.next}while(n!==e);return ou(n)}function du(e,t,n,r,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&Cu(o,e)){let s=Mu(o,e);o=ou(o,o.next),s=ou(s,s.next),su(o,t,n,r,i,a,0),su(s,t,n,r,i,a,0);return}e=e.next}o=o.next}while(o!==e)}function fu(e,t,n,r){let i=[];for(let n=0,a=t.length;n=n.next.y&&n.next.y!==n.y){let e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a&&(a=e,o=n.x=n.x&&n.x>=c&&r!==n.x&&xu(io.x||n.x===o.x&&gu(o,n)))&&(o=n,u=t)}n=n.next}while(n!==s);return o}function gu(e,t){return wu(e.prev,e,t.prev)<0&&wu(t.next,e,e.next)<0}function _u(e,t,n,r){let i=e;do i.z===0&&(i.z=yu(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,vu(i)}function vu(e){let t,n=1;do{let r=e,i;e=null;let a=null;for(t=0;r;){t++;let o=r,s=0;for(let e=0;e0||c>0&&o;)s!==0&&(c===0||!o||r.z<=o.z)?(i=r,r=r.nextZ,s--):(i=o,o=o.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=o}a.nextZ=null,n*=2}while(t>1);return e}function yu(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function bu(e){let t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function Su(e,t,n,r,i,a,o,s){return!(e===o&&t===s)&&xu(e,t,n,r,i,a,o,s)}function Cu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!ku(e,t)&&(Au(e,t)&&Au(t,e)&&ju(e,t)&&(wu(e.prev,e,t.prev)||wu(e,t.prev,t))||Tu(e,t)&&wu(e.prev,e,e.next)>0&&wu(t.prev,t,t.next)>0)}function wu(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Tu(e,t){return e.x===t.x&&e.y===t.y}function Eu(e,t,n,r){let i=Ou(wu(e,t,n)),a=Ou(wu(e,t,r)),o=Ou(wu(n,r,e)),s=Ou(wu(n,r,t));return!!(i!==a&&o!==s||i===0&&Du(e,n,t)||a===0&&Du(e,r,t)||o===0&&Du(n,e,r)||s===0&&Du(n,t,r))}function Du(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Ou(e){return e>0?1:e<0?-1:0}function ku(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Eu(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Au(e,t){return wu(e.prev,e,e.next)<0?wu(e,t,e.next)>=0&&wu(e,e.prev,t)>=0:wu(e,t,e.prev)<0||wu(e,e.next,t)<0}function ju(e,t){let n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function Mu(e,t){let n=Fu(e.i,e.x,e.y),r=Fu(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function Nu(e,t,n,r){let i=Fu(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Pu(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Fu(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Iu(e,t,n,r){let i=0;for(let a=t,o=n-r;a2&&e[t-1].equals(e[0])&&e.pop()}function Bu(e,t){for(let n=0;n2**-52){let d=Math.sqrt(u),f=Math.sqrt(c*c+l*l),p=t.x-s/d,m=t.y+o/d,h=n.x-l/f,g=n.y+c/f,_=((h-p)*l-(g-m)*c)/(o*l-s*c);r=p+o*_-e.x,i=m+s*_-e.y;let v=r*r+i*i;if(v<=2)return new X(r,i);a=Math.sqrt(v/2)}else{let e=!1;o>2**-52?c>2**-52&&(e=!0):o<-(2**-52)?c<-(2**-52)&&(e=!0):Math.sign(s)===Math.sign(l)&&(e=!0),e?(r=-s,i=o,a=Math.sqrt(u)):(r=o,i=s,a=Math.sqrt(u/2))}return new X(r/a,i/a)}let j=[];for(let e=0,t=D.length,n=t-1,r=e+1;e=0;e--){let t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+f;for(let e=0,t=D.length;e=0;){let r=n,i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+p*2;e0)&&f.push(t,i,c),(e!==n-1||s0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:``,PHYSICAL:``},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}},ld=class extends ao{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type=`MeshPhongMaterial`,this.color=new Q(16777215),this.specular=new Q(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Q(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new X(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new xa,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},ud=class extends ao{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:``},this.type=`MeshToonMaterial`,this.color=new Q(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Q(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new X(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},dd=class extends ao{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type=`MeshNormalMaterial`,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new X(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}},fd=class extends ao{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type=`MeshLambertMaterial`,this.color=new Q(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Q(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new X(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new xa,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},pd=class extends ao{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=Yn,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},md=class extends ao{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}},hd=class extends ao{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:``},this.type=`MeshMatcapMaterial`,this.color=new Q(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new X(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:``},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}},gd=class extends Vc{constructor(e){super(),this.isLineDashedMaterial=!0,this.type=`LineDashedMaterial`,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};function _d(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT==`number`?new t(e):Array.prototype.slice.call(e)}function vd(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yd(e){function t(t,n){return e[t]-e[n]}let n=e.length,r=Array(n);for(let e=0;e!==n;++e)r[e]=e;return r.sort(t),r}function bd(e,t,n){let r=e.length,i=new e.constructor(r);for(let a=0,o=0;o!==r;++a){let r=n[a]*t;for(let n=0;n!==t;++n)i[o++]=e[r+n]}return i}function xd(e,t,n,r){let i=1,a=e[0];for(;a!==void 0&&a[r]===void 0;)a=e[i++];if(a===void 0)return;let o=a[r];if(o!==void 0)if(Array.isArray(o))do o=a[r],o!==void 0&&(t.push(a.time),n.push(...o)),a=e[i++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[r],o!==void 0&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++];while(a!==void 0);else do o=a[r],o!==void 0&&(t.push(a.time),n.push(o)),a=e[i++];while(a!==void 0)}function Sd(e,t,n,r,i=30){let a=e.clone();a.name=t;let o=[];for(let e=0;e=r)){c.push(t.times[e]);for(let n=0;na.tracks[e].times[0]&&(s=a.tracks[e].times[0]);for(let e=0;e=r.times[d]){let e=d*c+s,t=e+c-s;f=r.values.slice(e,t)}else{let e=r.createInterpolant(),t=s,n=c-s;e.evaluate(a),f=e.resultBuffer.slice(t,n)}i===`quaternion`&&new fi().fromArray(f).normalize().conjugate().toArray(f);let p=o.times.length;for(let e=0;e=i)){let o=t[1];e=i)break seek}a=n,n=0;break linear_scan}break validate_interval}for(;n>>1;et;)--a;if(++a,i!==0||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(Fr(`KeyframeTrack: Invalid value size in track.`,this),e=!1);let n=this.times,r=this.values,i=n.length;i===0&&(Fr(`KeyframeTrack: Track is empty.`,this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if(typeof r==`number`&&isNaN(r)){Fr(`KeyframeTrack: Time is not a valid number.`,this,t,r),e=!1;break}if(a!==null&&a>r){Fr(`KeyframeTrack: Out of order keys.`,this,t,r,a),e=!1;break}a=r}if(r!==void 0&&vd(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){Fr(`KeyframeTrack: Value is not a valid number.`,this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===Un,i=e.length-1,a=1;for(let o=1;o0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a===e.length?(this.times=e,this.values=t):(this.times=e.slice(0,a),this.values=t.slice(0,a*n)),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};kd.prototype.ValueTypeName=``,kd.prototype.TimeBufferType=Float32Array,kd.prototype.ValueBufferType=Float32Array,kd.prototype.DefaultInterpolation=Hn;var Ad=class extends kd{constructor(e,t,n){super(e,t,n)}};Ad.prototype.ValueTypeName=`bool`,Ad.prototype.ValueBufferType=Array,Ad.prototype.DefaultInterpolation=Vn,Ad.prototype.InterpolantFactoryMethodLinear=void 0,Ad.prototype.InterpolantFactoryMethodSmooth=void 0;var jd=class extends kd{constructor(e,t,n,r){super(e,t,n,r)}};jd.prototype.ValueTypeName=`color`;var Md=class extends kd{constructor(e,t,n,r){super(e,t,n,r)}};Md.prototype.ValueTypeName=`number`;var Nd=class extends Td{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),c=e*o;for(let e=c+o;c!==e;c+=4)fi.slerpFlat(i,0,a,c-o,a,c,s);return i}},Pd=class extends kd{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new Nd(this.times,this.values,this.getValueSize(),e)}};Pd.prototype.ValueTypeName=`quaternion`,Pd.prototype.InterpolantFactoryMethodSmooth=void 0;var Fd=class extends kd{constructor(e,t,n){super(e,t,n)}};Fd.prototype.ValueTypeName=`string`,Fd.prototype.ValueBufferType=Array,Fd.prototype.DefaultInterpolation=Vn,Fd.prototype.InterpolantFactoryMethodLinear=void 0,Fd.prototype.InterpolantFactoryMethodSmooth=void 0;var Id=class extends kd{constructor(e,t,n,r){super(e,t,n,r)}};Id.prototype.ValueTypeName=`vector`;var Ld=class{constructor(e=``,t=-1,n=[],r=qn){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Ur(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(zd(n[e]).scale(r));let i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i.userData=JSON.parse(e.userData||`{}`),i}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let e=0,r=n.length;e!==r;++e)t.push(kd.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let i=t.length,a=[];for(let e=0;e1){let e=a[1],t=r[e];t||(r[e]=t=[]),t.push(n)}}let a=[];for(let e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}static parseAnimation(e,t){if(Y(`AnimationClip: parseAnimation() is deprecated and will be removed with r185`),!e)return Fr(`AnimationClip: No animation in JSONLoader data.`),null;let n=function(e,t,n,r,i){if(n.length!==0){let a=[],o=[];xd(n,a,o,r),a.length!==0&&i.push(new e(t,a,o))}},r=[],i=e.name||`default`,a=e.fps||30,o=e.blendMode,s=e.length||-1,c=e.hierarchy||[];for(let e=0;e{t&&t(i),this.manager.itemEnd(e)},0),i;if(Wd[e]!==void 0){Wd[e].push({onLoad:t,onProgress:n,onError:r});return}Wd[e]=[],Wd[e].push({onLoad:t,onProgress:n,onError:r});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?`include`:`same-origin`,signal:typeof AbortSignal.any==`function`?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,s=this.responseType;fetch(a).then(t=>{if(t.status===200||t.status===0){if(t.status===0&&Y(`FileLoader: HTTP Status 0 received.`),typeof ReadableStream>`u`||t.body===void 0||t.body.getReader===void 0)return t;let n=Wd[e],r=t.body.getReader(),i=t.headers.get(`X-File-Size`)||t.headers.get(`Content-Length`),a=i?parseInt(i):0,o=a!==0,s=0,c=new ReadableStream({start(e){t();function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{s+=i.byteLength;let r=new ProgressEvent(`progress`,{lengthComputable:o,loaded:s,total:a});for(let e=0,t=n.length;e{e.error(t)})}}});return new Response(c)}else throw new Gd(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(s){case`arraybuffer`:return e.arrayBuffer();case`blob`:return e.blob();case`document`:return e.text().then(e=>new DOMParser().parseFromString(e,o));case`json`:return e.json();default:if(o===``)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(o),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{Bd.add(`file:${e}`,t);let n=Wd[e];delete Wd[e];for(let e=0,r=n.length;e{let n=Wd[e];if(n===void 0)throw this.manager.itemError(e),t;delete Wd[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},qd=class extends Ud{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new Kd(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):Fr(t),i.manager.itemError(e)}},n,r)}parse(e){let t=[];for(let n=0;n0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(let t in e.uniforms){let i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case`t`:r.uniforms[t].value=n(i.value);break;case`c`:r.uniforms[t].value=new Q().setHex(i.value);break;case`v2`:r.uniforms[t].value=new X().fromArray(i.value);break;case`v3`:r.uniforms[t].value=new Z().fromArray(i.value);break;case`v4`:r.uniforms[t].value=new ji().fromArray(i.value);break;case`m3`:r.uniforms[t].value=new hi().fromArray(i.value);break;case`m4`:r.uniforms[t].value=new da().fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(let t in e.extensions)r.extensions[t]=e.extensions[t];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let t=e.normalScale;Array.isArray(t)===!1&&(t=[t,t]),r.normalScale=new X().fromArray(t)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new X().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(t){return e.createMaterialFromType(t)}static createMaterialFromType(e){return new{ShadowMaterial:ad,SpriteMaterial:Ss,RawShaderMaterial:od,ShaderMaterial:ns,PointsMaterial:tl,MeshPhysicalMaterial:cd,MeshStandardMaterial:sd,MeshPhongMaterial:ld,MeshToonMaterial:ud,MeshNormalMaterial:dd,MeshLambertMaterial:fd,MeshDepthMaterial:pd,MeshDistanceMaterial:md,MeshBasicMaterial:oo,MeshMatcapMaterial:hd,LineDashedMaterial:gd,LineBasicMaterial:Vc,Material:ao}[e]}},Sf=class{static extractUrlBase(e){let t=e.lastIndexOf(`/`);return t===-1?`./`:e.slice(0,t+1)}static resolveURL(e,t){return typeof e!=`string`||e===``?``:(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,`$1`)),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}},Cf=class extends No{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=`InstancedBufferGeometry`,this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}},wf=class extends Ud{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new Kd(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):Fr(t),i.manager.itemError(e)}},n,r)}parse(e){let t={},n={};function r(e,n){if(t[n]!==void 0)return t[n];let r=e.interleavedBuffers[n],a=i(e,r.buffer),o=new ys(Dr(r.type,a),r.stride);return o.uuid=r.uuid,t[n]=o,o}function i(e,t){if(n[t]!==void 0)return n[t];let r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}let a=e.isInstancedBufferGeometry?new Cf:new No,o=e.data.index;if(o!==void 0){let e=Dr(o.type,o.array);a.setIndex(new go(e,1))}let s=e.data.attributes;for(let t in s){let n=s[t],i;if(n.isInterleavedBufferAttribute)i=new xs(r(e.data,n.data),n.itemSize,n.offset,n.normalized);else{let e=Dr(n.type,n.array);i=new(n.isInstancedBufferAttribute?nc:go)(e,n.itemSize,n.normalized)}n.name!==void 0&&(i.name=n.name),n.usage!==void 0&&i.setUsage(n.usage),a.setAttribute(t,i)}let c=e.data.morphAttributes;if(c)for(let t in c){let n=c[t],i=[];for(let t=0,a=n.length;t0){i=new Xd(new Vd(t)),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t0){r=new Xd(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t{let t=null,n=null;return e.boundingBox!==void 0&&(t=new Ri().fromJSON(e.boundingBox)),e.boundingSphere!==void 0&&(n=new na().fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:n}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(a._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(a.boundingSphere=new na().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(a.boundingBox=new Ri().fromJSON(e.boundingBox));break;case`LOD`:a=new Bs;break;case`Line`:a=new Yc(o(e.geometry),s(e.material));break;case`LineLoop`:a=new el(o(e.geometry),s(e.material));break;case`LineSegments`:a=new $c(o(e.geometry),s(e.material));break;case`PointCloud`:case`Points`:a=new ol(o(e.geometry),s(e.material));break;case`Sprite`:a=new Is(s(e.material));break;case`Group`:a=new ps;break;case`Bone`:a=new Zs;break;default:a=new Ra}if(a.uuid=e.uuid,e.name!==void 0&&(a.name=e.name),e.matrix===void 0?(e.position!==void 0&&a.position.fromArray(e.position),e.rotation!==void 0&&a.rotation.fromArray(e.rotation),e.quaternion!==void 0&&a.quaternion.fromArray(e.quaternion),e.scale!==void 0&&a.scale.fromArray(e.scale)):(a.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)),e.up!==void 0&&a.up.fromArray(e.up),e.castShadow!==void 0&&(a.castShadow=e.castShadow),e.receiveShadow!==void 0&&(a.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(a.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(a.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(a.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(a.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(a.visible=e.visible),e.frustumCulled!==void 0&&(a.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(a.renderOrder=e.renderOrder),e.userData!==void 0&&(a.userData=e.userData),e.layers!==void 0&&(a.layers.mask=e.layers),e.children!==void 0){let o=e.children;for(let e=0;e`u`&&Y(`ImageBitmapLoader: createImageBitmap() not supported.`),typeof fetch>`u`&&Y(`ImageBitmapLoader: fetch() not supported.`),this.options={premultiplyAlpha:`none`},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=``),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let i=this,a=Bd.get(`image-bitmap:${e}`);if(a!==void 0){if(i.manager.itemStart(e),a.then){a.then(n=>{if(kf.has(a)===!0)r&&r(kf.get(a)),i.manager.itemError(e),i.manager.itemEnd(e);else return t&&t(n),i.manager.itemEnd(e),n});return}return setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a}let o={};o.credentials=this.crossOrigin===`anonymous`?`same-origin`:`include`,o.headers=this.requestHeader,o.signal=typeof AbortSignal.any==`function`?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let s=fetch(e,o).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:`none`}))}).then(function(n){return Bd.add(`image-bitmap:${e}`,n),t&&t(n),i.manager.itemEnd(e),n}).catch(function(t){r&&r(t),kf.set(s,t),Bd.remove(`image-bitmap:${e}`),i.manager.itemError(e),i.manager.itemEnd(e)});Bd.add(`image-bitmap:${e}`,s),i.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},jf,Mf=class{static getContext(){return jf===void 0&&(jf=new(window.AudioContext||window.webkitAudioContext)),jf}static setContext(e){jf=e}},Nf=class extends Ud{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new Kd(this.manager);a.setResponseType(`arraybuffer`),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{let n=e.slice(0);Mf.getContext().decodeAudioData(n,function(e){t(e)}).catch(o)}catch(e){o(e)}},n,r);function o(t){r?r(t):Fr(t),i.manager.itemError(e)}}},Pf=new da,Ff=new da,If=new da,Lf=class{constructor(){this.type=`StereoCamera`,this.aspect=1,this.eyeSep=.064,this.cameraL=new ss,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ss,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,If.copy(e.projectionMatrix);let n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(Vr*t.fov*.5)/t.zoom,a,o;Ff.elements[12]=-n,Pf.elements[12]=n,a=-i*t.aspect+r,o=i*t.aspect+r,If.elements[0]=2*t.near/(o-a),If.elements[8]=(o+a)/(o-a),this.cameraL.projectionMatrix.copy(If),a=-i*t.aspect-r,o=i*t.aspect-r,If.elements[0]=2*t.near/(o-a),If.elements[8]=(o+a)/(o-a),this.cameraR.projectionMatrix.copy(If)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Ff),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Pf)}},Rf=class extends ss{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}},zf=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}},Bf=new Z,Vf=new fi,Hf=new Z,Uf=new Z,Wf=new Z,Gf=class extends Ra{constructor(){super(),this.type=`AudioListener`,this.context=Mf.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new zf}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter===null?this.gain.disconnect(this.context.destination):(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Bf,Vf,Hf),Uf.set(0,0,-1).applyQuaternion(Vf),Wf.set(0,1,0).applyQuaternion(Vf),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Bf.x,e),t.positionY.linearRampToValueAtTime(Bf.y,e),t.positionZ.linearRampToValueAtTime(Bf.z,e),t.forwardX.linearRampToValueAtTime(Uf.x,e),t.forwardY.linearRampToValueAtTime(Uf.y,e),t.forwardZ.linearRampToValueAtTime(Uf.z,e),t.upX.linearRampToValueAtTime(Wf.x,e),t.upY.linearRampToValueAtTime(Wf.y,e),t.upZ.linearRampToValueAtTime(Wf.z,e)}else t.setPosition(Bf.x,Bf.y,Bf.z),t.setOrientation(Uf.x,Uf.y,Uf.z,Wf.x,Wf.y,Wf.z)}},Kf=class extends Ra{constructor(e){super(),this.type=`Audio`,this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType=`empty`,this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType=`audioNode`,this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType=`mediaNode`,this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType=`mediaStreamNode`,this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType=`buffer`,this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){Y(`Audio: Audio is already playing.`);return}if(this.hasPlaybackControl===!1){Y(`Audio: this Audio has no playback control.`);return}this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){Y(`Audio: this Audio has no playback control.`);return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress%=this.duration||this.buffer.duration),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){Y(`Audio: this Audio has no playback control.`);return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){o.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){fi.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){let a=this._workIndex*i;fi.multiplyQuaternionsFlat(e,a,e,t,e,n),fi.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){let a=1-r;for(let o=0;o!==i;++o){let i=t+o;e[i]=e[i]*a+e[n+o]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){let i=t+a;e[i]=e[i]+e[n+a]*r}}},ep=`\\[\\]\\.:\\/`,tp=RegExp(`[`+ep+`]`,`g`),np=`[^`+ep+`]`,rp=`[^`+ep.replace(`\\.`,``)+`]`,ip=`((?:WC+[\\/:])*)`.replace(`WC`,np),ap=`(WCOD+)?`.replace(`WCOD`,rp),op=`(?:\\.(WC+)(?:\\[(.+)\\])?)?`.replace(`WC`,np),sp=`\\.(WC+)(?:\\[(.+)\\])?`.replace(`WC`,np),cp=RegExp(`^`+ip+ap+op+sp+`$`),lp=[`material`,`materials`,`bones`,`map`],up=class{constructor(e,t,n){let r=n||dp.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},dp=class e{constructor(t,n,r){this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new e.Composite(t,n,r):new e(t,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,`_`).replace(tp,``)}static parseTrackName(e){let t=cp.exec(e);if(t===null)throw Error(`PropertyBinding: Cannot parse trackName: `+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(`.`);if(r!==void 0&&r!==-1){let e=n.nodeName.substring(r+1);lp.indexOf(e)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(n.propertyName===null||n.propertyName.length===0)throw Error(`PropertyBinding: can not parse propertyName from trackName: `+e);return n}static findNode(e,t){if(t===void 0||t===``||t===`.`||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(e){for(let r=0;r=i){let a=i++,l=e[a];t[l.uuid]=c,e[c]=l,t[s]=a,e[a]=o;for(let e=0,t=r;e!==t;++e){let t=n[e],r=t[a],i=t[c];t[c]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,a=e.length;for(let o=0,s=arguments.length;o!==s;++o){let s=arguments[o].uuid,c=t[s];if(c!==void 0)if(delete t[s],c0&&(t[o.uuid]=c),e[c]=o,e.pop();for(let e=0,t=r;e!==t;++e){let t=n[e];t[c]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(r!==void 0)return i[r];let a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,l=this.nCachedObjects_,u=Array(c);r=i.length,n[e]=r,a.push(e),o.push(t),i.push(u);for(let n=l,r=s.length;n!==r;++n){let r=s[n];u[n]=new dp(r,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){let r=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o],c=e[o];t[c]=n,a[n]=s,a.pop(),i[n]=i[o],i.pop(),r[n]=r[o],r.pop()}}},pp=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let i=t.tracks,a=i.length,o=Array(a),s={endingStart:Wn,endingEnd:Wn};for(let e=0;e!==a;++e){let t=i[e].createInterpolant(null);o[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=zn,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){let n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,i=r.time,a=this.timeScale,o=this._timeScaleInterpolant;o===null&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);let s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=e/a,c[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}let i=this._startTime;if(i!==null){let r=(e-i)*n;r<0||n===0?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);let a=this._updateTime(t),o=this._updateWeight(e);if(o>0){let e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case Jn:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(o);break;case qn:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,a=n===Bn;if(e===0)return i===-1?r:a&&(i&1)==1?t-r:r;if(n===2200){i===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));handle_stop:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break handle_stop}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:`finished`,action:this,direction:e<0?-1:1})}}else{if(i===-1&&(e>=0?(i=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),r>=t||r<0){let n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);let o=this.repetitions-i;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:`finished`,action:this,direction:e>0?1:-1});else{if(o===1){let t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:`loop`,action:this,loopDelta:n})}}else this.time=r;if(a&&(i&1)==1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=Gn,r.endingEnd=Gn):(e?r.endingStart=this.zeroSlopeAtStart?Gn:Wn:r.endingStart=Kn,t?r.endingEnd=this.zeroSlopeAtEnd?Gn:Wn:r.endingEnd=Kn)}_scheduleFading(e,t,n){let r=this._mixer,i=r.time,a=this._weightInterpolant;a===null&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);let o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}},mp=new Float32Array(1),hp=class extends Rr{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];l===void 0&&(l={},c[s]=l);for(let e=0;e!==i;++e){let i=r[e],c=i.name,u=l[c];if(u!==void 0)++u.referenceCount,a[e]=u;else{if(u=a[e],u!==void 0){u._cacheIndex===null&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}let r=t&&t._propertyBindings[e].binding.parsedPath;u=new $f(dp.create(n,c,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c),a[e]=u}o[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];n.useCount++===0&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];--n.useCount===0&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let o=0;o!==n;++o)t[o]._update(r,e,i,a);let o=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)o[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,jp).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},Np=new Z,Pp=new Z,Fp=new Z,Ip=new Z,Lp=new Z,Rp=new Z,zp=new Z,Bp=class{constructor(e=new Z,t=new Z){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Np.subVectors(e,this.start),Pp.subVectors(this.end,this.start);let n=Pp.dot(Pp),r=Pp.dot(Np)/n;return t&&(r=Wr(r,0,1)),r}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}distanceSqToLine3(e,t=Rp,n=zp){let r=1e-8*1e-8,i,a,o=this.start,s=e.start,c=this.end,l=e.end;Fp.subVectors(c,o),Ip.subVectors(l,s),Lp.subVectors(o,s);let u=Fp.dot(Fp),d=Ip.dot(Ip),f=Ip.dot(Lp);if(u<=r&&d<=r)return t.copy(o),n.copy(s),t.sub(n),t.dot(t);if(u<=r)i=0,a=f/d,a=Wr(a,0,1);else{let e=Fp.dot(Lp);if(d<=r)a=0,i=Wr(-e/u,0,1);else{let t=Fp.dot(Ip),n=u*d-t*t;i=n===0?0:Wr((t*f-e*d)/n,0,1),a=(t*i+f)/d,a<0?(a=0,i=Wr(-e/u,0,1)):a>1&&(a=1,i=Wr((t-e)/u,0,1))}}return t.copy(o).add(Fp.multiplyScalar(i)),n.copy(s).add(Ip.multiplyScalar(a)),t.sub(n),t.dot(t)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},Vp=new Z,Hp=class extends Ra{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type=`SpotLightHelper`;let n=new No,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1;e<32;e++,t++){let n=e/32*Math.PI*2,i=t/32*Math.PI*2;r.push(Math.cos(n),Math.sin(n),1,Math.cos(i),Math.sin(i),1)}n.setAttribute(`position`,new To(r,3)),this.cone=new $c(n,new Vc({fog:!1,toneMapped:!1})),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);let e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Vp.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Vp),this.color===void 0?this.cone.material.color.copy(this.light.color):this.cone.material.color.set(this.color)}},Up=new Z,Wp=new da,Gp=new da,Kp=class extends $c{constructor(e){let t=qp(e),n=new No,r=[],i=[];for(let e=0;e1)for(let n=0;n.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{pm.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(pm,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},_m=class extends $c{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new No;r.setAttribute(`position`,new To(t,3)),r.setAttribute(`color`,new To(n,3));let i=new Vc({vertexColors:!0,toneMapped:!1});super(r,i),this.type=`AxesHelper`}setColors(e,t,n){let r=new Q,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},vm=class{constructor(){this.type=`ShapePath`,this.color=new Q,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new nu,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e){let t=[];for(let n=0,r=e.length;n2**-52){if(c<0&&(n=t[a],s=-s,o=t[i],c=-c),e.yo.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{let t=c*(e.x-n.x)-s*(e.y-n.y);if(t===0)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(o.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=o.x)return!0}}return r}let r=Ru.isClockWise,i=this.subPaths;if(i.length===0)return[];let a,o,s,c=[];if(i.length===1)return o=i[0],s=new ru,s.curves=o.curves,c.push(s),c;let l=!r(i[0].getPoints());l=e?!l:l;let u=[],d=[],f=[],p=0,m;d[p]=void 0,f[p]=[];for(let t=0,n=i.length;t1){let e=!1,t=0;for(let e=0,t=d.length;e0&&e===!1&&(f=u)}let h;for(let e=0,t=d.length;et?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}function xm(e,t){let n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}function Sm(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}function Cm(e,t,n,r){let i=wm(r);switch(n){case Jt:return e*t;case $t:return e*t/i.components*i.byteLength;case en:return e*t/i.components*i.byteLength;case tn:return e*t*2/i.components*i.byteLength;case nn:return e*t*2/i.components*i.byteLength;case Yt:return e*t*3/i.components*i.byteLength;case Xt:return e*t*4/i.components*i.byteLength;case an:return e*t*4/i.components*i.byteLength;case on:case sn:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case cn:case ln:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case dn:case pn:return Math.max(e,16)*Math.max(t,8)/4;case un:case fn:return Math.max(e,8)*Math.max(t,8)/2;case mn:case hn:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case gn:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case _n:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case vn:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case yn:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case bn:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case xn:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case Sn:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case Cn:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case wn:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case Tn:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case En:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case Dn:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case On:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case kn:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case An:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case jn:case Mn:case Nn:return Math.ceil(e/4)*Math.ceil(t/4)*16;case Pn:case Fn:return Math.ceil(e/4)*Math.ceil(t/4)*8;case In:case Ln:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw Error(`Unable to determine texture byte length for ${n} format.`)}function wm(e){switch(e){case Ft:case It:return{byteLength:1,components:1};case Rt:case Lt:case Ht:return{byteLength:2,components:1};case Ut:case Wt:return{byteLength:2,components:4};case Bt:case zt:case Vt:return{byteLength:4,components:1};case Kt:case qt:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${e}.`)}var Tm=class{static contain(e,t){return bm(e,t)}static cover(e,t){return xm(e,t)}static fill(e){return Sm(e)}static getByteLength(e,t,n,r){return Cm(e,t,n,r)}};typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:`181`}})),typeof window<`u`&&(window.__THREE__?Y(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=`181`);var Em=F({ACESFilmicToneMapping:()=>4,AddEquation:()=>100,AddOperation:()=>2,AdditiveAnimationBlendMode:()=>Jn,AdditiveBlending:()=>2,AgXToneMapping:()=>6,AlphaFormat:()=>Jt,AlwaysCompare:()=>519,AlwaysDepth:()=>1,AlwaysStencilFunc:()=>519,AmbientLight:()=>_f,AnimationAction:()=>pp,AnimationClip:()=>Ld,AnimationLoader:()=>qd,AnimationMixer:()=>hp,AnimationObjectGroup:()=>fp,AnimationUtils:()=>wd,ArcCurve:()=>Al,ArrayCamera:()=>Rf,ArrowHelper:()=>gm,AttachedBindMode:()=>bt,Audio:()=>Kf,AudioAnalyser:()=>Qf,AudioContext:()=>Mf,AudioListener:()=>Gf,AudioLoader:()=>Nf,AxesHelper:()=>_m,BackSide:()=>1,BasicDepthPacking:()=>Yn,BasicShadowMap:()=>0,BatchedMesh:()=>Bc,Bone:()=>Zs,BooleanKeyframeTrack:()=>Ad,Box2:()=>Mp,Box3:()=>Ri,Box3Helper:()=>dm,BoxGeometry:()=>Jo,BoxHelper:()=>um,BufferAttribute:()=>go,BufferGeometry:()=>No,BufferGeometryLoader:()=>wf,ByteType:()=>It,Cache:()=>Bd,Camera:()=>rs,CameraHelper:()=>sm,CanvasTexture:()=>ml,CapsuleGeometry:()=>_l,CatmullRomCurve3:()=>Il,CineonToneMapping:()=>3,CircleGeometry:()=>vl,ClampToEdgeWrapping:()=>Ct,Clock:()=>zf,Color:()=>Q,ColorKeyframeTrack:()=>jd,ColorManagement:()=>bi,CompressedArrayTexture:()=>fl,CompressedCubeTexture:()=>pl,CompressedTexture:()=>dl,CompressedTextureLoader:()=>Jd,ConeGeometry:()=>bl,ConstantAlphaFactor:()=>213,ConstantColorFactor:()=>211,Controls:()=>ym,CubeCamera:()=>us,CubeReflectionMapping:()=>301,CubeRefractionMapping:()=>302,CubeTexture:()=>ds,CubeTextureLoader:()=>Zd,CubeUVReflectionMapping:()=>306,CubicBezierCurve:()=>ql,CubicBezierCurve3:()=>Jl,CubicInterpolant:()=>Ed,CullFaceBack:()=>1,CullFaceFront:()=>2,CullFaceFrontBack:()=>3,CullFaceNone:()=>0,Curve:()=>Ol,CurvePath:()=>tu,CustomBlending:()=>5,CustomToneMapping:()=>5,CylinderGeometry:()=>yl,Cylindrical:()=>kp,Data3DTexture:()=>Ii,DataArrayTexture:()=>Pi,DataTexture:()=>Qs,DataTextureLoader:()=>Qd,DataUtils:()=>fo,DecrementStencilOp:()=>or,DecrementWrapStencilOp:()=>cr,DefaultLoadingManager:()=>Hd,DepthFormat:()=>Zt,DepthStencilFormat:()=>Qt,DepthTexture:()=>hl,DetachedBindMode:()=>xt,DirectionalLight:()=>gf,DirectionalLightHelper:()=>im,DiscreteInterpolant:()=>Od,DodecahedronGeometry:()=>Sl,DoubleSide:()=>2,DstAlphaFactor:()=>206,DstColorFactor:()=>208,DynamicCopyUsage:()=>_r,DynamicDrawUsage:()=>dr,DynamicReadUsage:()=>mr,EdgesGeometry:()=>Dl,EllipseCurve:()=>kl,EqualCompare:()=>514,EqualDepth:()=>4,EqualStencilFunc:()=>514,EquirectangularReflectionMapping:()=>303,EquirectangularRefractionMapping:()=>304,Euler:()=>xa,EventDispatcher:()=>Rr,ExternalTexture:()=>gl,ExtrudeGeometry:()=>Vu,FileLoader:()=>Kd,Float16BufferAttribute:()=>wo,Float32BufferAttribute:()=>To,FloatType:()=>Vt,Fog:()=>_s,FogExp2:()=>gs,FramebufferTexture:()=>ul,FrontSide:()=>0,Frustum:()=>vc,FrustumArray:()=>xc,GLBufferAttribute:()=>xp,GLSL1:()=>`100`,GLSL3:()=>yr,GreaterCompare:()=>516,GreaterDepth:()=>6,GreaterEqualCompare:()=>518,GreaterEqualDepth:()=>5,GreaterEqualStencilFunc:()=>518,GreaterStencilFunc:()=>516,GridHelper:()=>$p,Group:()=>ps,HalfFloatType:()=>Ht,HemisphereLight:()=>tf,HemisphereLightHelper:()=>Qp,IcosahedronGeometry:()=>Wu,ImageBitmapLoader:()=>Af,ImageLoader:()=>Xd,ImageUtils:()=>wi,IncrementStencilOp:()=>ar,IncrementWrapStencilOp:()=>sr,InstancedBufferAttribute:()=>nc,InstancedBufferGeometry:()=>Cf,InstancedInterleavedBuffer:()=>bp,InstancedMesh:()=>uc,Int16BufferAttribute:()=>bo,Int32BufferAttribute:()=>So,Int8BufferAttribute:()=>_o,IntType:()=>zt,InterleavedBuffer:()=>ys,InterleavedBufferAttribute:()=>xs,Interpolant:()=>Td,InterpolateDiscrete:()=>Vn,InterpolateLinear:()=>Hn,InterpolateSmooth:()=>Un,InterpolationSamplingMode:()=>wr,InterpolationSamplingType:()=>Cr,InvertStencilOp:()=>lr,KeepStencilOp:()=>rr,KeyframeTrack:()=>kd,LOD:()=>Bs,LatheGeometry:()=>Gu,Layers:()=>Sa,LessCompare:()=>513,LessDepth:()=>2,LessEqualCompare:()=>515,LessEqualDepth:()=>3,LessEqualStencilFunc:()=>515,LessStencilFunc:()=>513,Light:()=>ef,LightProbe:()=>bf,Line:()=>Yc,Line3:()=>Bp,LineBasicMaterial:()=>Vc,LineCurve:()=>Yl,LineCurve3:()=>Xl,LineDashedMaterial:()=>gd,LineLoop:()=>el,LineSegments:()=>$c,LinearFilter:()=>At,LinearInterpolant:()=>Dd,LinearMipMapLinearFilter:()=>Pt,LinearMipMapNearestFilter:()=>Mt,LinearMipmapLinearFilter:()=>Nt,LinearMipmapNearestFilter:()=>jt,LinearSRGBColorSpace:()=>er,LinearToneMapping:()=>1,LinearTransfer:()=>tr,Loader:()=>Ud,LoaderUtils:()=>Sf,LoadingManager:()=>Vd,LoopOnce:()=>Rn,LoopPingPong:()=>Bn,LoopRepeat:()=>zn,MOUSE:()=>vt,Material:()=>ao,MaterialLoader:()=>xf,MathUtils:()=>di,Matrix2:()=>Ap,Matrix3:()=>hi,Matrix4:()=>da,MaxEquation:()=>104,Mesh:()=>Go,MeshBasicMaterial:()=>oo,MeshDepthMaterial:()=>pd,MeshDistanceMaterial:()=>md,MeshLambertMaterial:()=>fd,MeshMatcapMaterial:()=>hd,MeshNormalMaterial:()=>dd,MeshPhongMaterial:()=>ld,MeshPhysicalMaterial:()=>cd,MeshStandardMaterial:()=>sd,MeshToonMaterial:()=>ud,MinEquation:()=>103,MirroredRepeatWrapping:()=>wt,MixOperation:()=>1,MultiplyBlending:()=>4,MultiplyOperation:()=>0,NearestFilter:()=>Tt,NearestMipMapLinearFilter:()=>kt,NearestMipMapNearestFilter:()=>Dt,NearestMipmapLinearFilter:()=>Ot,NearestMipmapNearestFilter:()=>Et,NeutralToneMapping:()=>7,NeverCompare:()=>512,NeverDepth:()=>0,NeverStencilFunc:()=>512,NoBlending:()=>0,NoColorSpace:()=>``,NoToneMapping:()=>0,NormalAnimationBlendMode:()=>qn,NormalBlending:()=>1,NotEqualCompare:()=>517,NotEqualDepth:()=>7,NotEqualStencilFunc:()=>517,NumberKeyframeTrack:()=>Md,Object3D:()=>Ra,ObjectLoader:()=>Tf,ObjectSpaceNormalMap:()=>1,OctahedronGeometry:()=>Ku,OneFactor:()=>201,OneMinusConstantAlphaFactor:()=>214,OneMinusConstantColorFactor:()=>212,OneMinusDstAlphaFactor:()=>207,OneMinusDstColorFactor:()=>209,OneMinusSrcAlphaFactor:()=>205,OneMinusSrcColorFactor:()=>203,OrthographicCamera:()=>mf,PCFShadowMap:()=>1,PCFSoftShadowMap:()=>2,PMREMGenerator:()=>Zm,Path:()=>nu,PerspectiveCamera:()=>ss,Plane:()=>mc,PlaneGeometry:()=>qu,PlaneHelper:()=>fm,PointLight:()=>pf,PointLightHelper:()=>Jp,Points:()=>ol,PointsMaterial:()=>tl,PolarGridHelper:()=>em,PolyhedronGeometry:()=>xl,PositionalAudio:()=>Zf,PropertyBinding:()=>dp,PropertyMixer:()=>$f,QuadraticBezierCurve:()=>Zl,QuadraticBezierCurve3:()=>Ql,Quaternion:()=>fi,QuaternionKeyframeTrack:()=>Pd,QuaternionLinearInterpolant:()=>Nd,RED_GREEN_RGTC2_Format:()=>In,RED_RGTC1_Format:()=>Pn,REVISION:()=>`181`,RGBADepthPacking:()=>Xn,RGBAFormat:()=>Xt,RGBAIntegerFormat:()=>an,RGBA_ASTC_10x10_Format:()=>On,RGBA_ASTC_10x5_Format:()=>Tn,RGBA_ASTC_10x6_Format:()=>En,RGBA_ASTC_10x8_Format:()=>Dn,RGBA_ASTC_12x10_Format:()=>kn,RGBA_ASTC_12x12_Format:()=>An,RGBA_ASTC_4x4_Format:()=>_n,RGBA_ASTC_5x4_Format:()=>vn,RGBA_ASTC_5x5_Format:()=>yn,RGBA_ASTC_6x5_Format:()=>bn,RGBA_ASTC_6x6_Format:()=>xn,RGBA_ASTC_8x5_Format:()=>Sn,RGBA_ASTC_8x6_Format:()=>Cn,RGBA_ASTC_8x8_Format:()=>wn,RGBA_BPTC_Format:()=>jn,RGBA_ETC2_EAC_Format:()=>gn,RGBA_PVRTC_2BPPV1_Format:()=>pn,RGBA_PVRTC_4BPPV1_Format:()=>fn,RGBA_S3TC_DXT1_Format:()=>sn,RGBA_S3TC_DXT3_Format:()=>cn,RGBA_S3TC_DXT5_Format:()=>ln,RGBDepthPacking:()=>Zn,RGBFormat:()=>Yt,RGBIntegerFormat:()=>rn,RGB_BPTC_SIGNED_Format:()=>Mn,RGB_BPTC_UNSIGNED_Format:()=>Nn,RGB_ETC1_Format:()=>mn,RGB_ETC2_Format:()=>hn,RGB_PVRTC_2BPPV1_Format:()=>dn,RGB_PVRTC_4BPPV1_Format:()=>un,RGB_S3TC_DXT1_Format:()=>on,RGDepthPacking:()=>Qn,RGFormat:()=>tn,RGIntegerFormat:()=>nn,RawShaderMaterial:()=>od,Ray:()=>ua,Raycaster:()=>Cp,RectAreaLight:()=>vf,RedFormat:()=>$t,RedIntegerFormat:()=>en,ReinhardToneMapping:()=>2,RenderTarget:()=>Mi,RenderTarget3D:()=>gp,RepeatWrapping:()=>St,ReplaceStencilOp:()=>ir,ReverseSubtractEquation:()=>102,RingGeometry:()=>Ju,SIGNED_RED_GREEN_RGTC2_Format:()=>Ln,SIGNED_RED_RGTC1_Format:()=>Fn,SRGBColorSpace:()=>$n,SRGBTransfer:()=>nr,Scene:()=>vs,ShaderChunk:()=>km,ShaderLib:()=>Am,ShaderMaterial:()=>ns,ShadowMaterial:()=>ad,Shape:()=>ru,ShapeGeometry:()=>Yu,ShapePath:()=>vm,ShapeUtils:()=>Ru,ShortType:()=>Lt,Skeleton:()=>tc,SkeletonHelper:()=>Kp,SkinnedMesh:()=>Xs,Source:()=>Ei,Sphere:()=>na,SphereGeometry:()=>Zu,Spherical:()=>Op,SphericalHarmonics3:()=>yf,SplineCurve:()=>$l,SpotLight:()=>cf,SpotLightHelper:()=>Hp,Sprite:()=>Is,SpriteMaterial:()=>Ss,SrcAlphaFactor:()=>204,SrcAlphaSaturateFactor:()=>210,SrcColorFactor:()=>202,StaticCopyUsage:()=>gr,StaticDrawUsage:()=>ur,StaticReadUsage:()=>pr,StereoCamera:()=>Lf,StreamCopyUsage:()=>vr,StreamDrawUsage:()=>fr,StreamReadUsage:()=>hr,StringKeyframeTrack:()=>Fd,SubtractEquation:()=>101,SubtractiveBlending:()=>3,TOUCH:()=>yt,TangentSpaceNormalMap:()=>0,TetrahedronGeometry:()=>Qu,Texture:()=>Ai,TextureLoader:()=>$d,TextureUtils:()=>Tm,Timer:()=>Ep,TimestampQuery:()=>Sr,TorusGeometry:()=>$u,TorusKnotGeometry:()=>ed,Triangle:()=>Qa,TriangleFanDrawMode:()=>2,TriangleStripDrawMode:()=>1,TrianglesDrawMode:()=>0,TubeGeometry:()=>td,UVMapping:()=>300,Uint16BufferAttribute:()=>xo,Uint32BufferAttribute:()=>Co,Uint8BufferAttribute:()=>vo,Uint8ClampedBufferAttribute:()=>yo,Uniform:()=>_p,UniformsGroup:()=>yp,UniformsLib:()=>$,UniformsUtils:()=>$o,UnsignedByteType:()=>Ft,UnsignedInt101111Type:()=>qt,UnsignedInt248Type:()=>Gt,UnsignedInt5999Type:()=>Kt,UnsignedIntType:()=>Bt,UnsignedShort4444Type:()=>Ut,UnsignedShort5551Type:()=>Wt,UnsignedShortType:()=>Rt,VSMShadowMap:()=>3,Vector2:()=>X,Vector3:()=>Z,Vector4:()=>ji,VectorKeyframeTrack:()=>Id,VideoFrameTexture:()=>ll,VideoTexture:()=>cl,WebGL3DRenderTarget:()=>Li,WebGLArrayRenderTarget:()=>Fi,WebGLCoordinateSystem:()=>br,WebGLCubeRenderTarget:()=>fs,WebGLRenderTarget:()=>Ni,WebGLRenderer:()=>j_,WebGLUtils:()=>y_,WebGPUCoordinateSystem:()=>xr,WebXRController:()=>hs,WireframeGeometry:()=>nd,WrapAroundEnding:()=>Kn,ZeroCurvatureEnding:()=>Wn,ZeroFactor:()=>200,ZeroSlopeEnding:()=>Gn,ZeroStencilOp:()=>0,createCanvasElement:()=>kr,error:()=>Fr,getConsoleFunction:()=>Nr,log:()=>Pr,setConsoleFunction:()=>Mr,warn:()=>Y,warnOnce:()=>Ir});function Dm(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&n!==null&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Om(e){let t=new WeakMap;function n(t,n){let r=t.array,i=t.usage,a=r.byteLength,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();let s;if(r instanceof Float32Array)s=e.FLOAT;else if(typeof Float16Array<`u`&&r instanceof Float16Array)s=e.HALF_FLOAT;else if(r instanceof Uint16Array)s=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)s=e.SHORT;else if(r instanceof Uint32Array)s=e.UNSIGNED_INT;else if(r instanceof Int32Array)s=e.INT;else if(r instanceof Int8Array)s=e.BYTE;else if(r instanceof Uint8Array)s=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)s=e.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+r);return{buffer:o,type:s,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}function r(t,n,r){let i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),a.length===0)e.bufferSubData(r,0,i);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;e 0 + vec4 plane; + #ifdef ALPHA_TO_COVERAGE + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + if ( clipOpacity == 0.0 ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + float unionClipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + } + #pragma unroll_loop_end + clipOpacity *= 1.0 - unionClipOpacity; + #endif + diffuseColor.a *= clipOpacity; + if ( diffuseColor.a == 0.0 ) discard; + #else + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif + #endif +#endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,color_fragment:`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,color_pars_fragment:`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,color_pars_vertex:`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + varying vec3 vColor; +#endif`,color_vertex:`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif +#ifdef USE_BATCHING_COLOR + vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); + vColor.xyz *= batchingColor.xyz; +#endif`,common:`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +#ifdef USE_ALPHAHASH + varying vec3 vPosition; +#endif +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + vec3 transformedTangent = objectTangent; +#endif +#ifdef USE_BATCHING + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = bm * transformedTangent; + #endif +#endif +#ifdef USE_INSTANCING + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = im * transformedTangent; + #endif +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE + emissiveColor = sRGBTransferEOTF( emissiveColor ); + #endif + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,colorspace_fragment:`gl_FragColor = linearToOutputTexel( gl_FragColor );`,colorspace_pars_fragment:`vec4 LinearTransferOETF( in vec4 value ) { + return value; +} +vec4 sRGBTransferEOTF( in vec4 value ) { + return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); +} +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +}`,envmap_fragment:`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform mat3 envMapRotation; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif +#endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,envmap_physical_pars_fragment:`#ifdef USE_ENVMAP + vec3 getIBLIrradiance( const in vec3 normal ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_ANISOTROPY + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #endif +#endif`,envmap_vertex:`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,fog_vertex:`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,fog_pars_vertex:`#ifdef USE_FOG + varying float vFogDepth; +#endif`,fog_fragment:`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,fog_pars_fragment:`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,gradientmap_pars_fragment:`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,lights_lambert_fragment:`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,lights_lambert_pars_fragment:`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,lights_pars_begin:`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +#if defined( USE_LIGHT_PROBES ) + uniform vec3 lightProbe[ 9 ]; +#endif +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometryPosition; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometryPosition; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,lights_toon_fragment:`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment:`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,lights_phong_fragment:`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,lights_physical_fragment:`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_DISPERSION + material.dispersion = dispersion; +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif +#ifdef USE_ANISOTROPY + #ifdef USE_ANISOTROPYMAP + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + #else + vec2 anisotropyV = anisotropyVector; + #endif + material.anisotropy = length( anisotropyV ); + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); + material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; + material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; +#endif`,lights_physical_pars_fragment:`uniform sampler2D dfgLUT; +struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + float dispersion; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif +}; +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_ANISOTROPY + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + return saturate(v); + } + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + } +#endif +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + #ifdef USE_ANISOTROPY + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + #else + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + #endif + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + vec2 uv = vec2( roughness, dotNV ); + return texture2D( dfgLUT, uv ).rg; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + vec2 dfgV = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNV * dotNV), 0.0, dotNV), material.roughness ); + vec2 dfgL = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNL * dotNL), 0.0, dotNL), material.roughness ); + vec3 FssEss_V = material.specularColor * dfgV.x + material.specularF90 * dfgV.y; + vec3 FssEss_L = material.specularColor * dfgL.x + material.specularF90 * dfgL.y; + float Ess_V = dfgV.x + dfgV.y; + float Ess_L = dfgL.x + dfgL.y; + float Ems_V = 1.0 - Ess_V; + float Ems_L = 1.0 - Ess_L; + vec3 Favg = material.specularColor + ( 1.0 - material.specularColor ) * 0.047619; + vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg * Favg + EPSILON ); + float compensationFactor = Ems_V * Ems_L; + vec3 multiScatter = Fms * compensationFactor; + return singleScatter + multiScatter; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,lights_fragment_begin:` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +vec3 geometryClearcoatNormal = vec3( 0.0 ); +#ifdef USE_CLEARCOAT + geometryClearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometryPosition, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometryPosition, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #if defined( USE_LIGHT_PROBES ) + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + #ifdef USE_ANISOTROPY + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif`,logdepthbuf_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) + gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER + varying float vFragDepth; + varying float vIsPerspective; +#endif`,logdepthbuf_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); +#endif`,map_fragment:`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,map_pars_fragment:`#ifdef USE_MAP + uniform sampler2D map; +#endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,map_particle_pars_fragment:`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,metalnessmap_fragment:`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,morphinstance_vertex:`#ifdef USE_INSTANCING_MORPH + float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + } +#endif`,morphcolor_vertex:`#if defined( USE_MORPHCOLORS ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetBaseInfluence; + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + #endif + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } +#endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,normal_fragment_begin:`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 nonPerturbedNormal = normal;`,normal_fragment_maps:`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,normal_pars_fragment:`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,normal_pars_vertex:`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,normal_vertex:`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,clearcoat_normal_fragment_begin:`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,clearcoat_pars_fragment:`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,iridescence_pars_fragment:`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,opaque_fragment:`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,packing:`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; +const float Inv255 = 1. / 255.; +const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); +const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); +const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); +const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); +vec4 packDepthToRGBA( const in float v ) { + if( v <= 0.0 ) + return vec4( 0., 0., 0., 0. ); + if( v >= 1.0 ) + return vec4( 1., 1., 1., 1. ); + float vuf; + float af = modf( v * PackFactors.a, vuf ); + float bf = modf( vuf * ShiftRight8, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); +} +vec3 packDepthToRGB( const in float v ) { + if( v <= 0.0 ) + return vec3( 0., 0., 0. ); + if( v >= 1.0 ) + return vec3( 1., 1., 1. ); + float vuf; + float bf = modf( v * PackFactors.b, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec3( vuf * Inv255, gf * PackUpscale, bf ); +} +vec2 packDepthToRG( const in float v ) { + if( v <= 0.0 ) + return vec2( 0., 0. ); + if( v >= 1.0 ) + return vec2( 1., 1. ); + float vuf; + float gf = modf( v * 256., vuf ); + return vec2( vuf * Inv255, gf ); +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors4 ); +} +float unpackRGBToDepth( const in vec3 v ) { + return dot( v, UnpackFactors3 ); +} +float unpackRGToDepth( const in vec2 v ) { + return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; +} +vec4 pack2HalfToRGBA( const in vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( const in vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_BATCHING + mvPosition = batchingMatrix * mvPosition; +#endif +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,dithering_pars_fragment:`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,roughnessmap_fragment:`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,shadowmap_pars_fragment:`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + float depth = unpackRGBAToDepth( texture2D( depths, uv ) ); + #ifdef USE_REVERSED_DEPTH_BUFFER + return step( depth, compare ); + #else + return step( compare, depth ); + #endif + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow( sampler2D shadow, vec2 uv, float compare ) { + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + #ifdef USE_REVERSED_DEPTH_BUFFER + float hard_shadow = step( distribution.x, compare ); + #else + float hard_shadow = step( compare, distribution.x ); + #endif + if ( hard_shadow != 1.0 ) { + float distance = compare - distribution.x; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + float shadow = 1.0; + vec3 lightToPosition = shadowCoord.xyz; + + float lightToPositionLength = length( lightToPosition ); + if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { + float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + shadow = ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } +#endif`,shadowmap_pars_vertex:`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,shadowmap_vertex:`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,shadowmask_pars_fragment:`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,skinbase_vertex:`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,skinning_pars_vertex:`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + mat4 getBoneMatrix( const in float i ) { + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + return mat4( v1, v2, v3, v4 ); + } +#endif`,skinning_vertex:`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,skinnormal_vertex:`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,specularmap_fragment:`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,tonemapping_fragment:`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,tonemapping_pars_fragment:`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return saturate( toneMappingExposure * color ); +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 CineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); +vec3 agxDefaultContrastApprox( vec3 x ) { + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} +vec3 AgXToneMapping( vec3 color ) { + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; + color *= toneMappingExposure; + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + color = AgXInsetMatrix * color; + color = max( color, 1e-10 ); color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + color = clamp( color, 0.0, 1.0 ); + color = agxDefaultContrastApprox( color ); + color = AgXOutsetMatrix * color; + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + color = clamp( color, 0.0, 1.0 ); + return color; +} +vec3 NeutralToneMapping( vec3 color ) { + const float StartCompression = 0.8 - 0.04; + const float Desaturation = 0.15; + color *= toneMappingExposure; + float x = min( color.r, min( color.g, color.b ) ); + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + color -= offset; + float peak = max( color.r, max( color.g, color.b ) ); + if ( peak < StartCompression ) return color; + float d = 1. - StartCompression; + float newPeak = 1. - d * d / ( peak + d - StartCompression ); + color *= newPeak / peak; + float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); + return mix( color, vec3( newPeak ), g ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment:`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); +#endif`,transmission_pars_fragment:`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return vec3( 1.0 ); + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec4 transmittedLight; + vec3 transmittance; + #ifdef USE_DISPERSION + float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; + vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); + for ( int i = 0; i < 3; i ++ ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); + transmittedLight[ i ] = transmissionSample[ i ]; + transmittedLight.a += transmissionSample.a; + transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; + } + transmittedLight.a /= 3.0; + #else + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + #endif + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + } +#endif`,uv_pars_fragment:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,uv_pars_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,uv_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ANISOTROPYMAP + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_BATCHING + worldPosition = batchingMatrix * worldPosition; + #endif + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`,background_vert:`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,background_frag:`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,backgroundCube_vert:`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,backgroundCube_frag:`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,cube_vert:`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,cube_frag:`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,depth_vert:`#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,depth_frag:`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #include + #ifdef USE_REVERSED_DEPTH_BUFFER + float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; + #else + float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; + #endif + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #elif DEPTH_PACKING == 3202 + gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); + #elif DEPTH_PACKING == 3203 + gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); + #endif +}`,distanceRGBA_vert:`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,distanceRGBA_frag:`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +#include +void main () { + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,equirect_vert:`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,equirect_frag:`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,linedashed_vert:`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,linedashed_frag:`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,meshbasic_vert:`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,meshbasic_frag:`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,meshlambert_vert:`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,meshlambert_frag:`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,meshmatcap_vert:`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,meshmatcap_frag:`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,meshnormal_vert:`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,meshnormal_frag:`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,meshphong_vert:`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,meshphong_frag:`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,meshphysical_vert:`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,meshphysical_frag:`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_DISPERSION + uniform float dispersion; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,meshtoon_vert:`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,meshtoon_frag:`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,points_vert:`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,points_frag:`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,shadow_vert:`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,shadow_frag:`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,sprite_vert:`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix[ 3 ]; + vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,sprite_frag:`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`},$={common:{diffuse:{value:new Q(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new hi},alphaMap:{value:null},alphaMapTransform:{value:new hi},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new hi}},envmap:{envMap:{value:null},envMapRotation:{value:new hi},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new hi}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new hi}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new hi},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new hi},normalScale:{value:new X(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new hi},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new hi}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new hi}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new hi}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Q(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Q(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new hi},alphaTest:{value:0},uvTransform:{value:new hi}},sprite:{diffuse:{value:new Q(16777215)},opacity:{value:1},center:{value:new X(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new hi},alphaMap:{value:null},alphaMapTransform:{value:new hi},alphaTest:{value:0}}},Am={basic:{uniforms:Xo([$.common,$.specularmap,$.envmap,$.aomap,$.lightmap,$.fog]),vertexShader:km.meshbasic_vert,fragmentShader:km.meshbasic_frag},lambert:{uniforms:Xo([$.common,$.specularmap,$.envmap,$.aomap,$.lightmap,$.emissivemap,$.bumpmap,$.normalmap,$.displacementmap,$.fog,$.lights,{emissive:{value:new Q(0)}}]),vertexShader:km.meshlambert_vert,fragmentShader:km.meshlambert_frag},phong:{uniforms:Xo([$.common,$.specularmap,$.envmap,$.aomap,$.lightmap,$.emissivemap,$.bumpmap,$.normalmap,$.displacementmap,$.fog,$.lights,{emissive:{value:new Q(0)},specular:{value:new Q(1118481)},shininess:{value:30}}]),vertexShader:km.meshphong_vert,fragmentShader:km.meshphong_frag},standard:{uniforms:Xo([$.common,$.envmap,$.aomap,$.lightmap,$.emissivemap,$.bumpmap,$.normalmap,$.displacementmap,$.roughnessmap,$.metalnessmap,$.fog,$.lights,{emissive:{value:new Q(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:km.meshphysical_vert,fragmentShader:km.meshphysical_frag},toon:{uniforms:Xo([$.common,$.aomap,$.lightmap,$.emissivemap,$.bumpmap,$.normalmap,$.displacementmap,$.gradientmap,$.fog,$.lights,{emissive:{value:new Q(0)}}]),vertexShader:km.meshtoon_vert,fragmentShader:km.meshtoon_frag},matcap:{uniforms:Xo([$.common,$.bumpmap,$.normalmap,$.displacementmap,$.fog,{matcap:{value:null}}]),vertexShader:km.meshmatcap_vert,fragmentShader:km.meshmatcap_frag},points:{uniforms:Xo([$.points,$.fog]),vertexShader:km.points_vert,fragmentShader:km.points_frag},dashed:{uniforms:Xo([$.common,$.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:km.linedashed_vert,fragmentShader:km.linedashed_frag},depth:{uniforms:Xo([$.common,$.displacementmap]),vertexShader:km.depth_vert,fragmentShader:km.depth_frag},normal:{uniforms:Xo([$.common,$.bumpmap,$.normalmap,$.displacementmap,{opacity:{value:1}}]),vertexShader:km.meshnormal_vert,fragmentShader:km.meshnormal_frag},sprite:{uniforms:Xo([$.sprite,$.fog]),vertexShader:km.sprite_vert,fragmentShader:km.sprite_frag},background:{uniforms:{uvTransform:{value:new hi},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:km.background_vert,fragmentShader:km.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new hi}},vertexShader:km.backgroundCube_vert,fragmentShader:km.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:km.cube_vert,fragmentShader:km.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:km.equirect_vert,fragmentShader:km.equirect_frag},distanceRGBA:{uniforms:Xo([$.common,$.displacementmap,{referencePosition:{value:new Z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:km.distanceRGBA_vert,fragmentShader:km.distanceRGBA_frag},shadow:{uniforms:Xo([$.lights,$.fog,{color:{value:new Q(0)},opacity:{value:1}}]),vertexShader:km.shadow_vert,fragmentShader:km.shadow_frag}};Am.physical={uniforms:Xo([Am.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new hi},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new hi},clearcoatNormalScale:{value:new X(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new hi},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new hi},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new hi},sheen:{value:0},sheenColor:{value:new Q(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new hi},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new hi},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new hi},transmissionSamplerSize:{value:new X},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new hi},attenuationDistance:{value:0},attenuationColor:{value:new Q(0)},specularColor:{value:new Q(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new hi},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new hi},anisotropyVector:{value:new X},anisotropyMap:{value:null},anisotropyMapTransform:{value:new hi}}]),vertexShader:km.meshphysical_vert,fragmentShader:km.meshphysical_frag};var jm={r:0,b:0,g:0},Mm=new xa,Nm=new da;function Pm(e,t,n,r,i,a,o){let s=new Q(0),c=a===!0?0:1,l,u,d=null,f=0,p=null;function m(e){let r=e.isScene===!0?e.background:null;return r&&r.isTexture&&(r=(e.backgroundBlurriness>0?n:t).get(r)),r}function h(t){let n=!1,i=m(t);i===null?_(s,c):i&&i.isColor&&(_(i,1),n=!0);let a=e.xr.getEnvironmentBlendMode();a===`additive`?r.buffers.color.setClear(0,0,0,1,o):a===`alpha-blend`&&r.buffers.color.setClear(0,0,0,0,o),(e.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function g(t,n){let r=m(n);r&&(r.isCubeTexture||r.mapping===306)?(u===void 0&&(u=new Go(new Jo(1,1,1),new ns({name:`BackgroundCubeMaterial`,uniforms:Yo(Am.backgroundCube.uniforms),vertexShader:Am.backgroundCube.vertexShader,fragmentShader:Am.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute(`normal`),u.geometry.deleteAttribute(`uv`),u.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,`envMap`,{get:function(){return this.uniforms.envMap.value}}),i.update(u)),Mm.copy(n.backgroundRotation),Mm.x*=-1,Mm.y*=-1,Mm.z*=-1,r.isCubeTexture&&r.isRenderTargetTexture===!1&&(Mm.y*=-1,Mm.z*=-1),u.material.uniforms.envMap.value=r,u.material.uniforms.flipEnvMap.value=r.isCubeTexture&&r.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(Nm.makeRotationFromEuler(Mm)),u.material.toneMapped=bi.getTransfer(r.colorSpace)!==nr,(d!==r||f!==r.version||p!==e.toneMapping)&&(u.material.needsUpdate=!0,d=r,f=r.version,p=e.toneMapping),u.layers.enableAll(),t.unshift(u,u.geometry,u.material,0,0,null)):r&&r.isTexture&&(l===void 0&&(l=new Go(new qu(2,2),new ns({name:`BackgroundMaterial`,uniforms:Yo(Am.background.uniforms),vertexShader:Am.background.vertexShader,fragmentShader:Am.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute(`normal`),Object.defineProperty(l.material,`map`,{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=r,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.toneMapped=bi.getTransfer(r.colorSpace)!==nr,r.matrixAutoUpdate===!0&&r.updateMatrix(),l.material.uniforms.uvTransform.value.copy(r.matrix),(d!==r||f!==r.version||p!==e.toneMapping)&&(l.material.needsUpdate=!0,d=r,f=r.version,p=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null))}function _(t,n){t.getRGB(jm,Qo(e)),r.buffers.color.setClear(jm.r,jm.g,jm.b,n,o)}function v(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),c=t,_(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,_(s,c)},render:h,addToRenderList:g,dispose:v}}function Fm(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=f(null),a=i,o=!1;function s(n,r,i,s,c){let u=!1,f=d(s,i,r);a!==f&&(a=f,l(a.object)),u=p(n,s,i,c),u&&m(n,s,i,c),c!==null&&t.update(c,e.ELEMENT_ARRAY_BUFFER),(u||o)&&(o=!1,b(n,r,i,s),c!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(c).buffer))}function c(){return e.createVertexArray()}function l(t){return e.bindVertexArray(t)}function u(t){return e.deleteVertexArray(t)}function d(e,t,n){let i=n.wireframe===!0,a=r[e.id];a===void 0&&(a={},r[e.id]=a);let o=a[t.id];o===void 0&&(o={},a[t.id]=o);let s=o[i];return s===void 0&&(s=f(c()),o[i]=s),s}function f(e){let t=[],r=[],i=[];for(let e=0;e=0){let n=i[t],r=o[t];if(r===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(r=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(r=e.instanceColor)),n===void 0||n.attribute!==r||r&&n.data!==r.data)return!0;s++}return a.attributesNum!==s||a.index!==r}function m(e,t,n,r){let i={},o=t.attributes,s=0,c=n.getAttributes();for(let t in c)if(c[t].location>=0){let n=o[t];n===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(n=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}a.attributes=i,a.attributesNum=s,a.index=r}function h(){let e=a.newAttributes;for(let t=0,n=e.length;t=0){let s=o[r];if(s===void 0&&(r===`instanceMatrix`&&n.instanceMatrix&&(s=n.instanceMatrix),r===`instanceColor`&&n.instanceColor&&(s=n.instanceColor)),s!==void 0){let r=s.normalized,o=s.itemSize,c=t.get(s);if(c===void 0)continue;let l=c.buffer,u=c.type,d=c.bytesPerElement,f=u===e.INT||u===e.UNSIGNED_INT||s.gpuType===1013;if(s.isInterleavedBufferAttribute){let t=s.data,c=t.stride,p=s.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return`highp`;t=`mediump`}return t===`mediump`&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let l=n.precision===void 0?`highp`:n.precision,u=c(l);u!==l&&(Y(`WebGLRenderer:`,l,`not supported, using`,u,`instead.`),l=u);let d=n.logarithmicDepthBuffer===!0,f=n.reversedDepthBuffer===!0&&t.has(`EXT_clip_control`),p=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),m=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),g=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),_=e.getParameter(e.MAX_VERTEX_ATTRIBS),v=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),y=e.getParameter(e.MAX_VARYING_VECTORS),b=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),x=m>0,S=e.getParameter(e.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:c,textureFormatReadable:o,textureTypeReadable:s,precision:l,logarithmicDepthBuffer:d,reversedDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:h,maxCubemapSize:g,maxAttributes:_,maxVertexUniforms:v,maxVaryings:y,maxFragmentUniforms:b,vertexTextures:x,maxSamples:S}}function Rm(e){let t=this,n=null,r=0,i=!1,a=!1,o=new mc,s=new hi,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let n=e.length!==0||t||r!==0||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=u(e,t,0)},this.setState=function(t,o,s){let d=t.clippingPlanes,f=t.clipIntersection,p=t.clipShadows,m=e.get(t);if(!i||d===null||d.length===0||a&&!p)a?u(null):l();else{let e=a?0:r,t=e*4,i=m.clippingState||null;c.value=i,i=u(d,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];m.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=e}};function l(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){let a=e===null?0:e.length,l=null;if(a!==0){if(l=c.value,i!==!0||l===null){let t=r+a*4,i=n.matrixWorldInverse;s.getNormalMatrix(i),(l===null||l.length0){let o=new fs(a.height);return o.fromEquirectangularTexture(e,r),t.set(r,o),r.addEventListener(`dispose`,i),n(o.texture,r.mapping)}else return null}}return r}function i(e){let n=e.target;n.removeEventListener(`dispose`,i);let r=t.get(n);r!==void 0&&(t.delete(n),r.dispose())}function a(){t=new WeakMap}return{get:r,dispose:a}}var Bm=4,Vm=[.125,.215,.35,.446,.526,.582],Hm=20,Um=256,Wm=new mf,Gm=new Q,Km=null,qm=0,Jm=0,Ym=!1,Xm=new Z,Zm=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,r=100,i={}){let{size:a=256,position:o=Xm}=i;Km=this._renderer.getRenderTarget(),qm=this._renderer.getActiveCubeFace(),Jm=this._renderer.getActiveMipmapLevel(),Ym=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,n,r,s,o),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=ih(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=rh(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?l:0,l,l),c.setRenderTarget(r),p&&c.render(d,a),c.render(e,a)}c.toneMapping=u,c.autoClear=l,e.background=m}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===301||e.mapping===302;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=ih()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=rh());let i=r?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=i;let o=i.uniforms;o.envMap.value=e;let s=this._cubeSize;eh(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,Wm)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodMeshes.length;for(let t=1;td-Bm?n-d+Bm:0),m=4*(this._cubeSize-f);s.envMap.value=e.texture,s.roughness.value=u,s.mipInt.value=d-t,eh(i,p,m,3*f,2*f),r.setRenderTarget(i),r.render(o,Wm),s.envMap.value=i.texture,s.roughness.value=0,s.mipInt.value=d-n,eh(e,p,m,3*f,2*f),r.setRenderTarget(e),r.render(o,Wm)}_blur(e,t,n,r,i){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,`latitudinal`,i),this._halfBlur(a,e,n,n,r,`longitudinal`,i)}_halfBlur(e,t,n,r,i,a,o){let s=this._renderer,c=this._blurMaterial;a!==`latitudinal`&&a!==`longitudinal`&&Fr(`blur direction must be either latitudinal or longitudinal!`);let l=this._lodMeshes[r];l.material=c;let u=c.uniforms,d=this._sizeLods[n]-1,f=isFinite(i)?Math.PI/(2*d):2*Math.PI/(2*Hm-1),p=i/f,m=isFinite(i)?1+Math.floor(3*p):Hm;m>Hm&&Y(`sigmaRadians, ${i}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${Hm}`);let h=[],g=0;for(let e=0;e_-Bm?r-_+Bm:0),4*(this._cubeSize-v),3*v,2*v),s.setRenderTarget(t),s.render(l,Wm)}};function Qm(e){let t=[],n=[],r=[],i=e,a=e-Bm+1+Vm.length;for(let o=0;oe-Bm?s=Vm[o-e+Bm-1]:o===0&&(s=0),n.push(s);let c=1/(a-2),l=-c,u=1+c,d=[l,l,u,l,u,u,l,l,u,u,l,u],f=new Float32Array(108),p=new Float32Array(72),m=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];f.set(r,18*e),p.set(d,12*e);let i=[e,e,e,e,e,e];m.set(i,6*e)}let h=new No;h.setAttribute(`position`,new go(f,3)),h.setAttribute(`uv`,new go(p,2)),h.setAttribute(`faceIndex`,new go(m,1)),r.push(new Go(h,null)),i>Bm&&i--}return{lodMeshes:r,sizeLods:t,sigmas:n}}function $m(e,t,n){let r=new Ni(e,t,n);return r.texture.mapping=306,r.texture.name=`PMREM.cubeUv`,r.scissorTest=!0,r}function eh(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function th(e,t,n){return new ns({name:`PMREMGGXConvolution`,defines:{GGX_SAMPLES:Um,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:ah(),fragmentShader:` + + precision highp float; + precision highp int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform float roughness; + uniform float mipInt; + + #define ENVMAP_TYPE_CUBE_UV + #include + + #define PI 3.14159265359 + + // Van der Corput radical inverse + float radicalInverse_VdC(uint bits) { + bits = (bits << 16u) | (bits >> 16u); + bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); + bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); + bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); + bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); + return float(bits) * 2.3283064365386963e-10; // / 0x100000000 + } + + // Hammersley sequence + vec2 hammersley(uint i, uint N) { + return vec2(float(i) / float(N), radicalInverse_VdC(i)); + } + + // GGX VNDF importance sampling (Eric Heitz 2018) + // "Sampling the GGX Distribution of Visible Normals" + // https://jcgt.org/published/0007/04/01/ + vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { + float alpha = roughness * roughness; + + // Section 3.2: Transform view direction to hemisphere configuration + vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z)); + + // Section 4.1: Orthonormal basis + float lensq = Vh.x * Vh.x + Vh.y * Vh.y; + vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0); + vec3 T2 = cross(Vh, T1); + + // Section 4.2: Parameterization of projected area + float r = sqrt(Xi.x); + float phi = 2.0 * PI * Xi.y; + float t1 = r * cos(phi); + float t2 = r * sin(phi); + float s = 0.5 * (1.0 + Vh.z); + t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; + + // Section 4.3: Reprojection onto hemisphere + vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh; + + // Section 3.4: Transform back to ellipsoid configuration + return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); + } + + void main() { + vec3 N = normalize(vOutputDirection); + vec3 V = N; // Assume view direction equals normal for pre-filtering + + vec3 prefilteredColor = vec3(0.0); + float totalWeight = 0.0; + + // For very low roughness, just sample the environment directly + if (roughness < 0.001) { + gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); + return; + } + + // Tangent space basis for VNDF sampling + vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); + vec3 tangent = normalize(cross(up, N)); + vec3 bitangent = cross(N, tangent); + + for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { + vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); + + // For PMREM, V = N, so in tangent space V is always (0, 0, 1) + vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); + + // Transform H back to world space + vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); + vec3 L = normalize(2.0 * dot(V, H) * H - V); + + float NdotL = max(dot(N, L), 0.0); + + if(NdotL > 0.0) { + // Sample environment at fixed mip level + // VNDF importance sampling handles the distribution filtering + vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); + + // Weight by NdotL for the split-sum approximation + // VNDF PDF naturally accounts for the visible microfacet distribution + prefilteredColor += sampleColor * NdotL; + totalWeight += NdotL; + } + } + + if (totalWeight > 0.0) { + prefilteredColor = prefilteredColor / totalWeight; + } + + gl_FragColor = vec4(prefilteredColor, 1.0); + } + `,blending:0,depthTest:!1,depthWrite:!1})}function nh(e,t,n){let r=new Float32Array(Hm),i=new Z(0,1,0);return new ns({name:`SphericalGaussianBlur`,defines:{n:Hm,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:ah(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:0,depthTest:!1,depthWrite:!1})}function rh(){return new ns({name:`EquirectangularToCubeUV`,uniforms:{envMap:{value:null}},vertexShader:ah(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:0,depthTest:!1,depthWrite:!1})}function ih(){return new ns({name:`CubemapToCubeUV`,uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:ah(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:0,depthTest:!1,depthWrite:!1})}function ah(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function oh(e){let t=new WeakMap,n=null;function r(r){if(r&&r.isTexture){let o=r.mapping,s=o===303||o===304,c=o===301||o===302;if(s||c){let o=t.get(r),l=o===void 0?0:o.texture.pmremVersion;if(r.isRenderTargetTexture&&r.pmremVersion!==l)return n===null&&(n=new Zm(e)),o=s?n.fromEquirectangular(r,o):n.fromCubemap(r,o),o.texture.pmremVersion=r.pmremVersion,t.set(r,o),o.texture;if(o!==void 0)return o.texture;{let l=r.image;return s&&l&&l.height>0||c&&l&&i(l)?(n===null&&(n=new Zm(e)),o=s?n.fromEquirectangular(r):n.fromCubemap(r),o.texture.pmremVersion=r.pmremVersion,t.set(r,o),r.addEventListener(`dispose`,a),o.texture):null}}}return r}function i(e){let t=0;for(let n=0;n<6;n++)e[n]!==void 0&&t++;return t===6}function a(e){let n=e.target;n.removeEventListener(`dispose`,a);let r=t.get(n);r!==void 0&&(t.delete(n),r.dispose())}function o(){t=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:r,dispose:o}}function sh(e){let t={};function n(n){if(t[n]!==void 0)return t[n];let r=e.getExtension(n);return t[n]=r,r}return{has:function(e){return n(e)!==null},init:function(){n(`EXT_color_buffer_float`),n(`WEBGL_clip_cull_distance`),n(`OES_texture_float_linear`),n(`EXT_color_buffer_half_float`),n(`WEBGL_multisampled_render_to_texture`),n(`WEBGL_render_shared_exponent`)},get:function(e){let t=n(e);return t===null&&Ir(`WebGLRenderer: `+e+` extension not supported.`),t}}}function ch(e,t,n,r){let i={},a=new WeakMap;function o(e){let s=e.target;for(let e in s.index!==null&&t.remove(s.index),s.attributes)t.remove(s.attributes[e]);s.removeEventListener(`dispose`,o),delete i[s.id];let c=a.get(s);c&&(t.remove(c),a.delete(s)),r.releaseStatesOfGeometry(s),s.isInstancedBufferGeometry===!0&&delete s._maxInstanceCount,n.memory.geometries--}function s(e,t){return i[t.id]===!0?t:(t.addEventListener(`dispose`,o),i[t.id]=!0,n.memory.geometries++,t)}function c(n){let r=n.attributes;for(let n in r)t.update(r[n],e.ARRAY_BUFFER)}function l(e){let n=[],r=e.index,i=e.attributes.position,o=0;if(r!==null){let e=r.array;o=r.version;for(let t=0,r=e.length;tt.maxTextureSize&&(m=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let h=new Float32Array(p*m*4*u),g=new Pi(h,p,m,u);g.type=Vt,g.needsUpdate=!0;let _=f*4;for(let t=0;t0)return e;let i=t*n,a=vh[i];if(a===void 0&&(a=new Float32Array(i),vh[i]=a),t!==0){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function wh(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n`:` `} ${i}: ${n[e]}`)}return r.join(` +`)}var wg=new hi;function Tg(e){bi._getMatrix(wg,bi.workingColorSpace,e);let t=`mat3( ${wg.elements.map(e=>e.toFixed(4))} )`;switch(bi.getTransfer(e)){case tr:return[t,`LinearTransferOETF`];case nr:return[t,`sRGBTransferOETF`];default:return Y(`WebGLProgram: Unsupported color space: `,e),[t,`LinearTransferOETF`]}}function Eg(e,t,n){let r=e.getShaderParameter(t,e.COMPILE_STATUS),i=(e.getShaderInfoLog(t)||``).trim();if(r&&i===``)return``;let a=/ERROR: 0:(\d+)/.exec(i);if(a){let r=parseInt(a[1]);return n.toUpperCase()+` + +`+i+` + +`+Cg(e.getShaderSource(t),r)}else return i}function Dg(e,t){let n=Tg(t);return[`vec4 ${e}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,`}`].join(` +`)}function Og(e,t){let n;switch(t){case 1:n=`Linear`;break;case 2:n=`Reinhard`;break;case 3:n=`Cineon`;break;case 4:n=`ACESFilmic`;break;case 6:n=`AgX`;break;case 7:n=`Neutral`;break;case 5:n=`Custom`;break;default:Y(`WebGLProgram: Unsupported toneMapping:`,t),n=`Linear`}return`vec3 `+e+`( vec3 color ) { return `+n+`ToneMapping( color ); }`}var kg=new Z;function Ag(){return bi.getLuminanceCoefficients(kg),[`float luminance( const in vec3 rgb ) {`,` const vec3 weights = vec3( ${kg.x.toFixed(4)}, ${kg.y.toFixed(4)}, ${kg.z.toFixed(4)} );`,` return dot( weights, rgb );`,`}`].join(` +`)}function jg(e){return[e.extensionClipCullDistance?`#extension GL_ANGLE_clip_cull_distance : require`:``,e.extensionMultiDraw?`#extension GL_ANGLE_multi_draw : require`:``].filter(Pg).join(` +`)}function Mg(e){let t=[];for(let n in e){let r=e[n];r!==!1&&t.push(`#define `+n+` `+r)}return t.join(` +`)}function Ng(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function Rg(e){return e.replace(Lg,Bg)}var zg=new Map;function Bg(e,t){let n=km[t];if(n===void 0){let e=zg.get(t);if(e!==void 0)n=km[e],Y(`WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.`,t,e);else throw Error(`Can not resolve #include <`+t+`>`)}return Rg(n)}var Vg=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Hg(e){return e.replace(Vg,Ug)}function Ug(e,t,n,r){let i=``;for(let e=parseInt(t);e0&&(g+=` +`),_=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(Pg).join(` +`),_.length>0&&(_+=` +`)):(g=[Wg(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.extensionClipCullDistance?`#define USE_CLIP_DISTANCE`:``,n.batching?`#define USE_BATCHING`:``,n.batchingColor?`#define USE_BATCHING_COLOR`:``,n.instancing?`#define USE_INSTANCING`:``,n.instancingColor?`#define USE_INSTANCING_COLOR`:``,n.instancingMorph?`#define USE_INSTANCING_MORPH`:``,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.map?`#define USE_MAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+u:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.displacementMap?`#define USE_DISPLACEMENTMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.mapUv?`#define MAP_UV `+n.mapUv:``,n.alphaMapUv?`#define ALPHAMAP_UV `+n.alphaMapUv:``,n.lightMapUv?`#define LIGHTMAP_UV `+n.lightMapUv:``,n.aoMapUv?`#define AOMAP_UV `+n.aoMapUv:``,n.emissiveMapUv?`#define EMISSIVEMAP_UV `+n.emissiveMapUv:``,n.bumpMapUv?`#define BUMPMAP_UV `+n.bumpMapUv:``,n.normalMapUv?`#define NORMALMAP_UV `+n.normalMapUv:``,n.displacementMapUv?`#define DISPLACEMENTMAP_UV `+n.displacementMapUv:``,n.metalnessMapUv?`#define METALNESSMAP_UV `+n.metalnessMapUv:``,n.roughnessMapUv?`#define ROUGHNESSMAP_UV `+n.roughnessMapUv:``,n.anisotropyMapUv?`#define ANISOTROPYMAP_UV `+n.anisotropyMapUv:``,n.clearcoatMapUv?`#define CLEARCOATMAP_UV `+n.clearcoatMapUv:``,n.clearcoatNormalMapUv?`#define CLEARCOAT_NORMALMAP_UV `+n.clearcoatNormalMapUv:``,n.clearcoatRoughnessMapUv?`#define CLEARCOAT_ROUGHNESSMAP_UV `+n.clearcoatRoughnessMapUv:``,n.iridescenceMapUv?`#define IRIDESCENCEMAP_UV `+n.iridescenceMapUv:``,n.iridescenceThicknessMapUv?`#define IRIDESCENCE_THICKNESSMAP_UV `+n.iridescenceThicknessMapUv:``,n.sheenColorMapUv?`#define SHEEN_COLORMAP_UV `+n.sheenColorMapUv:``,n.sheenRoughnessMapUv?`#define SHEEN_ROUGHNESSMAP_UV `+n.sheenRoughnessMapUv:``,n.specularMapUv?`#define SPECULARMAP_UV `+n.specularMapUv:``,n.specularColorMapUv?`#define SPECULAR_COLORMAP_UV `+n.specularColorMapUv:``,n.specularIntensityMapUv?`#define SPECULAR_INTENSITYMAP_UV `+n.specularIntensityMapUv:``,n.transmissionMapUv?`#define TRANSMISSIONMAP_UV `+n.transmissionMapUv:``,n.thicknessMapUv?`#define THICKNESSMAP_UV `+n.thicknessMapUv:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.flatShading?`#define FLAT_SHADED`:``,n.skinning?`#define USE_SKINNING`:``,n.morphTargets?`#define USE_MORPHTARGETS`:``,n.morphNormals&&n.flatShading===!1?`#define USE_MORPHNORMALS`:``,n.morphColors?`#define USE_MORPHCOLORS`:``,n.morphTargetsCount>0?`#define MORPHTARGETS_TEXTURE_STRIDE `+n.morphTextureStride:``,n.morphTargetsCount>0?`#define MORPHTARGETS_COUNT `+n.morphTargetsCount:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.sizeAttenuation?`#define USE_SIZEATTENUATION`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.reversedDepthBuffer?`#define USE_REVERSED_DEPTH_BUFFER`:``,`uniform mat4 modelMatrix;`,`uniform mat4 modelViewMatrix;`,`uniform mat4 projectionMatrix;`,`uniform mat4 viewMatrix;`,`uniform mat3 normalMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,`#ifdef USE_INSTANCING`,` attribute mat4 instanceMatrix;`,`#endif`,`#ifdef USE_INSTANCING_COLOR`,` attribute vec3 instanceColor;`,`#endif`,`#ifdef USE_INSTANCING_MORPH`,` uniform sampler2D morphTexture;`,`#endif`,`attribute vec3 position;`,`attribute vec3 normal;`,`attribute vec2 uv;`,`#ifdef USE_UV1`,` attribute vec2 uv1;`,`#endif`,`#ifdef USE_UV2`,` attribute vec2 uv2;`,`#endif`,`#ifdef USE_UV3`,` attribute vec2 uv3;`,`#endif`,`#ifdef USE_TANGENT`,` attribute vec4 tangent;`,`#endif`,`#if defined( USE_COLOR_ALPHA )`,` attribute vec4 color;`,`#elif defined( USE_COLOR )`,` attribute vec3 color;`,`#endif`,`#ifdef USE_SKINNING`,` attribute vec4 skinIndex;`,` attribute vec4 skinWeight;`,`#endif`,` +`].filter(Pg).join(` +`),_=[Wg(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.alphaToCoverage?`#define ALPHA_TO_COVERAGE`:``,n.map?`#define USE_MAP`:``,n.matcap?`#define USE_MATCAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+l:``,n.envMap?`#define `+u:``,n.envMap?`#define `+d:``,f?`#define CUBEUV_TEXEL_WIDTH `+f.texelWidth:``,f?`#define CUBEUV_TEXEL_HEIGHT `+f.texelHeight:``,f?`#define CUBEUV_MAX_MIP `+f.maxMip+`.0`:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoat?`#define USE_CLEARCOAT`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.dispersion?`#define USE_DISPERSION`:``,n.iridescence?`#define USE_IRIDESCENCE`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaTest?`#define USE_ALPHATEST`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.sheen?`#define USE_SHEEN`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors||n.instancingColor||n.batchingColor?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.gradientMap?`#define USE_GRADIENTMAP`:``,n.flatShading?`#define FLAT_SHADED`:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.premultipliedAlpha?`#define PREMULTIPLIED_ALPHA`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.decodeVideoTexture?`#define DECODE_VIDEO_TEXTURE`:``,n.decodeVideoTextureEmissive?`#define DECODE_VIDEO_TEXTURE_EMISSIVE`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.reversedDepthBuffer?`#define USE_REVERSED_DEPTH_BUFFER`:``,`uniform mat4 viewMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,n.toneMapping===0?``:`#define TONE_MAPPING`,n.toneMapping===0?``:km.tonemapping_pars_fragment,n.toneMapping===0?``:Og(`toneMapping`,n.toneMapping),n.dithering?`#define DITHERING`:``,n.opaque?`#define OPAQUE`:``,km.colorspace_pars_fragment,Dg(`linearToOutputTexel`,n.outputColorSpace),Ag(),n.useDepthPacking?`#define DEPTH_PACKING `+n.depthPacking:``,` +`].filter(Pg).join(` +`)),o=Rg(o),o=Fg(o,n),o=Ig(o,n),s=Rg(s),s=Fg(s,n),s=Ig(s,n),o=Hg(o),s=Hg(s),n.isRawShaderMaterial!==!0&&(v=`#version 300 es +`,g=[p,`#define attribute in`,`#define varying out`,`#define texture2D texture`].join(` +`)+` +`+g,_=[`#define varying in`,n.glslVersion===`300 es`?``:`layout(location = 0) out highp vec4 pc_fragColor;`,n.glslVersion===`300 es`?``:`#define gl_FragColor pc_fragColor`,`#define gl_FragDepthEXT gl_FragDepth`,`#define texture2D texture`,`#define textureCube texture`,`#define texture2DProj textureProj`,`#define texture2DLodEXT textureLod`,`#define texture2DProjLodEXT textureProjLod`,`#define textureCubeLodEXT textureLod`,`#define texture2DGradEXT textureGrad`,`#define texture2DProjGradEXT textureProjGrad`,`#define textureCubeGradEXT textureGrad`].join(` +`)+` +`+_);let y=v+g+o,b=v+_+s,x=bg(i,i.VERTEX_SHADER,y),S=bg(i,i.FRAGMENT_SHADER,b);i.attachShader(h,x),i.attachShader(h,S),n.index0AttributeName===void 0?n.morphTargets===!0&&i.bindAttribLocation(h,0,`position`):i.bindAttribLocation(h,0,n.index0AttributeName),i.linkProgram(h);function C(t){if(e.debug.checkShaderErrors){let n=i.getProgramInfoLog(h)||``,r=i.getShaderInfoLog(x)||``,a=i.getShaderInfoLog(S)||``,o=n.trim(),s=r.trim(),c=a.trim(),l=!0,u=!0;if(i.getProgramParameter(h,i.LINK_STATUS)===!1)if(l=!1,typeof e.debug.onShaderError==`function`)e.debug.onShaderError(i,h,x,S);else{let e=Eg(i,x,`vertex`),n=Eg(i,S,`fragment`);Fr(`THREE.WebGLProgram: Shader Error `+i.getError()+` - VALIDATE_STATUS `+i.getProgramParameter(h,i.VALIDATE_STATUS)+` + +Material Name: `+t.name+` +Material Type: `+t.type+` + +Program Info Log: `+o+` +`+e+` +`+n)}else o===``?(s===``||c===``)&&(u=!1):Y(`WebGLProgram: Program Info Log:`,o);u&&(t.diagnostics={runnable:l,programLog:o,vertexShader:{log:s,prefix:g},fragmentShader:{log:c,prefix:_}})}i.deleteShader(x),i.deleteShader(S),w=new yg(i,h),T=Ng(i,h)}let w;this.getUniforms=function(){return w===void 0&&C(this),w};let T;this.getAttributes=function(){return T===void 0&&C(this),T};let E=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(h,xg)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(h),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Sg++,this.cacheKey=t,this.usedTimes=1,this.program=h,this.vertexShader=x,this.fragmentShader=S,this}var Zg=0,Qg=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(r)===!1&&(a.add(r),r.usedTimes++),a.has(i)===!1&&(a.add(i),i.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let e of t)e.usedTimes--,e.usedTimes===0&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new $g(e),t.set(e,n)),n}},$g=class{constructor(e){this.id=Zg++,this.code=e,this.usedTimes=0}};function e_(e,t,n,r,i,a,o){let s=new Sa,c=new Qg,l=new Set,u=[],d=i.logarithmicDepthBuffer,f=i.vertexTextures,p=i.precision,m={MeshDepthMaterial:`depth`,MeshDistanceMaterial:`distanceRGBA`,MeshNormalMaterial:`normal`,MeshBasicMaterial:`basic`,MeshLambertMaterial:`lambert`,MeshPhongMaterial:`phong`,MeshToonMaterial:`toon`,MeshStandardMaterial:`physical`,MeshPhysicalMaterial:`physical`,MeshMatcapMaterial:`matcap`,LineBasicMaterial:`basic`,LineDashedMaterial:`dashed`,PointsMaterial:`points`,ShadowMaterial:`shadow`,SpriteMaterial:`sprite`};function h(e){return l.add(e),e===0?`uv`:`uv${e}`}function g(a,s,u,g,_){let v=g.fog,y=_.geometry,b=a.isMeshStandardMaterial?g.environment:null,x=(a.isMeshStandardMaterial?n:t).get(a.envMap||b),S=x&&x.mapping===306?x.image.height:null,C=m[a.type];a.precision!==null&&(p=i.getMaxPrecision(a.precision),p!==a.precision&&Y(`WebGLProgram.getParameters:`,a.precision,`not supported, using`,p,`instead.`));let w=y.morphAttributes.position||y.morphAttributes.normal||y.morphAttributes.color,T=w===void 0?0:w.length,E=0;y.morphAttributes.position!==void 0&&(E=1),y.morphAttributes.normal!==void 0&&(E=2),y.morphAttributes.color!==void 0&&(E=3);let D,O,k,A;if(C){let e=Am[C];D=e.vertexShader,O=e.fragmentShader}else D=a.vertexShader,O=a.fragmentShader,c.update(a),k=c.getVertexShaderID(a),A=c.getFragmentShaderID(a);let j=e.getRenderTarget(),M=e.state.buffers.depth.getReversed(),N=_.isInstancedMesh===!0,P=_.isBatchedMesh===!0,F=!!a.map,I=!!a.matcap,ee=!!x,te=!!a.aoMap,L=!!a.lightMap,R=!!a.bumpMap,z=!!a.normalMap,ne=!!a.displacementMap,B=!!a.emissiveMap,V=!!a.metalnessMap,re=!!a.roughnessMap,ie=a.anisotropy>0,ae=a.clearcoat>0,oe=a.dispersion>0,se=a.iridescence>0,H=a.sheen>0,ce=a.transmission>0,U=ie&&!!a.anisotropyMap,le=ae&&!!a.clearcoatMap,W=ae&&!!a.clearcoatNormalMap,ue=ae&&!!a.clearcoatRoughnessMap,G=se&&!!a.iridescenceMap,K=se&&!!a.iridescenceThicknessMap,q=H&&!!a.sheenColorMap,de=H&&!!a.sheenRoughnessMap,fe=!!a.specularMap,pe=!!a.specularColorMap,me=!!a.specularIntensityMap,he=ce&&!!a.transmissionMap,ge=ce&&!!a.thicknessMap,_e=!!a.gradientMap,ve=!!a.alphaMap,ye=a.alphaTest>0,be=!!a.alphaHash,xe=!!a.extensions,Se=0;a.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(Se=e.toneMapping);let Ce={shaderID:C,shaderType:a.type,shaderName:a.name,vertexShader:D,fragmentShader:O,defines:a.defines,customVertexShaderID:k,customFragmentShaderID:A,isRawShaderMaterial:a.isRawShaderMaterial===!0,glslVersion:a.glslVersion,precision:p,batching:P,batchingColor:P&&_._colorsTexture!==null,instancing:N,instancingColor:N&&_.instanceColor!==null,instancingMorph:N&&_.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:j===null?e.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:er,alphaToCoverage:!!a.alphaToCoverage,map:F,matcap:I,envMap:ee,envMapMode:ee&&x.mapping,envMapCubeUVHeight:S,aoMap:te,lightMap:L,bumpMap:R,normalMap:z,displacementMap:f&&ne,emissiveMap:B,normalMapObjectSpace:z&&a.normalMapType===1,normalMapTangentSpace:z&&a.normalMapType===0,metalnessMap:V,roughnessMap:re,anisotropy:ie,anisotropyMap:U,clearcoat:ae,clearcoatMap:le,clearcoatNormalMap:W,clearcoatRoughnessMap:ue,dispersion:oe,iridescence:se,iridescenceMap:G,iridescenceThicknessMap:K,sheen:H,sheenColorMap:q,sheenRoughnessMap:de,specularMap:fe,specularColorMap:pe,specularIntensityMap:me,transmission:ce,transmissionMap:he,thicknessMap:ge,gradientMap:_e,opaque:a.transparent===!1&&a.blending===1&&a.alphaToCoverage===!1,alphaMap:ve,alphaTest:ye,alphaHash:be,combine:a.combine,mapUv:F&&h(a.map.channel),aoMapUv:te&&h(a.aoMap.channel),lightMapUv:L&&h(a.lightMap.channel),bumpMapUv:R&&h(a.bumpMap.channel),normalMapUv:z&&h(a.normalMap.channel),displacementMapUv:ne&&h(a.displacementMap.channel),emissiveMapUv:B&&h(a.emissiveMap.channel),metalnessMapUv:V&&h(a.metalnessMap.channel),roughnessMapUv:re&&h(a.roughnessMap.channel),anisotropyMapUv:U&&h(a.anisotropyMap.channel),clearcoatMapUv:le&&h(a.clearcoatMap.channel),clearcoatNormalMapUv:W&&h(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ue&&h(a.clearcoatRoughnessMap.channel),iridescenceMapUv:G&&h(a.iridescenceMap.channel),iridescenceThicknessMapUv:K&&h(a.iridescenceThicknessMap.channel),sheenColorMapUv:q&&h(a.sheenColorMap.channel),sheenRoughnessMapUv:de&&h(a.sheenRoughnessMap.channel),specularMapUv:fe&&h(a.specularMap.channel),specularColorMapUv:pe&&h(a.specularColorMap.channel),specularIntensityMapUv:me&&h(a.specularIntensityMap.channel),transmissionMapUv:he&&h(a.transmissionMap.channel),thicknessMapUv:ge&&h(a.thicknessMap.channel),alphaMapUv:ve&&h(a.alphaMap.channel),vertexTangents:!!y.attributes.tangent&&(z||ie),vertexColors:a.vertexColors,vertexAlphas:a.vertexColors===!0&&!!y.attributes.color&&y.attributes.color.itemSize===4,pointsUvs:_.isPoints===!0&&!!y.attributes.uv&&(F||ve),fog:!!v,useFog:a.fog===!0,fogExp2:!!v&&v.isFogExp2,flatShading:a.flatShading===!0&&a.wireframe===!1,sizeAttenuation:a.sizeAttenuation===!0,logarithmicDepthBuffer:d,reversedDepthBuffer:M,skinning:_.isSkinnedMesh===!0,morphTargets:y.morphAttributes.position!==void 0,morphNormals:y.morphAttributes.normal!==void 0,morphColors:y.morphAttributes.color!==void 0,morphTargetsCount:T,morphTextureStride:E,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:Se,decodeVideoTexture:F&&a.map.isVideoTexture===!0&&bi.getTransfer(a.map.colorSpace)===`srgb`,decodeVideoTextureEmissive:B&&a.emissiveMap.isVideoTexture===!0&&bi.getTransfer(a.emissiveMap.colorSpace)===`srgb`,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===2,flipSided:a.side===1,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:xe&&a.extensions.clipCullDistance===!0&&r.has(`WEBGL_clip_cull_distance`),extensionMultiDraw:(xe&&a.extensions.multiDraw===!0||P)&&r.has(`WEBGL_multi_draw`),rendererExtensionParallelShaderCompile:r.has(`KHR_parallel_shader_compile`),customProgramCacheKey:a.customProgramCacheKey()};return Ce.vertexUv1s=l.has(1),Ce.vertexUv2s=l.has(2),Ce.vertexUv3s=l.has(3),l.clear(),Ce}function _(t){let n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),t.defines!==void 0)for(let e in t.defines)n.push(e),n.push(t.defines[e]);return t.isRawShaderMaterial===!1&&(v(n,t),y(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()}function v(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}function y(e,t){s.disableAll(),t.supportsVertexTextures&&s.enable(0),t.instancing&&s.enable(1),t.instancingColor&&s.enable(2),t.instancingMorph&&s.enable(3),t.matcap&&s.enable(4),t.envMap&&s.enable(5),t.normalMapObjectSpace&&s.enable(6),t.normalMapTangentSpace&&s.enable(7),t.clearcoat&&s.enable(8),t.iridescence&&s.enable(9),t.alphaTest&&s.enable(10),t.vertexColors&&s.enable(11),t.vertexAlphas&&s.enable(12),t.vertexUv1s&&s.enable(13),t.vertexUv2s&&s.enable(14),t.vertexUv3s&&s.enable(15),t.vertexTangents&&s.enable(16),t.anisotropy&&s.enable(17),t.alphaHash&&s.enable(18),t.batching&&s.enable(19),t.dispersion&&s.enable(20),t.batchingColor&&s.enable(21),t.gradientMap&&s.enable(22),e.push(s.mask),s.disableAll(),t.fog&&s.enable(0),t.useFog&&s.enable(1),t.flatShading&&s.enable(2),t.logarithmicDepthBuffer&&s.enable(3),t.reversedDepthBuffer&&s.enable(4),t.skinning&&s.enable(5),t.morphTargets&&s.enable(6),t.morphNormals&&s.enable(7),t.morphColors&&s.enable(8),t.premultipliedAlpha&&s.enable(9),t.shadowMapEnabled&&s.enable(10),t.doubleSided&&s.enable(11),t.flipSided&&s.enable(12),t.useDepthPacking&&s.enable(13),t.dithering&&s.enable(14),t.transmission&&s.enable(15),t.sheen&&s.enable(16),t.opaque&&s.enable(17),t.pointsUvs&&s.enable(18),t.decodeVideoTexture&&s.enable(19),t.decodeVideoTextureEmissive&&s.enable(20),t.alphaToCoverage&&s.enable(21),e.push(s.mask)}function b(e){let t=m[e.type],n;if(t){let e=Am[t];n=$o.clone(e.uniforms)}else n=e.uniforms;return n}function x(t,n){let r;for(let e=0,t=u.length;e0?r.push(u):a.transparent===!0?i.push(u):n.push(u)}function c(e,t,a,s,c,l){let u=o(e,t,a,s,c,l);a.transmission>0?r.unshift(u):a.transparent===!0?i.unshift(u):n.unshift(u)}function l(e,t){n.length>1&&n.sort(e||n_),r.length>1&&r.sort(t||r_),i.length>1&&i.sort(t||r_)}function u(){for(let n=t,r=e.length;n=r.length?(i=new i_,r.push(i)):i=r[n],i}function n(){e=new WeakMap}return{get:t,dispose:n}}function o_(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={direction:new Z,color:new Q};break;case`SpotLight`:n={position:new Z,direction:new Z,color:new Q,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case`PointLight`:n={position:new Z,color:new Q,distance:0,decay:0};break;case`HemisphereLight`:n={direction:new Z,skyColor:new Q,groundColor:new Q};break;case`RectAreaLight`:n={color:new Q,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return e[t.id]=n,n}}}function s_(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new X};break;case`SpotLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new X};break;case`PointLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new X,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=n,n}}}var c_=0;function l_(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function u_(e){let t=new o_,n=s_(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)r.probe.push(new Z);let i=new Z,a=new da,o=new da;function s(i){let a=0,o=0,s=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0;i.sort(l_);for(let e=0,y=i.length;e0&&(e.has(`OES_texture_float_linear`)===!0?(r.rectAreaLTC1=$.LTC_FLOAT_1,r.rectAreaLTC2=$.LTC_FLOAT_2):(r.rectAreaLTC1=$.LTC_HALF_1,r.rectAreaLTC2=$.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=o,r.ambient[2]=s;let y=r.hash;(y.directionalLength!==c||y.pointLength!==l||y.spotLength!==u||y.rectAreaLength!==d||y.hemiLength!==f||y.numDirectionalShadows!==p||y.numPointShadows!==m||y.numSpotShadows!==h||y.numSpotMaps!==g||y.numLightProbes!==v)&&(r.directional.length=c,r.spot.length=u,r.rectArea.length=d,r.point.length=l,r.hemi.length=f,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=m,r.pointShadowMap.length=m,r.spotShadow.length=h,r.spotShadowMap.length=h,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=m,r.spotLightMatrix.length=h+g-_,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=_,r.numLightProbes=v,y.directionalLength=c,y.pointLength=l,y.spotLength=u,y.rectAreaLength=d,y.hemiLength=f,y.numDirectionalShadows=p,y.numPointShadows=m,y.numSpotShadows=h,y.numSpotMaps=g,y.numLightProbes=v,r.version=c_++)}function c(e,t){let n=0,s=0,c=0,l=0,u=0,d=t.matrixWorldInverse;for(let t=0,f=e.length;t=i.length?(a=new d_(e),i.push(a)):a=i[r],a}function r(){t=new WeakMap}return{get:n,dispose:r}}var p_=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,m_=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function h_(e,t,n){let r=new vc,i=new X,a=new X,o=new ji,s=new pd({depthPacking:Xn}),c=new md,l={},u=n.maxTextureSize,d={0:1,1:0,2:2},f=new ns({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new X},radius:{value:4}},vertexShader:p_,fragmentShader:m_}),p=f.clone();p.defines.HORIZONTAL_PASS=1;let m=new No;m.setAttribute(`position`,new go(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let h=new Go(m,f),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let _=this.type;this.render=function(t,n,s){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||t.length===0)return;let c=e.getRenderTarget(),l=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),f=e.state;f.setBlending(0),f.buffers.depth.getReversed()===!0?f.buffers.color.setClear(0,0,0,0):f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);let p=_!==3&&this.type===3,m=_===3&&this.type!==3;for(let c=0,l=t.length;cu||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/h.x),i.x=a.x*h.x,d.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/h.y),i.y=a.y*h.y,d.mapSize.y=a.y)),d.map===null||p===!0||m===!0){let e=this.type===3?{}:{minFilter:Tt,magFilter:Tt};d.map!==null&&d.map.dispose(),d.map=new Ni(i.x,i.y,e),d.map.texture.name=l.name+`.shadowMap`,d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();let g=d.getViewportCount();for(let e=0;e0||n.map&&n.alphaTest>0||n.alphaToCoverage===!0){let e=a.uuid,t=n.uuid,r=l[e];r===void 0&&(r={},l[e]=r);let i=r[t];i===void 0&&(i=a.clone(),r[t]=i,n.addEventListener(`dispose`,x)),a=i}if(a.visible=n.visible,a.wireframe=n.wireframe,i===3?a.side=n.shadowSide===null?n.side:n.shadowSide:a.side=n.shadowSide===null?d[n.side]:n.shadowSide,a.alphaMap=n.alphaMap,a.alphaTest=n.alphaToCoverage===!0?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r.isPointLight===!0&&a.isMeshDistanceMaterial===!0){let t=e.properties.get(a);t.light=r}return a}function b(n,i,a,o,s){if(n.visible===!1)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===3)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);let r=t.update(n),c=n.material;if(Array.isArray(c)){let t=r.groups;for(let l=0,u=t.length;l=2):(N=parseFloat(/^WebGL (\d)/.exec(P)[1]),M=N>=1);let F=null,I={},ee=e.getParameter(e.SCISSOR_BOX),te=e.getParameter(e.VIEWPORT),L=new ji().fromArray(ee),R=new ji().fromArray(te);function z(t,n,r,i){let a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o`u`?!1:/OculusBrowser/g.test(navigator.userAgent),l=new X,u=new WeakMap,d,f=new WeakMap,p=!1;try{p=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function m(e,t){return p?new OffscreenCanvas(e,t):Or(`canvas`)}function h(e,t,n){let r=1,i=q(e);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1)if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap||typeof VideoFrame<`u`&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);d===void 0&&(d=m(n,a));let o=t?m(n,a):d;return o.width=n,o.height=a,o.getContext(`2d`).drawImage(e,0,0,n,a),Y(`WebGLRenderer: Texture has been resized from (`+i.width+`x`+i.height+`) to (`+n+`x`+a+`).`),o}else return`data`in e&&Y(`WebGLRenderer: Image in DataTexture is too big (`+i.width+`x`+i.height+`).`),e;return e}function g(e){return e.generateMipmaps}function _(t){e.generateMipmap(t)}function v(t){return t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function y(n,r,i,a,o=!1){if(n!==null){if(e[n]!==void 0)return e[n];Y(`WebGLRenderer: Attempt to use non-existing WebGL internal format '`+n+`'`)}let s=r;if(r===e.RED&&(i===e.FLOAT&&(s=e.R32F),i===e.HALF_FLOAT&&(s=e.R16F),i===e.UNSIGNED_BYTE&&(s=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.R8UI),i===e.UNSIGNED_SHORT&&(s=e.R16UI),i===e.UNSIGNED_INT&&(s=e.R32UI),i===e.BYTE&&(s=e.R8I),i===e.SHORT&&(s=e.R16I),i===e.INT&&(s=e.R32I)),r===e.RG&&(i===e.FLOAT&&(s=e.RG32F),i===e.HALF_FLOAT&&(s=e.RG16F),i===e.UNSIGNED_BYTE&&(s=e.RG8)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RG8UI),i===e.UNSIGNED_SHORT&&(s=e.RG16UI),i===e.UNSIGNED_INT&&(s=e.RG32UI),i===e.BYTE&&(s=e.RG8I),i===e.SHORT&&(s=e.RG16I),i===e.INT&&(s=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGB8UI),i===e.UNSIGNED_SHORT&&(s=e.RGB16UI),i===e.UNSIGNED_INT&&(s=e.RGB32UI),i===e.BYTE&&(s=e.RGB8I),i===e.SHORT&&(s=e.RGB16I),i===e.INT&&(s=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(s=e.RGBA16UI),i===e.UNSIGNED_INT&&(s=e.RGBA32UI),i===e.BYTE&&(s=e.RGBA8I),i===e.SHORT&&(s=e.RGBA16I),i===e.INT&&(s=e.RGBA32I)),r===e.RGB&&(i===e.UNSIGNED_INT_5_9_9_9_REV&&(s=e.RGB9_E5),i===e.UNSIGNED_INT_10F_11F_11F_REV&&(s=e.R11F_G11F_B10F)),r===e.RGBA){let t=o?tr:bi.getTransfer(a);i===e.FLOAT&&(s=e.RGBA32F),i===e.HALF_FLOAT&&(s=e.RGBA16F),i===e.UNSIGNED_BYTE&&(s=t===`srgb`?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)}return(s===e.R16F||s===e.R32F||s===e.RG16F||s===e.RG32F||s===e.RGBA16F||s===e.RGBA32F)&&t.get(`EXT_color_buffer_float`),s}function b(t,n){let r;return t?n===null||n===1014||n===1020?r=e.DEPTH24_STENCIL8:n===1015?r=e.DEPTH32F_STENCIL8:n===1012&&(r=e.DEPTH24_STENCIL8,Y(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):n===null||n===1014||n===1020?r=e.DEPTH_COMPONENT24:n===1015?r=e.DEPTH_COMPONENT32F:n===1012&&(r=e.DEPTH_COMPONENT16),r}function x(e,t){return g(e)===!0||e.isFramebufferTexture&&e.minFilter!==1003&&e.minFilter!==1006?Math.log2(Math.max(t.width,t.height))+1:e.mipmaps!==void 0&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function S(e){let t=e.target;t.removeEventListener(`dispose`,S),w(t),t.isVideoTexture&&u.delete(t)}function C(e){let t=e.target;t.removeEventListener(`dispose`,C),E(t)}function w(e){let t=r.get(e);if(t.__webglInit===void 0)return;let n=e.source,i=f.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,r.usedTimes===0&&T(e),Object.keys(i).length===0&&f.delete(n)}r.remove(e)}function T(t){let n=r.get(t);e.deleteTexture(n.__webglTexture);let i=t.source,a=f.get(i);delete a[n.__cacheKey],o.memory.textures--}function E(t){let n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r=i.maxTextures&&Y(`WebGLTextures: Trying to use `+e+` texture units while this GPU supports only `+i.maxTextures),D+=1,e}function A(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}function j(t,i){let a=r.get(t);if(t.isVideoTexture&&G(t),t.isRenderTargetTexture===!1&&t.isExternalTexture!==!0&&t.version>0&&a.__version!==t.version){let e=t.image;if(e===null)Y(`WebGLRenderer: Texture marked for update but no image data found.`);else if(e.complete===!1)Y(`WebGLRenderer: Texture marked for update but image is incomplete`);else{ne(a,t,i);return}}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}function M(t,i){let a=r.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){ne(a,t,i);return}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)}function N(t,i){let a=r.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){ne(a,t,i);return}n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)}function P(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){B(a,t,i);return}n.bindTexture(e.TEXTURE_CUBE_MAP,a.__webglTexture,e.TEXTURE0+i)}let F={[St]:e.REPEAT,[Ct]:e.CLAMP_TO_EDGE,[wt]:e.MIRRORED_REPEAT},I={[Tt]:e.NEAREST,[Et]:e.NEAREST_MIPMAP_NEAREST,[Ot]:e.NEAREST_MIPMAP_LINEAR,[At]:e.LINEAR,[jt]:e.LINEAR_MIPMAP_NEAREST,[Nt]:e.LINEAR_MIPMAP_LINEAR},ee={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function te(n,a){if(a.type===1015&&t.has(`OES_texture_float_linear`)===!1&&(a.magFilter===1006||a.magFilter===1007||a.magFilter===1005||a.magFilter===1008||a.minFilter===1006||a.minFilter===1007||a.minFilter===1005||a.minFilter===1008)&&Y(`WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),e.texParameteri(n,e.TEXTURE_WRAP_S,F[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,F[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,F[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,I[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,I[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,ee[a.compareFunction])),t.has(`EXT_texture_filter_anisotropic`)===!0){if(a.magFilter===1003||a.minFilter!==1005&&a.minFilter!==1008||a.type===1015&&t.has(`OES_texture_float_linear`)===!1)return;if(a.anisotropy>1||r.get(a).__currentAnisotropy){let o=t.get(`EXT_texture_filter_anisotropic`);e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}}function L(t,n){let r=!1;t.__webglInit===void 0&&(t.__webglInit=!0,n.addEventListener(`dispose`,S));let i=n.source,a=f.get(i);a===void 0&&(a={},f.set(i,a));let s=A(n);if(s!==t.__cacheKey){a[s]===void 0&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;let i=a[t.__cacheKey];i!==void 0&&(a[t.__cacheKey].usedTimes--,i.usedTimes===0&&T(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function R(e,t,n){return Math.floor(Math.floor(e/n)/t)}function z(t,r,i,a){let o=t.updateRanges;if(o.length===0)n.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,i,a,r.data);else{o.sort((e,t)=>e.start-t.start);let s=0;for(let e=1;e0){T&&E&&n.texStorage2D(e.TEXTURE_2D,O,S,w[0].width,w[0].height);for(let t=0,r=w.length;t0){let r=Cm(C.width,C.height,o.format,o.type);for(let i of o.layerUpdates){let a=C.data.subarray(i*r/C.data.BYTES_PER_ELEMENT,(i+1)*r/C.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,i,C.width,C.height,1,m,a)}o.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,C.width,C.height,p.depth,m,C.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,S,C.width,C.height,p.depth,0,C.data,0,0);else Y(`WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`);else T?D&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,C.width,C.height,p.depth,m,v,C.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,S,C.width,C.height,p.depth,0,m,v,C.data)}else{T&&E&&n.texStorage2D(e.TEXTURE_2D,O,S,w[0].width,w[0].height);for(let t=0,r=w.length;t0){let t=Cm(p.width,p.height,o.format,o.type);for(let r of o.layerUpdates){let i=p.data.subarray(r*t/p.data.BYTES_PER_ELEMENT,(r+1)*t/p.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,p.width,p.height,1,m,v,i)}o.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,S,p.width,p.height,p.depth,0,m,v,p.data);else if(o.isData3DTexture)T?(E&&n.texStorage3D(e.TEXTURE_3D,O,S,p.width,p.height,p.depth),D&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)):n.texImage3D(e.TEXTURE_3D,0,S,p.width,p.height,p.depth,0,m,v,p.data);else if(o.isFramebufferTexture){if(E)if(T)n.texStorage2D(e.TEXTURE_2D,O,S,p.width,p.height);else{let t=p.width,r=p.height;for(let i=0;i>=1,r>>=1}}else if(w.length>0){if(T&&E){let t=q(w[0]);n.texStorage2D(e.TEXTURE_2D,O,S,t.width,t.height)}for(let t=0,r=w.length;t0&&D++;let t=q(m[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,D,C,t.width,t.height)}for(let t=0;t<6;t++)if(p){w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,m[t].width,m[t].height,b,S,m[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,C,m[t].width,m[t].height,0,b,S,m[t].data);for(let r=0;r>u),r=Math.max(1,i.height>>u);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,u,p,t,r,i.depth,0,d,f,null):n.texImage2D(l,u,p,t,r,0,d,f,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),ue(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,c,l,h.__webglTexture,0,W(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,c,l,h.__webglTexture,u),n.bindFramebuffer(e.FRAMEBUFFER,null)}function re(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,o=b(n.stencilBuffer,a),c=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,l=W(n);ue(n)?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,l,o,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,l,o,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,o,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,c,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener(`dispose`,t)};e.addEventListener(`dispose`,t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw Error(`target.depthTexture not supported in Cube render targets`);let e=t.texture.mipmaps;e&&e.length>0?ie(i.__webglFramebuffer[0],t):ie(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]===void 0)i.__webglDepthbuffer[r]=e.createRenderbuffer(),re(i.__webglDepthbuffer[r],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer===void 0)i.__webglDepthbuffer=e.createRenderbuffer(),re(i.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}function oe(t,n,i){let a=r.get(t);n!==void 0&&V(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),i!==void 0&&ae(t)}function se(t){let i=t.texture,s=r.get(t),c=r.get(i);t.addEventListener(`dispose`,C);let l=t.textures,u=t.isWebGLCubeRenderTarget===!0,d=l.length>1;if(d||(c.__webglTexture===void 0&&(c.__webglTexture=e.createTexture()),c.__version=i.version,o.memory.textures++),u){s.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer[t]=[];for(let n=0;n0){s.__webglFramebuffer=[];for(let t=0;t0&&ue(t)===!1){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,s.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0){if(ue(t)===!1){let i=t.textures,a=t.width,o=t.height,s=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=i.length>1;if(d)for(let t=0;t0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n0&&t.has(`WEBGL_multisampled_render_to_texture`)===!0&&n.__useRenderToTexture!==!1}function G(e){let t=o.render.frame;u.get(e)!==t&&(u.set(e,t),e.update())}function K(e,t){let n=e.colorSpace,r=e.format,i=e.type;return e.isCompressedTexture===!0||e.isVideoTexture===!0||n!==`srgb-linear`&&n!==``&&(bi.getTransfer(n)===`srgb`?(r!==1023||i!==1009)&&Y(`WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):Fr(`WebGLTextures: Unsupported texture color space:`,n)),t}function q(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement?(l.width=e.naturalWidth||e.width,l.height=e.naturalHeight||e.height):typeof VideoFrame<`u`&&e instanceof VideoFrame?(l.width=e.displayWidth,l.height=e.displayHeight):(l.width=e.width,l.height=e.height),l}this.allocateTextureUnit=k,this.resetTextureUnits=O,this.setTexture2D=j,this.setTexture2DArray=M,this.setTexture3D=N,this.setTextureCube=P,this.rebindTextures=oe,this.setupRenderTarget=se,this.updateRenderTargetMipmap=H,this.updateMultisampleRenderTarget=le,this.setupDepthRenderbuffer=ae,this.setupFrameBufferTexture=V,this.useMultisampledRTT=ue}function y_(e,t){function n(n,r=``){let i,a=bi.getTransfer(r);if(n===1009)return e.UNSIGNED_BYTE;if(n===1017)return e.UNSIGNED_SHORT_4_4_4_4;if(n===1018)return e.UNSIGNED_SHORT_5_5_5_1;if(n===35902)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===35899)return e.UNSIGNED_INT_10F_11F_11F_REV;if(n===1010)return e.BYTE;if(n===1011)return e.SHORT;if(n===1012)return e.UNSIGNED_SHORT;if(n===1013)return e.INT;if(n===1014)return e.UNSIGNED_INT;if(n===1015)return e.FLOAT;if(n===1016)return e.HALF_FLOAT;if(n===1021)return e.ALPHA;if(n===1022)return e.RGB;if(n===1023)return e.RGBA;if(n===1026)return e.DEPTH_COMPONENT;if(n===1027)return e.DEPTH_STENCIL;if(n===1028)return e.RED;if(n===1029)return e.RED_INTEGER;if(n===1030)return e.RG;if(n===1031)return e.RG_INTEGER;if(n===1033)return e.RGBA_INTEGER;if(n===33776||n===33777||n===33778||n===33779)if(a===`srgb`)if(i=t.get(`WEBGL_compressed_texture_s3tc_srgb`),i!==null){if(n===33776)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(i=t.get(`WEBGL_compressed_texture_s3tc`),i!==null){if(n===33776)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===35840||n===35841||n===35842||n===35843)if(i=t.get(`WEBGL_compressed_texture_pvrtc`),i!==null){if(n===35840)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===36196||n===37492||n===37496)if(i=t.get(`WEBGL_compressed_texture_etc`),i!==null){if(n===36196||n===37492)return a===`srgb`?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===37496)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)if(i=t.get(`WEBGL_compressed_texture_astc`),i!==null){if(n===37808)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===37809)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===37810)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===37811)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===37812)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===37813)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===37814)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===37815)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===37816)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===37817)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===37818)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===37819)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===37820)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===37821)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===36492||n===36494||n===36495)if(i=t.get(`EXT_texture_compression_bptc`),i!==null){if(n===36492)return a===`srgb`?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===36494)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===36495)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===36283||n===36284||n===36285||n===36286)if(i=t.get(`EXT_texture_compression_rgtc`),i!==null){if(n===36283)return i.COMPRESSED_RED_RGTC1_EXT;if(n===36284)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===36285)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===36286)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===1020?e.UNSIGNED_INT_24_8:e[n]===void 0?null:e[n]}return{convert:n}}var b_=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,x_=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`,S_=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){let n=new gl(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new ns({vertexShader:b_,fragmentShader:x_,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Go(new qu(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},C_=class extends Rr{constructor(e,t){super();let n=this,r=null,i=1,a=null,o=`local-floor`,s=1,c=null,l=null,u=null,d=null,f=null,p=null,m=typeof XRWebGLBinding<`u`,h=new S_,g={},_=t.getContextAttributes(),v=null,y=null,b=[],x=[],S=new X,C=null,w=new ss;w.viewport=new ji;let T=new ss;T.viewport=new ji;let E=[w,T],D=new Rf,O=null,k=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=b[e];return t===void 0&&(t=new hs,b[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=b[e];return t===void 0&&(t=new hs,b[e]=t),t.getGripSpace()},this.getHand=function(e){let t=b[e];return t===void 0&&(t=new hs,b[e]=t),t.getHandSpace()};function A(e){let t=x.indexOf(e.inputSource);if(t===-1)return;let n=b[t];n!==void 0&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function j(){r.removeEventListener(`select`,A),r.removeEventListener(`selectstart`,A),r.removeEventListener(`selectend`,A),r.removeEventListener(`squeeze`,A),r.removeEventListener(`squeezestart`,A),r.removeEventListener(`squeezeend`,A),r.removeEventListener(`end`,j),r.removeEventListener(`inputsourceschange`,M);for(let e=0;e=0&&(x[r]=null,b[r].disconnect(n))}for(let t=0;t=x.length){x.push(n),r=e;break}else if(x[e]===null){x[e]=n,r=e;break}if(r===-1)break}let i=b[r];i&&i.connect(n)}}let N=new Z,P=new Z;function F(e,t,n){N.setFromMatrixPosition(t.matrixWorld),P.setFromMatrixPosition(n.matrixWorld);let r=N.distanceTo(P),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],f=o*u,p=o*d,m=r/(-u+d),h=m*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(h),e.translateZ(m),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),i[10]===-1)e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=o+m,n=s+m,i=f-h,a=p+(r-h),u=c*s/n*t,d=l*s/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}function I(e,t){t===null?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(r===null)return;let t=e.near,n=e.far;h.texture!==null&&(h.depthNear>0&&(t=h.depthNear),h.depthFar>0&&(n=h.depthFar)),D.near=T.near=w.near=t,D.far=T.far=w.far=n,(O!==D.near||k!==D.far)&&(r.updateRenderState({depthNear:D.near,depthFar:D.far}),O=D.near,k=D.far),D.layers.mask=e.layers.mask|6,w.layers.mask=D.layers.mask&3,T.layers.mask=D.layers.mask&5;let i=e.parent,a=D.cameras;I(D,i);for(let e=0;e0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,o=i.envMapRotation;a&&(e.envMap.value=a,w_.copy(o),w_.x*=-1,w_.y*=-1,w_.z*=-1,a.isCubeTexture&&a.isRenderTargetTexture===!1&&(w_.y*=-1,w_.z*=-1),e.envMapRotation.value.setFromMatrix4(T_.makeRotationFromEuler(w_)),e.flipEnvMap.value=a.isCubeTexture&&a.isRenderTargetTexture===!1?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}function o(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}function s(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function c(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=i*.5,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function l(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function u(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}function d(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function f(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function p(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===1&&e.clearcoatNormalScale.value.negate())),t.dispersion>0&&(e.dispersion.value=t.dispersion),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}function m(e,t){t.matcap&&(e.matcap.value=t.matcap)}function h(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function D_(e,t,n,r){let i={},a={},o=[],s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function c(e,t){let n=t.program;r.uniformBlockBinding(e,n)}function l(e,n){let o=i[e.id];o===void 0&&(m(e),o=u(e),i[e.id]=o,e.addEventListener(`dispose`,g));let s=n.program;r.updateUBOMapping(e,s);let c=t.render.frame;a[e.id]!==c&&(f(e),a[e.id]=c)}function u(t){let n=d();t.__bindingPointIndex=n;let r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}function d(){for(let e=0;e0&&(n+=16-r),e.__size=n,e.__cache={},this}function h(e){let t={boundary:0,storage:0};return typeof e==`number`||typeof e==`boolean`?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?Y(`WebGLRenderer: Texture samplers can not be part of an uniforms group.`):Y(`WebGLRenderer: Unsupported uniform value type.`,e),t}function g(t){let n=t.target;n.removeEventListener(`dispose`,g);let r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}function _(){for(let t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}return{bind:c,update:l,dispose:_}}var O_=new Uint16Array([11481,15204,11534,15171,11808,15015,12385,14843,12894,14716,13396,14600,13693,14483,13976,14366,14237,14171,14405,13961,14511,13770,14605,13598,14687,13444,14760,13305,14822,13066,14876,12857,14923,12675,14963,12517,14997,12379,15025,12230,15049,12023,15070,11843,15086,11687,15100,11551,15111,11433,15120,11330,15127,11217,15132,11060,15135,10922,15138,10801,15139,10695,15139,10600,13012,14923,13020,14917,13064,14886,13176,14800,13349,14666,13513,14526,13724,14398,13960,14230,14200,14020,14383,13827,14488,13651,14583,13491,14667,13348,14740,13132,14803,12908,14856,12713,14901,12542,14938,12394,14968,12241,14992,12017,15010,11822,15024,11654,15034,11507,15041,11380,15044,11269,15044,11081,15042,10913,15037,10764,15031,10635,15023,10520,15014,10419,15003,10330,13657,14676,13658,14673,13670,14660,13698,14622,13750,14547,13834,14442,13956,14317,14112,14093,14291,13889,14407,13704,14499,13538,14586,13389,14664,13201,14733,12966,14792,12758,14842,12577,14882,12418,14915,12272,14940,12033,14959,11826,14972,11646,14980,11490,14983,11355,14983,11212,14979,11008,14971,10830,14961,10675,14950,10540,14936,10420,14923,10315,14909,10204,14894,10041,14089,14460,14090,14459,14096,14452,14112,14431,14141,14388,14186,14305,14252,14130,14341,13941,14399,13756,14467,13585,14539,13430,14610,13272,14677,13026,14737,12808,14790,12617,14833,12449,14869,12303,14896,12065,14916,11845,14929,11655,14937,11490,14939,11347,14936,11184,14930,10970,14921,10783,14912,10621,14900,10480,14885,10356,14867,10247,14848,10062,14827,9894,14805,9745,14400,14208,14400,14206,14402,14198,14406,14174,14415,14122,14427,14035,14444,13913,14469,13767,14504,13613,14548,13463,14598,13324,14651,13082,14704,12858,14752,12658,14795,12483,14831,12330,14860,12106,14881,11875,14895,11675,14903,11501,14905,11351,14903,11178,14900,10953,14892,10757,14880,10589,14865,10442,14847,10313,14827,10162,14805,9965,14782,9792,14757,9642,14731,9507,14562,13883,14562,13883,14563,13877,14566,13862,14570,13830,14576,13773,14584,13689,14595,13582,14613,13461,14637,13336,14668,13120,14704,12897,14741,12695,14776,12516,14808,12358,14835,12150,14856,11910,14870,11701,14878,11519,14882,11361,14884,11187,14880,10951,14871,10748,14858,10572,14842,10418,14823,10286,14801,10099,14777,9897,14751,9722,14725,9567,14696,9430,14666,9309,14702,13604,14702,13604,14702,13600,14703,13591,14705,13570,14707,13533,14709,13477,14712,13400,14718,13305,14727,13106,14743,12907,14762,12716,14784,12539,14807,12380,14827,12190,14844,11943,14855,11727,14863,11539,14870,11376,14871,11204,14868,10960,14858,10748,14845,10565,14829,10406,14809,10269,14786,10058,14761,9852,14734,9671,14705,9512,14674,9374,14641,9253,14608,9076,14821,13366,14821,13365,14821,13364,14821,13358,14821,13344,14821,13320,14819,13252,14817,13145,14815,13011,14814,12858,14817,12698,14823,12539,14832,12389,14841,12214,14850,11968,14856,11750,14861,11558,14866,11390,14867,11226,14862,10972,14853,10754,14840,10565,14823,10401,14803,10259,14780,10032,14754,9820,14725,9635,14694,9473,14661,9333,14627,9203,14593,8988,14557,8798,14923,13014,14922,13014,14922,13012,14922,13004,14920,12987,14919,12957,14915,12907,14909,12834,14902,12738,14894,12623,14888,12498,14883,12370,14880,12203,14878,11970,14875,11759,14873,11569,14874,11401,14872,11243,14865,10986,14855,10762,14842,10568,14825,10401,14804,10255,14781,10017,14754,9799,14725,9611,14692,9445,14658,9301,14623,9139,14587,8920,14548,8729,14509,8562,15008,12672,15008,12672,15008,12671,15007,12667,15005,12656,15001,12637,14997,12605,14989,12556,14978,12490,14966,12407,14953,12313,14940,12136,14927,11934,14914,11742,14903,11563,14896,11401,14889,11247,14879,10992,14866,10767,14851,10570,14833,10400,14812,10252,14789,10007,14761,9784,14731,9592,14698,9424,14663,9279,14627,9088,14588,8868,14548,8676,14508,8508,14467,8360,15080,12386,15080,12386,15079,12385,15078,12383,15076,12378,15072,12367,15066,12347,15057,12315,15045,12253,15030,12138,15012,11998,14993,11845,14972,11685,14951,11530,14935,11383,14920,11228,14904,10981,14887,10762,14870,10567,14850,10397,14827,10248,14803,9997,14774,9771,14743,9578,14710,9407,14674,9259,14637,9048,14596,8826,14555,8632,14514,8464,14471,8317,14427,8182,15139,12008,15139,12008,15138,12008,15137,12007,15135,12003,15130,11990,15124,11969,15115,11929,15102,11872,15086,11794,15064,11693,15041,11581,15013,11459,14987,11336,14966,11170,14944,10944,14921,10738,14898,10552,14875,10387,14850,10239,14824,9983,14794,9758,14762,9563,14728,9392,14692,9244,14653,9014,14611,8791,14569,8597,14526,8427,14481,8281,14436,8110,14391,7885,15188,11617,15188,11617,15187,11617,15186,11618,15183,11617,15179,11612,15173,11601,15163,11581,15150,11546,15133,11495,15110,11427,15083,11346,15051,11246,15024,11057,14996,10868,14967,10687,14938,10517,14911,10362,14882,10206,14853,9956,14821,9737,14787,9543,14752,9375,14715,9228,14675,8980,14632,8760,14589,8565,14544,8395,14498,8248,14451,8049,14404,7824,14357,7630,15228,11298,15228,11298,15227,11299,15226,11301,15223,11303,15219,11302,15213,11299,15204,11290,15191,11271,15174,11217,15150,11129,15119,11015,15087,10886,15057,10744,15024,10599,14990,10455,14957,10318,14924,10143,14891,9911,14856,9701,14820,9516,14782,9352,14744,9200,14703,8946,14659,8725,14615,8533,14568,8366,14521,8220,14472,7992,14423,7770,14374,7578,14315,7408,15260,10819,15260,10819,15259,10822,15258,10826,15256,10832,15251,10836,15246,10841,15237,10838,15225,10821,15207,10788,15183,10734,15151,10660,15120,10571,15087,10469,15049,10359,15012,10249,14974,10041,14937,9837,14900,9647,14860,9475,14820,9320,14779,9147,14736,8902,14691,8688,14646,8499,14598,8335,14549,8189,14499,7940,14448,7720,14397,7529,14347,7363,14256,7218,15285,10410,15285,10411,15285,10413,15284,10418,15282,10425,15278,10434,15272,10442,15264,10449,15252,10445,15235,10433,15210,10403,15179,10358,15149,10301,15113,10218,15073,10059,15033,9894,14991,9726,14951,9565,14909,9413,14865,9273,14822,9073,14777,8845,14730,8641,14682,8459,14633,8300,14583,8129,14531,7883,14479,7670,14426,7482,14373,7321,14305,7176,14201,6939,15305,9939,15305,9940,15305,9945,15304,9955,15302,9967,15298,9989,15293,10010,15286,10033,15274,10044,15258,10045,15233,10022,15205,9975,15174,9903,15136,9808,15095,9697,15053,9578,15009,9451,14965,9327,14918,9198,14871,8973,14825,8766,14775,8579,14725,8408,14675,8259,14622,8058,14569,7821,14515,7615,14460,7435,14405,7276,14350,7108,14256,6866,14149,6653,15321,9444,15321,9445,15321,9448,15320,9458,15317,9470,15314,9490,15310,9515,15302,9540,15292,9562,15276,9579,15251,9577,15226,9559,15195,9519,15156,9463,15116,9389,15071,9304,15025,9208,14978,9023,14927,8838,14878,8661,14827,8496,14774,8344,14722,8206,14667,7973,14612,7749,14556,7555,14499,7382,14443,7229,14385,7025,14322,6791,14210,6588,14100,6409,15333,8920,15333,8921,15332,8927,15332,8943,15329,8965,15326,9002,15322,9048,15316,9106,15307,9162,15291,9204,15267,9221,15244,9221,15212,9196,15175,9134,15133,9043,15088,8930,15040,8801,14990,8665,14938,8526,14886,8391,14830,8261,14775,8087,14719,7866,14661,7664,14603,7482,14544,7322,14485,7178,14426,6936,14367,6713,14281,6517,14166,6348,14054,6198,15341,8360,15341,8361,15341,8366,15341,8379,15339,8399,15336,8431,15332,8473,15326,8527,15318,8585,15302,8632,15281,8670,15258,8690,15227,8690,15191,8664,15149,8612,15104,8543,15055,8456,15001,8360,14948,8259,14892,8122,14834,7923,14776,7734,14716,7558,14656,7397,14595,7250,14534,7070,14472,6835,14410,6628,14350,6443,14243,6283,14125,6135,14010,5889,15348,7715,15348,7717,15348,7725,15347,7745,15345,7780,15343,7836,15339,7905,15334,8e3,15326,8103,15310,8193,15293,8239,15270,8270,15240,8287,15204,8283,15163,8260,15118,8223,15067,8143,15014,8014,14958,7873,14899,7723,14839,7573,14778,7430,14715,7293,14652,7164,14588,6931,14524,6720,14460,6531,14396,6362,14330,6210,14207,6015,14086,5781,13969,5576,15352,7114,15352,7116,15352,7128,15352,7159,15350,7195,15348,7237,15345,7299,15340,7374,15332,7457,15317,7544,15301,7633,15280,7703,15251,7754,15216,7775,15176,7767,15131,7733,15079,7670,15026,7588,14967,7492,14906,7387,14844,7278,14779,7171,14714,6965,14648,6770,14581,6587,14515,6420,14448,6269,14382,6123,14299,5881,14172,5665,14049,5477,13929,5310,15355,6329,15355,6330,15355,6339,15355,6362,15353,6410,15351,6472,15349,6572,15344,6688,15337,6835,15323,6985,15309,7142,15287,7220,15260,7277,15226,7310,15188,7326,15142,7318,15090,7285,15036,7239,14976,7177,14914,7045,14849,6892,14782,6736,14714,6581,14645,6433,14576,6293,14506,6164,14438,5946,14369,5733,14270,5540,14140,5369,14014,5216,13892,5043,15357,5483,15357,5484,15357,5496,15357,5528,15356,5597,15354,5692,15351,5835,15347,6011,15339,6195,15328,6317,15314,6446,15293,6566,15268,6668,15235,6746,15197,6796,15152,6811,15101,6790,15046,6748,14985,6673,14921,6583,14854,6479,14785,6371,14714,6259,14643,6149,14571,5946,14499,5750,14428,5567,14358,5401,14242,5250,14109,5111,13980,4870,13856,4657,15359,4555,15359,4557,15358,4573,15358,4633,15357,4715,15355,4841,15353,5061,15349,5216,15342,5391,15331,5577,15318,5770,15299,5967,15274,6150,15243,6223,15206,6280,15161,6310,15111,6317,15055,6300,14994,6262,14928,6208,14860,6141,14788,5994,14715,5838,14641,5684,14566,5529,14492,5384,14418,5247,14346,5121,14216,4892,14079,4682,13948,4496,13822,4330,15359,3498,15359,3501,15359,3520,15359,3598,15358,3719,15356,3860,15355,4137,15351,4305,15344,4563,15334,4809,15321,5116,15303,5273,15280,5418,15250,5547,15214,5653,15170,5722,15120,5761,15064,5763,15002,5733,14935,5673,14865,5597,14792,5504,14716,5400,14640,5294,14563,5185,14486,5041,14410,4841,14335,4655,14191,4482,14051,4325,13918,4183,13790,4012,15360,2282,15360,2285,15360,2306,15360,2401,15359,2547,15357,2748,15355,3103,15352,3349,15345,3675,15336,4020,15324,4272,15307,4496,15285,4716,15255,4908,15220,5086,15178,5170,15128,5214,15072,5234,15010,5231,14943,5206,14871,5166,14796,5102,14718,4971,14639,4833,14559,4687,14480,4541,14402,4401,14315,4268,14167,4142,14025,3958,13888,3747,13759,3556,15360,923,15360,925,15360,946,15360,1052,15359,1214,15357,1494,15356,1892,15352,2274,15346,2663,15338,3099,15326,3393,15309,3679,15288,3980,15260,4183,15226,4325,15185,4437,15136,4517,15080,4570,15018,4591,14950,4581,14877,4545,14800,4485,14720,4411,14638,4325,14556,4231,14475,4136,14395,3988,14297,3803,14145,3628,13999,3465,13861,3314,13729,3177,15360,263,15360,264,15360,272,15360,325,15359,407,15358,548,15356,780,15352,1144,15347,1580,15339,2099,15328,2425,15312,2795,15292,3133,15264,3329,15232,3517,15191,3689,15143,3819,15088,3923,15025,3978,14956,3999,14882,3979,14804,3931,14722,3855,14639,3756,14554,3645,14470,3529,14388,3409,14279,3289,14124,3173,13975,3055,13834,2848,13701,2658,15360,49,15360,49,15360,52,15360,75,15359,111,15358,201,15356,283,15353,519,15348,726,15340,1045,15329,1415,15314,1795,15295,2173,15269,2410,15237,2649,15197,2866,15150,3054,15095,3140,15032,3196,14963,3228,14888,3236,14808,3224,14725,3191,14639,3146,14553,3088,14466,2976,14382,2836,14262,2692,14103,2549,13952,2409,13808,2278,13674,2154,15360,4,15360,4,15360,4,15360,13,15359,33,15358,59,15357,112,15353,199,15348,302,15341,456,15331,628,15316,827,15297,1082,15272,1332,15241,1601,15202,1851,15156,2069,15101,2172,15039,2256,14970,2314,14894,2348,14813,2358,14728,2344,14640,2311,14551,2263,14463,2203,14376,2133,14247,2059,14084,1915,13930,1761,13784,1609,13648,1464,15360,0,15360,0,15360,0,15360,3,15359,18,15358,26,15357,53,15354,80,15348,97,15341,165,15332,238,15318,326,15299,427,15275,529,15245,654,15207,771,15161,885,15108,994,15046,1089,14976,1170,14900,1229,14817,1266,14731,1284,14641,1282,14550,1260,14460,1223,14370,1174,14232,1116,14066,1050,13909,981,13761,910,13623,839]),k_=null;function A_(){return k_===null&&(k_=new Qs(O_,32,32,tn,Ht),k_.minFilter=At,k_.magFilter=At,k_.wrapS=Ct,k_.wrapT=Ct,k_.generateMipmaps=!1,k_.needsUpdate=!0),k_}var j_=class{constructor(e={}){let{canvas:t=kr(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:s=!0,preserveDrawingBuffer:c=!1,powerPreference:l=`default`,failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:d=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<`u`&&n instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);f=n.getContextAttributes().alpha}else f=a;let p=new Set([an,nn,en]),m=new Set([Ft,Bt,Rt,Gt,Ut,Wt]),h=new Uint32Array(4),g=new Int32Array(4),_=null,v=null,y=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=0,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let x=this,S=!1;this._outputColorSpace=$n;let C=0,w=0,T=null,E=-1,D=null,O=new ji,k=new ji,A=null,j=new Q(0),M=0,N=t.width,P=t.height,F=1,I=null,ee=null,te=new ji(0,0,N,P),L=new ji(0,0,N,P),R=!1,z=new vc,ne=!1,B=!1,V=new da,re=new Z,ie=new ji,ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},oe=!1;function se(){return T===null?F:1}let H=n;function ce(e,n){return t.getContext(e,n)}try{let e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if(`setAttribute`in t&&t.setAttribute(`data-engine`,`three.js r181`),t.addEventListener(`webglcontextlost`,ke,!1),t.addEventListener(`webglcontextrestored`,Ae,!1),t.addEventListener(`webglcontextcreationerror`,je,!1),H===null){let t=`webgl2`;if(H=ce(t,e),H===null)throw ce(t)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(e){throw e(`WebGLRenderer: `+e.message),e}let U,le,W,ue,G,K,q,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,J,Te,Ee;function De(){U=new sh(H),U.init(),J=new y_(H,U),le=new Lm(H,U,e,J),W=new __(H,U),le.reversedDepthBuffer&&d&&W.buffers.depth.setReversed(!0),ue=new uh(H),G=new t_,K=new v_(H,U,W,G,le,J,ue),q=new zm(x),de=new oh(x),fe=new Om(H),Te=new Fm(H,fe),pe=new ch(H,fe,ue,Te),me=new fh(H,pe,fe,ue),Se=new dh(H,le,K),ye=new Rm(G),he=new e_(x,q,de,U,le,Te,ye),ge=new E_(x,G),_e=new a_,ve=new f_(U),xe=new Pm(x,q,de,W,me,f,s),be=new h_(x,me,le),Ee=new D_(H,ue,le,W),Ce=new Im(H,U,ue),we=new lh(H,U,ue),ue.programs=he.programs,x.capabilities=le,x.extensions=U,x.properties=G,x.renderLists=_e,x.shadowMap=be,x.state=W,x.info=ue}De();let Oe=new C_(x,H);this.xr=Oe,this.getContext=function(){return H},this.getContextAttributes=function(){return H.getContextAttributes()},this.forceContextLoss=function(){let e=U.get(`WEBGL_lose_context`);e&&e.loseContext()},this.forceContextRestore=function(){let e=U.get(`WEBGL_lose_context`);e&&e.restoreContext()},this.getPixelRatio=function(){return F},this.setPixelRatio=function(e){e!==void 0&&(F=e,this.setSize(N,P,!1))},this.getSize=function(e){return e.set(N,P)},this.setSize=function(e,n,r=!0){if(Oe.isPresenting){Y(`WebGLRenderer: Can't change size while VR device is presenting.`);return}N=e,P=n,t.width=Math.floor(e*F),t.height=Math.floor(n*F),r===!0&&(t.style.width=e+`px`,t.style.height=n+`px`),this.setViewport(0,0,e,n)},this.getDrawingBufferSize=function(e){return e.set(N*F,P*F).floor()},this.setDrawingBufferSize=function(e,n,r){N=e,P=n,F=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(O)},this.getViewport=function(e){return e.copy(te)},this.setViewport=function(e,t,n,r){e.isVector4?te.set(e.x,e.y,e.z,e.w):te.set(e,t,n,r),W.viewport(O.copy(te).multiplyScalar(F).round())},this.getScissor=function(e){return e.copy(L)},this.setScissor=function(e,t,n,r){e.isVector4?L.set(e.x,e.y,e.z,e.w):L.set(e,t,n,r),W.scissor(k.copy(L).multiplyScalar(F).round())},this.getScissorTest=function(){return R},this.setScissorTest=function(e){W.setScissorTest(R=e)},this.setOpaqueSort=function(e){I=e},this.setTransparentSort=function(e){ee=e},this.getClearColor=function(e){return e.copy(xe.getClearColor())},this.setClearColor=function(){xe.setClearColor(...arguments)},this.getClearAlpha=function(){return xe.getClearAlpha()},this.setClearAlpha=function(){xe.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(T!==null){let t=T.texture.format;e=p.has(t)}if(e){let e=T.texture.type,t=m.has(e),n=xe.getClearColor(),r=xe.getClearAlpha(),i=n.r,a=n.g,o=n.b;t?(h[0]=i,h[1]=a,h[2]=o,h[3]=r,H.clearBufferuiv(H.COLOR,0,h)):(g[0]=i,g[1]=a,g[2]=o,g[3]=r,H.clearBufferiv(H.COLOR,0,g))}else r|=H.COLOR_BUFFER_BIT}t&&(r|=H.DEPTH_BUFFER_BIT),n&&(r|=H.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),H.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener(`webglcontextlost`,ke,!1),t.removeEventListener(`webglcontextrestored`,Ae,!1),t.removeEventListener(`webglcontextcreationerror`,je,!1),xe.dispose(),_e.dispose(),ve.dispose(),G.dispose(),q.dispose(),de.dispose(),me.dispose(),Te.dispose(),Ee.dispose(),he.dispose(),Oe.dispose(),Oe.removeEventListener(`sessionstart`,Re),Oe.removeEventListener(`sessionend`,ze),Be.stop()};function ke(e){e.preventDefault(),Pr(`WebGLRenderer: Context Lost.`),S=!0}function Ae(){Pr(`WebGLRenderer: Context Restored.`),S=!1;let e=ue.autoReset,t=be.enabled,n=be.autoUpdate,r=be.needsUpdate,i=be.type;De(),ue.autoReset=e,be.enabled=t,be.autoUpdate=n,be.needsUpdate=r,be.type=i}function je(e){Fr(`WebGLRenderer: A WebGL context could not be created. Reason: `,e.statusMessage)}function Me(e){let t=e.target;t.removeEventListener(`dispose`,Me),Ne(t)}function Ne(e){Pe(e),G.remove(e)}function Pe(e){let t=G.get(e).programs;t!==void 0&&(t.forEach(function(e){he.releaseProgram(e)}),e.isShaderMaterial&&he.releaseShaderCache(e))}this.renderBufferDirect=function(e,t,n,r,i,a){t===null&&(t=ae);let o=i.isMesh&&i.matrixWorld.determinant()<0,s=Ye(e,t,n,r,i);W.setMaterial(r,o);let c=n.index,l=1;if(r.wireframe===!0){if(c=pe.getWireframeAttribute(n),c===void 0)return;l=2}let u=n.drawRange,d=n.attributes.position,f=u.start*l,p=(u.start+u.count)*l;a!==null&&(f=Math.max(f,a.start*l),p=Math.min(p,(a.start+a.count)*l)),c===null?d!=null&&(f=Math.max(f,0),p=Math.min(p,d.count)):(f=Math.max(f,0),p=Math.min(p,c.count));let m=p-f;if(m<0||m===1/0)return;Te.setup(i,r,s,n,c);let h,g=Ce;if(c!==null&&(h=fe.get(c),g=we,g.setIndex(h)),i.isMesh)r.wireframe===!0?(W.setLineWidth(r.wireframeLinewidth*se()),g.setMode(H.LINES)):g.setMode(H.TRIANGLES);else if(i.isLine){let e=r.linewidth;e===void 0&&(e=1),W.setLineWidth(e*se()),i.isLineSegments?g.setMode(H.LINES):i.isLineLoop?g.setMode(H.LINE_LOOP):g.setMode(H.LINE_STRIP)}else i.isPoints?g.setMode(H.POINTS):i.isSprite&&g.setMode(H.TRIANGLES);if(i.isBatchedMesh)if(i._multiDrawInstances!==null)Ir(`WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.`),g.renderMultiDrawInstances(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount,i._multiDrawInstances);else if(U.get(`WEBGL_multi_draw`))g.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{let e=i._multiDrawStarts,t=i._multiDrawCounts,n=i._multiDrawCount,a=c?fe.get(c).bytesPerElement:1,o=G.get(r).currentProgram.getUniforms();for(let r=0;r{function n(){if(r.forEach(function(e){G.get(e).currentProgram.isReady()&&r.delete(e)}),r.size===0){t(e);return}setTimeout(n,10)}U.get(`KHR_parallel_shader_compile`)===null?setTimeout(n,10):n()})};let Ie=null;function Le(e){Ie&&Ie(e)}function Re(){Be.stop()}function ze(){Be.start()}let Be=new Dm;Be.setAnimationLoop(Le),typeof self<`u`&&Be.setContext(self),this.setAnimationLoop=function(e){Ie=e,Oe.setAnimationLoop(e),e===null?Be.stop():Be.start()},Oe.addEventListener(`sessionstart`,Re),Oe.addEventListener(`sessionend`,ze),this.render=function(e,t){if(t!==void 0&&t.isCamera!==!0){Fr(`WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(S===!0)return;if(e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),Oe.enabled===!0&&Oe.isPresenting===!0&&(Oe.cameraAutoUpdate===!0&&Oe.updateCamera(t),t=Oe.getCamera()),e.isScene===!0&&e.onBeforeRender(x,e,t,T),v=ve.get(e,b.length),v.init(t),b.push(v),V.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),z.setFromProjectionMatrix(V,br,t.reversedDepth),B=this.localClippingEnabled,ne=ye.init(this.clippingPlanes,B),_=_e.get(e,y.length),_.init(),y.push(_),Oe.enabled===!0&&Oe.isPresenting===!0){let e=x.xr.getDepthSensingMesh();e!==null&&Ve(e,t,-1/0,x.sortObjects)}Ve(e,t,0,x.sortObjects),_.finish(),x.sortObjects===!0&&_.sort(I,ee),oe=Oe.enabled===!1||Oe.isPresenting===!1||Oe.hasDepthSensing()===!1,oe&&xe.addToRenderList(_,e),this.info.render.frame++,ne===!0&&ye.beginShadows();let n=v.state.shadowsArray;be.render(n,e,t),ne===!0&&ye.endShadows(),this.info.autoReset===!0&&this.info.reset();let r=_.opaque,i=_.transmissive;if(v.setupLights(),t.isArrayCamera){let n=t.cameras;if(i.length>0)for(let t=0,a=n.length;t0&&Ue(r,i,e,t),oe&&xe.render(e),He(_,e,t);T!==null&&w===0&&(K.updateMultisampleRenderTarget(T),K.updateRenderTargetMipmap(T)),e.isScene===!0&&e.onAfterRender(x,e,t),Te.resetDefaultState(),E=-1,D=null,b.pop(),b.length>0?(v=b[b.length-1],ne===!0&&ye.setGlobalState(x.clippingPlanes,v.state.camera)):v=null,y.pop(),_=y.length>0?y[y.length-1]:null};function Ve(e,t,n,r){if(e.visible===!1)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLight)v.pushLight(e),e.castShadow&&v.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||z.intersectsSprite(e)){r&&ie.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);let t=me.update(e),i=e.material;i.visible&&_.push(e,t,i,n,ie.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||z.intersectsObject(e))){let t=me.update(e),i=e.material;if(r&&(e.boundingSphere===void 0?(t.boundingSphere===null&&t.computeBoundingSphere(),ie.copy(t.boundingSphere.center)):(e.boundingSphere===null&&e.computeBoundingSphere(),ie.copy(e.boundingSphere.center)),ie.applyMatrix4(e.matrixWorld).applyMatrix4(V)),Array.isArray(i)){let r=t.groups;for(let a=0,o=r.length;a0&&We(i,t,n),a.length>0&&We(a,t,n),o.length>0&&We(o,t,n),W.buffers.depth.setTest(!0),W.buffers.depth.setMask(!0),W.buffers.color.setMask(!0),W.setPolygonOffset(!1)}function Ue(e,t,n,r){if((n.isScene===!0?n.overrideMaterial:null)!==null)return;v.state.transmissionRenderTarget[r.id]===void 0&&(v.state.transmissionRenderTarget[r.id]=new Ni(1,1,{generateMipmaps:!0,type:U.has(`EXT_color_buffer_half_float`)||U.has(`EXT_color_buffer_float`)?Ht:Ft,minFilter:Nt,samples:4,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:bi.workingColorSpace}));let a=v.state.transmissionRenderTarget[r.id],o=r.viewport||O;a.setSize(o.z*x.transmissionResolutionScale,o.w*x.transmissionResolutionScale);let s=x.getRenderTarget(),c=x.getActiveCubeFace(),l=x.getActiveMipmapLevel();x.setRenderTarget(a),x.getClearColor(j),M=x.getClearAlpha(),M<1&&x.setClearColor(16777215,.5),x.clear(),oe&&xe.render(n);let u=x.toneMapping;x.toneMapping=0;let d=r.viewport;if(r.viewport!==void 0&&(r.viewport=void 0),v.setupLightsView(r),ne===!0&&ye.setGlobalState(x.clippingPlanes,r),We(e,n,r),K.updateMultisampleRenderTarget(a),K.updateRenderTargetMipmap(a),U.has(`WEBGL_multisampled_render_to_texture`)===!1){let e=!1;for(let i=0,a=t.length;i0),d=!!n.morphAttributes.position,f=!!n.morphAttributes.normal,p=!!n.morphAttributes.color,m=0;r.toneMapped&&(T===null||T.isXRRenderTarget===!0)&&(m=x.toneMapping);let h=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,g=h===void 0?0:h.length,_=G.get(r),y=v.state.lights;if(ne===!0&&(B===!0||e!==D)){let t=e===D&&r.id===E;ye.setState(r,e,t)}let b=!1;r.version===_.__version?_.needsLights&&_.lightsStateVersion!==y.state.version?b=!0:_.outputColorSpace===s?i.isBatchedMesh&&_.batching===!1||!i.isBatchedMesh&&_.batching===!0||i.isBatchedMesh&&_.batchingColor===!0&&i.colorTexture===null||i.isBatchedMesh&&_.batchingColor===!1&&i.colorTexture!==null||i.isInstancedMesh&&_.instancing===!1||!i.isInstancedMesh&&_.instancing===!0||i.isSkinnedMesh&&_.skinning===!1||!i.isSkinnedMesh&&_.skinning===!0||i.isInstancedMesh&&_.instancingColor===!0&&i.instanceColor===null||i.isInstancedMesh&&_.instancingColor===!1&&i.instanceColor!==null||i.isInstancedMesh&&_.instancingMorph===!0&&i.morphTexture===null||i.isInstancedMesh&&_.instancingMorph===!1&&i.morphTexture!==null?b=!0:_.envMap===c?r.fog===!0&&_.fog!==a||_.numClippingPlanes!==void 0&&(_.numClippingPlanes!==ye.numPlanes||_.numIntersection!==ye.numIntersection)?b=!0:_.vertexAlphas===l&&_.vertexTangents===u&&_.morphTargets===d&&_.morphNormals===f&&_.morphColors===p&&_.toneMapping===m?_.morphTargetsCount!==g&&(b=!0):b=!0:b=!0:b=!0:(b=!0,_.__version=r.version);let S=_.currentProgram;b===!0&&(S=Ke(r,t,i));let C=!1,w=!1,O=!1,k=S.getUniforms(),A=_.uniforms;if(W.useProgram(S.program)&&(C=!0,w=!0,O=!0),r.id!==E&&(E=r.id,w=!0),C||D!==e){W.buffers.depth.getReversed()&&e.reversedDepth!==!0&&(e._reversedDepth=!0,e.updateProjectionMatrix()),k.setValue(H,`projectionMatrix`,e.projectionMatrix),k.setValue(H,`viewMatrix`,e.matrixWorldInverse);let t=k.map.cameraPosition;t!==void 0&&t.setValue(H,re.setFromMatrixPosition(e.matrixWorld)),le.logarithmicDepthBuffer&&k.setValue(H,`logDepthBufFC`,2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&k.setValue(H,`isOrthographic`,e.isOrthographicCamera===!0),D!==e&&(D=e,w=!0,O=!0)}if(i.isSkinnedMesh){k.setOptional(H,i,`bindMatrix`),k.setOptional(H,i,`bindMatrixInverse`);let e=i.skeleton;e&&(e.boneTexture===null&&e.computeBoneTexture(),k.setValue(H,`boneTexture`,e.boneTexture,K))}i.isBatchedMesh&&(k.setOptional(H,i,`batchingTexture`),k.setValue(H,`batchingTexture`,i._matricesTexture,K),k.setOptional(H,i,`batchingIdTexture`),k.setValue(H,`batchingIdTexture`,i._indirectTexture,K),k.setOptional(H,i,`batchingColorTexture`),i._colorsTexture!==null&&k.setValue(H,`batchingColorTexture`,i._colorsTexture,K));let j=n.morphAttributes;if((j.position!==void 0||j.normal!==void 0||j.color!==void 0)&&Se.update(i,n,S),(w||_.receiveShadow!==i.receiveShadow)&&(_.receiveShadow=i.receiveShadow,k.setValue(H,`receiveShadow`,i.receiveShadow)),r.isMeshGouraudMaterial&&r.envMap!==null&&(A.envMap.value=c,A.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1),r.isMeshStandardMaterial&&r.envMap===null&&t.environment!==null&&(A.envMapIntensity.value=t.environmentIntensity),A.dfgLUT!==void 0&&(A.dfgLUT.value=A_()),w&&(k.setValue(H,`toneMappingExposure`,x.toneMappingExposure),_.needsLights&&Xe(A,O),a&&r.fog===!0&&ge.refreshFogUniforms(A,a),ge.refreshMaterialUniforms(A,r,F,P,v.state.transmissionRenderTarget[e.id]),yg.upload(H,qe(_),A,K)),r.isShaderMaterial&&r.uniformsNeedUpdate===!0&&(yg.upload(H,qe(_),A,K),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&k.setValue(H,`center`,i.center),k.setValue(H,`modelViewMatrix`,i.modelViewMatrix),k.setValue(H,`normalMatrix`,i.normalMatrix),k.setValue(H,`modelMatrix`,i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){let e=r.uniformsGroups;for(let t=0,n=e.length;t0&&K.useMultisampledRTT(e)===!1?G.get(e).__webglMultisampledFramebuffer:Array.isArray(l)?l[n]:l,O.copy(e.viewport),k.copy(e.scissor),A=e.scissorTest}else O.copy(te).multiplyScalar(F).floor(),k.copy(L).multiplyScalar(F).floor(),A=R;if(n!==0&&(i=Qe),W.bindFramebuffer(H.FRAMEBUFFER,i)&&r&&W.drawBuffers(e,i),W.viewport(O),W.scissor(k),W.setScissorTest(A),a){let r=G.get(e.texture);H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,H.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(o){let r=t;for(let t=0;t=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&(e.textures.length>1&&H.readBuffer(H.COLOR_ATTACHMENT0+s),H.readPixels(t,n,r,i,J.convert(c),J.convert(l),a))}finally{let e=T===null?null:G.get(T).__webglFramebuffer;W.bindFramebuffer(H.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let c=G.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c)if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){W.bindFramebuffer(H.FRAMEBUFFER,c);let o=e.textures[s],l=o.format,u=o.type;if(!le.textureFormatReadable(l))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!le.textureTypeReadable(u))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let d=H.createBuffer();H.bindBuffer(H.PIXEL_PACK_BUFFER,d),H.bufferData(H.PIXEL_PACK_BUFFER,a.byteLength,H.STREAM_READ),e.textures.length>1&&H.readBuffer(H.COLOR_ATTACHMENT0+s),H.readPixels(t,n,r,i,J.convert(l),J.convert(u),0);let f=T===null?null:G.get(T).__webglFramebuffer;W.bindFramebuffer(H.FRAMEBUFFER,f);let p=H.fenceSync(H.SYNC_GPU_COMMANDS_COMPLETE,0);return H.flush(),await Lr(H,p,4),H.bindBuffer(H.PIXEL_PACK_BUFFER,d),H.getBufferSubData(H.PIXEL_PACK_BUFFER,0,a),H.deleteBuffer(d),H.deleteSync(p),a}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(e,t=null,n=0){let r=2**-n,i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=t===null?0:t.x,s=t===null?0:t.y;K.setTexture2D(e,0),H.copyTexSubImage2D(H.TEXTURE_2D,n,0,0,o,s,i,a),W.unbindTexture()};let $e=H.createFramebuffer(),et=H.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=null){a===null&&(i===0?a=0:(Ir(`WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.`),a=i,i=0));let o,s,c,l,u,d,f,p,m,h=e.isCompressedTexture?e.mipmaps[a]:e.image;if(n!==null)o=n.max.x-n.min.x,s=n.max.y-n.min.y,c=n.isBox3?n.max.z-n.min.z:1,l=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{let t=2**-i;o=Math.floor(h.width*t),s=Math.floor(h.height*t),c=e.isDataArrayTexture?h.depth:e.isData3DTexture?Math.floor(h.depth*t):1,l=0,u=0,d=0}r===null?(f=0,p=0,m=0):(f=r.x,p=r.y,m=r.z);let g=J.convert(t.format),_=J.convert(t.type),v;t.isData3DTexture?(K.setTexture3D(t,0),v=H.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(K.setTexture2DArray(t,0),v=H.TEXTURE_2D_ARRAY):(K.setTexture2D(t,0),v=H.TEXTURE_2D),H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,t.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,t.unpackAlignment);let y=H.getParameter(H.UNPACK_ROW_LENGTH),b=H.getParameter(H.UNPACK_IMAGE_HEIGHT),x=H.getParameter(H.UNPACK_SKIP_PIXELS),S=H.getParameter(H.UNPACK_SKIP_ROWS),C=H.getParameter(H.UNPACK_SKIP_IMAGES);H.pixelStorei(H.UNPACK_ROW_LENGTH,h.width),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,h.height),H.pixelStorei(H.UNPACK_SKIP_PIXELS,l),H.pixelStorei(H.UNPACK_SKIP_ROWS,u),H.pixelStorei(H.UNPACK_SKIP_IMAGES,d);let w=e.isDataArrayTexture||e.isData3DTexture,T=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=G.get(e),r=G.get(t),h=G.get(n.__renderTarget),g=G.get(r.__renderTarget);W.bindFramebuffer(H.READ_FRAMEBUFFER,h.__webglFramebuffer),W.bindFramebuffer(H.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},P_=(e=>e?N_(e):N_),{useSyncExternalStoreWithSelector:F_}=M_.default,I_=e=>e;function L_(e,t=I_,n){let r=F_(e.subscribe,e.getState,e.getInitialState,t,n);return G.useDebugValue(r),r}var R_=(e,t)=>{let n=P_(e),r=(e,r=t)=>L_(n,e,r);return Object.assign(r,n),r},z_=((e,t)=>e?R_(e,t):R_),B_=e=>typeof e==`object`&&typeof e.then==`function`,V_=[];function H_(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;let r=e.length;if(t.length!==r)return!1;for(let i=0;i0&&(e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(e.remove,r.lifespan)),e.response;if(!n)throw e.promise}let i={keys:t,equal:r.equal,remove:()=>{let e=V_.indexOf(i);e!==-1&&V_.splice(e,1)},promise:(B_(e)?e:e(...t)).then(e=>{i.response=e,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(e=>i.error=e)};if(V_.push(i),!n)throw i.promise}var W_=(e,t,n)=>U_(e,t,!1,n),G_=(e,t,n)=>void U_(e,t,!0,n),K_=e=>{if(e===void 0||e.length===0)V_.splice(0,V_.length);else{let t=V_.find(t=>H_(e,t.keys,t.equal));t&&t.remove()}},q_=A(k());(()=>typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`))()?G.useLayoutEffect:G.useEffect;function J_(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){let e=J_(r,t,n);if(e)return e;r=t?null:r.sibling}}function Y_(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}var X_=Y_(G.createContext(null)),Z_=class extends G.Component{render(){return G.createElement(X_.Provider,{value:this._reactInternals},this.props.children)}};function Q_(){let e=G.useContext(X_);if(e===null)throw Error(`its-fine: useFiber must be called within a !`);let t=G.useId();return G.useMemo(()=>{for(let n of[e,e?.alternate]){if(!n)continue;let e=J_(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}var $_=Symbol.for(`react.context`),ev=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===$_;function tv(){let e=Q_(),[t]=G.useState(()=>new Map);t.clear();let n=e;for(;n;){let e=n.type;ev(e)&&e!==X_&&!t.has(e)&&t.set(e,G.use(Y_(e))),n=n.return}return t}function nv(){let e=tv();return G.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>G.createElement(t,null,G.createElement(n.Provider,{...r,value:e.get(n)})),e=>G.createElement(Z_,{...e})),[e])}function rv(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}G.act;var iv=e=>e&&e.isOrthographicCamera,av=e=>e&&e.hasOwnProperty(`current`),ov=e=>e!=null&&(typeof e==`string`||typeof e==`number`||e.isColor),sv=((e,t)=>typeof window<`u`&&((e=window.document)?.createElement||(t=window.navigator)?.product===`ReactNative`))()?G.useLayoutEffect:G.useEffect;function cv(e){let t=G.useRef(e);return sv(()=>void(t.current=e),[e]),t}function lv(){let e=Q_(),t=nv();return G.useMemo(()=>({children:n})=>(0,K.jsx)(J_(e,!0,e=>e.type===G.StrictMode)?G.StrictMode:G.Fragment,{children:(0,K.jsx)(t,{children:n})}),[e,t])}function uv({set:e}){return sv(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}var dv=(e=>(e=class extends G.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}},e.getDerivedStateFromError=()=>({error:!0}),e))();function fv(e){let t=typeof window<`u`?window.devicePixelRatio??2:1;return Array.isArray(e)?Math.min(Math.max(e[0],t),e[1]):e}function pv(e){return e.__r3f?.root.getState()}var mv={obj:e=>e===Object(e)&&!mv.arr(e)&&typeof e!=`function`,fun:e=>typeof e==`function`,str:e=>typeof e==`string`,num:e=>typeof e==`number`,boo:e=>typeof e==`boolean`,und:e=>e===void 0,nul:e=>e===null,arr:e=>Array.isArray(e),equ(e,t,{arrays:n=`shallow`,objects:r=`reference`,strict:i=!0}={}){if(typeof e!=typeof t||!!e!=!!t)return!1;if(mv.str(e)||mv.num(e)||mv.boo(e))return e===t;let a=mv.obj(e);if(a&&r===`reference`)return e===t;let o=mv.arr(e);if(o&&n===`reference`)return e===t;if((o||a)&&e===t)return!0;let s;for(s in e)if(!(s in t))return!1;if(a&&n===`shallow`&&r===`shallow`){for(s in i?t:e)if(!mv.equ(e[s],t[s],{strict:i,objects:`reference`}))return!1}else for(s in i?t:e)if(e[s]!==t[s])return!1;if(mv.und(s)){if(o&&e.length===0&&t.length===0||a&&Object.keys(e).length===0&&Object.keys(t).length===0)return!0;if(e!==t)return!1}return!0}};function hv(e){let t={nodes:{},materials:{},meshes:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material),e.isMesh&&!t.meshes[e.name]&&(t.meshes[e.name]=e)}),t}function gv(e){for(let t in e.type!==`Scene`&&(e.dispose==null||e.dispose()),e){let n=e[t];n?.type!==`Scene`&&(n==null||n.dispose==null||n.dispose())}}var _v=[`children`,`key`,`ref`];function vv(e){let t={};for(let n in e)_v.includes(n)||(t[n]=e[n]);return t}function yv(e,t,n,r){let i=e,a=i?.__r3f;return a||(a={root:t,type:n,parent:null,children:[],props:vv(r),object:i,eventCount:0,handlers:{},isHidden:!1},i&&(i.__r3f=a)),a}function bv(e,t){if(!t.includes(`-`)||t in e)return{root:e,key:t,target:e[t]};let n=e,r=t.split(`-`);for(let i of r){if(typeof n!=`object`||!n){if(n!==void 0){let e=r.slice(r.indexOf(i)).join(`-`);return{root:n,key:e,target:void 0}}return{root:e,key:t,target:void 0}}t=i,e=n,n=n[t]}return{root:e,key:t,target:n}}var xv=/-\d+$/;function Sv(e,t){if(mv.str(t.props.attach)){if(xv.test(t.props.attach)){let n=t.props.attach.replace(xv,``),{root:r,key:i}=bv(e.object,n);Array.isArray(r[i])||(r[i]=[])}let{root:n,key:r}=bv(e.object,t.props.attach);t.previousAttach=n[r],n[r]=t.object}else mv.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function Cv(e,t){if(mv.str(t.props.attach)){let{root:n,key:r}=bv(e.object,t.props.attach),i=t.previousAttach;i===void 0?delete n[r]:n[r]=i}else t.previousAttach==null||t.previousAttach(e.object,t.object);delete t.previousAttach}var wv=[..._v,`args`,`dispose`,`attach`,`object`,`onUpdate`,`dispose`],Tv=new Map;function Ev(e){let t=Tv.get(e.constructor);try{t||(t=new e.constructor,Tv.set(e.constructor,t))}catch{}return t}function Dv(e,t){let n={};for(let r in t)if(!wv.includes(r)&&!mv.equ(t[r],e.props[r]))for(let e in n[r]=t[r],t)e.startsWith(`${r}-`)&&(n[e]=t[e]);for(let r in e.props){if(wv.includes(r)||t.hasOwnProperty(r))continue;let{root:i,key:a}=bv(e.object,r);if(i.constructor&&i.constructor.length===0){let e=Ev(i);mv.und(e)||(n[a]=e[a])}else n[a]=0}return n}var Ov=[`map`,`emissiveMap`,`sheenColorMap`,`specularColorMap`,`envMap`],kv=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Av(e,t){var n;let r=e.__r3f,i=r&&rv(r).getState(),a=r?.eventCount;for(let n in t){let a=t[n];if(wv.includes(n))continue;if(r&&kv.test(n)){typeof a==`function`?r.handlers[n]=a:delete r.handlers[n],r.eventCount=Object.keys(r.handlers).length;continue}if(a===void 0)continue;let{root:s,key:c,target:l}=bv(e,n);if(l===void 0&&(typeof s!=`object`||!s))throw Error(`R3F: Cannot set "${n}". Ensure it is an object before setting "${c}".`);if(l instanceof Sa&&a instanceof Sa)l.mask=a.mask;else if(l instanceof Q&&ov(a))l.set(a);else if(typeof l==`object`&&l&&typeof l.set==`function`&&typeof l.copy==`function`&&a!=null&&a.constructor&&l.constructor===a.constructor)l.copy(a);else if(typeof l==`object`&&l&&typeof l.set==`function`&&Array.isArray(a))typeof l.fromArray==`function`?l.fromArray(a):l.set(...a);else if(typeof l==`object`&&l&&typeof l.set==`function`&&typeof a==`number`)typeof l.setScalar==`function`?l.setScalar(a):l.set(a);else{var o;s[c]=a,i&&!i.linear&&Ov.includes(c)&&(o=s[c])!=null&&o.isTexture&&s[c].format===1023&&s[c].type===1009&&(s[c].colorSpace=$n)}}if(r!=null&&r.parent&&i!=null&&i.internal&&(n=r.object)!=null&&n.isObject3D&&a!==r.eventCount){let e=r.object,t=i.internal.interaction.indexOf(e);t>-1&&i.internal.interaction.splice(t,1),r.eventCount&&e.raycast!==null&&i.internal.interaction.push(e)}return r&&r.props.attach===void 0&&(r.object.isBufferGeometry?r.props.attach=`geometry`:r.object.isMaterial&&(r.props.attach=`material`)),r&&jv(r),e}function jv(e){var t;if(!e.parent)return;e.props.onUpdate==null||e.props.onUpdate(e.object);let n=(t=e.root)==null||t.getState==null?void 0:t.getState();n&&n.internal.frames===0&&n.invalidate()}function Mv(e,t){e.manual||(iv(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix())}var Nv=e=>e?.isObject3D;function Pv(e){return(e.eventObject||e.object).uuid+`/`+e.index+e.instanceId}function Fv(e,t,n,r){let i=n.get(t);i&&(n.delete(t),n.size===0&&(e.delete(r),i.target.releasePointerCapture(r)))}function Iv(e,t){let{internal:n}=e.getState();n.interaction=n.interaction.filter(e=>e!==t),n.initialHits=n.initialHits.filter(e=>e!==t),n.hovered.forEach((e,r)=>{(e.eventObject===t||e.object===t)&&n.hovered.delete(r)}),n.capturedMap.forEach((e,r)=>{Fv(n.capturedMap,t,e,r)})}function Lv(e){function t(t){let{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}function n(e){return e.filter(e=>[`Move`,`Over`,`Enter`,`Out`,`Leave`].some(t=>e.__r3f?.handlers[`onPointer`+t]))}function r(t,n){let r=e.getState(),i=new Set,a=[],o=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e{let n=pv(e.object),r=pv(t.object);return!n||!r?e.distance-t.distance:r.events.priority-n.events.priority||e.distance-t.distance}).filter(e=>{let t=Pv(e);return i.has(t)?!1:(i.add(t),!0)});r.events.filter&&(c=r.events.filter(c,r));for(let e of c){let t=e.object;for(;t;){var l;(l=t.__r3f)!=null&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if(`pointerId`in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(Pv(e.intersection))||a.push(e.intersection);return a}function i(e,t,n,r){if(e.length){let i={stopped:!1};for(let o of e){let s=pv(o.object);if(s||o.object.traverseAncestors(e=>{let t=pv(e);if(t)return s=t,!1}),s){let{raycaster:c,pointer:l,camera:u,internal:d}=s,f=new Z(l.x,l.y,0).unproject(u),p=e=>d.capturedMap.get(e)?.has(o.eventObject)??!1,m=e=>{let n={intersection:o,target:t.target};d.capturedMap.has(e)?d.capturedMap.get(e).set(o.eventObject,n):d.capturedMap.set(e,new Map([[o.eventObject,n]])),t.target.setPointerCapture(e)},h=e=>{let t=d.capturedMap.get(e);t&&Fv(d.capturedMap,o.eventObject,t,e)},g={};for(let e in t){let n=t[e];typeof n!=`function`&&(g[e]=n)}let _={...o,...g,pointer:l,intersections:e,stopped:i.stopped,delta:n,unprojectedPoint:f,ray:c.ray,camera:u,stopPropagation(){let n=`pointerId`in t&&d.capturedMap.get(t.pointerId);(!n||n.has(o.eventObject))&&(_.stopped=i.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find(e=>e.eventObject===o.eventObject)&&a([...e.slice(0,e.indexOf(o)),o]))},target:{hasPointerCapture:p,setPointerCapture:m,releasePointerCapture:h},currentTarget:{hasPointerCapture:p,setPointerCapture:m,releasePointerCapture:h},nativeEvent:t};if(r(_),i.stopped===!0)break}}}return e}function a(t){let{internal:n}=e.getState();for(let e of n.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){let r=e.eventObject.__r3f;if(n.hovered.delete(Pv(e)),r!=null&&r.eventCount){let n=r.handlers,i={...e,intersections:t};n.onPointerOut==null||n.onPointerOut(i),n.onPointerLeave==null||n.onPointerLeave(i)}}}function o(e,t){for(let n=0;na([]);case`onLostPointerCapture`:return t=>{let{internal:n}=e.getState();`pointerId`in t&&n.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{n.capturedMap.has(t.pointerId)&&(n.capturedMap.delete(t.pointerId),a([]))})}}return function(c){let{onPointerMissed:l,internal:u}=e.getState();u.lastEvent.current=c;let d=s===`onPointerMove`,f=s===`onClick`||s===`onContextMenu`||s===`onDoubleClick`,p=r(c,d?n:void 0),m=f?t(c):0;s===`onPointerDown`&&(u.initialClick=[c.offsetX,c.offsetY],u.initialHits=p.map(e=>e.eventObject)),f&&!p.length&&m<=2&&(o(c,u.interaction),l&&l(c)),d&&a(p);function h(e){let t=e.eventObject,n=t.__r3f;if(!(n!=null&&n.eventCount))return;let r=n.handlers;if(d){if(r.onPointerOver||r.onPointerEnter||r.onPointerOut||r.onPointerLeave){let t=Pv(e),n=u.hovered.get(t);n?n.stopped&&e.stopPropagation():(u.hovered.set(t,e),r.onPointerOver==null||r.onPointerOver(e),r.onPointerEnter==null||r.onPointerEnter(e))}r.onPointerMove==null||r.onPointerMove(e)}else{let n=r[s];n?(!f||u.initialHits.includes(t))&&(o(c,u.interaction.filter(e=>!u.initialHits.includes(e))),n(e)):f&&u.initialHits.includes(t)&&o(c,u.interaction.filter(e=>!u.initialHits.includes(e)))}}i(p,c,m,h)}}return{handlePointer:s}}var Rv=e=>!!(e!=null&&e.render),zv=G.createContext(null),Bv=(e,t)=>{let n=z_((n,r)=>{let i=new Z,a=new Z,o=new Z;function s(e=r().camera,t=a,n=r().size){let{width:s,height:c,top:l,left:u}=n,d=s/c;t.isVector3?o.copy(t):o.set(...t);let f=e.getWorldPosition(i).distanceTo(o);if(iv(e))return{width:s/e.zoom,height:c/e.zoom,top:l,left:u,factor:1,distance:f,aspect:d};{let t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*f,r=n*(s/c);return{width:r,height:n,top:l,left:u,factor:s/r,distance:f,aspect:d}}}let c,l=e=>n(t=>({performance:{...t.performance,current:e}})),u=new X;return{set:n,get:r,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(t=1)=>e(r(),t),advance:(e,n)=>t(e,n,r()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new zf,pointer:u,mouse:u,frameloop:`always`,onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{let e=r();c&&clearTimeout(c),e.performance.current!==e.performance.min&&l(e.performance.min),c=setTimeout(()=>l(r().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:s},setEvents:e=>n(t=>({...t,events:{...t.events,...e}})),setSize:(e,t,i=0,o=0)=>{let c=r().camera,l={width:e,height:t,top:i,left:o};n(e=>({size:l,viewport:{...e.viewport,...s(c,a,l)}}))},setDpr:e=>n(t=>{let n=fv(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}}),setFrameloop:(e=`always`)=>{let t=r().clock;t.stop(),t.elapsedTime=0,e!==`never`&&(t.start(),t.elapsedTime=0),n(()=>({frameloop:e}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:G.createRef(),active:!1,frames:0,priority:0,subscribe:(e,t,n)=>{let i=r().internal;return i.priority+=t>0?1:0,i.subscribers.push({ref:e,priority:t,store:n}),i.subscribers=i.subscribers.sort((e,t)=>e.priority-t.priority),()=>{let n=r().internal;n!=null&&n.subscribers&&(n.priority-=t>0?1:0,n.subscribers=n.subscribers.filter(t=>t.ref!==e))}}}}}),r=n.getState(),i=r.size,a=r.viewport.dpr,o=r.camera;return n.subscribe(()=>{let{camera:e,size:t,viewport:r,gl:s,set:c}=n.getState();if(t.width!==i.width||t.height!==i.height||r.dpr!==a){i=t,a=r.dpr,Mv(e,t),r.dpr>0&&s.setPixelRatio(r.dpr);let n=typeof HTMLCanvasElement<`u`&&s.domElement instanceof HTMLCanvasElement;s.setSize(t.width,t.height,n)}e!==o&&(o=e,c(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),n.subscribe(t=>e(t)),n};function Vv(){let e=G.useContext(zv);if(!e)throw Error(`R3F: Hooks can only be used within the Canvas component!`);return e}function Hv(e=e=>e,t){return Vv()(e,t)}function Uv(e,t=0){let n=Vv(),r=n.getState().internal.subscribe,i=cv(e);return sv(()=>r(i,t,n),[t,r,n]),null}var Wv=new WeakMap,Gv=e=>typeof e==`function`&&e?.prototype?.constructor===e;function Kv(e,t){return function(n,...r){let i;return Gv(n)?(i=Wv.get(n),i||(i=new n,Wv.set(n,i))):i=n,e&&e(i),Promise.all(r.map(e=>new Promise((n,r)=>i.load(e,e=>{Nv(e?.scene)&&Object.assign(e,hv(e.scene)),n(e)},t,t=>r(Error(`Could not load ${e}: ${t?.message}`))))))}}function qv(e,t,n,r){let i=Array.isArray(t)?t:[t],a=W_(Kv(n,r),[e,...i],{equal:mv.equ});return Array.isArray(t)?a:a[0]}qv.preload=function(e,t,n){let r=Array.isArray(t)?t:[t];return G_(Kv(n),[e,...r])},qv.clear=function(e,t){return K_([e,...Array.isArray(t)?t:[t]])};var Jv=1,Yv=8,Xv=32,Zv=2,Qv={name:`@react-three/fiber`,version:`9.5.0`,description:`A React renderer for Threejs`,keywords:[`react`,`renderer`,`fiber`,`three`,`threejs`],author:`Paul Henschel (https://github.com/drcmda)`,license:`MIT`,maintainers:[`Josh Ellis (https://github.com/joshuaellis)`,`Cody Bennett (https://github.com/codyjasonbennett)`,`Kris Baumgarter (https://github.com/krispya)`],bugs:{url:`https://github.com/pmndrs/react-three-fiber/issues`},homepage:`https://github.com/pmndrs/react-three-fiber#readme`,repository:{type:`git`,url:`git+https://github.com/pmndrs/react-three-fiber.git`},collective:{type:`opencollective`,url:`https://opencollective.com/react-three-fiber`},main:`dist/react-three-fiber.cjs.js`,module:`dist/react-three-fiber.esm.js`,types:`dist/react-three-fiber.cjs.d.ts`,"react-native":`native/dist/react-three-fiber-native.cjs.js`,sideEffects:!1,preconstruct:{entrypoints:[`index.tsx`,`native.tsx`]},scripts:{prebuild:`cp ../../readme.md readme.md`},devDependencies:{"@types/react-reconciler":`^0.32.3`,"react-reconciler":`^0.33.0`},dependencies:{"@babel/runtime":`^7.17.8`,"@types/webxr":`*`,"base64-js":`^1.5.1`,buffer:`^6.0.3`,"its-fine":`^2.0.0`,"react-use-measure":`^2.1.7`,scheduler:`^0.27.0`,"suspend-react":`^0.1.3`,"use-sync-external-store":`^1.4.0`,zustand:`^5.0.3`},peerDependencies:{expo:`>=43.0`,"expo-asset":`>=8.4`,"expo-file-system":`>=11.0`,"expo-gl":`>=11.0`,react:`>=19 <19.3`,"react-dom":`>=19 <19.3`,"react-native":`>=0.78`,three:`>=0.156`},peerDependenciesMeta:{"react-dom":{optional:!0},"react-native":{optional:!0},expo:{optional:!0},"expo-asset":{optional:!0},"expo-file-system":{optional:!0},"expo-gl":{optional:!0}}};function $v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var ey={exports:{}},ty={exports:{}};ty.exports;var ny;function ry(){return ny||(ny=1,function(e){e.exports=function(e){function t(e,t,n,r){return new ra(e,t,n,r)}function n(){}function r(e){var t=`https://react.dev/errors/`+e;if(1oc||(e.current=ac[oc],ac[oc]=null,oc--)}function p(e,t){oc++,ac[oc]=e.current,e.current=t}function m(e){return e>>>=0,e===0?32:31-(lc(e)/uc|0)|0}function h(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function g(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=h(n))):i=h(o):i=h(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=h(n))):i=h(o)):i=h(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function _(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function v(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function y(){var e=pc;return pc<<=1,!(pc&62914560)&&(pc=4194304),e}function b(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function x(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function S(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Mc=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?A(n):``}function M(e,t){switch(e.tag){case 26:case 27:case 5:return A(e.type);case 16:return A(`Lazy`);case 13:return e.child!==t&&t!==null?A(`Suspense Fallback`):A(`Suspense`);case 19:return A(`SuspenseList`);case 0:case 15:return j(e.type,!1);case 11:return j(e.type.render,!1);case 1:return j(e.type,!0);case 31:return A(`Activity`);default:return``}}function N(e){try{var t=``,n=null;do t+=M(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}function P(e,t){if(typeof e==`object`&&e){var n=Nc.get(e);return n===void 0?(t={value:e,source:t,stack:N(t)},Nc.set(e,t),t):n}return{value:e,source:t,stack:N(t)}}function F(e,t){Pc[Fc++]=Lc,Pc[Fc++]=Ic,Ic=e,Lc=t}function I(e,t,n){Rc[zc++]=Vc,Rc[zc++]=Hc,Rc[zc++]=Bc,Bc=e;var r=Vc;e=Hc;var i=32-cc(r)-1;r&=~(1<>=o,i-=o,Vc=1<<32-cc(t)+i|n<f?(p=d,d=null):p=d.sibling;var _=h(t,d,o[f],c);if(_===null){d===null&&(d=p);break}e&&d&&_.alternate===null&&n(t,d),r=s(_,r,f),u===null?l=_:u.sibling=_,u=_,d=p}if(f===o.length)return i(t,d),Yc&&F(t,f),l;if(d===null){for(;fp?(_=f,f=null):_=f.sibling;var y=h(t,f,v.value,l);if(y===null){f===null&&(f=_);break}e&&f&&y.alternate===null&&n(t,f),o=s(y,o,p),d===null?u=y:d.sibling=y,d=y,f=_}if(v.done)return i(t,f),Yc&&F(t,p),u;if(f===null){for(;!v.done;p++,v=c.next())v=m(t,v.value,l),v!==null&&(o=s(v,o,p),d===null?u=v:d.sibling=v,d=v);return Yc&&F(t,p),u}for(f=a(f);!v.done;p++,v=c.next())v=g(f,t,p,v.value,l),v!==null&&(e&&v.alternate!==null&&f.delete(v.key===null?p:v.key),o=s(v,o,p),d===null?u=v:d.sibling=v,d=v);return e&&f.forEach(function(e){return n(t,e)}),Yc&&F(t,p),u}function y(e,t,a,s){if(typeof a==`object`&&a&&a.type===Ea&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case wa:e:{for(var u=a.key;t!==null;){if(t.key===u){if(u=a.type,u===Ea){if(t.tag===7){i(e,t.sibling),s=o(t,a.props.children),s.return=e,e=s;break e}}else if(t.elementType===u||typeof u==`object`&&u&&u.$$typeof===Fa&&Pe(u)===t.type){i(e,t.sibling),s=o(t,a.props),Re(s,a),s.return=e,e=s;break e}i(e,t);break}else n(e,t);t=t.sibling}a.type===Ea?(s=ca(a.props.children,e.mode,s,a.key),s.return=e,e=s):(s=sa(a.type,a.key,a.props,null,e.mode,s),Re(s,a),s.return=e,e=s)}return c(e);case Ta:e:{for(u=a.key;t!==null;){if(t.key===u)if(t.tag===4&&t.stateNode.containerInfo===a.containerInfo&&t.stateNode.implementation===a.implementation){i(e,t.sibling),s=o(t,a.children||[]),s.return=e,e=s;break e}else{i(e,t);break}else n(e,t);t=t.sibling}s=da(a,e.mode,s),s.return=e,e=s}return c(e);case Fa:return a=Pe(a),y(e,t,a,s)}if(Ba(a))return _(e,t,a,s);if(l(a)){if(u=l(a),typeof u!=`function`)throw Error(r(150));return a=u.call(a),v(e,t,a,s)}if(typeof a.then==`function`)return y(e,t,Le(a),s);if(a.$$typeof===Aa)return y(e,t,fe(e,a),s);ze(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,t!==null&&t.tag===6?(i(e,t.sibling),s=o(t,a),s.return=e,e=s):(i(e,t),s=la(a,e.mode,s),s.return=e,e=s),c(e)):i(e,t)}return function(e,n,r,i){try{wl=0;var a=y(e,n,r,i);return Cl=null,a}catch(n){if(n===vl||n===bl)throw n;var o=t(29,n,null,e.mode);return o.lanes=i,o.return=e,o}}}function Ve(){for(var e=Ol,t=kl=Ol=0;ta?a:8);var o=Va.T,s={};Va.T=s,wn(e,!1,t,n);try{var c=i(),l=Va.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Cn(e,t,De(c,r),vi(e)):Cn(e,t,r,vi(e))}catch(n){Cn(e,t,{then:function(){},status:`rejected`,reason:n},vi())}finally{lo(a),o!==null&&s.types!==null&&(o.types=s.types),Va.T=o}}function gn(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:So,baseState:So,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dt,lastRenderedState:So},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _n(){return de(Co)}function vn(){return St().memoizedState}function yn(){return St().memoizedState}function bn(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vi();e=Ye(n);var r=Xe(t,e,n);r!==null&&(bi(r,t,n),Ze(r,t,n)),t={cache:me()},e.payload=t;return}t=t.return}}function xn(e,t,n){var r=vi();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Tn(e)?En(t,n):(n=Ue(e,t,n,r),n!==null&&(bi(n,e,r),Dn(n,t,r)))}function Sn(e,t,n){Cn(e,t,n,vi())}function Cn(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))En(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Dc(s,o))return He(e,t,i,0),bu===null&&Ve(),!1}catch{}if(n=Ue(e,t,i,r),n!==null)return bi(n,e,r),Dn(n,t,r),!0}return!1}function wn(e,t,n,i){if(i={lane:2,revertLane:J(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)){if(t)throw Error(r(479))}else t=Ue(e,n,i,2),t!==null&&bi(t,e,2)}function Tn(e){var t=e.alternate;return e===Rl||t!==null&&t===Rl}function En(e,t){Hl=Vl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dn(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,w(e,n)}}function On(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Sa({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}function kn(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!je(n,r)||!je(i,a):!0}function An(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ql.enqueueReplaceState(t,t.state,null)}function jn(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=Sa({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Mn(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Nn(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Pn(e,t,n){return n=Ye(n),n.tag=3,n.payload={element:null},n.callback=function(){Mn(e,t)},n}function Fn(e){return e=Ye(e),e.tag=3,e}function In(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Nn(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Nn(t,n,r),typeof i!=`function`&&(Hu===null?Hu=new Set([this]):Hu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ln(e,t,n,i,a){if(n.flags|=32768,typeof i==`object`&&i&&typeof i.then==`function`){if(t=n.alternate,t!==null&&ue(t,n,a,!0),n=Pl.current,n!==null){switch(n.tag){case 31:case 13:return Fl===null?Mi():n.alternate===null&&ku===0&&(ku=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===xl?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),Zi(e,i,a)),!1;case 22:return n.flags|=65536,i===xl?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),Zi(e,i,a)),!1}throw Error(r(435,n.tag))}return Zi(e,i,a),Mi(),!1}if(Yc)return t=Pl.current,t===null?(i!==Qc&&(t=Error(r(423),{cause:i}),H(P(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,i=P(i,n),a=Pn(e.stateNode,i,a),Qe(e,a),ku!==4&&(ku=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==Qc&&(e=Error(r(422),{cause:i}),H(P(e,n)))),!1;var o=Error(r(520),{cause:i});if(o=P(o,n),Fu===null?Fu=[o]:Fu.push(o),ku!==4&&(ku=2),t===null)return!0;i=P(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Pn(n.stateNode,i,e),Qe(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Hu===null||!Hu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Fn(a),In(a,e,n,i),Qe(n,a),!1}n=n.return}while(n!==null);return!1}function Rn(e,t,n,r){t.child=e===null?El(t,null,n,r):Tl(t,e.child,n,r)}function zn(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return q(t),r=mt(e,t,n,o,a,i),s=vt(),e!==null&&!eu?(yt(e,t,i),cr(e,t,i)):(Yc&&s&&ee(t),t.flags|=1,Rn(e,t,r,i),t.child)}function Bn(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ia(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Vn(e,t,a,r,i)):(e=sa(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!lr(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?je:n,n(o,r)&&e.ref===t.ref)return cr(e,t,i)}return t.flags|=1,e=aa(a,r),e.ref=t.ref,e.return=t,t.child=e}function Vn(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(je(a,r)&&e.ref===t.ref)if(eu=!1,t.pendingProps=r=a,lr(e,i))e.flags&131072&&(eu=!0);else return t.lanes=e.lanes,cr(e,t,i)}return Yn(e,t,n,r,i)}function Hn(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Wn(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ke(t,a===null?null:a.cachePool),a===null?it():rt(t,a),ct(t);else return r=t.lanes=536870912,Wn(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ke(t,null),it(),lt()):(ke(t,a.cachePool),rt(t,a),lt(),t.memoizedState=null);return Rn(e,t,i,n),t.child}function Un(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Wn(e,t,n,r,i){var a=Oe();return a=a===null?null:{parent:ro?al._currentValue:al._currentValue2,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ke(t,null),it(),ct(t),e!==null&&ue(e,t,r,!0),t.childLanes=i,null}function Gn(e,t){return t=rr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Kn(e,t,n){return Tl(t,e.child,null,n),e=Gn(t,t.pendingProps),e.flags|=2,ut(t),t.memoizedState=null,e}function qn(e,t,n){var i=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Yc){if(i.mode===`hidden`)return e=Gn(t,i),t.lanes=536870912,Un(null,e);if(st(t),(e=Jc)?(e=vs(e,Zc),e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bc===null?null:{id:Vc,overflow:Hc},retryLane:536870912,hydrationErrors:null},n=ua(e),n.return=t,t.child=n,qc=t,Jc=null)):e=null,e===null)throw V(t);return t.lanes=536870912,null}return Gn(t,i)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(st(t),a)if(t.flags&256)t.flags&=-257,t=Kn(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(eu||ue(e,t,n,!1),a=(n&e.childLanes)!==0,eu||a){if(i=bu,i!==null&&(s=T(i,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,We(e,s),bi(i,e,s),$l;Mi(),t=Kn(e,t,n)}else e=o.treeContext,oo&&(Jc=ps(s),qc=t,Yc=!0,Xc=null,Zc=!1,e!==null&&L(t,e)),t=Gn(t,i),t.flags|=4096;return t}return e=aa(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jn(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Yn(e,t,n,r,i){return q(t),n=mt(e,t,n,r,void 0,i),r=vt(),e!==null&&!eu?(yt(e,t,i),cr(e,t,i)):(Yc&&r&&ee(t),t.flags|=1,Rn(e,t,n,i),t.child)}function Xn(e,t,n,r,i,a){return q(t),t.updateQueue=null,n=gt(t,r,n,i),ht(e),r=vt(),e!==null&&!eu?(yt(e,t,a),cr(e,t,a)):(Yc&&r&&ee(t),t.flags|=1,Rn(e,t,n,a),t.child)}function Zn(e,t,n,r,i){if(q(t),t.stateNode===null){var a=sc,o=n.contextType;typeof o==`object`&&o&&(a=de(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ql,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},qe(t),o=n.contextType,a.context=typeof o==`object`&&o?de(o):sc,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(On(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ql.enqueueReplaceState(a,a.state,null),et(t,r,a,i),$e(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=jn(n,s);a.props=c;var l=a.context,u=n.contextType;o=sc,typeof u==`object`&&u&&(o=de(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&An(t,a,r,o),Al=!1;var f=t.memoizedState;a.state=f,et(t,r,a,i),$e(),l=t.memoizedState,s||f!==l||Al?(typeof d==`function`&&(On(t,n,d,r),l=t.memoizedState),(c=Al||kn(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Je(e,t),o=t.memoizedProps,u=jn(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=sc,typeof l==`object`&&l&&(c=de(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&An(t,a,r,c),Al=!1,f=t.memoizedState,a.state=f,et(t,r,a,i),$e();var p=t.memoizedState;o!==d||f!==p||Al||e!==null&&e.dependencies!==null&&K(e.dependencies)?(typeof s==`function`&&(On(t,n,s,r),p=t.memoizedState),(u=Al||kn(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&K(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Jn(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Tl(t,e.child,null,i),t.child=Tl(t,null,n,i)):Rn(e,t,n,i),t.memoizedState=a.state,e=t.child):e=cr(e,t,i),e}function Qn(e,t,n,r){return oe(),t.flags|=256,Rn(e,t,n,r),t.child}function $n(e){return{baseLanes:e,cachePool:Ae()}}function er(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Nu),e}function tr(e,t,n){var i=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Il.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Yc){if(a?ot(t):lt(),(e=Jc)?(e=ys(e,Zc),e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bc===null?null:{id:Vc,overflow:Hc},retryLane:536870912,hydrationErrors:null},n=ua(e),n.return=t,t.child=n,qc=t,Jc=null)):e=null,e===null)throw V(t);return is(e)?t.lanes=32:t.lanes=536870912,null}var c=i.children;return i=i.fallback,a?(lt(),a=t.mode,c=rr({mode:`hidden`,children:c},a),i=ca(i,a,n,null),c.return=t,i.return=t,c.sibling=i,t.child=c,i=t.child,i.memoizedState=$n(n),i.childLanes=er(e,s,n),t.memoizedState=tu,Un(null,i)):(ot(t),nr(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ot(t),t.flags&=-257,t=ir(e,t,n)):t.memoizedState===null?(lt(),c=i.fallback,a=t.mode,i=rr({mode:`visible`,children:i.children},a),c=ca(c,a,n,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,Tl(t,e.child,null,n),i=t.child,i.memoizedState=$n(n),i.childLanes=er(e,s,n),t.memoizedState=tu,t=Un(null,i)):(lt(),t.child=e.child,t.flags|=128,t=null);else if(ot(t),is(c))s=as(c).digest,i=Error(r(419)),i.stack=``,i.digest=s,H({value:i,source:null,stack:null}),t=ir(e,t,n);else if(eu||ue(e,t,n,!1),s=(n&e.childLanes)!==0,eu||s){if(s=bu,s!==null&&(i=T(s,n),i!==0&&i!==l.retryLane))throw l.retryLane=i,We(e,i),bi(s,e,i),$l;rs(c)||Mi(),t=ir(e,t,n)}else rs(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,oo&&(Jc=ms(c),qc=t,Yc=!0,Xc=null,Zc=!1,e!==null&&L(t,e)),t=nr(t,i.children),t.flags|=4096);return t}return a?(lt(),c=i.fallback,a=t.mode,l=e.child,o=l.sibling,i=aa(l,{mode:`hidden`,children:i.children}),i.subtreeFlags=l.subtreeFlags&65011712,o===null?(c=ca(c,a,n,null),c.flags|=2):c=aa(o,c),c.return=t,i.return=t,i.sibling=c,t.child=i,Un(null,i),i=t.child,c=e.child.memoizedState,c===null?c=$n(n):(a=c.cachePool,a===null?a=Ae():(l=ro?al._currentValue:al._currentValue2,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),i.memoizedState=c,i.childLanes=er(e,s,n),t.memoizedState=tu,Un(e.child,i)):(ot(t),n=e.child,e=n.sibling,n=aa(n,{mode:`visible`,children:i.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function nr(e,t){return t=rr({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function rr(e,n){return e=t(22,e,null,n),e.lanes=0,e}function ir(e,t,n){return Tl(t,e.child,null,n),e=nr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ar(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),le(e.return,t,n)}function or(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function sr(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Il.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,p(Il,o),Rn(e,t,r,n),r=Yc?Lc:0,!s&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ar(e,n,t);else if(e.tag===19)ar(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&dt(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),or(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&dt(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}or(t,!0,n,null,a,r);break;case`together`:or(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function cr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Au|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ue(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=aa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=aa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lr(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&K(e))):!0}function ur(e,t,n){switch(t.tag){case 3:R(t,t.stateNode.containerInfo),ce(t,al,e.memoizedState.cache),oe();break;case 27:case 5:ne(t);break;case 4:R(t,t.stateNode.containerInfo);break;case 10:ce(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,st(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ot(t),e=cr(e,t,n),e===null?null:e.sibling):tr(e,t,n):(ot(t),t.flags|=128,null);ot(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ue(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sr(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),p(Il,Il.current),r)break;return null;case 22:return t.lanes=0,Hn(e,t,n,t.pendingProps);case 24:ce(t,al,e.memoizedState.cache)}return cr(e,t,n)}function dr(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)eu=!0;else{if(!lr(e,n)&&!(t.flags&128))return eu=!1,ur(e,t,n);eu=(e.flags&131072)!=0}else eu=!1,Yc&&t.flags&1048576&&I(t,Lc,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Pe(t.elementType),t.type=e,typeof e==`function`)ia(e)?(i=jn(e,i),t.tag=1,t=Zn(null,t,e,i,n)):(t.tag=0,t=Yn(null,t,e,i,n));else{if(e!=null){var a=e.$$typeof;if(a===ja){t.tag=11,t=zn(null,t,e,i,n);break e}else if(a===Pa){t.tag=14,t=Bn(null,t,e,i,n);break e}}throw t=u(e)||e,Error(r(306,t,``))}}return t;case 0:return Yn(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,a=jn(i,t.pendingProps),Zn(e,t,i,a,n);case 3:e:{if(R(t,t.stateNode.containerInfo),e===null)throw Error(r(387));var o=t.pendingProps;a=t.memoizedState,i=a.element,Je(e,t),et(t,o,null,n);var s=t.memoizedState;if(o=s.cache,ce(t,al,o),o!==a.cache&&W(t,[al],n,!0),$e(),o=s.element,oo&&a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Qn(e,t,o,n);break e}else if(o!==i){i=P(Error(r(424)),t),H(i),t=Qn(e,t,o,n);break e}else for(oo&&(Jc=fs(t.stateNode.containerInfo),qc=t,Yc=!0,Xc=null,Zc=!0),n=El(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(oe(),o===i){t=cr(e,t,n);break e}Rn(e,t,o,n)}t=t.child}return t;case 26:if(zs)return Jn(e,t),e===null?(n=Hs(t.type,null,t.pendingProps,null))?t.memoizedState=n:Yc||(t.stateNode=Js(t.type,t.pendingProps,Gc.current,t)):t.memoizedState=Hs(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:if($s)return ne(t),e===null&&$s&&Yc&&(i=t.stateNode=ec(t.type,t.pendingProps,Gc.current,Uc.current,!1),qc=t,Zc=!0,Jc=hs(t.type,i,Jc)),Rn(e,t,t.pendingProps.children,n),Jn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Yc&&(Ls(t.type,t.pendingProps,Uc.current),(a=i=Jc)&&(i=gs(i,t.type,t.pendingProps,Zc),i===null?a=!1:(t.stateNode=i,qc=t,Jc=ds(i),Zc=!1,a=!0)),a||V(t)),ne(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,i=o.children,$a(a,o)?i=null:s!==null&&$a(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=mt(e,t,_t,null,null,n),ro?Co._currentValue=a:Co._currentValue2=a),Jn(e,t),Rn(e,t,i,n),t.child;case 6:return e===null&&Yc&&(Rs(t.pendingProps,Uc.current),(e=n=Jc)&&(n=_s(n,t.pendingProps,Zc),n===null?e=!1:(t.stateNode=n,qc=t,Jc=null,e=!0)),e||V(t)),null;case 13:return tr(e,t,n);case 4:return R(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Tl(t,null,i,n):Rn(e,t,i,n),t.child;case 11:return zn(e,t,t.type,t.pendingProps,n);case 7:return Rn(e,t,t.pendingProps,n),t.child;case 8:return Rn(e,t,t.pendingProps.children,n),t.child;case 12:return Rn(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,ce(t,t.type,i.value),Rn(e,t,i.children,n),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,q(t),a=de(a),i=i(a),t.flags|=1,Rn(e,t,i,n),t.child;case 14:return Bn(e,t,t.type,t.pendingProps,n);case 15:return Vn(e,t,t.type,t.pendingProps,n);case 19:return sr(e,t,n);case 31:return qn(e,t,n);case 22:return Hn(e,t,n,t.pendingProps);case 24:return q(t),i=de(al),e===null?(a=Oe(),a===null&&(a=bu,o=me(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:i,cache:a},qe(t),ce(t,al,a)):((e.lanes&n)!==0&&(Je(e,t),et(t,null,null,n),$e()),a=e.memoizedState,o=t.memoizedState,a.parent===i?(i=o.cache,ce(t,al,i),i!==a.cache&&W(t,[al],n,!0)):(a={parent:i,cache:i},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ce(t,al,i))),Rn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function fr(e){e.flags|=4}function pr(e){ao&&(e.flags|=8)}function mr(e,t){if(e!==null&&e.child===t.child)return!1;if(t.flags&16)return!0;for(e=t.child;e!==null;){if(e.flags&8218||e.subtreeFlags&8218)return!0;e=e.sibling}return!1}function hr(e,t,n,r){if(io)for(n=t.child;n!==null;){if(n.tag===5||n.tag===6)Za(e,n.stateNode);else if(!(n.tag===4||$s&&n.tag===27)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else if(ao)for(var i=t.child;i!==null;){if(i.tag===5){var a=i.stateNode;n&&r&&(a=ts(a,i.type,i.memoizedProps)),Za(e,a)}else if(i.tag===6)a=i.stateNode,n&&r&&(a=ns(a,i.memoizedProps)),Za(e,a);else if(i.tag!==4){if(i.tag===22&&i.memoizedState!==null)a=i.child,a!==null&&(a.return=i),hr(e,i,!0,!0);else if(i.child!==null){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function gr(e,t,n,r){var i=!1;if(ao)for(var a=t.child;a!==null;){if(a.tag===5){var o=a.stateNode;n&&r&&(o=ts(o,a.type,a.memoizedProps)),Qo(e,o)}else if(a.tag===6)o=a.stateNode,n&&r&&(o=ns(o,a.memoizedProps)),Qo(e,o);else if(a.tag!==4){if(a.tag===22&&a.memoizedState!==null)i=a.child,i!==null&&(i.return=a),gr(e,a,!0,!0),i=!0;else if(a.child!==null){a.child.return=a,a=a.child;continue}}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return i;a=a.return}a.sibling.return=a.return,a=a.sibling}return i}function _r(e,t){if(ao&&mr(e,t)){e=t.stateNode;var n=e.containerInfo,r=Zo();gr(r,t,!1,!1),e.pendingChildren=r,fr(t),$o(n,r)}}function vr(e,t,n,r){if(io)e.memoizedProps!==r&&fr(t);else if(ao){var i=e.stateNode,a=e.memoizedProps;if((e=mr(e,t))||a!==r){var o=Uc.current;a=Xo(i,n,a,r,!e,null),a===i?t.stateNode=i:(pr(t),Qa(a,n,r,o)&&fr(t),t.stateNode=a,e&&hr(a,t,!1,!1))}else t.stateNode=i}}function yr(e,t,n,r,i){if(e.mode&32&&(n===null?ho(t,r):go(t,n,r))){if(e.flags|=16777216,(i&335544128)===i||_o(t,r))if(vo(e.stateNode,t,r))e.flags|=8192;else if(ki())e.flags|=8192;else throw Sl=xl,yl}else e.flags&=-16777217}function br(e,t){if(Xs(t)){if(e.flags|=16777216,!Zs(t))if(ki())e.flags|=8192;else throw Sl=xl,yl}else e.flags&=-16777217}function xr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:y(),e.lanes|=t,Pu|=t)}function Sr(e,t){if(!Yc)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Cr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function wr(e,t,n){var i=t.pendingProps;switch(te(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Cr(t),null;case 1:return Cr(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),U(al),z(),n.pendingContext&&=(n.context=n.pendingContext,null),(e===null||e.child===null)&&(ae(t)?fr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,se())),_r(e,t),Cr(t),null;case 26:if(zs){var a=t.type,o=t.memoizedState;return e===null?(fr(t),o===null?(Cr(t),yr(t,a,null,i,n)):(Cr(t),br(t,o))):o?o===e.memoizedState?(Cr(t),t.flags&=-16777217):(fr(t),Cr(t),br(t,o)):(o=e.memoizedProps,io?o!==i&&fr(t):vr(e,t,a,i),Cr(t),yr(t,a,o,i,n)),null}case 27:if($s){if(B(t),n=Gc.current,a=t.type,e!==null&&t.stateNode!=null)io?e.memoizedProps!==i&&fr(t):vr(e,t,a,i);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Cr(t),null}e=Uc.current,ae(t)?re(t,e):(e=ec(a,i,n,e,!0),t.stateNode=e,fr(t))}return Cr(t),null}case 5:if(B(t),a=t.type,e!==null&&t.stateNode!=null)vr(e,t,a,i);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Cr(t),null}if(o=Uc.current,ae(t))re(t,o),As(t.stateNode,a,i,o)&&(t.flags|=64);else{var s=Xa(a,i,Gc.current,o,t);pr(t),hr(s,t,!1,!1),t.stateNode=s,Qa(s,a,i,o)&&fr(t)}}return Cr(t),yr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)n=e.memoizedProps,io?n!==i&&fr(t):ao&&(n===i?t.stateNode=e.stateNode:(e=Gc.current,n=Uc.current,pr(t),t.stateNode=eo(i,e,n,t)));else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(e=Gc.current,n=Uc.current,ae(t)){if(!oo)throw Error(r(176));if(e=t.stateNode,n=t.memoizedProps,i=null,a=qc,a!==null)switch(a.tag){case 27:case 5:i=a.memoizedProps}xs(e,n,t,i)||V(t,!0)}else pr(t),t.stateNode=eo(i,e,n,t)}return Cr(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=ae(t),n!==null){if(e===null){if(!i)throw Error(r(318));if(!oo)throw Error(r(556));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(557));Ss(e,t)}else oe(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Cr(t),e=!1}else n=se(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ut(t),t):(ut(t),null);if(t.flags&128)throw Error(r(558))}return Cr(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ae(t),i!==null&&i.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(!oo)throw Error(r(344));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(r(317));Cs(a,t)}else oe(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Cr(t),a=!1}else a=se(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ut(t),t):(ut(t),null)}return ut(t),t.flags&128?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,a=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(a=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==a&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),xr(t,t.updateQueue),Cr(t),null);case 4:return z(),_r(e,t),e===null&&co(t.stateNode.containerInfo),Cr(t),null;case 10:return U(t.type),Cr(t),null;case 19:if(f(Il),i=t.memoizedState,i===null)return Cr(t),null;if(a=(t.flags&128)!=0,o=i.rendering,o===null)if(a)Sr(i,!1);else{if(ku!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=dt(e),o!==null){for(t.flags|=128,Sr(i,!1),e=o.updateQueue,t.updateQueue=e,xr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)oa(n,e),n=n.sibling;return p(Il,Il.current&1|2),Yc&&F(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&vc()>Bu&&(t.flags|=128,a=!0,Sr(i,!1),t.lanes=4194304)}else{if(!a)if(e=dt(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,xr(t,e),Sr(i,!0),i.tail===null&&i.tailMode===`hidden`&&!o.alternate&&!Yc)return Cr(t),null}else 2*vc()-i.renderingStartTime>Bu&&n!==536870912&&(t.flags|=128,a=!0,Sr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(e=i.last,e===null?t.child=o:e.sibling=o,i.last=o)}return i.tail===null?(Cr(t),null):(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=vc(),e.sibling=null,n=Il.current,p(Il,a?n&1|2:n&1),Yc&&F(t,i.treeForkCount),e);case 22:case 23:return ut(t),at(),i=t.memoizedState!==null,e===null?i&&(t.flags|=8192):e.memoizedState!==null!==i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(Cr(t),t.subtreeFlags&6&&(t.flags|=8192)):Cr(t),n=t.updateQueue,n!==null&&xr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&f(_l),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),U(al),Cr(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Tr(e,t){switch(te(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return U(al),z(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return B(t),null;case 31:if(t.memoizedState!==null){if(ut(t),t.alternate===null)throw Error(r(340));oe()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ut(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));oe()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return f(Il),null;case 4:return z(),null;case 10:return U(t.type),null;case 22:case 23:return ut(t),at(),e!==null&&f(_l),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return U(al),null;case 25:return null;default:return null}}function Er(e,t){switch(te(t),t.tag){case 3:U(al),z();break;case 26:case 27:case 5:B(t);break;case 4:z();break;case 31:t.memoizedState!==null&&ut(t);break;case 13:ut(t);break;case 19:f(Il);break;case 10:U(t.type);break;case 22:case 23:ut(t),at(),e!==null&&f(_l);break;case 24:U(al)}}function Dr(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Xi(t,t.return,e)}}function Or(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Xi(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Xi(t,t.return,e)}}function kr(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{nt(t,n)}catch(t){Xi(e,e.return,t)}}}function Ar(e,t,n){n.props=jn(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Xi(e,t,n)}}function jr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=Ga(e.stateNode);break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Xi(e,t,n)}}function Mr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Xi(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Xi(e,t,n)}else n.current=null}function Nr(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{Ro(r,t,n,e)}catch(t){Xi(e,e.return,t)}}function Pr(e,t,n){try{zo(e.stateNode,e.type,n,t,e)}catch(t){Xi(e,e.return,t)}}function Y(e){return e.tag===5||e.tag===3||(zs?e.tag===26:!1)||($s?e.tag===27&&ic(e.type):!1)||e.tag===4}function Fr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if($s&&e.tag===27&&ic(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ir(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?Vo(n,e,t):Io(n,e);else if(r!==4&&($s&&r===27&&ic(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ir(e,t,n),e=e.sibling;e!==null;)Ir(e,t,n),e=e.sibling}function Lr(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?Bo(n,e,t):Fo(n,e);else if(r!==4&&($s&&r===27&&ic(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Lr(e,t,n),e=e.sibling;e!==null;)Lr(e,t,n),e=e.sibling}function Rr(e,t,n){e=e.containerInfo;try{es(e,n)}catch(e){Xi(t,t.return,e)}}function zr(e){var t=e.stateNode,n=e.memoizedProps;try{tc(e.type,n,t,e)}catch(t){Xi(e,e.return,t)}}function Br(e,t){for(Ja(e.containerInfo),ou=t;ou!==null;)if(e=ou,t=e.child,e.subtreeFlags&1028&&t!==null)t.return=e,ou=t;else for(;ou!==null;){e=ou;var n=e.alternate;switch(t=e.flags,e.tag){case 0:if(t&4&&(t=e.updateQueue,t=t===null?null:t.events,t!==null))for(var i=0;i`;case pu:return`:has(`+(hi(e)||``)+`)`;case mu:return`[role="`+e.value+`"]`;case gu:return`"`+e.value+`"`;case hu:return`[data-testname="`+e.value+`"]`;default:throw Error(r(365))}}function gi(e,t){var n=[];e=[e,0];for(var r=0;rn?32:n;n=Va.T;var a=uo();try{lo(i),Va.T=null,i=Ju,Ju=null;var o=Wu,s=Ku;if(Uu=0,Gu=Wu=null,Ku=0,yu&6)throw Error(r(331));var c=yu;if(yu|=4,X(o.current),ai(o,o.current,s,i),yu=c,ve(0,!1),Ec&&typeof Ec.onPostCommitFiberRoot==`function`)try{Ec.onPostCommitFiberRoot(Tc,o)}catch{}return!0}finally{lo(a),Va.T=n,Ki(e,t)}}function Yi(e,t,n){t=P(n,t),t=Pn(e.stateNode,t,2),e=Xe(e,t,2),e!==null&&(x(e,2),_e(e))}function Xi(e,t,n){if(e.tag===3)Yi(e,e,n);else for(;t!==null;){if(t.tag===3){Yi(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Hu===null||!Hu.has(r))){e=P(n,e),n=Fn(2),r=Xe(t,n,2),r!==null&&(In(n,r,t,e),x(r,2),_e(r));break}}t=t.return}}function Zi(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new vu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Du=!0,i.add(n),e=Qi.bind(null,e,t,n),t.then(e,e))}function Qi(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,bu===e&&(Su&n)===n&&(ku===4||ku===3&&(Su&62914560)===Su&&300>vc()-Ru?!(yu&2)&&Di(e,0):Mu|=n,Pu===Su&&(Pu=0)),_e(e)}function $i(e,t){t===0&&(t=y()),e=We(e,t),e!==null&&(x(e,t),_e(e))}function ea(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$i(e,n)}function ta(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(t),$i(e,n)}function na(e,t){return mc(e,t)}function ra(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ia(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aa(e,n){var r=e.alternate;return r===null?(r=t(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function oa(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function sa(e,n,i,a,o,s){var c=0;if(a=e,typeof e==`function`)ia(e)&&(c=1);else if(typeof e==`string`)c=zs&&$s?Bs(e,i,Uc.current)?26:rc(e)?27:5:zs?Bs(e,i,Uc.current)?26:5:$s&&rc(e)?27:5;else e:switch(e){case Ia:return e=t(31,i,n,o),e.elementType=Ia,e.lanes=s,e;case Ea:return ca(i.children,o,s,n);case Da:c=8,o|=24;break;case Oa:return e=t(12,i,n,o|2),e.elementType=Oa,e.lanes=s,e;case Ma:return e=t(13,i,n,o),e.elementType=Ma,e.lanes=s,e;case Na:return e=t(19,i,n,o),e.elementType=Na,e.lanes=s,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case Aa:c=10;break e;case ka:c=9;break e;case ja:c=11;break e;case Pa:c=14;break e;case Fa:c=16,a=null;break e}c=29,i=Error(r(130,e===null?`null`:typeof e,``)),a=null}return n=t(c,i,n,o),n.elementType=e,n.type=a,n.lanes=s,n}function ca(e,n,r,i){return e=t(7,e,i,n),e.lanes=r,e}function la(e,n,r){return e=t(6,e,null,n),e.lanes=r,e}function ua(e){var n=t(18,null,null,0);return n.stateNode=e,n}function da(e,n,r){return n=t(4,e.children===null?[]:e.children,e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function fa(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Q,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=b(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=b(0),this.hiddenUpdates=b(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function pa(e,n,r,i,a,o,s,c,l,u,d,f){return e=new fa(e,n,r,s,l,u,d,f,c),n=1,o===!0&&(n|=24),o=t(3,null,null,n),e.current=o,o.stateNode=e,n=me(),n.refCount++,e.pooledCache=n,n.refCount++,o.memoizedState={element:i,isDehydrated:r,cache:n},qe(o),e}function ma(e){return e?(e=sc,e):sc}function ha(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=o(t),e=e===null?null:s(e),e===null?null:Ga(e.stateNode)}function ga(e,t,n,r,i,a){i=ma(i),r.context===null?r.context=i:r.pendingContext=i,r=Ye(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Xe(e,r,t),n!==null&&(bi(n,e,t),Ze(n,e,t))}function _a(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n=u&&o>=f&&a<=d&&s<=p){e.splice(t,1);break}else if(i!==u||n.width!==l.width||ps){if(!(o!==f||n.height!==l.height||da)){u>i&&(l.width+=u-i,l.x=i),do&&(l.height+=f-o,l.y=o),pn&&(n=c)),c `)+` + +No matching component was found for: + `)+e.join(` > `)}return null},ya.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 27:case 5:return Ga(e.child.stateNode);default:return e.child.stateNode}},ya.injectIntoDevTools=function(){var e={bundleType:0,version:Ha,rendererPackageName:Ua,currentDispatcherRef:Va,reconcilerVersion:`19.2.0`};if(Wa!==null&&(e.rendererConfig=Wa),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Tc=t.inject(e),Ec=t}catch{}e=!!t.checkDCE}}return e},ya.isAlreadyRendering=function(){return(yu&6)!=0},ya.observeVisibleRects=function(e,t,n,i){if(!Do)throw Error(r(363));e=_i(e,t);var a=Po(e,n,i).disconnect;return{disconnect:function(){a()}}},ya.shouldError=function(){return null},ya.shouldSuspend=function(){return!1},ya.startHostTransition=function(e,t,i,a){if(e.tag!==5)throw Error(r(476));var o=gn(e).queue;hn(e,o,t,So,i===null?n:function(){var t=gn(e);return t.next===null&&(t=e.alternate.memoizedState),Cn(e,t.next.queue,{},vi()),i(a)})},ya.updateContainer=function(e,t,n,r){var i=t.current,a=vi();return ga(i,a,e,t,n,r),a},ya.updateContainerSync=function(e,t,n,r){return ga(t.current,2,e,t,n,r),2},ya},e.exports.default=e.exports,Object.defineProperty(e.exports,`__esModule`,{value:!0})}(ty)),ty.exports}({exports:{}}).exports;var iy;function ay(){return iy||(iy=1,ey.exports=ry()),ey.exports}var oy=$v(ay());function sy(e){let t=oy(e);return t.injectIntoDevTools(),t}var cy=0,ly={},uy=/^three(?=[A-Z])/,dy=e=>`${e[0].toUpperCase()}${e.slice(1)}`,fy=0,py=e=>typeof e==`function`;function my(e){if(py(e)){let t=`${fy++}`;return ly[t]=e,t}else Object.assign(ly,e)}function hy(e,t){let n=dy(e),r=ly[n];if(e!==`primitive`&&!r)throw Error(`R3F: ${n} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(e===`primitive`&&!t.object)throw Error(`R3F: Primitives without 'object' are invalid!`);if(t.args!==void 0&&!Array.isArray(t.args))throw Error(`R3F: The args prop must be an array!`)}function gy(e,t,n){var r;return e=dy(e)in ly?e:e.replace(uy,``),hy(e,t),e===`primitive`&&(r=t.object)!=null&&r.__r3f&&delete t.object.__r3f,yv(t.object,n,e,t)}function _y(e){if(!e.isHidden){var t;e.props.attach&&(t=e.parent)!=null&&t.object?Cv(e.parent,e):Nv(e.object)&&(e.object.visible=!1),e.isHidden=!0,jv(e)}}function vy(e){if(e.isHidden){var t;e.props.attach&&(t=e.parent)!=null&&t.object?Sv(e.parent,e):Nv(e.object)&&e.props.visible!==!1&&(e.object.visible=!0),e.isHidden=!1,jv(e)}}function yy(e,t,n){let r=t.root.getState();if(!(!e.parent&&e.object!==r.scene)){if(!t.object){let e=ly[dy(t.type)];t.object=t.props.object??new e(...t.props.args??[]),t.object.__r3f=t}if(Av(t.object,t.props),t.props.attach)Sv(e,t);else if(Nv(t.object)&&Nv(e.object)){let r=e.object.children.indexOf(n?.object);if(n&&r!==-1){let n=e.object.children.indexOf(t.object);if(n!==-1){e.object.children.splice(n,1);let i=n{try{e.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<`u`?t():(0,q_.unstable_scheduleCallback)(q_.unstable_IdlePriority,t)}}function Cy(e,t,n){if(!t)return;t.parent=null;let r=e.children.indexOf(t);r!==-1&&e.children.splice(r,1),t.props.attach?Cv(e,t):Nv(t.object)&&Nv(e.object)&&(e.object.remove(t.object),Iv(rv(t),t.object));let i=t.props.dispose!==null&&n!==!1;for(let e=t.children.length-1;e>=0;e--){let n=t.children[e];Cy(t,n,i)}t.children.length=0,delete t.object.__r3f,i&&t.type!==`primitive`&&t.object.type!==`Scene`&&Sy(t.object),n===void 0&&jv(t)}function wy(e,t){for(let n of[e,e.alternate])if(n!==null)if(typeof n.ref==`function`){n.refCleanup==null||n.refCleanup();let e=n.ref(t);typeof e==`function`&&(n.refCleanup=e)}else n.ref&&(n.ref.current=t)}var Ty=[];function Ey(){for(let[e]of Ty){let t=e.parent;if(t){e.props.attach?Cv(t,e):Nv(e.object)&&Nv(t.object)&&t.object.remove(e.object);for(let t of e.children)t.props.attach?Cv(e,t):Nv(t.object)&&Nv(e.object)&&e.object.remove(t.object)}e.isHidden&&vy(e),e.object.__r3f&&delete e.object.__r3f,e.type!==`primitive`&&Sy(e.object)}for(let[e,t,n]of Ty){e.props=t;let r=e.parent;if(r){let t=ly[dy(e.type)];e.object=e.props.object??new t(...e.props.args??[]),e.object.__r3f=e,wy(n,e.object),Av(e.object,e.props),e.props.attach?Sv(r,e):Nv(e.object)&&Nv(r.object)&&r.object.add(e.object);for(let t of e.children)t.props.attach?Sv(e,t):Nv(t.object)&&Nv(e.object)&&e.object.add(t.object);jv(e)}}Ty.length=0}var Dy=()=>{},Oy={},ky=cy,Ay=0,jy=4,My=sy({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:gy,removeChild:Cy,appendChild:by,appendInitialChild:by,insertBefore:xy,appendChildToContainer(e,t){let n=e.getState().scene.__r3f;!t||!n||by(n,t)},removeChildFromContainer(e,t){let n=e.getState().scene.__r3f;!t||!n||Cy(n,t)},insertInContainerBefore(e,t,n){let r=e.getState().scene.__r3f;!t||!n||!r||xy(r,t,n)},getRootHostContext:()=>Oy,getChildHostContext:()=>Oy,commitUpdate(e,t,n,r,i){var a;hy(t,r);let o=!1;if(e.type===`primitive`&&n.object!==r.object?o=!0:r.args?.length===n.args?.length?(a=r.args)!=null&&a.some((e,t)=>e!==n.args?.[t])&&(o=!0):o=!0,o)Ty.push([e,{...r},i]);else{let t=Dv(e,r);Object.keys(t).length&&(Object.assign(e.props,t),Av(e.object,t))}(i.sibling===null||(i.flags&jy)===Ay)&&Ey()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>e?.object,prepareForCommit:()=>null,preparePortalMount:e=>yv(e.getState().scene,e,``,{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:_y,unhideInstance:vy,createTextInstance:Dy,hideTextInstance:Dy,unhideTextInstance:Dy,scheduleTimeout:typeof setTimeout==`function`?setTimeout:void 0,cancelTimeout:typeof clearTimeout==`function`?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:G.createContext(null),setCurrentUpdatePriority(e){ky=e},getCurrentUpdatePriority(){return ky},resolveUpdatePriority(){if(ky!==cy)return ky;switch(typeof window<`u`&&window.event?.type){case`click`:case`contextmenu`:case`dblclick`:case`pointercancel`:case`pointerdown`:case`pointerup`:return Zv;case`pointermove`:case`pointerout`:case`pointerover`:case`pointerenter`:case`pointerleave`:case`wheel`:return Yv;default:return Xv}},resetFormInstance(){},rendererPackageName:`@react-three/fiber`,rendererVersion:Qv.version,applyViewTransitionName(e,t,n){},restoreViewTransitionName(e,t){},cancelViewTransitionName(e,t,n){},cancelRootViewTransitionName(e){},restoreRootViewTransitionName(e){},InstanceMeasurement:null,measureInstance:e=>null,wasInstanceInViewport:e=>!0,hasInstanceChanged:(e,t)=>!1,hasInstanceAffectedParent:(e,t)=>!1,suspendOnActiveViewTransition(e,t){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(e){},createViewTransitionInstance:e=>null,getCurrentGestureOffset(e){throw Error(`startGestureTransition is not yet supported in react-three-fiber.`)},cloneMutableInstance(e,t){return e},cloneMutableTextInstance(e){return e},cloneRootViewTransitionContainer(e){throw Error(`Not implemented.`)},removeRootViewTransitionClone(e,t){throw Error(`Not implemented.`)},createFragmentInstance:e=>null,updateFragmentInstanceFiber(e,t){},commitNewChildToFragmentInstance(e,t){},deleteChildFromFragmentInstance(e,t){},measureClonedInstance:e=>null,maySuspendCommitOnUpdate:(e,t,n)=>!1,maySuspendCommitInSyncRender:(e,t)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(e,t)=>null}),Ny=new Map,Py={objects:`shallow`,strict:!1};function Fy(e,t){if(!t&&typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement&&e.parentElement){let{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}else if(!t&&typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas)return{width:e.width,height:e.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...t}}function Iy(e){let t=Ny.get(e),n=t?.fiber,r=t?.store;t&&console.warn(`R3F.createRoot should only be called once!`);let i=typeof reportError==`function`?reportError:console.error,a=r||Bv(tb,nb),o=n||My.createContainer(a,Jv,null,!1,null,``,i,i,i,null);t||Ny.set(e,{fiber:o,store:a});let s,c,l=!1,u=null;return{async configure(t={}){let n;u=new Promise(e=>n=e);let{gl:r,size:i,scene:o,events:d,onCreated:f,shadows:p=!1,linear:m=!1,flat:h=!1,legacy:g=!1,orthographic:_=!1,frameloop:v=`always`,dpr:y=[1,2],performance:b,raycaster:x,camera:S,onPointerMissed:C}=t,w=a.getState(),T=w.gl;if(!w.gl){let t={canvas:e,powerPreference:`high-performance`,antialias:!0,alpha:!0},n=typeof r==`function`?await r(t):r;T=Rv(n)?n:new j_({...t,...r}),w.set({gl:T})}let E=w.raycaster;E||w.set({raycaster:E=new Cp});let{params:D,...O}=x||{};if(mv.equ(O,E,Py)||Av(E,{...O}),mv.equ(D,E.params,Py)||Av(E,{params:{...E.params,...D}}),!w.camera||w.camera===c&&!mv.equ(c,S,Py)){c=S;let e=S?.isCamera,t=e?S:_?new mf(0,0,0,0,.1,1e3):new ss(75,0,.1,1e3);e||(t.position.z=5,S&&(Av(t,S),t.manual||(`aspect`in S||`left`in S||`right`in S||`bottom`in S||`top`in S)&&(t.manual=!0,t.updateProjectionMatrix())),!w.camera&&!(S!=null&&S.rotation)&&t.lookAt(0,0,0)),w.set({camera:t}),E.camera=t}if(!w.scene){let e;o!=null&&o.isScene?(e=o,yv(e,a,``,{})):(e=new vs,yv(e,a,``,{}),o&&Av(e,o)),w.set({scene:e})}d&&!w.events.handlers&&w.set({events:d(a)});let k=Fy(e,i);if(mv.equ(k,w.size,Py)||w.setSize(k.width,k.height,k.top,k.left),y&&w.viewport.dpr!==fv(y)&&w.setDpr(y),w.frameloop!==v&&w.setFrameloop(v),w.onPointerMissed||w.set({onPointerMissed:C}),b&&!mv.equ(b,w.performance,Py)&&w.set(e=>({performance:{...e.performance,...b}})),!w.xr){let e=(e,t)=>{let n=a.getState();n.frameloop!==`never`&&nb(e,!0,n,t)},t=()=>{let t=a.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||tb(t)},n={connect(){let e=a.getState().gl;e.xr.addEventListener(`sessionstart`,t),e.xr.addEventListener(`sessionend`,t)},disconnect(){let e=a.getState().gl;e.xr.removeEventListener(`sessionstart`,t),e.xr.removeEventListener(`sessionend`,t)}};typeof T.xr?.addEventListener==`function`&&n.connect(),w.set({xr:n})}if(T.shadowMap){let e=T.shadowMap.enabled,t=T.shadowMap.type;if(T.shadowMap.enabled=!!p,mv.boo(p))T.shadowMap.type=2;else if(mv.str(p)){let e={basic:0,percentage:1,soft:2,variance:3};T.shadowMap.type=e[p]??2}else mv.obj(p)&&Object.assign(T.shadowMap,p);(e!==T.shadowMap.enabled||t!==T.shadowMap.type)&&(T.shadowMap.needsUpdate=!0)}return bi.enabled=!g,l||(T.outputColorSpace=m?er:$n,T.toneMapping=h?0:4),w.legacy!==g&&w.set(()=>({legacy:g})),w.linear!==m&&w.set(()=>({linear:m})),w.flat!==h&&w.set(()=>({flat:h})),r&&!mv.fun(r)&&!Rv(r)&&!mv.equ(r,T,Py)&&Av(T,r),s=f,l=!0,n(),this},render(t){return!l&&!u&&this.configure(),u.then(()=>{My.updateContainer((0,K.jsx)(Ly,{store:a,children:t,onCreated:s,rootElement:e}),o,null,()=>void 0)}),a},unmount(){Ry(e)}}}function Ly({store:e,children:t,onCreated:n,rootElement:r}){return sv(()=>{let t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),n&&n(t),e.getState().events.connected||t.events.connect==null||t.events.connect(r)},[]),(0,K.jsx)(zv.Provider,{value:e,children:t})}function Ry(e,t){let n=Ny.get(e),r=n?.fiber;if(r){let i=n?.store.getState();i&&(i.internal.active=!1),My.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var n,r,a,o;i.events.disconnect==null||i.events.disconnect(),(n=i.gl)==null||(r=n.renderLists)==null||r.dispose==null||r.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(o=i.gl)!=null&&o.xr&&i.xr.disconnect(),gv(i.scene),Ny.delete(e),t&&t(e)}catch{}},500)})}}function zy(e,t,n){return(0,K.jsx)(By,{children:e,container:t,state:n})}function By({state:e={},children:t,container:n}){let{events:r,size:i,...a}=e,o=Vv(),[s]=G.useState(()=>new Cp),[c]=G.useState(()=>new X),l=cv((e,t)=>{let a;if(t.camera&&i){let n=t.camera;a=e.viewport.getCurrentViewport(n,new Z,i),n!==e.camera&&Mv(n,i)}return{...e,...t,scene:n,raycaster:s,pointer:c,mouse:c,previousRoot:o,events:{...e.events,...t.events,...r},size:{...e.size,...i},viewport:{...e.viewport,...a},setEvents:e=>t.set(t=>({...t,events:{...t.events,...e}}))}}),u=G.useMemo(()=>{let e=z_((e,t)=>({...a,set:e,get:t})),t=t=>e.setState(e=>l.current(t,e));return t(o.getState()),o.subscribe(t),e},[o,n]);return(0,K.jsx)(K.Fragment,{children:My.createPortal((0,K.jsx)(zv.Provider,{value:u,children:t}),u,null)})}var Vy=new Set,Hy=new Set,Uy=new Set;function Wy(e,t){if(e.size)for(let{callback:n}of e.values())n(t)}function Gy(e,t){switch(e){case`before`:return Wy(Vy,t);case`after`:return Wy(Hy,t);case`tail`:return Wy(Uy,t)}}var Ky,qy;function Jy(e,t,n){let r=t.clock.getDelta();t.frameloop===`never`&&typeof e==`number`&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),Ky=t.internal.subscribers;for(let e=0;e0)&&!((t=$y.gl.xr)!=null&&t.isPresenting)&&(Zy+=Jy(e,$y))}if(Xy=!1,Gy(`after`,e),Zy===0)return Gy(`tail`,e),Yy=!1,cancelAnimationFrame(Qy)}function tb(e,t=1){var n;if(!e)return Ny.forEach(e=>tb(e.store.getState(),t));(n=e.gl.xr)!=null&&n.isPresenting||!e.internal.active||e.frameloop===`never`||(t>1?e.internal.frames=Math.min(60,e.internal.frames+t):Xy?e.internal.frames=2:e.internal.frames=1,Yy||(Yy=!0,requestAnimationFrame(eb)))}function nb(e,t=!0,n,r){if(t&&Gy(`before`,e),n)Jy(e,n,r);else for(let t of Ny.values())Jy(e,t.store.getState());t&&Gy(`after`,e)}var rb={onClick:[`click`,!1],onContextMenu:[`contextmenu`,!1],onDoubleClick:[`dblclick`,!1],onWheel:[`wheel`,!0],onPointerDown:[`pointerdown`,!0],onPointerUp:[`pointerup`,!0],onPointerLeave:[`pointerleave`,!0],onPointerMove:[`pointermove`,!0],onPointerCancel:[`pointercancel`,!0],onLostPointerCapture:[`lostpointercapture`,!0]};function ib(e){let{handlePointer:t}=Lv(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-(e.offsetY/t.size.height)*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(rb).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var t;let{events:n,internal:r}=e.getState();(t=r.lastEvent)!=null&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{let{set:n,events:r}=e.getState();if(r.disconnect==null||r.disconnect(),n(e=>({events:{...e.events,connected:t}})),r.handlers)for(let e in r.handlers){let n=r.handlers[e],[i,a]=rb[e];t.addEventListener(i,n,{passive:a})}},disconnect:()=>{let{set:t,events:n}=e.getState();if(n.connected){if(n.handlers)for(let e in n.handlers){let t=n.handlers[e],[r]=rb[e];n.connected.removeEventListener(r,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}}function ab(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function ob({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){let i=n||(typeof window>`u`?class{}:window.ResizeObserver);if(!i)throw Error(`This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills`);let[a,o]=(0,G.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=(0,G.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),c=e?typeof e==`number`?e:e.scroll:null,l=e?typeof e==`number`?e:e.resize:null,u=(0,G.useRef)(!1);(0,G.useEffect)(()=>(u.current=!0,()=>void(u.current=!1)));let[d,f,p]=(0,G.useMemo)(()=>{let e=()=>{if(!s.current.element)return;let{left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d}=s.current.element.getBoundingClientRect(),f={left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d};s.current.element instanceof HTMLElement&&r&&(f.height=s.current.element.offsetHeight,f.width=s.current.element.offsetWidth),Object.freeze(f),u.current&&!db(s.current.lastBounds,f)&&o(s.current.lastBounds=f)};return[e,l?ab(e,l):e,c?ab(e,c):e]},[o,r,c,l]);function m(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(e=>e.removeEventListener(`scroll`,p,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&(`orientation`in screen&&`removeEventListener`in screen.orientation?screen.orientation.removeEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.removeEventListener(`orientationchange`,s.current.orientationHandler))}function h(){s.current.element&&(s.current.resizeObserver=new i(p),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(e=>e.addEventListener(`scroll`,p,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{p()},`orientation`in screen&&`addEventListener`in screen.orientation?screen.orientation.addEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.addEventListener(`orientationchange`,s.current.orientationHandler))}return cb(p,!!t),sb(f),(0,G.useEffect)(()=>{m(),h()},[t,p,f]),(0,G.useEffect)(()=>m,[]),[e=>{!e||e===s.current.element||(m(),s.current.element=e,s.current.scrollContainers=lb(e),h())},a,d]}function sb(e){(0,G.useEffect)(()=>{let t=e;return window.addEventListener(`resize`,t),()=>void window.removeEventListener(`resize`,t)},[e])}function cb(e,t){(0,G.useEffect)(()=>{if(t){let t=e;return window.addEventListener(`scroll`,t,{capture:!0,passive:!0}),()=>void window.removeEventListener(`scroll`,t,!0)}},[e,t])}function lb(e){let t=[];if(!e||e===document.body)return t;let{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(e=>e===`auto`||e===`scroll`)&&t.push(e),[...t,...lb(e.parentElement)]}var ub=[`x`,`y`,`top`,`bottom`,`left`,`right`,`width`,`height`],db=(e,t)=>ub.every(n=>e[n]===t[n]);k();function fb({ref:e,children:t,fallback:n,resize:r,style:i,gl:a,events:o=ib,eventSource:s,eventPrefix:c,shadows:l,linear:u,flat:d,legacy:f,orthographic:p,frameloop:m,dpr:h,performance:g,raycaster:_,camera:v,scene:y,onPointerMissed:b,onCreated:x,...S}){G.useMemo(()=>my(Em),[]);let C=lv(),[w,T]=ob({scroll:!0,debounce:{scroll:50,resize:0},...r}),E=G.useRef(null),D=G.useRef(null);G.useImperativeHandle(e,()=>E.current);let O=cv(b),[k,A]=G.useState(!1),[j,M]=G.useState(!1);if(k)throw k;if(j)throw j;let N=G.useRef(null);return sv(()=>{let e=E.current;if(T.width>0&&T.height>0&&e){N.current||=Iy(e);async function n(){await N.current.configure({gl:a,scene:y,events:o,shadows:l,linear:u,flat:d,legacy:f,orthographic:p,frameloop:m,dpr:h,performance:g,raycaster:_,camera:v,size:T,onPointerMissed:(...e)=>O.current==null?void 0:O.current(...e),onCreated:e=>{e.events.connect==null||e.events.connect(s?av(s)?s.current:s:D.current),c&&e.setEvents({compute:(e,t)=>{let n=e[c+`X`],r=e[c+`Y`];t.pointer.set(n/t.size.width*2-1,-(r/t.size.height)*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),x?.(e)}}),N.current.render((0,K.jsx)(C,{children:(0,K.jsx)(dv,{set:M,children:(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(uv,{set:A}),children:t??null})})}))}n()}}),G.useEffect(()=>{let e=E.current;if(e)return()=>Ry(e)},[]),(0,K.jsx)(`div`,{ref:D,style:{position:`relative`,width:`100%`,height:`100%`,overflow:`hidden`,pointerEvents:s?`none`:`auto`,...i},...S,children:(0,K.jsx)(`div`,{ref:w,style:{width:`100%`,height:`100%`},children:(0,K.jsx)(`canvas`,{ref:E,style:{display:`block`},children:n})})})}function pb(e){return(0,K.jsx)(Z_,{children:(0,K.jsx)(fb,{...e})})}function mb(){return mb=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.PI/2}function Sb(e,t,n,r){let i=gb.setFromMatrixPosition(e.matrixWorld),a=i.clone();a.project(t),yb.set(a.x,a.y),n.setFromCamera(yb,t);let o=n.intersectObjects(r,!0);if(o.length){let e=o[0].distance;return i.distanceTo(n.ray.origin)Math.abs(e)<1e-10?0:e;function Eb(e,t,n=``){let r=`matrix3d(`;for(let n=0;n!==16;n++)r+=Tb(t[n]*e.elements[n])+(n===15?`)`:`,`);return n+r}var Db=(e=>t=>Eb(t,e))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),Ob=(e=>(t,n)=>Eb(t,e(n),`translate(-50%,-50%)`))(e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1]);function kb(e){return e&&typeof e==`object`&&`current`in e}var Ab=G.forwardRef(({children:e,eps:t=.001,style:n,className:r,prepend:i,center:a,fullscreen:o,portal:s,distanceFactor:c,sprite:l=!1,transform:u=!1,occlude:d,onOcclude:f,castShadow:p,receiveShadow:m,material:h,geometry:g,zIndexRange:_=[16777271,0],calculatePosition:v=bb,as:y=`div`,wrapperClass:b,pointerEvents:x=`auto`,...S},C)=>{let{gl:w,camera:T,scene:E,size:D,raycaster:O,events:k,viewport:A}=Hv(),[j]=G.useState(()=>document.createElement(y)),M=G.useRef(null),N=G.useRef(null),P=G.useRef(0),F=G.useRef([0,0]),I=G.useRef(null),ee=G.useRef(null),te=s?.current||k.connected||w.domElement.parentNode,L=G.useRef(null),R=G.useRef(!1),z=G.useMemo(()=>d&&d!==`blending`||Array.isArray(d)&&d.length&&kb(d[0]),[d]);G.useLayoutEffect(()=>{let e=w.domElement;d&&d===`blending`?(e.style.zIndex=`${Math.floor(_[0]/2)}`,e.style.position=`absolute`,e.style.pointerEvents=`none`):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[d]),G.useLayoutEffect(()=>{if(N.current){let e=M.current=hb.createRoot(j);if(E.updateMatrixWorld(),u)j.style.cssText=`position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;`;else{let e=v(N.current,T,D);j.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return te&&(i?te.prepend(j):te.appendChild(j)),()=>{te&&te.removeChild(j),e.unmount()}}},[te,u]),G.useLayoutEffect(()=>{b&&(j.className=b)},[b]);let ne=G.useMemo(()=>u?{position:`absolute`,top:0,left:0,width:D.width,height:D.height,transformStyle:`preserve-3d`,pointerEvents:`none`}:{position:`absolute`,transform:a?`translate3d(-50%,-50%,0)`:`none`,...o&&{top:-D.height/2,left:-D.width/2,width:D.width,height:D.height},...n},[n,a,o,D,u]),B=G.useMemo(()=>({position:`absolute`,pointerEvents:x}),[x]);G.useLayoutEffect(()=>{if(R.current=!1,u){var t;(t=M.current)==null||t.render(G.createElement(`div`,{ref:I,style:ne},G.createElement(`div`,{ref:ee,style:B},G.createElement(`div`,{ref:C,className:r,style:n,children:e}))))}else{var i;(i=M.current)==null||i.render(G.createElement(`div`,{ref:C,style:ne,className:r,children:e}))}});let V=G.useRef(!0);Uv(e=>{if(N.current){T.updateMatrixWorld(),N.current.updateWorldMatrix(!0,!1);let e=u?F.current:v(N.current,T,D);if(u||Math.abs(P.current-T.zoom)>t||Math.abs(F.current[0]-e[0])>t||Math.abs(F.current[1]-e[1])>t){let t=xb(N.current,T),n=!1;z&&(Array.isArray(d)?n=d.map(e=>e.current):d!==`blending`&&(n=[E]));let r=V.current;n?V.current=Sb(N.current,T,O,n)&&!t:V.current=!t,r!==V.current&&(f?f(!V.current):j.style.display=V.current?`block`:`none`);let i=Math.floor(_[0]/2),a=d?z?[_[0],i]:[i-1,0]:_;if(j.style.zIndex=`${wb(N.current,T,a)}`,u){let[e,t]=[D.width/2,D.height/2],n=T.projectionMatrix.elements[5]*t,{isOrthographicCamera:r,top:i,left:a,bottom:o,right:s}=T,u=Db(T.matrixWorldInverse),d=r?`scale(${n})translate(${Tb(-(s+a)/2)}px,${Tb((i+o)/2)}px)`:`translateZ(${n}px)`,f=N.current.matrixWorld;l&&(f=T.matrixWorldInverse.clone().transpose().copyPosition(f).scale(N.current.scale),f.elements[3]=f.elements[7]=f.elements[11]=0,f.elements[15]=1),j.style.width=D.width+`px`,j.style.height=D.height+`px`,j.style.perspective=r?``:`${n}px`,I.current&&ee.current&&(I.current.style.transform=`${d}${u}translate(${e}px,${t}px)`,ee.current.style.transform=Ob(f,1/((c||10)/400)))}else{let t=c===void 0?1:Cb(N.current,T)*c;j.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}F.current=e,P.current=T.zoom}}if(!z&&L.current&&!R.current)if(u){if(I.current){let e=I.current.children[0];if(e!=null&&e.clientWidth&&e!=null&&e.clientHeight){let{isOrthographicCamera:t}=T;if(t||g)S.scale&&(Array.isArray(S.scale)?S.scale instanceof Z?L.current.scale.copy(S.scale.clone().divideScalar(1)):L.current.scale.set(1/S.scale[0],1/S.scale[1],1/S.scale[2]):L.current.scale.setScalar(1/S.scale));else{let t=(c||10)/400,n=e.clientWidth*t,r=e.clientHeight*t;L.current.scale.set(n,r,1)}R.current=!0}}}else{let t=j.children[0];if(t!=null&&t.clientWidth&&t!=null&&t.clientHeight){let e=1/A.factor,n=t.clientWidth*e,r=t.clientHeight*e;L.current.scale.set(n,r,1),R.current=!0}L.current.lookAt(e.camera.position)}});let re=G.useMemo(()=>({vertexShader:u?void 0:` + /* + This shader is from the THREE's SpriteMaterial. + We need to turn the backing plane into a Sprite + (make it always face the camera) if "transfrom" + is false. + */ + #include + + void main() { + vec2 center = vec2(0., 1.); + float rotation = 0.0; + + // This is somewhat arbitrary, but it seems to work well + // Need to figure out how to derive this dynamically if it even matters + float size = 0.03; + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; + } + `,fragmentShader:` + void main() { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } + `}),[u]);return G.createElement(`group`,mb({},S,{ref:N}),d&&!z&&G.createElement(`mesh`,{castShadow:p,receiveShadow:m,ref:L},g||G.createElement(`planeGeometry`,null),h||G.createElement(`shaderMaterial`,{side:2,vertexShader:re.vertexShader,fragmentShader:re.fragmentShader})))}),jb=(()=>parseInt(`181`.replace(/\D+/g,``)))(),Mb=Uint8Array,Nb=Uint16Array,Pb=Uint32Array,Fb=new Mb([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ib=new Mb([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Lb=new Mb([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Rb=function(e,t){for(var n=new Nb(31),r=0;r<31;++r)n[r]=t+=1<>>1|(Gb&21845)<<1;Kb=(Kb&52428)>>>2|(Kb&13107)<<2,Kb=(Kb&61680)>>>4|(Kb&3855)<<4,Wb[Gb]=((Kb&65280)>>>8|(Kb&255)<<8)>>>1}for(var qb=(function(e,t,n){for(var r=e.length,i=0,a=new Nb(t);i>>c]=l}else for(s=new Nb(r),i=0;i>>15-e[i]);return s}),Jb=new Mb(288),Gb=0;Gb<144;++Gb)Jb[Gb]=8;for(var Gb=144;Gb<256;++Gb)Jb[Gb]=9;for(var Gb=256;Gb<280;++Gb)Jb[Gb]=7;for(var Gb=280;Gb<288;++Gb)Jb[Gb]=8;for(var Yb=new Mb(32),Gb=0;Gb<32;++Gb)Yb[Gb]=5;var Xb=qb(Jb,9,1),Zb=qb(Yb,5,1),Qb=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},$b=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},ex=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},tx=function(e){return(e/8|0)+(e&7&&1)},nx=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Nb?Nb:e instanceof Pb?Pb:Mb)(n-t);return r.set(e.subarray(t,n)),r},rx=function(e,t,n){var r=e.length;if(!r||n&&!n.l&&r<5)return t||new Mb(0);var i=!t||n,a=!n||n.i;n||={},t||=new Mb(r*3);var o=function(e){var n=t.length;if(e>n){var r=new Mb(Math.max(n*2,e));r.set(t),t=r}},s=n.f||0,c=n.p||0,l=n.b||0,u=n.l,d=n.d,f=n.m,p=n.n,m=r*8;do{if(!u){n.f=s=$b(e,c,1);var h=$b(e,c+1,3);if(c+=3,h)if(h==1)u=Xb,d=Zb,f=9,p=5;else if(h==2){var g=$b(e,c,31)+257,_=$b(e,c+10,15)+4,v=g+$b(e,c+5,31)+1;c+=14;for(var y=new Mb(v),b=new Mb(19),x=0;x<_;++x)b[Lb[x]]=$b(e,c+x*3,7);c+=_*3;for(var S=Qb(b),C=(1<>>4;if(E<16)y[x++]=E;else{var D=0,O=0;for(E==16?(O=3+$b(e,c,3),c+=2,D=y[x-1]):E==17?(O=3+$b(e,c,7),c+=3):E==18&&(O=11+$b(e,c,127),c+=7);O--;)y[x++]=D}}var k=y.subarray(0,g),A=y.subarray(g);f=Qb(k),p=Qb(A),u=qb(k,f,1),d=qb(A,p,1)}else throw`invalid block type`;else{var E=tx(c)+4,j=e[E-4]|e[E-3]<<8,M=E+j;if(M>r){if(a)throw`unexpected EOF`;break}i&&o(l+j),t.set(e.subarray(E,M),l),n.b=l+=j,n.p=c=M*8;continue}if(c>m){if(a)throw`unexpected EOF`;break}}i&&o(l+131072);for(var N=(1<>>4;if(c+=D&15,c>m){if(a)throw`unexpected EOF`;break}if(!D)throw`invalid length/literal`;if(I<256)t[l++]=I;else if(I==256){F=c,u=null;break}else{var ee=I-254;if(I>264){var x=I-257,te=Fb[x];ee=$b(e,c,(1<>>4;if(!L)throw`invalid distance`;c+=L&15;var A=Ub[R];if(R>3){var te=Ib[R];A+=ex(e,c)&(1<m){if(a)throw`unexpected EOF`;break}i&&o(l+131072);for(var z=l+ee;l>>4>7||(e[0]<<8|e[1])%31)throw`invalid zlib data`;if(e[1]&32)throw`invalid zlib data: preset dictionaries not supported`};function ox(e,t){return rx((ax(e),e.subarray(2,-4)),t)}var sx=typeof TextDecoder<`u`&&new TextDecoder;try{sx.decode(ix,{stream:!0})}catch{}var cx=e=>e&&e.isCubeTexture,lx=class extends Go{constructor(e,t){let n=cx(e),r=((n?e.image[0]?.width:e.image.width)??1024)/4,i=Math.floor(Math.log2(r)),a=2**i,o=3*Math.max(a,112),s=4*a,c=[n?`#define ENVMAP_TYPE_CUBE`:``,`#define CUBEUV_TEXEL_WIDTH ${1/o}`,`#define CUBEUV_TEXEL_HEIGHT ${1/s}`,`#define CUBEUV_MAX_MIP ${i}.0`].join(` +`)+` + #define ENVMAP_TYPE_CUBE_UV + varying vec3 vWorldPosition; + uniform float radius; + uniform float height; + uniform float angle; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube map; + #else + uniform sampler2D map; + #endif + // From: https://www.shadertoy.com/view/4tsBD7 + float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) + { + float d = dot ( rd, n ); + + if( d > 0.0 ) { return 1e6; } + + vec3 o = ro - c; + float t = - dot( n, o ) / d; + vec3 q = o + rd * t; + + return ( dot( q, q ) < r * r ) ? t : 1e6; + } + // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm + float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) + { + vec3 oc = ro - ce; + float b = dot( oc, rd ); + float c = dot( oc, oc ) - ra * ra; + float h = b * b - c; + + if( h < 0.0 ) { return -1.0; } + + h = sqrt( h ); + + return - b + h; + } + vec3 project() + { + vec3 p = normalize( vWorldPosition ); + vec3 camPos = cameraPosition; + camPos.y -= height; + float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius ); + if( intersection > 0.0 ) { + + vec3 h = vec3( 0.0, - height, 0.0 ); + float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius ); + p = ( camPos + min( intersection, intersection2 ) * p ) / radius; + } else { + p = vec3( 0.0, 1.0, 0.0 ); + } + return p; + } + #include + #include + void main() + { + vec3 projectedWorldPosition = project(); + + #ifdef ENVMAP_TYPE_CUBE + vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb; + #else + vec3 direction = normalize( projectedWorldPosition ); + vec2 uv = equirectUv( direction ); + vec3 outcolor = texture2D( map, uv ).rgb; + #endif + gl_FragColor = vec4( outcolor, 1.0 ); + #include + #include <${jb>=154?`colorspace_fragment`:`encodings_fragment`}> + } + `,l={map:{value:e},height:{value:t?.height||15},radius:{value:t?.radius||100}},u=new Wu(1,16),d=new ns({uniforms:l,fragmentShader:c,vertexShader:` + varying vec3 vWorldPosition; + void main() + { + vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) ); + vWorldPosition = worldPosition.xyz; + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + } + `,side:2});super(u,d)}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}},ux=Object.defineProperty,dx=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fx=(e,t,n)=>(dx(e,typeof t==`symbol`?t:t+``,n),n),px=class{constructor(){fx(this,`_listeners`)}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let n=this._listeners[e];if(n!==void 0){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let t=this._listeners[e.type];if(t!==void 0){e.target=this;let n=t.slice(0);for(let t=0,r=n.length;tt in e?mx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gx=(e,t,n)=>(hx(e,typeof t==`symbol`?t:t+``,n),n),_x=new ua,vx=new mc,yx=Math.cos(70*(Math.PI/180)),bx=(e,t)=>(e%t+t)%t,xx=class extends px{constructor(e,t){super(),gx(this,`object`),gx(this,`domElement`),gx(this,`enabled`,!0),gx(this,`target`,new Z),gx(this,`minDistance`,0),gx(this,`maxDistance`,1/0),gx(this,`minZoom`,0),gx(this,`maxZoom`,1/0),gx(this,`minPolarAngle`,0),gx(this,`maxPolarAngle`,Math.PI),gx(this,`minAzimuthAngle`,-1/0),gx(this,`maxAzimuthAngle`,1/0),gx(this,`enableDamping`,!1),gx(this,`dampingFactor`,.05),gx(this,`enableZoom`,!0),gx(this,`zoomSpeed`,1),gx(this,`enableRotate`,!0),gx(this,`rotateSpeed`,1),gx(this,`enablePan`,!0),gx(this,`panSpeed`,1),gx(this,`screenSpacePanning`,!0),gx(this,`keyPanSpeed`,7),gx(this,`zoomToCursor`,!1),gx(this,`autoRotate`,!1),gx(this,`autoRotateSpeed`,2),gx(this,`reverseOrbit`,!1),gx(this,`reverseHorizontalOrbit`,!1),gx(this,`reverseVerticalOrbit`,!1),gx(this,`keys`,{LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`}),gx(this,`mouseButtons`,{LEFT:vt.ROTATE,MIDDLE:vt.DOLLY,RIGHT:vt.PAN}),gx(this,`touches`,{ONE:yt.ROTATE,TWO:yt.DOLLY_PAN}),gx(this,`target0`),gx(this,`position0`),gx(this,`zoom0`),gx(this,`_domElementKeyEvents`,null),gx(this,`getPolarAngle`),gx(this,`getAzimuthalAngle`),gx(this,`setPolarAngle`),gx(this,`setAzimuthalAngle`),gx(this,`getDistance`),gx(this,`getZoomScale`),gx(this,`listenToKeyEvents`),gx(this,`stopListenToKeyEvents`),gx(this,`saveState`),gx(this,`reset`),gx(this,`update`),gx(this,`connect`),gx(this,`dispose`),gx(this,`dollyIn`),gx(this,`dollyOut`),gx(this,`getScale`),gx(this,`setScale`),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>l.phi,this.getAzimuthalAngle=()=>l.theta,this.setPolarAngle=e=>{let t=bx(e,2*Math.PI),r=l.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i{let t=bx(e,2*Math.PI),r=l.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-in.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener(`keydown`,he),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener(`keydown`,he),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),s=o.NONE},this.update=(()=>{let t=new Z,i=new Z(0,1,0),a=new fi().setFromUnitVectors(e.up,i),p=a.clone().invert(),m=new Z,h=new fi,g=2*Math.PI;return function(){let _=n.object.position;a.setFromUnitVectors(e.up,i),p.copy(a).invert(),t.copy(_).sub(n.target),t.applyQuaternion(a),l.setFromVector3(t),n.autoRotate&&s===o.NONE&&k(D()),n.enableDamping?(l.theta+=u.theta*n.dampingFactor,l.phi+=u.phi*n.dampingFactor):(l.theta+=u.theta,l.phi+=u.phi);let v=n.minAzimuthAngle,y=n.maxAzimuthAngle;isFinite(v)&&isFinite(y)&&(v<-Math.PI?v+=g:v>Math.PI&&(v-=g),y<-Math.PI?y+=g:y>Math.PI&&(y-=g),v<=y?l.theta=Math.max(v,Math.min(y,l.theta)):l.theta=l.theta>(v+y)/2?Math.max(v,l.theta):Math.min(y,l.theta)),l.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,l.phi)),l.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(f,n.dampingFactor):n.target.add(f),n.zoomToCursor&&w||n.object.isOrthographicCamera?l.radius=te(l.radius):l.radius=te(l.radius*d),t.setFromSpherical(l),t.applyQuaternion(p),_.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),n.enableDamping===!0?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,f.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),f.set(0,0,0));let b=!1;if(n.zoomToCursor&&w){let r=null;if(n.object instanceof ss&&n.object.isPerspectiveCamera){let e=t.length();r=te(e*d);let i=e-r;n.object.position.addScaledVector(S,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){let e=new Z(C.x,C.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix(),b=!0;let i=new Z(C.x,C.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),n.zoomToCursor=!1;r!==null&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(_x.origin.copy(n.object.position),_x.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(_x.direction))c||8*(1-h.dot(n.object.quaternion))>c?(n.dispatchEvent(r),m.copy(n.object.position),h.copy(n.object.quaternion),b=!1,!0):!1}})(),this.connect=e=>{n.domElement=e,n.domElement.style.touchAction=`none`,n.domElement.addEventListener(`contextmenu`,ve),n.domElement.addEventListener(`pointerdown`,K),n.domElement.addEventListener(`pointercancel`,de),n.domElement.addEventListener(`wheel`,me)},this.dispose=()=>{var e,t,r,i,a,o;n.domElement&&(n.domElement.style.touchAction=`auto`),(e=n.domElement)==null||e.removeEventListener(`contextmenu`,ve),(t=n.domElement)==null||t.removeEventListener(`pointerdown`,K),(r=n.domElement)==null||r.removeEventListener(`pointercancel`,de),(i=n.domElement)==null||i.removeEventListener(`wheel`,me),(a=n.domElement)==null||a.ownerDocument.removeEventListener(`pointermove`,q),(o=n.domElement)==null||o.ownerDocument.removeEventListener(`pointerup`,de),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener(`keydown`,he)};let n=this,r={type:`change`},i={type:`start`},a={type:`end`},o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},s=o.NONE,c=1e-6,l=new Op,u=new Op,d=1,f=new Z,p=new X,m=new X,h=new X,g=new X,_=new X,v=new X,y=new X,b=new X,x=new X,S=new Z,C=new X,w=!1,T=[],E={};function D(){return 2*Math.PI/60/60*n.autoRotateSpeed}function O(){return .95**n.zoomSpeed}function k(e){n.reverseOrbit||n.reverseHorizontalOrbit?u.theta+=e:u.theta-=e}function A(e){n.reverseOrbit||n.reverseVerticalOrbit?u.phi+=e:u.phi-=e}let j=(()=>{let e=new Z;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),f.add(e)}})(),M=(()=>{let e=new Z;return function(t,r){n.screenSpacePanning===!0?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),f.add(e)}})(),N=(()=>{let e=new Z;return function(t,r){let i=n.domElement;if(i&&n.object instanceof ss&&n.object.isPerspectiveCamera){let a=n.object.position;e.copy(a).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),j(2*t*o/i.clientHeight,n.object.matrix),M(2*r*o/i.clientHeight,n.object.matrix)}else i&&n.object instanceof mf&&n.object.isOrthographicCamera?(j(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),M(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),n.enablePan=!1)}})();function P(e){n.object instanceof ss&&n.object.isPerspectiveCamera||n.object instanceof mf&&n.object.isOrthographicCamera?d=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),n.enableZoom=!1)}function F(e){P(d/e)}function I(e){P(d*e)}function ee(e){if(!n.zoomToCursor||!n.domElement)return;w=!0;let t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;C.x=r/a*2-1,C.y=-(i/o)*2+1,S.set(C.x,C.y,1).unproject(n.object).sub(n.object.position).normalize()}function te(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function L(e){p.set(e.clientX,e.clientY)}function R(e){ee(e),y.set(e.clientX,e.clientY)}function z(e){g.set(e.clientX,e.clientY)}function ne(e){m.set(e.clientX,e.clientY),h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(k(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight)),p.copy(m),n.update()}function B(e){b.set(e.clientX,e.clientY),x.subVectors(b,y),x.y>0?F(O()):x.y<0&&I(O()),y.copy(b),n.update()}function V(e){_.set(e.clientX,e.clientY),v.subVectors(_,g).multiplyScalar(n.panSpeed),N(v.x,v.y),g.copy(_),n.update()}function re(e){ee(e),e.deltaY<0?I(O()):e.deltaY>0&&F(O()),n.update()}function ie(e){let t=!1;switch(e.code){case n.keys.UP:N(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:N(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:N(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:N(-n.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),n.update())}function ae(){if(T.length==1)p.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);p.set(e,t)}}function oe(){if(T.length==1)g.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);g.set(e,t)}}function se(){let e=T[0].pageX-T[1].pageX,t=T[0].pageY-T[1].pageY,n=Math.sqrt(e*e+t*t);y.set(0,n)}function H(){n.enableZoom&&se(),n.enablePan&&oe()}function ce(){n.enableZoom&&se(),n.enableRotate&&ae()}function U(e){if(T.length==1)m.set(e.pageX,e.pageY);else{let t=Se(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(k(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight)),p.copy(m)}function le(e){if(T.length==1)_.set(e.pageX,e.pageY);else{let t=Se(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);_.set(n,r)}v.subVectors(_,g).multiplyScalar(n.panSpeed),N(v.x,v.y),g.copy(_)}function W(e){let t=Se(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);b.set(0,a),x.set(0,(b.y/y.y)**+n.zoomSpeed),F(x.y),y.copy(b)}function ue(e){n.enableZoom&&W(e),n.enablePan&&le(e)}function G(e){n.enableZoom&&W(e),n.enableRotate&&U(e)}function K(e){var t,r;n.enabled!==!1&&(T.length===0&&((t=n.domElement)==null||t.ownerDocument.addEventListener(`pointermove`,q),(r=n.domElement)==null||r.ownerDocument.addEventListener(`pointerup`,de)),ye(e),e.pointerType===`touch`?ge(e):fe(e))}function q(e){n.enabled!==!1&&(e.pointerType===`touch`?_e(e):pe(e))}function de(e){var t,r,i;be(e),T.length===0&&((t=n.domElement)==null||t.releasePointerCapture(e.pointerId),(r=n.domElement)==null||r.ownerDocument.removeEventListener(`pointermove`,q),(i=n.domElement)==null||i.ownerDocument.removeEventListener(`pointerup`,de)),n.dispatchEvent(a),s=o.NONE}function fe(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case vt.DOLLY:if(n.enableZoom===!1)return;R(e),s=o.DOLLY;break;case vt.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enablePan===!1)return;z(e),s=o.PAN}else{if(n.enableRotate===!1)return;L(e),s=o.ROTATE}break;case vt.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enableRotate===!1)return;L(e),s=o.ROTATE}else{if(n.enablePan===!1)return;z(e),s=o.PAN}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function pe(e){if(n.enabled!==!1)switch(s){case o.ROTATE:if(n.enableRotate===!1)return;ne(e);break;case o.DOLLY:if(n.enableZoom===!1)return;B(e);break;case o.PAN:if(n.enablePan===!1)return;V(e);break}}function me(e){n.enabled===!1||n.enableZoom===!1||s!==o.NONE&&s!==o.ROTATE||(e.preventDefault(),n.dispatchEvent(i),re(e),n.dispatchEvent(a))}function he(e){n.enabled===!1||n.enablePan===!1||ie(e)}function ge(e){switch(xe(e),T.length){case 1:switch(n.touches.ONE){case yt.ROTATE:if(n.enableRotate===!1)return;ae(),s=o.TOUCH_ROTATE;break;case yt.PAN:if(n.enablePan===!1)return;oe(),s=o.TOUCH_PAN;break;default:s=o.NONE}break;case 2:switch(n.touches.TWO){case yt.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;H(),s=o.TOUCH_DOLLY_PAN;break;case yt.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;ce(),s=o.TOUCH_DOLLY_ROTATE;break;default:s=o.NONE}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function _e(e){switch(xe(e),s){case o.TOUCH_ROTATE:if(n.enableRotate===!1)return;U(e),n.update();break;case o.TOUCH_PAN:if(n.enablePan===!1)return;le(e),n.update();break;case o.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;ue(e),n.update();break;case o.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;G(e),n.update();break;default:s=o.NONE}}function ve(e){n.enabled!==!1&&e.preventDefault()}function ye(e){T.push(e)}function be(e){delete E[e.pointerId];for(let t=0;t{I(e),n.update()},this.dollyOut=(e=O())=>{F(e),n.update()},this.getScale=()=>d,this.setScale=e=>{P(e),n.update()},this.getZoomScale=()=>O(),t!==void 0&&this.connect(t),this.update()}},Sx=class extends Qd{constructor(e){super(e),this.type=Ht}parse(e){let t=function(e,t){switch(e){case 1:throw Error(`THREE.RGBELoader: Read Error: `+(t||``));case 2:throw Error(`THREE.RGBELoader: Write Error: `+(t||``));case 3:throw Error(`THREE.RGBELoader: Bad File Format: `+(t||``));default:case 4:throw Error(`THREE.RGBELoader: Memory Error: `+(t||``))}},n=function(e,t,n){t||=1024;let r=e.pos,i=-1,a=0,o=``,s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(i=s.indexOf(` +`))&&a=e.byteLength||!(l=n(e)))&&t(1,`no header found`),(u=l.match(r))||t(3,`bad initial token`),c.valid|=1,c.programtype=u[1],c.string+=l+` +`;l=n(e),!1!==l;){if(c.string+=l+` +`,l.charAt(0)===`#`){c.comments+=l+` +`;continue}if((u=l.match(i))&&(c.gamma=parseFloat(u[1])),(u=l.match(a))&&(c.exposure=parseFloat(u[1])),(u=l.match(o))&&(c.valid|=2,c.format=u[1]),(u=l.match(s))&&(c.valid|=4,c.height=parseInt(u[1],10),c.width=parseInt(u[2],10)),c.valid&2&&c.valid&4)break}return c.valid&2||t(3,`missing format specifier`),c.valid&4||t(3,`missing image size specifier`),c},i=function(e,n,r){let i=n;if(i<8||i>32767||e[0]!==2||e[1]!==2||e[2]&128)return new Uint8Array(e);i!==(e[2]<<8|e[3])&&t(3,`wrong scanline width`);let a=new Uint8Array(4*n*r);a.length||t(4,`unable to allocate buffer space`);let o=0,s=0,c=4*i,l=new Uint8Array(4),u=new Uint8Array(c),d=r;for(;d>0&&se.byteLength&&t(1),l[0]=e[s++],l[1]=e[s++],l[2]=e[s++],l[3]=e[s++],(l[0]!=2||l[1]!=2||(l[2]<<8|l[3])!=i)&&t(3,`bad rgbe scanline format`);let n=0,r;for(;n128;if(i&&(r-=128),(r===0||n+r>c)&&t(3,`bad scanline data`),i){let t=e[s++];for(let e=0;e=152,wx=class extends Qd{constructor(e){super(e),this.type=Ht}parse(e){let t=65536,n=t>>3,r=65537,i=16384,a=i-1,o=65535,s=2.7182818**2.2;function c(e,n){for(var r=0,i=0;i>3]&1<<(i&7))&&(n[r++]=i);for(var a=r-1;r>n&(1<0;--t){var i=n+f[t]>>1;f[t]=n,n=i}for(var t=0;t0&&(e[t]=a|f[a]++<<6)}}function m(e,t,n,r,i,a,o){for(var s=n,c=0,l=0;i<=a;i++){if(s.value-n.value>r)return!1;d(6,c,l,e,s);var f=u.l;if(c=u.c,l=u.lc,o[i]=f,f==63){if(s.value-n.value>r)throw`Something wrong with hufUnpackEncTable`;d(8,c,l,e,s);var m=u.l+6;if(c=u.c,l=u.lc,i+m>a+1)throw`Something wrong with hufUnpackEncTable`;for(;m--;)o[i++]=0;i--}else if(f>=59){var m=f-59+2;if(i+m>a+1)throw`Something wrong with hufUnpackEncTable`;for(;m--;)o[i++]=0;i--}}p(o)}function h(e){return e&63}function g(e){return e>>6}function _(e,t,n,r){for(;t<=n;t++){var i=g(e[t]),a=h(e[t]);if(i>>a)throw`Invalid table entry`;if(a>14){var o=r[i>>a-14];if(o.len)throw`Invalid table entry`;if(o.lit++,o.p){var s=o.p;o.p=Array(o.lit);for(var c=0;c0;c--){var o=r[(i<<14-a)+l];if(o.len||o.p)throw`Invalid table entry`;o.len=a,o.lit=t,l++}}return!0}let v={c:0,lc:0};function y(e,t,n,r){e=e<<8|le(n,r),t+=8,v.c=e,v.lc=t}let b={c:0,lc:0};function x(e,t,n,r,i,a,o,s,c,l){if(e==t){r<8&&(y(n,r,i,o),n=v.c,r=v.lc),r-=8;var u=n>>r,u=new Uint8Array([u])[0];if(c.value+u>l)return!1;for(var d=s[c.value-1];u-- >0;)s[c.value++]=d}else if(c.value32767?t-65536:t}let w={a:0,b:0};function T(e,t){var n=C(e),r=C(t),i=n+(r&1)+(r>>1),a=i,o=i-r;w.a=a,w.b=o}function E(e,t){var n=S(e),r=S(t),i=n-(r>>1)&o;w.a=r+i-32768&o,w.b=i}function D(e,t,n,r,i,a,o){for(var s=o<16384,c=n>i?i:n,l=1,u;l<=c;)l<<=1;for(l>>=1,u=l,l>>=1;l>=1;){for(var d=0,f=d+a*(i-u),p=a*l,m=a*u,h=r*l,g=r*u,_,v,y,b;d<=f;d+=m){for(var x=d,S=d+r*(n-u);x<=S;x+=g){var C=x+h,D=x+p,O=D+h;s?(T(e[x+t],e[D+t]),_=w.a,y=w.b,T(e[C+t],e[O+t]),v=w.a,b=w.b,T(_,v),e[x+t]=w.a,e[C+t]=w.b,T(y,b),e[D+t]=w.a,e[O+t]=w.b):(E(e[x+t],e[D+t]),_=w.a,y=w.b,E(e[C+t],e[O+t]),v=w.a,b=w.b,E(_,v),e[x+t]=w.a,e[C+t]=w.b,E(y,b),e[D+t]=w.a,e[O+t]=w.b)}if(n&l){var D=x+p;s?T(e[x+t],e[D+t]):E(e[x+t],e[D+t]),_=w.a,e[D+t]=w.b,e[x+t]=_}}if(i&l)for(var x=d,S=d+r*(n-u);x<=S;x+=g){var C=x+h;s?T(e[x+t],e[C+t]):E(e[x+t],e[C+t]),_=w.a,e[C+t]=w.b,e[x+t]=_}u=l,l>>=1}return d}function O(e,t,n,r,i,o,s,c,l,u){for(var d=0,f=0,p=c,m=Math.trunc(i.value+(o+7)/8);i.value=14;){var _=t[d>>f-14&a];if(_.len)f-=_.len,x(_.lit,s,d,f,n,r,i,l,u,p),d=b.c,f=b.lc;else{if(!_.p)throw`hufDecode issues`;var S;for(S=0;S<_.lit;S++){for(var C=h(e[_.p[S]]);f=C&&g(e[_.p[S]])==(d>>f-C&(1<>=w,f-=w;f>0;){var _=t[d<<14-f&a];if(_.len)f-=_.len,x(_.lit,s,d,f,n,r,i,l,u,p),d=b.c,f=b.lc;else throw`hufDecode issues`}return!0}function k(e,t,n,a,o,s){var c={value:0},u=n.value,d=U(t,n),f=U(t,n);n.value+=4;var p=U(t,n);if(n.value+=4,d<0||d>=r||f<0||f>=r)throw`Something wrong with HUF_ENCSIZE`;var h=Array(r),g=Array(i);if(l(g),m(e,t,n,a-(n.value-u),d,f,h),p>8*(a-(n.value-u)))throw`Something wrong with hufUncompress`;_(h,d,f,g),O(h,g,e,t,n,p,f,s,o,c)}function A(e,t,n){for(var r=0;ra||(t[i++]=e[n++],i>a));)t[i++]=e[r++]}function N(e){for(var t=e.byteLength,n=[],r=0,i=new DataView(e);t>0;){var a=i.getInt8(r++);if(a<0){var o=-a;t-=o+1;for(var s=0;s>8==255?i+=r&255:(n[i]=r,i++),e.value++}function I(e,t){t[0]=q(e[0]),t[1]=q(e[1]),t[2]=q(e[5]),t[3]=q(e[6]),t[4]=q(e[14]),t[5]=q(e[15]),t[6]=q(e[27]),t[7]=q(e[28]),t[8]=q(e[2]),t[9]=q(e[4]),t[10]=q(e[7]),t[11]=q(e[13]),t[12]=q(e[16]),t[13]=q(e[26]),t[14]=q(e[29]),t[15]=q(e[42]),t[16]=q(e[3]),t[17]=q(e[8]),t[18]=q(e[12]),t[19]=q(e[17]),t[20]=q(e[25]),t[21]=q(e[30]),t[22]=q(e[41]),t[23]=q(e[43]),t[24]=q(e[9]),t[25]=q(e[11]),t[26]=q(e[18]),t[27]=q(e[24]),t[28]=q(e[31]),t[29]=q(e[40]),t[30]=q(e[44]),t[31]=q(e[53]),t[32]=q(e[10]),t[33]=q(e[19]),t[34]=q(e[23]),t[35]=q(e[32]),t[36]=q(e[39]),t[37]=q(e[45]),t[38]=q(e[52]),t[39]=q(e[54]),t[40]=q(e[20]),t[41]=q(e[22]),t[42]=q(e[33]),t[43]=q(e[38]),t[44]=q(e[46]),t[45]=q(e[51]),t[46]=q(e[55]),t[47]=q(e[60]),t[48]=q(e[21]),t[49]=q(e[34]),t[50]=q(e[37]),t[51]=q(e[47]),t[52]=q(e[50]),t[53]=q(e[56]),t[54]=q(e[59]),t[55]=q(e[61]),t[56]=q(e[35]),t[57]=q(e[36]),t[58]=q(e[48]),t[59]=q(e[49]),t[60]=q(e[57]),t[61]=q(e[58]),t[62]=q(e[62]),t[63]=q(e[63])}function ee(e){let t=.5*Math.cos(3.14159/4),n=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),i=.5*Math.cos(3*3.14159/16),a=.5*Math.cos(5*3.14159/16),o=.5*Math.cos(3*3.14159/8),s=.5*Math.cos(7*3.14159/16);for(var c=[,,,,],l=[,,,,],u=[,,,,],d=[,,,,],f=0;f<8;++f){var p=f*8;c[0]=r*e[p+2],c[1]=o*e[p+2],c[2]=r*e[p+6],c[3]=o*e[p+6],l[0]=n*e[p+1]+i*e[p+3]+a*e[p+5]+s*e[p+7],l[1]=i*e[p+1]-s*e[p+3]-n*e[p+5]-a*e[p+7],l[2]=a*e[p+1]-n*e[p+3]+s*e[p+5]+i*e[p+7],l[3]=s*e[p+1]-a*e[p+3]+i*e[p+5]-n*e[p+7],u[0]=t*(e[p+0]+e[p+4]),u[3]=t*(e[p+0]-e[p+4]),u[1]=c[0]+c[3],u[2]=c[1]-c[2],d[0]=u[0]+u[1],d[1]=u[3]+u[2],d[2]=u[3]-u[2],d[3]=u[0]-u[1],e[p+0]=d[0]+l[0],e[p+1]=d[1]+l[1],e[p+2]=d[2]+l[2],e[p+3]=d[3]+l[3],e[p+4]=d[3]-l[3],e[p+5]=d[2]-l[2],e[p+6]=d[1]-l[1],e[p+7]=d[0]-l[0]}for(var m=0;m<8;++m)c[0]=r*e[16+m],c[1]=o*e[16+m],c[2]=r*e[48+m],c[3]=o*e[48+m],l[0]=n*e[8+m]+i*e[24+m]+a*e[40+m]+s*e[56+m],l[1]=i*e[8+m]-s*e[24+m]-n*e[40+m]-a*e[56+m],l[2]=a*e[8+m]-n*e[24+m]+s*e[40+m]+i*e[56+m],l[3]=s*e[8+m]-a*e[24+m]+i*e[40+m]-n*e[56+m],u[0]=t*(e[m]+e[32+m]),u[3]=t*(e[m]-e[32+m]),u[1]=c[0]+c[3],u[2]=c[1]-c[2],d[0]=u[0]+u[1],d[1]=u[3]+u[2],d[2]=u[3]-u[2],d[3]=u[0]-u[1],e[0+m]=d[0]+l[0],e[8+m]=d[1]+l[1],e[16+m]=d[2]+l[2],e[24+m]=d[3]+l[3],e[32+m]=d[3]-l[3],e[40+m]=d[2]-l[2],e[48+m]=d[1]-l[1],e[56+m]=d[0]-l[0]}function te(e){for(var t=0;t<64;++t){var n=e[0][t],r=e[1][t],i=e[2][t];e[0][t]=n+1.5747*i,e[1][t]=n-.1873*r-.4682*i,e[2][t]=n+1.8556*r}}function L(e,t,n){for(var r=0;r<64;++r)t[n+r]=fo.toHalfFloat(R(e[r]))}function R(e){return e<=1?Math.sign(e)*Math.abs(e)**2.2:Math.sign(e)*s**(Math.abs(e)-1)}function z(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function ne(e){var t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(N(t)),r=new Uint8Array(n.length);return j(n),M(n,r),new DataView(r.buffer)}function B(e){var t=ox(e.array.slice(e.offset.value,e.offset.value+e.size)),n=new Uint8Array(t.length);return j(t),M(t,n),new DataView(n.buffer)}function V(e){for(var r=e.viewer,i={value:e.offset.value},a=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),o=new Uint8Array(n),s=0,l=Array(e.channels),u=0;u=n)throw`Something is wrong with PIZ_COMPRESSION BITMAP_SIZE`;if(d<=f)for(var u=0;u0;){var s=ae(t.buffer,n),c=W(t,n),l=c>>2&3,u=(c>>4)-1,d=new Int8Array([u])[0],f=W(t,n);a.push({name:s,index:d,type:f,compression:l}),o-=s.length+3}for(var p=Te.channels,m=Array(e.channels),h=0;h=0&&(v.idx[b.index]=y),g.offset=y)}if(i.acCompressedSize>0)switch(i.acCompression){case 0:var x=new Uint16Array(i.totalAcUncompressedCount);k(e.array,t,n,i.acCompressedSize,x,i.totalAcUncompressedCount);break;case 1:var S=e.array.slice(n.value,n.value+i.totalAcUncompressedCount),C=ox(S),x=new Uint16Array(C.buffer);n.value+=i.totalAcUncompressedCount;break}if(i.dcCompressedSize>0){var w={array:e.array,offset:n,size:i.dcCompressedSize},T=new Uint16Array(B(w).buffer);n.value+=i.dcCompressedSize}if(i.rleRawSize>0){var S=e.array.slice(n.value,n.value+i.rleCompressedSize),C=ox(S),E=N(C.buffer);n.value+=i.rleCompressedSize}for(var D=0,O=Array(m.length),h=0;h>10,n=e&1023;return(e>>15?-1:1)*(t?t===31?n?NaN:1/0:2**(t-15)*(1+n/1024):6103515625e-14*(n/1024))}function de(e,t){var n=e.getUint16(t.value,!0);return t.value+=2,n}function fe(e,t){return q(de(e,t))}function pe(e,t,n,r){for(var i=n.value,a=[];n.valueEe.height?Ee.height-t:Ee.scanlineBlockSize;let n=Ee.size=Ee.height)break;for(let e=0;ee===Object(e)&&!Array.isArray(e)&&typeof e!=`function`;function Ex(e,t){let n=Hv(e=>e.gl),r=qv($d,Tx(e)?Object.values(e):e);return(0,G.useLayoutEffect)(()=>{t?.(r)},[t]),(0,G.useEffect)(()=>{if(`initTexture`in n){let e=[];Array.isArray(r)?e=r:r instanceof Ai?e=[r]:Tx(r)&&(e=Object.values(r)),e.forEach(e=>{e instanceof Ai&&n.initTexture(e)})}},[n,r]),(0,G.useMemo)(()=>{if(Tx(e)){let t={},n=0;for(let i in e)t[i]=r[n++];return t}else return r},[e,r])}Ex.preload=e=>qv.preload($d,e),Ex.clear=e=>qv.clear($d,e);var Dx=(()=>parseInt(`181`.replace(/\D+/g,``)))(),Ox=G.forwardRef(({makeDefault:e,camera:t,regress:n,domElement:r,enableDamping:i=!0,keyEvents:a=!1,onChange:o,onStart:s,onEnd:c,...l},u)=>{let d=Hv(e=>e.invalidate),f=Hv(e=>e.camera),p=Hv(e=>e.gl),m=Hv(e=>e.events),h=Hv(e=>e.setEvents),g=Hv(e=>e.set),_=Hv(e=>e.get),v=Hv(e=>e.performance),y=t||f,b=r||m.connected||p.domElement,x=G.useMemo(()=>new xx(y),[y]);return Uv(()=>{x.enabled&&x.update()},-1),G.useEffect(()=>(a&&x.connect(a===!0?b:a),x.connect(b),()=>void x.dispose()),[a,b,n,x,d]),G.useEffect(()=>{let e=e=>{d(),n&&v.regress(),o&&o(e)},t=e=>{s&&s(e)},r=e=>{c&&c(e)};return x.addEventListener(`change`,e),x.addEventListener(`start`,t),x.addEventListener(`end`,r),()=>{x.removeEventListener(`start`,t),x.removeEventListener(`end`,r),x.removeEventListener(`change`,e)}},[o,s,c,x,d,h]),G.useEffect(()=>{if(e){let e=_().controls;return g({controls:x}),()=>g({controls:e})}},[e,x]),G.createElement(`primitive`,mb({ref:u,object:x,enableDamping:i},l))}),kx=(e,t,n)=>{let r;switch(e){case Ft:r=new Uint8ClampedArray(t*n*4);break;case Ht:r=new Uint16Array(t*n*4);break;case Bt:r=new Uint32Array(t*n*4);break;case It:r=new Int8Array(t*n*4);break;case Lt:r=new Int16Array(t*n*4);break;case zt:r=new Int32Array(t*n*4);break;case Vt:r=new Float32Array(t*n*4);break;default:throw Error(`Unsupported data type`)}return r},Ax,jx=(e,t,n,r)=>{if(Ax!==void 0)return Ax;let i=new Ni(1,1,r);t.setRenderTarget(i);let a=new Go(new qu,new oo({color:16777215}));t.render(a,n),t.setRenderTarget(null);let o=kx(e,i.width,i.height);return t.readRenderTargetPixels(i,0,0,i.width,i.height,o),i.dispose(),a.geometry.dispose(),a.material.dispose(),Ax=o[0]!==0,Ax},Mx=class e{_renderer;_rendererIsDisposable=!1;_material;_scene;_camera;_quad;_renderTarget;_width;_height;_type;_colorSpace;_supportsReadPixels=!0;constructor(t){this._width=t.width,this._height=t.height,this._type=t.type,this._colorSpace=t.colorSpace;let n={format:Xt,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:t.renderTargetOptions?.anisotropy===void 0?1:t.renderTargetOptions?.anisotropy,generateMipmaps:t.renderTargetOptions?.generateMipmaps===void 0?!1:t.renderTargetOptions?.generateMipmaps,magFilter:t.renderTargetOptions?.magFilter===void 0?At:t.renderTargetOptions?.magFilter,minFilter:t.renderTargetOptions?.minFilter===void 0?At:t.renderTargetOptions?.minFilter,samples:t.renderTargetOptions?.samples===void 0?void 0:t.renderTargetOptions?.samples,wrapS:t.renderTargetOptions?.wrapS===void 0?Ct:t.renderTargetOptions?.wrapS,wrapT:t.renderTargetOptions?.wrapT===void 0?Ct:t.renderTargetOptions?.wrapT};if(this._material=t.material,t.renderer?this._renderer=t.renderer:(this._renderer=e.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new vs,this._camera=new mf,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!jx(this._type,this._renderer,this._camera,n)){let e;switch(this._type){case Ht:e=this._renderer.extensions.has(`EXT_color_buffer_float`)?Vt:void 0;break}e===void 0?(this._supportsReadPixels=!1,console.warn(`This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown`)):(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${Vt}`),this._type=e)}this._quad=new Go(new qu,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new Ni(this.width,this.height,n),this._renderTarget.texture.mapping=t.renderTargetOptions?.mapping===void 0?300:t.renderTargetOptions?.mapping}static instantiateRenderer(){let e=new j_;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(e){throw this._renderer.setRenderTarget(null),e}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw Error(`Can't read pixels in this browser`);let e=kx(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){let t=new Qs(this.toArray(),this.width,this.height,Xt,this._type,e?.mapping||300,e?.wrapS||1001,e?.wrapT||1001,e?.magFilter||1006,e?.minFilter||1006,e?.anisotropy||1,er);return t.generateMipmaps=e?.generateMipmaps===void 0?!1:e?.generateMipmaps,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof ns&&Object.values(this.material.uniforms).forEach(e=>{e.value instanceof Ai&&e.value.dispose()}),Object.values(this.material).forEach(e=>{e instanceof Ai&&e.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}},Nx=class extends Error{},Px=class extends Error{},Fx=(e,t,n)=>{let r=RegExp(`${t}="([^"]*)"`,`i`).exec(e);if(r)return r[1];let i=RegExp(`<${t}[^>]*>([\\s\\S]*?)`,`i`).exec(e);if(i){let e=i[1].match(/([^<]*)<\/rdf:li>/g);return e&&e.length===3?e.map(e=>e.replace(/<\/?rdf:li>/g,``)):i[1].trim()}if(n!==void 0)return n;throw Error(`Can't find ${t} in gainmap metadata`)},Ix=e=>{let t;t=typeof TextDecoder<`u`?new TextDecoder().decode(e):e.toString();let n=t.indexOf(``,n),r=t.slice(n,e+10);try{let e=Fx(r,`hdrgm:GainMapMin`,`0`),t=Fx(r,`hdrgm:GainMapMax`),n=Fx(r,`hdrgm:Gamma`,`1`),i=Fx(r,`hdrgm:OffsetSDR`,`0.015625`),a=Fx(r,`hdrgm:OffsetHDR`,`0.015625`),o=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(r),s=o?o[1]:`0`,c=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(r);if(!c)throw Error(`Incomplete gainmap metadata`);let l=c[1];return{gainMapMin:Array.isArray(e)?e.map(e=>parseFloat(e)):[parseFloat(e),parseFloat(e),parseFloat(e)],gainMapMax:Array.isArray(t)?t.map(e=>parseFloat(e)):[parseFloat(t),parseFloat(t),parseFloat(t)],gamma:Array.isArray(n)?n.map(e=>parseFloat(e)):[parseFloat(n),parseFloat(n),parseFloat(n)],offsetSdr:Array.isArray(i)?i.map(e=>parseFloat(e)):[parseFloat(i),parseFloat(i),parseFloat(i)],offsetHdr:Array.isArray(a)?a.map(e=>parseFloat(e)):[parseFloat(a),parseFloat(a),parseFloat(a)],hdrCapacityMin:parseFloat(s),hdrCapacityMax:parseFloat(l)}}catch{}n=t.indexOf(`{let r=this.options.debug,i=new DataView(e.buffer);if(i.getUint16(0)!==65496){n(Error(`Not a valid jpeg`));return}let a=i.byteLength,o=2,s=0,c;for(;o250){n(Error(`Found no marker after ${s} loops 😵`));return}if(i.getUint8(o)!==255){n(Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${i.getUint8(o).toString(16)}`));return}if(c=i.getUint8(o+1),r&&console.log(`Marker: ${c.toString(16)}`),c===226){r&&console.log(`Found APP2 marker (0xffe2)`);let e=o+4;if(i.getUint32(e)===1297106432){let r=e+4,a;if(i.getUint16(r)===18761)a=!1;else if(i.getUint16(r)===19789)a=!0;else{n(Error(`No valid endianness marker found in TIFF header`));return}if(i.getUint16(r+2,!a)!==42){n(Error(`Not valid TIFF data! (no 0x002A marker)`));return}let o=i.getUint32(r+4,!a);if(o<8){n(Error(`Not valid TIFF data! (First offset less than 8)`));return}let s=r+o,c=i.getUint16(s,!a),l=s+2,u=0;for(let e=l;e{let t=Ix(e);if(!t)throw new Px(`Gain map XMP metadata not found`);let n=await new Lx({extractFII:!0,extractNonFII:!0}).extract(e);if(n.length!==2)throw new Nx(`Gain map recovery image not found`);return{sdr:new Uint8Array(await n[0].arrayBuffer()),gainMap:new Uint8Array(await n[1].arrayBuffer()),metadata:t}},zx=e=>new Promise((t,n)=>{let r=document.createElement(`img`);r.onload=()=>{t(r)},r.onerror=e=>{n(e)},r.src=URL.createObjectURL(e)}),Bx=class extends Ud{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new Vd}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn(`WARNING: A Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.`);let e=this._config.createMaterial({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new Ai,sdr:new Ai});return this._config.createQuadRenderer({width:16,height:16,type:Ht,colorSpace:er,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,n){let r=t?new Blob([t],{type:`image/jpeg`}):void 0,i=new Blob([e],{type:`image/jpeg`}),a,o,s=!1;if(typeof createImageBitmap>`u`){let e=await Promise.all([r?zx(r):Promise.resolve(void 0),zx(i)]);o=e[0],a=e[1],s=n===`flipY`}else{let e=await Promise.all([r?createImageBitmap(r,{imageOrientation:n||`flipY`}):Promise.resolve(void 0),createImageBitmap(i,{imageOrientation:n||`flipY`})]);o=e[0],a=e[1]}return{sdrImage:a,gainMapImage:o,needsFlip:s}}createTextures(e,t,n){let r=new Ai(t||new ImageData(2,2),300,Ct,Ct,At,Pt,Xt,Ft,1,er);r.flipY=n,r.needsUpdate=!0;let i=new Ai(e,300,Ct,Ct,At,Pt,Xt,Ft,1,$n);return i.flipY=n,i.needsUpdate=!0,{gainMap:r,sdr:i}}updateQuadRenderer(e,t,n,r,i){e.width=t.width,e.height=t.height,e.material.gainMap=n,e.material.sdr=r,e.material.gainMapMin=i.gainMapMin,e.material.gainMapMax=i.gainMapMax,e.material.offsetHdr=i.offsetHdr,e.material.offsetSdr=i.offsetSdr,e.material.gamma=i.gamma,e.material.hdrCapacityMin=i.hdrCapacityMin,e.material.hdrCapacityMax=i.hdrCapacityMax,e.material.maxDisplayBoost=2**i.hdrCapacityMax,e.material.needsUpdate=!0}},Vx=` +varying vec2 vUv; + +void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,Hx=` +// min half float value +#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 ) +// max half float value +#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 ) + +uniform sampler2D sdr; +uniform sampler2D gainMap; +uniform vec3 gamma; +uniform vec3 offsetHdr; +uniform vec3 offsetSdr; +uniform vec3 gainMapMin; +uniform vec3 gainMapMax; +uniform float weightFactor; + +varying vec2 vUv; + +void main() { + vec3 rgb = texture2D( sdr, vUv ).rgb; + vec3 recovery = texture2D( gainMap, vUv ).rgb; + vec3 logRecovery = pow( recovery, gamma ); + vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery; + vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr; + vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor )); + gl_FragColor = vec4( clampedHdrColor , 1.0 ); +} +`,Ux=class extends ns{_maxDisplayBoost;_hdrCapacityMin;_hdrCapacityMax;constructor({gamma:e,offsetHdr:t,offsetSdr:n,gainMapMin:r,gainMapMax:i,maxDisplayBoost:a,hdrCapacityMin:o,hdrCapacityMax:s,sdr:c,gainMap:l}){super({name:`GainMapDecoderMaterial`,vertexShader:Vx,fragmentShader:Hx,uniforms:{sdr:{value:c},gainMap:{value:l},gamma:{value:new Z(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new Z().fromArray(t)},offsetSdr:{value:new Z().fromArray(n)},gainMapMin:{value:new Z().fromArray(r)},gainMapMax:{value:new Z().fromArray(i)},weightFactor:{value:(Math.log2(a)-o)/(s-o)}},blending:0,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=a,this._hdrCapacityMin=o,this._hdrCapacityMax=s,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){let e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){let t=this.uniforms.gamma.value;t.x=1/e[0],t.y=1/e[1],t.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){let e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}},Wx=class extends Bx{constructor(e,t){super({renderer:e,createMaterial:e=>new Ux(e),createQuadRenderer:e=>new Mx(e)},t)}async render(e,t,n,r){let{sdrImage:i,gainMapImage:a,needsFlip:o}=await this.processImages(n,r,`flipY`),{gainMap:s,sdr:c}=this.createTextures(i,a,o);this.updateQuadRenderer(e,i,s,c,t),e.render()}},Gx=class extends Wx{load([e,t,n],r,i,a){let o=this.prepareQuadRenderer(),s,c,l,u=async()=>{if(s&&c&&l){try{await this.render(o,l,s,c)}catch(r){this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(n),typeof a==`function`&&a(r),o.disposeOnDemandRenderer();return}typeof r==`function`&&r(o),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(n),o.disposeOnDemandRenderer()}},d=!0,f=0,p=0,m=!0,h=0,g=0,_=!0,v=0,y=0,b=()=>{if(typeof i==`function`){let e=f+h+v,t=p+g+y,n=d&&m&&_;i(new ProgressEvent(`progress`,{lengthComputable:n,loaded:t,total:e}))}};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(n);let x=new Kd(this._internalLoadingManager);x.setResponseType(`arraybuffer`),x.setRequestHeader(this.requestHeader),x.setPath(this.path),x.setWithCredentials(this.withCredentials),x.load(e,async e=>{if(typeof e==`string`)throw Error(`Invalid sdr buffer`);s=e,await u()},e=>{d=e.lengthComputable,p=e.loaded,f=e.total,b()},t=>{this.manager.itemError(e),typeof a==`function`&&a(t)});let S=new Kd(this._internalLoadingManager);S.setResponseType(`arraybuffer`),S.setRequestHeader(this.requestHeader),S.setPath(this.path),S.setWithCredentials(this.withCredentials),S.load(t,async e=>{if(typeof e==`string`)throw Error(`Invalid gainmap buffer`);c=e,await u()},e=>{m=e.lengthComputable,g=e.loaded,h=e.total,b()},e=>{this.manager.itemError(t),typeof a==`function`&&a(e)});let C=new Kd(this._internalLoadingManager);return C.setRequestHeader(this.requestHeader),C.setPath(this.path),C.setWithCredentials(this.withCredentials),C.load(n,async e=>{if(typeof e!=`string`)throw Error(`Invalid metadata string`);l=JSON.parse(e),await u()},e=>{_=e.lengthComputable,y=e.loaded,v=e.total,b()},e=>{this.manager.itemError(n),typeof a==`function`&&a(e)}),o}},Kx=class extends Wx{load(e,t,n,r){let i=this.prepareQuadRenderer(),a=new Kd(this._internalLoadingManager);return a.setResponseType(`arraybuffer`),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(this.withCredentials),this.manager.itemStart(e),a.load(e,async n=>{if(typeof n==`string`)throw Error(`Invalid buffer, received [string], was expecting [ArrayBuffer]`);let a=new Uint8Array(n),o,s,c;try{let e=await Rx(a);o=e.sdr,s=e.gainMap,c=e.metadata}catch(t){if(t instanceof Px||t instanceof Nx)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),c={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},o=a;else throw t}try{await this.render(i,c,o.buffer,s?.buffer)}catch(t){this.manager.itemError(e),typeof r==`function`&&r(t),i.disposeOnDemandRenderer();return}typeof t==`function`&&t(i),this.manager.itemEnd(e),i.disposeOnDemandRenderer()},n,t=>{this.manager.itemError(e),typeof r==`function`&&r(t)}),i}},qx={apartment:`lebombo_1k.hdr`,city:`potsdamer_platz_1k.hdr`,dawn:`kiara_1_dawn_1k.hdr`,forest:`forest_slope_1k.hdr`,lobby:`st_fagans_interior_1k.hdr`,night:`dikhololo_night_1k.hdr`,park:`rooitou_park_1k.hdr`,studio:`studio_small_03_1k.hdr`,sunset:`venice_sunset_1k.hdr`,warehouse:`empty_warehouse_01_1k.hdr`},Jx=`https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/`,Yx=e=>Array.isArray(e),Xx=[`/px.png`,`/nx.png`,`/py.png`,`/ny.png`,`/pz.png`,`/nz.png`];function Zx({files:e=Xx,path:t=``,preset:n=void 0,colorSpace:r=void 0,extensions:i}={}){n&&(eS(n),e=qx[n],t=Jx);let a=Yx(e),{extension:o,isCubemap:s}=tS(e),c=nS(o);if(!c)throw Error(`useEnvironment: Unrecognized file extension: `+e);let l=Hv(e=>e.gl);(0,G.useLayoutEffect)(()=>{if(o!==`webp`&&o!==`jpg`&&o!==`jpeg`)return;function t(){qv.clear(c,a?[e]:e)}l.domElement.addEventListener(`webglcontextlost`,t,{once:!0})},[e,l.domElement]);let u=qv(c,a?[e]:e,e=>{(o===`webp`||o===`jpg`||o===`jpeg`)&&e.setRenderer(l),e.setPath==null||e.setPath(t),i&&i(e)}),d=a?u[0]:u;return(o===`jpg`||o===`jpeg`||o===`webp`)&&(d=d.renderTarget?.texture),d.mapping=s?301:303,d.colorSpace=r??(s?`srgb`:`srgb-linear`),d}var Qx={files:Xx,path:``,preset:void 0,extensions:void 0};Zx.preload=e=>{let t={...Qx,...e},{files:n,path:r=``}=t,{preset:i,extensions:a}=t;i&&(eS(i),n=qx[i],r=Jx);let{extension:o}=tS(n);if(o===`webp`||o===`jpg`||o===`jpeg`)throw Error(`useEnvironment: Preloading gainmaps is not supported`);let s=nS(o);if(!s)throw Error(`useEnvironment: Unrecognized file extension: `+n);qv.preload(s,Yx(n)?[n]:n,e=>{e.setPath==null||e.setPath(r),a&&a(e)})};var $x={files:Xx,preset:void 0};Zx.clear=e=>{let t={...$x,...e},{files:n}=t,{preset:r}=t;r&&(eS(r),n=qx[r]);let{extension:i}=tS(n),a=nS(i);if(!a)throw Error(`useEnvironment: Unrecognized file extension: `+n);qv.clear(a,Yx(n)?[n]:n)};function eS(e){if(!(e in qx))throw Error(`Preset must be one of: `+Object.keys(qx).join(`, `))}function tS(e){var t;let n=Yx(e)&&e.length===6,r=Yx(e)&&e.length===3&&e.some(e=>e.endsWith(`json`)),i=Yx(e)?e[0]:e;return{extension:n?`cube`:r?`webp`:i.startsWith(`data:application/exr`)?`exr`:i.startsWith(`data:application/hdr`)?`hdr`:i.startsWith(`data:image/jpeg`)?`jpg`:(t=i.split(`.`).pop())==null||(t=t.split(`?`))==null||(t=t.shift())==null?void 0:t.toLowerCase(),isCubemap:n,isGainmap:r}}function nS(e){return e===`cube`?Zd:e===`hdr`?Sx:e===`exr`?wx:e===`jpg`||e===`jpeg`?Kx:e===`webp`?Gx:null}var rS=e=>e.current&&e.current.isScene,iS=e=>rS(e)?e.current:e;function aS(e,t,n,r,i={}){var a,o;i={backgroundBlurriness:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...i};let s=iS(t||n),c=s.background,l=s.environment,u={backgroundBlurriness:s.backgroundBlurriness,backgroundIntensity:s.backgroundIntensity,backgroundRotation:((a=s.backgroundRotation)==null||a.clone==null?void 0:a.clone())??[0,0,0],environmentIntensity:s.environmentIntensity,environmentRotation:((o=s.environmentRotation)==null||o.clone==null?void 0:o.clone())??[0,0,0]};return e!==`only`&&(s.environment=r),e&&(s.background=r),Av(s,i),()=>{e!==`only`&&(s.environment=l),e&&(s.background=c),Av(s,u)}}function oS({scene:e,background:t=!1,map:n,...r}){let i=Hv(e=>e.scene);return G.useLayoutEffect(()=>{if(n)return aS(t,e,i,n,r)}),null}function sS({background:e=!1,scene:t,blur:n,backgroundBlurriness:r,backgroundIntensity:i,backgroundRotation:a,environmentIntensity:o,environmentRotation:s,...c}){let l=Zx(c),u=Hv(e=>e.scene);return G.useLayoutEffect(()=>aS(e,t,u,l,{backgroundBlurriness:n??r,backgroundIntensity:i,backgroundRotation:a,environmentIntensity:o,environmentRotation:s})),G.useEffect(()=>()=>{l.dispose()},[l]),null}function cS({children:e,near:t=.1,far:n=1e3,resolution:r=256,frames:i=1,map:a,background:o=!1,blur:s,backgroundBlurriness:c,backgroundIntensity:l,backgroundRotation:u,environmentIntensity:d,environmentRotation:f,scene:p,files:m,path:h,preset:g=void 0,extensions:_}){let v=Hv(e=>e.gl),y=Hv(e=>e.scene),b=G.useRef(null),[x]=G.useState(()=>new vs),S=G.useMemo(()=>{let e=new fs(r);return e.texture.type=Ht,e},[r]);G.useEffect(()=>()=>{S.dispose()},[S]),G.useLayoutEffect(()=>{if(i===1){let e=v.autoClear;v.autoClear=!0,b.current.update(v,x),v.autoClear=e}return aS(o,p,y,S.texture,{backgroundBlurriness:s??c,backgroundIntensity:l,backgroundRotation:u,environmentIntensity:d,environmentRotation:f})},[e,x,S.texture,p,y,o,i,v]);let C=1;return Uv(()=>{if(i===1/0||Cmy({GroundProjectedEnvImpl:lx}),[]),G.useEffect(()=>()=>{t.dispose()},[t]);let r=G.useMemo(()=>[n],[n]),i=e.ground?.height,a=e.ground?.radius,o=e.ground?.scale??1e3;return G.createElement(G.Fragment,null,G.createElement(oS,mb({},e,{map:n})),G.createElement(`groundProjectedEnvImpl`,{args:r,scale:o,height:i,radius:a}))}function uS(e){return e.ground?G.createElement(lS,e):e.map?G.createElement(oS,e):e.children?G.createElement(cS,e):G.createElement(sS,e)}var dS=class extends ns{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:` + uniform float time; + attribute float size; + varying vec3 vColor; + void main() { + vColor = color; + vec4 mvPosition = modelViewMatrix * vec4(position, 0.5); + gl_PointSize = size * (30.0 / -mvPosition.z) * (3.0 + sin(time + 100.0)); + gl_Position = projectionMatrix * mvPosition; + }`,fragmentShader:` + uniform sampler2D pointTexture; + uniform float fade; + varying vec3 vColor; + void main() { + float opacity = 1.0; + if (fade == 1.0) { + float d = distance(gl_PointCoord, vec2(0.5, 0.5)); + opacity = 1.0 / (1.0 + exp(16.0 * (d - 0.25))); + } + gl_FragColor = vec4(vColor, opacity); + + #include + #include <${Dx>=154?`colorspace_fragment`:`encodings_fragment`}> + }`})}},fS=e=>new Z().setFromSpherical(new Op(e,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),pS=G.forwardRef(({radius:e=100,depth:t=50,count:n=5e3,saturation:r=0,factor:i=4,fade:a=!1,speed:o=1},s)=>{let c=G.useRef(null),[l,u,d]=G.useMemo(()=>{let a=[],o=[],s=Array.from({length:n},()=>(.5+.5*Math.random())*i),c=new Q,l=e+t,u=t/n;for(let e=0;ec.current&&(c.current.uniforms.time.value=e.clock.elapsedTime*o));let[f]=G.useState(()=>new dS);return G.createElement(`points`,{ref:s},G.createElement(`bufferGeometry`,null,G.createElement(`bufferAttribute`,{attach:`attributes-position`,args:[l,3]}),G.createElement(`bufferAttribute`,{attach:`attributes-color`,args:[u,3]}),G.createElement(`bufferAttribute`,{attach:`attributes-size`,args:[d,1]})),G.createElement(`primitive`,{ref:c,object:f,attach:`material`,blending:2,"uniforms-fade-value":a,depthWrite:!1,transparent:!0,vertexColors:!0}))}),mS=u;function hS(){let[e,t]=(0,G.useState)(0),[n,r]=(0,G.useState)(0),i=(0,G.useRef)(null);return(0,G.useEffect)(()=>{let e=mS*1e3,n=()=>{let a=((Date.now()-f)%e+e)%e/e,o=.5-.5*Math.cos(a*Math.PI*2);t(a),r(o),i.current=requestAnimationFrame(n)};return i.current=requestAnimationFrame(n),()=>{i.current!=null&&cancelAnimationFrame(i.current)}},[]),{phase:e,amp:n}}function gS(){let{gl:e}=Hv(),[t,n]=(0,G.useState)(null),[r,i]=(0,G.useState)(!1);if((0,G.useEffect)(()=>{let e=!1;return(async()=>{try{let t=navigator.xr;if(!t||!t.isSessionSupported){e||n(!1);return}let r=await t.isSessionSupported(`immersive-vr`);e||n(!!r)}catch{e||n(!1)}})(),()=>{e=!0}},[]),(0,G.useEffect)(()=>{let t=()=>i(!!e.xr.getSession());return e.xr.addEventListener(`sessionstart`,t),e.xr.addEventListener(`sessionend`,t),()=>{e.xr.removeEventListener(`sessionstart`,t),e.xr.removeEventListener(`sessionend`,t)}},[e]),t===!1)return null;let a=async()=>{if(r){await e.xr.getSession()?.end();return}let t=navigator.xr;if(!t?.requestSession)return;let n=await t.requestSession(`immersive-vr`,{optionalFeatures:[`local-floor`,`bounded-floor`,`hand-tracking`,`layers`]});await e.xr.setSession(n)};return(0,K.jsx)(Ab,{transform:!0,wrapperClass:`stargate-vr-ui`,position:[0,1.4,-1.5],distanceFactor:2,children:(0,K.jsx)(`button`,{type:`button`,className:`stargate-vr-btn`,onClick:e=>{e.stopPropagation(),a()},children:r?`Exit VR`:`Enter VR`})})}function _S({amp:e}){let t=(0,G.useRef)(null);Uv((n,r)=>{if(!t.current)return;t.current.rotation.x+=r*.07,t.current.rotation.y+=r*.12;let i=1+e*.12;t.current.scale.setScalar(i)});let n=(0,G.useMemo)(()=>new cd({color:new Q(`#00ffd0`).lerp(new Q(`#ffffff`),.25),emissive:new Q(`#00ffd0`),emissiveIntensity:.6,metalness:.4,roughness:.2,transmission:.2,thickness:.6,transparent:!0,opacity:.9}),[]);return(0,K.jsxs)(`mesh`,{ref:t,children:[(0,K.jsx)(`torusKnotGeometry`,{args:[1.2,.18,220,36,2,5]}),(0,K.jsx)(`primitive`,{object:n,attach:`material`})]})}function vS(e){let t=Ex(e),n=(0,G.useMemo)(()=>{let e=t.clone();return e.colorSpace=$n,e.anisotropy=8,e},[t]);return(0,G.useEffect)(()=>()=>{n.dispose()},[n]),n}function yS({src:e,phase:t,amp:n}){let r=(0,G.useRef)(null),i=vS(e);Uv(()=>{if(!r.current)return;let e=.015+n*.02;r.current.rotation.z=Math.sin(t*Math.PI*2)*.15,r.current.position.z=Math.sin(t*Math.PI*2)*.05;let i=1+Math.sin(t*Math.PI*2)*.06;r.current.scale.setScalar(i);let a=r.current.material;a.emissiveIntensity=.3+n*.7,a.roughness=.25-e*.5});let a=(0,G.useMemo)(()=>new cd({map:i,transparent:!0,color:new Q(1,1,1),emissive:new Q(`#00ffd0`).multiplyScalar(.15),metalness:.15,roughness:.25,clearcoat:.7,clearcoatRoughness:.2}),[i]);return(0,K.jsxs)(`mesh`,{ref:r,children:[(0,K.jsx)(`planeGeometry`,{args:[1.6,1.6]}),(0,K.jsx)(`primitive`,{object:a,attach:`material`})]})}function bS({phase:e,amp:t}){let n=(0,G.useRef)(null),r=(0,G.useMemo)(()=>new Ra,[]),i=(0,G.useMemo)(()=>new Q,[]),a=(0,G.useMemo)(()=>new Wu(1,0),[]),o=(0,G.useMemo)(()=>new oo({vertexColors:!0,transparent:!0,opacity:.9}),[]),s=(0,G.useMemo)(()=>{let e=[],t=(1+Math.sqrt(5))/2,n=2*Math.PI*(1-1/t);for(let t=0;t<900;t++){let r=.5+t*.0025,i=t*n,a=Math.cos(i)*r*2.2,o=Math.sin(i)*r*2.2,s=Math.sin(t*.07)*.1;e.push({pos:new Z(a,o,s),r,a:i})}return e},[900]);return Uv(a=>{let o=a.clock.elapsedTime,c=o*.12+e*Math.PI*2;for(let a=0;a<900;a++){let{pos:l,a:u}=s[a];r.position.set(l.x*(1+t*.07),l.y*(1+t*.07),l.z+Math.sin(u+o*.8)*.02),r.rotation.set(0,0,u+c);let d=.008+(Math.sin(u+o*3)*.5+.5)*.012;r.scale.setScalar(d),r.updateMatrix(),n.current.setMatrixAt(a,r.matrix),i.setHSL((u/(Math.PI*2)+e)%1,.6,.6+t*.2),n.current.setColorAt(a,i)}n.current.instanceMatrix.needsUpdate=!0;let l=n.current;l.instanceColor&&(l.instanceColor.needsUpdate=!0)}),(0,K.jsx)(`instancedMesh`,{ref:n,args:[a,o,900]})}function xS({src:e}){let{phase:t,amp:n}=hS(),r=(0,G.useRef)(null);return Uv(e=>{let t=e.clock.elapsedTime;r.current&&(r.current.rotation.y=Math.sin(t*.1)*.05,r.current.rotation.x=Math.sin(t*.13)*.03)}),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`group`,{ref:r,children:[(0,K.jsx)(yS,{src:e,phase:t,amp:n}),(0,K.jsx)(_S,{amp:n}),(0,K.jsx)(`group`,{scale:1.2,position:[0,0,-.1],children:(0,K.jsx)(bS,{phase:t,amp:n})})]}),(0,K.jsx)(pS,{depth:50,radius:80,factor:2,fade:!0}),(0,K.jsx)(uS,{preset:`night`,background:!1}),(0,K.jsx)(Ox,{enableZoom:!0,enablePan:!1,minDistance:1.5,maxDistance:6,target:[0,0,0]}),(0,K.jsx)(gS,{})]})}function SS({open:e,src:t,onClose:n,closePress:r}){let i=(0,G.useRef)(null);return(0,G.useLayoutEffect)(()=>{if(!e)return;let t=document.documentElement,n=document.body,r={htmlOverflow:t.style.overflow,htmlOverflowY:t.style.overflowY,htmlHeight:t.style.height,htmlOverscroll:t.style.overscrollBehavior,bodyOverflow:n.style.overflow,bodyOverflowY:n.style.overflowY,bodyHeight:n.style.height,bodyOverscroll:n.style.overscrollBehavior};t.classList.add(`stargate-open`),n.classList.add(`stargate-open`);let a=window.setTimeout(()=>{i.current?.focus()},0);return()=>{window.clearTimeout(a),t.classList.remove(`stargate-open`),n.classList.remove(`stargate-open`),t.style.overflow=r.htmlOverflow,t.style.overflowY=r.htmlOverflowY,t.style.height=r.htmlHeight,t.style.overscrollBehavior=r.htmlOverscroll,n.style.overflow=r.bodyOverflow,n.style.overflowY=r.bodyOverflowY,n.style.height=r.bodyHeight,n.style.overscrollBehavior=r.bodyOverscroll}},[e]),e?(0,K.jsxs)(`div`,{ref:i,className:`stargate-overlay is-open`,role:`dialog`,"aria-modal":`true`,onKeyDown:e=>e.key===`Escape`&&n(),tabIndex:-1,onPointerDown:e=>{e.target===e.currentTarget&&n()},style:{position:`fixed`,inset:0,zIndex:2147483600,background:`radial-gradient(80% 60% at 50% 50%, rgba(0,0,0,0.75), rgba(0,0,0,0.95))`,backdropFilter:`blur(3px)`},children:[(0,K.jsx)(`button`,{className:`stargate-exit`,"aria-label":`Close viewer`,...r,style:{position:`absolute`,top:`max(12px, env(safe-area-inset-top))`,right:`max(12px, env(safe-area-inset-right))`,width:44,height:44,borderRadius:12,border:`1px solid rgba(255,255,255,0.15)`,background:`rgba(255,255,255,0.06)`,color:`#fff`,fontSize:18,zIndex:2},onClick:e=>{e.stopPropagation(),r.onClick(e),n()},onPointerUp:e=>{e.stopPropagation(),r.onPointerUp(e)},children:`✕`}),(0,K.jsx)(`div`,{className:`stargate-stage`,onClick:e=>e.stopPropagation(),style:{position:`absolute`,inset:0},children:(0,K.jsx)(pb,{dpr:[1,2],gl:{antialias:!0,alpha:!0,powerPreference:`high-performance`},onCreated:e=>{let t=e.gl;t.outputColorSpace=$n,t.toneMapping=4,t.toneMappingExposure=1,t.useLegacyLights!==void 0&&(t.useLegacyLights=!1),t.physicallyCorrectLights!==void 0&&(t.physicallyCorrectLights=!0)},camera:{fov:55,near:.1,far:200,position:[0,0,3.2]},children:(0,K.jsx)(xS,{src:t})})})]}):null}async function CS(e){let t=window;if(typeof t.showOpenFilePicker==`function`)try{return await(await t.showOpenFilePicker({multiple:!1,excludeAcceptAllOption:!0,types:[{description:`Φkey`,accept:{"image/svg+xml":[`.svg`]}}]}))[0]?.getFile()??null}catch{return null}return new Promise(t=>{let n=document.createElement(`input`);n.type=`file`,e&&(n.accept=e),n.tabIndex=-1,n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.width=`100vw`,n.style.height=`100vh`,n.style.opacity=`0.001`,n.style.pointerEvents=`auto`,n.style.zIndex=`2147483647`,n.style.background=`transparent`,n.style.border=`0`,n.style.transform=`none`;let r=()=>{n.parentNode&&n.parentNode.removeChild(n)};n.addEventListener(`change`,()=>{let e=n.files?.[0]??null;r(),t(e)},{once:!0}),document.body.appendChild(n),n.click()})}function wS({title:e,subtitle:t,accept:n,onResolve:r}){let[i,a]=(0,G.useState)(!1),[o,s]=(0,G.useState)(!1),c=(0,G.useRef)(null);(0,G.useEffect)(()=>{let e=`ovm-mobile-css`;if(document.getElementById(e))return;let t=document.createElement(`style`);t.id=e,t.textContent=` + :root { --ovm-accent: var(--crystal-accent, #00FFD0); } + .ovm-host { position: fixed; inset: 0; z-index: 2147483647; } + .ovm-backdrop { + position:absolute; inset:0; + min-height: 100svh; + background: radial-gradient(80% 60% at 50% 50%, rgba(0,0,0,.65), rgba(0,0,0,.92)), + linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.35)); + display:flex; align-items:center; justify-content:center; + padding: + max(14px, env(safe-area-inset-top)) + max(12px, env(safe-area-inset-right)) + max(16px, env(safe-area-inset-bottom)) + max(12px, env(safe-area-inset-left)); + overscroll-behavior: contain; + } + .ovm-dialog { + width: min(560px, 96vw); + color: #fff; + background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)); + border: 1px solid rgba(255,255,255,.12); + border-radius: 18px; + box-shadow: 0 20px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset; + padding: 16px; + max-height: 85svh; overflow:auto; + } + .ovm-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; } + .ovm-title { margin:0; font-weight:800; font-size: clamp(16px, 4.5vw, 18px); } + .ovm-close { + appearance:none; display:grid; place-items:center; + width:40px; height:40px; border-radius:12px; + background: rgba(255,255,255,.08); + border:1px solid rgba(255,255,255,.14); + color:#fff; font-size:18px; cursor:pointer; touch-action:manipulation; + } + .ovm-body { display:grid; gap:12px; } + .ovm-sub { margin:0; opacity:.88; font-size:14px; } + .ovm-cta { + margin-top: 6px; + width: 100%; + min-height: 56px; + border-radius: 14px; + border:1px solid rgba(255,255,255,.18); + background: + linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)), + radial-gradient(120% 150% at 50% -20%, color-mix(in oklab, var(--ovm-accent) 35%, transparent), transparent); + color:#fff; font-weight:900; font-size:16px; + display:flex; align-items:center; justify-content:center; gap:10px; + cursor:pointer; touch-action:manipulation; + box-shadow: 0 10px 30px rgba(0,0,0,.35); + } + .ovm-cta:active { transform: scale(.985); } + .ovm-cta[disabled] { opacity:.8; cursor:progress; } + .ovm-cta[aria-busy="true"]::after { + content:""; width:18px; height:18px; border-radius:50%; + border:2px solid rgba(255,255,255,.25); + border-top-color: var(--ovm-accent); + animation: ovm-spin .7s linear infinite; + } + @keyframes ovm-spin { to { transform: rotate(360deg); } } + `,document.head.appendChild(t)},[]),(0,G.useEffect)(()=>{let e=document.body.style.overflow;document.body.style.overflow=`hidden`,document.body.setAttribute(`data-ovm-open`,`1`);let t=document.getElementById(`root`)||document.querySelector(`#app`)||document.querySelector(`.sigilpage`),n=t?.style.pointerEvents;return t&&(t.setAttribute(`inert`,``),t.style.pointerEvents=`none`),a(!0),requestAnimationFrame(()=>c.current?.focus({preventScroll:!0})),()=>{document.body.style.overflow=e,document.body.removeAttribute(`data-ovm-open`),t&&(t.removeAttribute(`inert`),n==null?t.style.removeProperty(`pointer-events`):t.style.pointerEvents=n)}},[]);let l=(0,G.useCallback)(async()=>{if(!(!i||o)){s(!0);try{r(await CS(n||`image/svg+xml,.svg`)??null)}finally{s(!1)}}},[i,o,n,r]);return(0,K.jsx)(`div`,{className:`ovm-host`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`ovm-title`,children:(0,K.jsx)(`div`,{className:`ovm-backdrop`,onClick:()=>r(null),children:(0,K.jsxs)(`div`,{className:`ovm-dialog`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`div`,{className:`ovm-header`,children:[(0,K.jsx)(`h4`,{id:`ovm-title`,className:`ovm-title`,children:e||`Verify`}),(0,K.jsx)(`button`,{className:`ovm-close`,"aria-label":`Close`,onClick:()=>r(null),children:`✕`})]}),(0,K.jsxs)(`div`,{className:`ovm-body`,children:[t&&(0,K.jsx)(`p`,{className:`ovm-sub`,children:t}),(0,K.jsxs)(`button`,{ref:c,type:`button`,className:`ovm-cta`,onClick:l,onTouchEnd:e=>{e.preventDefault(),l()},disabled:!i||o,"aria-busy":o?`true`:void 0,children:[(0,K.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,K.jsx)(`path`,{fill:`currentColor`,d:`M20 17.5V9h-3V6H7v3H4v8.5A2.5 2.5 0 0 0 6.5 20h11A2.5 2.5 0 0 0 20 17.5ZM9 8V7h6v1h3v2H6V8Zm3 3.5A3.5 3.5 0 1 1 8.5 15A3.5 3.5 0 0 1 12 11.5m0 2A1.5 1.5 0 1 0 13.5 15A1.5 1.5 0 0 0 12 13.5Z`})}),o?`Opening…`:`Choose Φkey`]})]})]})})})}var TS=A(E(),1);async function ES(e){if(typeof window>`u`||typeof document>`u`)return null;let t=document.getElementById(`ovm-portal-root`);if(t&&t.parentNode)try{t.parentNode.removeChild(t)}catch{}let n=document.createElement(`div`);n.id=`ovm-portal-root`,n.setAttribute(`data-ovm-root`,`1`),n.setAttribute(`role`,`presentation`),n.setAttribute(`tabindex`,`-1`),document.body.appendChild(n);let r=(0,TS.createRoot)(n);return new Promise(t=>{let i=!1;r.render((0,K.jsx)(wS,{title:e?.title??`Verify Stewardship`,subtitle:e?.subtitle??`Pick the Φkey for this Sigil-Glyph.`,accept:e?.accept??`image/svg+xml,.svg`,onResolve:e=>{if(!i){i=!0;try{r.unmount()}catch{}try{n.remove()}catch{}t(e)}}}))})}function DS({isArchived:e,ownerVerified:t,ownershipMsg:n,onVerifyOwnershipFile:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useRef)(!1),s=(0,G.useCallback)(async()=>{if(!(e||i)){a(!0);try{let e=await ES({accept:`image/svg+xml,.svg`,title:`Verify`,subtitle:`Pick the Φkey for this Sigil-Glyph.`});e&&r(e)}finally{a(!1)}}},[e,i,r]),c=e||i,l=e?`Archived link — cannot verify here`:`Choose Φkey`;return(0,K.jsxs)(`div`,{className:`sp-panel`,role:`group`,"aria-labelledby":`own-title`,children:[(0,K.jsx)(`h3`,{id:`own-title`,children:`Stewardship`}),(0,K.jsxs)(`div`,{className:`sp-field`,children:[(0,K.jsx)(`label`,{className:`lbl`,htmlFor:`btn-own-verify`,children:`Φkey`}),(0,K.jsx)(`button`,{id:`btn-own-verify`,type:`button`,className:`btn-primary btn-primary--xl sp-btn-full`,title:l,"aria-disabled":c,disabled:c,"aria-busy":i||void 0,"data-testid":`ownership-verify-button`,onPointerUp:e=>{c||(e.pointerType===`touch`||e.pointerType===`mouse`||e.pointerType===`pen`)&&(o.current=!0,setTimeout(()=>{o.current=!1},500),s())},onClick:()=>{c||o.current||s()},children:i?`Verifying…`:`Verify`})]}),(0,K.jsxs)(`div`,{className:`sp-meta-row`,"aria-live":`polite`,"aria-atomic":`true`,role:`status`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Status`}),(0,K.jsx)(`span`,{className:t&&!e?`badge badge--ok`:`badge badge--checking`,"data-testid":`ownership-status-badge`,children:e?`Archived link — cannot verify here`:n})]}),e&&(0,K.jsxs)(`div`,{className:`sp-meta-row`,children:[(0,K.jsx)(`span`,{className:`lbl`,children:`Link`}),(0,K.jsx)(`span`,{className:`badge`,children:`Archived`})]})]})}function OS(e,t){(0,G.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t])}function kS(e){(0,G.useEffect)(()=>{if(!e)return;let t=document.documentElement.style.overflow,n=document.body.style.overflow;return document.documentElement.style.overflow=`hidden`,document.body.style.overflow=`hidden`,()=>{document.documentElement.style.overflow=t,document.body.style.overflow=n}},[e])}function AS(e,t){(0,G.useEffect)(()=>{if(!e)return;let n=t.current;if(!n)return;let r=`a[href], button:not([disabled]), textarea, input, select, summary, [tabindex]:not([tabindex="-1"])`,i=()=>{(n.querySelector(`.close-btn`)||n.querySelector(`.btn.primary`)||n.querySelector(r))?.focus()},a=e=>{if(e.key!==`Tab`)return;let t=Array.from(n.querySelectorAll(r)).filter(e=>e.offsetParent!==null||e===document.activeElement);if(!t.length)return;let i=t[0],a=t[t.length-1];e.shiftKey?document.activeElement===i&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),i.focus())},o=document.activeElement;return i(),n.addEventListener(`keydown`,a),()=>{n.removeEventListener(`keydown`,a),o?.focus?.()}},[e,t])}function jS(e,t){let n=e.stepsPerBeat??a,r=t.stepsPerBeat??a,i=v(e.pulse,n),o=v(t.pulse,r);return e.pulse===t.pulse&&e.beat===t.beat&&i===o&&e.chakraDay===t.chakraDay}function MS(){return(0,G.useCallback)(e=>{let t=e.currentTarget,n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top;t.style.setProperty(`--x`,`${r}px`),t.style.setProperty(`--y`,`${i}px`)},[])}var NS=11;function PS({open:e,onClose:t,legacyHash:n,modernHash:r,currentPayload:i,onGenerateLink:o,onVerified:c}){let[l,u]=(0,G.useState)(!1),[d,f]=(0,G.useState)(`idle`),[p,m]=(0,G.useState)(`Upload your SVG Φkey to verify stewardship.`),[h,g]=(0,G.useState)(null),[_,y]=(0,G.useState)(null),b=(0,G.useRef)(null),x=(0,G.useRef)(null);OS(e,t),kS(e),AS(e,x),(0,G.useEffect)(()=>{e||(u(!1),f(`idle`),m(`Upload your SVG Φkey to verify stewardship.`),g(null),y(null))},[e]);let S=(n||``).toLowerCase(),C=(r||``).toLowerCase(),w=(0,G.useMemo)(()=>d===`ok`&&!!h&&!!C,[d,h,C]),T=(0,G.useCallback)(async e=>{let t=e?.[0];if(t){u(!0),f(`verifying`),m(`Verifying uploaded SVG…`),y(null);try{let{ok:e,errors:n,payload:r}=ce(await t.text());if(!e||!r){f(`bad`),m(n[0]||`Invalid SVG.`),g(null),u(!1);return}if(!i){f(`bad`),m(`No active sigil payload on this page.`),g(null),u(!1);return}if(!jS(i,r)){f(`bad`),m(`This SVG isn’t the same sealed moment.`),g(null),u(!1);return}let a=(r.canonicalHash||``).toLowerCase();if(!a){f(`bad`),m(`No canonicalHash found in SVG metadata.`),g(null),u(!1);return}if(a!==S){if(C&&a===C){f(`warn`),m(`This Φkey is already on the modern hash — no upgrade needed.`),g(r),c?.(r),u(!1);return}f(`bad`),m(`SVG canonicalHash doesn’t match this legacy link.`),g(null),u(!1);return}f(`ok`),m(`Stewardship verified (legacy SVG). You can upgrade this key.`),g(r),c?.(r)}catch{f(`bad`),m(`Couldn’t read that SVG file.`),g(null)}finally{u(!1)}}},[i,S,C,c]),E=(0,G.useCallback)(()=>{b.current?.click()},[]),D=(0,G.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),T(e.dataTransfer?.files)},[T]),O=(0,G.useCallback)(e=>{let t=e.clipboardData?.files;t&&t.length&&T(t)},[T]),k=(0,G.useCallback)(async()=>{if(!(!h||!C||!o)){u(!0),m(`Creating modern transfer link…`);try{let e=s(new Date),t=B(NS),n=await o({...h,canonicalHash:C,expiresAtPulse:e+t,claimExtendUnit:`breaths`,claimExtendAmount:NS,upgradedFromLegacy:!0});n?(y(n),f(`ok`),m(`Modern transfer link ready. Claim window extended for ${NS} breaths.`)):(y(null),f(`bad`),m(`Couldn’t create a modern link.`))}catch{y(null),f(`bad`),m(`Error generating modern link.`)}finally{u(!1)}}},[h,C,o]),A=(0,G.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),m(`Link copied to clipboard.`)}catch{m(`Copy failed.`)}},[]),j=MS();if(!e)return null;let M=d===`ok`?`ok`:d===`bad`?`bad`:d===`warn`?`warn`:`checking`,N=h?v(h.pulse,h.stepsPerBeat??a):null;return(0,K.jsx)(`div`,{className:`upgrade-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`upgrade-title`,"aria-describedby":`upgrade-desc`,onClick:t,children:(0,K.jsxs)(`div`,{ref:x,className:`upgrade-dialog`,onClick:e=>e.stopPropagation(),"aria-busy":l?`true`:`false`,"data-status":M,children:[(0,K.jsxs)(`header`,{className:`upgrade-head`,children:[(0,K.jsx)(`h3`,{id:`upgrade-title`,className:`upgrade-title`,children:`Upgrade Sigil (Legacy → Modern)`}),(0,K.jsx)(`button`,{className:`upgrade-close`,onClick:t,"aria-label":`Close upgrade modal`,onPointerDown:j,children:`✕`})]}),(0,K.jsxs)(`div`,{className:`upgrade-body`,children:[(0,K.jsx)(`p`,{id:`upgrade-desc`,className:`upgrade-badge upgrade-badge--${M}`,"aria-live":`polite`,children:l?`Working…`:p}),(0,K.jsxs)(`div`,{className:`upgrade-row upgrade-kv`,children:[(0,K.jsx)(`b`,{children:`Legacy hash`}),(0,K.jsx)(`div`,{className:`mono mono-wrap`,children:S||`—`}),(0,K.jsx)(`b`,{children:`Modern hash`}),(0,K.jsx)(`div`,{className:`mono mono-wrap`,children:C||`—`}),(0,K.jsx)(`b`,{children:`Owner Φkey`}),(0,K.jsx)(`div`,{className:`mono mono-wrap`,children:h?.userPhiKey||`—`}),(0,K.jsx)(`b`,{children:`Moment`}),(0,K.jsx)(`div`,{children:h?`Pulse ${h.pulse.toLocaleString()} • Beat ${h.beat}/36 • Step ${N??0}/${h.stepsPerBeat??a} • ${h.chakraDay}`:`—`})]}),(0,K.jsxs)(`div`,{className:`upgrade-drop`,tabIndex:0,role:`button`,onClick:E,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),E())},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect=`copy`},onDrop:D,onPaste:O,"aria-label":`Upload your legacy SVG Φkey`,children:[(0,K.jsxs)(`div`,{className:`upgrade-drop__title`,children:[`Drop your `,(0,K.jsx)(`b`,{children:`SVG Φkey`}),` here, click to choose, or paste from clipboard.`]}),(0,K.jsx)(`div`,{className:`upgrade-drop__sub`,children:`We’ll verify it’s the same sealed moment and matches this legacy link.`}),(0,K.jsx)(`input`,{ref:b,type:`file`,accept:`.svg,image/svg+xml`,className:`upgrade-file sr-only`,onChange:e=>void T(e.target.files)})]}),_&&(0,K.jsxs)(`div`,{className:`upgrade-urlbox`,children:[(0,K.jsx)(`div`,{className:`upgrade-urlbox__head`,children:(0,K.jsx)(`b`,{children:`Modern transfer link`})}),(0,K.jsx)(`div`,{className:`mono mono-wrap`,children:_}),(0,K.jsxs)(`div`,{className:`upgrade-actions`,style:{justifyContent:`flex-start`},children:[(0,K.jsx)(`button`,{type:`button`,className:`btn-ghost`,onClick:()=>A(_),onPointerDown:j,children:`Remember link`}),(0,K.jsx)(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,className:`upgrade-cta`,onPointerDown:j,children:`Open link`})]})]}),(0,K.jsxs)(`div`,{className:`upgrade-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`btn-ghost`,onClick:t,onPointerDown:j,children:`Close`}),(0,K.jsx)(`button`,{type:`button`,className:`upgrade-cta`,onClick:k,onPointerDown:j,disabled:!w||!o||l,"aria-busy":l?`true`:`false`,"data-busy":l?`true`:`false`,title:w?`Create a modern transfer link`:`Verify a legacy SVG first`,children:`Create modern transfer link`})]}),(0,K.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:l?`Working…`:p})]})]})})}var FS=({children:e,title:t})=>(0,K.jsx)(`code`,{title:t,style:{whiteSpace:`nowrap`},children:e}),IS=({glyphAuth:e,linkStatus:t,routeHash:n,localHash:r,upgradedOnce:i,oldLinkDetected:a,transferToken:o,onUpgradeClick:s,className:c})=>{let l=e===`authentic`&&t===`archived`&&!o&&!!n&&!!r&&n.toLowerCase()!==r.toLowerCase()&&!i,u=t===`archived`&&!!o;return l||a||u?(0,K.jsxs)(`div`,{className:c,"aria-live":`polite`,"aria-atomic":`true`,children:[l&&(0,K.jsxs)(`div`,{className:`sp-upgrade`,role:`region`,"aria-label":`Legacy upgrade notice`,children:[(0,K.jsxs)(`div`,{className:`row`,children:[(0,K.jsx)(`span`,{className:`pill`,children:`Legacy link detected`}),(0,K.jsx)(`span`,{className:`muted`,children:`Upgrade your Φkey to the modern canonical hash to enable transfers & new features.`}),(0,K.jsx)(`span`,{className:`spacer`}),(0,K.jsx)(`button`,{className:`upg-btn`,onClick:s,"aria-haspopup":`dialog`,"aria-controls":`upgrade-sigil-modal`,children:`Upgrade sigil`})]}),(0,K.jsxs)(`div`,{className:`muted`,children:[`Route hash `,(0,K.jsxs)(FS,{children:[n?.slice(0,16),`…`]}),` → Modern`,` `,(0,K.jsxs)(FS,{children:[(r||``).slice(0,16),`…`]})]})]}),a&&(0,K.jsxs)(`div`,{className:`sp-card sp-card--banner`,role:`status`,style:{marginTop:12,padding:12},"aria-label":`Ledger refreshed from canonical store`,children:[(0,K.jsx)(`span`,{className:`pill`,children:`Ledger refreshed`}),(0,K.jsx)(`span`,{className:`muted`,style:{marginLeft:8},children:`Your URL didn’t have the latest resonance stream. We’ve updated it.`})]}),u&&(0,K.jsxs)(`div`,{className:`sp-card sp-card--banner`,role:`alert`,style:{marginTop:12,padding:12},"aria-label":`Archived transfer link`,children:[(0,K.jsx)(`span`,{className:`pill`,children:`Archived link`}),(0,K.jsx)(`span`,{className:`muted`,style:{marginLeft:8},children:`This transfer link has been rotated or expired. Start from the latest share to continue.`})]})]}):null},LS={"1B":1,"1D":36,"6D":216,"42D":1512,ALL:1/0},RS=17491.270421*(3+Math.sqrt(5))*1e3/36,zS=1715323541888;function BS(e){return(e-zS)/RS}var VS=BS(Date.now());function HS(e){return e?.length?e[e.length-1].t>1e11?e.map(e=>({t:BS(e.t),v:e.v})):e:[]}function US({open:e,onClose:t,series:n,latestValue:r,label:i=`Live Φ`}){let[a,o]=(0,G.useState)(`1D`),[s,c]=(0,G.useState)(null),[l,u]=(0,G.useState)(null),[d,f]=(0,G.useState)(null),p=(0,G.useRef)(null),m=(0,G.useRef)(null),[h,g]=(0,G.useState)(0);(0,G.useEffect)(()=>{if(!e)return;let t=p.current;if(!t)return;let n=new ResizeObserver(()=>g(e=>e+1));n.observe(t);let r=()=>g(e=>e+1);return window.addEventListener(`resize`,r,{passive:!0}),()=>{n.disconnect(),window.removeEventListener(`resize`,r)}},[e]);let _=(0,G.useMemo)(()=>{let e=HS(n||[]);return e.length?[...e].sort((e,t)=>e.t-t.t):e},[n]),v=(0,G.useMemo)(()=>_.length>0?_:Number.isFinite(r)?[{t:VS,v:r}]:[],[_,r]),y=(0,G.useMemo)(()=>{if(!v.length||a===`ALL`)return v;let e=LS[a],t=v[v.length-1].t-e,n=0;for(let e=0;e=t){n=e;break}return v.slice(n)},[v,a]),{minT:b,maxT:x,minV:S,maxV:C}=(0,G.useMemo)(()=>{if(!y.length)return{minT:0,maxT:1,minV:0,maxV:1};let e=y.map(e=>e.t),t=y.map(e=>e.v),n=Math.min(...t),r=Math.max(...t),i=(r-n)*.08||Math.max(1e-6,Math.abs(r)*.02);return{minT:Math.min(...e),maxT:Math.max(...e),minV:n-i,maxV:r+i}},[y]),w=(0,G.useMemo)(()=>{let e=y.length;if(e>=2){let t=y[e-2].v,n=y[e-1].v;return n>t?`up`:nr)return`down`;if(e{if(!e)return;let t=m.current,n=p.current;if(!t||!n)return;let r=Math.max(1,Math.floor(window.devicePixelRatio||1)),i=Math.max(280,Math.min(1200,n.clientWidth||320)),a=Math.max(220,Math.min(420,Math.round(i*.42)));t.width=i*r,t.height=a*r,t.style.width=`${i}px`,t.style.height=`${a}px`;let o=t.getContext(`2d`);if(!o)return;typeof o.resetTransform==`function`&&o.resetTransform(),o.setTransform(r,0,0,r,0,0),o.clearRect(0,0,i,a);let c=o.createLinearGradient(0,0,0,a);if(c.addColorStop(0,`rgba(255,255,255,0.06)`),c.addColorStop(1,`rgba(255,255,255,0.03)`),o.fillStyle=c,o.fillRect(0,0,i,a),!y.length)return;let u=e=>{let t=Math.max(1e-9,x-b);return 36+(e-b)/t*(i-72)},f=e=>{let t=Math.max(1e-12,C-S);return a-24-(e-S)/t*(a-48)};o.strokeStyle=`rgba(255,255,255,.12)`,o.lineWidth=1,o.beginPath();for(let e=0;e<=4;e++){let t=24+e*(a-48)/4;o.moveTo(36,t),o.lineTo(i-36,t)}o.stroke();let h=y.map((e,t)=>{let n=Math.max(0,t-3),r=y.slice(n,t+1),i=r.reduce((e,t)=>e+t.v,0)/r.length;return{t:e.t,v:i}});if(h.length===1){let e=h[0],t=u(e.t),n=f(e.v);o.shadowBlur=16,o.shadowColor=`rgba(55,230,212,.45)`,o.fillStyle=`rgba(167,255,244,1)`,o.beginPath(),o.arc(t,n,3.5,0,Math.PI*2),o.fill(),o.shadowBlur=0;return}let g=o.createLinearGradient(0,24,0,a-24);if(g.addColorStop(0,`rgba(55,230,212,.35)`),g.addColorStop(1,`rgba(55,230,212,0)`),o.beginPath(),o.moveTo(u(h[0].t),f(h[0].v)),h.forEach(e=>o.lineTo(u(e.t),f(e.v))),o.lineTo(u(h[h.length-1].t),a-24),o.lineTo(u(h[0].t),a-24),o.closePath(),o.fillStyle=g,o.fill(),o.shadowBlur=16,o.shadowColor=`rgba(55,230,212,.45)`,o.strokeStyle=`rgba(167,255,244,1)`,o.lineWidth=2,o.beginPath(),h.forEach((e,t)=>{let n=u(e.t),r=f(e.v);t===0?o.moveTo(n,r):o.lineTo(n,r)}),o.stroke(),o.shadowBlur=0,s!=null&&l!=null&&d!=null&&y[d]){let e=y[d],t=u(e.t),n=f(e.v);o.strokeStyle=`rgba(255,255,255,.25)`,o.setLineDash([4,6]),o.beginPath(),o.moveTo(t,24),o.lineTo(t,a-24),o.stroke(),o.setLineDash([]),o.fillStyle=`#fff`,o.beginPath(),o.arc(t,n,3,0,Math.PI*2),o.fill();let r=`Beat ${e.t.toFixed(6)} • ${e.v.toLocaleString(void 0,{maximumFractionDigits:6})} Φ`;o.font=`12px ui-sans-serif, system-ui, -apple-system, Segoe UI, Inter`;let s=o.measureText(r).width,c=Math.min(Math.max(t-s/2-8,8),i-s-16-8),l=Math.max(n-34,8),p=s+16,m=c,h=l,g=Math.min(8,p/2,24/2);o.fillStyle=`rgba(0,0,0,.6)`,o.strokeStyle=`rgba(255,255,255,.18)`,o.lineWidth=1,o.beginPath(),o.moveTo(m+g,h),o.lineTo(m+p-g,h),o.quadraticCurveTo(m+p,h,m+p,h+g),o.lineTo(m+p,h+24-g),o.quadraticCurveTo(m+p,h+24,m+p-g,h+24),o.lineTo(m+g,h+24),o.quadraticCurveTo(m,h+24,m,h+24-g),o.lineTo(m,h+g),o.quadraticCurveTo(m,h,m+g,h),o.closePath(),o.fill(),o.stroke(),o.fillStyle=`#e7fbf7`,o.fillText(r,c+8,l+16)}},[e,y,b,x,S,C,s,l,d,h]),(0,G.useEffect)(()=>{if(!e)return;let t=m.current;if(!t)return;let n=e=>{let n=t.getBoundingClientRect(),r=Math.max(1,Math.floor(window.devicePixelRatio||1)),i=(e.clientX-n.left)*r,a=(e.clientY-n.top)*r;if(c(i/r),u(a/r),y.length){let e=n.width-36,t=b+Math.min(1,Math.max(0,(i/r-36)/Math.max(1,e-36)))*(x-b),a=0,o=y.length-1;for(;o-a>1;){let e=a+o>>1;y[e].t{c(null),u(null),f(null)};return t.addEventListener(`pointermove`,n,{passive:!0}),t.addEventListener(`pointerleave`,r,{passive:!0}),()=>{t.removeEventListener(`pointermove`,n),t.removeEventListener(`pointerleave`,r)}},[e,y,b,x]),!e)return null;let T=Number.isFinite(r)?r.toLocaleString(void 0,{maximumFractionDigits:6}):`—`;return(0,K.jsxs)(`div`,{className:`valuehist-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":`Value History`,children:[(0,K.jsx)(`button`,{className:`valuehist-exit`,onClick:t,title:`Close`,children:`✕`}),(0,K.jsx)(`div`,{className:`valuehist-stage`,style:{alignItems:`stretch`},children:(0,K.jsxs)(`div`,{className:`valuehist-panel`,children:[(0,K.jsxs)(`div`,{className:`valuehist-head`,children:[(0,K.jsxs)(`h3`,{className:`valuehist-title`,children:[i,` — history`]}),(0,K.jsxs)(`span`,{className:`badge badge--ok ${w===`up`?`flash-up`:w===`down`?`flash-down`:``}`,"aria-label":`latest value`,children:[`Latest:\xA0`,(0,K.jsxs)(`strong`,{children:[T,` Φ`]})]}),(0,K.jsx)(`div`,{className:`valuehist-ranges`,children:[`1B`,`1D`,`6D`,`42D`,`ALL`].map(e=>(0,K.jsx)(`button`,{className:`btn-ghost${e===a?` btn-primary`:``}`,onClick:()=>o(e),"aria-pressed":e===a,children:e},e))})]}),(0,K.jsxs)(`div`,{ref:p,className:`valuehist-frame`,children:[y.length===0&&(0,K.jsx)(`div`,{className:`valuehist-empty`,children:`Waiting for live samples…`}),(0,K.jsx)(`canvas`,{ref:m})]}),(0,K.jsxs)(`div`,{className:`valuehist-actions`,children:[(0,K.jsx)(`button`,{className:`btn-ghost`,onClick:()=>{let e=y.map(e=>`${e.t},${e.v}`),t=new Blob([`beat,value\n${e.join(` +`)}`],{type:`text/csv`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`phi-history-kai.csv`,r.click(),setTimeout(()=>URL.revokeObjectURL(n),300)},children:`Download CSV`}),(0,K.jsx)(`button`,{className:`btn-ghost`,onClick:()=>{let e=m.current;e&&e.toBlob(e=>{if(!e)return;let t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`phi-history.png`,n.click(),setTimeout(()=>URL.revokeObjectURL(t),300)})},children:`Save PNG`})]})]})})]})}var WS=17491.270421*(3+Math.sqrt(5))*1e3/36,GS=1715323541888;function KS(e){return(e-GS)/WS}function qS(e){return e>1e11?KS(e):e}function JS(e){let t=Math.max(60,Math.floor(e?.maxPoints??1512*8)),n=Math.max(1,Math.floor(e?.maxBeats??1512)),r=(0,G.useRef)([]),[,i]=(0,G.useState)(0),a=(0,G.useCallback)(e=>{let a=r.current,o=qS(e.t)-n,s=0;for(;s0&&a.splice(0,s),a.push(e),a.length>t&&a.splice(0,a.length-t),i(e=>e+1)},[t,n]),o=(0,G.useCallback)(()=>{r.current=[],i(e=>e+1)},[]);return{series:r.current.slice(),pushSample:a,reset:o}}const YS=e=>e===`verified`?`ok`:e;var XS=e=>typeof e==`number`&&Number.isFinite(e),ZS=(e,t=0)=>{if(XS(e))return e;if(typeof e==`string`&&e.trim()!==``){let n=Number(e);return Number.isFinite(n)?n:t}return t},QS=e=>e===`mint`||e===`transfer`||e===`claim`;function $S(e,t){let n=t??ZS(e.pulse,0);return(Array.isArray(e.provenance)?e.provenance:[]).flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e,r=typeof t.ownerPhiKey==`string`?t.ownerPhiKey:``,i=typeof t.kaiSignature==`string`?t.kaiSignature:void 0,a=ZS(t.pulse,n),o=ZS(t.beat,0),s;if(XS(t.stepIndex))s=t.stepIndex;else if(typeof t.stepIndex==`string`&&t.stepIndex.trim()!==``){let e=ZS(t.stepIndex,NaN);Number.isFinite(e)&&(s=e)}let c=typeof t.atPulse==`string`&&t.atPulse.trim()!==``||XS(t.atPulse)?ZS(t.atPulse,a):a,l=typeof t.attachmentName==`string`?t.attachmentName:void 0,u=QS(t.action)?t.action:`mint`;return[{ownerPhiKey:r,kaiSignature:i,pulse:a,beat:o,stepIndex:s,atPulse:c,attachmentName:l,action:u}]})}function eC(e,t,n,r,i,a){let o=n.stepsPerBeat??44,s=V(n.pulse,o);return{ownerPhiKey:e,kaiSignature:t,pulse:n.pulse,beat:n.beat,stepIndex:s,atPulse:a,attachmentName:i,action:r}}function tC(e,t){let n=document.head.querySelectorAll(`meta[name], meta[property]`);for(let r of n)if(r.getAttribute(e)===t)return r;return null}function nC(e,t){let n=tC(e,t);return n||(n=document.createElement(`meta`),n.setAttribute(e,t),document.head.appendChild(n)),n}function rC(e,t,n){let r=nC(e,t);n==null?r.removeAttribute(`content`):r.setAttribute(`content`,n)}function iC(e){let t=document.head.querySelectorAll(`link[rel]`);for(let n of t)if((n.getAttribute(`rel`)||``).toLowerCase()===e.toLowerCase())return n;return null}function aC(e){let t=iC(e);return t||(t=document.createElement(`link`),t.setAttribute(`rel`,e),document.head.appendChild(t)),t}function oC(e,t){let n=document.getElementById(e);n||(n=document.createElement(`script`),n.id=e,n.type=`application/ld+json`,document.head.appendChild(n)),n.textContent=JSON.stringify(t)}const sC={Root:{hue:0,accent:`#CC3F3F`},Sacral:{hue:24,accent:`#E86428`},"Solar Plexus":{hue:48,accent:`#E6B844`},Heart:{hue:140,accent:`#2CCB99`},Throat:{hue:190,accent:`#00D5AA`},"Third Eye":{hue:260,accent:`#6B4AC0`},Crown:{hue:300,accent:`#C25AA4`}};function cC(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.name==`string`&&typeof t.mime==`string`&&typeof t.dataUri==`string`&&typeof t.size==`number`}function lC(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.action,r=n===`mint`||n===`transfer`||n===`claim`;return typeof t.ownerPhiKey==`string`&&typeof t.pulse==`number`&&typeof t.beat==`number`&&typeof t.atPulse==`number`&&r}function uC(e){return!!e&&typeof e==`object`}function dC(e){if(!e)return{};if(typeof e==`object`)return e;if(typeof e==`string`)try{let t=JSON.parse(e);if(t&&typeof t==`object`)return t}catch{}return{}}function fC(e){try{let t=new URLSearchParams(e),n=t.get(`p`);if(!n)return null;let r=p(n);if(!r||typeof r!=`object`)return null;let i=r.stepsPerBeat,a=i!=null&&!Number.isNaN(Number(i))?Math.max(1,Math.floor(Number(i))):44,o=r.pulse!=null&&!Number.isNaN(Number(r.pulse))?Number(r.pulse):0,s=r.stepIndex,l=s!=null&&!Number.isNaN(Number(s))?Math.max(0,Math.min(a-1,Math.floor(Number(s)))):void 0,u=typeof r.stepPct==`number`?Math.max(0,Math.min(1,r.stepPct)):Number.isFinite(o)?c(o):0,d=r.expiresAtPulse==null?NaN:Number(r.expiresAtPulse),f=r.exportedAtPulse==null?NaN:Number(r.exportedAtPulse),m=(r.claimExtendUnit||``).toString().toLowerCase(),h=m===`steps`?`steps`:m===`breaths`?`breaths`:void 0,g=r.claimExtendAmount!=null&&!Number.isNaN(Number(r.claimExtendAmount))?Math.max(0,Math.floor(Number(r.claimExtendAmount))):void 0,_=Array.isArray(r.provenance)?r.provenance.filter(lC):void 0,v=cC(r.attachment)?r.attachment:void 0,y=typeof r.zkPoseidonHash==`string`?r.zkPoseidonHash:`0x`,b=uC(r.zkProof)?r.zkProof:{},x=dC(r.ownerPubKey),S=typeof r.ownerSig==`string`?r.ownerSig:``,C=r.eternalRecord??null,w=typeof r.creatorResolved==`boolean`?r.creatorResolved:!1,T=typeof r.origin==`string`?r.origin:``,E=Array.isArray(r.proofHints)?r.proofHints??[]:[],D={pulse:o,beat:Number(r.beat)||0,chakraDay:r.chakraDay,stepIndex:l,stepPct:u,kaiSignature:typeof r.kaiSignature==`string`?r.kaiSignature:void 0,userPhiKey:typeof r.userPhiKey==`string`?r.userPhiKey:void 0,stepsPerBeat:a,provenance:_,attachment:v,expiresAtPulse:Number.isFinite(d)?d:void 0,canonicalHash:typeof r.canonicalHash==`string`?r.canonicalHash:void 0,transferNonce:typeof r.transferNonce==`string`?r.transferNonce:void 0,exportedAtPulse:Number.isFinite(f)?f:void 0,claimExtendUnit:h,claimExtendAmount:g,zkPoseidonHash:y,zkProof:b,ownerPubKey:x,ownerSig:S,eternalRecord:C,creatorResolved:w,origin:T,proofHints:E},O=t.get(`t`);return O&&!D.transferNonce&&(D.transferNonce=O),D}catch{return null}}function pC(e,t){try{let n=fC(e);return n?{payload:n,verified:`ok`,error:null,loading:!1}:{payload:null,verified:t?`notfound`:`checking`,error:null,loading:!1}}catch(e){return{payload:null,verified:`error`,error:e instanceof Error?e.message:`Failed to decode payload`,loading:!1}}}function mC(e,t=null){let[n,r]=(0,G.useState)(void 0),[i,a]=(0,G.useState)(void 0),o=(0,G.useMemo)(()=>pC(e,t),[e,t]),s=n===void 0?o.payload:n,c=i===void 0?o.loading:i;return{payload:s,loading:c,verified:o.verified,error:o.error,setPayload:e=>{r(()=>typeof e==`function`?e(s):e)},setLoading:e=>{a(()=>typeof e==`function`?e(c):e)}}}var hC=A(j(),1);const gC=e=>typeof window>`u`?``:window.btoa(String.fromCharCode(...new Uint8Array(e)));function _C(e,t){e(t),window.setTimeout(()=>e(``),1400)}function vC(){return Promise.resolve(hC.default)}const yC=(e,t=600)=>{let n=window;return typeof n.requestIdleCallback==`function`?n.requestIdleCallback(e,{timeout:t}):window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),90)},bC=e=>{let t=window;typeof t.cancelIdleCallback==`function`?t.cancelIdleCallback(e):window.clearTimeout(e)},xC=async e=>{let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)};function SC(e,t,n){return`hsl(${e} ${t}% ${n}%)`}function CC(e){if(!e)return 0;let t=parseInt(e.slice(-2),16);return Number.isFinite(t)?t%12:0}function wC(e,t,n){return SC(((sC[e]?.hue??180)+CC(n||void 0)*2.5)%360,100,50+15*Math.sin(t*2*Math.PI))}const TC=e=>e.toFixed(6);function EC(e){let t=String(e||``);return t.startsWith(`h:`)?t:`h:${t}`}function DC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function OC(e){if(!e)return null;try{let t=JSON.parse(e);return DC(t)?t:null}catch{return null}}function kC(e){try{let t=Array.from(e.querySelectorAll(`metadata`));if(!t.length)return;let n=t.find(e=>e.getAttribute(`data-noncanonical`)!==`1`&&e.id!==`sigil-display`)??t[0];n&&e.firstChild!==n&&e.insertBefore(n,e.firstChild)}catch(e){console.debug(`ensureCanonicalMetadataFirst failed:`,e)}}function AC(e){let t=Array.from(e.querySelectorAll(`metadata`));return t.length?t.find(e=>e.getAttribute(`data-noncanonical`)!==`1`&&e.id!==`sigil-display`)??t[0]:null}function jC(e,t){try{let n=AC(e);if(!n)return;let r=OC(n.textContent?.trim()??``)??{},i=t(Object.freeze(r));n.textContent=JSON.stringify(i),e.firstChild!==n&&e.insertBefore(n,e.firstChild)}catch(e){console.debug(`rewriteCanonicalMetadata failed:`,e)}}function MC(e,t,n,r){try{let i=`ks-${t}-${n}-`,a=`${i}${r}`,o=a;e.setAttribute(`id`,o),e.setAttribute(`aria-describedby`,`${o}-desc`);let s=e.querySelector(`desc`);s&&s.setAttribute(`id`,`${o}-desc`),e.setAttribute(`data-step-index`,String(r));let c=new Map,l=RegExp(`^${i}(\\d+)(.*)$`);e.querySelectorAll(`[id]`).forEach(e=>{let t=e.getAttribute(`id`)||``,n=l.exec(t);if(!n)return;let i=n[1],o=n[2]||``;if(i!==String(r)){let e=`${a}${o}`;c.set(t,e)}});let u=e.getAttribute(`id`)||``,d=l.exec(u);d&&d[1]!==String(r)&&c.set(u,o),c.forEach((t,n)=>{let r=e.querySelector(`[id="${n}"]`);r&&r.setAttribute(`id`,t)});let f=[`href`,`xlink:href`,`filter`,`mask`,`fill`,`stroke`,`style`,`aria-describedby`],p=(e,t,n)=>e.indexOf(t)===-1?e:e.split(t).join(n);e.querySelectorAll(`*`).forEach(e=>{for(let t of f){let n=e.getAttribute(t);if(!n)continue;let r=n;c.forEach((e,t)=>{r=p(r,`url(#${t}`,`url(#${e}`),r=p(r,`"#${t}"`,`"#${e}"`),r=p(r,`'#${t}'`,`'#${e}'`),r=p(r,`#${t}`,`#${e}`),r=p(r,`"#${t}"`,`"#${e}"`)}),r!==n&&e.setAttribute(t,r)}});let m=RegExp(`(Day\\s+Seal:\\s*${n}\\s*:)\\s*\\d+`),h=/\bstep=\d+\b/g;e.querySelectorAll(`text`).forEach(e=>{let t=e.textContent||``,n=t.replace(m,`$1${r}`);n=n.replace(h,`step=${r}`),n!==t&&(e.textContent=n)});let g=44;try{let t=AC(e),n=t?OC(t.textContent?.trim()):null,r=Number(n?.stepsPerBeat);Number.isFinite(r)&&r>0&&(g=Math.max(1,Math.floor(r)))}catch{}let _=Number(e.getAttribute(`data-steps-per-beat`));Number.isFinite(_)&&_>0&&(g=Math.max(1,Math.floor(_))),jC(e,e=>{let i={...e};if(i.pulse=t,i.kaiPulse=t,i.beat=n,i.stepIndex=r,i.stepsPerBeat=g,typeof i.eternalRecord==`string`){let e=RegExp(`(Day\\s*Seal:\\s*${n}\\s*:)\\s*\\d+`);i.eternalRecord=i.eternalRecord.replace(e,`$1${r}`)}return i}),kC(e)}catch(e){console.debug(`retagSvgIdsForStep failed:`,e)}}function NC(){let e=`sigilpage-crystal-styles`;if(document.getElementById(e))return;let t=document.createElement(`style`);t.id=e,t.innerHTML=` + .sigilpage { --crystal-hue: 180; --crystal-accent: #00FFD0; --glass: hsla(0,0%,100%,0.08); --glass-strong: hsla(0,0%,100%,0.14); --ink: #e8fbff; --ink-dim: #bfe9ff; --ring: hsla(var(--crystal-hue), 95%, 62%, 0.45); --ring2: hsla(calc(var(--crystal-hue) + 24), 92%, 60%, 0.35); --aurora-a: hsla(calc(var(--crystal-hue) + 8), 100%, 60%, 0.25); --aurora-b: hsla(calc(var(--crystal-hue) - 22), 100%, 58%, 0.22); --aurora-c: hsla(calc(var(--crystal-hue) + 48), 100%, 58%, 0.20); color: var(--ink); background: + radial-gradient(1600px 1000px at 10% -10%, rgba(255,255,255,0.04), transparent 60%), + radial-gradient(1200px 900px at 120% 20%, rgba(255,255,255,0.04), transparent 60%), + linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.55)); } + .sp-veil::before, .sp-veil::after { content:""; position: fixed; inset: -10vmax; pointer-events:none; + background: radial-gradient(1000px 700px at 20% 10%, var(--aurora-a), transparent 60%), + radial-gradient(900px 600px at 80% 0%, var(--aurora-b), transparent 55%), + radial-gradient(1200px 800px at 50% 120%, var(--aurora-c), transparent 60%); + filter: blur(40px) saturate(120%); animation: auroraDrift 24s ease-in-out infinite alternate; opacity: .9; z-index: 0; } + .sp-veil::after { animation-duration: 36s; mix-blend-mode: screen; filter: blur(60px) saturate(140%); opacity: .6; } + @keyframes auroraDrift { from { opacity: .35 } to { opacity: .7 } } + .sp-shell { position: relative; z-index: 1; } + .sp-title { position: relative; letter-spacing: 0.02em; text-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 0 24px var(--ring2); } + .sp-title-glow { position: absolute; inset: -8px -12px; border-radius: 18px; background: radial-gradient(120px 60px at 30% 25%, var(--ring), transparent 60%), radial-gradient(180px 100px at 70% 40%, var(--ring2), transparent 60%); filter: blur(24px); opacity: .55; pointer-events: none; animation: glowPulse 6.5s ease-in-out infinite alternate; } + @keyframes glowPulse { from { opacity: .35 } to { opacity: .7 } } + .sp-card { position: relative; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08); border-radius: 22px; box-shadow: 0 20px 70px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.03); overflow: hidden; backdrop-filter: blur(10px) saturate(140%); } + .sp-frame::after { content:""; position: absolute; inset: 0; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,0.04) 75%, transparent 80%), radial-gradient(800px 800px at 50% 50%, rgba(255,255,255,0.06), transparent 70%); mix-blend-mode: overlay; opacity: .6; pointer-events: none; } + .auth-badge { backdrop-filter: blur(8px) saturate(140%); border-radius: 999px; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 6px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08); padding: 6px 10px; } + .auth-badge--ok { background: linear-gradient(180deg, rgba(36,230,162,.22), rgba(0,0,0,.12)); } + .auth-badge--bad { background: linear-gradient(180deg, rgba(255,64,64,.22), rgba(0,0,0,.12)); } + .auth-badge--checking { background: linear-gradient(180deg, rgba(126,167,255,.22), rgba(0,0,0,.12)); } + .archived-badge { margin-left: 12px; padding: 6px 10px; border-radius: 999px; border:1px solid rgba(255,255,255,.18); background: linear-gradient(180deg, rgba(255, 170, 64,.22), rgba(0,0,0,.12)); } + .btn-primary { position: relative; overflow: hidden; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06)); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08); padding: 10px 14px; } + .btn-ghost { border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 8px 12px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); } + button, .btn-primary, .btn-ghost, .sp-actions button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; cursor: pointer; } + + /* Upgrade banner */ + .sp-upgrade{display:grid;gap:10px;margin:16px 0 8px 0;padding:12px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.14);background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.02))} + .sp-upgrade .row{display:flex;flex-wrap:wrap;align-items:center;gap:10px} + .sp-upgrade .pill{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:6px 10px;font-size:12px;border:1px solid rgba(255,255,255,.16);background:linear-gradient(180deg, rgba(255,170,64,.24), rgba(0,0,0,.10))} + .sp-upgrade .muted{opacity:.8;font-size:13px} + .sp-upgrade .spacer{flex:1 1 auto} + .sp-upgrade .upg-btn{border:1px solid rgba(255,255,255,.14);border-radius:12px;padding:8px 12px;cursor:pointer;font-weight:600;background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));box-shadow:0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);color:#eafcff} + .sp-upgrade .upg-btn[disabled]{opacity:.5;cursor:not-allowed} + + /* Live Φ price chip */ + .sp-price-chip{position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));right:calc(12px + env(safe-area-inset-right));z-index:50;display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.16);background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));box-shadow:0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);font-weight:700;letter-spacing:.01em;transform:translateZ(0);will-change:transform} + .sp-price-chip .phi{display:inline-block;width:16px;height:16px;mask-image:var(--phi-url);-webkit-mask-image:var(--phi-url);mask-size:contain;-webkit-mask-size:contain;background:currentColor} + .sp-price-chip .price{min-width:8ch;text-align:right} + .sp-price-chip .live-badge{font-size:10px;opacity:.8;border:1px solid rgba(255,255,255,.18);padding:2px 6px;border-radius:999px;margin-left:4px} + .sp-price-chip.flash-up{animation:chipUp .45s ease} + .sp-price-chip.flash-down{animation:chipDown .45s ease} + @keyframes chipUp{from{box-shadow:0 0 0 rgba(0,0,0,0)} to{box-shadow:0 0 24px rgba(64,255,128,.35)}} + @keyframes chipDown{from{box-shadow:0 0 0 rgba(0,0,0,0)} to{box-shadow:0 0 24px rgba(255,96,96,.28)}} + `,document.head.appendChild(t)}async function PC(e,t,n,r,i){let a=e.stepsPerBeat??44,o=Math.floor(e.pulse%(a*11)/11),s=[`kai.v1`,e.pulse,e.beat,o,a,e.chakraDay??``,t||``,n,r,i].join(`|`),c=await xC(`owner|`+s),l=await xC(`kaisig|`+s);return{ownerPhiKey:`phikey_${c.slice(0,48)}`,kaiSig:`kai_sig_${l.slice(0,48)}`}}var FC=x((e=>{var t=N(),n=b();function r(e){var t=`https://react.dev/errors/`+e;if(1>>16)&65535)<<16)&4294967295,a=a<<15|a>>>17,a=461845907*(a&65535)+((461845907*(a>>>16)&65535)<<16)&4294967295,i^=a,i=i<<13|i>>>19,i=5*(i&65535)+((5*(i>>>16)&65535)<<16)&4294967295,i=(i&65535)+27492+(((i>>>16)+58964&65535)<<16)}switch(a=0,n){case 3:a^=(e.charCodeAt(t+2)&255)<<16;case 2:a^=(e.charCodeAt(t+1)&255)<<8;case 1:a^=e.charCodeAt(t)&255,a=3432918353*(a&65535)+((3432918353*(a>>>16)&65535)<<16)&4294967295,a=a<<15|a>>>17,i^=461845907*(a&65535)+((461845907*(a>>>16)&65535)<<16)&4294967295}return i^=e.length,i^=i>>>16,i=2246822507*(i&65535)+((2246822507*(i>>>16)&65535)<<16)&4294967295,i^=i>>>13,i=3266489909*(i&65535)+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^i>>>16)>>>0}var E=Object.assign,D=Object.prototype.hasOwnProperty,O=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),k={},A={};function j(e){return D.call(A,e)?!0:D.call(k,e)?!1:O.test(e)?A[e]=!0:(k[e]=!0,!1)}var M=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `)),P=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),F=/["'&<>]/;function I(e){if(typeof e==`boolean`||typeof e==`number`||typeof e==`bigint`)return``+e;e=``+e;var t=F.exec(e);if(t){var n=``,r,i=0;for(r=t.index;re.insertionMode)return H(3,null,r,null);break;case`html`:if(e.insertionMode===0)return H(1,null,r,null)}return 6<=e.insertionMode||2>e.insertionMode?H(2,null,r,null):e.tagScope===r?e:H(e.insertionMode,e.selectedValue,r,null)}function U(e){return e===null?null:{update:e.update,enter:`none`,exit:`none`,share:e.update,name:e.autoName,autoName:e.autoName,nameIdx:0}}function le(e,t){return t.tagScope&32&&(e.instructions|=128),H(t.insertionMode,t.selectedValue,t.tagScope|12,U(t.viewTransition))}function W(e,t){e=U(t.viewTransition);var n=t.tagScope|16;return e!==null&&e.share!==`none`&&(n|=64),H(t.insertionMode,t.selectedValue,n,e)}var ue=new Map;function G(e,t){if(typeof t!=`object`)throw Error(r(62));var n=!0,i;for(i in t)if(D.call(t,i)){var a=t[i];if(a!=null&&typeof a!=`boolean`&&a!==``){if(i.indexOf(`--`)===0){var o=I(i);a=I((``+a).trim())}else o=ue.get(i),o===void 0&&(o=I(i.replace(ee,`-$1`).toLowerCase().replace(te,`-ms-`)),ue.set(i,o)),a=typeof a==`number`?a===0||M.has(i)?``+a:a+`px`:I((``+a).trim());n?(n=!1,e.push(` style="`,o,`:`,a)):e.push(`;`,o,`:`,a)}}n||e.push(`"`)}function K(e,t,n){n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`=""`)}function q(e,t,n){typeof n!=`function`&&typeof n!=`symbol`&&typeof n!=`boolean`&&e.push(` `,t,`="`,I(n),`"`)}var de=I(`javascript:throw new Error('React form unexpectedly submitted.')`);function fe(e,t){this.push(``)}function pe(e){if(typeof e!=`string`)throw Error(r(480))}function me(e,t){if(typeof t.$$FORM_ACTION==`function`){var n=e.nextFormID++;e=e.idPrefix+n;try{var r=t.$$FORM_ACTION(e);return r&&r.data?.forEach(pe),r}catch(e){if(typeof e==`object`&&e&&typeof e.then==`function`)throw e}}return null}function he(e,t,n,r,i,a,o,s){var c=null;if(typeof r==`function`){var l=me(t,r);l===null?(e.push(` `,`formAction`,`="`,de,`"`),o=a=i=r=s=null,ye(t,n)):(s=l.name,r=l.action||``,i=l.encType,a=l.method,o=l.target,c=l.data)}return s!=null&&ge(e,`name`,s),r!=null&&ge(e,`formAction`,r),i!=null&&ge(e,`formEncType`,i),a!=null&&ge(e,`formMethod`,a),o!=null&&ge(e,`formTarget`,o),c}function ge(e,t,n){switch(t){case`className`:q(e,`class`,n);break;case`tabIndex`:q(e,`tabindex`,n);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:q(e,t,n);break;case`style`:G(e,n);break;case`src`:case`href`:if(n===``)break;case`action`:case`formAction`:if(n==null||typeof n==`function`||typeof n==`symbol`||typeof n==`boolean`)break;n=R(``+n),e.push(` `,t,`="`,I(n),`"`);break;case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`ref`:break;case`autoFocus`:case`multiple`:case`muted`:K(e,t.toLowerCase(),n);break;case`xlinkHref`:if(typeof n==`function`||typeof n==`symbol`||typeof n==`boolean`)break;n=R(``+n),e.push(` `,`xlink:href`,`="`,I(n),`"`);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`="`,I(n),`"`);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`=""`);break;case`capture`:case`download`:!0===n?e.push(` `,t,`=""`):!1!==n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`="`,I(n),`"`);break;case`cols`:case`rows`:case`size`:case`span`:typeof n!=`function`&&typeof n!=`symbol`&&!isNaN(n)&&1<=n&&e.push(` `,t,`="`,I(n),`"`);break;case`rowSpan`:case`start`:typeof n==`function`||typeof n==`symbol`||isNaN(n)||e.push(` `,t,`="`,I(n),`"`);break;case`xlinkActuate`:q(e,`xlink:actuate`,n);break;case`xlinkArcrole`:q(e,`xlink:arcrole`,n);break;case`xlinkRole`:q(e,`xlink:role`,n);break;case`xlinkShow`:q(e,`xlink:show`,n);break;case`xlinkTitle`:q(e,`xlink:title`,n);break;case`xlinkType`:q(e,`xlink:type`,n);break;case`xmlBase`:q(e,`xml:base`,n);break;case`xmlLang`:q(e,`xml:lang`,n);break;case`xmlSpace`:q(e,`xml:space`,n);break;default:if((!(2`,`addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});`,`<\/script>`)):r.unshift(t.startInlineScript,`>`,`addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});`,`<\/script>`)}}function be(e,t){for(var n in e.push(ke(`link`)),t)if(D.call(t,n)){var i=t[n];if(i!=null)switch(n){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,`link`));default:ge(e,n,i)}}return e.push(`/>`),null}var xe=/(<\/|<)(s)(tyle)/gi;function Se(e,t,n,r){return``+t+(n===`s`?`\\73 `:`\\53 `)+r}function Ce(e,t,n){for(var i in e.push(ke(n)),t)if(D.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,n));default:ge(e,i,a)}}return e.push(`/>`),null}function we(e,t){e.push(ke(`title`));var n=null,r=null,i;for(i in t)if(D.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:ge(e,i,a)}}return e.push(`>`),t=Array.isArray(n)?2>n.length?n[0]:null:n,typeof t!=`function`&&typeof t!=`symbol`&&t!=null&&e.push(I(``+t)),_e(e,r,n),e.push(Me(`title`)),null}function J(e,t){e.push(ke(`script`));var n=null,r=null,i;for(i in t)if(D.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:ge(e,i,a)}}return e.push(`>`),_e(e,r,n),typeof n==`string`&&e.push((``+n).replace(ae,oe)),e.push(Me(`script`)),null}function Te(e,t,n){e.push(ke(n));var r=n=null,i;for(i in t)if(D.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:ge(e,i,a)}}return e.push(`>`),_e(e,r,n),n}function Ee(e,t,n){e.push(ke(n));var r=n=null,i;for(i in t)if(D.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:ge(e,i,a)}}return e.push(`>`),_e(e,r,n),typeof n==`string`?(e.push(I(n)),null):n}var De=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Oe=new Map;function ke(e){var t=Oe.get(e);if(t===void 0){if(!De.test(e))throw Error(r(65,e));t=`<`+e,Oe.set(e,t)}return t}function Ae(e,t,n,i,a,o,s,c,l){switch(t){case`div`:case`span`:case`svg`:case`path`:break;case`a`:e.push(ke(`a`));var u=null,d=null,f;for(f in n)if(D.call(n,f)){var p=n[f];if(p!=null)switch(f){case`children`:u=p;break;case`dangerouslySetInnerHTML`:d=p;break;case`href`:p===``?q(e,`href`,``):ge(e,f,p);break;default:ge(e,f,p)}}if(e.push(`>`),_e(e,d,u),typeof u==`string`){e.push(I(u));var m=null}else m=u;return m;case`g`:case`p`:case`li`:break;case`select`:e.push(ke(`select`));var h=null,g=null,_;for(_ in n)if(D.call(n,_)){var v=n[_];if(v!=null)switch(_){case`children`:h=v;break;case`dangerouslySetInnerHTML`:g=v;break;case`defaultValue`:case`value`:break;default:ge(e,_,v)}}return e.push(`>`),_e(e,g,h),h;case`option`:var y=c.selectedValue;e.push(ke(`option`));var b=null,x=null,S=null,C=null,T;for(T in n)if(D.call(n,T)){var O=n[T];if(O!=null)switch(T){case`children`:b=O;break;case`selected`:S=O;break;case`dangerouslySetInnerHTML`:C=O;break;case`value`:x=O;default:ge(e,T,O)}}if(y!=null){var k=x===null?ve(b):``+x;if(w(y)){for(var A=0;A`),_e(e,C,b),b;case`textarea`:e.push(ke(`textarea`));var M=null,N=null,P=null,F;for(F in n)if(D.call(n,F)){var ee=n[F];if(ee!=null)switch(F){case`children`:P=ee;break;case`value`:M=ee;break;case`defaultValue`:N=ee;break;case`dangerouslySetInnerHTML`:throw Error(r(91));default:ge(e,F,ee)}}if(M===null&&N!==null&&(M=N),e.push(`>`),P!=null){if(M!=null)throw Error(r(92));if(w(P)){if(1`),ce?.forEach(fe,e),null;case`button`:e.push(ke(`button`));var U=null,le=null,W=null,ue=null,pe=null,De=null,Oe=null,Ae;for(Ae in n)if(D.call(n,Ae)){var je=n[Ae];if(je!=null)switch(Ae){case`children`:U=je;break;case`dangerouslySetInnerHTML`:le=je;break;case`name`:W=je;break;case`formAction`:ue=je;break;case`formEncType`:pe=je;break;case`formMethod`:De=je;break;case`formTarget`:Oe=je;break;default:ge(e,Ae,je)}}var Ne=he(e,i,a,ue,pe,De,Oe,W);if(e.push(`>`),Ne?.forEach(fe,e),_e(e,le,U),typeof U==`string`){e.push(I(U));var Pe=null}else Pe=U;return Pe;case`form`:e.push(ke(`form`));var Fe=null,Ie=null,Le=null,Re=null,ze=null,Be=null,Ve;for(Ve in n)if(D.call(n,Ve)){var He=n[Ve];if(He!=null)switch(Ve){case`children`:Fe=He;break;case`dangerouslySetInnerHTML`:Ie=He;break;case`action`:Le=He;break;case`encType`:Re=He;break;case`method`:ze=He;break;case`target`:Be=He;break;default:ge(e,Ve,He)}}var Ue=null,We=null;if(typeof Le==`function`){var Ge=me(i,Le);Ge===null?(e.push(` `,`action`,`="`,de,`"`),Be=ze=Re=Le=null,ye(i,a)):(Le=Ge.action||``,Re=Ge.encType,ze=Ge.method,Be=Ge.target,Ue=Ge.data,We=Ge.name)}if(Le!=null&&ge(e,`action`,Le),Re!=null&&ge(e,`encType`,Re),ze!=null&&ge(e,`method`,ze),Be!=null&&ge(e,`target`,Be),e.push(`>`),We!==null&&(e.push(``),Ue?.forEach(fe,e)),_e(e,Ie,Fe),typeof Fe==`string`){e.push(I(Fe));var Ke=null}else Ke=Fe;return Ke;case`menuitem`:for(var qe in e.push(ke(`menuitem`)),n)if(D.call(n,qe)){var Je=n[qe];if(Je!=null)switch(qe){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(400));default:ge(e,qe,Je)}}return e.push(`>`),null;case`object`:e.push(ke(`object`));var Ye=null,Xe=null,Ze;for(Ze in n)if(D.call(n,Ze)){var Qe=n[Ze];if(Qe!=null)switch(Ze){case`children`:Ye=Qe;break;case`dangerouslySetInnerHTML`:Xe=Qe;break;case`data`:var $e=R(``+Qe);if($e===``)break;e.push(` `,`data`,`="`,I($e),`"`);break;default:ge(e,Ze,Qe)}}if(e.push(`>`),_e(e,Xe,Ye),typeof Ye==`string`){e.push(I(Ye));var et=null}else et=Ye;return et;case`title`:var tt=c.tagScope&1,nt=c.tagScope&4;if(c.insertionMode===4||tt||n.itemProp!=null)var rt=we(e,n);else nt?rt=null:(we(a.hoistableChunks,n),rt=void 0);return rt;case`link`:var it=c.tagScope&1,at=c.tagScope&4,ot=n.rel,st=n.href,ct=n.precedence;if(c.insertionMode===4||it||n.itemProp!=null||typeof ot!=`string`||typeof st!=`string`||st===``){be(e,n);var lt=null}else if(n.rel===`stylesheet`)if(typeof ct!=`string`||n.disabled!=null||n.onLoad||n.onError)lt=be(e,n);else{var ft=a.styles.get(ct),pt=i.styleResources.hasOwnProperty(st)?i.styleResources[st]:void 0;if(pt!==null){i.styleResources[st]=null,ft||(ft={precedence:I(ct),rules:[],hrefs:[],sheets:new Map},a.styles.set(ct,ft));var mt={state:0,props:E({},n,{"data-precedence":n.precedence,precedence:null})};if(pt){pt.length===2&&ut(mt.props,pt);var ht=a.preloads.stylesheets.get(st);ht&&0`),lt=null}else n.onLoad||n.onError?lt=be(e,n):(l&&e.push(``),lt=at?null:be(a.hoistableChunks,n));return lt;case`script`:var _t=c.tagScope&1,vt=n.async;if(typeof n.src!=`string`||!n.src||!vt||typeof vt==`function`||typeof vt==`symbol`||n.onLoad||n.onError||c.insertionMode===4||_t||n.itemProp!=null)var yt=J(e,n);else{var bt=n.src;if(n.type===`module`)var xt=i.moduleScriptResources,St=a.preloads.moduleScripts;else xt=i.scriptResources,St=a.preloads.scripts;var Ct=xt.hasOwnProperty(bt)?xt[bt]:void 0;if(Ct!==null){xt[bt]=null;var wt=n;if(Ct){Ct.length===2&&(wt=E({},n),ut(wt,Ct));var Tt=St.get(bt);Tt&&(Tt.length=0)}var Et=[];a.scripts.add(Et),J(Et,wt)}l&&e.push(``),yt=null}return yt;case`style`:var Dt=c.tagScope&1,Ot=n.precedence,kt=n.href,At=n.nonce;if(c.insertionMode===4||Dt||n.itemProp!=null||typeof Ot!=`string`||typeof kt!=`string`||kt===``){e.push(ke(`style`));var jt=null,Mt=null,Nt;for(Nt in n)if(D.call(n,Nt)){var Pt=n[Nt];if(Pt!=null)switch(Nt){case`children`:jt=Pt;break;case`dangerouslySetInnerHTML`:Mt=Pt;break;default:ge(e,Nt,Pt)}}e.push(`>`);var Ft=Array.isArray(jt)?2>jt.length?jt[0]:null:jt;typeof Ft!=`function`&&typeof Ft!=`symbol`&&Ft!=null&&e.push((``+Ft).replace(xe,Se)),_e(e,Mt,jt),e.push(Me(`style`));var It=null}else{var Lt=a.styles.get(Ot);if((i.styleResources.hasOwnProperty(kt)?i.styleResources[kt]:void 0)!==null){i.styleResources[kt]=null,Lt||(Lt={precedence:I(Ot),rules:[],hrefs:[],sheets:new Map},a.styles.set(Ot,Lt));var Rt=a.nonce.style;if(!Rt||Rt===At){Lt.hrefs.push(I(kt));var zt=Lt.rules,Bt=null,Vt=null,Ht;for(Ht in n)if(D.call(n,Ht)){var Ut=n[Ht];if(Ut!=null)switch(Ht){case`children`:Bt=Ut;break;case`dangerouslySetInnerHTML`:Vt=Ut}}var Wt=Array.isArray(Bt)?2>Bt.length?Bt[0]:null:Bt;typeof Wt!=`function`&&typeof Wt!=`symbol`&&Wt!=null&&zt.push((``+Wt).replace(xe,Se)),_e(zt,Vt,Bt)}}Lt&&s&&s.styles.add(Lt),l&&e.push(``),It=void 0}return It;case`meta`:var Gt=c.tagScope&1,Kt=c.tagScope&4;if(c.insertionMode===4||Gt||n.itemProp!=null)var qt=Ce(e,n,`meta`);else l&&e.push(``),qt=Kt?null:typeof n.charSet==`string`?Ce(a.charsetChunks,n,`meta`):n.name===`viewport`?Ce(a.viewportChunks,n,`meta`):Ce(a.hoistableChunks,n,`meta`);return qt;case`listing`:case`pre`:e.push(ke(t));var Jt=null,Yt=null,Xt;for(Xt in n)if(D.call(n,Xt)){var Zt=n[Xt];if(Zt!=null)switch(Xt){case`children`:Jt=Zt;break;case`dangerouslySetInnerHTML`:Yt=Zt;break;default:ge(e,Xt,Zt)}}if(e.push(`>`),Yt!=null){if(Jt!=null)throw Error(r(60));if(typeof Yt!=`object`||!(`__html`in Yt))throw Error(r(61));var Qt=Yt.__html;Qt!=null&&(typeof Qt==`string`&&0a.highImagePreloads.size)&&(an.delete(rn),a.highImagePreloads.add(on));else if(!i.imageResources.hasOwnProperty(rn)){i.imageResources[rn]=re;var sn=n.crossOrigin,cn=typeof sn==`string`?sn===`use-credentials`?sn:``:void 0,ln=a.headers,un;ln&&0ln.highImagePreloads.length)&&(un=dt(en,`image`,{imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:cn,integrity:n.integrity,nonce:n.nonce,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.refererPolicy}),0<=(ln.remainingCapacity-=un.length+2))?(a.resets.image[rn]=re,ln.highImagePreloads&&(ln.highImagePreloads+=`, `),ln.highImagePreloads+=un):(on=[],be(on,{rel:`preload`,as:`image`,href:tn?void 0:en,imageSrcSet:tn,imageSizes:nn,crossOrigin:cn,integrity:n.integrity,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy}),n.fetchPriority===`high`||10>a.highImagePreloads.size?a.highImagePreloads.add(on):(a.bulkPreloads.add(on),an.set(rn,on)))}}return Ce(e,n,`img`);case`base`:case`area`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`param`:case`source`:case`track`:case`wbr`:return Ce(e,n,t);case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:break;case`head`:if(2>c.insertionMode){var dn=o||a.preamble;if(dn.headChunks)throw Error(r(545,"``"));o!==null&&e.push(``),dn.headChunks=[];var fn=Te(dn.headChunks,n,`head`)}else fn=Ee(e,n,`head`);return fn;case`body`:if(2>c.insertionMode){var pn=o||a.preamble;if(pn.bodyChunks)throw Error(r(545,"``"));o!==null&&e.push(``),pn.bodyChunks=[];var mn=Te(pn.bodyChunks,n,`body`)}else mn=Ee(e,n,`body`);return mn;case`html`:if(c.insertionMode===0){var hn=o||a.preamble;if(hn.htmlChunks)throw Error(r(545,"``"));o!==null&&e.push(``),hn.htmlChunks=[``];var gn=Te(hn.htmlChunks,n,`html`)}else gn=Ee(e,n,`html`);return gn;default:if(t.indexOf(`-`)!==-1){e.push(ke(t));var _n=null,vn=null,yn;for(yn in n)if(D.call(n,yn)){var bn=n[yn];if(bn!=null){var xn=yn;switch(yn){case`children`:_n=bn;break;case`dangerouslySetInnerHTML`:vn=bn;break;case`style`:G(e,bn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`ref`:break;case`className`:xn=`class`;default:if(j(yn)&&typeof bn!=`function`&&typeof bn!=`symbol`&&!1!==bn){if(!0===bn)bn=``;else if(typeof bn==`object`)continue;e.push(` `,xn,`="`,I(bn),`"`)}}}}return e.push(`>`),_e(e,vn,_n),_n}}return Ee(e,n,t)}var je=new Map;function Me(e){var t=je.get(e);return t===void 0&&(t=``,je.set(e,t)),t}function Ne(e,t){e=e.preamble,e.htmlChunks===null&&t.htmlChunks&&(e.htmlChunks=t.htmlChunks),e.headChunks===null&&t.headChunks&&(e.headChunks=t.headChunks),e.bodyChunks===null&&t.bodyChunks&&(e.bodyChunks=t.bodyChunks)}function Pe(e,t){t=t.bootstrapChunks;for(var n=0;n`)}function Ie(e,t,n,i){switch(n.insertionMode){case 0:case 1:case 3:case 2:return e.push(`