diff --git a/bun.lock b/bun.lock index 676c8a5..1aad9d7 100644 --- a/bun.lock +++ b/bun.lock @@ -90,9 +90,9 @@ "@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], - "@cacheable/memory": ["@cacheable/memory@2.0.7", "", { "dependencies": { "@cacheable/utils": "^2.3.3", "@keyv/bigmap": "^1.3.0", "hookified": "^1.14.0", "keyv": "^5.5.5" } }, "sha512-RbxnxAMf89Tp1dLhXMS7ceft/PGsDl1Ip7T20z5nZ+pwIAsQ1p2izPjVG69oCLv/jfQ7HDPHTWK0c9rcAWXN3A=="], + "@cacheable/memory": ["@cacheable/memory@2.0.8", "", { "dependencies": { "@cacheable/utils": "^2.4.0", "@keyv/bigmap": "^1.3.1", "hookified": "^1.15.1", "keyv": "^5.6.0" } }, "sha512-FvEb29x5wVwu/Kf93IWwsOOEuhHh6dYCJF3vcKLzXc0KXIW181AOzv6ceT4ZpBHDvAfG60eqb+ekmrnLHIy+jw=="], - "@cacheable/utils": ["@cacheable/utils@2.3.4", "", { "dependencies": { "hashery": "^1.3.0", "keyv": "^5.6.0" } }, "sha512-knwKUJEYgIfwShABS1BX6JyJJTglAFcEU7EXqzTdiGCXur4voqkiJkdgZIQtWNFhynzDWERcTYv/sETMu3uJWA=="], + "@cacheable/utils": ["@cacheable/utils@2.4.0", "", { "dependencies": { "hashery": "^1.5.0", "keyv": "^5.6.0" } }, "sha512-PeMMsqjVq+bF0WBsxFBxr/WozBJiZKY0rUojuaCoIaKnEl3Ju1wfEwS+SV1DU/cSe8fqHIPiYJFif8T3MVt4cQ=="], "@devicefarmer/adbkit": ["@devicefarmer/adbkit@3.3.8", "", { "dependencies": { "@devicefarmer/adbkit-logcat": "^2.1.2", "@devicefarmer/adbkit-monkey": "~1.2.1", "bluebird": "~3.7", "commander": "^9.1.0", "debug": "~4.3.1", "node-forge": "^1.3.1", "split": "~1.0.1" }, "bin": { "adbkit": "bin/adbkit" } }, "sha512-7rBLLzWQnBwutH2WZ0EWUkQdihqrnLYCUMaB44hSol9e0/cdIhuNFcqZO0xNheAU6qqHVA8sMiLofkYTgb+lmw=="], @@ -152,7 +152,7 @@ "@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.3", "", { "os": "win32", "cpu": "x64" }, "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA=="], - "@hono/node-server": ["@hono/node-server@1.19.9", "", { "peerDependencies": { "hono": "^4" } }, "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw=="], + "@hono/node-server": ["@hono/node-server@1.19.11", "", { "peerDependencies": { "hono": "^4" } }, "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g=="], "@isaacs/cliui": ["@isaacs/cliui@9.0.0", "", {}, "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg=="], @@ -180,7 +180,7 @@ "@kvs/types": ["@kvs/types@1.2.0", "", {}, "sha512-88x1wFRMYg6DyCuX2jeLx2s8q7H3ayRtPD+OVhsSC5v7ek+FP7cv9ooVCC/+Ib5QzNWzkZpd4Uap6O9HrAxq6g=="], - "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.26.0", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg=="], + "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.27.1", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA=="], "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="], @@ -412,7 +412,7 @@ "boxen": ["boxen@8.0.1", "", { "dependencies": { "ansi-align": "^3.0.1", "camelcase": "^8.0.0", "chalk": "^5.3.0", "cli-boxes": "^3.0.0", "string-width": "^7.2.0", "type-fest": "^4.21.0", "widest-line": "^5.0.0", "wrap-ansi": "^9.0.0" } }, "sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw=="], - "brace-expansion": ["brace-expansion@5.0.3", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA=="], + "brace-expansion": ["brace-expansion@5.0.4", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg=="], "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], @@ -430,7 +430,7 @@ "cac": ["cac@6.7.14", "", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="], - "cacheable": ["cacheable@2.3.2", "", { "dependencies": { "@cacheable/memory": "^2.0.7", "@cacheable/utils": "^2.3.3", "hookified": "^1.15.0", "keyv": "^5.5.5", "qified": "^0.6.0" } }, "sha512-w+ZuRNmex9c1TR9RcsxbfTKCjSL0rh1WA5SABbrWprIHeNBdmyQLSYonlDy9gpD+63XT8DgZ/wNh1Smvc9WnJA=="], + "cacheable": ["cacheable@2.3.3", "", { "dependencies": { "@cacheable/memory": "^2.0.8", "@cacheable/utils": "^2.4.0", "hookified": "^1.15.0", "keyv": "^5.6.0", "qified": "^0.6.0" } }, "sha512-iffYMX4zxKp54evOH27fm92hs+DeC1DhXmNVN8Tr94M/iZIV42dqTHSR2Ik4TOSPyOAwKr7Yu3rN9ALoLkbWyQ=="], "call-bind": ["call-bind@1.0.8", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.2" } }, "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww=="], @@ -440,7 +440,7 @@ "camelcase": ["camelcase@8.0.0", "", {}, "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA=="], - "caniuse-lite": ["caniuse-lite@1.0.30001772", "", {}, "sha512-mIwLZICj+ntVTw4BT2zfp+yu/AqV6GMKfJVJMx3MwPxs+uk/uj2GLl2dH8LQbjiLDX66amCga5nKFyDgRR43kg=="], + "caniuse-lite": ["caniuse-lite@1.0.30001777", "", {}, "sha512-tmN+fJxroPndC74efCdp12j+0rk0RHwV5Jwa1zWaFVyw2ZxAuPeG8ZgWC3Wz7uSjT3qMRQ5XHZ4COgQmsCMJAQ=="], "ccount": ["ccount@1.1.0", "", {}, "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg=="], @@ -470,7 +470,7 @@ "cli-spinners": ["cli-spinners@3.4.0", "", {}, "sha512-bXfOC4QcT1tKXGorxL3wbJm6XJPDqEnij2gQ2m7ESQuE+/z9YFIWnl/5RpTiKWbMq3EVKR4fRLJGn6DVfu0mpw=="], - "cli-truncate": ["cli-truncate@5.1.1", "", { "dependencies": { "slice-ansi": "^7.1.0", "string-width": "^8.0.0" } }, "sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A=="], + "cli-truncate": ["cli-truncate@5.2.0", "", { "dependencies": { "slice-ansi": "^8.0.0", "string-width": "^8.2.0" } }, "sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw=="], "cliui": ["cliui@8.0.1", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="], @@ -480,8 +480,6 @@ "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], - "colorette": ["colorette@2.0.20", "", {}, "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="], - "comma-separated-tokens": ["comma-separated-tokens@1.0.8", "", {}, "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw=="], "commander": ["commander@9.5.0", "", {}, "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="], @@ -588,7 +586,7 @@ "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], - "electron-to-chromium": ["electron-to-chromium@1.5.302", "", {}, "sha512-sM6HAN2LyK82IyPBpznDRqlTQAtuSaO+ShzFiWTvoMJLHyZ+Y39r8VMfHzwbU8MVBzQ4Wdn85+wlZl2TLGIlwg=="], + "electron-to-chromium": ["electron-to-chromium@1.5.307", "", {}, "sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg=="], "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], @@ -642,7 +640,7 @@ "express": ["express@5.2.1", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw=="], - "express-rate-limit": ["express-rate-limit@8.2.1", "", { "dependencies": { "ip-address": "10.0.1" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g=="], + "express-rate-limit": ["express-rate-limit@8.3.0", "", { "dependencies": { "ip-address": "10.1.0" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-KJzBawY6fB9FiZGdE/0aftepZ91YlaGIrV8vgblRM3J8X+dHx/aiowJWwkx6LIGyuqGiANsjSwwrbb8mifOJ4Q=="], "exsolve": ["exsolve@1.0.8", "", {}, "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA=="], @@ -684,7 +682,7 @@ "flat-cache": ["flat-cache@6.1.20", "", { "dependencies": { "cacheable": "^2.3.2", "flatted": "^3.3.3", "hookified": "^1.15.0" } }, "sha512-AhHYqwvN62NVLp4lObVXGVluiABTHapoB57EyegZVmazN+hhGhLTn3uZbOofoTw4DSDvVCadzzyChXhOAvy8uQ=="], - "flatted": ["flatted@3.3.3", "", {}, "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg=="], + "flatted": ["flatted@3.4.0", "", {}, "sha512-kC6Bb+ooptOIvWj5B63EQWkF0FEnNjV2ZNkLMLZRDDduIiWeFF4iKnslwhiWxjAdbg4NzTNo6h0qLuvFrcx+Sw=="], "for-each": ["for-each@0.3.5", "", { "dependencies": { "is-callable": "^1.2.7" } }, "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg=="], @@ -700,7 +698,7 @@ "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], - "fs-extra": ["fs-extra@11.3.3", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg=="], + "fs-extra": ["fs-extra@11.3.4", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA=="], "fs.realpath": ["fs.realpath@1.0.0", "", {}, "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="], @@ -778,7 +776,7 @@ "hastscript": ["hastscript@5.1.2", "", { "dependencies": { "comma-separated-tokens": "^1.0.0", "hast-util-parse-selector": "^2.0.0", "property-information": "^5.0.0", "space-separated-tokens": "^1.0.0" } }, "sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ=="], - "hono": ["hono@4.12.1", "", {}, "sha512-hi9afu8g0lfJVLolxElAZGANCTTl6bewIdsRNhaywfP9K8BPf++F2z6OLrYGIinUwpRKzbZHMhPwvc0ZEpAwGw=="], + "hono": ["hono@4.12.5", "", {}, "sha512-3qq+FUBtlTHhtYxbxheZgY8NIFnkkC/MR8u5TTsr7YZ3wixryQ3cCwn3iZbg8p8B88iDBBAYSfZDS75t8MN7Vg=="], "hookable": ["hookable@6.0.1", "", {}, "sha512-uKGyY8BuzN/a5gvzvA+3FVWo0+wUjgtfSdnmjtrOVwQCZPHpHDH2WRO3VZSOeluYrHoDCiXFffZXs8Dj1ULWtw=="], @@ -812,7 +810,7 @@ "internal-slot": ["internal-slot@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.2", "side-channel": "^1.1.0" } }, "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw=="], - "ip-address": ["ip-address@10.0.1", "", {}, "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA=="], + "ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="], "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], @@ -936,7 +934,7 @@ "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], - "jose": ["jose@6.1.3", "", {}, "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ=="], + "jose": ["jose@6.2.0", "", {}, "sha512-xsfE1TcSCbUdo6U07tR0mvhg0flGxU8tPLbF03mirl2ukGQENhUg4ubGYQnhVH0b5stLlPM+WOqDkEl1R1y5sQ=="], "js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="], @@ -984,7 +982,7 @@ "linkedom": ["linkedom@0.18.12", "", { "dependencies": { "css-select": "^5.1.0", "cssom": "^0.5.0", "html-escaper": "^3.0.3", "htmlparser2": "^10.0.0", "uhyphen": "^0.2.0" }, "peerDependencies": { "canvas": ">= 2" }, "optionalPeers": ["canvas"] }, "sha512-jalJsOwIKuQJSeTvsgzPe9iJzyfVaEJiEXl+25EkKevsULHvMJzpNqwvj1jOESWdmgKDiXObyjOYwlUqG7wo1Q=="], - "listr2": ["listr2@10.1.0", "", { "dependencies": { "cli-truncate": "^5.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", "log-update": "^7.0.2", "rfdc": "^1.4.1", "wrap-ansi": "^9.0.0" } }, "sha512-/6t2KgDYIcCjhELwvrRxi1gaJ4xCGLTjNvh6mSjYenBkrZxggek8EwCbwBU33GMUCpyyrOzz2TzylrO5mTiI1w=="], + "listr2": ["listr2@10.2.1", "", { "dependencies": { "cli-truncate": "^5.2.0", "eventemitter3": "^5.0.4", "log-update": "^6.1.0", "rfdc": "^1.4.1", "wrap-ansi": "^10.0.0" } }, "sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q=="], "local-pkg": ["local-pkg@1.1.2", "", { "dependencies": { "mlly": "^1.7.4", "pkg-types": "^2.3.0", "quansync": "^0.2.11" } }, "sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A=="], @@ -1016,7 +1014,7 @@ "log-symbols": ["log-symbols@7.0.1", "", { "dependencies": { "is-unicode-supported": "^2.0.0", "yoctocolors": "^2.1.1" } }, "sha512-ja1E3yCr9i/0hmBVaM0bfwDjnGy8I/s6PP4DFp+yP+a+mrHO4Rm7DtmnqROTUkHIkqffC84YY7AeqX6oFk0WFg=="], - "log-update": ["log-update@7.1.0", "", { "dependencies": { "ansi-escapes": "^7.1.0", "cli-cursor": "^5.0.0", "slice-ansi": "^7.1.2", "strip-ansi": "^7.1.2", "wrap-ansi": "^9.0.2" } }, "sha512-y9pi/ZOQQVvTgfRDEHV1Cj4zQUkJZPipEUNOxhn1R6KgmdMs7LKvXWCd9eMVPGJgvYzFLCenecWr0Ps8ChVv2A=="], + "log-update": ["log-update@6.1.0", "", { "dependencies": { "ansi-escapes": "^7.0.0", "cli-cursor": "^5.0.0", "slice-ansi": "^7.1.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w=="], "longest-streak": ["longest-streak@2.0.4", "", {}, "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg=="], @@ -1098,7 +1096,7 @@ "mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="], - "minimatch": ["minimatch@10.2.2", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-+G4CpNBxa5MprY+04MbgOw1v7So6n5JY166pFi9KfYwT78fxScCeSNQSNzp6dpPSW2rONOps6Ocam1wFhCgoVw=="], + "minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="], "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], @@ -1106,7 +1104,7 @@ "mkdirp": ["mkdirp@1.0.4", "", { "bin": { "mkdirp": "bin/cmd.js" } }, "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="], - "mlly": ["mlly@1.8.0", "", { "dependencies": { "acorn": "^8.15.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.1" } }, "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g=="], + "mlly": ["mlly@1.8.1", "", { "dependencies": { "acorn": "^8.16.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.3" } }, "sha512-SnL6sNutTwRWWR/vcmCYHSADjiEesp5TGQQ0pXyLhW5IoeibRlF/CbSLailbB3CNqJUk9cVJ9dUDnbD7GrcHBQ=="], "moji": ["moji@0.5.1", "", { "dependencies": { "object-assign": "^3.0.0" } }, "sha512-xYylXOjBS9mE/d690InK3Y74NpE0El0TmAKDmKJveWk9jds/0Tl7MQP4yhavS0U64diEq+5ey2905nhCpIHE+Q=="], @@ -1146,7 +1144,7 @@ "node-notifier": ["node-notifier@10.0.1", "", { "dependencies": { "growly": "^1.3.0", "is-wsl": "^2.2.0", "semver": "^7.3.5", "shellwords": "^0.1.1", "uuid": "^8.3.2", "which": "^2.0.2" } }, "sha512-YX7TSyDukOZ0g+gmzjB6abKu+hTGvO8+8+gIFDsRCU2t8fLV/P2unmt+LGFaIa4y64aX98Qksa97rgz4vMNeLQ=="], - "node-releases": ["node-releases@2.0.27", "", {}, "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA=="], + "node-releases": ["node-releases@2.0.36", "", {}, "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA=="], "normalize-package-data": ["normalize-package-data@6.0.2", "", { "dependencies": { "hosted-git-info": "^7.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" } }, "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g=="], @@ -1248,7 +1246,7 @@ "possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="], - "postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="], + "postcss": ["postcss@8.5.8", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg=="], "powershell-utils": ["powershell-utils@0.1.0", "", {}, "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A=="], @@ -1272,7 +1270,7 @@ "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], - "publish-browser-extension": ["publish-browser-extension@4.0.3", "", { "dependencies": { "cac": "^6.7.14", "consola": "^3.4.2", "dotenv": "^17.2.4", "form-data-encoder": "^4.1.0", "formdata-node": "^6.0.3", "jsonwebtoken": "^9.0.3", "listr2": "^10.1.0", "ofetch": "^1.5.1", "zod": "3.25.76 || ^4.3.6" }, "bin": { "publish-extension": "bin/publish-extension.mjs" } }, "sha512-yhzn+0z0tOYSsouEVCn6BHd3PPEc6KKplEVDEmxCOAMXC0C7NROEiJcmWm5LGGgqw3TqBvPxiink1juPrEbMqA=="], + "publish-browser-extension": ["publish-browser-extension@4.0.4", "", { "dependencies": { "cac": "^6.7.14", "consola": "^3.4.2", "dotenv": "^17.2.4", "form-data-encoder": "^4.1.0", "formdata-node": "^6.0.3", "jsonwebtoken": "^9.0.3", "listr2": "^10.1.0", "ofetch": "^1.5.1", "zod": "3.25.76 || ^4.3.6" }, "bin": { "publish-extension": "bin/publish-extension.mjs" } }, "sha512-QMQbWL0FWgBfnkJ6w8HOJoIPaWLE7vTpewM4ae2vLs7SrD4eKdAk+SxOzqAICwbhEPuaLAOA+XkT9sZS5R0PmA=="], "pupa": ["pupa@3.3.0", "", { "dependencies": { "escape-goat": "^4.0.0" } }, "sha512-LjgDO2zPtoXP2wJpDjZrGdojii1uqO0cnwKoIoUzkfS98HDmbeiGmYiXo3lXeFlq2xvne1QFQhwYXSUCLKtEuA=="], @@ -1292,7 +1290,7 @@ "rc": ["rc@1.2.8", "", { "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "bin": { "rc": "./cli.js" } }, "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw=="], - "rc-config-loader": ["rc-config-loader@4.1.3", "", { "dependencies": { "debug": "^4.3.4", "js-yaml": "^4.1.0", "json5": "^2.2.2", "require-from-string": "^2.0.2" } }, "sha512-kD7FqML7l800i6pS6pvLyIE2ncbk9Du8Q0gp/4hMPhJU6ZxApkoLcGD8ZeqgiAlfwZ6BlETq6qqe+12DUL207w=="], + "rc-config-loader": ["rc-config-loader@4.1.4", "", { "dependencies": { "debug": "^4.4.3", "js-yaml": "^4.1.1", "json5": "^2.2.3", "require-from-string": "^2.0.2" } }, "sha512-3GiwEzklkbXTDp52UR5nT8iXgYAx1V9ZG/kDZT7p60u2GCv2XTwQq4NzinMoMpNtXhmt3WkhYXcj6HH8HdwCEQ=="], "rc9": ["rc9@2.1.2", "", { "dependencies": { "defu": "^6.1.4", "destr": "^2.0.3" } }, "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg=="], @@ -1374,7 +1372,7 @@ "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - "sax": ["sax@1.4.4", "", {}, "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw=="], + "sax": ["sax@1.5.0", "", {}, "sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA=="], "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], @@ -1638,7 +1636,7 @@ "unified": ["unified@9.2.2", "", { "dependencies": { "bail": "^1.0.0", "extend": "^3.0.0", "is-buffer": "^2.0.0", "is-plain-obj": "^2.0.0", "trough": "^1.0.0", "vfile": "^4.0.0" } }, "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ=="], - "unimport": ["unimport@5.6.0", "", { "dependencies": { "acorn": "^8.15.0", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", "local-pkg": "^1.1.2", "magic-string": "^0.30.21", "mlly": "^1.8.0", "pathe": "^2.0.3", "picomatch": "^4.0.3", "pkg-types": "^2.3.0", "scule": "^1.3.0", "strip-literal": "^3.1.0", "tinyglobby": "^0.2.15", "unplugin": "^2.3.11", "unplugin-utils": "^0.3.1" } }, "sha512-8rqAmtJV8o60x46kBAJKtHpJDJWkA2xcBqWKPI14MgUb05o1pnpnCnXSxedUXyeq7p8fR5g3pTo2BaswZ9lD9A=="], + "unimport": ["unimport@5.7.0", "", { "dependencies": { "acorn": "^8.16.0", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", "local-pkg": "^1.1.2", "magic-string": "^0.30.21", "mlly": "^1.8.0", "pathe": "^2.0.3", "picomatch": "^4.0.3", "pkg-types": "^2.3.0", "scule": "^1.3.0", "strip-literal": "^3.1.0", "tinyglobby": "^0.2.15", "unplugin": "^2.3.11", "unplugin-utils": "^0.3.1" } }, "sha512-njnL6sp8lEA8QQbZrt+52p/g4X0rw3bnGGmUcJnt1jeG8+iiqO779aGz0PirCtydAIVcuTBRlJ52F0u46z309Q=="], "unist-types": ["unist-types@1.4.0", "", {}, "sha512-umIkg5iLYjZiDiZuX7wgG5UFd1z5NoiWkxk7xU00wXfj+i8ZePdcMWS9freHKJgAPyk6dkaKqc4akATCH/hNFA=="], @@ -1714,7 +1712,7 @@ "word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], - "wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="], + "wrap-ansi": ["wrap-ansi@10.0.0", "", { "dependencies": { "ansi-styles": "^6.2.3", "string-width": "^8.2.0", "strip-ansi": "^7.1.2" } }, "sha512-SGcvg80f0wUy2/fXES19feHMz8E0JoXv2uNgHOu4Dgi2OrCy1lqwFYEJz1BLbDI0exjPMe/ZdzZ/YpGECBG/aQ=="], "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], @@ -1792,23 +1790,21 @@ "@textlint/types/@textlint/ast-node-types": ["@textlint/ast-node-types@4.4.3", "", {}, "sha512-qi2jjgO6Tn3KNPGnm6B7p6QTEPvY95NFsIAaJuwbulur8iJUEenp1OnoUfiDaC/g2WPPEFkcfXpmnu8XEMFo2A=="], - "@types/glob/@types/node": ["@types/node@25.2.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ=="], - "boxen/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], "boxen/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + "boxen/wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="], + "c12/giget": ["giget@2.0.0", "", { "dependencies": { "citty": "^0.1.6", "consola": "^3.4.0", "defu": "^6.1.4", "node-fetch-native": "^1.6.6", "nypm": "^0.6.0", "pathe": "^2.0.3" }, "bin": { "giget": "dist/cli.mjs" } }, "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA=="], "check-ends-with-period/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], - "chrome-launcher/@types/node": ["@types/node@25.2.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ=="], - "chrome-launcher/escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], "chrome-launcher/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="], - "cli-truncate/slice-ansi": ["slice-ansi@7.1.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" } }, "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w=="], + "cli-truncate/slice-ansi": ["slice-ansi@8.0.0", "", { "dependencies": { "ansi-styles": "^6.2.3", "is-fullwidth-code-point": "^5.1.0" } }, "sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg=="], "cli-truncate/string-width": ["string-width@8.2.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-6hJPQ8N0V0P3SNmP6h2J99RLuzrWz2gvT7VnK5tKvrNqJoyS9W4/Fb8mo31UiPvy00z7DQXkP2hnKBVav76thw=="], @@ -1840,7 +1836,9 @@ "log-update/slice-ansi": ["slice-ansi@7.1.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" } }, "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w=="], - "log-update/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + "log-update/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + + "log-update/wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="], "mdast-util-find-and-replace/escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], @@ -1850,7 +1848,7 @@ "multimatch/array-union": ["array-union@3.0.1", "", {}, "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw=="], - "multimatch/minimatch": ["minimatch@3.1.3", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA=="], + "multimatch/minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="], "nlcst-parse-japanese/kuromojin": ["kuromojin@1.5.1", "", { "dependencies": { "kuromoji": "0.1.1" } }, "sha512-tzt3UUqWqzwHMsahchyrcs9kgbn6OM7xP4QRCd0w5vqE0lA/cjCH0OxjLaekz5cnxGmcy8RfN7La3xOxZOvJ1w=="], @@ -1896,8 +1894,6 @@ "textlint/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], - "textlint-rule-helper/@textlint/ast-node-types": ["@textlint/ast-node-types@15.5.1", "", {}, "sha512-2ABQSaQoM9u9fycXLJKcCv4XQulJWTUSwjo6F0i/ujjqOH8/AZ2A0RDKKbAddqxDhuabVB20lYoEsZZgzehccg=="], - "textlint-rule-ja-hiragana-fukushi/kuromojin": ["kuromojin@2.1.1", "", { "dependencies": { "kuromoji": "0.1.1" } }, "sha512-bd5dfE9CdRBoRPiquE5uhzBrDOn2K3WuFeOWqZgM7DNtQhvS7P9IALy5MtDxXcnw7DLBAZ1A7DByPO5BhXdgew=="], "textlint-rule-ja-hiragana-fukushi/morpheme-match-all": ["morpheme-match-all@1.2.0", "", { "dependencies": { "morpheme-match": "^1.2.1" } }, "sha512-z8F1k4U8fAMcjkGBDWwVrKZLR8VSvKtYh6+5GZ9hi5mtXrYMILwDMgiPwfNGJvk/liQEG9/oNAJUcwLpyjI9Xg=="], @@ -1978,11 +1974,9 @@ "wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], - "wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + "wrap-ansi/string-width": ["string-width@8.2.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-6hJPQ8N0V0P3SNmP6h2J99RLuzrWz2gvT7VnK5tKvrNqJoyS9W4/Fb8mo31UiPvy00z7DQXkP2hnKBVav76thw=="], - "wrap-ansi/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], - - "wxt/@wxt-dev/storage": ["@wxt-dev/storage@1.2.7", "", { "dependencies": { "@wxt-dev/browser": "^0.1.36", "async-mutex": "^0.5.0", "dequal": "^2.0.3" } }, "sha512-+rfRmfF2Wd6knXSFfgjLHelKEVnlryI/UG2/gNbO9U/KZJtSvo8QkGSJ1iJQ7jLYCYD+oYCzMZdL7D4BJLCUkw=="], + "wrap-ansi/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], "zip-dir/async": ["async@3.2.6", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="], @@ -1998,25 +1992,25 @@ "@textlint/linter-formatter/js-yaml/argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], - "@types/glob/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], - "boxen/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], - "boxen/string-width/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + "boxen/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], - "c12/giget/citty": ["citty@0.1.6", "", { "dependencies": { "consola": "^3.2.3" } }, "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ=="], + "boxen/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "boxen/wrap-ansi/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], - "chrome-launcher/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + "c12/giget/citty": ["citty@0.1.6", "", { "dependencies": { "consola": "^3.2.3" } }, "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ=="], "cli-truncate/slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], "cli-truncate/slice-ansi/is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="], - "cli-truncate/string-width/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + "cli-truncate/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], "fx-runner/which/isexe": ["isexe@1.1.2", "", {}, "sha512-d2eJzK691yZwPHcv1LbeAOa91yMJ9QmfTgSO1oXB65ezVhXQsxBac2vEB4bMVms9cGzaA99n6V2viHMq82VLDw=="], - "globby/glob/minimatch": ["minimatch@3.1.3", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA=="], + "globby/glob/minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="], "kuromojin/@kvs/env/@kvs/indexeddb": ["@kvs/indexeddb@2.2.2", "", { "dependencies": { "@kvs/storage": "^2.2.2", "@kvs/types": "^2.2.2" } }, "sha512-h9Fom6YvbRzMHhBLZKdNNJ/bgla0aBbmVBzUBLUoeEwT3C16Yx5eGA+spUQ69ZoRbsArZufX84qX/wRbyvjtrg=="], @@ -2032,13 +2026,17 @@ "log-update/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "log-update/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "log-update/wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + "mlly/pkg-types/confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="], "multimatch/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], "nlcst-parse-japanese/kuromojin/kuromoji": ["kuromoji@0.1.1", "", { "dependencies": { "async": "^2.0.1", "doublearray": "0.0.2", "zlibjs": "^0.2.0" } }, "sha512-B7ctEuhoYzRDbgsRn/3NQVee/Q4WRFVuCxkYtnQLl+t/5tw2f7JL0GQH/CQQ3gqlaEvBJgfnGNA6st09wmqkRA=="], - "ora/string-width/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + "ora/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], "rc-config-loader/js-yaml/argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], @@ -2110,18 +2108,20 @@ "widest-line/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], - "widest-line/string-width/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], - - "wrap-ansi/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], + "widest-line/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], "wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], "boxen/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "boxen/wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "cli-truncate/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], "globby/glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + "log-update/wrap-ansi/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], + "multimatch/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], "nlcst-parse-japanese/kuromojin/kuromoji/zlibjs": ["zlibjs@0.2.0", "", {}, "sha512-UA5w5YE92YlkBgr2qk4G3rNrOskQqHy0b/vhlU1U+MKeEHAASJ787MiXBUUsEuHO5t0pwKZ7VOAEJMJhLXcJsg=="], diff --git a/dist/chrome-mv3/chunks/main-DmKmffDj.js b/dist/chrome-mv3/chunks/main-CfofK1zW.js similarity index 71% rename from dist/chrome-mv3/chunks/main-DmKmffDj.js rename to dist/chrome-mv3/chunks/main-CfofK1zW.js index c1d4a31..edf6f32 100644 --- a/dist/chrome-mv3/chunks/main-DmKmffDj.js +++ b/dist/chrome-mv3/chunks/main-CfofK1zW.js @@ -1,22 +1,22 @@ -(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function f(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=f(o);fetch(o.href,d)}})();try{}catch(l){console.error("[wxt] Failed to initialize plugins",l)}function nm(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var kf={exports:{}},Va={};var bh;function dg(){if(bh)return Va;bh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var v in o)v!=="key"&&(d[v]=o[v])}else d=o;return o=d.ref,{$$typeof:l,type:r,key:h,ref:o!==void 0?o:null,props:d}}return Va.Fragment=u,Va.jsx=f,Va.jsxs=f,Va}var Sh;function hg(){return Sh||(Sh=1,kf.exports=dg()),kf.exports}var ke=hg(),Wf={exports:{}},P={};var zh;function mg(){if(zh)return P;zh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),x=Symbol.iterator;function G(b){return b===null||typeof b!="object"?null:(b=x&&b[x]||b["@@iterator"],typeof b=="function"?b:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,H={};function q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}q.prototype.isReactComponent={},q.prototype.setState=function(b,C){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,C,"setState")},q.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function K(){}K.prototype=q.prototype;function Q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}var I=Q.prototype=new K;I.constructor=Q,j(I,q.prototype),I.isPureReactComponent=!0;var ee=Array.isArray;function Ae(){}var $={H:null,A:null,T:null,S:null},De=Object.prototype.hasOwnProperty;function Ke(b,C,Y){var V=Y.ref;return{$$typeof:l,type:b,key:C,ref:V!==void 0?V:null,props:Y}}function Kt(b,C){return Ke(b.type,C,b.props)}function ye(b){return typeof b=="object"&&b!==null&&b.$$typeof===l}function Re(b){var C={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(Y){return C[Y]})}var Mt=/\/+/g;function nt(b,C){return typeof b=="object"&&b!==null&&b.key!=null?Re(""+b.key):C.toString(36)}function yt(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Ae,Ae):(b.status="pending",b.then(function(C){b.status==="pending"&&(b.status="fulfilled",b.value=C)},function(C){b.status==="pending"&&(b.status="rejected",b.reason=C)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function M(b,C,Y,V,te){var ae=typeof b;(ae==="undefined"||ae==="boolean")&&(b=null);var ve=!1;if(b===null)ve=!0;else switch(ae){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(b.$$typeof){case l:case u:ve=!0;break;case T:return ve=b._init,M(ve(b._payload),C,Y,V,te)}}if(ve)return te=te(b),ve=V===""?"."+nt(b,0):V,ee(te)?(Y="",ve!=null&&(Y=ve.replace(Mt,"$&/")+"/"),M(te,C,Y,"",function(Wl){return Wl})):te!=null&&(ye(te)&&(te=Kt(te,Y+(te.key==null||b&&b.key===te.key?"":(""+te.key).replace(Mt,"$&/")+"/")+ve)),C.push(te)),1;ve=0;var ut=V===""?".":V+":";if(ee(b))for(var xe=0;xe>>1,Te=M[be];if(0>>1;beo(Y,W))Vo(te,Y)?(M[be]=te,M[V]=W,be=V):(M[be]=Y,M[C]=W,be=C);else if(Vo(te,W))M[be]=te,M[V]=W,be=V;else break e}}return B}function o(M,B){var W=M.sortIndex-B.sortIndex;return W!==0?W:M.id-B.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var h=Date,v=h.now();l.unstable_now=function(){return h.now()-v}}var p=[],y=[],T=1,N=null,x=3,G=!1,R=!1,j=!1,H=!1,q=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function I(M){for(var B=f(y);B!==null;){if(B.callback===null)r(y);else if(B.startTime<=M)r(y),B.sortIndex=B.expirationTime,u(p,B);else break;B=f(y)}}function ee(M){if(j=!1,I(M),!R)if(f(p)!==null)R=!0,Ae||(Ae=!0,Re());else{var B=f(y);B!==null&&yt(ee,B.startTime-M)}}var Ae=!1,$=-1,De=5,Ke=-1;function Kt(){return H?!0:!(l.unstable_now()-KeM&&Kt());){var be=N.callback;if(typeof be=="function"){N.callback=null,x=N.priorityLevel;var Te=be(N.expirationTime<=M);if(M=l.unstable_now(),typeof Te=="function"){N.callback=Te,I(M),B=!0;break t}N===f(p)&&r(p),I(M)}else r(p);N=f(p)}if(N!==null)B=!0;else{var b=f(y);b!==null&&yt(ee,b.startTime-M),B=!1}}break e}finally{N=null,x=W,G=!1}B=void 0}}finally{B?Re():Ae=!1}}}var Re;if(typeof Q=="function")Re=function(){Q(ye)};else if(typeof MessageChannel<"u"){var Mt=new MessageChannel,nt=Mt.port2;Mt.port1.onmessage=ye,Re=function(){nt.postMessage(null)}}else Re=function(){q(ye,0)};function yt(M,B){$=q(function(){M(l.unstable_now())},B)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(M){M.callback=null},l.unstable_forceFrameRate=function(M){0>M||125be?(M.sortIndex=W,u(y,M),f(p)===null&&M===f(y)&&(j?(K($),$=-1):j=!0,yt(ee,W-be))):(M.sortIndex=Te,u(p,M),R||G||(R=!0,Ae||(Ae=!0,Re()))),M},l.unstable_shouldYield=Kt,l.unstable_wrapCallback=function(M){var B=x;return function(){var W=x;x=B;try{return M.apply(this,arguments)}finally{x=W}}}})(Pf)),Pf}var Oh;function yg(){return Oh||(Oh=1,If.exports=vg()),If.exports}var er={exports:{}},lt={};var Ah;function gg(){if(Ah)return lt;Ah=1;var l=cr();function u(p){var y="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),er.exports=gg(),er.exports}var Nh;function _g(){if(Nh)return Qa;Nh=1;var l=yg(),u=cr(),f=pg();function r(e){var t="https://react.dev/errors/"+e;if(1Te||(e.current=be[Te],be[Te]=null,Te--)}function Y(e,t){Te++,be[Te]=e.current,e.current=t}var V=b(null),te=b(null),ae=b(null),ve=b(null);function ut(e,t){switch(Y(ae,t),Y(te,e),Y(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Qd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(V),Y(V,e)}function xe(){C(V),C(te),C(ae)}function Wl(e){e.memoizedState!==null&&Y(ve,e);var t=V.current,n=Qd(t,e.type);t!==n&&(Y(te,e),Y(V,n))}function Wa(e){te.current===e&&(C(V),C(te)),ve.current===e&&(C(ve),Ba._currentValue=W)}var Zi,pr;function Yn(e){if(Zi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zi=t&&t[1]||"",pr=-1{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function f(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=f(o);fetch(o.href,d)}})();try{}catch(l){console.error("[wxt] Failed to initialize plugins",l)}function nm(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var kf={exports:{}},Va={};var bh;function dg(){if(bh)return Va;bh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var v in o)v!=="key"&&(d[v]=o[v])}else d=o;return o=d.ref,{$$typeof:l,type:r,key:h,ref:o!==void 0?o:null,props:d}}return Va.Fragment=u,Va.jsx=f,Va.jsxs=f,Va}var Sh;function hg(){return Sh||(Sh=1,kf.exports=dg()),kf.exports}var Je=hg(),Wf={exports:{}},P={};var zh;function mg(){if(zh)return P;zh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),x=Symbol.iterator;function G(b){return b===null||typeof b!="object"?null:(b=x&&b[x]||b["@@iterator"],typeof b=="function"?b:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,H={};function q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}q.prototype.isReactComponent={},q.prototype.setState=function(b,C){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,C,"setState")},q.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function K(){}K.prototype=q.prototype;function Q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}var I=Q.prototype=new K;I.constructor=Q,j(I,q.prototype),I.isPureReactComponent=!0;var ee=Array.isArray;function Oe(){}var W={H:null,A:null,T:null,S:null},ge=Object.prototype.hasOwnProperty;function at(b,C,Y){var V=Y.ref;return{$$typeof:l,type:b,key:C,ref:V!==void 0?V:null,props:Y}}function Bt(b,C){return at(b.type,C,b.props)}function gt(b){return typeof b=="object"&&b!==null&&b.$$typeof===l}function se(b){var C={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(Y){return C[Y]})}var tt=/\/+/g;function ut(b,C){return typeof b=="object"&&b!==null&&b.key!=null?se(""+b.key):C.toString(36)}function Le(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Oe,Oe):(b.status="pending",b.then(function(C){b.status==="pending"&&(b.status="fulfilled",b.value=C)},function(C){b.status==="pending"&&(b.status="rejected",b.reason=C)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function D(b,C,Y,V,te){var ae=typeof b;(ae==="undefined"||ae==="boolean")&&(b=null);var pe=!1;if(b===null)pe=!0;else switch(ae){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(b.$$typeof){case l:case u:pe=!0;break;case T:return pe=b._init,D(pe(b._payload),C,Y,V,te)}}if(pe)return te=te(b),pe=V===""?"."+ut(b,0):V,ee(te)?(Y="",pe!=null&&(Y=pe.replace(tt,"$&/")+"/"),D(te,C,Y,"",function(Wl){return Wl})):te!=null&&(gt(te)&&(te=Bt(te,Y+(te.key==null||b&&b.key===te.key?"":(""+te.key).replace(tt,"$&/")+"/")+pe)),C.push(te)),1;pe=0;var it=V===""?".":V+":";if(ee(b))for(var je=0;je>>1,Ae=D[de];if(0>>1;deo(Y,J))Vo(te,Y)?(D[de]=te,D[V]=J,de=V):(D[de]=Y,D[C]=J,de=C);else if(Vo(te,J))D[de]=te,D[V]=J,de=V;else break e}}return B}function o(D,B){var J=D.sortIndex-B.sortIndex;return J!==0?J:D.id-B.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var h=Date,v=h.now();l.unstable_now=function(){return h.now()-v}}var p=[],y=[],T=1,M=null,x=3,G=!1,R=!1,j=!1,H=!1,q=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function I(D){for(var B=f(y);B!==null;){if(B.callback===null)r(y);else if(B.startTime<=D)r(y),B.sortIndex=B.expirationTime,u(p,B);else break;B=f(y)}}function ee(D){if(j=!1,I(D),!R)if(f(p)!==null)R=!0,Oe||(Oe=!0,se());else{var B=f(y);B!==null&&Le(ee,B.startTime-D)}}var Oe=!1,W=-1,ge=5,at=-1;function Bt(){return H?!0:!(l.unstable_now()-atD&&Bt());){var de=M.callback;if(typeof de=="function"){M.callback=null,x=M.priorityLevel;var Ae=de(M.expirationTime<=D);if(D=l.unstable_now(),typeof Ae=="function"){M.callback=Ae,I(D),B=!0;break t}M===f(p)&&r(p),I(D)}else r(p);M=f(p)}if(M!==null)B=!0;else{var b=f(y);b!==null&&Le(ee,b.startTime-D),B=!1}}break e}finally{M=null,x=J,G=!1}B=void 0}}finally{B?se():Oe=!1}}}var se;if(typeof Q=="function")se=function(){Q(gt)};else if(typeof MessageChannel<"u"){var tt=new MessageChannel,ut=tt.port2;tt.port1.onmessage=gt,se=function(){ut.postMessage(null)}}else se=function(){q(gt,0)};function Le(D,B){W=q(function(){D(l.unstable_now())},B)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(D){D.callback=null},l.unstable_forceFrameRate=function(D){0>D||125de?(D.sortIndex=J,u(y,D),f(p)===null&&D===f(y)&&(j?(K(W),W=-1):j=!0,Le(ee,J-de))):(D.sortIndex=Ae,u(p,D),R||G||(R=!0,Oe||(Oe=!0,se()))),D},l.unstable_shouldYield=Bt,l.unstable_wrapCallback=function(D){var B=x;return function(){var J=x;x=B;try{return D.apply(this,arguments)}finally{x=J}}}})(Pf)),Pf}var Oh;function yg(){return Oh||(Oh=1,If.exports=vg()),If.exports}var er={exports:{}},nt={};var Ah;function gg(){if(Ah)return nt;Ah=1;var l=cr();function u(p){var y="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),er.exports=gg(),er.exports}var Nh;function _g(){if(Nh)return Qa;Nh=1;var l=yg(),u=cr(),f=pg();function r(e){var t="https://react.dev/errors/"+e;if(1Ae||(e.current=de[Ae],de[Ae]=null,Ae--)}function Y(e,t){Ae++,de[Ae]=e.current,e.current=t}var V=b(null),te=b(null),ae=b(null),pe=b(null);function it(e,t){switch(Y(ae,t),Y(te,e),Y(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Qd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(V),Y(V,e)}function je(){C(V),C(te),C(ae)}function Wl(e){e.memoizedState!==null&&Y(pe,e);var t=V.current,n=Qd(t,e.type);t!==n&&(Y(te,e),Y(V,n))}function Wa(e){te.current===e&&(C(V),C(te)),pe.current===e&&(C(pe),Ba._currentValue=J)}var Zi,pr;function Yn(e){if(Zi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zi=t&&t[1]||"",pr=-1)":-1i||g[a]!==E[i]){var D=` -`+g[a].replace(" at new "," at ");return e.displayName&&D.includes("")&&(D=D.replace("",e.displayName)),D}while(1<=a&&0<=i);break}}}finally{Ui=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yn(n):""}function Vm(e,t){switch(e.tag){case 26:case 27:case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return e.child!==t&&t!==null?Yn("Suspense Fallback"):Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 15:return wi(e.type,!1);case 11:return wi(e.type.render,!1);case 1:return wi(e.type,!0);case 31:return Yn("Activity");default:return""}}function _r(e){try{var t="",n=null;do t+=Vm(e,n),n=e,e=e.return;while(e);return t}catch(a){return` +`);for(i=a=0;ai||g[a]!==E[i]){var N=` +`+g[a].replace(" at new "," at ");return e.displayName&&N.includes("")&&(N=N.replace("",e.displayName)),N}while(1<=a&&0<=i);break}}}finally{Ui=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yn(n):""}function Vm(e,t){switch(e.tag){case 26:case 27:case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return e.child!==t&&t!==null?Yn("Suspense Fallback"):Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 15:return wi(e.type,!1);case 11:return wi(e.type.render,!1);case 1:return wi(e.type,!0);case 31:return Yn("Activity");default:return""}}function _r(e){try{var t="",n=null;do t+=Vm(e,n),n=e,e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` -`+a.stack}}var Ri=Object.prototype.hasOwnProperty,Ci=l.unstable_scheduleCallback,ji=l.unstable_cancelCallback,Qm=l.unstable_shouldYield,Lm=l.unstable_requestPaint,gt=l.unstable_now,Km=l.unstable_getCurrentPriorityLevel,br=l.unstable_ImmediatePriority,Sr=l.unstable_UserBlockingPriority,Fa=l.unstable_NormalPriority,$m=l.unstable_LowPriority,zr=l.unstable_IdlePriority,Jm=l.log,km=l.unstable_setDisableYieldValue,Fl=null,pt=null;function dn(e){if(typeof Jm=="function"&&km(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Fl,e)}catch{}}var _t=Math.clz32?Math.clz32:Im,Wm=Math.log,Fm=Math.LN2;function Im(e){return e>>>=0,e===0?32:31-(Wm(e)/Fm|0)|0}var Ia=256,Pa=262144,eu=4194304;function Gn(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 tu(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,c=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~c,a!==0?i=Gn(a):(s&=m,s!==0?i=Gn(s):n||(n=m&~e,n!==0&&(i=Gn(n))))):(m=a&~c,m!==0?i=Gn(m):s!==0?i=Gn(s):n||(n=a&~e,n!==0&&(i=Gn(n)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:i}function Il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pm(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 Er(){var e=eu;return eu<<=1,(eu&62914560)===0&&(eu=4194304),e}function xi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ev(e,t,n,a,i,c){var s=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 m=e.entanglements,g=e.expirationTimes,E=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var iv=/[\n"\\]/g;function Dt(e){return e.replace(iv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xi(e,t,n,a,i,c,s,m){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Vi(e,s,Nt(t)):n!=null?Vi(e,s,Nt(n)):a!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Nt(m):e.removeAttribute("name")}function xr(e,t,n,a,i,c,s,m){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Gi(e);return}n=n!=null?""+Nt(n):"",t=t!=null?""+Nt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Gi(e)}function Vi(e,t,n){t==="number"&&au(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ml(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ji=!1;if(kt)try{var la={};Object.defineProperty(la,"passive",{get:function(){Ji=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{Ji=!1}var mn=null,ki=null,iu=null;function Vr(){if(iu)return iu;var e,t=ki,n=t.length,a,i="value"in mn?mn.value:mn.textContent,c=i.length;for(e=0;e=ia),kr=" ",Wr=!1;function Fr(e,t){switch(e){case"keyup":return Cv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ir(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function xv(e,t){switch(e){case"compositionend":return Ir(t);case"keypress":return t.which!==32?null:(Wr=!0,kr);case"textInput":return e=t.data,e===kr&&Wr?null:e;default:return null}}function Hv(e,t){if(pl)return e==="compositionend"||!ec&&Fr(e,t)?(e=Vr(),iu=ki=mn=null,pl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=io(n)}}function fo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=au(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=au(e.document)}return t}function lc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Lv=kt&&"documentMode"in document&&11>=document.documentMode,_l=null,ac=null,oa=null,uc=!1;function oo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||_l==null||_l!==au(a)||(a=_l,"selectionStart"in a&&lc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),oa&&ra(oa,a)||(oa=a,a=Pu(ac,"onSelect"),0>=s,i-=s,Xt=1<<32-_t(t)+i|n<le?(re=L,L=null):re=L.sibling;var de=O(S,L,z[le],Z);if(de===null){L===null&&(L=re);break}e&&L&&de.alternate===null&&t(S,L),_=c(de,_,le),se===null?J=de:se.sibling=de,se=de,L=re}if(le===z.length)return n(S,L),oe&&Ft(S,le),J;if(L===null){for(;lele?(re=L,L=null):re=L.sibling;var xn=O(S,L,de.value,Z);if(xn===null){L===null&&(L=re);break}e&&L&&xn.alternate===null&&t(S,L),_=c(xn,_,le),se===null?J=xn:se.sibling=xn,se=xn,L=re}if(de.done)return n(S,L),oe&&Ft(S,le),J;if(L===null){for(;!de.done;le++,de=z.next())de=U(S,de.value,Z),de!==null&&(_=c(de,_,le),se===null?J=de:se.sibling=de,se=de);return oe&&Ft(S,le),J}for(L=a(L);!de.done;le++,de=z.next())de=A(L,S,le,de.value,Z),de!==null&&(e&&de.alternate!==null&&L.delete(de.key===null?le:de.key),_=c(de,_,le),se===null?J=de:se.sibling=de,se=de);return e&&L.forEach(function(sg){return t(S,sg)}),oe&&Ft(S,le),J}function Ee(S,_,z,Z){if(typeof z=="object"&&z!==null&&z.type===j&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case G:e:{for(var J=z.key;_!==null;){if(_.key===J){if(J=z.type,J===j){if(_.tag===7){n(S,_.sibling),Z=i(_,z.props.children),Z.return=S,S=Z;break e}}else if(_.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===De&&In(J)===_.type){n(S,_.sibling),Z=i(_,z.props),ya(Z,z),Z.return=S,S=Z;break e}n(S,_);break}else t(S,_);_=_.sibling}z.type===j?(Z=$n(z.props.children,S.mode,Z,z.key),Z.return=S,S=Z):(Z=yu(z.type,z.key,z.props,null,S.mode,Z),ya(Z,z),Z.return=S,S=Z)}return s(S);case R:e:{for(J=z.key;_!==null;){if(_.key===J)if(_.tag===4&&_.stateNode.containerInfo===z.containerInfo&&_.stateNode.implementation===z.implementation){n(S,_.sibling),Z=i(_,z.children||[]),Z.return=S,S=Z;break e}else{n(S,_);break}else t(S,_);_=_.sibling}Z=dc(z,S.mode,Z),Z.return=S,S=Z}return s(S);case De:return z=In(z),Ee(S,_,z,Z)}if(yt(z))return X(S,_,z,Z);if(Re(z)){if(J=Re(z),typeof J!="function")throw Error(r(150));return z=J.call(z),F(S,_,z,Z)}if(typeof z.then=="function")return Ee(S,_,Eu(z),Z);if(z.$$typeof===Q)return Ee(S,_,_u(S,z),Z);Tu(S,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,_!==null&&_.tag===6?(n(S,_.sibling),Z=i(_,z),Z.return=S,S=Z):(n(S,_),Z=sc(z,S.mode,Z),Z.return=S,S=Z),s(S)):n(S,_)}return function(S,_,z,Z){try{va=0;var J=Ee(S,_,z,Z);return Zl=null,J}catch(L){if(L===Dl||L===Su)throw L;var se=St(29,L,null,S.mode);return se.lanes=Z,se.return=S,se}}}var el=Co(!0),jo=Co(!1),_n=!1;function Tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(he&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=vu(e),po(e,null,n),t}return mu(e,a,t,n),vu(e)}function ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}function Ac(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?i=c=s:c=c.next=s,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Mc=!1;function pa(){if(Mc){var e=Nl;if(e!==null)throw e}}function _a(e,t,n,a){Mc=!1;var i=e.updateQueue;_n=!1;var c=i.firstBaseUpdate,s=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var g=m,E=g.next;g.next=null,s===null?c=E:s.next=E,s=g;var D=e.alternate;D!==null&&(D=D.updateQueue,m=D.lastBaseUpdate,m!==s&&(m===null?D.firstBaseUpdate=E:m.next=E,D.lastBaseUpdate=g))}if(c!==null){var U=i.baseState;s=0,D=E=g=null,m=c;do{var O=m.lane&-536870913,A=O!==m.lane;if(A?(fe&O)===O:(a&O)===O){O!==0&&O===Ml&&(Mc=!0),D!==null&&(D=D.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var X=e,F=m;O=t;var Ee=n;switch(F.tag){case 1:if(X=F.payload,typeof X=="function"){U=X.call(Ee,U,O);break e}U=X;break e;case 3:X.flags=X.flags&-65537|128;case 0:if(X=F.payload,O=typeof X=="function"?X.call(Ee,U,O):X,O==null)break e;U=N({},U,O);break e;case 2:_n=!0}}O=m.callback,O!==null&&(e.flags|=64,A&&(e.flags|=8192),A=i.callbacks,A===null?i.callbacks=[O]:A.push(O))}else A={lane:O,tag:m.tag,payload:m.payload,callback:m.callback,next:null},D===null?(E=D=A,g=U):D=D.next=A,s|=O;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;A=m,m=A.next,A.next=null,i.lastBaseUpdate=A,i.shared.pending=null}}while(!0);D===null&&(g=U),i.baseState=g,i.firstBaseUpdate=E,i.lastBaseUpdate=D,c===null&&(i.shared.lanes=0),An|=s,e.lanes=s,e.memoizedState=U}}function xo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ec?c:8;var s=M.T,m={};M.T=m,Kc(e,!1,t,n);try{var g=i(),E=M.S;if(E!==null&&E(m,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var D=ey(g,a);za(e,t,D,At(e))}else za(e,t,a,At(e))}catch(U){za(e,t,{then:function(){},status:"rejected",reason:U},At())}finally{B.p=c,s!==null&&m.types!==null&&(s.types=m.types),M.T=s}}function iy(){}function Qc(e,t,n,a){if(e.tag!==5)throw Error(r(476));var i=vs(e).queue;ms(e,i,t,W,n===null?iy:function(){return ys(e),n(a)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),za(e,t.next.queue,{},At())}function Lc(){return Ie(Ba)}function gs(){return qe().memoizedState}function ps(){return qe().memoizedState}function cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=At();e=bn(n);var a=Sn(t,e,n);a!==null&&(mt(a,t,n),ga(a,t,n)),t={cache:bc()},e.payload=t;return}t=t.return}}function fy(e,t,n){var a=At();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cu(e)?bs(t,n):(n=rc(e,t,n,a),n!==null&&(mt(n,e,a),Ss(n,t,a)))}function _s(e,t,n){var a=At();za(e,t,n,a)}function za(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cu(e))bs(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var s=t.lastRenderedState,m=c(s,n);if(i.hasEagerState=!0,i.eagerState=m,bt(m,s))return mu(e,t,i,0),Oe===null&&hu(),!1}catch{}if(n=rc(e,t,i,a),n!==null)return mt(n,e,a),Ss(n,t,a),!0}return!1}function Kc(e,t,n,a){if(a={lane:2,revertLane:Of(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Cu(e)){if(t)throw Error(r(479))}else t=rc(e,n,a,2),t!==null&&mt(t,e,2)}function Cu(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function bs(e,t){wl=Mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ss(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}var Ea={readContext:Ie,use:Zu,useCallback:Ce,useContext:Ce,useEffect:Ce,useImperativeHandle:Ce,useLayoutEffect:Ce,useInsertionEffect:Ce,useMemo:Ce,useReducer:Ce,useRef:Ce,useState:Ce,useDebugValue:Ce,useDeferredValue:Ce,useTransition:Ce,useSyncExternalStore:Ce,useId:Ce,useHostTransitionStatus:Ce,useFormState:Ce,useActionState:Ce,useOptimistic:Ce,useMemoCache:Ce,useCacheRefresh:Ce};Ea.useEffectEvent=Ce;var zs={readContext:Ie,use:Zu,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Ie,useEffect:us,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wu(4194308,4,rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wu(4194308,4,e,t)},useInsertionEffect:function(e,t){wu(4,2,e,t)},useMemo:function(e,t){var n=it();t=t===void 0?null:t;var a=e();if(tl){dn(!0);try{e()}finally{dn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=it();if(n!==void 0){var i=n(t);if(tl){dn(!0);try{n(t)}finally{dn(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=fy.bind(null,ne,e),[a.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Bc(e);var t=e.queue,n=_s.bind(null,ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xc,useDeferredValue:function(e,t){var n=it();return Vc(n,e,t)},useTransition:function(){var e=Bc(!1);return e=ms.bind(null,ne,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ne,i=it();if(oe){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Oe===null)throw Error(r(349));(fe&127)!==0||Vo(a,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,us(Lo.bind(null,a,c,e),[e]),a.flags|=2048,Cl(9,{destroy:void 0},Qo.bind(null,a,c,n,t),null),n},useId:function(){var e=it(),t=Oe.identifierPrefix;if(oe){var n=Vt,a=Xt;n=(a&~(1<<32-_t(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Nu++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?s.createElement(i,{is:a.is}):s.createElement(i)}}c[We]=t,c[ft]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)c.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=c;e:switch(et(c,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ln(t)}}return Ne(t),cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ln(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ae.current,Ol(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=Fe,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[We]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Gd(e.nodeValue,n)),e||gn(t,!0)}else e=ei(e).createTextNode(a),e[We]=t,t.stateNode=e}return Ne(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ol(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[We]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ne(t),e=!1}else n=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Et(t),t):(Et(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ne(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ol(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[We]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ne(t),i=!1}else i=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Et(t),t):(Et(t),null)}return Et(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bu(t,t.updateQueue),Ne(t),null);case 4:return xe(),e===null&&Df(t.stateNode.containerInfo),Ne(t),null;case 10:return Pt(t.type),Ne(t),null;case 19:if(C(He),a=t.memoizedState,a===null)return Ne(t),null;if(i=(t.flags&128)!==0,c=a.rendering,c===null)if(i)Oa(a,!1);else{if(je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Au(e),c!==null){for(t.flags|=128,Oa(a,!1),e=c.updateQueue,t.updateQueue=e,Bu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_o(n,e),n=n.sibling;return Y(He,He.current&1|2),oe&&Ft(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&>()>Qu&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304)}else{if(!i)if(e=Au(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bu(t,e),Oa(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!oe)return Ne(t),null}else 2*gt()-a.renderingStartTime>Qu&&n!==536870912&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=gt(),e.sibling=null,n=He.current,Y(He,i?n&1|2:n&1),oe&&Ft(t,a.treeForkCount),e):(Ne(t),null);case 22:case 23:return Et(t),Dc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),n=t.updateQueue,n!==null&&Bu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&C(Fn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pt(Be),Ne(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function hy(e,t){switch(mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pt(Be),xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wa(t),null;case 31:if(t.memoizedState!==null){if(Et(t),t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Et(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(He),null;case 4:return xe(),null;case 10:return Pt(t.type),null;case 22:case 23:return Et(t),Dc(),e!==null&&C(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pt(Be),null;case 25:return null;default:return null}}function Ks(e,t){switch(mc(t),t.tag){case 3:Pt(Be),xe();break;case 26:case 27:case 5:Wa(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&Et(t);break;case 13:Et(t);break;case 19:C(He);break;case 10:Pt(t.type);break;case 22:case 23:Et(t),Dc(),e!==null&&C(Fn);break;case 24:Pt(Be)}}function Aa(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var c=n.create,s=n.inst;a=c(),s.destroy=a}n=n.next}while(n!==i)}}catch(m){pe(t,t.return,m)}}function Tn(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){var s=a.inst,m=s.destroy;if(m!==void 0){s.destroy=void 0,i=t;var g=n,E=m;try{E()}catch(D){pe(i,g,D)}}}a=a.next}while(a!==c)}}catch(D){pe(t,t.return,D)}}function $s(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ho(t,n)}catch(a){pe(e,e.return,a)}}}function Js(e,t,n){n.props=nl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){pe(e,t,a)}}function Ma(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){pe(e,t,i)}}function Qt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){pe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){pe(e,t,i)}else n.current=null}function ks(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){pe(e,e.return,i)}}function ff(e,t,n){try{var a=e.stateNode;jy(a,e.type,n,t),a[ft]=t}catch(i){pe(e,e.return,i)}}function Ws(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Un(e.type)||e.tag===4}function rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ws(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(e.tag===27&&Un(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 of(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function Yu(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yu(e,t,n),e=e.sibling;e!==null;)Yu(e,t,n),e=e.sibling}function Fs(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);et(t,a,n),t[We]=e,t[ft]=n}catch(c){pe(e,e.return,c)}}var an=!1,Xe=!1,sf=!1,Is=typeof WeakSet=="function"?WeakSet:Set,Je=null;function my(e,t){if(e=e.containerInfo,wf=ci,e=ro(e),lc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var s=0,m=-1,g=-1,E=0,D=0,U=e,O=null;t:for(;;){for(var A;U!==n||i!==0&&U.nodeType!==3||(m=s+i),U!==c||a!==0&&U.nodeType!==3||(g=s+a),U.nodeType===3&&(s+=U.nodeValue.length),(A=U.firstChild)!==null;)O=U,U=A;for(;;){if(U===e)break t;if(O===n&&++E===i&&(m=s),O===c&&++D===a&&(g=s),(A=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=A}n=m===-1||g===-1?null:{start:m,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},ci=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),et(c,a,n),c[We]=e,$e(c),a=c;break e;case"link":var s=ah("link","href",i).get(a+(n.href||""));if(s){for(var m=0;mEe&&(s=Ee,Ee=F,F=s);var S=co(m,F),_=co(m,Ee);if(S&&_&&(A.rangeCount!==1||A.anchorNode!==S.node||A.anchorOffset!==S.offset||A.focusNode!==_.node||A.focusOffset!==_.offset)){var z=U.createRange();z.setStart(S.node,S.offset),A.removeAllRanges(),F>Ee?(A.addRange(z),A.extend(_.node,_.offset)):(z.setEnd(_.node,_.offset),A.addRange(z))}}}}for(U=[],A=m;A=A.parentNode;)A.nodeType===1&&U.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;mn?32:n,M.T=null,n=pf,pf=null;var c=Nn,s=on;if(Le=0,Bl=Nn=null,on=0,(he&6)!==0)throw Error(r(331));var m=he;if(he|=4,rd(c.current),id(c,c.current,s,n),he=m,Ra(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Fl,c)}catch{}return!0}finally{B.p=i,M.T=a,Md(e,t)}}function Dd(e,t,n){t=Ut(n,t),t=Wc(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Pl(e,2),Lt(e))}function pe(e,t,n){if(e.tag===3)Dd(e,e,n);else for(;t!==null;){if(t.tag===3){Dd(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Mn===null||!Mn.has(a))){e=Ut(n,e),n=Zs(2),a=Sn(t,n,2),a!==null&&(Us(n,a,t,e),Pl(a,2),Lt(a));break}}t=t.return}}function zf(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new gy;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(mf=!0,i.add(n),e=zy.bind(null,e,t,n),t.then(e,e))}function zy(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Oe===e&&(fe&n)===n&&(je===4||je===3&&(fe&62914560)===fe&&300>gt()-Vu?(he&2)===0&&Yl(e,0):vf|=n,ql===fe&&(ql=0)),Lt(e)}function Zd(e,t){t===0&&(t=Er()),e=Kn(e,t),e!==null&&(Pl(e,t),Lt(e))}function Ey(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zd(e,n)}function Ty(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Zd(e,n)}function Oy(e,t){return Ci(e,t)}var Wu=null,Xl=null,Ef=!1,Fu=!1,Tf=!1,Zn=0;function Lt(e){e!==Xl&&e.next===null&&(Xl===null?Wu=Xl=e:Xl=Xl.next=e),Fu=!0,Ef||(Ef=!0,My())}function Ra(e,t){if(!Tf&&Fu){Tf=!0;do for(var n=!1,a=Wu;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var c=0;else{var s=a.suspendedLanes,m=a.pingedLanes;c=(1<<31-_t(42|e)+1)-1,c&=i&~(s&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Cd(a,c))}else c=fe,c=tu(a,a===Oe?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Il(a,c)||(n=!0,Cd(a,c));a=a.next}while(n);Tf=!1}}function Ay(){Ud()}function Ud(){Fu=Ef=!1;var e=0;Zn!==0&&Hy()&&(e=Zn);for(var t=gt(),n=null,a=Wu;a!==null;){var i=a.next,c=wd(a,t);c===0?(a.next=null,n===null?Wu=i:n.next=i,i===null&&(Xl=n)):(n=a,(e!==0||(c&3)!==0)&&(Fu=!0)),a=i}Le!==0&&Le!==5||Ra(e),Zn!==0&&(Zn=0)}function wd(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0m)break;var D=g.transferSize,U=g.initiatorType;D&&Xd(U)&&(g=g.responseEnd,s+=D*(g"u"?null:document;function eh(e,t,n){var a=Vl;if(a&&typeof t=="string"&&t){var i=Dt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Pd.has(i)||(Pd.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),et(t,"link",e),$e(t),a.head.appendChild(t)))}}function Ky(e){sn.D(e),eh("dns-prefetch",e,null)}function $y(e,t){sn.C(e,t),eh("preconnect",e,t)}function Jy(e,t,n){sn.L(e,t,n);var a=Vl;if(a&&e&&t){var i='link[rel="preload"][as="'+Dt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Dt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Dt(n.imageSizes)+'"]')):i+='[href="'+Dt(e)+'"]';var c=i;switch(t){case"style":c=Ql(e);break;case"script":c=Ll(e)}Ht.has(c)||(e=N({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ht.set(c,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Ha(c))||t==="script"&&a.querySelector(qa(c))||(t=a.createElement("link"),et(t,"link",e),$e(t),a.head.appendChild(t)))}}function ky(e,t){sn.m(e,t);var n=Vl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Dt(a)+'"][href="'+Dt(e)+'"]',c=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ll(e)}if(!Ht.has(c)&&(e=N({rel:"modulepreload",href:e},t),Ht.set(c,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qa(c)))return}a=n.createElement("link"),et(a,"link",e),$e(a),n.head.appendChild(a)}}}function Wy(e,t,n){sn.S(e,t,n);var a=Vl;if(a&&e){var i=dl(a).hoistableStyles,c=Ql(e);t=t||"default";var s=i.get(c);if(!s){var m={loading:0,preload:null};if(s=a.querySelector(Ha(c)))m.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ht.get(c))&&Yf(e,n);var g=s=a.createElement("link");$e(g),et(g,"link",e),g._p=new Promise(function(E,D){g.onload=E,g.onerror=D}),g.addEventListener("load",function(){m.loading|=1}),g.addEventListener("error",function(){m.loading|=2}),m.loading|=4,ni(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:m},i.set(c,s)}}}function Fy(e,t){sn.X(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=N({src:e,async:!0},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),$e(c),et(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function Iy(e,t){sn.M(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=N({src:e,async:!0,type:"module"},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),$e(c),et(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function th(e,t,n,a){var i=(i=ae.current)?ti(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=dl(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var c=dl(i).hoistableStyles,s=c.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,s),(c=i.querySelector(Ha(e)))&&!c._p&&(s.instance=c,s.state.loading=5),Ht.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ht.set(e,n),c||Py(i,e,n,s.state))),t&&a===null)throw Error(r(528,""));return s}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ll(n),n=dl(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ql(e){return'href="'+Dt(e)+'"'}function Ha(e){return'link[rel="stylesheet"]['+e+"]"}function nh(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function Py(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),et(t,"link",n),$e(t),e.head.appendChild(t))}function Ll(e){return'[src="'+Dt(e)+'"]'}function qa(e){return"script[async]"+e}function lh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Dt(n.href)+'"]');if(a)return t.instance=a,$e(a),a;var i=N({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),$e(a),et(a,"style",i),ni(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ql(n.href);var c=e.querySelector(Ha(i));if(c)return t.state.loading|=4,t.instance=c,$e(c),c;a=nh(n),(i=Ht.get(i))&&Yf(a,i),c=(e.ownerDocument||e).createElement("link"),$e(c);var s=c;return s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),et(c,"link",a),t.state.loading|=4,ni(c,n.precedence,e),t.instance=c;case"script":return c=Ll(n.src),(i=e.querySelector(qa(c)))?(t.instance=i,$e(i),i):(a=n,(i=Ht.get(c))&&(a=N({},n),Gf(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),$e(i),et(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ni(a,n.precedence,e));return t.instance}function ni(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,c=i,s=0;s title"):null)}function eg(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ih(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tg(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Ql(a.href),c=t.querySelector(Ha(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ai.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,$e(c);return}c=t.ownerDocument||t,a=nh(a),(i=Ht.get(i))&&Yf(a,i),c=c.createElement("link"),$e(c);var s=c;s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),et(c,"link",a),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ai.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xf=0;function ng(e,t){return e.stylesheets&&e.count===0&&ii(e,e.stylesheets),0Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function ai(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ii(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ui=null;function ii(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ui=new Map,t.forEach(lg,e),ui=null,ai.call(e))}function lg(e,t){if(!(t.state.loading&4)){var n=ui.get(e);if(n)var a=n.get(null);else{n=new Map,ui.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),Ff.exports=_g(),Ff.exports}var Sg=bg();const zg=nm(Sg),Ka=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,Zh=Ka;var Uh=Object.prototype.hasOwnProperty;function lr(l,u){var f,r;if(l===u)return!0;if(l&&u&&(f=l.constructor)===u.constructor){if(f===Date)return l.getTime()===u.getTime();if(f===RegExp)return l.toString()===u.toString();if(f===Array){if((r=l.length)===u.length)for(;r--&&lr(l[r],u[r]););return r===-1}if(!f||typeof l=="object"){r=0;for(f in l)if(Uh.call(l,f)&&++r&&!Uh.call(u,f)||!(f in u)||!lr(l[f],u[f]))return!1;return Object.keys(u).length===r}}return l!==l&&u!==u}const Eg=new Error("request for lock canceled");var Tg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(N){h(N)}}function p(T){try{y(r.throw(T))}catch(N){h(N)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Og{constructor(u,f=Eg){this._value=u,this._cancelError=f,this._queue=[],this._weightedWaiters=[]}acquire(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return new Promise((r,o)=>{const d={resolve:r,reject:o,weight:u,priority:f},h=lm(this._queue,v=>f<=v.priority);h===-1&&u<=this._value?this._dispatchItem(d):this._queue.splice(h+1,0,d)})}runExclusive(u){return Tg(this,arguments,void 0,function*(f,r=1,o=0){const[d,h]=yield this.acquire(r,o);try{return yield f(d)}finally{h()}})}waitForUnlock(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return this._couldLockImmediately(u,f)?Promise.resolve():new Promise(r=>{this._weightedWaiters[u-1]||(this._weightedWaiters[u-1]=[]),Ag(this._weightedWaiters[u-1],{resolve:r,priority:f})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(u){this._value=u,this._dispatchQueue()}release(u=1){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);this._value+=u,this._dispatchQueue()}cancel(){this._queue.forEach(u=>u.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(u){const f=this._value;this._value-=u.weight,u.resolve([f,this._newReleaser(u.weight)])}_newReleaser(u){let f=!1;return()=>{f||(f=!0,this.release(u))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let u=this._value;u>0;u--){const f=this._weightedWaiters[u-1];f&&(f.forEach(r=>r.resolve()),this._weightedWaiters[u-1]=[])}else{const u=this._queue[0].priority;for(let f=this._value;f>0;f--){const r=this._weightedWaiters[f-1];if(!r)continue;const o=r.findIndex(d=>d.priority<=u);(o===-1?r:r.splice(0,o)).forEach((d=>d.resolve()))}}}_couldLockImmediately(u,f){return(this._queue.length===0||this._queue[0].priorityu.priority<=r.priority);l.splice(f+1,0,u)}function lm(l,u){for(let f=l.length-1;f>=0;f--)if(u(l[f]))return f;return-1}var Mg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(N){h(N)}}function p(T){try{y(r.throw(T))}catch(N){h(N)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Ng{constructor(u){this._semaphore=new Og(1,u)}acquire(){return Mg(this,arguments,void 0,function*(u=0){const[,f]=yield this._semaphore.acquire(1,u);return f})}runExclusive(u,f=0){return this._semaphore.runExclusive(()=>u(),1,f)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(u=0){return this._semaphore.waitForUnlock(1,u)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const am=Dg();function Dg(){const l={local:mi("local"),session:mi("session"),sync:mi("sync"),managed:mi("managed")},u=R=>{const j=l[R];if(j==null){const H=Object.keys(l).join(", ");throw Error(`Invalid area "${R}". Options: ${H}`)}return j},f=R=>{const j=R.indexOf(":"),H=R.substring(0,j),q=R.substring(j+1);if(q==null)throw Error(`Storage key should be in the form of "area:key", but received "${R}"`);return{driverArea:H,driverKey:q,driver:u(H)}},r=R=>R+"$",o=(R,j)=>{const H={...R};return Object.entries(j).forEach(([q,K])=>{K==null?delete H[q]:H[q]=K}),H},d=(R,j)=>R??j??null,h=R=>typeof R=="object"&&!Array.isArray(R)?R:{},v=async(R,j,H)=>d(await R.getItem(j),H?.fallback??H?.defaultValue),p=async(R,j)=>{const H=r(j);return h(await R.getItem(H))},y=async(R,j,H)=>{await R.setItem(j,H??null)},T=async(R,j,H)=>{const q=r(j),K=h(await R.getItem(q));await R.setItem(q,o(K,H))},N=async(R,j,H)=>{if(await R.removeItem(j),H?.removeMeta){const q=r(j);await R.removeItem(q)}},x=async(R,j,H)=>{const q=r(j);if(H==null)await R.removeItem(q);else{const K=h(await R.getItem(q));[H].flat().forEach(Q=>delete K[Q]),await R.setItem(q,K)}},G=(R,j,H)=>R.watch(j,H);return{getItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);return await v(H,q,j)},getItems:async R=>{const j=new Map,H=new Map,q=[];R.forEach(Q=>{let I,ee;typeof Q=="string"?I=Q:"getValue"in Q?(I=Q.key,ee={fallback:Q.fallback}):(I=Q.key,ee=Q.options),q.push(I);const{driverArea:Ae,driverKey:$}=f(I),De=j.get(Ae)??[];j.set(Ae,De.concat($)),H.set(I,ee)});const K=new Map;return await Promise.all(Array.from(j.entries()).map(async([Q,I])=>{(await l[Q].getItems(I)).forEach(ee=>{const Ae=`${Q}:${ee.key}`,$=H.get(Ae),De=d(ee.value,$?.fallback??$?.defaultValue);K.set(Ae,De)})})),q.map(Q=>({key:Q,value:K.get(Q)}))},getMeta:async R=>{const{driver:j,driverKey:H}=f(R);return await p(j,H)},getMetas:async R=>{const j=R.map(K=>{const Q=typeof K=="string"?K:K.key,{driverArea:I,driverKey:ee}=f(Q);return{key:Q,driverArea:I,driverKey:ee,driverMetaKey:r(ee)}}),H=j.reduce((K,Q)=>(K[Q.driverArea]??=[],K[Q.driverArea].push(Q),K),{}),q={};return await Promise.all(Object.entries(H).map(async([K,Q])=>{const I=await Ka.storage[K].get(Q.map(ee=>ee.driverMetaKey));Q.forEach(ee=>{q[ee.key]=I[ee.driverMetaKey]??{}})})),j.map(K=>({key:K.key,meta:q[K.key]}))},setItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await y(H,q,j)},setItems:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,value:H.value})}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).setItems(q)}))},setMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await T(H,q,j)},setMetas:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,properties:H.meta})}),await Promise.all(Object.entries(j).map(async([H,q])=>{const K=u(H),Q=q.map(({key:$})=>r($)),I=await K.getItems(Q),ee=Object.fromEntries(I.map(({key:$,value:De})=>[$,h(De)])),Ae=q.map(({key:$,properties:De})=>{const Ke=r($);return{key:Ke,value:o(ee[Ke]??{},De)}});await K.setItems(Ae)}))},removeItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await N(H,q,j)},removeItems:async R=>{const j={};R.forEach(H=>{let q,K;typeof H=="string"?q=H:"getValue"in H?q=H.key:"item"in H?(q=H.item.key,K=H.options):(q=H.key,K=H.options);const{driverArea:Q,driverKey:I}=f(q);j[Q]??=[],j[Q].push(I),K?.removeMeta&&j[Q].push(r(I))}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).removeItems(q)}))},clear:async R=>{await u(R).clear()},removeMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await x(H,q,j)},snapshot:async(R,j)=>{const H=await u(R).snapshot();return j?.excludeKeys?.forEach(q=>{delete H[q],delete H[r(q)]}),H},restoreSnapshot:async(R,j)=>{await u(R).restoreSnapshot(j)},watch:(R,j)=>{const{driver:H,driverKey:q}=f(R);return G(H,q,j)},unwatch(){Object.values(l).forEach(R=>{R.unwatch()})},defineItem:(R,j)=>{const{driver:H,driverKey:q}=f(R),{version:K=1,migrations:Q={},onMigrationComplete:I,debug:ee=!1}=j??{};if(K<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const Ae=async()=>{const ye=r(q),[{value:Re},{value:Mt}]=await H.getItems([q,ye]);if(Re==null)return;const nt=Mt?.v??1;if(nt>K)throw Error(`Version downgrade detected (v${nt} -> v${K}) for "${R}"`);if(nt===K)return;ee&&console.debug(`[@wxt-dev/storage] Running storage migration for ${R}: v${nt} -> v${K}`);const yt=Array.from({length:K-nt},(B,W)=>nt+W+1);let M=Re;for(const B of yt)try{M=await Q?.[B]?.(M)??M,ee&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${B}`)}catch(W){throw new Zg(R,B,{cause:W})}await H.setItems([{key:q,value:M},{key:ye,value:{...Mt,v:K}}]),ee&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${R} v${K}`,{migratedValue:M}),I?.(M,K)},$=j?.migrations==null?Promise.resolve():Ae().catch(ye=>{console.error(`[@wxt-dev/storage] Migration failed for ${R}`,ye)}),De=new Ng,Ke=()=>j?.fallback??j?.defaultValue??null,Kt=()=>De.runExclusive(async()=>{const ye=await H.getItem(q);if(ye!=null||j?.init==null)return ye;const Re=await j.init();return await H.setItem(q,Re),ye==null&&K>1&&await T(H,q,{v:K}),Re});return $.then(Kt),{key:R,get defaultValue(){return Ke()},get fallback(){return Ke()},getValue:async()=>(await $,j?.init?await Kt():await v(H,q,j)),getMeta:async()=>(await $,await p(H,q)),setValue:async ye=>(await $,await y(H,q,ye)),setMeta:async ye=>(await $,await T(H,q,ye)),removeValue:async ye=>(await $,await N(H,q,ye)),removeMeta:async ye=>(await $,await x(H,q,ye)),watch:ye=>G(H,q,(Re,Mt)=>ye(Re??Ke(),Mt??Ke())),migrate:Ae}}}}function mi(l){const u=()=>{if(Ka.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment +`+a.stack}}var Ri=Object.prototype.hasOwnProperty,Ci=l.unstable_scheduleCallback,ji=l.unstable_cancelCallback,Qm=l.unstable_shouldYield,Lm=l.unstable_requestPaint,pt=l.unstable_now,Km=l.unstable_getCurrentPriorityLevel,br=l.unstable_ImmediatePriority,Sr=l.unstable_UserBlockingPriority,Fa=l.unstable_NormalPriority,$m=l.unstable_LowPriority,zr=l.unstable_IdlePriority,Jm=l.log,km=l.unstable_setDisableYieldValue,Fl=null,_t=null;function dn(e){if(typeof Jm=="function"&&km(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Fl,e)}catch{}}var bt=Math.clz32?Math.clz32:Im,Wm=Math.log,Fm=Math.LN2;function Im(e){return e>>>=0,e===0?32:31-(Wm(e)/Fm|0)|0}var Ia=256,Pa=262144,eu=4194304;function Gn(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 tu(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,c=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~c,a!==0?i=Gn(a):(s&=m,s!==0?i=Gn(s):n||(n=m&~e,n!==0&&(i=Gn(n))))):(m=a&~c,m!==0?i=Gn(m):s!==0?i=Gn(s):n||(n=a&~e,n!==0&&(i=Gn(n)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:i}function Il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pm(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 Er(){var e=eu;return eu<<=1,(eu&62914560)===0&&(eu=4194304),e}function xi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ev(e,t,n,a,i,c){var s=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 m=e.entanglements,g=e.expirationTimes,E=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var iv=/[\n"\\]/g;function Dt(e){return e.replace(iv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xi(e,t,n,a,i,c,s,m){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Vi(e,s,Nt(t)):n!=null?Vi(e,s,Nt(n)):a!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Nt(m):e.removeAttribute("name")}function xr(e,t,n,a,i,c,s,m){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Gi(e);return}n=n!=null?""+Nt(n):"",t=t!=null?""+Nt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Gi(e)}function Vi(e,t,n){t==="number"&&au(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ml(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ji=!1;if(kt)try{var la={};Object.defineProperty(la,"passive",{get:function(){Ji=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{Ji=!1}var mn=null,ki=null,iu=null;function Vr(){if(iu)return iu;var e,t=ki,n=t.length,a,i="value"in mn?mn.value:mn.textContent,c=i.length;for(e=0;e=ia),kr=" ",Wr=!1;function Fr(e,t){switch(e){case"keyup":return Cv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ir(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function xv(e,t){switch(e){case"compositionend":return Ir(t);case"keypress":return t.which!==32?null:(Wr=!0,kr);case"textInput":return e=t.data,e===kr&&Wr?null:e;default:return null}}function Hv(e,t){if(pl)return e==="compositionend"||!ec&&Fr(e,t)?(e=Vr(),iu=ki=mn=null,pl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=io(n)}}function fo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=au(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=au(e.document)}return t}function lc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Lv=kt&&"documentMode"in document&&11>=document.documentMode,_l=null,ac=null,oa=null,uc=!1;function oo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||_l==null||_l!==au(a)||(a=_l,"selectionStart"in a&&lc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),oa&&ra(oa,a)||(oa=a,a=Pu(ac,"onSelect"),0>=s,i-=s,Vt=1<<32-bt(t)+i|n<le?(re=L,L=null):re=L.sibling;var me=O(S,L,z[le],Z);if(me===null){L===null&&(L=re);break}e&&L&&me.alternate===null&&t(S,L),_=c(me,_,le),he===null?$=me:he.sibling=me,he=me,L=re}if(le===z.length)return n(S,L),oe&&Ft(S,le),$;if(L===null){for(;lele?(re=L,L=null):re=L.sibling;var xn=O(S,L,me.value,Z);if(xn===null){L===null&&(L=re);break}e&&L&&xn.alternate===null&&t(S,L),_=c(xn,_,le),he===null?$=xn:he.sibling=xn,he=xn,L=re}if(me.done)return n(S,L),oe&&Ft(S,le),$;if(L===null){for(;!me.done;le++,me=z.next())me=U(S,me.value,Z),me!==null&&(_=c(me,_,le),he===null?$=me:he.sibling=me,he=me);return oe&&Ft(S,le),$}for(L=a(L);!me.done;le++,me=z.next())me=A(L,S,le,me.value,Z),me!==null&&(e&&me.alternate!==null&&L.delete(me.key===null?le:me.key),_=c(me,_,le),he===null?$=me:he.sibling=me,he=me);return e&&L.forEach(function(sg){return t(S,sg)}),oe&&Ft(S,le),$}function Te(S,_,z,Z){if(typeof z=="object"&&z!==null&&z.type===j&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case G:e:{for(var $=z.key;_!==null;){if(_.key===$){if($=z.type,$===j){if(_.tag===7){n(S,_.sibling),Z=i(_,z.props.children),Z.return=S,S=Z;break e}}else if(_.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===ge&&In($)===_.type){n(S,_.sibling),Z=i(_,z.props),ya(Z,z),Z.return=S,S=Z;break e}n(S,_);break}else t(S,_);_=_.sibling}z.type===j?(Z=$n(z.props.children,S.mode,Z,z.key),Z.return=S,S=Z):(Z=yu(z.type,z.key,z.props,null,S.mode,Z),ya(Z,z),Z.return=S,S=Z)}return s(S);case R:e:{for($=z.key;_!==null;){if(_.key===$)if(_.tag===4&&_.stateNode.containerInfo===z.containerInfo&&_.stateNode.implementation===z.implementation){n(S,_.sibling),Z=i(_,z.children||[]),Z.return=S,S=Z;break e}else{n(S,_);break}else t(S,_);_=_.sibling}Z=dc(z,S.mode,Z),Z.return=S,S=Z}return s(S);case ge:return z=In(z),Te(S,_,z,Z)}if(Le(z))return X(S,_,z,Z);if(se(z)){if($=se(z),typeof $!="function")throw Error(r(150));return z=$.call(z),F(S,_,z,Z)}if(typeof z.then=="function")return Te(S,_,Eu(z),Z);if(z.$$typeof===Q)return Te(S,_,_u(S,z),Z);Tu(S,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,_!==null&&_.tag===6?(n(S,_.sibling),Z=i(_,z),Z.return=S,S=Z):(n(S,_),Z=sc(z,S.mode,Z),Z.return=S,S=Z),s(S)):n(S,_)}return function(S,_,z,Z){try{va=0;var $=Te(S,_,z,Z);return Zl=null,$}catch(L){if(L===Dl||L===Su)throw L;var he=zt(29,L,null,S.mode);return he.lanes=Z,he.return=S,he}}}var el=Co(!0),jo=Co(!1),_n=!1;function Tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ve&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=vu(e),po(e,null,n),t}return mu(e,a,t,n),vu(e)}function ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}function Ac(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?i=c=s:c=c.next=s,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Mc=!1;function pa(){if(Mc){var e=Nl;if(e!==null)throw e}}function _a(e,t,n,a){Mc=!1;var i=e.updateQueue;_n=!1;var c=i.firstBaseUpdate,s=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var g=m,E=g.next;g.next=null,s===null?c=E:s.next=E,s=g;var N=e.alternate;N!==null&&(N=N.updateQueue,m=N.lastBaseUpdate,m!==s&&(m===null?N.firstBaseUpdate=E:m.next=E,N.lastBaseUpdate=g))}if(c!==null){var U=i.baseState;s=0,N=E=g=null,m=c;do{var O=m.lane&-536870913,A=O!==m.lane;if(A?(fe&O)===O:(a&O)===O){O!==0&&O===Ml&&(Mc=!0),N!==null&&(N=N.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var X=e,F=m;O=t;var Te=n;switch(F.tag){case 1:if(X=F.payload,typeof X=="function"){U=X.call(Te,U,O);break e}U=X;break e;case 3:X.flags=X.flags&-65537|128;case 0:if(X=F.payload,O=typeof X=="function"?X.call(Te,U,O):X,O==null)break e;U=M({},U,O);break e;case 2:_n=!0}}O=m.callback,O!==null&&(e.flags|=64,A&&(e.flags|=8192),A=i.callbacks,A===null?i.callbacks=[O]:A.push(O))}else A={lane:O,tag:m.tag,payload:m.payload,callback:m.callback,next:null},N===null?(E=N=A,g=U):N=N.next=A,s|=O;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;A=m,m=A.next,A.next=null,i.lastBaseUpdate=A,i.shared.pending=null}}while(!0);N===null&&(g=U),i.baseState=g,i.firstBaseUpdate=E,i.lastBaseUpdate=N,c===null&&(i.shared.lanes=0),An|=s,e.lanes=s,e.memoizedState=U}}function xo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ec?c:8;var s=D.T,m={};D.T=m,Kc(e,!1,t,n);try{var g=i(),E=D.S;if(E!==null&&E(m,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var N=ey(g,a);za(e,t,N,Mt(e))}else za(e,t,a,Mt(e))}catch(U){za(e,t,{then:function(){},status:"rejected",reason:U},Mt())}finally{B.p=c,s!==null&&m.types!==null&&(s.types=m.types),D.T=s}}function iy(){}function Qc(e,t,n,a){if(e.tag!==5)throw Error(r(476));var i=vs(e).queue;ms(e,i,t,J,n===null?iy:function(){return ys(e),n(a)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:J},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),za(e,t.next.queue,{},Mt())}function Lc(){return Fe(Ba)}function gs(){return He().memoizedState}function ps(){return He().memoizedState}function cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Mt();e=bn(n);var a=Sn(t,e,n);a!==null&&(vt(a,t,n),ga(a,t,n)),t={cache:bc()},e.payload=t;return}t=t.return}}function fy(e,t,n){var a=Mt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cu(e)?bs(t,n):(n=rc(e,t,n,a),n!==null&&(vt(n,e,a),Ss(n,t,a)))}function _s(e,t,n){var a=Mt();za(e,t,n,a)}function za(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cu(e))bs(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var s=t.lastRenderedState,m=c(s,n);if(i.hasEagerState=!0,i.eagerState=m,St(m,s))return mu(e,t,i,0),Me===null&&hu(),!1}catch{}if(n=rc(e,t,i,a),n!==null)return vt(n,e,a),Ss(n,t,a),!0}return!1}function Kc(e,t,n,a){if(a={lane:2,revertLane:Of(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Cu(e)){if(t)throw Error(r(479))}else t=rc(e,n,a,2),t!==null&&vt(t,e,2)}function Cu(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function bs(e,t){wl=Mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ss(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}var Ea={readContext:Fe,use:Zu,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useLayoutEffect:Re,useInsertionEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useSyncExternalStore:Re,useId:Re,useHostTransitionStatus:Re,useFormState:Re,useActionState:Re,useOptimistic:Re,useMemoCache:Re,useCacheRefresh:Re};Ea.useEffectEvent=Re;var zs={readContext:Fe,use:Zu,useCallback:function(e,t){return ct().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:us,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wu(4194308,4,rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wu(4194308,4,e,t)},useInsertionEffect:function(e,t){wu(4,2,e,t)},useMemo:function(e,t){var n=ct();t=t===void 0?null:t;var a=e();if(tl){dn(!0);try{e()}finally{dn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=ct();if(n!==void 0){var i=n(t);if(tl){dn(!0);try{n(t)}finally{dn(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=fy.bind(null,ne,e),[a.memoizedState,e]},useRef:function(e){var t=ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Bc(e);var t=e.queue,n=_s.bind(null,ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xc,useDeferredValue:function(e,t){var n=ct();return Vc(n,e,t)},useTransition:function(){var e=Bc(!1);return e=ms.bind(null,ne,e.queue,!0,!1),ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ne,i=ct();if(oe){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Me===null)throw Error(r(349));(fe&127)!==0||Vo(a,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,us(Lo.bind(null,a,c,e),[e]),a.flags|=2048,Cl(9,{destroy:void 0},Qo.bind(null,a,c,n,t),null),n},useId:function(){var e=ct(),t=Me.identifierPrefix;if(oe){var n=Qt,a=Vt;n=(a&~(1<<32-bt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Nu++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?s.createElement(i,{is:a.is}):s.createElement(i)}}c[ke]=t,c[rt]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)c.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=c;e:switch(Pe(c,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ln(t)}}return De(t),cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ln(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ae.current,Ol(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=We,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[ke]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Gd(e.nodeValue,n)),e||gn(t,!0)}else e=ei(e).createTextNode(a),e[ke]=t,t.stateNode=e}return De(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ol(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ke]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),e=!1}else n=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Tt(t),t):(Tt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return De(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ol(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[ke]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),i=!1}else i=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Tt(t),t):(Tt(t),null)}return Tt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bu(t,t.updateQueue),De(t),null);case 4:return je(),e===null&&Df(t.stateNode.containerInfo),De(t),null;case 10:return Pt(t.type),De(t),null;case 19:if(C(xe),a=t.memoizedState,a===null)return De(t),null;if(i=(t.flags&128)!==0,c=a.rendering,c===null)if(i)Oa(a,!1);else{if(Ce!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Au(e),c!==null){for(t.flags|=128,Oa(a,!1),e=c.updateQueue,t.updateQueue=e,Bu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_o(n,e),n=n.sibling;return Y(xe,xe.current&1|2),oe&&Ft(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&pt()>Qu&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304)}else{if(!i)if(e=Au(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bu(t,e),Oa(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!oe)return De(t),null}else 2*pt()-a.renderingStartTime>Qu&&n!==536870912&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=pt(),e.sibling=null,n=xe.current,Y(xe,i?n&1|2:n&1),oe&&Ft(t,a.treeForkCount),e):(De(t),null);case 22:case 23:return Tt(t),Dc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),n=t.updateQueue,n!==null&&Bu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&C(Fn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pt(qe),De(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function hy(e,t){switch(mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pt(qe),je(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wa(t),null;case 31:if(t.memoizedState!==null){if(Tt(t),t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Tt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(xe),null;case 4:return je(),null;case 10:return Pt(t.type),null;case 22:case 23:return Tt(t),Dc(),e!==null&&C(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pt(qe),null;case 25:return null;default:return null}}function Ks(e,t){switch(mc(t),t.tag){case 3:Pt(qe),je();break;case 26:case 27:case 5:Wa(t);break;case 4:je();break;case 31:t.memoizedState!==null&&Tt(t);break;case 13:Tt(t);break;case 19:C(xe);break;case 10:Pt(t.type);break;case 22:case 23:Tt(t),Dc(),e!==null&&C(Fn);break;case 24:Pt(qe)}}function Aa(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var c=n.create,s=n.inst;a=c(),s.destroy=a}n=n.next}while(n!==i)}}catch(m){be(t,t.return,m)}}function Tn(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){var s=a.inst,m=s.destroy;if(m!==void 0){s.destroy=void 0,i=t;var g=n,E=m;try{E()}catch(N){be(i,g,N)}}}a=a.next}while(a!==c)}}catch(N){be(t,t.return,N)}}function $s(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ho(t,n)}catch(a){be(e,e.return,a)}}}function Js(e,t,n){n.props=nl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){be(e,t,a)}}function Ma(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){be(e,t,i)}}function Lt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){be(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){be(e,t,i)}else n.current=null}function ks(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){be(e,e.return,i)}}function ff(e,t,n){try{var a=e.stateNode;jy(a,e.type,n,t),a[rt]=t}catch(i){be(e,e.return,i)}}function Ws(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Un(e.type)||e.tag===4}function rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ws(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(e.tag===27&&Un(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 of(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function Yu(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yu(e,t,n),e=e.sibling;e!==null;)Yu(e,t,n),e=e.sibling}function Fs(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pe(t,a,n),t[ke]=e,t[rt]=n}catch(c){be(e,e.return,c)}}var an=!1,Ge=!1,sf=!1,Is=typeof WeakSet=="function"?WeakSet:Set,$e=null;function my(e,t){if(e=e.containerInfo,wf=ci,e=ro(e),lc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var s=0,m=-1,g=-1,E=0,N=0,U=e,O=null;t:for(;;){for(var A;U!==n||i!==0&&U.nodeType!==3||(m=s+i),U!==c||a!==0&&U.nodeType!==3||(g=s+a),U.nodeType===3&&(s+=U.nodeValue.length),(A=U.firstChild)!==null;)O=U,U=A;for(;;){if(U===e)break t;if(O===n&&++E===i&&(m=s),O===c&&++N===a&&(g=s),(A=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=A}n=m===-1||g===-1?null:{start:m,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},ci=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),Pe(c,a,n),c[ke]=e,Ke(c),a=c;break e;case"link":var s=ah("link","href",i).get(a+(n.href||""));if(s){for(var m=0;mTe&&(s=Te,Te=F,F=s);var S=co(m,F),_=co(m,Te);if(S&&_&&(A.rangeCount!==1||A.anchorNode!==S.node||A.anchorOffset!==S.offset||A.focusNode!==_.node||A.focusOffset!==_.offset)){var z=U.createRange();z.setStart(S.node,S.offset),A.removeAllRanges(),F>Te?(A.addRange(z),A.extend(_.node,_.offset)):(z.setEnd(_.node,_.offset),A.addRange(z))}}}}for(U=[],A=m;A=A.parentNode;)A.nodeType===1&&U.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;mn?32:n,D.T=null,n=pf,pf=null;var c=Nn,s=on;if(Qe=0,Bl=Nn=null,on=0,(ve&6)!==0)throw Error(r(331));var m=ve;if(ve|=4,rd(c.current),id(c,c.current,s,n),ve=m,Ra(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Fl,c)}catch{}return!0}finally{B.p=i,D.T=a,Md(e,t)}}function Dd(e,t,n){t=Ut(n,t),t=Wc(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Pl(e,2),Kt(e))}function be(e,t,n){if(e.tag===3)Dd(e,e,n);else for(;t!==null;){if(t.tag===3){Dd(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Mn===null||!Mn.has(a))){e=Ut(n,e),n=Zs(2),a=Sn(t,n,2),a!==null&&(Us(n,a,t,e),Pl(a,2),Kt(a));break}}t=t.return}}function zf(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new gy;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(mf=!0,i.add(n),e=zy.bind(null,e,t,n),t.then(e,e))}function zy(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Me===e&&(fe&n)===n&&(Ce===4||Ce===3&&(fe&62914560)===fe&&300>pt()-Vu?(ve&2)===0&&Yl(e,0):vf|=n,ql===fe&&(ql=0)),Kt(e)}function Zd(e,t){t===0&&(t=Er()),e=Kn(e,t),e!==null&&(Pl(e,t),Kt(e))}function Ey(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zd(e,n)}function Ty(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Zd(e,n)}function Oy(e,t){return Ci(e,t)}var Wu=null,Xl=null,Ef=!1,Fu=!1,Tf=!1,Zn=0;function Kt(e){e!==Xl&&e.next===null&&(Xl===null?Wu=Xl=e:Xl=Xl.next=e),Fu=!0,Ef||(Ef=!0,My())}function Ra(e,t){if(!Tf&&Fu){Tf=!0;do for(var n=!1,a=Wu;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var c=0;else{var s=a.suspendedLanes,m=a.pingedLanes;c=(1<<31-bt(42|e)+1)-1,c&=i&~(s&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Cd(a,c))}else c=fe,c=tu(a,a===Me?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Il(a,c)||(n=!0,Cd(a,c));a=a.next}while(n);Tf=!1}}function Ay(){Ud()}function Ud(){Fu=Ef=!1;var e=0;Zn!==0&&Hy()&&(e=Zn);for(var t=pt(),n=null,a=Wu;a!==null;){var i=a.next,c=wd(a,t);c===0?(a.next=null,n===null?Wu=i:n.next=i,i===null&&(Xl=n)):(n=a,(e!==0||(c&3)!==0)&&(Fu=!0)),a=i}Qe!==0&&Qe!==5||Ra(e),Zn!==0&&(Zn=0)}function wd(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0m)break;var N=g.transferSize,U=g.initiatorType;N&&Xd(U)&&(g=g.responseEnd,s+=N*(g"u"?null:document;function eh(e,t,n){var a=Vl;if(a&&typeof t=="string"&&t){var i=Dt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Pd.has(i)||(Pd.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Ky(e){sn.D(e),eh("dns-prefetch",e,null)}function $y(e,t){sn.C(e,t),eh("preconnect",e,t)}function Jy(e,t,n){sn.L(e,t,n);var a=Vl;if(a&&e&&t){var i='link[rel="preload"][as="'+Dt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Dt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Dt(n.imageSizes)+'"]')):i+='[href="'+Dt(e)+'"]';var c=i;switch(t){case"style":c=Ql(e);break;case"script":c=Ll(e)}Ht.has(c)||(e=M({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ht.set(c,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Ha(c))||t==="script"&&a.querySelector(qa(c))||(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function ky(e,t){sn.m(e,t);var n=Vl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Dt(a)+'"][href="'+Dt(e)+'"]',c=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ll(e)}if(!Ht.has(c)&&(e=M({rel:"modulepreload",href:e},t),Ht.set(c,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qa(c)))return}a=n.createElement("link"),Pe(a,"link",e),Ke(a),n.head.appendChild(a)}}}function Wy(e,t,n){sn.S(e,t,n);var a=Vl;if(a&&e){var i=dl(a).hoistableStyles,c=Ql(e);t=t||"default";var s=i.get(c);if(!s){var m={loading:0,preload:null};if(s=a.querySelector(Ha(c)))m.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ht.get(c))&&Yf(e,n);var g=s=a.createElement("link");Ke(g),Pe(g,"link",e),g._p=new Promise(function(E,N){g.onload=E,g.onerror=N}),g.addEventListener("load",function(){m.loading|=1}),g.addEventListener("error",function(){m.loading|=2}),m.loading|=4,ni(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:m},i.set(c,s)}}}function Fy(e,t){sn.X(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=M({src:e,async:!0},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),Ke(c),Pe(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function Iy(e,t){sn.M(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=M({src:e,async:!0,type:"module"},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),Ke(c),Pe(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function th(e,t,n,a){var i=(i=ae.current)?ti(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=dl(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var c=dl(i).hoistableStyles,s=c.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,s),(c=i.querySelector(Ha(e)))&&!c._p&&(s.instance=c,s.state.loading=5),Ht.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ht.set(e,n),c||Py(i,e,n,s.state))),t&&a===null)throw Error(r(528,""));return s}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ll(n),n=dl(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ql(e){return'href="'+Dt(e)+'"'}function Ha(e){return'link[rel="stylesheet"]['+e+"]"}function nh(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function Py(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Pe(t,"link",n),Ke(t),e.head.appendChild(t))}function Ll(e){return'[src="'+Dt(e)+'"]'}function qa(e){return"script[async]"+e}function lh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Dt(n.href)+'"]');if(a)return t.instance=a,Ke(a),a;var i=M({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),Pe(a,"style",i),ni(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ql(n.href);var c=e.querySelector(Ha(i));if(c)return t.state.loading|=4,t.instance=c,Ke(c),c;a=nh(n),(i=Ht.get(i))&&Yf(a,i),c=(e.ownerDocument||e).createElement("link"),Ke(c);var s=c;return s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),Pe(c,"link",a),t.state.loading|=4,ni(c,n.precedence,e),t.instance=c;case"script":return c=Ll(n.src),(i=e.querySelector(qa(c)))?(t.instance=i,Ke(i),i):(a=n,(i=Ht.get(c))&&(a=M({},n),Gf(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),Pe(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ni(a,n.precedence,e));return t.instance}function ni(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,c=i,s=0;s title"):null)}function eg(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ih(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tg(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Ql(a.href),c=t.querySelector(Ha(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ai.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,Ke(c);return}c=t.ownerDocument||t,a=nh(a),(i=Ht.get(i))&&Yf(a,i),c=c.createElement("link"),Ke(c);var s=c;s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),Pe(c,"link",a),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ai.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xf=0;function ng(e,t){return e.stylesheets&&e.count===0&&ii(e,e.stylesheets),0Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function ai(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ii(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ui=null;function ii(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ui=new Map,t.forEach(lg,e),ui=null,ai.call(e))}function lg(e,t){if(!(t.state.loading&4)){var n=ui.get(e);if(n)var a=n.get(null);else{n=new Map,ui.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),Ff.exports=_g(),Ff.exports}var Sg=bg();const zg=nm(Sg),Ka=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,Zh=Ka,Eg=new Error("request for lock canceled");var Tg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(M){h(M)}}function p(T){try{y(r.throw(T))}catch(M){h(M)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Og{constructor(u,f=Eg){this._value=u,this._cancelError=f,this._queue=[],this._weightedWaiters=[]}acquire(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return new Promise((r,o)=>{const d={resolve:r,reject:o,weight:u,priority:f},h=lm(this._queue,v=>f<=v.priority);h===-1&&u<=this._value?this._dispatchItem(d):this._queue.splice(h+1,0,d)})}runExclusive(u){return Tg(this,arguments,void 0,function*(f,r=1,o=0){const[d,h]=yield this.acquire(r,o);try{return yield f(d)}finally{h()}})}waitForUnlock(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return this._couldLockImmediately(u,f)?Promise.resolve():new Promise(r=>{this._weightedWaiters[u-1]||(this._weightedWaiters[u-1]=[]),Ag(this._weightedWaiters[u-1],{resolve:r,priority:f})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(u){this._value=u,this._dispatchQueue()}release(u=1){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);this._value+=u,this._dispatchQueue()}cancel(){this._queue.forEach(u=>u.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(u){const f=this._value;this._value-=u.weight,u.resolve([f,this._newReleaser(u.weight)])}_newReleaser(u){let f=!1;return()=>{f||(f=!0,this.release(u))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let u=this._value;u>0;u--){const f=this._weightedWaiters[u-1];f&&(f.forEach(r=>r.resolve()),this._weightedWaiters[u-1]=[])}else{const u=this._queue[0].priority;for(let f=this._value;f>0;f--){const r=this._weightedWaiters[f-1];if(!r)continue;const o=r.findIndex(d=>d.priority<=u);(o===-1?r:r.splice(0,o)).forEach((d=>d.resolve()))}}}_couldLockImmediately(u,f){return(this._queue.length===0||this._queue[0].priorityu.priority<=r.priority);l.splice(f+1,0,u)}function lm(l,u){for(let f=l.length-1;f>=0;f--)if(u(l[f]))return f;return-1}var Mg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(M){h(M)}}function p(T){try{y(r.throw(T))}catch(M){h(M)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Ng{constructor(u){this._semaphore=new Og(1,u)}acquire(){return Mg(this,arguments,void 0,function*(u=0){const[,f]=yield this._semaphore.acquire(1,u);return f})}runExclusive(u,f=0){return this._semaphore.runExclusive(()=>u(),1,f)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(u=0){return this._semaphore.waitForUnlock(1,u)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var Uh=Object.prototype.hasOwnProperty;function lr(l,u){var f,r;if(l===u)return!0;if(l&&u&&(f=l.constructor)===u.constructor){if(f===Date)return l.getTime()===u.getTime();if(f===RegExp)return l.toString()===u.toString();if(f===Array){if((r=l.length)===u.length)for(;r--&&lr(l[r],u[r]););return r===-1}if(!f||typeof l=="object"){r=0;for(f in l)if(Uh.call(l,f)&&++r&&!Uh.call(u,f)||!(f in u)||!lr(l[f],u[f]))return!1;return Object.keys(u).length===r}}return l!==l&&u!==u}const am=Dg();function Dg(){const l={local:mi("local"),session:mi("session"),sync:mi("sync"),managed:mi("managed")},u=R=>{const j=l[R];if(j==null){const H=Object.keys(l).join(", ");throw Error(`Invalid area "${R}". Options: ${H}`)}return j},f=R=>{const j=R.indexOf(":"),H=R.substring(0,j),q=R.substring(j+1);if(q==null)throw Error(`Storage key should be in the form of "area:key", but received "${R}"`);return{driverArea:H,driverKey:q,driver:u(H)}},r=R=>R+"$",o=(R,j)=>{const H={...R};return Object.entries(j).forEach(([q,K])=>{K==null?delete H[q]:H[q]=K}),H},d=(R,j)=>R??j??null,h=R=>typeof R=="object"&&!Array.isArray(R)?R:{},v=async(R,j,H)=>d(await R.getItem(j),H?.fallback??H?.defaultValue),p=async(R,j)=>{const H=r(j);return h(await R.getItem(H))},y=async(R,j,H)=>{await R.setItem(j,H??null)},T=async(R,j,H)=>{const q=r(j),K=h(await R.getItem(q));await R.setItem(q,o(K,H))},M=async(R,j,H)=>{if(await R.removeItem(j),H?.removeMeta){const q=r(j);await R.removeItem(q)}},x=async(R,j,H)=>{const q=r(j);if(H==null)await R.removeItem(q);else{const K=h(await R.getItem(q));[H].flat().forEach(Q=>delete K[Q]),await R.setItem(q,K)}},G=(R,j,H)=>R.watch(j,H);return{getItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);return await v(H,q,j)},getItems:async R=>{const j=new Map,H=new Map,q=[];R.forEach(Q=>{let I,ee;typeof Q=="string"?I=Q:"getValue"in Q?(I=Q.key,ee={fallback:Q.fallback}):(I=Q.key,ee=Q.options),q.push(I);const{driverArea:Oe,driverKey:W}=f(I),ge=j.get(Oe)??[];j.set(Oe,ge.concat(W)),H.set(I,ee)});const K=new Map;return await Promise.all(Array.from(j.entries()).map(async([Q,I])=>{(await l[Q].getItems(I)).forEach(ee=>{const Oe=`${Q}:${ee.key}`,W=H.get(Oe),ge=d(ee.value,W?.fallback??W?.defaultValue);K.set(Oe,ge)})})),q.map(Q=>({key:Q,value:K.get(Q)}))},getMeta:async R=>{const{driver:j,driverKey:H}=f(R);return await p(j,H)},getMetas:async R=>{const j=R.map(K=>{const Q=typeof K=="string"?K:K.key,{driverArea:I,driverKey:ee}=f(Q);return{key:Q,driverArea:I,driverKey:ee,driverMetaKey:r(ee)}}),H=j.reduce((K,Q)=>(K[Q.driverArea]??=[],K[Q.driverArea].push(Q),K),{}),q={};return await Promise.all(Object.entries(H).map(async([K,Q])=>{const I=await Ka.storage[K].get(Q.map(ee=>ee.driverMetaKey));Q.forEach(ee=>{q[ee.key]=I[ee.driverMetaKey]??{}})})),j.map(K=>({key:K.key,meta:q[K.key]}))},setItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await y(H,q,j)},setItems:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,value:H.value})}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).setItems(q)}))},setMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await T(H,q,j)},setMetas:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,properties:H.meta})}),await Promise.all(Object.entries(j).map(async([H,q])=>{const K=u(H),Q=q.map(({key:W})=>r(W)),I=await K.getItems(Q),ee=Object.fromEntries(I.map(({key:W,value:ge})=>[W,h(ge)])),Oe=q.map(({key:W,properties:ge})=>{const at=r(W);return{key:at,value:o(ee[at]??{},ge)}});await K.setItems(Oe)}))},removeItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await M(H,q,j)},removeItems:async R=>{const j={};R.forEach(H=>{let q,K;typeof H=="string"?q=H:"getValue"in H?q=H.key:"item"in H?(q=H.item.key,K=H.options):(q=H.key,K=H.options);const{driverArea:Q,driverKey:I}=f(q);j[Q]??=[],j[Q].push(I),K?.removeMeta&&j[Q].push(r(I))}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).removeItems(q)}))},clear:async R=>{await u(R).clear()},removeMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await x(H,q,j)},snapshot:async(R,j)=>{const H=await u(R).snapshot();return j?.excludeKeys?.forEach(q=>{delete H[q],delete H[r(q)]}),H},restoreSnapshot:async(R,j)=>{await u(R).restoreSnapshot(j)},watch:(R,j)=>{const{driver:H,driverKey:q}=f(R);return G(H,q,j)},unwatch(){Object.values(l).forEach(R=>{R.unwatch()})},defineItem:(R,j)=>{const{driver:H,driverKey:q}=f(R),{version:K=1,migrations:Q={},onMigrationComplete:I,debug:ee=!1}=j??{};if(K<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");let Oe=!1;const W=async()=>{const se=r(q),[{value:tt},{value:ut}]=await H.getItems([q,se]);if(Oe=tt==null&&ut?.v==null&&!!K,tt==null)return;const Le=ut?.v??1;if(Le>K)throw Error(`Version downgrade detected (v${Le} -> v${K}) for "${R}"`);if(Le===K)return;ee&&console.debug(`[@wxt-dev/storage] Running storage migration for ${R}: v${Le} -> v${K}`);const D=Array.from({length:K-Le},(J,de)=>Le+de+1);let B=tt;for(const J of D)try{B=await Q?.[J]?.(B)??B,ee&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${J}`)}catch(de){throw new Zg(R,J,{cause:de})}await H.setItems([{key:q,value:B},{key:se,value:{...ut,v:K}}]),ee&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${R} v${K}`,{migratedValue:B}),I?.(B,K)},ge=j?.migrations==null?Promise.resolve():W().catch(se=>{console.error(`[@wxt-dev/storage] Migration failed for ${R}`,se)}),at=new Ng,Bt=()=>j?.fallback??j?.defaultValue??null,gt=()=>at.runExclusive(async()=>{const se=await H.getItem(q);if(se!=null||j?.init==null)return se;const tt=await j.init();return await H.setItem(q,tt),se==null&&K>1&&await T(H,q,{v:K}),tt});return ge.then(gt),{key:R,get defaultValue(){return Bt()},get fallback(){return Bt()},getValue:async()=>(await ge,j?.init?await gt():await v(H,q,j)),getMeta:async()=>(await ge,await p(H,q)),setValue:async se=>{await ge,Oe?(Oe=!1,await Promise.all([y(H,q,se),T(H,q,{v:K})])):await y(H,q,se)},setMeta:async se=>(await ge,await T(H,q,se)),removeValue:async se=>(await ge,await M(H,q,se)),removeMeta:async se=>(await ge,await x(H,q,se)),watch:se=>G(H,q,(tt,ut)=>se(tt??Bt(),ut??Bt())),migrate:W}}}}function mi(l){const u=()=>{if(Ka.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371 - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html -`);if(Ka.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=Ka.storage[l];if(r==null)throw Error(`"browser.storage.${l}" is undefined`);return r},f=new Set;return{getItem:async r=>(await u().get(r))[r],getItems:async r=>{const o=await u().get(r);return r.map(d=>({key:d,value:o[d]??null}))},setItem:async(r,o)=>{o==null?await u().remove(r):await u().set({[r]:o})},setItems:async r=>{const o=r.reduce((d,{key:h,value:v})=>(d[h]=v,d),{});await u().set(o)},removeItem:async r=>{await u().remove(r)},removeItems:async r=>{await u().remove(r)},clear:async()=>{await u().clear()},snapshot:async()=>await u().get(),restoreSnapshot:async r=>{await u().set(r)},watch(r,o){const d=h=>{const v=h[r];v==null||lr(v.newValue,v.oldValue)||o(v.newValue??null,v.oldValue??null)};return u().onChanged.addListener(d),f.add(d),()=>{u().onChanged.removeListener(d),f.delete(d)}},unwatch(){f.forEach(r=>{u().onChanged.removeListener(r)}),f.clear()}}}var Zg=class extends Error{constructor(l,u,f){super(`v${u} migration failed for "${l}"`,f),this.key=l,this.version=u}};function Hn(l,u){return Array.isArray(l)?l.includes(u):l}var Ug=l=>{const u=l.getBoundingClientRect();return{width:u.width,height:u.height}};function Oi(){const l=ce.useRef(null),[u,f]=ce.useState({width:1,height:1});ce.useLayoutEffect(()=>{const o=()=>{l.current&&f(Ug(l.current))},d=([{contentBoxSize:v}])=>{f({height:v[0].blockSize,width:v[0].inlineSize})};window.addEventListener("resize",o,!1);const h=new ResizeObserver(d);return l.current&&h.observe(l.current),()=>{window.removeEventListener("resize",o,!1),h.disconnect()}},[]);const r=ce.useCallback(()=>{const{left:o=1,right:d=1,top:h=1,bottom:v=1}=l.current?.getBoundingClientRect()??{};return{left:o,right:d,top:h,bottom:v}},[]);return[l,u,r]}function pi(l,u,f){return lf?f:l}var wg=class{convert(l,u){let f=this.toHex("#000000"),r=this.hex2rgb(f),o=this.rgb2hsv(r);if(l==="hex"){const d=u;f=this.toHex(d),r=this.hex2rgb(f),f.startsWith("rgba")&&(r=this.toRgb(f),f=this.rgb2hex(r)),o=this.rgb2hsv(r)}else l==="rgb"?(r=u,f=this.rgb2hex(r),o=this.rgb2hsv(r)):l==="hsv"&&(o=u,r=this.hsv2rgb(o),f=this.rgb2hex(r));return{hex:f,rgb:r,hsv:o}}toHex(l){if(l.startsWith("#")){if(l.length===4||l.length===5)return l=l.split("").map((u,f)=>f?f<4?u+u:u==="f"?void 0:u+u:"#").join(""),l;if(l.length===7)return l;if(l.length===9)return l.endsWith("ff")?l.slice(0,7):l}else{const u=document.createElement("canvas").getContext("2d");if(!u)throw new Error("2d context not supported or canvas already initialized");return u.fillStyle=l,u.fillStyle}return"#000000"}toRgb(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v<3?255:1));return{r:f,g:r,b:o,a:d}}toHsv(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v?v<3?100:1:360));return{h:f,s:r,v:o,a:d}}hex2rgb(l){l=l.slice(1);let[u,f,r,o]=Array.from({length:4}).map((d,h)=>parseInt(l.slice(h*2,h*2+2),16));return o=Number.isNaN(o)?1:o/255,{r:u,g:f,b:r,a:o}}rgb2hsv({r:l,g:u,b:f,a:r}){l/=255,u/=255,f/=255;const o=Math.max(l,u,f),d=o-Math.min(l,u,f),h=d?(o===l?(u-f)/d+(uMath.round(y<3?p:p*255).toString(16).padStart(2,"0"));return["#",o,d,h,v==="ff"?"":v].join("")}},at=new wg;function ul(l){return"touches"in l}var fr=ce.memo(({onCoordinateChange:l,children:u,disabled:f})=>{const[r,{width:o,height:d},h]=Oi(),v=ce.useCallback((y,T=!1)=>{const{left:N,top:x}=h(),G=pi(y.clientX-N,0,o),R=pi(y.clientY-x,0,d);l(T,G,R)},[o,d,h,l]),p=ce.useCallback(y=>{if(!ul(y)&&y.button!==0)return;const T=x=>{v(ul(x)?x.touches[0]:x)},N=x=>{v(ul(x)?x.changedTouches[0]:x,!0),document.removeEventListener(ul(x)?"touchmove":"mousemove",T,!1),document.removeEventListener(ul(x)?"touchend":"mouseup",N,!1)};T(y),document.addEventListener(ul(y)?"touchmove":"mousemove",T,!1),document.addEventListener(ul(y)?"touchend":"mouseup",N,!1)},[v]);return me.createElement("div",{ref:r,className:"rcp-interactive",onMouseDown:p,onTouchStart:p,"aria-disabled":f},u)}),Rg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.a*d}),[l.hsv.a,d]),v=ce.useCallback((T,N)=>{const x=at.convert("hsv",{...l.hsv,a:N/d});f(x),T&&r?.(x)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.rgb.r,l.rgb.g,l.rgb.b].join(" "),[l.rgb.r,l.rgb.g,l.rgb.b]),y=ce.useMemo(()=>[p,l.rgb.a].join(" / "),[p,l.rgb.a]);return me.createElement(fr,{disabled:u,onCoordinateChange:v},me.createElement("div",{ref:o,style:{background:`linear-gradient(to right, rgb(${p} / 0), rgb(${p} / 1)) top left / auto auto, +`);if(Ka.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=Ka.storage[l];if(r==null)throw Error(`"browser.storage.${l}" is undefined`);return r},f=new Set;return{getItem:async r=>(await u().get(r))[r],getItems:async r=>{const o=await u().get(r);return r.map(d=>({key:d,value:o[d]??null}))},setItem:async(r,o)=>{o==null?await u().remove(r):await u().set({[r]:o})},setItems:async r=>{const o=r.reduce((d,{key:h,value:v})=>(d[h]=v,d),{});await u().set(o)},removeItem:async r=>{await u().remove(r)},removeItems:async r=>{await u().remove(r)},clear:async()=>{await u().clear()},snapshot:async()=>await u().get(),restoreSnapshot:async r=>{await u().set(r)},watch(r,o){const d=h=>{const v=h[r];v==null||lr(v.newValue,v.oldValue)||o(v.newValue??null,v.oldValue??null)};return u().onChanged.addListener(d),f.add(d),()=>{u().onChanged.removeListener(d),f.delete(d)}},unwatch(){f.forEach(r=>{u().onChanged.removeListener(r)}),f.clear()}}}var Zg=class extends Error{constructor(l,u,f){super(`v${u} migration failed for "${l}"`,f),this.key=l,this.version=u}};function Hn(l,u){return Array.isArray(l)?l.includes(u):l}var Ug=l=>{const u=l.getBoundingClientRect();return{width:u.width,height:u.height}};function Oi(){const l=ce.useRef(null),[u,f]=ce.useState({width:1,height:1});ce.useLayoutEffect(()=>{const o=()=>{l.current&&f(Ug(l.current))},d=([{contentBoxSize:v}])=>{f({height:v[0].blockSize,width:v[0].inlineSize})};window.addEventListener("resize",o,!1);const h=new ResizeObserver(d);return l.current&&h.observe(l.current),()=>{window.removeEventListener("resize",o,!1),h.disconnect()}},[]);const r=ce.useCallback(()=>{const{left:o=1,right:d=1,top:h=1,bottom:v=1}=l.current?.getBoundingClientRect()??{};return{left:o,right:d,top:h,bottom:v}},[]);return[l,u,r]}function pi(l,u,f){return lf?f:l}var wg=class{convert(l,u){let f=this.toHex("#000000"),r=this.hex2rgb(f),o=this.rgb2hsv(r);if(l==="hex"){const d=u;f=this.toHex(d),r=this.hex2rgb(f),f.startsWith("rgba")&&(r=this.toRgb(f),f=this.rgb2hex(r)),o=this.rgb2hsv(r)}else l==="rgb"?(r=u,f=this.rgb2hex(r),o=this.rgb2hsv(r)):l==="hsv"&&(o=u,r=this.hsv2rgb(o),f=this.rgb2hex(r));return{hex:f,rgb:r,hsv:o}}toHex(l){if(l.startsWith("#")){if(l.length===4||l.length===5)return l=l.split("").map((u,f)=>f?f<4?u+u:u==="f"?void 0:u+u:"#").join(""),l;if(l.length===7)return l;if(l.length===9)return l.endsWith("ff")?l.slice(0,7):l}else{const u=document.createElement("canvas").getContext("2d");if(!u)throw new Error("2d context not supported or canvas already initialized");return u.fillStyle=l,u.fillStyle}return"#000000"}toRgb(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v<3?255:1));return{r:f,g:r,b:o,a:d}}toHsv(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v?v<3?100:1:360));return{h:f,s:r,v:o,a:d}}hex2rgb(l){l=l.slice(1);let[u,f,r,o]=Array.from({length:4}).map((d,h)=>parseInt(l.slice(h*2,h*2+2),16));return o=Number.isNaN(o)?1:o/255,{r:u,g:f,b:r,a:o}}rgb2hsv({r:l,g:u,b:f,a:r}){l/=255,u/=255,f/=255;const o=Math.max(l,u,f),d=o-Math.min(l,u,f),h=d?(o===l?(u-f)/d+(uMath.round(y<3?p:p*255).toString(16).padStart(2,"0"));return["#",o,d,h,v==="ff"?"":v].join("")}},lt=new wg;function ul(l){return"touches"in l}var fr=ce.memo(({onCoordinateChange:l,children:u,disabled:f})=>{const[r,{width:o,height:d},h]=Oi(),v=ce.useCallback((y,T=!1)=>{const{left:M,top:x}=h(),G=pi(y.clientX-M,0,o),R=pi(y.clientY-x,0,d);l(T,G,R)},[o,d,h,l]),p=ce.useCallback(y=>{if(!ul(y)&&y.button!==0)return;const T=x=>{v(ul(x)?x.touches[0]:x)},M=x=>{v(ul(x)?x.changedTouches[0]:x,!0),document.removeEventListener(ul(x)?"touchmove":"mousemove",T,!1),document.removeEventListener(ul(x)?"touchend":"mouseup",M,!1)};T(y),document.addEventListener(ul(y)?"touchmove":"mousemove",T,!1),document.addEventListener(ul(y)?"touchend":"mouseup",M,!1)},[v]);return ye.createElement("div",{ref:r,className:"rcp-interactive",onMouseDown:p,onTouchStart:p,"aria-disabled":f},u)}),Rg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.a*d}),[l.hsv.a,d]),v=ce.useCallback((T,M)=>{const x=lt.convert("hsv",{...l.hsv,a:M/d});f(x),T&&r?.(x)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.rgb.r,l.rgb.g,l.rgb.b].join(" "),[l.rgb.r,l.rgb.g,l.rgb.b]),y=ce.useMemo(()=>[p,l.rgb.a].join(" / "),[p,l.rgb.a]);return ye.createElement(fr,{disabled:u,onCoordinateChange:v},ye.createElement("div",{ref:o,style:{background:`linear-gradient(to right, rgb(${p} / 0), rgb(${p} / 1)) top left / auto auto, conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) top left / 12px 12px - repeat`},className:"rcp-alpha"},me.createElement("div",{style:{left:h.x,background:`linear-gradient(to right, rgb(${y}), rgb(${y})) top left / auto auto, + repeat`},className:"rcp-alpha"},ye.createElement("div",{style:{left:h.x,background:`linear-gradient(to right, rgb(${y}), rgb(${y})) top left / auto auto, conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) ${-h.x-4}px 2px / 12px 12px - repeat`},className:"rcp-alpha-cursor"})))});function um(l,u){return Math.round(l*10**u)/10**u}function wh({r:l,g:u,b:f,a:r}){const o=[Math.round(l),Math.round(u),Math.round(f)],d=um(r,3);return d<1&&o.push(d),o.join(", ")}function Rh({h:l,s:u,v:f,a:r}){const o=[`${Math.round(l)}°`,`${Math.round(u)}%`,`${Math.round(f)}%`],d=um(r,3);return d<1&&o.push(d),o.join(", ")}var Cg=ce.memo(({hideInput:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,h]=ce.useState({hex:{value:u.hex,inputted:!1},rgb:{value:wh(u.rgb),inputted:!1},hsv:{value:Rh(u.hsv),inputted:!1}});ce.useEffect(()=>{d.hex.inputted||h(T=>({...T,hex:{...T.hex,value:u.hex}}))},[d.hex.inputted,u.hex]),ce.useEffect(()=>{d.rgb.inputted||h(T=>({...T,rgb:{...T.rgb,value:wh(u.rgb)}}))},[d.rgb.inputted,u.rgb]),ce.useEffect(()=>{d.hsv.inputted||h(T=>({...T,hsv:{...T.hsv,value:Rh(u.hsv)}}))},[d.hsv.inputted,u.hsv]);const v=ce.useCallback(T=>N=>{const{value:x}=N.target;h(G=>({...G,[T]:{...G[T],value:x}})),r(T==="hsv"?at.convert("hsv",at.toHsv(x)):T==="rgb"?at.convert("rgb",at.toRgb(x)):at.convert("hex",x))},[r]),p=ce.useCallback(T=>()=>{h(N=>({...N,[T]:{...N[T],inputted:!0}}))},[]),y=ce.useCallback(T=>N=>{const{value:x}=N.target;h(G=>({...G,[T]:{...G[T],inputted:!1}})),o?.(T==="hsv"?at.convert("hsv",at.toHsv(x)):T==="rgb"?at.convert("rgb",at.toRgb(x)):at.convert("hex",x))},[o]);return me.createElement("div",{className:"rcp-fields"},!Hn(l,"hex")&&me.createElement("div",{className:"rcp-fields-floor"},me.createElement("div",{className:"rcp-field"},me.createElement("input",{id:"hex",className:"rcp-field-input",readOnly:f,value:d.hex.value,onChange:v("hex"),onFocus:p("hex"),onBlur:y("hex")}),me.createElement("label",{htmlFor:"hex",className:"rcp-field-label"},"HEX"))),(!Hn(l,"rgb")||!Hn(l,"hsv"))&&me.createElement("div",{className:"rcp-fields-floor"},!Hn(l,"rgb")&&me.createElement("div",{className:"rcp-field"},me.createElement("input",{id:"rgb",className:"rcp-field-input",readOnly:f,value:d.rgb.value,onChange:v("rgb"),onFocus:p("rgb"),onBlur:y("rgb")}),me.createElement("label",{htmlFor:"rgb",className:"rcp-field-label"},"RGB")),!Hn(l,"hsv")&&me.createElement("div",{className:"rcp-field"},me.createElement("input",{id:"hsv",className:"rcp-field-input",readOnly:f,value:d.hsv.value,onChange:v("hsv"),onFocus:p("hsv"),onBlur:y("hsv")}),me.createElement("label",{htmlFor:"hsv",className:"rcp-field-label"},"HSV"))))}),jg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.h/360*d}),[l.hsv.h,d]),v=ce.useCallback((y,T)=>{const N=at.convert("hsv",{...l.hsv,h:T/d*360});f(N),y&&r?.(N)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.hsv.h,"100%","50%"].join(" "),[l.hsv.h]);return me.createElement(fr,{disabled:u,onCoordinateChange:v},me.createElement("div",{ref:o,className:"rcp-hue"},me.createElement("div",{style:{left:h.x,backgroundColor:`hsl(${p})`},className:"rcp-hue-cursor"})))}),xg=ce.memo(({height:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,{width:h}]=Oi(),v=ce.useMemo(()=>{const N=u.hsv.s/100*h,x=(100-u.hsv.v)/100*l;return{x:N,y:x}},[u.hsv.s,u.hsv.v,h,l]),p=ce.useCallback((N,x,G)=>{const R=at.convert("hsv",{...u.hsv,s:x/h*100,v:100-G/l*100});r(R),N&&o?.(R)},[u.hsv,h,l,r,o]),y=ce.useMemo(()=>[u.hsv.h,"100%","50%"].join(" "),[u.hsv.h]),T=ce.useMemo(()=>[u.rgb.r,u.rgb.g,u.rgb.b].join(" "),[u.rgb.r,u.rgb.g,u.rgb.b]);return me.createElement(fr,{disabled:f,onCoordinateChange:p},me.createElement("div",{ref:d,style:{height:l,backgroundColor:`hsl(${y})`},className:"rcp-saturation"},me.createElement("div",{style:{left:v.x,top:v.y,backgroundColor:`rgb(${T})`},className:"rcp-saturation-cursor"})))}),Hg=ce.memo(({height:l=200,hideAlpha:u=!1,hideInput:f=!1,color:r,disabled:o=!1,onChange:d,onChangeComplete:h})=>me.createElement("div",{className:"rcp-root rcp"},me.createElement(xg,{height:l,color:r,disabled:o,onChange:d,onChangeComplete:h}),me.createElement("div",{className:"rcp-body"},me.createElement("section",{className:"rcp-section"},me.createElement(jg,{color:r,disabled:o,onChange:d,onChangeComplete:h}),!u&&me.createElement(Rg,{color:r,disabled:o,onChange:d,onChangeComplete:h})),(!Hn(f,"hex")||!Hn(f,"rgb")||!Hn(f,"hsv"))&&me.createElement("section",{className:"rcp-section"},me.createElement(Cg,{hideInput:f,color:r,disabled:o,onChange:d,onChangeComplete:h})))));function qg(l){const[u,f]=ce.useState(at.convert("hex",l));return ce.useEffect(()=>{f(at.convert("hex",l))},[l]),[u,f]}function w(l,u,f){function r(v,p){if(v._zod||Object.defineProperty(v,"_zod",{value:{def:p,constr:h,traits:new Set},enumerable:!1}),v._zod.traits.has(l))return;v._zod.traits.add(l),u(v,p);const y=h.prototype,T=Object.keys(y);for(let N=0;Nf?.Parent&&v instanceof f.Parent?!0:v?._zod?.traits?.has(l)}),Object.defineProperty(h,"name",{value:l}),h}class Jl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class im extends Error{constructor(u){super(`Encountered unidirectional transform during encode: ${u}`),this.name="ZodEncodeError"}}const cm={};function il(l){return cm}function fm(l){const u=Object.values(l).filter(r=>typeof r=="number");return Object.entries(l).filter(([r,o])=>u.indexOf(+r)===-1).map(([r,o])=>o)}function ar(l,u){return typeof u=="bigint"?u.toString():u}function rr(l){return{get value(){{const u=l();return Object.defineProperty(this,"value",{value:u}),u}}}}function or(l){return l==null}function sr(l){const u=l.startsWith("^")?1:0,f=l.endsWith("$")?l.length-1:l.length;return l.slice(u,f)}function Bg(l,u){const f=(l.toString().split(".")[1]||"").length,r=u.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const p=r.match(/\d?e-(\d?)/);p?.[1]&&(o=Number.parseInt(p[1]))}const d=f>o?f:o,h=Number.parseInt(l.toFixed(d).replace(".","")),v=Number.parseInt(u.toFixed(d).replace(".",""));return h%v/10**d}const Ch=Symbol("evaluating");function _e(l,u,f){let r;Object.defineProperty(l,u,{get(){if(r!==Ch)return r===void 0&&(r=Ch,r=f()),r},set(o){Object.defineProperty(l,u,{value:o})},configurable:!0})}function fl(l,u,f){Object.defineProperty(l,u,{value:f,writable:!0,enumerable:!0,configurable:!0})}function qn(...l){const u={};for(const f of l){const r=Object.getOwnPropertyDescriptors(f);Object.assign(u,r)}return Object.defineProperties({},u)}function jh(l){return JSON.stringify(l)}function Yg(l){return l.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const rm="captureStackTrace"in Error?Error.captureStackTrace:(...l)=>{};function _i(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)}const Gg=rr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const l=Function;return new l(""),!0}catch{return!1}});function Ja(l){if(_i(l)===!1)return!1;const u=l.constructor;if(u===void 0||typeof u!="function")return!0;const f=u.prototype;return!(_i(f)===!1||Object.prototype.hasOwnProperty.call(f,"isPrototypeOf")===!1)}function om(l){return Ja(l)?{...l}:Array.isArray(l)?[...l]:l}const Xg=new Set(["string","number","symbol"]);function Ai(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bn(l,u,f){const r=new l._zod.constr(u??l._zod.def);return(!u||f?.parent)&&(r._zod.parent=l),r}function k(l){const u=l;if(!u)return{};if(typeof u=="string")return{error:()=>u};if(u?.message!==void 0){if(u?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");u.error=u.message}return delete u.message,typeof u.error=="string"?{...u,error:()=>u.error}:u}function Vg(l){return Object.keys(l).filter(u=>l[u]._zod.optin==="optional"&&l[u]._zod.optout==="optional")}const Qg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Lg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&(h[v]=f.shape[v])}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function Kg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={...l._zod.def.shape};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&delete h[v]}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function $g(l,u){if(!Ja(u))throw new Error("Invalid input to extend: expected a plain object");const f=l._zod.def.checks;if(f&&f.length>0){const d=l._zod.def.shape;for(const h in u)if(Object.getOwnPropertyDescriptor(d,h)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=qn(l._zod.def,{get shape(){const d={...l._zod.def.shape,...u};return fl(this,"shape",d),d}});return Bn(l,o)}function Jg(l,u){if(!Ja(u))throw new Error("Invalid input to safeExtend: expected a plain object");const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u};return fl(this,"shape",r),r}});return Bn(l,f)}function kg(l,u){const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u._zod.def.shape};return fl(this,"shape",r),r},get catchall(){return u._zod.def.catchall},checks:[]});return Bn(l,f)}function Wg(l,u,f){const o=u._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const h=qn(u._zod.def,{get shape(){const v=u._zod.def.shape,p={...v};if(f)for(const y in f){if(!(y in v))throw new Error(`Unrecognized key: "${y}"`);f[y]&&(p[y]=l?new l({type:"optional",innerType:v[y]}):v[y])}else for(const y in v)p[y]=l?new l({type:"optional",innerType:v[y]}):v[y];return fl(this,"shape",p),p},checks:[]});return Bn(u,h)}function Fg(l,u,f){const r=qn(u._zod.def,{get shape(){const o=u._zod.def.shape,d={...o};if(f)for(const h in f){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);f[h]&&(d[h]=new l({type:"nonoptional",innerType:o[h]}))}else for(const h in o)d[h]=new l({type:"nonoptional",innerType:o[h]});return fl(this,"shape",d),d}});return Bn(u,r)}function $l(l,u=0){if(l.aborted===!0)return!0;for(let f=u;f{var r;return(r=f).path??(r.path=[]),f.path.unshift(l),f})}function vi(l){return typeof l=="string"?l:l?.message}function cl(l,u,f){const r={...l,path:l.path??[]};if(!l.message){const o=vi(l.inst?._zod.def?.error?.(l))??vi(u?.error?.(l))??vi(f.customError?.(l))??vi(f.localeError?.(l))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,u?.reportInput||delete r.input,r}function dr(l){return Array.isArray(l)?"array":typeof l=="string"?"string":"unknown"}function ka(...l){const[u,f,r]=l;return typeof u=="string"?{message:u,code:"custom",input:f,inst:r}:{...u}}const dm=(l,u)=>{l.name="$ZodError",Object.defineProperty(l,"_zod",{value:l._zod,enumerable:!1}),Object.defineProperty(l,"issues",{value:u,enumerable:!1}),l.message=JSON.stringify(u,ar,2),Object.defineProperty(l,"toString",{value:()=>l.message,enumerable:!1})},hm=w("$ZodError",dm),mm=w("$ZodError",dm,{Parent:Error});function Ig(l,u=f=>f.message){const f={},r=[];for(const o of l.issues)o.path.length>0?(f[o.path[0]]=f[o.path[0]]||[],f[o.path[0]].push(u(o))):r.push(u(o));return{formErrors:r,fieldErrors:f}}function Pg(l,u=f=>f.message){const f={_errors:[]},r=o=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h}));else if(d.code==="invalid_key")r({issues:d.issues});else if(d.code==="invalid_element")r({issues:d.issues});else if(d.path.length===0)f._errors.push(u(d));else{let h=f,v=0;for(;v(u,f,r,o)=>{const d=r?Object.assign(r,{async:!1}):{async:!1},h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise)throw new Jl;if(h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},mr=l=>async(u,f,r,o)=>{const d=r?Object.assign(r,{async:!0}):{async:!0};let h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},Mi=l=>(u,f,r)=>{const o=r?{...r,async:!1}:{async:!1},d=u._zod.run({value:f,issues:[]},o);if(d instanceof Promise)throw new Jl;return d.issues.length?{success:!1,error:new(l??hm)(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},e0=Mi(mm),Ni=l=>async(u,f,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let d=u._zod.run({value:f,issues:[]},o);return d instanceof Promise&&(d=await d),d.issues.length?{success:!1,error:new l(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},t0=Ni(mm),n0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hr(l)(u,f,o)},l0=l=>(u,f,r)=>hr(l)(u,f,r),a0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return mr(l)(u,f,o)},u0=l=>async(u,f,r)=>mr(l)(u,f,r),i0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mi(l)(u,f,o)},c0=l=>(u,f,r)=>Mi(l)(u,f,r),f0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ni(l)(u,f,o)},r0=l=>async(u,f,r)=>Ni(l)(u,f,r),o0=/^[cC][^\s-]{8,}$/,s0=/^[0-9a-z]+$/,d0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,h0=/^[0-9a-vA-V]{20}$/,m0=/^[A-Za-z0-9]{27}$/,v0=/^[a-zA-Z0-9_-]{21}$/,y0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,g0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xh=l=>l?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${l}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,p0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function b0(){return new RegExp(_0,"u")}const S0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,E0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,T0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vm=/^[A-Za-z0-9_-]*$/,A0=/^\+[1-9]\d{6,14}$/,ym="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",M0=new RegExp(`^${ym}$`);function gm(l){const u="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof l.precision=="number"?l.precision===-1?`${u}`:l.precision===0?`${u}:[0-5]\\d`:`${u}:[0-5]\\d\\.\\d{${l.precision}}`:`${u}(?::[0-5]\\d(?:\\.\\d+)?)?`}function N0(l){return new RegExp(`^${gm(l)}$`)}function D0(l){const u=gm({precision:l.precision}),f=["Z"];l.local&&f.push(""),l.offset&&f.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${u}(?:${f.join("|")})`;return new RegExp(`^${ym}T(?:${r})$`)}const Z0=l=>{const u=l?`[\\s\\S]{${l?.minimum??0},${l?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${u}$`)},U0=/^-?\d+$/,w0=/^-?\d+(?:\.\d+)?$/,R0=/^[^A-Z]*$/,C0=/^[^a-z]*$/,vt=w("$ZodCheck",(l,u)=>{var f;l._zod??(l._zod={}),l._zod.def=u,(f=l._zod).onattach??(f.onattach=[])}),pm={number:"number",bigint:"bigint",object:"date"},_m=w("$ZodCheckLessThan",(l,u)=>{vt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;u.value{(u.inclusive?r.value<=u.value:r.value{vt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;u.value>d&&(u.inclusive?o.minimum=u.value:o.exclusiveMinimum=u.value)}),l._zod.check=r=>{(u.inclusive?r.value>=u.value:r.value>u.value)||r.issues.push({origin:f,code:"too_small",minimum:typeof u.value=="object"?u.value.getTime():u.value,input:r.value,inclusive:u.inclusive,inst:l,continue:!u.abort})}}),j0=w("$ZodCheckMultipleOf",(l,u)=>{vt.init(l,u),l._zod.onattach.push(f=>{var r;(r=f._zod.bag).multipleOf??(r.multipleOf=u.value)}),l._zod.check=f=>{if(typeof f.value!=typeof u.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof f.value=="bigint"?f.value%u.value===BigInt(0):Bg(f.value,u.value)===0)||f.issues.push({origin:typeof f.value,code:"not_multiple_of",divisor:u.value,input:f.value,inst:l,continue:!u.abort})}}),x0=w("$ZodCheckNumberFormat",(l,u)=>{vt.init(l,u),u.format=u.format||"float64";const f=u.format?.includes("int"),r=f?"int":"number",[o,d]=Qg[u.format];l._zod.onattach.push(h=>{const v=h._zod.bag;v.format=u.format,v.minimum=o,v.maximum=d,f&&(v.pattern=U0)}),l._zod.check=h=>{const v=h.value;if(f){if(!Number.isInteger(v)){h.issues.push({expected:r,format:u.format,code:"invalid_type",continue:!1,input:v,inst:l});return}if(!Number.isSafeInteger(v)){v>0?h.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort}):h.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort});return}}vd&&h.issues.push({origin:"number",input:v,code:"too_big",maximum:d,inclusive:!0,inst:l,continue:!u.abort})}}),H0=w("$ZodCheckMaxLength",(l,u)=>{var f;vt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;u.maximum{const o=r.value;if(o.length<=u.maximum)return;const h=dr(o);r.issues.push({origin:h,code:"too_big",maximum:u.maximum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),q0=w("$ZodCheckMinLength",(l,u)=>{var f;vt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;u.minimum>o&&(r._zod.bag.minimum=u.minimum)}),l._zod.check=r=>{const o=r.value;if(o.length>=u.minimum)return;const h=dr(o);r.issues.push({origin:h,code:"too_small",minimum:u.minimum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),B0=w("$ZodCheckLengthEquals",(l,u)=>{var f;vt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=u.length,o.maximum=u.length,o.length=u.length}),l._zod.check=r=>{const o=r.value,d=o.length;if(d===u.length)return;const h=dr(o),v=d>u.length;r.issues.push({origin:h,...v?{code:"too_big",maximum:u.length}:{code:"too_small",minimum:u.length},inclusive:!0,exact:!0,input:r.value,inst:l,continue:!u.abort})}}),Di=w("$ZodCheckStringFormat",(l,u)=>{var f,r;vt.init(l,u),l._zod.onattach.push(o=>{const d=o._zod.bag;d.format=u.format,u.pattern&&(d.patterns??(d.patterns=new Set),d.patterns.add(u.pattern))}),u.pattern?(f=l._zod).check??(f.check=o=>{u.pattern.lastIndex=0,!u.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:u.format,input:o.value,...u.pattern?{pattern:u.pattern.toString()}:{},inst:l,continue:!u.abort})}):(r=l._zod).check??(r.check=()=>{})}),Y0=w("$ZodCheckRegex",(l,u)=>{Di.init(l,u),l._zod.check=f=>{u.pattern.lastIndex=0,!u.pattern.test(f.value)&&f.issues.push({origin:"string",code:"invalid_format",format:"regex",input:f.value,pattern:u.pattern.toString(),inst:l,continue:!u.abort})}}),G0=w("$ZodCheckLowerCase",(l,u)=>{u.pattern??(u.pattern=R0),Di.init(l,u)}),X0=w("$ZodCheckUpperCase",(l,u)=>{u.pattern??(u.pattern=C0),Di.init(l,u)}),V0=w("$ZodCheckIncludes",(l,u)=>{vt.init(l,u);const f=Ai(u.includes),r=new RegExp(typeof u.position=="number"?`^.{${u.position}}${f}`:f);u.pattern=r,l._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(r)}),l._zod.check=o=>{o.value.includes(u.includes,u.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:u.includes,input:o.value,inst:l,continue:!u.abort})}}),Q0=w("$ZodCheckStartsWith",(l,u)=>{vt.init(l,u);const f=new RegExp(`^${Ai(u.prefix)}.*`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.startsWith(u.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:u.prefix,input:r.value,inst:l,continue:!u.abort})}}),L0=w("$ZodCheckEndsWith",(l,u)=>{vt.init(l,u);const f=new RegExp(`.*${Ai(u.suffix)}$`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.endsWith(u.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:u.suffix,input:r.value,inst:l,continue:!u.abort})}}),K0=w("$ZodCheckOverwrite",(l,u)=>{vt.init(l,u),l._zod.check=f=>{f.value=u.tx(f.value)}});class $0{constructor(u=[]){this.content=[],this.indent=0,this&&(this.args=u)}indented(u){this.indent+=1,u(this),this.indent-=1}write(u){if(typeof u=="function"){u(this,{execution:"sync"}),u(this,{execution:"async"});return}const r=u.split(` + repeat`},className:"rcp-alpha-cursor"})))});function um(l,u){return Math.round(l*10**u)/10**u}function wh({r:l,g:u,b:f,a:r}){const o=[Math.round(l),Math.round(u),Math.round(f)],d=um(r,3);return d<1&&o.push(d),o.join(", ")}function Rh({h:l,s:u,v:f,a:r}){const o=[`${Math.round(l)}°`,`${Math.round(u)}%`,`${Math.round(f)}%`],d=um(r,3);return d<1&&o.push(d),o.join(", ")}var Cg=ce.memo(({hideInput:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,h]=ce.useState({hex:{value:u.hex,inputted:!1},rgb:{value:wh(u.rgb),inputted:!1},hsv:{value:Rh(u.hsv),inputted:!1}});ce.useEffect(()=>{d.hex.inputted||h(T=>({...T,hex:{...T.hex,value:u.hex}}))},[d.hex.inputted,u.hex]),ce.useEffect(()=>{d.rgb.inputted||h(T=>({...T,rgb:{...T.rgb,value:wh(u.rgb)}}))},[d.rgb.inputted,u.rgb]),ce.useEffect(()=>{d.hsv.inputted||h(T=>({...T,hsv:{...T.hsv,value:Rh(u.hsv)}}))},[d.hsv.inputted,u.hsv]);const v=ce.useCallback(T=>M=>{const{value:x}=M.target;h(G=>({...G,[T]:{...G[T],value:x}})),r(T==="hsv"?lt.convert("hsv",lt.toHsv(x)):T==="rgb"?lt.convert("rgb",lt.toRgb(x)):lt.convert("hex",x))},[r]),p=ce.useCallback(T=>()=>{h(M=>({...M,[T]:{...M[T],inputted:!0}}))},[]),y=ce.useCallback(T=>M=>{const{value:x}=M.target;h(G=>({...G,[T]:{...G[T],inputted:!1}})),o?.(T==="hsv"?lt.convert("hsv",lt.toHsv(x)):T==="rgb"?lt.convert("rgb",lt.toRgb(x)):lt.convert("hex",x))},[o]);return ye.createElement("div",{className:"rcp-fields"},!Hn(l,"hex")&&ye.createElement("div",{className:"rcp-fields-floor"},ye.createElement("div",{className:"rcp-field"},ye.createElement("input",{id:"hex",className:"rcp-field-input",readOnly:f,value:d.hex.value,onChange:v("hex"),onFocus:p("hex"),onBlur:y("hex")}),ye.createElement("label",{htmlFor:"hex",className:"rcp-field-label"},"HEX"))),(!Hn(l,"rgb")||!Hn(l,"hsv"))&&ye.createElement("div",{className:"rcp-fields-floor"},!Hn(l,"rgb")&&ye.createElement("div",{className:"rcp-field"},ye.createElement("input",{id:"rgb",className:"rcp-field-input",readOnly:f,value:d.rgb.value,onChange:v("rgb"),onFocus:p("rgb"),onBlur:y("rgb")}),ye.createElement("label",{htmlFor:"rgb",className:"rcp-field-label"},"RGB")),!Hn(l,"hsv")&&ye.createElement("div",{className:"rcp-field"},ye.createElement("input",{id:"hsv",className:"rcp-field-input",readOnly:f,value:d.hsv.value,onChange:v("hsv"),onFocus:p("hsv"),onBlur:y("hsv")}),ye.createElement("label",{htmlFor:"hsv",className:"rcp-field-label"},"HSV"))))}),jg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.h/360*d}),[l.hsv.h,d]),v=ce.useCallback((y,T)=>{const M=lt.convert("hsv",{...l.hsv,h:T/d*360});f(M),y&&r?.(M)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.hsv.h,"100%","50%"].join(" "),[l.hsv.h]);return ye.createElement(fr,{disabled:u,onCoordinateChange:v},ye.createElement("div",{ref:o,className:"rcp-hue"},ye.createElement("div",{style:{left:h.x,backgroundColor:`hsl(${p})`},className:"rcp-hue-cursor"})))}),xg=ce.memo(({height:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,{width:h}]=Oi(),v=ce.useMemo(()=>{const M=u.hsv.s/100*h,x=(100-u.hsv.v)/100*l;return{x:M,y:x}},[u.hsv.s,u.hsv.v,h,l]),p=ce.useCallback((M,x,G)=>{const R=lt.convert("hsv",{...u.hsv,s:x/h*100,v:100-G/l*100});r(R),M&&o?.(R)},[u.hsv,h,l,r,o]),y=ce.useMemo(()=>[u.hsv.h,"100%","50%"].join(" "),[u.hsv.h]),T=ce.useMemo(()=>[u.rgb.r,u.rgb.g,u.rgb.b].join(" "),[u.rgb.r,u.rgb.g,u.rgb.b]);return ye.createElement(fr,{disabled:f,onCoordinateChange:p},ye.createElement("div",{ref:d,style:{height:l,backgroundColor:`hsl(${y})`},className:"rcp-saturation"},ye.createElement("div",{style:{left:v.x,top:v.y,backgroundColor:`rgb(${T})`},className:"rcp-saturation-cursor"})))}),Hg=ce.memo(({height:l=200,hideAlpha:u=!1,hideInput:f=!1,color:r,disabled:o=!1,onChange:d,onChangeComplete:h})=>ye.createElement("div",{className:"rcp-root rcp"},ye.createElement(xg,{height:l,color:r,disabled:o,onChange:d,onChangeComplete:h}),ye.createElement("div",{className:"rcp-body"},ye.createElement("section",{className:"rcp-section"},ye.createElement(jg,{color:r,disabled:o,onChange:d,onChangeComplete:h}),!u&&ye.createElement(Rg,{color:r,disabled:o,onChange:d,onChangeComplete:h})),(!Hn(f,"hex")||!Hn(f,"rgb")||!Hn(f,"hsv"))&&ye.createElement("section",{className:"rcp-section"},ye.createElement(Cg,{hideInput:f,color:r,disabled:o,onChange:d,onChangeComplete:h})))));function qg(l){const[u,f]=ce.useState(lt.convert("hex",l));return ce.useEffect(()=>{f(lt.convert("hex",l))},[l]),[u,f]}function w(l,u,f){function r(v,p){if(v._zod||Object.defineProperty(v,"_zod",{value:{def:p,constr:h,traits:new Set},enumerable:!1}),v._zod.traits.has(l))return;v._zod.traits.add(l),u(v,p);const y=h.prototype,T=Object.keys(y);for(let M=0;Mf?.Parent&&v instanceof f.Parent?!0:v?._zod?.traits?.has(l)}),Object.defineProperty(h,"name",{value:l}),h}class Jl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class im extends Error{constructor(u){super(`Encountered unidirectional transform during encode: ${u}`),this.name="ZodEncodeError"}}const cm={};function il(l){return cm}function fm(l){const u=Object.values(l).filter(r=>typeof r=="number");return Object.entries(l).filter(([r,o])=>u.indexOf(+r)===-1).map(([r,o])=>o)}function ar(l,u){return typeof u=="bigint"?u.toString():u}function rr(l){return{get value(){{const u=l();return Object.defineProperty(this,"value",{value:u}),u}}}}function or(l){return l==null}function sr(l){const u=l.startsWith("^")?1:0,f=l.endsWith("$")?l.length-1:l.length;return l.slice(u,f)}function Bg(l,u){const f=(l.toString().split(".")[1]||"").length,r=u.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const p=r.match(/\d?e-(\d?)/);p?.[1]&&(o=Number.parseInt(p[1]))}const d=f>o?f:o,h=Number.parseInt(l.toFixed(d).replace(".","")),v=Number.parseInt(u.toFixed(d).replace(".",""));return h%v/10**d}const Ch=Symbol("evaluating");function Se(l,u,f){let r;Object.defineProperty(l,u,{get(){if(r!==Ch)return r===void 0&&(r=Ch,r=f()),r},set(o){Object.defineProperty(l,u,{value:o})},configurable:!0})}function fl(l,u,f){Object.defineProperty(l,u,{value:f,writable:!0,enumerable:!0,configurable:!0})}function qn(...l){const u={};for(const f of l){const r=Object.getOwnPropertyDescriptors(f);Object.assign(u,r)}return Object.defineProperties({},u)}function jh(l){return JSON.stringify(l)}function Yg(l){return l.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const rm="captureStackTrace"in Error?Error.captureStackTrace:(...l)=>{};function _i(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)}const Gg=rr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const l=Function;return new l(""),!0}catch{return!1}});function Ja(l){if(_i(l)===!1)return!1;const u=l.constructor;if(u===void 0||typeof u!="function")return!0;const f=u.prototype;return!(_i(f)===!1||Object.prototype.hasOwnProperty.call(f,"isPrototypeOf")===!1)}function om(l){return Ja(l)?{...l}:Array.isArray(l)?[...l]:l}const Xg=new Set(["string","number","symbol"]);function Ai(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bn(l,u,f){const r=new l._zod.constr(u??l._zod.def);return(!u||f?.parent)&&(r._zod.parent=l),r}function k(l){const u=l;if(!u)return{};if(typeof u=="string")return{error:()=>u};if(u?.message!==void 0){if(u?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");u.error=u.message}return delete u.message,typeof u.error=="string"?{...u,error:()=>u.error}:u}function Vg(l){return Object.keys(l).filter(u=>l[u]._zod.optin==="optional"&&l[u]._zod.optout==="optional")}const Qg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Lg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&(h[v]=f.shape[v])}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function Kg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={...l._zod.def.shape};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&delete h[v]}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function $g(l,u){if(!Ja(u))throw new Error("Invalid input to extend: expected a plain object");const f=l._zod.def.checks;if(f&&f.length>0){const d=l._zod.def.shape;for(const h in u)if(Object.getOwnPropertyDescriptor(d,h)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=qn(l._zod.def,{get shape(){const d={...l._zod.def.shape,...u};return fl(this,"shape",d),d}});return Bn(l,o)}function Jg(l,u){if(!Ja(u))throw new Error("Invalid input to safeExtend: expected a plain object");const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u};return fl(this,"shape",r),r}});return Bn(l,f)}function kg(l,u){const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u._zod.def.shape};return fl(this,"shape",r),r},get catchall(){return u._zod.def.catchall},checks:[]});return Bn(l,f)}function Wg(l,u,f){const o=u._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const h=qn(u._zod.def,{get shape(){const v=u._zod.def.shape,p={...v};if(f)for(const y in f){if(!(y in v))throw new Error(`Unrecognized key: "${y}"`);f[y]&&(p[y]=l?new l({type:"optional",innerType:v[y]}):v[y])}else for(const y in v)p[y]=l?new l({type:"optional",innerType:v[y]}):v[y];return fl(this,"shape",p),p},checks:[]});return Bn(u,h)}function Fg(l,u,f){const r=qn(u._zod.def,{get shape(){const o=u._zod.def.shape,d={...o};if(f)for(const h in f){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);f[h]&&(d[h]=new l({type:"nonoptional",innerType:o[h]}))}else for(const h in o)d[h]=new l({type:"nonoptional",innerType:o[h]});return fl(this,"shape",d),d}});return Bn(u,r)}function $l(l,u=0){if(l.aborted===!0)return!0;for(let f=u;f{var r;return(r=f).path??(r.path=[]),f.path.unshift(l),f})}function vi(l){return typeof l=="string"?l:l?.message}function cl(l,u,f){const r={...l,path:l.path??[]};if(!l.message){const o=vi(l.inst?._zod.def?.error?.(l))??vi(u?.error?.(l))??vi(f.customError?.(l))??vi(f.localeError?.(l))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,u?.reportInput||delete r.input,r}function dr(l){return Array.isArray(l)?"array":typeof l=="string"?"string":"unknown"}function ka(...l){const[u,f,r]=l;return typeof u=="string"?{message:u,code:"custom",input:f,inst:r}:{...u}}const dm=(l,u)=>{l.name="$ZodError",Object.defineProperty(l,"_zod",{value:l._zod,enumerable:!1}),Object.defineProperty(l,"issues",{value:u,enumerable:!1}),l.message=JSON.stringify(u,ar,2),Object.defineProperty(l,"toString",{value:()=>l.message,enumerable:!1})},hm=w("$ZodError",dm),mm=w("$ZodError",dm,{Parent:Error});function Ig(l,u=f=>f.message){const f={},r=[];for(const o of l.issues)o.path.length>0?(f[o.path[0]]=f[o.path[0]]||[],f[o.path[0]].push(u(o))):r.push(u(o));return{formErrors:r,fieldErrors:f}}function Pg(l,u=f=>f.message){const f={_errors:[]},r=o=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h}));else if(d.code==="invalid_key")r({issues:d.issues});else if(d.code==="invalid_element")r({issues:d.issues});else if(d.path.length===0)f._errors.push(u(d));else{let h=f,v=0;for(;v(u,f,r,o)=>{const d=r?Object.assign(r,{async:!1}):{async:!1},h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise)throw new Jl;if(h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},mr=l=>async(u,f,r,o)=>{const d=r?Object.assign(r,{async:!0}):{async:!0};let h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},Mi=l=>(u,f,r)=>{const o=r?{...r,async:!1}:{async:!1},d=u._zod.run({value:f,issues:[]},o);if(d instanceof Promise)throw new Jl;return d.issues.length?{success:!1,error:new(l??hm)(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},e0=Mi(mm),Ni=l=>async(u,f,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let d=u._zod.run({value:f,issues:[]},o);return d instanceof Promise&&(d=await d),d.issues.length?{success:!1,error:new l(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},t0=Ni(mm),n0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hr(l)(u,f,o)},l0=l=>(u,f,r)=>hr(l)(u,f,r),a0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return mr(l)(u,f,o)},u0=l=>async(u,f,r)=>mr(l)(u,f,r),i0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mi(l)(u,f,o)},c0=l=>(u,f,r)=>Mi(l)(u,f,r),f0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ni(l)(u,f,o)},r0=l=>async(u,f,r)=>Ni(l)(u,f,r),o0=/^[cC][^\s-]{8,}$/,s0=/^[0-9a-z]+$/,d0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,h0=/^[0-9a-vA-V]{20}$/,m0=/^[A-Za-z0-9]{27}$/,v0=/^[a-zA-Z0-9_-]{21}$/,y0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,g0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xh=l=>l?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${l}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,p0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function b0(){return new RegExp(_0,"u")}const S0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,E0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,T0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vm=/^[A-Za-z0-9_-]*$/,A0=/^\+[1-9]\d{6,14}$/,ym="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",M0=new RegExp(`^${ym}$`);function gm(l){const u="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof l.precision=="number"?l.precision===-1?`${u}`:l.precision===0?`${u}:[0-5]\\d`:`${u}:[0-5]\\d\\.\\d{${l.precision}}`:`${u}(?::[0-5]\\d(?:\\.\\d+)?)?`}function N0(l){return new RegExp(`^${gm(l)}$`)}function D0(l){const u=gm({precision:l.precision}),f=["Z"];l.local&&f.push(""),l.offset&&f.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${u}(?:${f.join("|")})`;return new RegExp(`^${ym}T(?:${r})$`)}const Z0=l=>{const u=l?`[\\s\\S]{${l?.minimum??0},${l?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${u}$`)},U0=/^-?\d+$/,w0=/^-?\d+(?:\.\d+)?$/,R0=/^[^A-Z]*$/,C0=/^[^a-z]*$/,yt=w("$ZodCheck",(l,u)=>{var f;l._zod??(l._zod={}),l._zod.def=u,(f=l._zod).onattach??(f.onattach=[])}),pm={number:"number",bigint:"bigint",object:"date"},_m=w("$ZodCheckLessThan",(l,u)=>{yt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;u.value{(u.inclusive?r.value<=u.value:r.value{yt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;u.value>d&&(u.inclusive?o.minimum=u.value:o.exclusiveMinimum=u.value)}),l._zod.check=r=>{(u.inclusive?r.value>=u.value:r.value>u.value)||r.issues.push({origin:f,code:"too_small",minimum:typeof u.value=="object"?u.value.getTime():u.value,input:r.value,inclusive:u.inclusive,inst:l,continue:!u.abort})}}),j0=w("$ZodCheckMultipleOf",(l,u)=>{yt.init(l,u),l._zod.onattach.push(f=>{var r;(r=f._zod.bag).multipleOf??(r.multipleOf=u.value)}),l._zod.check=f=>{if(typeof f.value!=typeof u.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof f.value=="bigint"?f.value%u.value===BigInt(0):Bg(f.value,u.value)===0)||f.issues.push({origin:typeof f.value,code:"not_multiple_of",divisor:u.value,input:f.value,inst:l,continue:!u.abort})}}),x0=w("$ZodCheckNumberFormat",(l,u)=>{yt.init(l,u),u.format=u.format||"float64";const f=u.format?.includes("int"),r=f?"int":"number",[o,d]=Qg[u.format];l._zod.onattach.push(h=>{const v=h._zod.bag;v.format=u.format,v.minimum=o,v.maximum=d,f&&(v.pattern=U0)}),l._zod.check=h=>{const v=h.value;if(f){if(!Number.isInteger(v)){h.issues.push({expected:r,format:u.format,code:"invalid_type",continue:!1,input:v,inst:l});return}if(!Number.isSafeInteger(v)){v>0?h.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort}):h.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort});return}}vd&&h.issues.push({origin:"number",input:v,code:"too_big",maximum:d,inclusive:!0,inst:l,continue:!u.abort})}}),H0=w("$ZodCheckMaxLength",(l,u)=>{var f;yt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;u.maximum{const o=r.value;if(o.length<=u.maximum)return;const h=dr(o);r.issues.push({origin:h,code:"too_big",maximum:u.maximum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),q0=w("$ZodCheckMinLength",(l,u)=>{var f;yt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;u.minimum>o&&(r._zod.bag.minimum=u.minimum)}),l._zod.check=r=>{const o=r.value;if(o.length>=u.minimum)return;const h=dr(o);r.issues.push({origin:h,code:"too_small",minimum:u.minimum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),B0=w("$ZodCheckLengthEquals",(l,u)=>{var f;yt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=u.length,o.maximum=u.length,o.length=u.length}),l._zod.check=r=>{const o=r.value,d=o.length;if(d===u.length)return;const h=dr(o),v=d>u.length;r.issues.push({origin:h,...v?{code:"too_big",maximum:u.length}:{code:"too_small",minimum:u.length},inclusive:!0,exact:!0,input:r.value,inst:l,continue:!u.abort})}}),Di=w("$ZodCheckStringFormat",(l,u)=>{var f,r;yt.init(l,u),l._zod.onattach.push(o=>{const d=o._zod.bag;d.format=u.format,u.pattern&&(d.patterns??(d.patterns=new Set),d.patterns.add(u.pattern))}),u.pattern?(f=l._zod).check??(f.check=o=>{u.pattern.lastIndex=0,!u.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:u.format,input:o.value,...u.pattern?{pattern:u.pattern.toString()}:{},inst:l,continue:!u.abort})}):(r=l._zod).check??(r.check=()=>{})}),Y0=w("$ZodCheckRegex",(l,u)=>{Di.init(l,u),l._zod.check=f=>{u.pattern.lastIndex=0,!u.pattern.test(f.value)&&f.issues.push({origin:"string",code:"invalid_format",format:"regex",input:f.value,pattern:u.pattern.toString(),inst:l,continue:!u.abort})}}),G0=w("$ZodCheckLowerCase",(l,u)=>{u.pattern??(u.pattern=R0),Di.init(l,u)}),X0=w("$ZodCheckUpperCase",(l,u)=>{u.pattern??(u.pattern=C0),Di.init(l,u)}),V0=w("$ZodCheckIncludes",(l,u)=>{yt.init(l,u);const f=Ai(u.includes),r=new RegExp(typeof u.position=="number"?`^.{${u.position}}${f}`:f);u.pattern=r,l._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(r)}),l._zod.check=o=>{o.value.includes(u.includes,u.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:u.includes,input:o.value,inst:l,continue:!u.abort})}}),Q0=w("$ZodCheckStartsWith",(l,u)=>{yt.init(l,u);const f=new RegExp(`^${Ai(u.prefix)}.*`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.startsWith(u.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:u.prefix,input:r.value,inst:l,continue:!u.abort})}}),L0=w("$ZodCheckEndsWith",(l,u)=>{yt.init(l,u);const f=new RegExp(`.*${Ai(u.suffix)}$`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.endsWith(u.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:u.suffix,input:r.value,inst:l,continue:!u.abort})}}),K0=w("$ZodCheckOverwrite",(l,u)=>{yt.init(l,u),l._zod.check=f=>{f.value=u.tx(f.value)}});class $0{constructor(u=[]){this.content=[],this.indent=0,this&&(this.args=u)}indented(u){this.indent+=1,u(this),this.indent-=1}write(u){if(typeof u=="function"){u(this,{execution:"sync"}),u(this,{execution:"async"});return}const r=u.split(` `).filter(h=>h),o=Math.min(...r.map(h=>h.length-h.trimStart().length)),d=r.map(h=>h.slice(o)).map(h=>" ".repeat(this.indent*2)+h);for(const h of d)this.content.push(h)}compile(){const u=Function,f=this?.args,o=[...(this?.content??[""]).map(d=>` ${d}`)];return new u(...f,o.join(` -`))}}const J0={major:4,minor:3,patch:6},Ve=w("$ZodType",(l,u)=>{var f;l??(l={}),l._zod.def=u,l._zod.bag=l._zod.bag||{},l._zod.version=J0;const r=[...l._zod.def.checks??[]];l._zod.traits.has("$ZodCheck")&&r.unshift(l);for(const o of r)for(const d of o._zod.onattach)d(l);if(r.length===0)(f=l._zod).deferred??(f.deferred=[]),l._zod.deferred?.push(()=>{l._zod.run=l._zod.parse});else{const o=(h,v,p)=>{let y=$l(h),T;for(const N of v){if(N._zod.def.when){if(!N._zod.def.when(h))continue}else if(y)continue;const x=h.issues.length,G=N._zod.check(h);if(G instanceof Promise&&p?.async===!1)throw new Jl;if(T||G instanceof Promise)T=(T??Promise.resolve()).then(async()=>{await G,h.issues.length!==x&&(y||(y=$l(h,x)))});else{if(h.issues.length===x)continue;y||(y=$l(h,x))}}return T?T.then(()=>h):h},d=(h,v,p)=>{if($l(h))return h.aborted=!0,h;const y=o(v,r,p);if(y instanceof Promise){if(p.async===!1)throw new Jl;return y.then(T=>l._zod.parse(T,p))}return l._zod.parse(y,p)};l._zod.run=(h,v)=>{if(v.skipChecks)return l._zod.parse(h,v);if(v.direction==="backward"){const y=l._zod.parse({value:h.value,issues:[]},{...v,skipChecks:!0});return y instanceof Promise?y.then(T=>d(T,h,v)):d(y,h,v)}const p=l._zod.parse(h,v);if(p instanceof Promise){if(v.async===!1)throw new Jl;return p.then(y=>o(y,r,v))}return o(p,r,v)}}_e(l,"~standard",()=>({validate:o=>{try{const d=e0(l,o);return d.success?{value:d.data}:{issues:d.error?.issues}}catch{return t0(l,o).then(h=>h.success?{value:h.data}:{issues:h.error?.issues})}},vendor:"zod",version:1}))}),vr=w("$ZodString",(l,u)=>{Ve.init(l,u),l._zod.pattern=[...l?._zod.bag?.patterns??[]].pop()??Z0(l._zod.bag),l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=String(f.value)}catch{}return typeof f.value=="string"||f.issues.push({expected:"string",code:"invalid_type",input:f.value,inst:l}),f}}),Ue=w("$ZodStringFormat",(l,u)=>{Di.init(l,u),vr.init(l,u)}),k0=w("$ZodGUID",(l,u)=>{u.pattern??(u.pattern=g0),Ue.init(l,u)}),W0=w("$ZodUUID",(l,u)=>{if(u.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[u.version];if(r===void 0)throw new Error(`Invalid UUID version: "${u.version}"`);u.pattern??(u.pattern=xh(r))}else u.pattern??(u.pattern=xh());Ue.init(l,u)}),F0=w("$ZodEmail",(l,u)=>{u.pattern??(u.pattern=p0),Ue.init(l,u)}),I0=w("$ZodURL",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{try{const r=f.value.trim(),o=new URL(r);u.hostname&&(u.hostname.lastIndex=0,u.hostname.test(o.hostname)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:u.hostname.source,input:f.value,inst:l,continue:!u.abort})),u.protocol&&(u.protocol.lastIndex=0,u.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:u.protocol.source,input:f.value,inst:l,continue:!u.abort})),u.normalize?f.value=o.href:f.value=r;return}catch{f.issues.push({code:"invalid_format",format:"url",input:f.value,inst:l,continue:!u.abort})}}}),P0=w("$ZodEmoji",(l,u)=>{u.pattern??(u.pattern=b0()),Ue.init(l,u)}),ep=w("$ZodNanoID",(l,u)=>{u.pattern??(u.pattern=v0),Ue.init(l,u)}),tp=w("$ZodCUID",(l,u)=>{u.pattern??(u.pattern=o0),Ue.init(l,u)}),np=w("$ZodCUID2",(l,u)=>{u.pattern??(u.pattern=s0),Ue.init(l,u)}),lp=w("$ZodULID",(l,u)=>{u.pattern??(u.pattern=d0),Ue.init(l,u)}),ap=w("$ZodXID",(l,u)=>{u.pattern??(u.pattern=h0),Ue.init(l,u)}),up=w("$ZodKSUID",(l,u)=>{u.pattern??(u.pattern=m0),Ue.init(l,u)}),ip=w("$ZodISODateTime",(l,u)=>{u.pattern??(u.pattern=D0(u)),Ue.init(l,u)}),cp=w("$ZodISODate",(l,u)=>{u.pattern??(u.pattern=M0),Ue.init(l,u)}),fp=w("$ZodISOTime",(l,u)=>{u.pattern??(u.pattern=N0(u)),Ue.init(l,u)}),rp=w("$ZodISODuration",(l,u)=>{u.pattern??(u.pattern=y0),Ue.init(l,u)}),op=w("$ZodIPv4",(l,u)=>{u.pattern??(u.pattern=S0),Ue.init(l,u),l._zod.bag.format="ipv4"}),sp=w("$ZodIPv6",(l,u)=>{u.pattern??(u.pattern=z0),Ue.init(l,u),l._zod.bag.format="ipv6",l._zod.check=f=>{try{new URL(`http://[${f.value}]`)}catch{f.issues.push({code:"invalid_format",format:"ipv6",input:f.value,inst:l,continue:!u.abort})}}}),dp=w("$ZodCIDRv4",(l,u)=>{u.pattern??(u.pattern=E0),Ue.init(l,u)}),hp=w("$ZodCIDRv6",(l,u)=>{u.pattern??(u.pattern=T0),Ue.init(l,u),l._zod.check=f=>{const r=f.value.split("/");try{if(r.length!==2)throw new Error;const[o,d]=r;if(!d)throw new Error;const h=Number(d);if(`${h}`!==d)throw new Error;if(h<0||h>128)throw new Error;new URL(`http://[${o}]`)}catch{f.issues.push({code:"invalid_format",format:"cidrv6",input:f.value,inst:l,continue:!u.abort})}}});function Sm(l){if(l==="")return!0;if(l.length%4!==0)return!1;try{return atob(l),!0}catch{return!1}}const mp=w("$ZodBase64",(l,u)=>{u.pattern??(u.pattern=O0),Ue.init(l,u),l._zod.bag.contentEncoding="base64",l._zod.check=f=>{Sm(f.value)||f.issues.push({code:"invalid_format",format:"base64",input:f.value,inst:l,continue:!u.abort})}});function vp(l){if(!vm.test(l))return!1;const u=l.replace(/[-_]/g,r=>r==="-"?"+":"/"),f=u.padEnd(Math.ceil(u.length/4)*4,"=");return Sm(f)}const yp=w("$ZodBase64URL",(l,u)=>{u.pattern??(u.pattern=vm),Ue.init(l,u),l._zod.bag.contentEncoding="base64url",l._zod.check=f=>{vp(f.value)||f.issues.push({code:"invalid_format",format:"base64url",input:f.value,inst:l,continue:!u.abort})}}),gp=w("$ZodE164",(l,u)=>{u.pattern??(u.pattern=A0),Ue.init(l,u)});function pp(l,u=null){try{const f=l.split(".");if(f.length!==3)return!1;const[r]=f;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||u&&(!("alg"in o)||o.alg!==u))}catch{return!1}}const _p=w("$ZodJWT",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{pp(f.value,u.alg)||f.issues.push({code:"invalid_format",format:"jwt",input:f.value,inst:l,continue:!u.abort})}}),zm=w("$ZodNumber",(l,u)=>{Ve.init(l,u),l._zod.pattern=l._zod.bag.pattern??w0,l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=Number(f.value)}catch{}const o=f.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return f;const d=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return f.issues.push({expected:"number",code:"invalid_type",input:o,inst:l,...d?{received:d}:{}}),f}}),bp=w("$ZodNumberFormat",(l,u)=>{x0.init(l,u),zm.init(l,u)}),Sp=w("$ZodUnknown",(l,u)=>{Ve.init(l,u),l._zod.parse=f=>f}),zp=w("$ZodNever",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>(f.issues.push({expected:"never",code:"invalid_type",input:f.value,inst:l}),f)});function Hh(l,u,f){l.issues.length&&u.issues.push(...sm(f,l.issues)),u.value[f]=l.value}const Ep=w("$ZodArray",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>{const o=f.value;if(!Array.isArray(o))return f.issues.push({expected:"array",code:"invalid_type",input:o,inst:l}),f;f.value=Array(o.length);const d=[];for(let h=0;hHh(y,f,h))):Hh(p,f,h)}return d.length?Promise.all(d).then(()=>f):f}});function bi(l,u,f,r,o){if(l.issues.length){if(o&&!(f in r))return;u.issues.push(...sm(f,l.issues))}l.value===void 0?f in r&&(u.value[f]=void 0):u.value[f]=l.value}function Em(l){const u=Object.keys(l.shape);for(const r of u)if(!l.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const f=Vg(l.shape);return{...l,keys:u,keySet:new Set(u),numKeys:u.length,optionalKeys:new Set(f)}}function Tm(l,u,f,r,o,d){const h=[],v=o.keySet,p=o.catchall._zod,y=p.def.type,T=p.optout==="optional";for(const N in u){if(v.has(N))continue;if(y==="never"){h.push(N);continue}const x=p.run({value:u[N],issues:[]},r);x instanceof Promise?l.push(x.then(G=>bi(G,f,N,u,T))):bi(x,f,N,u,T)}return h.length&&f.issues.push({code:"unrecognized_keys",keys:h,input:u,inst:d}),l.length?Promise.all(l).then(()=>f):f}const Tp=w("$ZodObject",(l,u)=>{if(Ve.init(l,u),!Object.getOwnPropertyDescriptor(u,"shape")?.get){const v=u.shape;Object.defineProperty(u,"shape",{get:()=>{const p={...v};return Object.defineProperty(u,"shape",{value:p}),p}})}const r=rr(()=>Em(u));_e(l._zod,"propValues",()=>{const v=u.shape,p={};for(const y in v){const T=v[y]._zod;if(T.values){p[y]??(p[y]=new Set);for(const N of T.values)p[y].add(N)}}return p});const o=_i,d=u.catchall;let h;l._zod.parse=(v,p)=>{h??(h=r.value);const y=v.value;if(!o(y))return v.issues.push({expected:"object",code:"invalid_type",input:y,inst:l}),v;v.value={};const T=[],N=h.shape;for(const x of h.keys){const G=N[x],R=G._zod.optout==="optional",j=G._zod.run({value:y[x],issues:[]},p);j instanceof Promise?T.push(j.then(H=>bi(H,v,x,y,R))):bi(j,v,x,y,R)}return d?Tm(T,y,v,p,r.value,l):T.length?Promise.all(T).then(()=>v):v}}),Op=w("$ZodObjectJIT",(l,u)=>{Tp.init(l,u);const f=l._zod.parse,r=rr(()=>Em(u)),o=x=>{const G=new $0(["shape","payload","ctx"]),R=r.value,j=Q=>{const I=jh(Q);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};G.write("const input = payload.value;");const H=Object.create(null);let q=0;for(const Q of R.keys)H[Q]=`key_${q++}`;G.write("const newResult = {};");for(const Q of R.keys){const I=H[Q],ee=jh(Q),$=x[Q]?._zod?.optout==="optional";G.write(`const ${I} = ${j(Q)};`),$?G.write(` +`))}}const J0={major:4,minor:3,patch:6},Xe=w("$ZodType",(l,u)=>{var f;l??(l={}),l._zod.def=u,l._zod.bag=l._zod.bag||{},l._zod.version=J0;const r=[...l._zod.def.checks??[]];l._zod.traits.has("$ZodCheck")&&r.unshift(l);for(const o of r)for(const d of o._zod.onattach)d(l);if(r.length===0)(f=l._zod).deferred??(f.deferred=[]),l._zod.deferred?.push(()=>{l._zod.run=l._zod.parse});else{const o=(h,v,p)=>{let y=$l(h),T;for(const M of v){if(M._zod.def.when){if(!M._zod.def.when(h))continue}else if(y)continue;const x=h.issues.length,G=M._zod.check(h);if(G instanceof Promise&&p?.async===!1)throw new Jl;if(T||G instanceof Promise)T=(T??Promise.resolve()).then(async()=>{await G,h.issues.length!==x&&(y||(y=$l(h,x)))});else{if(h.issues.length===x)continue;y||(y=$l(h,x))}}return T?T.then(()=>h):h},d=(h,v,p)=>{if($l(h))return h.aborted=!0,h;const y=o(v,r,p);if(y instanceof Promise){if(p.async===!1)throw new Jl;return y.then(T=>l._zod.parse(T,p))}return l._zod.parse(y,p)};l._zod.run=(h,v)=>{if(v.skipChecks)return l._zod.parse(h,v);if(v.direction==="backward"){const y=l._zod.parse({value:h.value,issues:[]},{...v,skipChecks:!0});return y instanceof Promise?y.then(T=>d(T,h,v)):d(y,h,v)}const p=l._zod.parse(h,v);if(p instanceof Promise){if(v.async===!1)throw new Jl;return p.then(y=>o(y,r,v))}return o(p,r,v)}}Se(l,"~standard",()=>({validate:o=>{try{const d=e0(l,o);return d.success?{value:d.data}:{issues:d.error?.issues}}catch{return t0(l,o).then(h=>h.success?{value:h.data}:{issues:h.error?.issues})}},vendor:"zod",version:1}))}),vr=w("$ZodString",(l,u)=>{Xe.init(l,u),l._zod.pattern=[...l?._zod.bag?.patterns??[]].pop()??Z0(l._zod.bag),l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=String(f.value)}catch{}return typeof f.value=="string"||f.issues.push({expected:"string",code:"invalid_type",input:f.value,inst:l}),f}}),Ue=w("$ZodStringFormat",(l,u)=>{Di.init(l,u),vr.init(l,u)}),k0=w("$ZodGUID",(l,u)=>{u.pattern??(u.pattern=g0),Ue.init(l,u)}),W0=w("$ZodUUID",(l,u)=>{if(u.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[u.version];if(r===void 0)throw new Error(`Invalid UUID version: "${u.version}"`);u.pattern??(u.pattern=xh(r))}else u.pattern??(u.pattern=xh());Ue.init(l,u)}),F0=w("$ZodEmail",(l,u)=>{u.pattern??(u.pattern=p0),Ue.init(l,u)}),I0=w("$ZodURL",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{try{const r=f.value.trim(),o=new URL(r);u.hostname&&(u.hostname.lastIndex=0,u.hostname.test(o.hostname)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:u.hostname.source,input:f.value,inst:l,continue:!u.abort})),u.protocol&&(u.protocol.lastIndex=0,u.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:u.protocol.source,input:f.value,inst:l,continue:!u.abort})),u.normalize?f.value=o.href:f.value=r;return}catch{f.issues.push({code:"invalid_format",format:"url",input:f.value,inst:l,continue:!u.abort})}}}),P0=w("$ZodEmoji",(l,u)=>{u.pattern??(u.pattern=b0()),Ue.init(l,u)}),ep=w("$ZodNanoID",(l,u)=>{u.pattern??(u.pattern=v0),Ue.init(l,u)}),tp=w("$ZodCUID",(l,u)=>{u.pattern??(u.pattern=o0),Ue.init(l,u)}),np=w("$ZodCUID2",(l,u)=>{u.pattern??(u.pattern=s0),Ue.init(l,u)}),lp=w("$ZodULID",(l,u)=>{u.pattern??(u.pattern=d0),Ue.init(l,u)}),ap=w("$ZodXID",(l,u)=>{u.pattern??(u.pattern=h0),Ue.init(l,u)}),up=w("$ZodKSUID",(l,u)=>{u.pattern??(u.pattern=m0),Ue.init(l,u)}),ip=w("$ZodISODateTime",(l,u)=>{u.pattern??(u.pattern=D0(u)),Ue.init(l,u)}),cp=w("$ZodISODate",(l,u)=>{u.pattern??(u.pattern=M0),Ue.init(l,u)}),fp=w("$ZodISOTime",(l,u)=>{u.pattern??(u.pattern=N0(u)),Ue.init(l,u)}),rp=w("$ZodISODuration",(l,u)=>{u.pattern??(u.pattern=y0),Ue.init(l,u)}),op=w("$ZodIPv4",(l,u)=>{u.pattern??(u.pattern=S0),Ue.init(l,u),l._zod.bag.format="ipv4"}),sp=w("$ZodIPv6",(l,u)=>{u.pattern??(u.pattern=z0),Ue.init(l,u),l._zod.bag.format="ipv6",l._zod.check=f=>{try{new URL(`http://[${f.value}]`)}catch{f.issues.push({code:"invalid_format",format:"ipv6",input:f.value,inst:l,continue:!u.abort})}}}),dp=w("$ZodCIDRv4",(l,u)=>{u.pattern??(u.pattern=E0),Ue.init(l,u)}),hp=w("$ZodCIDRv6",(l,u)=>{u.pattern??(u.pattern=T0),Ue.init(l,u),l._zod.check=f=>{const r=f.value.split("/");try{if(r.length!==2)throw new Error;const[o,d]=r;if(!d)throw new Error;const h=Number(d);if(`${h}`!==d)throw new Error;if(h<0||h>128)throw new Error;new URL(`http://[${o}]`)}catch{f.issues.push({code:"invalid_format",format:"cidrv6",input:f.value,inst:l,continue:!u.abort})}}});function Sm(l){if(l==="")return!0;if(l.length%4!==0)return!1;try{return atob(l),!0}catch{return!1}}const mp=w("$ZodBase64",(l,u)=>{u.pattern??(u.pattern=O0),Ue.init(l,u),l._zod.bag.contentEncoding="base64",l._zod.check=f=>{Sm(f.value)||f.issues.push({code:"invalid_format",format:"base64",input:f.value,inst:l,continue:!u.abort})}});function vp(l){if(!vm.test(l))return!1;const u=l.replace(/[-_]/g,r=>r==="-"?"+":"/"),f=u.padEnd(Math.ceil(u.length/4)*4,"=");return Sm(f)}const yp=w("$ZodBase64URL",(l,u)=>{u.pattern??(u.pattern=vm),Ue.init(l,u),l._zod.bag.contentEncoding="base64url",l._zod.check=f=>{vp(f.value)||f.issues.push({code:"invalid_format",format:"base64url",input:f.value,inst:l,continue:!u.abort})}}),gp=w("$ZodE164",(l,u)=>{u.pattern??(u.pattern=A0),Ue.init(l,u)});function pp(l,u=null){try{const f=l.split(".");if(f.length!==3)return!1;const[r]=f;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||u&&(!("alg"in o)||o.alg!==u))}catch{return!1}}const _p=w("$ZodJWT",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{pp(f.value,u.alg)||f.issues.push({code:"invalid_format",format:"jwt",input:f.value,inst:l,continue:!u.abort})}}),zm=w("$ZodNumber",(l,u)=>{Xe.init(l,u),l._zod.pattern=l._zod.bag.pattern??w0,l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=Number(f.value)}catch{}const o=f.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return f;const d=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return f.issues.push({expected:"number",code:"invalid_type",input:o,inst:l,...d?{received:d}:{}}),f}}),bp=w("$ZodNumberFormat",(l,u)=>{x0.init(l,u),zm.init(l,u)}),Sp=w("$ZodUnknown",(l,u)=>{Xe.init(l,u),l._zod.parse=f=>f}),zp=w("$ZodNever",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>(f.issues.push({expected:"never",code:"invalid_type",input:f.value,inst:l}),f)});function Hh(l,u,f){l.issues.length&&u.issues.push(...sm(f,l.issues)),u.value[f]=l.value}const Ep=w("$ZodArray",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>{const o=f.value;if(!Array.isArray(o))return f.issues.push({expected:"array",code:"invalid_type",input:o,inst:l}),f;f.value=Array(o.length);const d=[];for(let h=0;hHh(y,f,h))):Hh(p,f,h)}return d.length?Promise.all(d).then(()=>f):f}});function bi(l,u,f,r,o){if(l.issues.length){if(o&&!(f in r))return;u.issues.push(...sm(f,l.issues))}l.value===void 0?f in r&&(u.value[f]=void 0):u.value[f]=l.value}function Em(l){const u=Object.keys(l.shape);for(const r of u)if(!l.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const f=Vg(l.shape);return{...l,keys:u,keySet:new Set(u),numKeys:u.length,optionalKeys:new Set(f)}}function Tm(l,u,f,r,o,d){const h=[],v=o.keySet,p=o.catchall._zod,y=p.def.type,T=p.optout==="optional";for(const M in u){if(v.has(M))continue;if(y==="never"){h.push(M);continue}const x=p.run({value:u[M],issues:[]},r);x instanceof Promise?l.push(x.then(G=>bi(G,f,M,u,T))):bi(x,f,M,u,T)}return h.length&&f.issues.push({code:"unrecognized_keys",keys:h,input:u,inst:d}),l.length?Promise.all(l).then(()=>f):f}const Tp=w("$ZodObject",(l,u)=>{if(Xe.init(l,u),!Object.getOwnPropertyDescriptor(u,"shape")?.get){const v=u.shape;Object.defineProperty(u,"shape",{get:()=>{const p={...v};return Object.defineProperty(u,"shape",{value:p}),p}})}const r=rr(()=>Em(u));Se(l._zod,"propValues",()=>{const v=u.shape,p={};for(const y in v){const T=v[y]._zod;if(T.values){p[y]??(p[y]=new Set);for(const M of T.values)p[y].add(M)}}return p});const o=_i,d=u.catchall;let h;l._zod.parse=(v,p)=>{h??(h=r.value);const y=v.value;if(!o(y))return v.issues.push({expected:"object",code:"invalid_type",input:y,inst:l}),v;v.value={};const T=[],M=h.shape;for(const x of h.keys){const G=M[x],R=G._zod.optout==="optional",j=G._zod.run({value:y[x],issues:[]},p);j instanceof Promise?T.push(j.then(H=>bi(H,v,x,y,R))):bi(j,v,x,y,R)}return d?Tm(T,y,v,p,r.value,l):T.length?Promise.all(T).then(()=>v):v}}),Op=w("$ZodObjectJIT",(l,u)=>{Tp.init(l,u);const f=l._zod.parse,r=rr(()=>Em(u)),o=x=>{const G=new $0(["shape","payload","ctx"]),R=r.value,j=Q=>{const I=jh(Q);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};G.write("const input = payload.value;");const H=Object.create(null);let q=0;for(const Q of R.keys)H[Q]=`key_${q++}`;G.write("const newResult = {};");for(const Q of R.keys){const I=H[Q],ee=jh(Q),W=x[Q]?._zod?.optout==="optional";G.write(`const ${I} = ${j(Q)};`),W?G.write(` if (${I}.issues.length) { if (${ee} in input) { payload.issues = payload.issues.concat(${I}.issues.map(iss => ({ @@ -50,6 +50,6 @@ Error generating stack: `+a.message+` newResult[${ee}] = ${I}.value; } - `)}G.write("payload.value = newResult;"),G.write("return payload;");const K=G.compile();return(Q,I)=>K(x,Q,I)};let d;const h=_i,v=!cm.jitless,y=v&&Gg.value,T=u.catchall;let N;l._zod.parse=(x,G)=>{N??(N=r.value);const R=x.value;return h(R)?v&&y&&G?.async===!1&&G.jitless!==!0?(d||(d=o(u.shape)),x=d(x,G),T?Tm([],R,x,G,N,l):x):f(x,G):(x.issues.push({expected:"object",code:"invalid_type",input:R,inst:l}),x)}});function qh(l,u,f,r){for(const d of l)if(d.issues.length===0)return u.value=d.value,u;const o=l.filter(d=>!$l(d));return o.length===1?(u.value=o[0].value,o[0]):(u.issues.push({code:"invalid_union",input:u.value,inst:f,errors:l.map(d=>d.issues.map(h=>cl(h,r,il())))}),u)}const Ap=w("$ZodUnion",(l,u)=>{Ve.init(l,u),_e(l._zod,"optin",()=>u.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_e(l._zod,"optout",()=>u.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_e(l._zod,"values",()=>{if(u.options.every(o=>o._zod.values))return new Set(u.options.flatMap(o=>Array.from(o._zod.values)))}),_e(l._zod,"pattern",()=>{if(u.options.every(o=>o._zod.pattern)){const o=u.options.map(d=>d._zod.pattern);return new RegExp(`^(${o.map(d=>sr(d.source)).join("|")})$`)}});const f=u.options.length===1,r=u.options[0]._zod.run;l._zod.parse=(o,d)=>{if(f)return r(o,d);let h=!1;const v=[];for(const p of u.options){const y=p._zod.run({value:o.value,issues:[]},d);if(y instanceof Promise)v.push(y),h=!0;else{if(y.issues.length===0)return y;v.push(y)}}return h?Promise.all(v).then(p=>qh(p,o,l,d)):qh(v,o,l,d)}}),Mp=w("$ZodIntersection",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>{const o=f.value,d=u.left._zod.run({value:o,issues:[]},r),h=u.right._zod.run({value:o,issues:[]},r);return d instanceof Promise||h instanceof Promise?Promise.all([d,h]).then(([p,y])=>Bh(f,p,y)):Bh(f,d,h)}});function ur(l,u){if(l===u)return{valid:!0,data:l};if(l instanceof Date&&u instanceof Date&&+l==+u)return{valid:!0,data:l};if(Ja(l)&&Ja(u)){const f=Object.keys(u),r=Object.keys(l).filter(d=>f.indexOf(d)!==-1),o={...l,...u};for(const d of r){const h=ur(l[d],u[d]);if(!h.valid)return{valid:!1,mergeErrorPath:[d,...h.mergeErrorPath]};o[d]=h.data}return{valid:!0,data:o}}if(Array.isArray(l)&&Array.isArray(u)){if(l.length!==u.length)return{valid:!1,mergeErrorPath:[]};const f=[];for(let r=0;rv.l&&v.r).map(([v])=>v);if(d.length&&o&&l.issues.push({...o,keys:d}),$l(l))return l;const h=ur(u.value,f.value);if(!h.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(h.mergeErrorPath)}`);return l.value=h.data,l}const Np=w("$ZodEnum",(l,u)=>{Ve.init(l,u);const f=fm(u.entries),r=new Set(f);l._zod.values=r,l._zod.pattern=new RegExp(`^(${f.filter(o=>Xg.has(typeof o)).map(o=>typeof o=="string"?Ai(o):o.toString()).join("|")})$`),l._zod.parse=(o,d)=>{const h=o.value;return r.has(h)||o.issues.push({code:"invalid_value",values:f,input:h,inst:l}),o}}),Dp=w("$ZodTransform",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);const o=u.transform(f.value,f);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(h=>(f.value=h,f));if(o instanceof Promise)throw new Jl;return f.value=o,f}});function Yh(l,u){return l.issues.length&&u===void 0?{issues:[],value:void 0}:l}const Om=w("$ZodOptional",(l,u)=>{Ve.init(l,u),l._zod.optin="optional",l._zod.optout="optional",_e(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,void 0]):void 0),_e(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)})?$`):void 0}),l._zod.parse=(f,r)=>{if(u.innerType._zod.optin==="optional"){const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Yh(d,f.value)):Yh(o,f.value)}return f.value===void 0?f:u.innerType._zod.run(f,r)}}),Zp=w("$ZodExactOptional",(l,u)=>{Om.init(l,u),_e(l._zod,"values",()=>u.innerType._zod.values),_e(l._zod,"pattern",()=>u.innerType._zod.pattern),l._zod.parse=(f,r)=>u.innerType._zod.run(f,r)}),Up=w("$ZodNullable",(l,u)=>{Ve.init(l,u),_e(l._zod,"optin",()=>u.innerType._zod.optin),_e(l._zod,"optout",()=>u.innerType._zod.optout),_e(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)}|null)$`):void 0}),_e(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,null]):void 0),l._zod.parse=(f,r)=>f.value===null?f:u.innerType._zod.run(f,r)}),wp=w("$ZodDefault",(l,u)=>{Ve.init(l,u),l._zod.optin="optional",_e(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);if(f.value===void 0)return f.value=u.defaultValue,f;const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Gh(d,u)):Gh(o,u)}});function Gh(l,u){return l.value===void 0&&(l.value=u.defaultValue),l}const Rp=w("$ZodPrefault",(l,u)=>{Ve.init(l,u),l._zod.optin="optional",_e(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>(r.direction==="backward"||f.value===void 0&&(f.value=u.defaultValue),u.innerType._zod.run(f,r))}),Cp=w("$ZodNonOptional",(l,u)=>{Ve.init(l,u),_e(l._zod,"values",()=>{const f=u.innerType._zod.values;return f?new Set([...f].filter(r=>r!==void 0)):void 0}),l._zod.parse=(f,r)=>{const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Xh(d,l)):Xh(o,l)}});function Xh(l,u){return!l.issues.length&&l.value===void 0&&l.issues.push({code:"invalid_type",expected:"nonoptional",input:l.value,inst:u}),l}const jp=w("$ZodCatch",(l,u)=>{Ve.init(l,u),_e(l._zod,"optin",()=>u.innerType._zod.optin),_e(l._zod,"optout",()=>u.innerType._zod.optout),_e(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>(f.value=d.value,d.issues.length&&(f.value=u.catchValue({...f,error:{issues:d.issues.map(h=>cl(h,r,il()))},input:f.value}),f.issues=[]),f)):(f.value=o.value,o.issues.length&&(f.value=u.catchValue({...f,error:{issues:o.issues.map(d=>cl(d,r,il()))},input:f.value}),f.issues=[]),f)}}),xp=w("$ZodPipe",(l,u)=>{Ve.init(l,u),_e(l._zod,"values",()=>u.in._zod.values),_e(l._zod,"optin",()=>u.in._zod.optin),_e(l._zod,"optout",()=>u.out._zod.optout),_e(l._zod,"propValues",()=>u.in._zod.propValues),l._zod.parse=(f,r)=>{if(r.direction==="backward"){const d=u.out._zod.run(f,r);return d instanceof Promise?d.then(h=>yi(h,u.in,r)):yi(d,u.in,r)}const o=u.in._zod.run(f,r);return o instanceof Promise?o.then(d=>yi(d,u.out,r)):yi(o,u.out,r)}});function yi(l,u,f){return l.issues.length?(l.aborted=!0,l):u._zod.run({value:l.value,issues:l.issues},f)}const Hp=w("$ZodReadonly",(l,u)=>{Ve.init(l,u),_e(l._zod,"propValues",()=>u.innerType._zod.propValues),_e(l._zod,"values",()=>u.innerType._zod.values),_e(l._zod,"optin",()=>u.innerType?._zod?.optin),_e(l._zod,"optout",()=>u.innerType?._zod?.optout),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(Vh):Vh(o)}});function Vh(l){return l.value=Object.freeze(l.value),l}const qp=w("$ZodCustom",(l,u)=>{vt.init(l,u),Ve.init(l,u),l._zod.parse=(f,r)=>f,l._zod.check=f=>{const r=f.value,o=u.fn(r);if(o instanceof Promise)return o.then(d=>Qh(d,f,r,l));Qh(o,f,r,l)}});function Qh(l,u,f,r){if(!l){const o={code:"custom",input:f,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),u.issues.push(ka(o))}}var Lh;class Bp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(u,...f){const r=f[0];return this._map.set(u,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,u),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(u){const f=this._map.get(u);return f&&typeof f=="object"&&"id"in f&&this._idmap.delete(f.id),this._map.delete(u),this}get(u){const f=u._zod.parent;if(f){const r={...this.get(f)??{}};delete r.id;const o={...r,...this._map.get(u)};return Object.keys(o).length?o:void 0}return this._map.get(u)}has(u){return this._map.has(u)}}function Yp(){return new Bp}(Lh=globalThis).__zod_globalRegistry??(Lh.__zod_globalRegistry=Yp());const La=globalThis.__zod_globalRegistry;function Gp(l,u){return new l({type:"string",...k(u)})}function Xp(l,u){return new l({type:"string",format:"email",check:"string_format",abort:!1,...k(u)})}function Kh(l,u){return new l({type:"string",format:"guid",check:"string_format",abort:!1,...k(u)})}function Vp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,...k(u)})}function Qp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...k(u)})}function Lp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...k(u)})}function Kp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...k(u)})}function $p(l,u){return new l({type:"string",format:"url",check:"string_format",abort:!1,...k(u)})}function Jp(l,u){return new l({type:"string",format:"emoji",check:"string_format",abort:!1,...k(u)})}function kp(l,u){return new l({type:"string",format:"nanoid",check:"string_format",abort:!1,...k(u)})}function Wp(l,u){return new l({type:"string",format:"cuid",check:"string_format",abort:!1,...k(u)})}function Fp(l,u){return new l({type:"string",format:"cuid2",check:"string_format",abort:!1,...k(u)})}function Ip(l,u){return new l({type:"string",format:"ulid",check:"string_format",abort:!1,...k(u)})}function Pp(l,u){return new l({type:"string",format:"xid",check:"string_format",abort:!1,...k(u)})}function e1(l,u){return new l({type:"string",format:"ksuid",check:"string_format",abort:!1,...k(u)})}function t1(l,u){return new l({type:"string",format:"ipv4",check:"string_format",abort:!1,...k(u)})}function n1(l,u){return new l({type:"string",format:"ipv6",check:"string_format",abort:!1,...k(u)})}function l1(l,u){return new l({type:"string",format:"cidrv4",check:"string_format",abort:!1,...k(u)})}function a1(l,u){return new l({type:"string",format:"cidrv6",check:"string_format",abort:!1,...k(u)})}function u1(l,u){return new l({type:"string",format:"base64",check:"string_format",abort:!1,...k(u)})}function i1(l,u){return new l({type:"string",format:"base64url",check:"string_format",abort:!1,...k(u)})}function c1(l,u){return new l({type:"string",format:"e164",check:"string_format",abort:!1,...k(u)})}function f1(l,u){return new l({type:"string",format:"jwt",check:"string_format",abort:!1,...k(u)})}function r1(l,u){return new l({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...k(u)})}function o1(l,u){return new l({type:"string",format:"date",check:"string_format",...k(u)})}function s1(l,u){return new l({type:"string",format:"time",check:"string_format",precision:null,...k(u)})}function d1(l,u){return new l({type:"string",format:"duration",check:"string_format",...k(u)})}function h1(l,u){return new l({type:"number",checks:[],...k(u)})}function m1(l,u){return new l({type:"number",check:"number_format",abort:!1,format:"safeint",...k(u)})}function v1(l){return new l({type:"unknown"})}function y1(l,u){return new l({type:"never",...k(u)})}function $h(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!1})}function tr(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!0})}function Jh(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!1})}function nr(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!0})}function kh(l,u){return new j0({check:"multiple_of",...k(u),value:l})}function Am(l,u){return new H0({check:"max_length",...k(u),maximum:l})}function Si(l,u){return new q0({check:"min_length",...k(u),minimum:l})}function Mm(l,u){return new B0({check:"length_equals",...k(u),length:l})}function g1(l,u){return new Y0({check:"string_format",format:"regex",...k(u),pattern:l})}function p1(l){return new G0({check:"string_format",format:"lowercase",...k(l)})}function _1(l){return new X0({check:"string_format",format:"uppercase",...k(l)})}function b1(l,u){return new V0({check:"string_format",format:"includes",...k(u),includes:l})}function S1(l,u){return new Q0({check:"string_format",format:"starts_with",...k(u),prefix:l})}function z1(l,u){return new L0({check:"string_format",format:"ends_with",...k(u),suffix:l})}function kl(l){return new K0({check:"overwrite",tx:l})}function E1(l){return kl(u=>u.normalize(l))}function T1(){return kl(l=>l.trim())}function O1(){return kl(l=>l.toLowerCase())}function A1(){return kl(l=>l.toUpperCase())}function M1(){return kl(l=>Yg(l))}function N1(l,u,f){return new l({type:"array",element:u,...k(f)})}function D1(l,u,f){return new l({type:"custom",check:"custom",fn:u,...k(f)})}function Z1(l){const u=U1(f=>(f.addIssue=r=>{if(typeof r=="string")f.issues.push(ka(r,f.value,u._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=f.value),o.inst??(o.inst=u),o.continue??(o.continue=!u._zod.def.abort),f.issues.push(ka(o))}},l(f.value,f)));return u}function U1(l,u){const f=new vt({check:"custom",...k(u)});return f._zod.check=l,f}function Nm(l){let u=l?.target??"draft-2020-12";return u==="draft-4"&&(u="draft-04"),u==="draft-7"&&(u="draft-07"),{processors:l.processors??{},metadataRegistry:l?.metadata??La,target:u,unrepresentable:l?.unrepresentable??"throw",override:l?.override??(()=>{}),io:l?.io??"output",counter:0,seen:new Map,cycles:l?.cycles??"ref",reused:l?.reused??"inline",external:l?.external??void 0}}function tt(l,u,f={path:[],schemaPath:[]}){var r;const o=l._zod.def,d=u.seen.get(l);if(d)return d.count++,f.schemaPath.includes(l)&&(d.cycle=f.path),d.schema;const h={schema:{},count:1,cycle:void 0,path:f.path};u.seen.set(l,h);const v=l._zod.toJSONSchema?.();if(v)h.schema=v;else{const T={...f,schemaPath:[...f.schemaPath,l],path:f.path};if(l._zod.processJSONSchema)l._zod.processJSONSchema(u,h.schema,T);else{const x=h.schema,G=u.processors[o.type];if(!G)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);G(l,u,x,T)}const N=l._zod.parent;N&&(h.ref||(h.ref=N),tt(N,u,T),u.seen.get(N).isParent=!0)}const p=u.metadataRegistry.get(l);return p&&Object.assign(h.schema,p),u.io==="input"&&ct(l)&&(delete h.schema.examples,delete h.schema.default),u.io==="input"&&h.schema._prefault&&((r=h.schema).default??(r.default=h.schema._prefault)),delete h.schema._prefault,u.seen.get(l).schema}function Dm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of l.seen.entries()){const v=l.metadataRegistry.get(h[0])?.id;if(v){const p=r.get(v);if(p&&p!==h[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(v,h[0])}}const o=h=>{const v=l.target==="draft-2020-12"?"$defs":"definitions";if(l.external){const N=l.external.registry.get(h[0])?.id,x=l.external.uri??(R=>R);if(N)return{ref:x(N)};const G=h[1].defId??h[1].schema.id??`schema${l.counter++}`;return h[1].defId=G,{defId:G,ref:`${x("__shared")}#/${v}/${G}`}}if(h[1]===f)return{ref:"#"};const y=`#/${v}/`,T=h[1].schema.id??`__schema${l.counter++}`;return{defId:T,ref:y+T}},d=h=>{if(h[1].schema.$ref)return;const v=h[1],{ref:p,defId:y}=o(h);v.def={...v.schema},y&&(v.defId=y);const T=v.schema;for(const N in T)delete T[N];T.$ref=p};if(l.cycles==="throw")for(const h of l.seen.entries()){const v=h[1];if(v.cycle)throw new Error(`Cycle detected: #/${v.cycle?.join("/")}/ + `)}G.write("payload.value = newResult;"),G.write("return payload;");const K=G.compile();return(Q,I)=>K(x,Q,I)};let d;const h=_i,v=!cm.jitless,y=v&&Gg.value,T=u.catchall;let M;l._zod.parse=(x,G)=>{M??(M=r.value);const R=x.value;return h(R)?v&&y&&G?.async===!1&&G.jitless!==!0?(d||(d=o(u.shape)),x=d(x,G),T?Tm([],R,x,G,M,l):x):f(x,G):(x.issues.push({expected:"object",code:"invalid_type",input:R,inst:l}),x)}});function qh(l,u,f,r){for(const d of l)if(d.issues.length===0)return u.value=d.value,u;const o=l.filter(d=>!$l(d));return o.length===1?(u.value=o[0].value,o[0]):(u.issues.push({code:"invalid_union",input:u.value,inst:f,errors:l.map(d=>d.issues.map(h=>cl(h,r,il())))}),u)}const Ap=w("$ZodUnion",(l,u)=>{Xe.init(l,u),Se(l._zod,"optin",()=>u.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Se(l._zod,"optout",()=>u.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Se(l._zod,"values",()=>{if(u.options.every(o=>o._zod.values))return new Set(u.options.flatMap(o=>Array.from(o._zod.values)))}),Se(l._zod,"pattern",()=>{if(u.options.every(o=>o._zod.pattern)){const o=u.options.map(d=>d._zod.pattern);return new RegExp(`^(${o.map(d=>sr(d.source)).join("|")})$`)}});const f=u.options.length===1,r=u.options[0]._zod.run;l._zod.parse=(o,d)=>{if(f)return r(o,d);let h=!1;const v=[];for(const p of u.options){const y=p._zod.run({value:o.value,issues:[]},d);if(y instanceof Promise)v.push(y),h=!0;else{if(y.issues.length===0)return y;v.push(y)}}return h?Promise.all(v).then(p=>qh(p,o,l,d)):qh(v,o,l,d)}}),Mp=w("$ZodIntersection",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>{const o=f.value,d=u.left._zod.run({value:o,issues:[]},r),h=u.right._zod.run({value:o,issues:[]},r);return d instanceof Promise||h instanceof Promise?Promise.all([d,h]).then(([p,y])=>Bh(f,p,y)):Bh(f,d,h)}});function ur(l,u){if(l===u)return{valid:!0,data:l};if(l instanceof Date&&u instanceof Date&&+l==+u)return{valid:!0,data:l};if(Ja(l)&&Ja(u)){const f=Object.keys(u),r=Object.keys(l).filter(d=>f.indexOf(d)!==-1),o={...l,...u};for(const d of r){const h=ur(l[d],u[d]);if(!h.valid)return{valid:!1,mergeErrorPath:[d,...h.mergeErrorPath]};o[d]=h.data}return{valid:!0,data:o}}if(Array.isArray(l)&&Array.isArray(u)){if(l.length!==u.length)return{valid:!1,mergeErrorPath:[]};const f=[];for(let r=0;rv.l&&v.r).map(([v])=>v);if(d.length&&o&&l.issues.push({...o,keys:d}),$l(l))return l;const h=ur(u.value,f.value);if(!h.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(h.mergeErrorPath)}`);return l.value=h.data,l}const Np=w("$ZodEnum",(l,u)=>{Xe.init(l,u);const f=fm(u.entries),r=new Set(f);l._zod.values=r,l._zod.pattern=new RegExp(`^(${f.filter(o=>Xg.has(typeof o)).map(o=>typeof o=="string"?Ai(o):o.toString()).join("|")})$`),l._zod.parse=(o,d)=>{const h=o.value;return r.has(h)||o.issues.push({code:"invalid_value",values:f,input:h,inst:l}),o}}),Dp=w("$ZodTransform",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);const o=u.transform(f.value,f);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(h=>(f.value=h,f));if(o instanceof Promise)throw new Jl;return f.value=o,f}});function Yh(l,u){return l.issues.length&&u===void 0?{issues:[],value:void 0}:l}const Om=w("$ZodOptional",(l,u)=>{Xe.init(l,u),l._zod.optin="optional",l._zod.optout="optional",Se(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,void 0]):void 0),Se(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)})?$`):void 0}),l._zod.parse=(f,r)=>{if(u.innerType._zod.optin==="optional"){const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Yh(d,f.value)):Yh(o,f.value)}return f.value===void 0?f:u.innerType._zod.run(f,r)}}),Zp=w("$ZodExactOptional",(l,u)=>{Om.init(l,u),Se(l._zod,"values",()=>u.innerType._zod.values),Se(l._zod,"pattern",()=>u.innerType._zod.pattern),l._zod.parse=(f,r)=>u.innerType._zod.run(f,r)}),Up=w("$ZodNullable",(l,u)=>{Xe.init(l,u),Se(l._zod,"optin",()=>u.innerType._zod.optin),Se(l._zod,"optout",()=>u.innerType._zod.optout),Se(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)}|null)$`):void 0}),Se(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,null]):void 0),l._zod.parse=(f,r)=>f.value===null?f:u.innerType._zod.run(f,r)}),wp=w("$ZodDefault",(l,u)=>{Xe.init(l,u),l._zod.optin="optional",Se(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);if(f.value===void 0)return f.value=u.defaultValue,f;const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Gh(d,u)):Gh(o,u)}});function Gh(l,u){return l.value===void 0&&(l.value=u.defaultValue),l}const Rp=w("$ZodPrefault",(l,u)=>{Xe.init(l,u),l._zod.optin="optional",Se(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>(r.direction==="backward"||f.value===void 0&&(f.value=u.defaultValue),u.innerType._zod.run(f,r))}),Cp=w("$ZodNonOptional",(l,u)=>{Xe.init(l,u),Se(l._zod,"values",()=>{const f=u.innerType._zod.values;return f?new Set([...f].filter(r=>r!==void 0)):void 0}),l._zod.parse=(f,r)=>{const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Xh(d,l)):Xh(o,l)}});function Xh(l,u){return!l.issues.length&&l.value===void 0&&l.issues.push({code:"invalid_type",expected:"nonoptional",input:l.value,inst:u}),l}const jp=w("$ZodCatch",(l,u)=>{Xe.init(l,u),Se(l._zod,"optin",()=>u.innerType._zod.optin),Se(l._zod,"optout",()=>u.innerType._zod.optout),Se(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>(f.value=d.value,d.issues.length&&(f.value=u.catchValue({...f,error:{issues:d.issues.map(h=>cl(h,r,il()))},input:f.value}),f.issues=[]),f)):(f.value=o.value,o.issues.length&&(f.value=u.catchValue({...f,error:{issues:o.issues.map(d=>cl(d,r,il()))},input:f.value}),f.issues=[]),f)}}),xp=w("$ZodPipe",(l,u)=>{Xe.init(l,u),Se(l._zod,"values",()=>u.in._zod.values),Se(l._zod,"optin",()=>u.in._zod.optin),Se(l._zod,"optout",()=>u.out._zod.optout),Se(l._zod,"propValues",()=>u.in._zod.propValues),l._zod.parse=(f,r)=>{if(r.direction==="backward"){const d=u.out._zod.run(f,r);return d instanceof Promise?d.then(h=>yi(h,u.in,r)):yi(d,u.in,r)}const o=u.in._zod.run(f,r);return o instanceof Promise?o.then(d=>yi(d,u.out,r)):yi(o,u.out,r)}});function yi(l,u,f){return l.issues.length?(l.aborted=!0,l):u._zod.run({value:l.value,issues:l.issues},f)}const Hp=w("$ZodReadonly",(l,u)=>{Xe.init(l,u),Se(l._zod,"propValues",()=>u.innerType._zod.propValues),Se(l._zod,"values",()=>u.innerType._zod.values),Se(l._zod,"optin",()=>u.innerType?._zod?.optin),Se(l._zod,"optout",()=>u.innerType?._zod?.optout),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(Vh):Vh(o)}});function Vh(l){return l.value=Object.freeze(l.value),l}const qp=w("$ZodCustom",(l,u)=>{yt.init(l,u),Xe.init(l,u),l._zod.parse=(f,r)=>f,l._zod.check=f=>{const r=f.value,o=u.fn(r);if(o instanceof Promise)return o.then(d=>Qh(d,f,r,l));Qh(o,f,r,l)}});function Qh(l,u,f,r){if(!l){const o={code:"custom",input:f,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),u.issues.push(ka(o))}}var Lh;class Bp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(u,...f){const r=f[0];return this._map.set(u,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,u),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(u){const f=this._map.get(u);return f&&typeof f=="object"&&"id"in f&&this._idmap.delete(f.id),this._map.delete(u),this}get(u){const f=u._zod.parent;if(f){const r={...this.get(f)??{}};delete r.id;const o={...r,...this._map.get(u)};return Object.keys(o).length?o:void 0}return this._map.get(u)}has(u){return this._map.has(u)}}function Yp(){return new Bp}(Lh=globalThis).__zod_globalRegistry??(Lh.__zod_globalRegistry=Yp());const La=globalThis.__zod_globalRegistry;function Gp(l,u){return new l({type:"string",...k(u)})}function Xp(l,u){return new l({type:"string",format:"email",check:"string_format",abort:!1,...k(u)})}function Kh(l,u){return new l({type:"string",format:"guid",check:"string_format",abort:!1,...k(u)})}function Vp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,...k(u)})}function Qp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...k(u)})}function Lp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...k(u)})}function Kp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...k(u)})}function $p(l,u){return new l({type:"string",format:"url",check:"string_format",abort:!1,...k(u)})}function Jp(l,u){return new l({type:"string",format:"emoji",check:"string_format",abort:!1,...k(u)})}function kp(l,u){return new l({type:"string",format:"nanoid",check:"string_format",abort:!1,...k(u)})}function Wp(l,u){return new l({type:"string",format:"cuid",check:"string_format",abort:!1,...k(u)})}function Fp(l,u){return new l({type:"string",format:"cuid2",check:"string_format",abort:!1,...k(u)})}function Ip(l,u){return new l({type:"string",format:"ulid",check:"string_format",abort:!1,...k(u)})}function Pp(l,u){return new l({type:"string",format:"xid",check:"string_format",abort:!1,...k(u)})}function e1(l,u){return new l({type:"string",format:"ksuid",check:"string_format",abort:!1,...k(u)})}function t1(l,u){return new l({type:"string",format:"ipv4",check:"string_format",abort:!1,...k(u)})}function n1(l,u){return new l({type:"string",format:"ipv6",check:"string_format",abort:!1,...k(u)})}function l1(l,u){return new l({type:"string",format:"cidrv4",check:"string_format",abort:!1,...k(u)})}function a1(l,u){return new l({type:"string",format:"cidrv6",check:"string_format",abort:!1,...k(u)})}function u1(l,u){return new l({type:"string",format:"base64",check:"string_format",abort:!1,...k(u)})}function i1(l,u){return new l({type:"string",format:"base64url",check:"string_format",abort:!1,...k(u)})}function c1(l,u){return new l({type:"string",format:"e164",check:"string_format",abort:!1,...k(u)})}function f1(l,u){return new l({type:"string",format:"jwt",check:"string_format",abort:!1,...k(u)})}function r1(l,u){return new l({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...k(u)})}function o1(l,u){return new l({type:"string",format:"date",check:"string_format",...k(u)})}function s1(l,u){return new l({type:"string",format:"time",check:"string_format",precision:null,...k(u)})}function d1(l,u){return new l({type:"string",format:"duration",check:"string_format",...k(u)})}function h1(l,u){return new l({type:"number",checks:[],...k(u)})}function m1(l,u){return new l({type:"number",check:"number_format",abort:!1,format:"safeint",...k(u)})}function v1(l){return new l({type:"unknown"})}function y1(l,u){return new l({type:"never",...k(u)})}function $h(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!1})}function tr(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!0})}function Jh(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!1})}function nr(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!0})}function kh(l,u){return new j0({check:"multiple_of",...k(u),value:l})}function Am(l,u){return new H0({check:"max_length",...k(u),maximum:l})}function Si(l,u){return new q0({check:"min_length",...k(u),minimum:l})}function Mm(l,u){return new B0({check:"length_equals",...k(u),length:l})}function g1(l,u){return new Y0({check:"string_format",format:"regex",...k(u),pattern:l})}function p1(l){return new G0({check:"string_format",format:"lowercase",...k(l)})}function _1(l){return new X0({check:"string_format",format:"uppercase",...k(l)})}function b1(l,u){return new V0({check:"string_format",format:"includes",...k(u),includes:l})}function S1(l,u){return new Q0({check:"string_format",format:"starts_with",...k(u),prefix:l})}function z1(l,u){return new L0({check:"string_format",format:"ends_with",...k(u),suffix:l})}function kl(l){return new K0({check:"overwrite",tx:l})}function E1(l){return kl(u=>u.normalize(l))}function T1(){return kl(l=>l.trim())}function O1(){return kl(l=>l.toLowerCase())}function A1(){return kl(l=>l.toUpperCase())}function M1(){return kl(l=>Yg(l))}function N1(l,u,f){return new l({type:"array",element:u,...k(f)})}function D1(l,u,f){return new l({type:"custom",check:"custom",fn:u,...k(f)})}function Z1(l){const u=U1(f=>(f.addIssue=r=>{if(typeof r=="string")f.issues.push(ka(r,f.value,u._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=f.value),o.inst??(o.inst=u),o.continue??(o.continue=!u._zod.def.abort),f.issues.push(ka(o))}},l(f.value,f)));return u}function U1(l,u){const f=new yt({check:"custom",...k(u)});return f._zod.check=l,f}function Nm(l){let u=l?.target??"draft-2020-12";return u==="draft-4"&&(u="draft-04"),u==="draft-7"&&(u="draft-07"),{processors:l.processors??{},metadataRegistry:l?.metadata??La,target:u,unrepresentable:l?.unrepresentable??"throw",override:l?.override??(()=>{}),io:l?.io??"output",counter:0,seen:new Map,cycles:l?.cycles??"ref",reused:l?.reused??"inline",external:l?.external??void 0}}function et(l,u,f={path:[],schemaPath:[]}){var r;const o=l._zod.def,d=u.seen.get(l);if(d)return d.count++,f.schemaPath.includes(l)&&(d.cycle=f.path),d.schema;const h={schema:{},count:1,cycle:void 0,path:f.path};u.seen.set(l,h);const v=l._zod.toJSONSchema?.();if(v)h.schema=v;else{const T={...f,schemaPath:[...f.schemaPath,l],path:f.path};if(l._zod.processJSONSchema)l._zod.processJSONSchema(u,h.schema,T);else{const x=h.schema,G=u.processors[o.type];if(!G)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);G(l,u,x,T)}const M=l._zod.parent;M&&(h.ref||(h.ref=M),et(M,u,T),u.seen.get(M).isParent=!0)}const p=u.metadataRegistry.get(l);return p&&Object.assign(h.schema,p),u.io==="input"&&ft(l)&&(delete h.schema.examples,delete h.schema.default),u.io==="input"&&h.schema._prefault&&((r=h.schema).default??(r.default=h.schema._prefault)),delete h.schema._prefault,u.seen.get(l).schema}function Dm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of l.seen.entries()){const v=l.metadataRegistry.get(h[0])?.id;if(v){const p=r.get(v);if(p&&p!==h[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(v,h[0])}}const o=h=>{const v=l.target==="draft-2020-12"?"$defs":"definitions";if(l.external){const M=l.external.registry.get(h[0])?.id,x=l.external.uri??(R=>R);if(M)return{ref:x(M)};const G=h[1].defId??h[1].schema.id??`schema${l.counter++}`;return h[1].defId=G,{defId:G,ref:`${x("__shared")}#/${v}/${G}`}}if(h[1]===f)return{ref:"#"};const y=`#/${v}/`,T=h[1].schema.id??`__schema${l.counter++}`;return{defId:T,ref:y+T}},d=h=>{if(h[1].schema.$ref)return;const v=h[1],{ref:p,defId:y}=o(h);v.def={...v.schema},y&&(v.defId=y);const T=v.schema;for(const M in T)delete T[M];T.$ref=p};if(l.cycles==="throw")for(const h of l.seen.entries()){const v=h[1];if(v.cycle)throw new Error(`Cycle detected: #/${v.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of l.seen.entries()){const v=h[1];if(u===h[0]){d(h);continue}if(l.external){const y=l.external.registry.get(h[0])?.id;if(u!==h[0]&&y){d(h);continue}}if(l.metadataRegistry.get(h[0])?.id){d(h);continue}if(v.cycle){d(h);continue}if(v.count>1&&l.reused==="ref"){d(h);continue}}}function Zm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const v=l.seen.get(h);if(v.ref===null)return;const p=v.def??v.schema,y={...p},T=v.ref;if(v.ref=null,T){r(T);const x=l.seen.get(T),G=x.schema;if(G.$ref&&(l.target==="draft-07"||l.target==="draft-04"||l.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(G)):Object.assign(p,G),Object.assign(p,y),h._zod.parent===T)for(const j in p)j==="$ref"||j==="allOf"||j in y||delete p[j];if(G.$ref&&x.def)for(const j in p)j==="$ref"||j==="allOf"||j in x.def&&JSON.stringify(p[j])===JSON.stringify(x.def[j])&&delete p[j]}const N=h._zod.parent;if(N&&N!==T){r(N);const x=l.seen.get(N);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const G in p)G==="$ref"||G==="allOf"||G in x.def&&JSON.stringify(p[G])===JSON.stringify(x.def[G])&&delete p[G]}l.override({zodSchema:h,jsonSchema:p,path:v.path??[]})};for(const h of[...l.seen.entries()].reverse())r(h[0]);const o={};if(l.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":l.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":l.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":l.target,l.external?.uri){const h=l.external.registry.get(u)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=l.external.uri(h)}Object.assign(o,f.def??f.schema);const d=l.external?.defs??{};for(const h of l.seen.entries()){const v=h[1];v.def&&v.defId&&(d[v.defId]=v.def)}l.external||Object.keys(d).length>0&&(l.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...u["~standard"],jsonSchema:{input:zi(u,"input",l.processors),output:zi(u,"output",l.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function ct(l,u){const f=u??{seen:new Set};if(f.seen.has(l))return!1;f.seen.add(l);const r=l._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ct(r.element,f);if(r.type==="set")return ct(r.valueType,f);if(r.type==="lazy")return ct(r.getter(),f);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ct(r.innerType,f);if(r.type==="intersection")return ct(r.left,f)||ct(r.right,f);if(r.type==="record"||r.type==="map")return ct(r.keyType,f)||ct(r.valueType,f);if(r.type==="pipe")return ct(r.in,f)||ct(r.out,f);if(r.type==="object"){for(const o in r.shape)if(ct(r.shape[o],f))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ct(o,f))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ct(o,f))return!0;return!!(r.rest&&ct(r.rest,f))}return!1}const w1=(l,u={})=>f=>{const r=Nm({...f,processors:u});return tt(l,r),Dm(r,l),Zm(r,l)},zi=(l,u,f={})=>r=>{const{libraryOptions:o,target:d}=r??{},h=Nm({...o??{},target:d,io:u,processors:f});return tt(l,h),Dm(h,l),Zm(h,l)},R1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},C1=(l,u,f,r)=>{const o=f;o.type="string";const{minimum:d,maximum:h,format:v,patterns:p,contentEncoding:y}=l._zod.bag;if(typeof d=="number"&&(o.minLength=d),typeof h=="number"&&(o.maxLength=h),v&&(o.format=R1[v]??v,o.format===""&&delete o.format,v==="time"&&delete o.format),y&&(o.contentEncoding=y),p&&p.size>0){const T=[...p];T.length===1?o.pattern=T[0].source:T.length>1&&(o.allOf=[...T.map(N=>({...u.target==="draft-07"||u.target==="draft-04"||u.target==="openapi-3.0"?{type:"string"}:{},pattern:N.source}))])}},j1=(l,u,f,r)=>{const o=f,{minimum:d,maximum:h,format:v,multipleOf:p,exclusiveMaximum:y,exclusiveMinimum:T}=l._zod.bag;typeof v=="string"&&v.includes("int")?o.type="integer":o.type="number",typeof T=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.minimum=T,o.exclusiveMinimum=!0):o.exclusiveMinimum=T),typeof d=="number"&&(o.minimum=d,typeof T=="number"&&u.target!=="draft-04"&&(T>=d?delete o.minimum:delete o.exclusiveMinimum)),typeof y=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.maximum=y,o.exclusiveMaximum=!0):o.exclusiveMaximum=y),typeof h=="number"&&(o.maximum=h,typeof y=="number"&&u.target!=="draft-04"&&(y<=h?delete o.maximum:delete o.exclusiveMaximum)),typeof p=="number"&&(o.multipleOf=p)},x1=(l,u,f,r)=>{f.not={}},H1=(l,u,f,r)=>{},q1=(l,u,f,r)=>{const o=l._zod.def,d=fm(o.entries);d.every(h=>typeof h=="number")&&(f.type="number"),d.every(h=>typeof h=="string")&&(f.type="string"),f.enum=d},B1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Y1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},G1=(l,u,f,r)=>{const o=f,d=l._zod.def,{minimum:h,maximum:v}=l._zod.bag;typeof h=="number"&&(o.minItems=h),typeof v=="number"&&(o.maxItems=v),o.type="array",o.items=tt(d.element,u,{...r,path:[...r.path,"items"]})},X1=(l,u,f,r)=>{const o=f,d=l._zod.def;o.type="object",o.properties={};const h=d.shape;for(const y in h)o.properties[y]=tt(h[y],u,{...r,path:[...r.path,"properties",y]});const v=new Set(Object.keys(h)),p=new Set([...v].filter(y=>{const T=d.shape[y]._zod;return u.io==="input"?T.optin===void 0:T.optout===void 0}));p.size>0&&(o.required=Array.from(p)),d.catchall?._zod.def.type==="never"?o.additionalProperties=!1:d.catchall?d.catchall&&(o.additionalProperties=tt(d.catchall,u,{...r,path:[...r.path,"additionalProperties"]})):u.io==="output"&&(o.additionalProperties=!1)},V1=(l,u,f,r)=>{const o=l._zod.def,d=o.inclusive===!1,h=o.options.map((v,p)=>tt(v,u,{...r,path:[...r.path,d?"oneOf":"anyOf",p]}));d?f.oneOf=h:f.anyOf=h},Q1=(l,u,f,r)=>{const o=l._zod.def,d=tt(o.left,u,{...r,path:[...r.path,"allOf",0]}),h=tt(o.right,u,{...r,path:[...r.path,"allOf",1]}),v=y=>"allOf"in y&&Object.keys(y).length===1,p=[...v(d)?d.allOf:[d],...v(h)?h.allOf:[h]];f.allOf=p},L1=(l,u,f,r)=>{const o=l._zod.def,d=tt(o.innerType,u,r),h=u.seen.get(l);u.target==="openapi-3.0"?(h.ref=o.innerType,f.nullable=!0):f.anyOf=[d,{type:"null"}]},K1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},$1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue))},J1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,u.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},k1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h},W1=(l,u,f,r)=>{const o=l._zod.def,d=u.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;tt(d,u,r);const h=u.seen.get(l);h.ref=d},F1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.readOnly=!0},Um=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},I1=w("ZodISODateTime",(l,u)=>{ip.init(l,u),we.init(l,u)});function P1(l){return r1(I1,l)}const e_=w("ZodISODate",(l,u)=>{cp.init(l,u),we.init(l,u)});function t_(l){return o1(e_,l)}const n_=w("ZodISOTime",(l,u)=>{fp.init(l,u),we.init(l,u)});function l_(l){return s1(n_,l)}const a_=w("ZodISODuration",(l,u)=>{rp.init(l,u),we.init(l,u)});function u_(l){return d1(a_,l)}const i_=(l,u)=>{hm.init(l,u),l.name="ZodError",Object.defineProperties(l,{format:{value:f=>Pg(l,f)},flatten:{value:f=>Ig(l,f)},addIssue:{value:f=>{l.issues.push(f),l.message=JSON.stringify(l.issues,ar,2)}},addIssues:{value:f=>{l.issues.push(...f),l.message=JSON.stringify(l.issues,ar,2)}},isEmpty:{get(){return l.issues.length===0}}})},qt=w("ZodError",i_,{Parent:Error}),c_=hr(qt),f_=mr(qt),r_=Mi(qt),o_=Ni(qt),s_=n0(qt),d_=l0(qt),h_=a0(qt),m_=u0(qt),v_=i0(qt),y_=c0(qt),g_=f0(qt),p_=r0(qt),Qe=w("ZodType",(l,u)=>(Ve.init(l,u),Object.assign(l["~standard"],{jsonSchema:{input:zi(l,"input"),output:zi(l,"output")}}),l.toJSONSchema=w1(l,{}),l.def=u,l.type=u.type,Object.defineProperty(l,"_def",{value:u}),l.check=(...f)=>l.clone(qn(u,{checks:[...u.checks??[],...f.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),l.with=l.check,l.clone=(f,r)=>Bn(l,f,r),l.brand=()=>l,l.register=((f,r)=>(f.add(l,r),l)),l.parse=(f,r)=>c_(l,f,r,{callee:l.parse}),l.safeParse=(f,r)=>r_(l,f,r),l.parseAsync=async(f,r)=>f_(l,f,r,{callee:l.parseAsync}),l.safeParseAsync=async(f,r)=>o_(l,f,r),l.spa=l.safeParseAsync,l.encode=(f,r)=>s_(l,f,r),l.decode=(f,r)=>d_(l,f,r),l.encodeAsync=async(f,r)=>h_(l,f,r),l.decodeAsync=async(f,r)=>m_(l,f,r),l.safeEncode=(f,r)=>v_(l,f,r),l.safeDecode=(f,r)=>y_(l,f,r),l.safeEncodeAsync=async(f,r)=>g_(l,f,r),l.safeDecodeAsync=async(f,r)=>p_(l,f,r),l.refine=(f,r)=>l.check(hb(f,r)),l.superRefine=f=>l.check(mb(f)),l.overwrite=f=>l.check(kl(f)),l.optional=()=>Ph(l),l.exactOptional=()=>eb(l),l.nullable=()=>em(l),l.nullish=()=>Ph(em(l)),l.nonoptional=f=>ib(l,f),l.array=()=>V_(l),l.or=f=>$_([l,f]),l.and=f=>k_(l,f),l.transform=f=>tm(l,I_(f)),l.default=f=>lb(l,f),l.prefault=f=>ub(l,f),l.catch=f=>fb(l,f),l.pipe=f=>tm(l,f),l.readonly=()=>sb(l),l.describe=f=>{const r=l.clone();return La.add(r,{description:f}),r},Object.defineProperty(l,"description",{get(){return La.get(l)?.description},configurable:!0}),l.meta=(...f)=>{if(f.length===0)return La.get(l);const r=l.clone();return La.add(r,f[0]),r},l.isOptional=()=>l.safeParse(void 0).success,l.isNullable=()=>l.safeParse(null).success,l.apply=f=>f(l),l)),wm=w("_ZodString",(l,u)=>{vr.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(r,o,d)=>C1(l,r,o);const f=l._zod.bag;l.format=f.format??null,l.minLength=f.minimum??null,l.maxLength=f.maximum??null,l.regex=(...r)=>l.check(g1(...r)),l.includes=(...r)=>l.check(b1(...r)),l.startsWith=(...r)=>l.check(S1(...r)),l.endsWith=(...r)=>l.check(z1(...r)),l.min=(...r)=>l.check(Si(...r)),l.max=(...r)=>l.check(Am(...r)),l.length=(...r)=>l.check(Mm(...r)),l.nonempty=(...r)=>l.check(Si(1,...r)),l.lowercase=r=>l.check(p1(r)),l.uppercase=r=>l.check(_1(r)),l.trim=()=>l.check(T1()),l.normalize=(...r)=>l.check(E1(...r)),l.toLowerCase=()=>l.check(O1()),l.toUpperCase=()=>l.check(A1()),l.slugify=()=>l.check(M1())}),__=w("ZodString",(l,u)=>{vr.init(l,u),wm.init(l,u),l.email=f=>l.check(Xp(b_,f)),l.url=f=>l.check($p(S_,f)),l.jwt=f=>l.check(f1(x_,f)),l.emoji=f=>l.check(Jp(z_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.uuid=f=>l.check(Vp(gi,f)),l.uuidv4=f=>l.check(Qp(gi,f)),l.uuidv6=f=>l.check(Lp(gi,f)),l.uuidv7=f=>l.check(Kp(gi,f)),l.nanoid=f=>l.check(kp(E_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.cuid=f=>l.check(Wp(T_,f)),l.cuid2=f=>l.check(Fp(O_,f)),l.ulid=f=>l.check(Ip(A_,f)),l.base64=f=>l.check(u1(R_,f)),l.base64url=f=>l.check(i1(C_,f)),l.xid=f=>l.check(Pp(M_,f)),l.ksuid=f=>l.check(e1(N_,f)),l.ipv4=f=>l.check(t1(D_,f)),l.ipv6=f=>l.check(n1(Z_,f)),l.cidrv4=f=>l.check(l1(U_,f)),l.cidrv6=f=>l.check(a1(w_,f)),l.e164=f=>l.check(c1(j_,f)),l.datetime=f=>l.check(P1(f)),l.date=f=>l.check(t_(f)),l.time=f=>l.check(l_(f)),l.duration=f=>l.check(u_(f))});function Ei(l){return Gp(__,l)}const we=w("ZodStringFormat",(l,u)=>{Ue.init(l,u),wm.init(l,u)}),b_=w("ZodEmail",(l,u)=>{F0.init(l,u),we.init(l,u)}),Wh=w("ZodGUID",(l,u)=>{k0.init(l,u),we.init(l,u)}),gi=w("ZodUUID",(l,u)=>{W0.init(l,u),we.init(l,u)}),S_=w("ZodURL",(l,u)=>{I0.init(l,u),we.init(l,u)}),z_=w("ZodEmoji",(l,u)=>{P0.init(l,u),we.init(l,u)}),E_=w("ZodNanoID",(l,u)=>{ep.init(l,u),we.init(l,u)}),T_=w("ZodCUID",(l,u)=>{tp.init(l,u),we.init(l,u)}),O_=w("ZodCUID2",(l,u)=>{np.init(l,u),we.init(l,u)}),A_=w("ZodULID",(l,u)=>{lp.init(l,u),we.init(l,u)}),M_=w("ZodXID",(l,u)=>{ap.init(l,u),we.init(l,u)}),N_=w("ZodKSUID",(l,u)=>{up.init(l,u),we.init(l,u)}),D_=w("ZodIPv4",(l,u)=>{op.init(l,u),we.init(l,u)}),Z_=w("ZodIPv6",(l,u)=>{sp.init(l,u),we.init(l,u)}),U_=w("ZodCIDRv4",(l,u)=>{dp.init(l,u),we.init(l,u)}),w_=w("ZodCIDRv6",(l,u)=>{hp.init(l,u),we.init(l,u)}),R_=w("ZodBase64",(l,u)=>{mp.init(l,u),we.init(l,u)}),C_=w("ZodBase64URL",(l,u)=>{yp.init(l,u),we.init(l,u)}),j_=w("ZodE164",(l,u)=>{gp.init(l,u),we.init(l,u)}),x_=w("ZodJWT",(l,u)=>{_p.init(l,u),we.init(l,u)}),Rm=w("ZodNumber",(l,u)=>{zm.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(r,o,d)=>j1(l,r,o),l.gt=(r,o)=>l.check(Jh(r,o)),l.gte=(r,o)=>l.check(nr(r,o)),l.min=(r,o)=>l.check(nr(r,o)),l.lt=(r,o)=>l.check($h(r,o)),l.lte=(r,o)=>l.check(tr(r,o)),l.max=(r,o)=>l.check(tr(r,o)),l.int=r=>l.check(Fh(r)),l.safe=r=>l.check(Fh(r)),l.positive=r=>l.check(Jh(0,r)),l.nonnegative=r=>l.check(nr(0,r)),l.negative=r=>l.check($h(0,r)),l.nonpositive=r=>l.check(tr(0,r)),l.multipleOf=(r,o)=>l.check(kh(r,o)),l.step=(r,o)=>l.check(kh(r,o)),l.finite=()=>l;const f=l._zod.bag;l.minValue=Math.max(f.minimum??Number.NEGATIVE_INFINITY,f.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,l.maxValue=Math.min(f.maximum??Number.POSITIVE_INFINITY,f.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,l.isInt=(f.format??"").includes("int")||Number.isSafeInteger(f.multipleOf??.5),l.isFinite=!0,l.format=f.format??null});function H_(l){return h1(Rm,l)}const q_=w("ZodNumberFormat",(l,u)=>{bp.init(l,u),Rm.init(l,u)});function Fh(l){return m1(q_,l)}const B_=w("ZodUnknown",(l,u)=>{Sp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>H1()});function Ih(){return v1(B_)}const Y_=w("ZodNever",(l,u)=>{zp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>x1(l,f,r)});function G_(l){return y1(Y_,l)}const X_=w("ZodArray",(l,u)=>{Ep.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>G1(l,f,r,o),l.element=u.element,l.min=(f,r)=>l.check(Si(f,r)),l.nonempty=f=>l.check(Si(1,f)),l.max=(f,r)=>l.check(Am(f,r)),l.length=(f,r)=>l.check(Mm(f,r)),l.unwrap=()=>l.element});function V_(l,u){return N1(X_,l,u)}const Q_=w("ZodObject",(l,u)=>{Op.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>X1(l,f,r,o),_e(l,"shape",()=>u.shape),l.keyof=()=>W_(Object.keys(l._zod.def.shape)),l.catchall=f=>l.clone({...l._zod.def,catchall:f}),l.passthrough=()=>l.clone({...l._zod.def,catchall:Ih()}),l.loose=()=>l.clone({...l._zod.def,catchall:Ih()}),l.strict=()=>l.clone({...l._zod.def,catchall:G_()}),l.strip=()=>l.clone({...l._zod.def,catchall:void 0}),l.extend=f=>$g(l,f),l.safeExtend=f=>Jg(l,f),l.merge=f=>kg(l,f),l.pick=f=>Lg(l,f),l.omit=f=>Kg(l,f),l.partial=(...f)=>Wg(Cm,l,f[0]),l.required=(...f)=>Fg(jm,l,f[0])});function L_(l,u){const f={type:"object",shape:l??{},...k(u)};return new Q_(f)}const K_=w("ZodUnion",(l,u)=>{Ap.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>V1(l,f,r,o),l.options=u.options});function $_(l,u){return new K_({type:"union",options:l,...k(u)})}const J_=w("ZodIntersection",(l,u)=>{Mp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Q1(l,f,r,o)});function k_(l,u){return new J_({type:"intersection",left:l,right:u})}const ir=w("ZodEnum",(l,u)=>{Np.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(r,o,d)=>q1(l,r,o),l.enum=u.entries,l.options=Object.values(u.entries);const f=new Set(Object.keys(u.entries));l.extract=(r,o)=>{const d={};for(const h of r)if(f.has(h))d[h]=u.entries[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})},l.exclude=(r,o)=>{const d={...u.entries};for(const h of r)if(f.has(h))delete d[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})}});function W_(l,u){const f=Array.isArray(l)?Object.fromEntries(l.map(r=>[r,r])):l;return new ir({type:"enum",entries:f,...k(u)})}const F_=w("ZodTransform",(l,u)=>{Dp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Y1(l,f),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);f.addIssue=d=>{if(typeof d=="string")f.issues.push(ka(d,f.value,u));else{const h=d;h.fatal&&(h.continue=!1),h.code??(h.code="custom"),h.input??(h.input=f.value),h.inst??(h.inst=l),f.issues.push(ka(h))}};const o=u.transform(f.value,f);return o instanceof Promise?o.then(d=>(f.value=d,f)):(f.value=o,f)}});function I_(l){return new F_({type:"transform",transform:l})}const Cm=w("ZodOptional",(l,u)=>{Om.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function Ph(l){return new Cm({type:"optional",innerType:l})}const P_=w("ZodExactOptional",(l,u)=>{Zp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function eb(l){return new P_({type:"optional",innerType:l})}const tb=w("ZodNullable",(l,u)=>{Up.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>L1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function em(l){return new tb({type:"nullable",innerType:l})}const nb=w("ZodDefault",(l,u)=>{wp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>$1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeDefault=l.unwrap});function lb(l,u){return new nb({type:"default",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const ab=w("ZodPrefault",(l,u)=>{Rp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>J1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ub(l,u){return new ab({type:"prefault",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const jm=w("ZodNonOptional",(l,u)=>{Cp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>K1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ib(l,u){return new jm({type:"nonoptional",innerType:l,...k(u)})}const cb=w("ZodCatch",(l,u)=>{jp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>k1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeCatch=l.unwrap});function fb(l,u){return new cb({type:"catch",innerType:l,catchValue:typeof u=="function"?u:()=>u})}const rb=w("ZodPipe",(l,u)=>{xp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>W1(l,f,r,o),l.in=u.in,l.out=u.out});function tm(l,u){return new rb({type:"pipe",in:l,out:u})}const ob=w("ZodReadonly",(l,u)=>{Hp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>F1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function sb(l){return new ob({type:"readonly",innerType:l})}const db=w("ZodCustom",(l,u)=>{qp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>B1(l,f)});function hb(l,u={}){return D1(db,l,u)}function mb(l){return Z1(l)}L_({sessionARN:Ei(),hexColor:Ei()});const xm="sync:colorSettings";async function vb(){return await am.getItem(xm)}var yr=(l=>(l.getSessionARN="getSessionARN",l.changeColor="changeColor",l))(yr||{});const yb="*://*.signin.aws.amazon.com/*";function gb(){return["*://*.console.aws.amazon.com/*",yb]}function pb(l,u){return new RegExp(l.replaceAll("*",".*")).exec(u)!==null}const $a=-1,Hm="#161d26";function qm({index:l,hexColor:u,setIndex:f,setHexColor:r}){f(l),r(u)}async function Bm({colorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){qm({index:$a,hexColor:Hm,setIndex:u,setHexColor:r});const{success:o,data:d}=await Xm();o&&l.findIndex(({sessionARN:h})=>h===d)<0&&f(d)}async function Ym({setColorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){const o=await vb(),d=o!==null&&0pb(r,Ei().parse(u[0].url))).length?await Zh.tabs.sendMessage(H_().parse(u[0].id),l):void 0}async function Xm(){return Ei().safeParse(await Gm(yr.getSessionARN))}function Ti({colorSettings:l,index:u,setIndex:f,setHexColor:r}){qm({index:u,hexColor:l[u].hexColor,setIndex:f,setHexColor:r})}async function _b(l){const u=await Ym(l),{success:f,data:r}=await Xm();if(!f){0d===r);if(o<0){l.setSessionARN(r);return}Ti({...l,colorSettings:u,index:o})}async function bb({colorSettings:l,indexValue:u,getColorSettingsParams:f}){const r=Number.parseInt(u,10);r===$a?await Bm({...f,colorSettings:l}):-1(r===u.index&&(f.hexColor=l),f))})}function Eb(){const[l,u]=ce.useState([]),[f,r]=ce.useState($a),[o,d]=ce.useState(""),[h,v]=qg(Hm),p=T=>{v(at.convert("hex",T))};ce.useEffect(()=>{_b({setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p})},[]);const y=f===$a;return ke.jsxs(ke.Fragment,{children:[ke.jsx("h1",{children:"AWS management console colorize"}),ke.jsxs("div",{className:"card rcp-fields-floor",children:[ke.jsxs("div",{id:"session-arn-field",className:"rcp-field",children:[ke.jsxs("select",{id:"session-arn-index",className:"rcp-field-input",value:f,onChange:async({target:{value:T}})=>{await bb({indexValue:T,colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p}})},children:[l.map(({sessionARN:T},N)=>ke.jsx("option",{value:N,children:T},N)),ke.jsx("option",{value:$a,children:"[New]"})]}),y&&ke.jsx("input",{className:"rcp-field-input",placeholder:"arn:aws:iam::012345678901:user/user_name",required:!0,value:o,onChange:({target:{value:T}})=>d(T)}),ke.jsx("label",{htmlFor:"session-arn-index",className:"rcp-field-label",children:"Session ARN"})]}),ke.jsx(Hg,{color:h,onChange:v}),y&&ke.jsx("button",{disabled:o==="",onClick:async()=>{await Sb({colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},hexColor:h.hex,sessionARN:o})},children:"Add"}),-1{await zb(h.hex,{colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Update"}),ke.jsx("button",{onClick:async()=>{await gr({colorSettings:l.filter((T,N)=>N!==f),getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Delete"})]})]})]})}zg.createRoot(document.getElementById("root")).render(ke.jsx(me.StrictMode,{children:ke.jsx(Eb,{})})); +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of l.seen.entries()){const v=h[1];if(u===h[0]){d(h);continue}if(l.external){const y=l.external.registry.get(h[0])?.id;if(u!==h[0]&&y){d(h);continue}}if(l.metadataRegistry.get(h[0])?.id){d(h);continue}if(v.cycle){d(h);continue}if(v.count>1&&l.reused==="ref"){d(h);continue}}}function Zm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const v=l.seen.get(h);if(v.ref===null)return;const p=v.def??v.schema,y={...p},T=v.ref;if(v.ref=null,T){r(T);const x=l.seen.get(T),G=x.schema;if(G.$ref&&(l.target==="draft-07"||l.target==="draft-04"||l.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(G)):Object.assign(p,G),Object.assign(p,y),h._zod.parent===T)for(const j in p)j==="$ref"||j==="allOf"||j in y||delete p[j];if(G.$ref&&x.def)for(const j in p)j==="$ref"||j==="allOf"||j in x.def&&JSON.stringify(p[j])===JSON.stringify(x.def[j])&&delete p[j]}const M=h._zod.parent;if(M&&M!==T){r(M);const x=l.seen.get(M);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const G in p)G==="$ref"||G==="allOf"||G in x.def&&JSON.stringify(p[G])===JSON.stringify(x.def[G])&&delete p[G]}l.override({zodSchema:h,jsonSchema:p,path:v.path??[]})};for(const h of[...l.seen.entries()].reverse())r(h[0]);const o={};if(l.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":l.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":l.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":l.target,l.external?.uri){const h=l.external.registry.get(u)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=l.external.uri(h)}Object.assign(o,f.def??f.schema);const d=l.external?.defs??{};for(const h of l.seen.entries()){const v=h[1];v.def&&v.defId&&(d[v.defId]=v.def)}l.external||Object.keys(d).length>0&&(l.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...u["~standard"],jsonSchema:{input:zi(u,"input",l.processors),output:zi(u,"output",l.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function ft(l,u){const f=u??{seen:new Set};if(f.seen.has(l))return!1;f.seen.add(l);const r=l._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ft(r.element,f);if(r.type==="set")return ft(r.valueType,f);if(r.type==="lazy")return ft(r.getter(),f);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ft(r.innerType,f);if(r.type==="intersection")return ft(r.left,f)||ft(r.right,f);if(r.type==="record"||r.type==="map")return ft(r.keyType,f)||ft(r.valueType,f);if(r.type==="pipe")return ft(r.in,f)||ft(r.out,f);if(r.type==="object"){for(const o in r.shape)if(ft(r.shape[o],f))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ft(o,f))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ft(o,f))return!0;return!!(r.rest&&ft(r.rest,f))}return!1}const w1=(l,u={})=>f=>{const r=Nm({...f,processors:u});return et(l,r),Dm(r,l),Zm(r,l)},zi=(l,u,f={})=>r=>{const{libraryOptions:o,target:d}=r??{},h=Nm({...o??{},target:d,io:u,processors:f});return et(l,h),Dm(h,l),Zm(h,l)},R1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},C1=(l,u,f,r)=>{const o=f;o.type="string";const{minimum:d,maximum:h,format:v,patterns:p,contentEncoding:y}=l._zod.bag;if(typeof d=="number"&&(o.minLength=d),typeof h=="number"&&(o.maxLength=h),v&&(o.format=R1[v]??v,o.format===""&&delete o.format,v==="time"&&delete o.format),y&&(o.contentEncoding=y),p&&p.size>0){const T=[...p];T.length===1?o.pattern=T[0].source:T.length>1&&(o.allOf=[...T.map(M=>({...u.target==="draft-07"||u.target==="draft-04"||u.target==="openapi-3.0"?{type:"string"}:{},pattern:M.source}))])}},j1=(l,u,f,r)=>{const o=f,{minimum:d,maximum:h,format:v,multipleOf:p,exclusiveMaximum:y,exclusiveMinimum:T}=l._zod.bag;typeof v=="string"&&v.includes("int")?o.type="integer":o.type="number",typeof T=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.minimum=T,o.exclusiveMinimum=!0):o.exclusiveMinimum=T),typeof d=="number"&&(o.minimum=d,typeof T=="number"&&u.target!=="draft-04"&&(T>=d?delete o.minimum:delete o.exclusiveMinimum)),typeof y=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.maximum=y,o.exclusiveMaximum=!0):o.exclusiveMaximum=y),typeof h=="number"&&(o.maximum=h,typeof y=="number"&&u.target!=="draft-04"&&(y<=h?delete o.maximum:delete o.exclusiveMaximum)),typeof p=="number"&&(o.multipleOf=p)},x1=(l,u,f,r)=>{f.not={}},H1=(l,u,f,r)=>{},q1=(l,u,f,r)=>{const o=l._zod.def,d=fm(o.entries);d.every(h=>typeof h=="number")&&(f.type="number"),d.every(h=>typeof h=="string")&&(f.type="string"),f.enum=d},B1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Y1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},G1=(l,u,f,r)=>{const o=f,d=l._zod.def,{minimum:h,maximum:v}=l._zod.bag;typeof h=="number"&&(o.minItems=h),typeof v=="number"&&(o.maxItems=v),o.type="array",o.items=et(d.element,u,{...r,path:[...r.path,"items"]})},X1=(l,u,f,r)=>{const o=f,d=l._zod.def;o.type="object",o.properties={};const h=d.shape;for(const y in h)o.properties[y]=et(h[y],u,{...r,path:[...r.path,"properties",y]});const v=new Set(Object.keys(h)),p=new Set([...v].filter(y=>{const T=d.shape[y]._zod;return u.io==="input"?T.optin===void 0:T.optout===void 0}));p.size>0&&(o.required=Array.from(p)),d.catchall?._zod.def.type==="never"?o.additionalProperties=!1:d.catchall?d.catchall&&(o.additionalProperties=et(d.catchall,u,{...r,path:[...r.path,"additionalProperties"]})):u.io==="output"&&(o.additionalProperties=!1)},V1=(l,u,f,r)=>{const o=l._zod.def,d=o.inclusive===!1,h=o.options.map((v,p)=>et(v,u,{...r,path:[...r.path,d?"oneOf":"anyOf",p]}));d?f.oneOf=h:f.anyOf=h},Q1=(l,u,f,r)=>{const o=l._zod.def,d=et(o.left,u,{...r,path:[...r.path,"allOf",0]}),h=et(o.right,u,{...r,path:[...r.path,"allOf",1]}),v=y=>"allOf"in y&&Object.keys(y).length===1,p=[...v(d)?d.allOf:[d],...v(h)?h.allOf:[h]];f.allOf=p},L1=(l,u,f,r)=>{const o=l._zod.def,d=et(o.innerType,u,r),h=u.seen.get(l);u.target==="openapi-3.0"?(h.ref=o.innerType,f.nullable=!0):f.anyOf=[d,{type:"null"}]},K1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},$1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue))},J1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,u.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},k1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h},W1=(l,u,f,r)=>{const o=l._zod.def,d=u.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;et(d,u,r);const h=u.seen.get(l);h.ref=d},F1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.readOnly=!0},Um=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},I1=w("ZodISODateTime",(l,u)=>{ip.init(l,u),we.init(l,u)});function P1(l){return r1(I1,l)}const e_=w("ZodISODate",(l,u)=>{cp.init(l,u),we.init(l,u)});function t_(l){return o1(e_,l)}const n_=w("ZodISOTime",(l,u)=>{fp.init(l,u),we.init(l,u)});function l_(l){return s1(n_,l)}const a_=w("ZodISODuration",(l,u)=>{rp.init(l,u),we.init(l,u)});function u_(l){return d1(a_,l)}const i_=(l,u)=>{hm.init(l,u),l.name="ZodError",Object.defineProperties(l,{format:{value:f=>Pg(l,f)},flatten:{value:f=>Ig(l,f)},addIssue:{value:f=>{l.issues.push(f),l.message=JSON.stringify(l.issues,ar,2)}},addIssues:{value:f=>{l.issues.push(...f),l.message=JSON.stringify(l.issues,ar,2)}},isEmpty:{get(){return l.issues.length===0}}})},qt=w("ZodError",i_,{Parent:Error}),c_=hr(qt),f_=mr(qt),r_=Mi(qt),o_=Ni(qt),s_=n0(qt),d_=l0(qt),h_=a0(qt),m_=u0(qt),v_=i0(qt),y_=c0(qt),g_=f0(qt),p_=r0(qt),Ve=w("ZodType",(l,u)=>(Xe.init(l,u),Object.assign(l["~standard"],{jsonSchema:{input:zi(l,"input"),output:zi(l,"output")}}),l.toJSONSchema=w1(l,{}),l.def=u,l.type=u.type,Object.defineProperty(l,"_def",{value:u}),l.check=(...f)=>l.clone(qn(u,{checks:[...u.checks??[],...f.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),l.with=l.check,l.clone=(f,r)=>Bn(l,f,r),l.brand=()=>l,l.register=((f,r)=>(f.add(l,r),l)),l.parse=(f,r)=>c_(l,f,r,{callee:l.parse}),l.safeParse=(f,r)=>r_(l,f,r),l.parseAsync=async(f,r)=>f_(l,f,r,{callee:l.parseAsync}),l.safeParseAsync=async(f,r)=>o_(l,f,r),l.spa=l.safeParseAsync,l.encode=(f,r)=>s_(l,f,r),l.decode=(f,r)=>d_(l,f,r),l.encodeAsync=async(f,r)=>h_(l,f,r),l.decodeAsync=async(f,r)=>m_(l,f,r),l.safeEncode=(f,r)=>v_(l,f,r),l.safeDecode=(f,r)=>y_(l,f,r),l.safeEncodeAsync=async(f,r)=>g_(l,f,r),l.safeDecodeAsync=async(f,r)=>p_(l,f,r),l.refine=(f,r)=>l.check(hb(f,r)),l.superRefine=f=>l.check(mb(f)),l.overwrite=f=>l.check(kl(f)),l.optional=()=>Ph(l),l.exactOptional=()=>eb(l),l.nullable=()=>em(l),l.nullish=()=>Ph(em(l)),l.nonoptional=f=>ib(l,f),l.array=()=>V_(l),l.or=f=>$_([l,f]),l.and=f=>k_(l,f),l.transform=f=>tm(l,I_(f)),l.default=f=>lb(l,f),l.prefault=f=>ub(l,f),l.catch=f=>fb(l,f),l.pipe=f=>tm(l,f),l.readonly=()=>sb(l),l.describe=f=>{const r=l.clone();return La.add(r,{description:f}),r},Object.defineProperty(l,"description",{get(){return La.get(l)?.description},configurable:!0}),l.meta=(...f)=>{if(f.length===0)return La.get(l);const r=l.clone();return La.add(r,f[0]),r},l.isOptional=()=>l.safeParse(void 0).success,l.isNullable=()=>l.safeParse(null).success,l.apply=f=>f(l),l)),wm=w("_ZodString",(l,u)=>{vr.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(r,o,d)=>C1(l,r,o);const f=l._zod.bag;l.format=f.format??null,l.minLength=f.minimum??null,l.maxLength=f.maximum??null,l.regex=(...r)=>l.check(g1(...r)),l.includes=(...r)=>l.check(b1(...r)),l.startsWith=(...r)=>l.check(S1(...r)),l.endsWith=(...r)=>l.check(z1(...r)),l.min=(...r)=>l.check(Si(...r)),l.max=(...r)=>l.check(Am(...r)),l.length=(...r)=>l.check(Mm(...r)),l.nonempty=(...r)=>l.check(Si(1,...r)),l.lowercase=r=>l.check(p1(r)),l.uppercase=r=>l.check(_1(r)),l.trim=()=>l.check(T1()),l.normalize=(...r)=>l.check(E1(...r)),l.toLowerCase=()=>l.check(O1()),l.toUpperCase=()=>l.check(A1()),l.slugify=()=>l.check(M1())}),__=w("ZodString",(l,u)=>{vr.init(l,u),wm.init(l,u),l.email=f=>l.check(Xp(b_,f)),l.url=f=>l.check($p(S_,f)),l.jwt=f=>l.check(f1(x_,f)),l.emoji=f=>l.check(Jp(z_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.uuid=f=>l.check(Vp(gi,f)),l.uuidv4=f=>l.check(Qp(gi,f)),l.uuidv6=f=>l.check(Lp(gi,f)),l.uuidv7=f=>l.check(Kp(gi,f)),l.nanoid=f=>l.check(kp(E_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.cuid=f=>l.check(Wp(T_,f)),l.cuid2=f=>l.check(Fp(O_,f)),l.ulid=f=>l.check(Ip(A_,f)),l.base64=f=>l.check(u1(R_,f)),l.base64url=f=>l.check(i1(C_,f)),l.xid=f=>l.check(Pp(M_,f)),l.ksuid=f=>l.check(e1(N_,f)),l.ipv4=f=>l.check(t1(D_,f)),l.ipv6=f=>l.check(n1(Z_,f)),l.cidrv4=f=>l.check(l1(U_,f)),l.cidrv6=f=>l.check(a1(w_,f)),l.e164=f=>l.check(c1(j_,f)),l.datetime=f=>l.check(P1(f)),l.date=f=>l.check(t_(f)),l.time=f=>l.check(l_(f)),l.duration=f=>l.check(u_(f))});function Ei(l){return Gp(__,l)}const we=w("ZodStringFormat",(l,u)=>{Ue.init(l,u),wm.init(l,u)}),b_=w("ZodEmail",(l,u)=>{F0.init(l,u),we.init(l,u)}),Wh=w("ZodGUID",(l,u)=>{k0.init(l,u),we.init(l,u)}),gi=w("ZodUUID",(l,u)=>{W0.init(l,u),we.init(l,u)}),S_=w("ZodURL",(l,u)=>{I0.init(l,u),we.init(l,u)}),z_=w("ZodEmoji",(l,u)=>{P0.init(l,u),we.init(l,u)}),E_=w("ZodNanoID",(l,u)=>{ep.init(l,u),we.init(l,u)}),T_=w("ZodCUID",(l,u)=>{tp.init(l,u),we.init(l,u)}),O_=w("ZodCUID2",(l,u)=>{np.init(l,u),we.init(l,u)}),A_=w("ZodULID",(l,u)=>{lp.init(l,u),we.init(l,u)}),M_=w("ZodXID",(l,u)=>{ap.init(l,u),we.init(l,u)}),N_=w("ZodKSUID",(l,u)=>{up.init(l,u),we.init(l,u)}),D_=w("ZodIPv4",(l,u)=>{op.init(l,u),we.init(l,u)}),Z_=w("ZodIPv6",(l,u)=>{sp.init(l,u),we.init(l,u)}),U_=w("ZodCIDRv4",(l,u)=>{dp.init(l,u),we.init(l,u)}),w_=w("ZodCIDRv6",(l,u)=>{hp.init(l,u),we.init(l,u)}),R_=w("ZodBase64",(l,u)=>{mp.init(l,u),we.init(l,u)}),C_=w("ZodBase64URL",(l,u)=>{yp.init(l,u),we.init(l,u)}),j_=w("ZodE164",(l,u)=>{gp.init(l,u),we.init(l,u)}),x_=w("ZodJWT",(l,u)=>{_p.init(l,u),we.init(l,u)}),Rm=w("ZodNumber",(l,u)=>{zm.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(r,o,d)=>j1(l,r,o),l.gt=(r,o)=>l.check(Jh(r,o)),l.gte=(r,o)=>l.check(nr(r,o)),l.min=(r,o)=>l.check(nr(r,o)),l.lt=(r,o)=>l.check($h(r,o)),l.lte=(r,o)=>l.check(tr(r,o)),l.max=(r,o)=>l.check(tr(r,o)),l.int=r=>l.check(Fh(r)),l.safe=r=>l.check(Fh(r)),l.positive=r=>l.check(Jh(0,r)),l.nonnegative=r=>l.check(nr(0,r)),l.negative=r=>l.check($h(0,r)),l.nonpositive=r=>l.check(tr(0,r)),l.multipleOf=(r,o)=>l.check(kh(r,o)),l.step=(r,o)=>l.check(kh(r,o)),l.finite=()=>l;const f=l._zod.bag;l.minValue=Math.max(f.minimum??Number.NEGATIVE_INFINITY,f.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,l.maxValue=Math.min(f.maximum??Number.POSITIVE_INFINITY,f.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,l.isInt=(f.format??"").includes("int")||Number.isSafeInteger(f.multipleOf??.5),l.isFinite=!0,l.format=f.format??null});function H_(l){return h1(Rm,l)}const q_=w("ZodNumberFormat",(l,u)=>{bp.init(l,u),Rm.init(l,u)});function Fh(l){return m1(q_,l)}const B_=w("ZodUnknown",(l,u)=>{Sp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>H1()});function Ih(){return v1(B_)}const Y_=w("ZodNever",(l,u)=>{zp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>x1(l,f,r)});function G_(l){return y1(Y_,l)}const X_=w("ZodArray",(l,u)=>{Ep.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>G1(l,f,r,o),l.element=u.element,l.min=(f,r)=>l.check(Si(f,r)),l.nonempty=f=>l.check(Si(1,f)),l.max=(f,r)=>l.check(Am(f,r)),l.length=(f,r)=>l.check(Mm(f,r)),l.unwrap=()=>l.element});function V_(l,u){return N1(X_,l,u)}const Q_=w("ZodObject",(l,u)=>{Op.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>X1(l,f,r,o),Se(l,"shape",()=>u.shape),l.keyof=()=>W_(Object.keys(l._zod.def.shape)),l.catchall=f=>l.clone({...l._zod.def,catchall:f}),l.passthrough=()=>l.clone({...l._zod.def,catchall:Ih()}),l.loose=()=>l.clone({...l._zod.def,catchall:Ih()}),l.strict=()=>l.clone({...l._zod.def,catchall:G_()}),l.strip=()=>l.clone({...l._zod.def,catchall:void 0}),l.extend=f=>$g(l,f),l.safeExtend=f=>Jg(l,f),l.merge=f=>kg(l,f),l.pick=f=>Lg(l,f),l.omit=f=>Kg(l,f),l.partial=(...f)=>Wg(Cm,l,f[0]),l.required=(...f)=>Fg(jm,l,f[0])});function L_(l,u){const f={type:"object",shape:l??{},...k(u)};return new Q_(f)}const K_=w("ZodUnion",(l,u)=>{Ap.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>V1(l,f,r,o),l.options=u.options});function $_(l,u){return new K_({type:"union",options:l,...k(u)})}const J_=w("ZodIntersection",(l,u)=>{Mp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Q1(l,f,r,o)});function k_(l,u){return new J_({type:"intersection",left:l,right:u})}const ir=w("ZodEnum",(l,u)=>{Np.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(r,o,d)=>q1(l,r,o),l.enum=u.entries,l.options=Object.values(u.entries);const f=new Set(Object.keys(u.entries));l.extract=(r,o)=>{const d={};for(const h of r)if(f.has(h))d[h]=u.entries[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})},l.exclude=(r,o)=>{const d={...u.entries};for(const h of r)if(f.has(h))delete d[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})}});function W_(l,u){const f=Array.isArray(l)?Object.fromEntries(l.map(r=>[r,r])):l;return new ir({type:"enum",entries:f,...k(u)})}const F_=w("ZodTransform",(l,u)=>{Dp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Y1(l,f),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);f.addIssue=d=>{if(typeof d=="string")f.issues.push(ka(d,f.value,u));else{const h=d;h.fatal&&(h.continue=!1),h.code??(h.code="custom"),h.input??(h.input=f.value),h.inst??(h.inst=l),f.issues.push(ka(h))}};const o=u.transform(f.value,f);return o instanceof Promise?o.then(d=>(f.value=d,f)):(f.value=o,f)}});function I_(l){return new F_({type:"transform",transform:l})}const Cm=w("ZodOptional",(l,u)=>{Om.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function Ph(l){return new Cm({type:"optional",innerType:l})}const P_=w("ZodExactOptional",(l,u)=>{Zp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function eb(l){return new P_({type:"optional",innerType:l})}const tb=w("ZodNullable",(l,u)=>{Up.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>L1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function em(l){return new tb({type:"nullable",innerType:l})}const nb=w("ZodDefault",(l,u)=>{wp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>$1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeDefault=l.unwrap});function lb(l,u){return new nb({type:"default",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const ab=w("ZodPrefault",(l,u)=>{Rp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>J1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ub(l,u){return new ab({type:"prefault",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const jm=w("ZodNonOptional",(l,u)=>{Cp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>K1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ib(l,u){return new jm({type:"nonoptional",innerType:l,...k(u)})}const cb=w("ZodCatch",(l,u)=>{jp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>k1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeCatch=l.unwrap});function fb(l,u){return new cb({type:"catch",innerType:l,catchValue:typeof u=="function"?u:()=>u})}const rb=w("ZodPipe",(l,u)=>{xp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>W1(l,f,r,o),l.in=u.in,l.out=u.out});function tm(l,u){return new rb({type:"pipe",in:l,out:u})}const ob=w("ZodReadonly",(l,u)=>{Hp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>F1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function sb(l){return new ob({type:"readonly",innerType:l})}const db=w("ZodCustom",(l,u)=>{qp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>B1(l,f)});function hb(l,u={}){return D1(db,l,u)}function mb(l){return Z1(l)}L_({sessionARN:Ei(),hexColor:Ei()});const xm="sync:colorSettings";async function vb(){return await am.getItem(xm)}var yr=(l=>(l.getSessionARN="getSessionARN",l.changeColor="changeColor",l))(yr||{});const yb="*://*.signin.aws.amazon.com/*";function gb(){return["*://*.console.aws.amazon.com/*",yb]}function pb(l,u){return new RegExp(l.replaceAll("*",".*")).exec(u)!==null}const $a=-1,Hm="#161d26";function qm({index:l,hexColor:u,setIndex:f,setHexColor:r}){f(l),r(u)}async function Bm({colorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){qm({index:$a,hexColor:Hm,setIndex:u,setHexColor:r});const{success:o,data:d}=await Xm();o&&l.findIndex(({sessionARN:h})=>h===d)<0&&f(d)}async function Ym({setColorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){const o=await vb(),d=o!==null&&0pb(r,Ei().parse(u[0].url))).length?await Zh.tabs.sendMessage(H_().parse(u[0].id),l):void 0}async function Xm(){return Ei().safeParse(await Gm(yr.getSessionARN))}function Ti({colorSettings:l,index:u,setIndex:f,setHexColor:r}){qm({index:u,hexColor:l[u].hexColor,setIndex:f,setHexColor:r})}async function _b(l){const u=await Ym(l),{success:f,data:r}=await Xm();if(!f){0d===r);if(o<0){l.setSessionARN(r);return}Ti({...l,colorSettings:u,index:o})}async function bb({colorSettings:l,indexValue:u,getColorSettingsParams:f}){const r=Number.parseInt(u,10);r===$a?await Bm({...f,colorSettings:l}):-1(r===u.index&&(f.hexColor=l),f))})}function Eb(){const[l,u]=ce.useState([]),[f,r]=ce.useState($a),[o,d]=ce.useState(""),[h,v]=qg(Hm),p=T=>{v(lt.convert("hex",T))};ce.useEffect(()=>{_b({setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p})},[]);const y=f===$a;return Je.jsxs(Je.Fragment,{children:[Je.jsx("h1",{children:"AWS management console colorize"}),Je.jsxs("div",{className:"card rcp-fields-floor",children:[Je.jsxs("div",{id:"session-arn-field",className:"rcp-field",children:[Je.jsxs("select",{id:"session-arn-index",className:"rcp-field-input",value:f,onChange:async({target:{value:T}})=>{await bb({indexValue:T,colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p}})},children:[l.map(({sessionARN:T},M)=>Je.jsx("option",{value:M,children:T},M)),Je.jsx("option",{value:$a,children:"[New]"})]}),y&&Je.jsx("input",{className:"rcp-field-input",placeholder:"arn:aws:iam::012345678901:user/user_name",required:!0,value:o,onChange:({target:{value:T}})=>d(T)}),Je.jsx("label",{htmlFor:"session-arn-index",className:"rcp-field-label",children:"Session ARN"})]}),Je.jsx(Hg,{color:h,onChange:v}),y&&Je.jsx("button",{disabled:o==="",onClick:async()=>{await Sb({colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},hexColor:h.hex,sessionARN:o})},children:"Add"}),-1{await zb(h.hex,{colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Update"}),Je.jsx("button",{onClick:async()=>{await gr({colorSettings:l.filter((T,M)=>M!==f),getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Delete"})]})]})]})}zg.createRoot(document.getElementById("root")).render(Je.jsx(ye.StrictMode,{children:Je.jsx(Eb,{})})); diff --git a/dist/chrome-mv3/content-scripts/content.js b/dist/chrome-mv3/content-scripts/content.js index 0b483ee..f309029 100644 --- a/dist/chrome-mv3/content-scripts/content.js +++ b/dist/chrome-mv3/content-scripts/content.js @@ -1,6 +1,6 @@ -var content=(function(){"use strict";const H=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,te=H;function wi(e){return e}function u(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=s.prototype,p=Object.keys(l);for(let g=0;gn?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class K extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ce extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ae={};function x(e){return Ae}function je(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ve(e,t){return typeof t=="bigint"?t.toString():t}function we(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ye(e){return e==null}function ze(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Re=Symbol("evaluating");function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Re)return r===void 0&&(r=Re,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function M(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function D(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Ne(e){return JSON.stringify(e)}function At(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const De="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const jt=we(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Y(e){if(ne(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ne(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ue(e){return Y(e)?{...e}:Array.isArray(e)?[...e]:e}const Rt=new Set(["string","number","symbol"]);function re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function w(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Nt(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Dt(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return M(this,"shape",s),s},checks:[]});return U(e,i)}function Ut(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return M(this,"shape",s),s},checks:[]});return U(e,i)}function xt(e,t){if(!Y(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=D(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return M(this,"shape",i),i}});return U(e,o)}function Mt(e,t){if(!Y(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return M(this,"shape",r),r}});return U(e,n)}function Lt(e,t){const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return M(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return U(e,n)}function Ft(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=D(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return M(this,"shape",c),c},checks:[]});return U(t,s)}function Vt(e,t,n){const r=D(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return M(this,"shape",i),i}});return U(t,r)}function W(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function oe(e){return typeof e=="string"?e:e?.message}function L(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=oe(e.inst?._zod.def?.error?.(e))??oe(t?.error?.(e))??oe(n.customError?.(e))??oe(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function be(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function X(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Me=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ve,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Le=u("$ZodError",Me),Fe=u("$ZodError",Me,{Parent:Error});function Jt(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Kt(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new K;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>L(c,i,x())));throw De(a,o?.callee),a}return s.value},ke=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>L(c,i,x())));throw De(a,o?.callee),a}return s.value},se=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new K;return i.issues.length?{success:!1,error:new(e??Le)(i.issues.map(s=>L(s,o,x())))}:{success:!0,data:i.value}},Wt=se(Fe),ie=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>L(s,o,x())))}:{success:!0,data:i.value}},qt=ie(Fe),Bt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $e(e)(t,n,o)},Gt=e=>(t,n,r)=>$e(e)(t,n,r),Ht=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ke(e)(t,n,o)},Yt=e=>async(t,n,r)=>ke(e)(t,n,r),Xt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return se(e)(t,n,o)},Qt=e=>(t,n,r)=>se(e)(t,n,r),en=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ie(e)(t,n,o)},tn=e=>async(t,n,r)=>ie(e)(t,n,r),nn=/^[cC][^\s-]{8,}$/,rn=/^[0-9a-z]+$/,on=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sn=/^[0-9a-vA-V]{20}$/,an=/^[A-Za-z0-9]{27}$/,cn=/^[a-zA-Z0-9_-]{21}$/,un=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ln=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ve=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,dn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function hn(){return new RegExp(fn,"u")}const pn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,gn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,_n=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Je=/^[A-Za-z0-9_-]*$/,wn=/^\+[1-9]\d{6,14}$/,Ke="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",yn=new RegExp(`^${Ke}$`);function We(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zn(e){return new RegExp(`^${We(e)}$`)}function bn(e){const t=We({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Ke}T(?:${r})$`)}const $n=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},kn=/^[^A-Z]*$/,Sn=/^[^a-z]*$/,R=u("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),En=u("$ZodCheckMaxLength",(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ye(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const o=r.value;if(o.length<=t.maximum)return;const s=be(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zn=u("$ZodCheckMinLength",(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ye(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=be(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),On=u("$ZodCheckLengthEquals",(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ye(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=be(o),a=i>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ae=u("$ZodCheckStringFormat",(e,t)=>{var n,r;R.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),In=u("$ZodCheckRegex",(e,t)=>{ae.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tn=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=kn),ae.init(e,t)}),Pn=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Sn),ae.init(e,t)}),Cn=u("$ZodCheckIncludes",(e,t)=>{R.init(e,t);const n=re(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),An=u("$ZodCheckStartsWith",(e,t)=>{R.init(e,t);const n=new RegExp(`^${re(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),jn=u("$ZodCheckEndsWith",(e,t)=>{R.init(e,t);const n=new RegExp(`.*${re(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Rn=u("$ZodCheckOverwrite",(e,t)=>{R.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Nn{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` +var content=(function(){"use strict";const G=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,te=G;function yi(e){return e}function u(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=s.prototype,p=Object.keys(l);for(let g=0;gn?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class J extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ae extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const je={};function M(e){return je}function Re(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function we(e,t){return typeof t=="bigint"?t.toString():t}function ye(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ze(e){return e==null}function be(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Ne=Symbol("evaluating");function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ne)return r===void 0&&(r=Ne,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function L(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function D(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function De(e){return JSON.stringify(e)}function jt(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ue="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rt=ye(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function H(e){if(ne(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ne(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function xe(e){return H(e)?{...e}:Array.isArray(e)?[...e]:e}const Nt=new Set(["string","number","symbol"]);function re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function w(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Dt(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Ut(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return L(this,"shape",s),s},checks:[]});return U(e,i)}function xt(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return L(this,"shape",s),s},checks:[]});return U(e,i)}function Mt(e,t){if(!H(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=D(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return L(this,"shape",i),i}});return U(e,o)}function Lt(e,t){if(!H(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return L(this,"shape",r),r}});return U(e,n)}function Ft(e,t){const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return L(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return U(e,n)}function Vt(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=D(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return L(this,"shape",c),c},checks:[]});return U(t,s)}function Jt(e,t,n){const r=D(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return L(this,"shape",i),i}});return U(t,r)}function K(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function oe(e){return typeof e=="string"?e:e?.message}function F(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=oe(e.inst?._zod.def?.error?.(e))??oe(t?.error?.(e))??oe(n.customError?.(e))??oe(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function $e(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Y(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Le=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,we,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fe=u("$ZodError",Le),Ve=u("$ZodError",Le,{Parent:Error});function Kt(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Wt(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new J;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>F(c,i,M())));throw Ue(a,o?.callee),a}return s.value},Se=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>F(c,i,M())));throw Ue(a,o?.callee),a}return s.value},se=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new J;return i.issues.length?{success:!1,error:new(e??Fe)(i.issues.map(s=>F(s,o,M())))}:{success:!0,data:i.value}},qt=se(Ve),ie=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>F(s,o,M())))}:{success:!0,data:i.value}},Bt=ie(Ve),Gt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ke(e)(t,n,o)},Ht=e=>(t,n,r)=>ke(e)(t,n,r),Yt=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Se(e)(t,n,o)},Xt=e=>async(t,n,r)=>Se(e)(t,n,r),Qt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return se(e)(t,n,o)},en=e=>(t,n,r)=>se(e)(t,n,r),tn=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ie(e)(t,n,o)},nn=e=>async(t,n,r)=>ie(e)(t,n,r),rn=/^[cC][^\s-]{8,}$/,on=/^[0-9a-z]+$/,sn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,an=/^[0-9a-vA-V]{20}$/,cn=/^[A-Za-z0-9]{27}$/,un=/^[a-zA-Z0-9_-]{21}$/,ln=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Je=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,fn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pn(){return new RegExp(hn,"u")}const mn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_n=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,vn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ke=/^[A-Za-z0-9_-]*$/,yn=/^\+[1-9]\d{6,14}$/,We="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zn=new RegExp(`^${We}$`);function qe(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bn(e){return new RegExp(`^${qe(e)}$`)}function $n(e){const t=qe({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${We}T(?:${r})$`)}const kn=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Sn=/^[^A-Z]*$/,En=/^[^a-z]*$/,N=u("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Zn=u("$ZodCheckMaxLength",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const o=r.value;if(o.length<=t.maximum)return;const s=$e(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),On=u("$ZodCheckMinLength",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=$e(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),In=u("$ZodCheckLengthEquals",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=$e(o),a=i>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ae=u("$ZodCheckStringFormat",(e,t)=>{var n,r;N.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tn=u("$ZodCheckRegex",(e,t)=>{ae.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Pn=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Sn),ae.init(e,t)}),Cn=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=En),ae.init(e,t)}),An=u("$ZodCheckIncludes",(e,t)=>{N.init(e,t);const n=re(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),jn=u("$ZodCheckStartsWith",(e,t)=>{N.init(e,t);const n=new RegExp(`^${re(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Rn=u("$ZodCheckEndsWith",(e,t)=>{N.init(e,t);const n=new RegExp(`.*${re(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Nn=u("$ZodCheckOverwrite",(e,t)=>{N.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Dn{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` `).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(` -`))}}const Dn={major:4,minor:3,patch:6},O=u("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dn;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,c)=>{let l=W(s),p;for(const g of a){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(l)continue;const _=s.issues.length,y=g._zod.check(s);if(y instanceof Promise&&c?.async===!1)throw new K;if(p||y instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await y,s.issues.length!==_&&(l||(l=W(s,_)))});else{if(s.issues.length===_)continue;l||(l=W(s,_))}}return p?p.then(()=>s):s},i=(s,a,c)=>{if(W(s))return s.aborted=!0,s;const l=o(a,r,c);if(l instanceof Promise){if(c.async===!1)throw new K;return l.then(p=>e._zod.parse(p,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(p=>i(p,s,a)):i(l,s,a)}const c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new K;return c.then(l=>o(l,r,a))}return o(c,r,a)}}k(e,"~standard",()=>({validate:o=>{try{const i=Wt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return qt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Se=u("$ZodString",(e,t)=>{O.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$n(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),S=u("$ZodStringFormat",(e,t)=>{ae.init(e,t),Se.init(e,t)}),Un=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ln),S.init(e,t)}),xn=u("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ve(r))}else t.pattern??(t.pattern=Ve());S.init(e,t)}),Mn=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dn),S.init(e,t)}),Ln=u("$ZodURL",(e,t)=>{S.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Fn=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=hn()),S.init(e,t)}),Vn=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cn),S.init(e,t)}),Jn=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=nn),S.init(e,t)}),Kn=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rn),S.init(e,t)}),Wn=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=on),S.init(e,t)}),qn=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sn),S.init(e,t)}),Bn=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=an),S.init(e,t)}),Gn=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=bn(t)),S.init(e,t)}),Hn=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=yn),S.init(e,t)}),Yn=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=zn(t)),S.init(e,t)}),Xn=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=un),S.init(e,t)}),Qn=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pn),S.init(e,t),e._zod.bag.format="ipv4"}),er=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mn),S.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),tr=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=gn),S.init(e,t)}),nr=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=_n),S.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function qe(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const rr=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=vn),S.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{qe(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function or(e){if(!Je.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return qe(n)}const sr=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Je),S.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{or(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ir=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=wn),S.init(e,t)});function ar(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const cr=u("$ZodJWT",(e,t)=>{S.init(e,t),e._zod.check=n=>{ar(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),ur=u("$ZodUnknown",(e,t)=>{O.init(e,t),e._zod.parse=n=>n}),lr=u("$ZodNever",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Be(e,t,n){e.issues.length&&t.issues.push(...xe(n,e.issues)),t.value[n]=e.value}const dr=u("$ZodArray",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;sBe(l,n,s))):Be(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function ce(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...xe(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Ge(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Nt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function He(e,t,n,r,o,i){const s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optout==="optional";for(const g in t){if(a.has(g))continue;if(l==="never"){s.push(g);continue}const _=c.run({value:t[g],issues:[]},r);_ instanceof Promise?e.push(_.then(y=>ce(y,n,g,t,p))):ce(_,n,g,t,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const fr=u("$ZodObject",(e,t)=>{if(O.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=we(()=>Ge(t));k(e._zod,"propValues",()=>{const a=t.shape,c={};for(const l in a){const p=a[l]._zod;if(p.values){c[l]??(c[l]=new Set);for(const g of p.values)c[l].add(g)}}return c});const o=ne,i=t.catchall;let s;e._zod.parse=(a,c)=>{s??(s=r.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const p=[],g=s.shape;for(const _ of s.keys){const y=g[_],d=y._zod.optout==="optional",h=y._zod.run({value:l[_],issues:[]},c);h instanceof Promise?p.push(h.then(f=>ce(f,a,_,l,d))):ce(h,a,_,l,d)}return i?He(p,l,a,c,r.value,e):p.length?Promise.all(p).then(()=>a):a}}),hr=u("$ZodObjectJIT",(e,t)=>{fr.init(e,t);const n=e._zod.parse,r=we(()=>Ge(t)),o=_=>{const y=new Nn(["shape","payload","ctx"]),d=r.value,h=z=>{const b=Ne(z);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};y.write("const input = payload.value;");const f=Object.create(null);let m=0;for(const z of d.keys)f[z]=`key_${m++}`;y.write("const newResult = {};");for(const z of d.keys){const b=f[z],$=Ne(z),Z=_[z]?._zod?.optout==="optional";y.write(`const ${b} = ${h(z)};`),Z?y.write(` +`))}}const Un={major:4,minor:3,patch:6},Z=u("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Un;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,c)=>{let l=K(s),p;for(const g of a){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(l)continue;const v=s.issues.length,y=g._zod.check(s);if(y instanceof Promise&&c?.async===!1)throw new J;if(p||y instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await y,s.issues.length!==v&&(l||(l=K(s,v)))});else{if(s.issues.length===v)continue;l||(l=K(s,v))}}return p?p.then(()=>s):s},i=(s,a,c)=>{if(K(s))return s.aborted=!0,s;const l=o(a,r,c);if(l instanceof Promise){if(c.async===!1)throw new J;return l.then(p=>e._zod.parse(p,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(p=>i(p,s,a)):i(l,s,a)}const c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new J;return c.then(l=>o(l,r,a))}return o(c,r,a)}}k(e,"~standard",()=>({validate:o=>{try{const i=qt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Bt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Ee=u("$ZodString",(e,t)=>{Z.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??kn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),S=u("$ZodStringFormat",(e,t)=>{ae.init(e,t),Ee.init(e,t)}),xn=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=dn),S.init(e,t)}),Mn=u("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Je(r))}else t.pattern??(t.pattern=Je());S.init(e,t)}),Ln=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=fn),S.init(e,t)}),Fn=u("$ZodURL",(e,t)=>{S.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Vn=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pn()),S.init(e,t)}),Jn=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=un),S.init(e,t)}),Kn=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rn),S.init(e,t)}),Wn=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=on),S.init(e,t)}),qn=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=sn),S.init(e,t)}),Bn=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=an),S.init(e,t)}),Gn=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=cn),S.init(e,t)}),Hn=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=$n(t)),S.init(e,t)}),Yn=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zn),S.init(e,t)}),Xn=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bn(t)),S.init(e,t)}),Qn=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ln),S.init(e,t)}),er=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mn),S.init(e,t),e._zod.bag.format="ipv4"}),tr=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=gn),S.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),nr=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_n),S.init(e,t)}),rr=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vn),S.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Be(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const or=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=wn),S.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Be(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function sr(e){if(!Ke.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Be(n)}const ir=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ke),S.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{sr(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ar=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=yn),S.init(e,t)});function cr(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const ur=u("$ZodJWT",(e,t)=>{S.init(e,t),e._zod.check=n=>{cr(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),lr=u("$ZodUnknown",(e,t)=>{Z.init(e,t),e._zod.parse=n=>n}),dr=u("$ZodNever",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ge(e,t,n){e.issues.length&&t.issues.push(...Me(n,e.issues)),t.value[n]=e.value}const fr=u("$ZodArray",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;sGe(l,n,s))):Ge(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function ce(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Me(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function He(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Dt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ye(e,t,n,r,o,i){const s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optout==="optional";for(const g in t){if(a.has(g))continue;if(l==="never"){s.push(g);continue}const v=c.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(y=>ce(y,n,g,t,p))):ce(v,n,g,t,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const hr=u("$ZodObject",(e,t)=>{if(Z.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=ye(()=>He(t));k(e._zod,"propValues",()=>{const a=t.shape,c={};for(const l in a){const p=a[l]._zod;if(p.values){c[l]??(c[l]=new Set);for(const g of p.values)c[l].add(g)}}return c});const o=ne,i=t.catchall;let s;e._zod.parse=(a,c)=>{s??(s=r.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const p=[],g=s.shape;for(const v of s.keys){const y=g[v],f=y._zod.optout==="optional",h=y._zod.run({value:l[v],issues:[]},c);h instanceof Promise?p.push(h.then(d=>ce(d,a,v,l,f))):ce(h,a,v,l,f)}return i?Ye(p,l,a,c,r.value,e):p.length?Promise.all(p).then(()=>a):a}}),pr=u("$ZodObjectJIT",(e,t)=>{hr.init(e,t);const n=e._zod.parse,r=ye(()=>He(t)),o=v=>{const y=new Dn(["shape","payload","ctx"]),f=r.value,h=z=>{const b=De(z);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};y.write("const input = payload.value;");const d=Object.create(null);let m=0;for(const z of f.keys)d[z]=`key_${m++}`;y.write("const newResult = {};");for(const z of f.keys){const b=d[z],$=De(z),C=v[z]?._zod?.optout==="optional";y.write(`const ${b} = ${h(z)};`),C?y.write(` if (${b}.issues.length) { if (${$} in input) { payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ @@ -34,11 +34,11 @@ var content=(function(){"use strict";const H=globalThis.browser?.runtime?.id?glo newResult[${$}] = ${b}.value; } - `)}y.write("payload.value = newResult;"),y.write("return payload;");const v=y.compile();return(z,b)=>v(_,z,b)};let i;const s=ne,a=!Ae.jitless,l=a&&jt.value,p=t.catchall;let g;e._zod.parse=(_,y)=>{g??(g=r.value);const d=_.value;return s(d)?a&&l&&y?.async===!1&&y.jitless!==!0?(i||(i=o(t.shape)),_=i(_,y),p?He([],d,_,y,g,e):_):n(_,y):(_.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),_)}});function Ye(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!W(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>L(s,r,x())))}),t)}const pr=u("$ZodUnion",(e,t)=>{O.init(e,t),k(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),k(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),k(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),k(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>ze(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>Ye(c,o,e,i)):Ye(a,o,e,i)}}),mr=u("$ZodIntersection",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>Xe(n,c,l)):Xe(n,i,s)}});function Ee(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Y(e)&&Y(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=Ee(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;ra.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),W(e))return e;const s=Ee(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const gr=u("$ZodEnum",(e,t)=>{O.init(e,t);const n=je(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Rt.has(typeof o)).map(o=>typeof o=="string"?re(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),_r=u("$ZodTransform",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ce(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new K;return n.value=o,n}});function Qe(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const et=u("$ZodOptional",(e,t)=>{O.init(e,t),e._zod.optin="optional",e._zod.optout="optional",k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ze(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Qe(i,n.value)):Qe(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),vr=u("$ZodExactOptional",(e,t)=>{et.init(e,t),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),wr=u("$ZodNullable",(e,t)=>{O.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ze(n.source)}|null)$`):void 0}),k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),yr=u("$ZodDefault",(e,t)=>{O.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>tt(i,t)):tt(o,t)}});function tt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const zr=u("$ZodPrefault",(e,t)=>{O.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),br=u("$ZodNonOptional",(e,t)=>{O.init(e,t),k(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>nt(i,e)):nt(o,e)}});function nt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const $r=u("$ZodCatch",(e,t)=>{O.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>L(s,r,x()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>L(i,r,x()))},input:n.value}),n.issues=[]),n)}}),kr=u("$ZodPipe",(e,t)=>{O.init(e,t),k(e._zod,"values",()=>t.in._zod.values),k(e._zod,"optin",()=>t.in._zod.optin),k(e._zod,"optout",()=>t.out._zod.optout),k(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>ue(s,t.in,r)):ue(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>ue(i,t.out,r)):ue(o,t.out,r)}});function ue(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Sr=u("$ZodReadonly",(e,t)=>{O.init(e,t),k(e._zod,"propValues",()=>t.innerType._zod.propValues),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"optin",()=>t.innerType?._zod?.optin),k(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(rt):rt(o)}});function rt(e){return e.value=Object.freeze(e.value),e}const Er=u("$ZodCustom",(e,t)=>{R.init(e,t),O.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>ot(i,n,r,e));ot(o,n,r,e)}});function ot(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(X(o))}}var st;class Zr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Or(){return new Zr}(st=globalThis).__zod_globalRegistry??(st.__zod_globalRegistry=Or());const Q=globalThis.__zod_globalRegistry;function Ir(e,t){return new e({type:"string",...w(t)})}function Tr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...w(t)})}function it(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...w(t)})}function Pr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...w(t)})}function Cr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(t)})}function jr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(t)})}function Rr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...w(t)})}function Nr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...w(t)})}function Dr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(t)})}function Ur(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...w(t)})}function xr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(t)})}function Mr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...w(t)})}function Lr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...w(t)})}function Fr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(t)})}function Vr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(t)})}function Jr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(t)})}function Kr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(t)})}function Wr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(t)})}function qr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...w(t)})}function Br(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...w(t)})}function Gr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...w(t)})}function Hr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...w(t)})}function Yr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(t)})}function Xr(e,t){return new e({type:"string",format:"date",check:"string_format",...w(t)})}function Qr(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...w(t)})}function eo(e,t){return new e({type:"string",format:"duration",check:"string_format",...w(t)})}function to(e){return new e({type:"unknown"})}function no(e,t){return new e({type:"never",...w(t)})}function at(e,t){return new En({check:"max_length",...w(t),maximum:e})}function le(e,t){return new Zn({check:"min_length",...w(t),minimum:e})}function ct(e,t){return new On({check:"length_equals",...w(t),length:e})}function ro(e,t){return new In({check:"string_format",format:"regex",...w(t),pattern:e})}function oo(e){return new Tn({check:"string_format",format:"lowercase",...w(e)})}function so(e){return new Pn({check:"string_format",format:"uppercase",...w(e)})}function io(e,t){return new Cn({check:"string_format",format:"includes",...w(t),includes:e})}function ao(e,t){return new An({check:"string_format",format:"starts_with",...w(t),prefix:e})}function co(e,t){return new jn({check:"string_format",format:"ends_with",...w(t),suffix:e})}function q(e){return new Rn({check:"overwrite",tx:e})}function uo(e){return q(t=>t.normalize(e))}function lo(){return q(e=>e.trim())}function fo(){return q(e=>e.toLowerCase())}function ho(){return q(e=>e.toUpperCase())}function po(){return q(e=>At(e))}function mo(e,t,n){return new e({type:"array",element:t,...w(n)})}function go(e,t,n){return new e({type:"custom",check:"custom",fn:t,...w(n)})}function _o(e){const t=vo(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(X(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(X(o))}},e(n.value,n)));return t}function vo(e,t){const n=new R({check:"custom",...w(t)});return n._zod.check=e,n}function ut(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Q,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function P(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,p);else{const _=s.schema,y=t.processors[o.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);y(e,t,_,p)}const g=e._zod.parent;g&&(s.ref||(s.ref=g),P(g,t,p),t.seen.get(g).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&C(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function lt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=r.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(s[0])?.id,_=e.external.uri??(d=>d);if(g)return{ref:_(g)};const y=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=y,{defId:y,ref:`${_("__shared")}#/${a}/${y}`}}if(s[1]===n)return{ref:"#"};const l=`#/${a}/`,p=s[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+p}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);const p=a.schema;for(const g in p)delete p[g];p.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/ + `)}y.write("payload.value = newResult;"),y.write("return payload;");const _=y.compile();return(z,b)=>_(v,z,b)};let i;const s=ne,a=!je.jitless,l=a&&Rt.value,p=t.catchall;let g;e._zod.parse=(v,y)=>{g??(g=r.value);const f=v.value;return s(f)?a&&l&&y?.async===!1&&y.jitless!==!0?(i||(i=o(t.shape)),v=i(v,y),p?Ye([],f,v,y,g,e):v):n(v,y):(v.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),v)}});function Xe(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!K(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>F(s,r,M())))}),t)}const mr=u("$ZodUnion",(e,t)=>{Z.init(e,t),k(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),k(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),k(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),k(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>be(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>Xe(c,o,e,i)):Xe(a,o,e,i)}}),gr=u("$ZodIntersection",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>Qe(n,c,l)):Qe(n,i,s)}});function Ze(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(H(e)&&H(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=Ze(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;ra.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),K(e))return e;const s=Ze(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const _r=u("$ZodEnum",(e,t)=>{Z.init(e,t);const n=Re(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Nt.has(typeof o)).map(o=>typeof o=="string"?re(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),vr=u("$ZodTransform",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ae(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new J;return n.value=o,n}});function et(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const tt=u("$ZodOptional",(e,t)=>{Z.init(e,t),e._zod.optin="optional",e._zod.optout="optional",k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>et(i,n.value)):et(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),wr=u("$ZodExactOptional",(e,t)=>{tt.init(e,t),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),yr=u("$ZodNullable",(e,t)=>{Z.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)}|null)$`):void 0}),k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),zr=u("$ZodDefault",(e,t)=>{Z.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>nt(i,t)):nt(o,t)}});function nt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const br=u("$ZodPrefault",(e,t)=>{Z.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),$r=u("$ZodNonOptional",(e,t)=>{Z.init(e,t),k(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>rt(i,e)):rt(o,e)}});function rt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const kr=u("$ZodCatch",(e,t)=>{Z.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>F(s,r,M()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>F(i,r,M()))},input:n.value}),n.issues=[]),n)}}),Sr=u("$ZodPipe",(e,t)=>{Z.init(e,t),k(e._zod,"values",()=>t.in._zod.values),k(e._zod,"optin",()=>t.in._zod.optin),k(e._zod,"optout",()=>t.out._zod.optout),k(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>ue(s,t.in,r)):ue(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>ue(i,t.out,r)):ue(o,t.out,r)}});function ue(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Er=u("$ZodReadonly",(e,t)=>{Z.init(e,t),k(e._zod,"propValues",()=>t.innerType._zod.propValues),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"optin",()=>t.innerType?._zod?.optin),k(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(ot):ot(o)}});function ot(e){return e.value=Object.freeze(e.value),e}const Zr=u("$ZodCustom",(e,t)=>{N.init(e,t),Z.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>st(i,n,r,e));st(o,n,r,e)}});function st(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Y(o))}}var it;class Or{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ir(){return new Or}(it=globalThis).__zod_globalRegistry??(it.__zod_globalRegistry=Ir());const X=globalThis.__zod_globalRegistry;function Tr(e,t){return new e({type:"string",...w(t)})}function Pr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...w(t)})}function at(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...w(t)})}function Cr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...w(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(t)})}function jr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(t)})}function Rr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(t)})}function Nr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...w(t)})}function Dr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...w(t)})}function Ur(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(t)})}function xr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...w(t)})}function Mr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(t)})}function Lr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...w(t)})}function Fr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...w(t)})}function Vr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(t)})}function Jr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(t)})}function Kr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(t)})}function Wr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(t)})}function qr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(t)})}function Br(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...w(t)})}function Gr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...w(t)})}function Hr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...w(t)})}function Yr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...w(t)})}function Xr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(t)})}function Qr(e,t){return new e({type:"string",format:"date",check:"string_format",...w(t)})}function eo(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...w(t)})}function to(e,t){return new e({type:"string",format:"duration",check:"string_format",...w(t)})}function no(e){return new e({type:"unknown"})}function ro(e,t){return new e({type:"never",...w(t)})}function ct(e,t){return new Zn({check:"max_length",...w(t),maximum:e})}function le(e,t){return new On({check:"min_length",...w(t),minimum:e})}function ut(e,t){return new In({check:"length_equals",...w(t),length:e})}function oo(e,t){return new Tn({check:"string_format",format:"regex",...w(t),pattern:e})}function so(e){return new Pn({check:"string_format",format:"lowercase",...w(e)})}function io(e){return new Cn({check:"string_format",format:"uppercase",...w(e)})}function ao(e,t){return new An({check:"string_format",format:"includes",...w(t),includes:e})}function co(e,t){return new jn({check:"string_format",format:"starts_with",...w(t),prefix:e})}function uo(e,t){return new Rn({check:"string_format",format:"ends_with",...w(t),suffix:e})}function W(e){return new Nn({check:"overwrite",tx:e})}function lo(e){return W(t=>t.normalize(e))}function fo(){return W(e=>e.trim())}function ho(){return W(e=>e.toLowerCase())}function po(){return W(e=>e.toUpperCase())}function mo(){return W(e=>jt(e))}function go(e,t,n){return new e({type:"array",element:t,...w(n)})}function _o(e,t,n){return new e({type:"custom",check:"custom",fn:t,...w(n)})}function vo(e){const t=wo(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Y(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Y(o))}},e(n.value,n)));return t}function wo(e,t){const n=new N({check:"custom",...w(t)});return n._zod.check=e,n}function lt(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??X,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function T(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,p);else{const v=s.schema,y=t.processors[o.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);y(e,t,v,p)}const g=e._zod.parent;g&&(s.ref||(s.ref=g),T(g,t,p),t.seen.get(g).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&P(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function dt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=r.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(s[0])?.id,v=e.external.uri??(f=>f);if(g)return{ref:v(g)};const y=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=y,{defId:y,ref:`${v("__shared")}#/${a}/${y}`}}if(s[1]===n)return{ref:"#"};const l=`#/${a}/`,p=s[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+p}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);const p=a.schema;for(const g in p)delete p[g];p.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function dt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const a=e.seen.get(s);if(a.ref===null)return;const c=a.def??a.schema,l={...c},p=a.ref;if(a.ref=null,p){r(p);const _=e.seen.get(p),y=_.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,l),s._zod.parent===p)for(const h in c)h==="$ref"||h==="allOf"||h in l||delete c[h];if(y.$ref&&_.def)for(const h in c)h==="$ref"||h==="allOf"||h in _.def&&JSON.stringify(c[h])===JSON.stringify(_.def[h])&&delete c[h]}const g=s._zod.parent;if(g&&g!==p){r(g);const _=e.seen.get(g);if(_?.schema.$ref&&(c.$ref=_.schema.$ref,_.def))for(const y in c)y==="$ref"||y==="allOf"||y in _.def&&JSON.stringify(c[y])===JSON.stringify(_.def[y])&&delete c[y]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:de(t,"input",e.processors),output:de(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function C(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return C(r.element,n);if(r.type==="set")return C(r.valueType,n);if(r.type==="lazy")return C(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return C(r.innerType,n);if(r.type==="intersection")return C(r.left,n)||C(r.right,n);if(r.type==="record"||r.type==="map")return C(r.keyType,n)||C(r.valueType,n);if(r.type==="pipe")return C(r.in,n)||C(r.out,n);if(r.type==="object"){for(const o in r.shape)if(C(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(C(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(C(o,n))return!0;return!!(r.rest&&C(r.rest,n))}return!1}const wo=(e,t={})=>n=>{const r=ut({...n,processors:t});return P(e,r),lt(r,e),dt(r,e)},de=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=ut({...o??{},target:i,io:t,processors:n});return P(e,s),lt(s,e),dt(s,e)},yo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},zo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=yo[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const p=[...c];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},bo=(e,t,n,r)=>{n.not={}},$o=(e,t,n,r)=>{},ko=(e,t,n,r)=>{const o=e._zod.def,i=je(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},So=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Eo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Zo=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=P(i.element,t,{...r,path:[...r.path,"items"]})},Oo=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const l in s)o.properties[l]=P(s[l],t,{...r,path:[...r.path,"properties",l]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{const p=i.shape[l]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=P(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Io=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>P(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},To=(e,t,n,r)=>{const o=e._zod.def,i=P(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=P(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},Po=(e,t,n,r)=>{const o=e._zod.def,i=P(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Co=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Ao=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},jo=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Ro=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},No=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;P(i,t,r);const s=t.seen.get(e);s.ref=i},Do=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},ft=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Uo=u("ZodISODateTime",(e,t)=>{Gn.init(e,t),E.init(e,t)});function xo(e){return Yr(Uo,e)}const Mo=u("ZodISODate",(e,t)=>{Hn.init(e,t),E.init(e,t)});function Lo(e){return Xr(Mo,e)}const Fo=u("ZodISOTime",(e,t)=>{Yn.init(e,t),E.init(e,t)});function Vo(e){return Qr(Fo,e)}const Jo=u("ZodISODuration",(e,t)=>{Xn.init(e,t),E.init(e,t)});function Ko(e){return eo(Jo,e)}const A=u("ZodError",(e,t)=>{Le.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Kt(e,n)},flatten:{value:n=>Jt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ve,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ve,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Wo=$e(A),qo=ke(A),Bo=se(A),Go=ie(A),Ho=Bt(A),Yo=Gt(A),Xo=Ht(A),Qo=Yt(A),es=Xt(A),ts=Qt(A),ns=en(A),rs=tn(A),I=u("ZodType",(e,t)=>(O.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:de(e,"input"),output:de(e,"output")}}),e.toJSONSchema=wo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(D(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>U(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Wo(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Bo(e,n,r),e.parseAsync=async(n,r)=>qo(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Go(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Ho(e,n,r),e.decode=(n,r)=>Yo(e,n,r),e.encodeAsync=async(n,r)=>Xo(e,n,r),e.decodeAsync=async(n,r)=>Qo(e,n,r),e.safeEncode=(n,r)=>es(e,n,r),e.safeDecode=(n,r)=>ts(e,n,r),e.safeEncodeAsync=async(n,r)=>ns(e,n,r),e.safeDecodeAsync=async(n,r)=>rs(e,n,r),e.refine=(n,r)=>e.check(Gs(n,r)),e.superRefine=n=>e.check(Hs(n)),e.overwrite=n=>e.check(q(n)),e.optional=()=>vt(e),e.exactOptional=()=>Ns(e),e.nullable=()=>wt(e),e.nullish=()=>vt(wt(e)),e.nonoptional=n=>Fs(e,n),e.array=()=>Es(e),e.or=n=>Is([e,n]),e.and=n=>Ps(e,n),e.transform=n=>zt(e,js(n)),e.default=n=>xs(e,n),e.prefault=n=>Ls(e,n),e.catch=n=>Js(e,n),e.pipe=n=>zt(e,n),e.readonly=()=>qs(e),e.describe=n=>{const r=e.clone();return Q.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Q.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Q.get(e);const r=e.clone();return Q.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),ht=u("_ZodString",(e,t)=>{Se.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,i)=>zo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(ro(...r)),e.includes=(...r)=>e.check(io(...r)),e.startsWith=(...r)=>e.check(ao(...r)),e.endsWith=(...r)=>e.check(co(...r)),e.min=(...r)=>e.check(le(...r)),e.max=(...r)=>e.check(at(...r)),e.length=(...r)=>e.check(ct(...r)),e.nonempty=(...r)=>e.check(le(1,...r)),e.lowercase=r=>e.check(oo(r)),e.uppercase=r=>e.check(so(r)),e.trim=()=>e.check(lo()),e.normalize=(...r)=>e.check(uo(...r)),e.toLowerCase=()=>e.check(fo()),e.toUpperCase=()=>e.check(ho()),e.slugify=()=>e.check(po())}),os=u("ZodString",(e,t)=>{Se.init(e,t),ht.init(e,t),e.email=n=>e.check(Tr(ss,n)),e.url=n=>e.check(Rr(is,n)),e.jwt=n=>e.check(Hr(zs,n)),e.emoji=n=>e.check(Nr(as,n)),e.guid=n=>e.check(it(pt,n)),e.uuid=n=>e.check(Pr(fe,n)),e.uuidv4=n=>e.check(Cr(fe,n)),e.uuidv6=n=>e.check(Ar(fe,n)),e.uuidv7=n=>e.check(jr(fe,n)),e.nanoid=n=>e.check(Dr(cs,n)),e.guid=n=>e.check(it(pt,n)),e.cuid=n=>e.check(Ur(us,n)),e.cuid2=n=>e.check(xr(ls,n)),e.ulid=n=>e.check(Mr(ds,n)),e.base64=n=>e.check(qr(vs,n)),e.base64url=n=>e.check(Br(ws,n)),e.xid=n=>e.check(Lr(fs,n)),e.ksuid=n=>e.check(Fr(hs,n)),e.ipv4=n=>e.check(Vr(ps,n)),e.ipv6=n=>e.check(Jr(ms,n)),e.cidrv4=n=>e.check(Kr(gs,n)),e.cidrv6=n=>e.check(Wr(_s,n)),e.e164=n=>e.check(Gr(ys,n)),e.datetime=n=>e.check(xo(n)),e.date=n=>e.check(Lo(n)),e.time=n=>e.check(Vo(n)),e.duration=n=>e.check(Ko(n))});function Ze(e){return Ir(os,e)}const E=u("ZodStringFormat",(e,t)=>{S.init(e,t),ht.init(e,t)}),ss=u("ZodEmail",(e,t)=>{Mn.init(e,t),E.init(e,t)}),pt=u("ZodGUID",(e,t)=>{Un.init(e,t),E.init(e,t)}),fe=u("ZodUUID",(e,t)=>{xn.init(e,t),E.init(e,t)}),is=u("ZodURL",(e,t)=>{Ln.init(e,t),E.init(e,t)}),as=u("ZodEmoji",(e,t)=>{Fn.init(e,t),E.init(e,t)}),cs=u("ZodNanoID",(e,t)=>{Vn.init(e,t),E.init(e,t)}),us=u("ZodCUID",(e,t)=>{Jn.init(e,t),E.init(e,t)}),ls=u("ZodCUID2",(e,t)=>{Kn.init(e,t),E.init(e,t)}),ds=u("ZodULID",(e,t)=>{Wn.init(e,t),E.init(e,t)}),fs=u("ZodXID",(e,t)=>{qn.init(e,t),E.init(e,t)}),hs=u("ZodKSUID",(e,t)=>{Bn.init(e,t),E.init(e,t)}),ps=u("ZodIPv4",(e,t)=>{Qn.init(e,t),E.init(e,t)}),ms=u("ZodIPv6",(e,t)=>{er.init(e,t),E.init(e,t)}),gs=u("ZodCIDRv4",(e,t)=>{tr.init(e,t),E.init(e,t)}),_s=u("ZodCIDRv6",(e,t)=>{nr.init(e,t),E.init(e,t)}),vs=u("ZodBase64",(e,t)=>{rr.init(e,t),E.init(e,t)}),ws=u("ZodBase64URL",(e,t)=>{sr.init(e,t),E.init(e,t)}),ys=u("ZodE164",(e,t)=>{ir.init(e,t),E.init(e,t)}),zs=u("ZodJWT",(e,t)=>{cr.init(e,t),E.init(e,t)}),bs=u("ZodUnknown",(e,t)=>{ur.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$o()});function mt(){return to(bs)}const $s=u("ZodNever",(e,t)=>{lr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bo(e,n,r)});function ks(e){return no($s,e)}const Ss=u("ZodArray",(e,t)=>{dr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zo(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(le(n,r)),e.nonempty=n=>e.check(le(1,n)),e.max=(n,r)=>e.check(at(n,r)),e.length=(n,r)=>e.check(ct(n,r)),e.unwrap=()=>e.element});function Es(e,t){return mo(Ss,e,t)}const Zs=u("ZodObject",(e,t)=>{hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Oo(e,n,r,o),k(e,"shape",()=>t.shape),e.keyof=()=>Cs(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mt()}),e.loose=()=>e.clone({...e._zod.def,catchall:mt()}),e.strict=()=>e.clone({...e._zod.def,catchall:ks()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>xt(e,n),e.safeExtend=n=>Mt(e,n),e.merge=n=>Lt(e,n),e.pick=n=>Dt(e,n),e.omit=n=>Ut(e,n),e.partial=(...n)=>Ft(_t,e,n[0]),e.required=(...n)=>Vt(yt,e,n[0])});function gt(e,t){const n={type:"object",shape:e??{},...w(t)};return new Zs(n)}const Os=u("ZodUnion",(e,t)=>{pr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Io(e,n,r,o),e.options=t.options});function Is(e,t){return new Os({type:"union",options:e,...w(t)})}const Ts=u("ZodIntersection",(e,t)=>{mr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>To(e,n,r,o)});function Ps(e,t){return new Ts({type:"intersection",left:e,right:t})}const Oe=u("ZodEnum",(e,t)=>{gr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,i)=>ko(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Oe({...t,checks:[],...w(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Oe({...t,checks:[],...w(o),entries:i})}});function Cs(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Oe({type:"enum",entries:n,...w(t)})}const As=u("ZodTransform",(e,t)=>{_r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ce(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(X(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(X(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function js(e){return new As({type:"transform",transform:e})}const _t=u("ZodOptional",(e,t)=>{et.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ft(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function vt(e){return new _t({type:"optional",innerType:e})}const Rs=u("ZodExactOptional",(e,t)=>{vr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ft(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ns(e){return new Rs({type:"optional",innerType:e})}const Ds=u("ZodNullable",(e,t)=>{wr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Po(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wt(e){return new Ds({type:"nullable",innerType:e})}const Us=u("ZodDefault",(e,t)=>{yr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ao(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xs(e,t){return new Us({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue(t)}})}const Ms=u("ZodPrefault",(e,t)=>{zr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ls(e,t){return new Ms({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue(t)}})}const yt=u("ZodNonOptional",(e,t)=>{br.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Co(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Fs(e,t){return new yt({type:"nonoptional",innerType:e,...w(t)})}const Vs=u("ZodCatch",(e,t)=>{$r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ro(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Js(e,t){return new Vs({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ks=u("ZodPipe",(e,t)=>{kr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>No(e,n,r,o),e.in=t.in,e.out=t.out});function zt(e,t){return new Ks({type:"pipe",in:e,out:t})}const Ws=u("ZodReadonly",(e,t)=>{Sr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Do(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function qs(e){return new Ws({type:"readonly",innerType:e})}const Bs=u("ZodCustom",(e,t)=>{Er.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>So(e,n)});function Gs(e,t={}){return go(Bs,e,t)}function Hs(e){return _o(e)}var bt=Object.prototype.hasOwnProperty;function Ie(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ie(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(bt.call(e,n)&&++r&&!bt.call(t,n)||!(n in t)||!Ie(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Ys=new Error("request for lock canceled");var Xs=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class Qs{constructor(t,n=Ys){this._value=t,this._cancelError=n,this._queue=[],this._weightedWaiters=[]}acquire(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((r,o)=>{const i={resolve:r,reject:o,weight:t,priority:n},s=$t(this._queue,a=>n<=a.priority);s===-1&&t<=this._value?this._dispatchItem(i):this._queue.splice(s+1,0,i)})}runExclusive(t){return Xs(this,arguments,void 0,function*(n,r=1,o=0){const[i,s]=yield this.acquire(r,o);try{return yield n(i)}finally{s()}})}waitForUnlock(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,n)?Promise.resolve():new Promise(r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),ei(this._weightedWaiters[t-1],{resolve:r,priority:n})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach(t=>t.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){const n=this._value;this._value-=t.weight,t.resolve([n,this._newReleaser(t.weight)])}_newReleaser(t){let n=!1;return()=>{n||(n=!0,this.release(t))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let t=this._value;t>0;t--){const n=this._weightedWaiters[t-1];n&&(n.forEach(r=>r.resolve()),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let n=this._value;n>0;n--){const r=this._weightedWaiters[n-1];if(!r)continue;const o=r.findIndex(i=>i.priority<=t);(o===-1?r:r.splice(0,o)).forEach((i=>i.resolve()))}}}_couldLockImmediately(t,n){return(this._queue.length===0||this._queue[0].priorityt.priority<=r.priority);e.splice(n+1,0,t)}function $t(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}var ti=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class ni{constructor(t){this._semaphore=new Qs(1,t)}acquire(){return ti(this,arguments,void 0,function*(t=0){const[,n]=yield this._semaphore.acquire(1,t);return n})}runExclusive(t,n=0){return this._semaphore.runExclusive(()=>t(),1,n)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const ri=oi();function oi(){const e={local:he("local"),session:he("session"),sync:he("sync"),managed:he("managed")},t=d=>{const h=e[d];if(h==null){const f=Object.keys(e).join(", ");throw Error(`Invalid area "${d}". Options: ${f}`)}return h},n=d=>{const h=d.indexOf(":"),f=d.substring(0,h),m=d.substring(h+1);if(m==null)throw Error(`Storage key should be in the form of "area:key", but received "${d}"`);return{driverArea:f,driverKey:m,driver:t(f)}},r=d=>d+"$",o=(d,h)=>{const f={...d};return Object.entries(h).forEach(([m,v])=>{v==null?delete f[m]:f[m]=v}),f},i=(d,h)=>d??h??null,s=d=>typeof d=="object"&&!Array.isArray(d)?d:{},a=async(d,h,f)=>i(await d.getItem(h),f?.fallback??f?.defaultValue),c=async(d,h)=>{const f=r(h);return s(await d.getItem(f))},l=async(d,h,f)=>{await d.setItem(h,f??null)},p=async(d,h,f)=>{const m=r(h),v=s(await d.getItem(m));await d.setItem(m,o(v,f))},g=async(d,h,f)=>{if(await d.removeItem(h),f?.removeMeta){const m=r(h);await d.removeItem(m)}},_=async(d,h,f)=>{const m=r(h);if(f==null)await d.removeItem(m);else{const v=s(await d.getItem(m));[f].flat().forEach(z=>delete v[z]),await d.setItem(m,v)}},y=(d,h,f)=>d.watch(h,f);return{getItem:async(d,h)=>{const{driver:f,driverKey:m}=n(d);return await a(f,m,h)},getItems:async d=>{const h=new Map,f=new Map,m=[];d.forEach(z=>{let b,$;typeof z=="string"?b=z:"getValue"in z?(b=z.key,$={fallback:z.fallback}):(b=z.key,$=z.options),m.push(b);const{driverArea:j,driverKey:Z}=n(b),N=h.get(j)??[];h.set(j,N.concat(Z)),f.set(b,$)});const v=new Map;return await Promise.all(Array.from(h.entries()).map(async([z,b])=>{(await e[z].getItems(b)).forEach($=>{const j=`${z}:${$.key}`,Z=f.get(j),N=i($.value,Z?.fallback??Z?.defaultValue);v.set(j,N)})})),m.map(z=>({key:z,value:v.get(z)}))},getMeta:async d=>{const{driver:h,driverKey:f}=n(d);return await c(h,f)},getMetas:async d=>{const h=d.map(v=>{const z=typeof v=="string"?v:v.key,{driverArea:b,driverKey:$}=n(z);return{key:z,driverArea:b,driverKey:$,driverMetaKey:r($)}}),f=h.reduce((v,z)=>(v[z.driverArea]??=[],v[z.driverArea].push(z),v),{}),m={};return await Promise.all(Object.entries(f).map(async([v,z])=>{const b=await H.storage[v].get(z.map($=>$.driverMetaKey));z.forEach($=>{m[$.key]=b[$.driverMetaKey]??{}})})),h.map(v=>({key:v.key,meta:m[v.key]}))},setItem:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await l(f,m,h)},setItems:async d=>{const h={};d.forEach(f=>{const{driverArea:m,driverKey:v}=n("key"in f?f.key:f.item.key);h[m]??=[],h[m].push({key:v,value:f.value})}),await Promise.all(Object.entries(h).map(async([f,m])=>{await t(f).setItems(m)}))},setMeta:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await p(f,m,h)},setMetas:async d=>{const h={};d.forEach(f=>{const{driverArea:m,driverKey:v}=n("key"in f?f.key:f.item.key);h[m]??=[],h[m].push({key:v,properties:f.meta})}),await Promise.all(Object.entries(h).map(async([f,m])=>{const v=t(f),z=m.map(({key:Z})=>r(Z)),b=await v.getItems(z),$=Object.fromEntries(b.map(({key:Z,value:N})=>[Z,s(N)])),j=m.map(({key:Z,properties:N})=>{const V=r(Z);return{key:V,value:o($[V]??{},N)}});await v.setItems(j)}))},removeItem:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await g(f,m,h)},removeItems:async d=>{const h={};d.forEach(f=>{let m,v;typeof f=="string"?m=f:"getValue"in f?m=f.key:"item"in f?(m=f.item.key,v=f.options):(m=f.key,v=f.options);const{driverArea:z,driverKey:b}=n(m);h[z]??=[],h[z].push(b),v?.removeMeta&&h[z].push(r(b))}),await Promise.all(Object.entries(h).map(async([f,m])=>{await t(f).removeItems(m)}))},clear:async d=>{await t(d).clear()},removeMeta:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await _(f,m,h)},snapshot:async(d,h)=>{const f=await t(d).snapshot();return h?.excludeKeys?.forEach(m=>{delete f[m],delete f[r(m)]}),f},restoreSnapshot:async(d,h)=>{await t(d).restoreSnapshot(h)},watch:(d,h)=>{const{driver:f,driverKey:m}=n(d);return y(f,m,h)},unwatch(){Object.values(e).forEach(d=>{d.unwatch()})},defineItem:(d,h)=>{const{driver:f,driverKey:m}=n(d),{version:v=1,migrations:z={},onMigrationComplete:b,debug:$=!1}=h??{};if(v<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const j=async()=>{const T=r(m),[{value:J},{value:ge}]=await f.getItems([m,T]);if(J==null)return;const B=ge?.v??1;if(B>v)throw Error(`Version downgrade detected (v${B} -> v${v}) for "${d}"`);if(B===v)return;$&&console.debug(`[@wxt-dev/storage] Running storage migration for ${d}: v${B} -> v${v}`);const vi=Array.from({length:v-B},(_e,Pe)=>B+Pe+1);let G=J;for(const _e of vi)try{G=await z?.[_e]?.(G)??G,$&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${_e}`)}catch(Pe){throw new si(d,_e,{cause:Pe})}await f.setItems([{key:m,value:G},{key:T,value:{...ge,v}}]),$&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${d} v${v}`,{migratedValue:G}),b?.(G,v)},Z=h?.migrations==null?Promise.resolve():j().catch(T=>{console.error(`[@wxt-dev/storage] Migration failed for ${d}`,T)}),N=new ni,V=()=>h?.fallback??h?.defaultValue??null,Pt=()=>N.runExclusive(async()=>{const T=await f.getItem(m);if(T!=null||h?.init==null)return T;const J=await h.init();return await f.setItem(m,J),T==null&&v>1&&await p(f,m,{v}),J});return Z.then(Pt),{key:d,get defaultValue(){return V()},get fallback(){return V()},getValue:async()=>(await Z,h?.init?await Pt():await a(f,m,h)),getMeta:async()=>(await Z,await c(f,m)),setValue:async T=>(await Z,await l(f,m,T)),setMeta:async T=>(await Z,await p(f,m,T)),removeValue:async T=>(await Z,await g(f,m,T)),removeMeta:async T=>(await Z,await _(f,m,T)),watch:T=>y(f,m,(J,ge)=>T(J??V(),ge??V())),migrate:j}}}}function he(e){const t=()=>{if(H.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function ft(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const a=e.seen.get(s);if(a.ref===null)return;const c=a.def??a.schema,l={...c},p=a.ref;if(a.ref=null,p){r(p);const v=e.seen.get(p),y=v.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,l),s._zod.parent===p)for(const h in c)h==="$ref"||h==="allOf"||h in l||delete c[h];if(y.$ref&&v.def)for(const h in c)h==="$ref"||h==="allOf"||h in v.def&&JSON.stringify(c[h])===JSON.stringify(v.def[h])&&delete c[h]}const g=s._zod.parent;if(g&&g!==p){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(c.$ref=v.schema.$ref,v.def))for(const y in c)y==="$ref"||y==="allOf"||y in v.def&&JSON.stringify(c[y])===JSON.stringify(v.def[y])&&delete c[y]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:de(t,"input",e.processors),output:de(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function P(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return P(r.element,n);if(r.type==="set")return P(r.valueType,n);if(r.type==="lazy")return P(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return P(r.innerType,n);if(r.type==="intersection")return P(r.left,n)||P(r.right,n);if(r.type==="record"||r.type==="map")return P(r.keyType,n)||P(r.valueType,n);if(r.type==="pipe")return P(r.in,n)||P(r.out,n);if(r.type==="object"){for(const o in r.shape)if(P(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(P(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(P(o,n))return!0;return!!(r.rest&&P(r.rest,n))}return!1}const yo=(e,t={})=>n=>{const r=lt({...n,processors:t});return T(e,r),dt(r,e),ft(r,e)},de=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=lt({...o??{},target:i,io:t,processors:n});return T(e,s),dt(s,e),ft(s,e)},zo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=zo[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const p=[...c];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},$o=(e,t,n,r)=>{n.not={}},ko=(e,t,n,r)=>{},So=(e,t,n,r)=>{const o=e._zod.def,i=Re(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Eo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Zo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Oo=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=T(i.element,t,{...r,path:[...r.path,"items"]})},Io=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const l in s)o.properties[l]=T(s[l],t,{...r,path:[...r.path,"properties",l]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{const p=i.shape[l]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=T(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},To=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>T(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},Po=(e,t,n,r)=>{const o=e._zod.def,i=T(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=T(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},Co=(e,t,n,r)=>{const o=e._zod.def,i=T(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Ao=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},jo=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Ro=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},No=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Do=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;T(i,t,r);const s=t.seen.get(e);s.ref=i},Uo=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},ht=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},xo=u("ZodISODateTime",(e,t)=>{Hn.init(e,t),E.init(e,t)});function Mo(e){return Xr(xo,e)}const Lo=u("ZodISODate",(e,t)=>{Yn.init(e,t),E.init(e,t)});function Fo(e){return Qr(Lo,e)}const Vo=u("ZodISOTime",(e,t)=>{Xn.init(e,t),E.init(e,t)});function Jo(e){return eo(Vo,e)}const Ko=u("ZodISODuration",(e,t)=>{Qn.init(e,t),E.init(e,t)});function Wo(e){return to(Ko,e)}const j=u("ZodError",(e,t)=>{Fe.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Wt(e,n)},flatten:{value:n=>Kt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,we,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,we,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),qo=ke(j),Bo=Se(j),Go=se(j),Ho=ie(j),Yo=Gt(j),Xo=Ht(j),Qo=Yt(j),es=Xt(j),ts=Qt(j),ns=en(j),rs=tn(j),os=nn(j),O=u("ZodType",(e,t)=>(Z.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:de(e,"input"),output:de(e,"output")}}),e.toJSONSchema=yo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(D(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>U(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>qo(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Go(e,n,r),e.parseAsync=async(n,r)=>Bo(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Ho(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Yo(e,n,r),e.decode=(n,r)=>Xo(e,n,r),e.encodeAsync=async(n,r)=>Qo(e,n,r),e.decodeAsync=async(n,r)=>es(e,n,r),e.safeEncode=(n,r)=>ts(e,n,r),e.safeDecode=(n,r)=>ns(e,n,r),e.safeEncodeAsync=async(n,r)=>rs(e,n,r),e.safeDecodeAsync=async(n,r)=>os(e,n,r),e.refine=(n,r)=>e.check(Hs(n,r)),e.superRefine=n=>e.check(Ys(n)),e.overwrite=n=>e.check(W(n)),e.optional=()=>wt(e),e.exactOptional=()=>Ds(e),e.nullable=()=>yt(e),e.nullish=()=>wt(yt(e)),e.nonoptional=n=>Vs(e,n),e.array=()=>Zs(e),e.or=n=>Ts([e,n]),e.and=n=>Cs(e,n),e.transform=n=>bt(e,Rs(n)),e.default=n=>Ms(e,n),e.prefault=n=>Fs(e,n),e.catch=n=>Ks(e,n),e.pipe=n=>bt(e,n),e.readonly=()=>Bs(e),e.describe=n=>{const r=e.clone();return X.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return X.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return X.get(e);const r=e.clone();return X.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),pt=u("_ZodString",(e,t)=>{Ee.init(e,t),O.init(e,t),e._zod.processJSONSchema=(r,o,i)=>bo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(oo(...r)),e.includes=(...r)=>e.check(ao(...r)),e.startsWith=(...r)=>e.check(co(...r)),e.endsWith=(...r)=>e.check(uo(...r)),e.min=(...r)=>e.check(le(...r)),e.max=(...r)=>e.check(ct(...r)),e.length=(...r)=>e.check(ut(...r)),e.nonempty=(...r)=>e.check(le(1,...r)),e.lowercase=r=>e.check(so(r)),e.uppercase=r=>e.check(io(r)),e.trim=()=>e.check(fo()),e.normalize=(...r)=>e.check(lo(...r)),e.toLowerCase=()=>e.check(ho()),e.toUpperCase=()=>e.check(po()),e.slugify=()=>e.check(mo())}),ss=u("ZodString",(e,t)=>{Ee.init(e,t),pt.init(e,t),e.email=n=>e.check(Pr(is,n)),e.url=n=>e.check(Nr(as,n)),e.jwt=n=>e.check(Yr(bs,n)),e.emoji=n=>e.check(Dr(cs,n)),e.guid=n=>e.check(at(mt,n)),e.uuid=n=>e.check(Cr(fe,n)),e.uuidv4=n=>e.check(Ar(fe,n)),e.uuidv6=n=>e.check(jr(fe,n)),e.uuidv7=n=>e.check(Rr(fe,n)),e.nanoid=n=>e.check(Ur(us,n)),e.guid=n=>e.check(at(mt,n)),e.cuid=n=>e.check(xr(ls,n)),e.cuid2=n=>e.check(Mr(ds,n)),e.ulid=n=>e.check(Lr(fs,n)),e.base64=n=>e.check(Br(ws,n)),e.base64url=n=>e.check(Gr(ys,n)),e.xid=n=>e.check(Fr(hs,n)),e.ksuid=n=>e.check(Vr(ps,n)),e.ipv4=n=>e.check(Jr(ms,n)),e.ipv6=n=>e.check(Kr(gs,n)),e.cidrv4=n=>e.check(Wr(_s,n)),e.cidrv6=n=>e.check(qr(vs,n)),e.e164=n=>e.check(Hr(zs,n)),e.datetime=n=>e.check(Mo(n)),e.date=n=>e.check(Fo(n)),e.time=n=>e.check(Jo(n)),e.duration=n=>e.check(Wo(n))});function Oe(e){return Tr(ss,e)}const E=u("ZodStringFormat",(e,t)=>{S.init(e,t),pt.init(e,t)}),is=u("ZodEmail",(e,t)=>{Ln.init(e,t),E.init(e,t)}),mt=u("ZodGUID",(e,t)=>{xn.init(e,t),E.init(e,t)}),fe=u("ZodUUID",(e,t)=>{Mn.init(e,t),E.init(e,t)}),as=u("ZodURL",(e,t)=>{Fn.init(e,t),E.init(e,t)}),cs=u("ZodEmoji",(e,t)=>{Vn.init(e,t),E.init(e,t)}),us=u("ZodNanoID",(e,t)=>{Jn.init(e,t),E.init(e,t)}),ls=u("ZodCUID",(e,t)=>{Kn.init(e,t),E.init(e,t)}),ds=u("ZodCUID2",(e,t)=>{Wn.init(e,t),E.init(e,t)}),fs=u("ZodULID",(e,t)=>{qn.init(e,t),E.init(e,t)}),hs=u("ZodXID",(e,t)=>{Bn.init(e,t),E.init(e,t)}),ps=u("ZodKSUID",(e,t)=>{Gn.init(e,t),E.init(e,t)}),ms=u("ZodIPv4",(e,t)=>{er.init(e,t),E.init(e,t)}),gs=u("ZodIPv6",(e,t)=>{tr.init(e,t),E.init(e,t)}),_s=u("ZodCIDRv4",(e,t)=>{nr.init(e,t),E.init(e,t)}),vs=u("ZodCIDRv6",(e,t)=>{rr.init(e,t),E.init(e,t)}),ws=u("ZodBase64",(e,t)=>{or.init(e,t),E.init(e,t)}),ys=u("ZodBase64URL",(e,t)=>{ir.init(e,t),E.init(e,t)}),zs=u("ZodE164",(e,t)=>{ar.init(e,t),E.init(e,t)}),bs=u("ZodJWT",(e,t)=>{ur.init(e,t),E.init(e,t)}),$s=u("ZodUnknown",(e,t)=>{lr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ko()});function gt(){return no($s)}const ks=u("ZodNever",(e,t)=>{dr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$o(e,n,r)});function Ss(e){return ro(ks,e)}const Es=u("ZodArray",(e,t)=>{fr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Oo(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(le(n,r)),e.nonempty=n=>e.check(le(1,n)),e.max=(n,r)=>e.check(ct(n,r)),e.length=(n,r)=>e.check(ut(n,r)),e.unwrap=()=>e.element});function Zs(e,t){return go(Es,e,t)}const Os=u("ZodObject",(e,t)=>{pr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Io(e,n,r,o),k(e,"shape",()=>t.shape),e.keyof=()=>As(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:gt()}),e.loose=()=>e.clone({...e._zod.def,catchall:gt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ss()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Mt(e,n),e.safeExtend=n=>Lt(e,n),e.merge=n=>Ft(e,n),e.pick=n=>Ut(e,n),e.omit=n=>xt(e,n),e.partial=(...n)=>Vt(vt,e,n[0]),e.required=(...n)=>Jt(zt,e,n[0])});function _t(e,t){const n={type:"object",shape:e??{},...w(t)};return new Os(n)}const Is=u("ZodUnion",(e,t)=>{mr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>To(e,n,r,o),e.options=t.options});function Ts(e,t){return new Is({type:"union",options:e,...w(t)})}const Ps=u("ZodIntersection",(e,t)=>{gr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Po(e,n,r,o)});function Cs(e,t){return new Ps({type:"intersection",left:e,right:t})}const Ie=u("ZodEnum",(e,t)=>{_r.init(e,t),O.init(e,t),e._zod.processJSONSchema=(r,o,i)=>So(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ie({...t,checks:[],...w(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ie({...t,checks:[],...w(o),entries:i})}});function As(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ie({type:"enum",entries:n,...w(t)})}const js=u("ZodTransform",(e,t)=>{vr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ae(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Y(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Y(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function Rs(e){return new js({type:"transform",transform:e})}const vt=u("ZodOptional",(e,t)=>{tt.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ht(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wt(e){return new vt({type:"optional",innerType:e})}const Ns=u("ZodExactOptional",(e,t)=>{wr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ht(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ds(e){return new Ns({type:"optional",innerType:e})}const Us=u("ZodNullable",(e,t)=>{yr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Co(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function yt(e){return new Us({type:"nullable",innerType:e})}const xs=u("ZodDefault",(e,t)=>{zr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ms(e,t){return new xs({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():xe(t)}})}const Ls=u("ZodPrefault",(e,t)=>{br.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ro(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Fs(e,t){return new Ls({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():xe(t)}})}const zt=u("ZodNonOptional",(e,t)=>{$r.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ao(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Vs(e,t){return new zt({type:"nonoptional",innerType:e,...w(t)})}const Js=u("ZodCatch",(e,t)=>{kr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>No(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ks(e,t){return new Js({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ws=u("ZodPipe",(e,t)=>{Sr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Do(e,n,r,o),e.in=t.in,e.out=t.out});function bt(e,t){return new Ws({type:"pipe",in:e,out:t})}const qs=u("ZodReadonly",(e,t)=>{Er.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Bs(e){return new qs({type:"readonly",innerType:e})}const Gs=u("ZodCustom",(e,t)=>{Zr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eo(e,n)});function Hs(e,t={}){return _o(Gs,e,t)}function Ys(e){return vo(e)}const Xs=new Error("request for lock canceled");var Qs=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class ei{constructor(t,n=Xs){this._value=t,this._cancelError=n,this._queue=[],this._weightedWaiters=[]}acquire(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((r,o)=>{const i={resolve:r,reject:o,weight:t,priority:n},s=$t(this._queue,a=>n<=a.priority);s===-1&&t<=this._value?this._dispatchItem(i):this._queue.splice(s+1,0,i)})}runExclusive(t){return Qs(this,arguments,void 0,function*(n,r=1,o=0){const[i,s]=yield this.acquire(r,o);try{return yield n(i)}finally{s()}})}waitForUnlock(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,n)?Promise.resolve():new Promise(r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),ti(this._weightedWaiters[t-1],{resolve:r,priority:n})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach(t=>t.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){const n=this._value;this._value-=t.weight,t.resolve([n,this._newReleaser(t.weight)])}_newReleaser(t){let n=!1;return()=>{n||(n=!0,this.release(t))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let t=this._value;t>0;t--){const n=this._weightedWaiters[t-1];n&&(n.forEach(r=>r.resolve()),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let n=this._value;n>0;n--){const r=this._weightedWaiters[n-1];if(!r)continue;const o=r.findIndex(i=>i.priority<=t);(o===-1?r:r.splice(0,o)).forEach((i=>i.resolve()))}}}_couldLockImmediately(t,n){return(this._queue.length===0||this._queue[0].priorityt.priority<=r.priority);e.splice(n+1,0,t)}function $t(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}var ni=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class ri{constructor(t){this._semaphore=new ei(1,t)}acquire(){return ni(this,arguments,void 0,function*(t=0){const[,n]=yield this._semaphore.acquire(1,t);return n})}runExclusive(t,n=0){return this._semaphore.runExclusive(()=>t(),1,n)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var kt=Object.prototype.hasOwnProperty;function Te(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Te(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(kt.call(e,n)&&++r&&!kt.call(t,n)||!(n in t)||!Te(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const oi=si();function si(){const e={local:he("local"),session:he("session"),sync:he("sync"),managed:he("managed")},t=f=>{const h=e[f];if(h==null){const d=Object.keys(e).join(", ");throw Error(`Invalid area "${f}". Options: ${d}`)}return h},n=f=>{const h=f.indexOf(":"),d=f.substring(0,h),m=f.substring(h+1);if(m==null)throw Error(`Storage key should be in the form of "area:key", but received "${f}"`);return{driverArea:d,driverKey:m,driver:t(d)}},r=f=>f+"$",o=(f,h)=>{const d={...f};return Object.entries(h).forEach(([m,_])=>{_==null?delete d[m]:d[m]=_}),d},i=(f,h)=>f??h??null,s=f=>typeof f=="object"&&!Array.isArray(f)?f:{},a=async(f,h,d)=>i(await f.getItem(h),d?.fallback??d?.defaultValue),c=async(f,h)=>{const d=r(h);return s(await f.getItem(d))},l=async(f,h,d)=>{await f.setItem(h,d??null)},p=async(f,h,d)=>{const m=r(h),_=s(await f.getItem(m));await f.setItem(m,o(_,d))},g=async(f,h,d)=>{if(await f.removeItem(h),d?.removeMeta){const m=r(h);await f.removeItem(m)}},v=async(f,h,d)=>{const m=r(h);if(d==null)await f.removeItem(m);else{const _=s(await f.getItem(m));[d].flat().forEach(z=>delete _[z]),await f.setItem(m,_)}},y=(f,h,d)=>f.watch(h,d);return{getItem:async(f,h)=>{const{driver:d,driverKey:m}=n(f);return await a(d,m,h)},getItems:async f=>{const h=new Map,d=new Map,m=[];f.forEach(z=>{let b,$;typeof z=="string"?b=z:"getValue"in z?(b=z.key,$={fallback:z.fallback}):(b=z.key,$=z.options),m.push(b);const{driverArea:R,driverKey:C}=n(b),A=h.get(R)??[];h.set(R,A.concat(C)),d.set(b,$)});const _=new Map;return await Promise.all(Array.from(h.entries()).map(async([z,b])=>{(await e[z].getItems(b)).forEach($=>{const R=`${z}:${$.key}`,C=d.get(R),A=i($.value,C?.fallback??C?.defaultValue);_.set(R,A)})})),m.map(z=>({key:z,value:_.get(z)}))},getMeta:async f=>{const{driver:h,driverKey:d}=n(f);return await c(h,d)},getMetas:async f=>{const h=f.map(_=>{const z=typeof _=="string"?_:_.key,{driverArea:b,driverKey:$}=n(z);return{key:z,driverArea:b,driverKey:$,driverMetaKey:r($)}}),d=h.reduce((_,z)=>(_[z.driverArea]??=[],_[z.driverArea].push(z),_),{}),m={};return await Promise.all(Object.entries(d).map(async([_,z])=>{const b=await G.storage[_].get(z.map($=>$.driverMetaKey));z.forEach($=>{m[$.key]=b[$.driverMetaKey]??{}})})),h.map(_=>({key:_.key,meta:m[_.key]}))},setItem:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await l(d,m,h)},setItems:async f=>{const h={};f.forEach(d=>{const{driverArea:m,driverKey:_}=n("key"in d?d.key:d.item.key);h[m]??=[],h[m].push({key:_,value:d.value})}),await Promise.all(Object.entries(h).map(async([d,m])=>{await t(d).setItems(m)}))},setMeta:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await p(d,m,h)},setMetas:async f=>{const h={};f.forEach(d=>{const{driverArea:m,driverKey:_}=n("key"in d?d.key:d.item.key);h[m]??=[],h[m].push({key:_,properties:d.meta})}),await Promise.all(Object.entries(h).map(async([d,m])=>{const _=t(d),z=m.map(({key:C})=>r(C)),b=await _.getItems(z),$=Object.fromEntries(b.map(({key:C,value:A})=>[C,s(A)])),R=m.map(({key:C,properties:A})=>{const ge=r(C);return{key:ge,value:o($[ge]??{},A)}});await _.setItems(R)}))},removeItem:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await g(d,m,h)},removeItems:async f=>{const h={};f.forEach(d=>{let m,_;typeof d=="string"?m=d:"getValue"in d?m=d.key:"item"in d?(m=d.item.key,_=d.options):(m=d.key,_=d.options);const{driverArea:z,driverKey:b}=n(m);h[z]??=[],h[z].push(b),_?.removeMeta&&h[z].push(r(b))}),await Promise.all(Object.entries(h).map(async([d,m])=>{await t(d).removeItems(m)}))},clear:async f=>{await t(f).clear()},removeMeta:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await v(d,m,h)},snapshot:async(f,h)=>{const d=await t(f).snapshot();return h?.excludeKeys?.forEach(m=>{delete d[m],delete d[r(m)]}),d},restoreSnapshot:async(f,h)=>{await t(f).restoreSnapshot(h)},watch:(f,h)=>{const{driver:d,driverKey:m}=n(f);return y(d,m,h)},unwatch(){Object.values(e).forEach(f=>{f.unwatch()})},defineItem:(f,h)=>{const{driver:d,driverKey:m}=n(f),{version:_=1,migrations:z={},onMigrationComplete:b,debug:$=!1}=h??{};if(_<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");let R=!1;const C=async()=>{const I=r(m),[{value:x},{value:Q}]=await d.getItems([m,I]);if(R=x==null&&Q?.v==null&&!!_,x==null)return;const q=Q?.v??1;if(q>_)throw Error(`Version downgrade detected (v${q} -> v${_}) for "${f}"`);if(q===_)return;$&&console.debug(`[@wxt-dev/storage] Running storage migration for ${f}: v${q} -> v${_}`);const wi=Array.from({length:_-q},(ve,Ce)=>q+Ce+1);let B=x;for(const ve of wi)try{B=await z?.[ve]?.(B)??B,$&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${ve}`)}catch(Ce){throw new ii(f,ve,{cause:Ce})}await d.setItems([{key:m,value:B},{key:I,value:{...Q,v:_}}]),$&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${f} v${_}`,{migratedValue:B}),b?.(B,_)},A=h?.migrations==null?Promise.resolve():C().catch(I=>{console.error(`[@wxt-dev/storage] Migration failed for ${f}`,I)}),ge=new ri,_e=()=>h?.fallback??h?.defaultValue??null,Ct=()=>ge.runExclusive(async()=>{const I=await d.getItem(m);if(I!=null||h?.init==null)return I;const x=await h.init();return await d.setItem(m,x),I==null&&_>1&&await p(d,m,{v:_}),x});return A.then(Ct),{key:f,get defaultValue(){return _e()},get fallback(){return _e()},getValue:async()=>(await A,h?.init?await Ct():await a(d,m,h)),getMeta:async()=>(await A,await c(d,m)),setValue:async I=>{await A,R?(R=!1,await Promise.all([l(d,m,I),p(d,m,{v:_})])):await l(d,m,I)},setMeta:async I=>(await A,await p(d,m,I)),removeValue:async I=>(await A,await g(d,m,I)),removeMeta:async I=>(await A,await v(d,m,I)),watch:I=>y(d,m,(x,Q)=>I(x??_e(),Q??_e())),migrate:C}}}}function he(e){const t=()=>{if(G.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371 - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html -`);if(H.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=H.storage[e];if(r==null)throw Error(`"browser.storage.${e}" is undefined`);return r},n=new Set;return{getItem:async r=>(await t().get(r))[r],getItems:async r=>{const o=await t().get(r);return r.map(i=>({key:i,value:o[i]??null}))},setItem:async(r,o)=>{o==null?await t().remove(r):await t().set({[r]:o})},setItems:async r=>{const o=r.reduce((i,{key:s,value:a})=>(i[s]=a,i),{});await t().set(o)},removeItem:async r=>{await t().remove(r)},removeItems:async r=>{await t().remove(r)},clear:async()=>{await t().clear()},snapshot:async()=>await t().get(),restoreSnapshot:async r=>{await t().set(r)},watch(r,o){const i=s=>{const a=s[r];a==null||Ie(a.newValue,a.oldValue)||o(a.newValue??null,a.oldValue??null)};return t().onChanged.addListener(i),n.add(i),()=>{t().onChanged.removeListener(i),n.delete(i)}},unwatch(){n.forEach(r=>{t().onChanged.removeListener(r)}),n.clear()}}}var si=class extends Error{constructor(e,t,n){super(`v${t} migration failed for "${e}"`,n),this.key=e,this.version=t}};gt({sessionARN:Ze(),hexColor:Ze()});const ii="sync:colorSettings";async function kt(){return await ri.getItem(ii)}var F=(e=>(e.getSessionARN="getSessionARN",e.changeColor="changeColor",e))(F||{});const St="*://*.signin.aws.amazon.com/*";function ai(){return["*://*.console.aws.amazon.com/*",St]}function ci(e,t){return new RegExp(e.replaceAll("*",".*")).exec(t)!==null}function Et(e,t,n){n.style.display="flex",n.style.justifyContent="space-between",e.title=`The color of ${t.sessionARN}`,e.style.backgroundColor=t.hexColor,e.style.width=`${n.clientHeight}px`}async function Zt(){const e=await kt();if(e===null)return!1;const t=document.querySelectorAll("div[class^='awsui_restore-pointer-events']");if(t.length===0)return!1;for(const n of t){const r=["span","a"].flatMap(p=>Array.from(n.getElementsByTagName(p))).map(({textContent:p})=>p).find(p=>p!==null);if(r===void 0)continue;const o=n.querySelector("p[class^='session-card_session_card_username']");if(o===null)continue;const i=o.textContent;if(i===null)continue;const s=e.find(({sessionARN:p})=>{const g=r.replaceAll("-","").replace("(","").replace(")","");return p.includes(`:${g}:`)&&p.endsWith(`/${i.trim()}`)}),a="aws-console-colorize-color-element",c=n.getElementsByClassName(a).item(0);if(c instanceof HTMLDivElement){if(s===void 0){c.remove();continue}Et(c,s,n);continue}if(s===void 0)continue;const l=document.createElement("div");l.className=a,Et(l,s,n),n.appendChild(l)}return!0}async function Ot(){if(await Zt())return;const e="__next",t=document.getElementById(e);if(t===null)throw new Error(`Can't get ${e}`);new MutationObserver(async(n,r)=>{await Zt()&&r.disconnect()}).observe(t,{childList:!0,subtree:!0})}function ui(e){switch(e){case F.getSessionARN:return;case F.changeColor:Ot();return;default:throw new Error(`Incorrect message ${e}`)}}function It(e,t){const n=t();return n===null?!1:(n.style.backgroundColor=e,!0)}async function Tt(e){const r=(await kt())?.find(i=>i.sessionARN===e)?.hexColor??"",o=[{getElement:()=>document.querySelector("#consoleNavHeader #awsc-nav-header > nav"),mutationObserveTargetID:"consoleNavHeader"},{getElement:()=>document.getElementById("console-nav-footer-inner"),mutationObserveTargetID:"console-nav-footer"}];for(const i of o){if(It(r,i.getElement))continue;const s=document.getElementById(i.mutationObserveTargetID);if(s===null)throw new Error(`Can't get ${i.mutationObserveTargetID}`);new MutationObserver((a,c)=>{It(r,i.getElement)&&c.disconnect()}).observe(s,{childList:!0})}}function li(e,t,n){switch(t){case F.getSessionARN:return n(e),!0;case F.changeColor:Tt(e);return;default:throw new Error(`Incorrect message ${t}`)}}async function di(){const e=document.documentURI.startsWith("file://")&&document.documentURI.endsWith("tests/e2e/html/sessions/selector.html");if(ci(St,document.documentURI)||e){if(!document.documentURI.includes(".signin.aws.amazon.com/sessions/selector")&&!e)return;te.runtime.onMessage.addListener(r=>ui(F[r])),await Ot();return}const t=document.querySelector('meta[name="awsc-session-data"]');if(!(t instanceof HTMLMetaElement))throw new Error("Can't get awsc-session-data");const n=gt({sessionARN:Ze()}).parse(JSON.parse(t.content)).sessionARN;te.runtime.onMessage.addListener((r,o,i)=>li(n,F[r],i)),await Tt(n)}const fi={matches:ai(),main:di};function pe(e,...t){}const hi={debug:(...e)=>pe(console.debug,...e),log:(...e)=>pe(console.log,...e),warn:(...e)=>pe(console.warn,...e),error:(...e)=>pe(console.error,...e)};var pi=class Ct extends Event{static EVENT_NAME=Te("wxt:locationchange");constructor(t,n){super(Ct.EVENT_NAME,{}),this.newUrl=t,this.oldUrl=n}};function Te(e){return`${te?.runtime?.id}:content:${e}`}function mi(e){let t,n;return{run(){t==null&&(n=new URL(location.href),t=e.setInterval(()=>{let r=new URL(location.href);r.href!==n.href&&(window.dispatchEvent(new pi(r,n)),n=r)},1e3))}}}var gi=class ee{static SCRIPT_STARTED_MESSAGE_TYPE=Te("wxt:content-script-started");id;abortController;locationWatcher=mi(this);constructor(t,n){this.contentScriptName=t,this.options=n,this.id=Math.random().toString(36).slice(2),this.abortController=new AbortController,this.stopOldScripts(),this.listenForNewerScripts()}get signal(){return this.abortController.signal}abort(t){return this.abortController.abort(t)}get isInvalid(){return te.runtime?.id==null&&this.notifyInvalidated(),this.signal.aborted}get isValid(){return!this.isInvalid}onInvalidated(t){return this.signal.addEventListener("abort",t),()=>this.signal.removeEventListener("abort",t)}block(){return new Promise(()=>{})}setInterval(t,n){const r=setInterval(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearInterval(r)),r}setTimeout(t,n){const r=setTimeout(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearTimeout(r)),r}requestAnimationFrame(t){const n=requestAnimationFrame((...r)=>{this.isValid&&t(...r)});return this.onInvalidated(()=>cancelAnimationFrame(n)),n}requestIdleCallback(t,n){const r=requestIdleCallback((...o)=>{this.signal.aborted||t(...o)},n);return this.onInvalidated(()=>cancelIdleCallback(r)),r}addEventListener(t,n,r,o){n==="wxt:locationchange"&&this.isValid&&this.locationWatcher.run(),t.addEventListener?.(n.startsWith("wxt:")?Te(n):n,r,{...o,signal:this.signal})}notifyInvalidated(){this.abort("Content script context invalidated"),hi.debug(`Content script "${this.contentScriptName}" context invalidated`)}stopOldScripts(){document.dispatchEvent(new CustomEvent(ee.SCRIPT_STARTED_MESSAGE_TYPE,{detail:{contentScriptName:this.contentScriptName,messageId:this.id}})),window.postMessage({type:ee.SCRIPT_STARTED_MESSAGE_TYPE,contentScriptName:this.contentScriptName,messageId:this.id},"*")}verifyScriptStartedEvent(t){const n=t.detail?.contentScriptName===this.contentScriptName,r=t.detail?.messageId===this.id;return n&&!r}listenForNewerScripts(){const t=n=>{!(n instanceof CustomEvent)||!this.verifyScriptStartedEvent(n)||this.notifyInvalidated()};document.addEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t),this.onInvalidated(()=>document.removeEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t))}};function zi(){}function me(e,...t){}const _i={debug:(...e)=>me(console.debug,...e),log:(...e)=>me(console.log,...e),warn:(...e)=>me(console.warn,...e),error:(...e)=>me(console.error,...e)};return(async()=>{try{const{main:e,...t}=fi;return await e(new gi("content",t))}catch(e){throw _i.error('The content script "content" crashed on startup!',e),e}})()})(); +`);if(G.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=G.storage[e];if(r==null)throw Error(`"browser.storage.${e}" is undefined`);return r},n=new Set;return{getItem:async r=>(await t().get(r))[r],getItems:async r=>{const o=await t().get(r);return r.map(i=>({key:i,value:o[i]??null}))},setItem:async(r,o)=>{o==null?await t().remove(r):await t().set({[r]:o})},setItems:async r=>{const o=r.reduce((i,{key:s,value:a})=>(i[s]=a,i),{});await t().set(o)},removeItem:async r=>{await t().remove(r)},removeItems:async r=>{await t().remove(r)},clear:async()=>{await t().clear()},snapshot:async()=>await t().get(),restoreSnapshot:async r=>{await t().set(r)},watch(r,o){const i=s=>{const a=s[r];a==null||Te(a.newValue,a.oldValue)||o(a.newValue??null,a.oldValue??null)};return t().onChanged.addListener(i),n.add(i),()=>{t().onChanged.removeListener(i),n.delete(i)}},unwatch(){n.forEach(r=>{t().onChanged.removeListener(r)}),n.clear()}}}var ii=class extends Error{constructor(e,t,n){super(`v${t} migration failed for "${e}"`,n),this.key=e,this.version=t}};_t({sessionARN:Oe(),hexColor:Oe()});const ai="sync:colorSettings";async function St(){return await oi.getItem(ai)}var V=(e=>(e.getSessionARN="getSessionARN",e.changeColor="changeColor",e))(V||{});const Et="*://*.signin.aws.amazon.com/*";function ci(){return["*://*.console.aws.amazon.com/*",Et]}function ui(e,t){return new RegExp(e.replaceAll("*",".*")).exec(t)!==null}function Zt(e,t,n){n.style.display="flex",n.style.justifyContent="space-between",e.title=`The color of ${t.sessionARN}`,e.style.backgroundColor=t.hexColor,e.style.width=`${n.clientHeight}px`}async function Ot(){const e=await St();if(e===null)return!1;const t=document.querySelectorAll("div[class^='awsui_restore-pointer-events']");if(t.length===0)return!1;for(const n of t){const r=["span","a"].flatMap(p=>Array.from(n.getElementsByTagName(p))).map(({textContent:p})=>p).find(p=>p!==null);if(r===void 0)continue;const o=n.querySelector("p[class^='session-card_session_card_username']");if(o===null)continue;const i=o.textContent;if(i===null)continue;const s=e.find(({sessionARN:p})=>{const g=r.replaceAll("-","").replace("(","").replace(")","");return p.includes(`:${g}:`)&&p.endsWith(`/${i.trim()}`)}),a="aws-console-colorize-color-element",c=n.getElementsByClassName(a).item(0);if(c instanceof HTMLDivElement){if(s===void 0){c.remove();continue}Zt(c,s,n);continue}if(s===void 0)continue;const l=document.createElement("div");l.className=a,Zt(l,s,n),n.appendChild(l)}return!0}async function It(){if(await Ot())return;const e="__next",t=document.getElementById(e);if(t===null)throw new Error(`Can't get ${e}`);new MutationObserver(async(n,r)=>{await Ot()&&r.disconnect()}).observe(t,{childList:!0,subtree:!0})}function li(e){switch(e){case V.getSessionARN:return;case V.changeColor:It();return;default:throw new Error(`Incorrect message ${e}`)}}function Tt(e,t){const n=t();return n===null?!1:(n.style.backgroundColor=e,!0)}async function Pt(e){const r=(await St())?.find(i=>i.sessionARN===e)?.hexColor??"",o=[{getElement:()=>document.querySelector("#consoleNavHeader #awsc-nav-header > nav"),mutationObserveTargetID:"consoleNavHeader"},{getElement:()=>document.getElementById("console-nav-footer-inner"),mutationObserveTargetID:"console-nav-footer"}];for(const i of o){if(Tt(r,i.getElement))continue;const s=document.getElementById(i.mutationObserveTargetID);if(s===null)throw new Error(`Can't get ${i.mutationObserveTargetID}`);new MutationObserver((a,c)=>{Tt(r,i.getElement)&&c.disconnect()}).observe(s,{childList:!0})}}function di(e,t,n){switch(t){case V.getSessionARN:return n(e),!0;case V.changeColor:Pt(e);return;default:throw new Error(`Incorrect message ${t}`)}}async function fi(){const e=document.documentURI.startsWith("file://")&&document.documentURI.endsWith("tests/e2e/html/sessions/selector.html");if(ui(Et,document.documentURI)||e){if(!document.documentURI.includes(".signin.aws.amazon.com/sessions/selector")&&!e)return;te.runtime.onMessage.addListener(r=>li(V[r])),await It();return}const t=document.querySelector('meta[name="awsc-session-data"]');if(!(t instanceof HTMLMetaElement))throw new Error("Can't get awsc-session-data");const n=_t({sessionARN:Oe()}).parse(JSON.parse(t.content)).sessionARN;te.runtime.onMessage.addListener((r,o,i)=>di(n,V[r],i)),await Pt(n)}const hi={matches:ci(),main:fi};function pe(e,...t){}const pi={debug:(...e)=>pe(console.debug,...e),log:(...e)=>pe(console.log,...e),warn:(...e)=>pe(console.warn,...e),error:(...e)=>pe(console.error,...e)};var mi=class At extends Event{static EVENT_NAME=Pe("wxt:locationchange");constructor(t,n){super(At.EVENT_NAME,{}),this.newUrl=t,this.oldUrl=n}};function Pe(e){return`${te?.runtime?.id}:content:${e}`}function gi(e){let t,n;return{run(){t==null&&(n=new URL(location.href),t=e.setInterval(()=>{let r=new URL(location.href);r.href!==n.href&&(window.dispatchEvent(new mi(r,n)),n=r)},1e3))}}}var _i=class ee{static SCRIPT_STARTED_MESSAGE_TYPE=Pe("wxt:content-script-started");id;abortController;locationWatcher=gi(this);constructor(t,n){this.contentScriptName=t,this.options=n,this.id=Math.random().toString(36).slice(2),this.abortController=new AbortController,this.stopOldScripts(),this.listenForNewerScripts()}get signal(){return this.abortController.signal}abort(t){return this.abortController.abort(t)}get isInvalid(){return te.runtime?.id==null&&this.notifyInvalidated(),this.signal.aborted}get isValid(){return!this.isInvalid}onInvalidated(t){return this.signal.addEventListener("abort",t),()=>this.signal.removeEventListener("abort",t)}block(){return new Promise(()=>{})}setInterval(t,n){const r=setInterval(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearInterval(r)),r}setTimeout(t,n){const r=setTimeout(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearTimeout(r)),r}requestAnimationFrame(t){const n=requestAnimationFrame((...r)=>{this.isValid&&t(...r)});return this.onInvalidated(()=>cancelAnimationFrame(n)),n}requestIdleCallback(t,n){const r=requestIdleCallback((...o)=>{this.signal.aborted||t(...o)},n);return this.onInvalidated(()=>cancelIdleCallback(r)),r}addEventListener(t,n,r,o){n==="wxt:locationchange"&&this.isValid&&this.locationWatcher.run(),t.addEventListener?.(n.startsWith("wxt:")?Pe(n):n,r,{...o,signal:this.signal})}notifyInvalidated(){this.abort("Content script context invalidated"),pi.debug(`Content script "${this.contentScriptName}" context invalidated`)}stopOldScripts(){document.dispatchEvent(new CustomEvent(ee.SCRIPT_STARTED_MESSAGE_TYPE,{detail:{contentScriptName:this.contentScriptName,messageId:this.id}})),window.postMessage({type:ee.SCRIPT_STARTED_MESSAGE_TYPE,contentScriptName:this.contentScriptName,messageId:this.id},"*")}verifyScriptStartedEvent(t){const n=t.detail?.contentScriptName===this.contentScriptName,r=t.detail?.messageId===this.id;return n&&!r}listenForNewerScripts(){const t=n=>{!(n instanceof CustomEvent)||!this.verifyScriptStartedEvent(n)||this.notifyInvalidated()};document.addEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t),this.onInvalidated(()=>document.removeEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t))}};function bi(){}function me(e,...t){}const vi={debug:(...e)=>me(console.debug,...e),log:(...e)=>me(console.log,...e),warn:(...e)=>me(console.warn,...e),error:(...e)=>me(console.error,...e)};return(async()=>{try{const{main:e,...t}=hi;return await e(new _i("content",t))}catch(e){throw vi.error('The content script "content" crashed on startup!',e),e}})()})(); content; \ No newline at end of file diff --git a/dist/chrome-mv3/options.html b/dist/chrome-mv3/options.html index ee40d85..4cacacd 100644 --- a/dist/chrome-mv3/options.html +++ b/dist/chrome-mv3/options.html @@ -5,7 +5,7 @@ AWS management console colorize - + diff --git a/dist/chrome-mv3/popup.html b/dist/chrome-mv3/popup.html index 78a069a..6a2518a 100644 --- a/dist/chrome-mv3/popup.html +++ b/dist/chrome-mv3/popup.html @@ -5,7 +5,7 @@ AWS management console colorize - + diff --git a/dist/firefox-mv2/chunks/main-DmKmffDj.js b/dist/firefox-mv2/chunks/main-CfofK1zW.js similarity index 71% rename from dist/firefox-mv2/chunks/main-DmKmffDj.js rename to dist/firefox-mv2/chunks/main-CfofK1zW.js index c1d4a31..edf6f32 100644 --- a/dist/firefox-mv2/chunks/main-DmKmffDj.js +++ b/dist/firefox-mv2/chunks/main-CfofK1zW.js @@ -1,22 +1,22 @@ -(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function f(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=f(o);fetch(o.href,d)}})();try{}catch(l){console.error("[wxt] Failed to initialize plugins",l)}function nm(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var kf={exports:{}},Va={};var bh;function dg(){if(bh)return Va;bh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var v in o)v!=="key"&&(d[v]=o[v])}else d=o;return o=d.ref,{$$typeof:l,type:r,key:h,ref:o!==void 0?o:null,props:d}}return Va.Fragment=u,Va.jsx=f,Va.jsxs=f,Va}var Sh;function hg(){return Sh||(Sh=1,kf.exports=dg()),kf.exports}var ke=hg(),Wf={exports:{}},P={};var zh;function mg(){if(zh)return P;zh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),x=Symbol.iterator;function G(b){return b===null||typeof b!="object"?null:(b=x&&b[x]||b["@@iterator"],typeof b=="function"?b:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,H={};function q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}q.prototype.isReactComponent={},q.prototype.setState=function(b,C){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,C,"setState")},q.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function K(){}K.prototype=q.prototype;function Q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}var I=Q.prototype=new K;I.constructor=Q,j(I,q.prototype),I.isPureReactComponent=!0;var ee=Array.isArray;function Ae(){}var $={H:null,A:null,T:null,S:null},De=Object.prototype.hasOwnProperty;function Ke(b,C,Y){var V=Y.ref;return{$$typeof:l,type:b,key:C,ref:V!==void 0?V:null,props:Y}}function Kt(b,C){return Ke(b.type,C,b.props)}function ye(b){return typeof b=="object"&&b!==null&&b.$$typeof===l}function Re(b){var C={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(Y){return C[Y]})}var Mt=/\/+/g;function nt(b,C){return typeof b=="object"&&b!==null&&b.key!=null?Re(""+b.key):C.toString(36)}function yt(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Ae,Ae):(b.status="pending",b.then(function(C){b.status==="pending"&&(b.status="fulfilled",b.value=C)},function(C){b.status==="pending"&&(b.status="rejected",b.reason=C)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function M(b,C,Y,V,te){var ae=typeof b;(ae==="undefined"||ae==="boolean")&&(b=null);var ve=!1;if(b===null)ve=!0;else switch(ae){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(b.$$typeof){case l:case u:ve=!0;break;case T:return ve=b._init,M(ve(b._payload),C,Y,V,te)}}if(ve)return te=te(b),ve=V===""?"."+nt(b,0):V,ee(te)?(Y="",ve!=null&&(Y=ve.replace(Mt,"$&/")+"/"),M(te,C,Y,"",function(Wl){return Wl})):te!=null&&(ye(te)&&(te=Kt(te,Y+(te.key==null||b&&b.key===te.key?"":(""+te.key).replace(Mt,"$&/")+"/")+ve)),C.push(te)),1;ve=0;var ut=V===""?".":V+":";if(ee(b))for(var xe=0;xe>>1,Te=M[be];if(0>>1;beo(Y,W))Vo(te,Y)?(M[be]=te,M[V]=W,be=V):(M[be]=Y,M[C]=W,be=C);else if(Vo(te,W))M[be]=te,M[V]=W,be=V;else break e}}return B}function o(M,B){var W=M.sortIndex-B.sortIndex;return W!==0?W:M.id-B.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var h=Date,v=h.now();l.unstable_now=function(){return h.now()-v}}var p=[],y=[],T=1,N=null,x=3,G=!1,R=!1,j=!1,H=!1,q=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function I(M){for(var B=f(y);B!==null;){if(B.callback===null)r(y);else if(B.startTime<=M)r(y),B.sortIndex=B.expirationTime,u(p,B);else break;B=f(y)}}function ee(M){if(j=!1,I(M),!R)if(f(p)!==null)R=!0,Ae||(Ae=!0,Re());else{var B=f(y);B!==null&&yt(ee,B.startTime-M)}}var Ae=!1,$=-1,De=5,Ke=-1;function Kt(){return H?!0:!(l.unstable_now()-KeM&&Kt());){var be=N.callback;if(typeof be=="function"){N.callback=null,x=N.priorityLevel;var Te=be(N.expirationTime<=M);if(M=l.unstable_now(),typeof Te=="function"){N.callback=Te,I(M),B=!0;break t}N===f(p)&&r(p),I(M)}else r(p);N=f(p)}if(N!==null)B=!0;else{var b=f(y);b!==null&&yt(ee,b.startTime-M),B=!1}}break e}finally{N=null,x=W,G=!1}B=void 0}}finally{B?Re():Ae=!1}}}var Re;if(typeof Q=="function")Re=function(){Q(ye)};else if(typeof MessageChannel<"u"){var Mt=new MessageChannel,nt=Mt.port2;Mt.port1.onmessage=ye,Re=function(){nt.postMessage(null)}}else Re=function(){q(ye,0)};function yt(M,B){$=q(function(){M(l.unstable_now())},B)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(M){M.callback=null},l.unstable_forceFrameRate=function(M){0>M||125be?(M.sortIndex=W,u(y,M),f(p)===null&&M===f(y)&&(j?(K($),$=-1):j=!0,yt(ee,W-be))):(M.sortIndex=Te,u(p,M),R||G||(R=!0,Ae||(Ae=!0,Re()))),M},l.unstable_shouldYield=Kt,l.unstable_wrapCallback=function(M){var B=x;return function(){var W=x;x=B;try{return M.apply(this,arguments)}finally{x=W}}}})(Pf)),Pf}var Oh;function yg(){return Oh||(Oh=1,If.exports=vg()),If.exports}var er={exports:{}},lt={};var Ah;function gg(){if(Ah)return lt;Ah=1;var l=cr();function u(p){var y="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),er.exports=gg(),er.exports}var Nh;function _g(){if(Nh)return Qa;Nh=1;var l=yg(),u=cr(),f=pg();function r(e){var t="https://react.dev/errors/"+e;if(1Te||(e.current=be[Te],be[Te]=null,Te--)}function Y(e,t){Te++,be[Te]=e.current,e.current=t}var V=b(null),te=b(null),ae=b(null),ve=b(null);function ut(e,t){switch(Y(ae,t),Y(te,e),Y(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Qd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(V),Y(V,e)}function xe(){C(V),C(te),C(ae)}function Wl(e){e.memoizedState!==null&&Y(ve,e);var t=V.current,n=Qd(t,e.type);t!==n&&(Y(te,e),Y(V,n))}function Wa(e){te.current===e&&(C(V),C(te)),ve.current===e&&(C(ve),Ba._currentValue=W)}var Zi,pr;function Yn(e){if(Zi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zi=t&&t[1]||"",pr=-1{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function f(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=f(o);fetch(o.href,d)}})();try{}catch(l){console.error("[wxt] Failed to initialize plugins",l)}function nm(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var kf={exports:{}},Va={};var bh;function dg(){if(bh)return Va;bh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var v in o)v!=="key"&&(d[v]=o[v])}else d=o;return o=d.ref,{$$typeof:l,type:r,key:h,ref:o!==void 0?o:null,props:d}}return Va.Fragment=u,Va.jsx=f,Va.jsxs=f,Va}var Sh;function hg(){return Sh||(Sh=1,kf.exports=dg()),kf.exports}var Je=hg(),Wf={exports:{}},P={};var zh;function mg(){if(zh)return P;zh=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),x=Symbol.iterator;function G(b){return b===null||typeof b!="object"?null:(b=x&&b[x]||b["@@iterator"],typeof b=="function"?b:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,H={};function q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}q.prototype.isReactComponent={},q.prototype.setState=function(b,C){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,C,"setState")},q.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function K(){}K.prototype=q.prototype;function Q(b,C,Y){this.props=b,this.context=C,this.refs=H,this.updater=Y||R}var I=Q.prototype=new K;I.constructor=Q,j(I,q.prototype),I.isPureReactComponent=!0;var ee=Array.isArray;function Oe(){}var W={H:null,A:null,T:null,S:null},ge=Object.prototype.hasOwnProperty;function at(b,C,Y){var V=Y.ref;return{$$typeof:l,type:b,key:C,ref:V!==void 0?V:null,props:Y}}function Bt(b,C){return at(b.type,C,b.props)}function gt(b){return typeof b=="object"&&b!==null&&b.$$typeof===l}function se(b){var C={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(Y){return C[Y]})}var tt=/\/+/g;function ut(b,C){return typeof b=="object"&&b!==null&&b.key!=null?se(""+b.key):C.toString(36)}function Le(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Oe,Oe):(b.status="pending",b.then(function(C){b.status==="pending"&&(b.status="fulfilled",b.value=C)},function(C){b.status==="pending"&&(b.status="rejected",b.reason=C)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function D(b,C,Y,V,te){var ae=typeof b;(ae==="undefined"||ae==="boolean")&&(b=null);var pe=!1;if(b===null)pe=!0;else switch(ae){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(b.$$typeof){case l:case u:pe=!0;break;case T:return pe=b._init,D(pe(b._payload),C,Y,V,te)}}if(pe)return te=te(b),pe=V===""?"."+ut(b,0):V,ee(te)?(Y="",pe!=null&&(Y=pe.replace(tt,"$&/")+"/"),D(te,C,Y,"",function(Wl){return Wl})):te!=null&&(gt(te)&&(te=Bt(te,Y+(te.key==null||b&&b.key===te.key?"":(""+te.key).replace(tt,"$&/")+"/")+pe)),C.push(te)),1;pe=0;var it=V===""?".":V+":";if(ee(b))for(var je=0;je>>1,Ae=D[de];if(0>>1;deo(Y,J))Vo(te,Y)?(D[de]=te,D[V]=J,de=V):(D[de]=Y,D[C]=J,de=C);else if(Vo(te,J))D[de]=te,D[V]=J,de=V;else break e}}return B}function o(D,B){var J=D.sortIndex-B.sortIndex;return J!==0?J:D.id-B.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var h=Date,v=h.now();l.unstable_now=function(){return h.now()-v}}var p=[],y=[],T=1,M=null,x=3,G=!1,R=!1,j=!1,H=!1,q=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function I(D){for(var B=f(y);B!==null;){if(B.callback===null)r(y);else if(B.startTime<=D)r(y),B.sortIndex=B.expirationTime,u(p,B);else break;B=f(y)}}function ee(D){if(j=!1,I(D),!R)if(f(p)!==null)R=!0,Oe||(Oe=!0,se());else{var B=f(y);B!==null&&Le(ee,B.startTime-D)}}var Oe=!1,W=-1,ge=5,at=-1;function Bt(){return H?!0:!(l.unstable_now()-atD&&Bt());){var de=M.callback;if(typeof de=="function"){M.callback=null,x=M.priorityLevel;var Ae=de(M.expirationTime<=D);if(D=l.unstable_now(),typeof Ae=="function"){M.callback=Ae,I(D),B=!0;break t}M===f(p)&&r(p),I(D)}else r(p);M=f(p)}if(M!==null)B=!0;else{var b=f(y);b!==null&&Le(ee,b.startTime-D),B=!1}}break e}finally{M=null,x=J,G=!1}B=void 0}}finally{B?se():Oe=!1}}}var se;if(typeof Q=="function")se=function(){Q(gt)};else if(typeof MessageChannel<"u"){var tt=new MessageChannel,ut=tt.port2;tt.port1.onmessage=gt,se=function(){ut.postMessage(null)}}else se=function(){q(gt,0)};function Le(D,B){W=q(function(){D(l.unstable_now())},B)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(D){D.callback=null},l.unstable_forceFrameRate=function(D){0>D||125de?(D.sortIndex=J,u(y,D),f(p)===null&&D===f(y)&&(j?(K(W),W=-1):j=!0,Le(ee,J-de))):(D.sortIndex=Ae,u(p,D),R||G||(R=!0,Oe||(Oe=!0,se()))),D},l.unstable_shouldYield=Bt,l.unstable_wrapCallback=function(D){var B=x;return function(){var J=x;x=B;try{return D.apply(this,arguments)}finally{x=J}}}})(Pf)),Pf}var Oh;function yg(){return Oh||(Oh=1,If.exports=vg()),If.exports}var er={exports:{}},nt={};var Ah;function gg(){if(Ah)return nt;Ah=1;var l=cr();function u(p){var y="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),er.exports=gg(),er.exports}var Nh;function _g(){if(Nh)return Qa;Nh=1;var l=yg(),u=cr(),f=pg();function r(e){var t="https://react.dev/errors/"+e;if(1Ae||(e.current=de[Ae],de[Ae]=null,Ae--)}function Y(e,t){Ae++,de[Ae]=e.current,e.current=t}var V=b(null),te=b(null),ae=b(null),pe=b(null);function it(e,t){switch(Y(ae,t),Y(te,e),Y(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Qd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(V),Y(V,e)}function je(){C(V),C(te),C(ae)}function Wl(e){e.memoizedState!==null&&Y(pe,e);var t=V.current,n=Qd(t,e.type);t!==n&&(Y(te,e),Y(V,n))}function Wa(e){te.current===e&&(C(V),C(te)),pe.current===e&&(C(pe),Ba._currentValue=J)}var Zi,pr;function Yn(e){if(Zi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zi=t&&t[1]||"",pr=-1)":-1i||g[a]!==E[i]){var D=` -`+g[a].replace(" at new "," at ");return e.displayName&&D.includes("")&&(D=D.replace("",e.displayName)),D}while(1<=a&&0<=i);break}}}finally{Ui=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yn(n):""}function Vm(e,t){switch(e.tag){case 26:case 27:case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return e.child!==t&&t!==null?Yn("Suspense Fallback"):Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 15:return wi(e.type,!1);case 11:return wi(e.type.render,!1);case 1:return wi(e.type,!0);case 31:return Yn("Activity");default:return""}}function _r(e){try{var t="",n=null;do t+=Vm(e,n),n=e,e=e.return;while(e);return t}catch(a){return` +`);for(i=a=0;ai||g[a]!==E[i]){var N=` +`+g[a].replace(" at new "," at ");return e.displayName&&N.includes("")&&(N=N.replace("",e.displayName)),N}while(1<=a&&0<=i);break}}}finally{Ui=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yn(n):""}function Vm(e,t){switch(e.tag){case 26:case 27:case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return e.child!==t&&t!==null?Yn("Suspense Fallback"):Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 15:return wi(e.type,!1);case 11:return wi(e.type.render,!1);case 1:return wi(e.type,!0);case 31:return Yn("Activity");default:return""}}function _r(e){try{var t="",n=null;do t+=Vm(e,n),n=e,e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` -`+a.stack}}var Ri=Object.prototype.hasOwnProperty,Ci=l.unstable_scheduleCallback,ji=l.unstable_cancelCallback,Qm=l.unstable_shouldYield,Lm=l.unstable_requestPaint,gt=l.unstable_now,Km=l.unstable_getCurrentPriorityLevel,br=l.unstable_ImmediatePriority,Sr=l.unstable_UserBlockingPriority,Fa=l.unstable_NormalPriority,$m=l.unstable_LowPriority,zr=l.unstable_IdlePriority,Jm=l.log,km=l.unstable_setDisableYieldValue,Fl=null,pt=null;function dn(e){if(typeof Jm=="function"&&km(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Fl,e)}catch{}}var _t=Math.clz32?Math.clz32:Im,Wm=Math.log,Fm=Math.LN2;function Im(e){return e>>>=0,e===0?32:31-(Wm(e)/Fm|0)|0}var Ia=256,Pa=262144,eu=4194304;function Gn(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 tu(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,c=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~c,a!==0?i=Gn(a):(s&=m,s!==0?i=Gn(s):n||(n=m&~e,n!==0&&(i=Gn(n))))):(m=a&~c,m!==0?i=Gn(m):s!==0?i=Gn(s):n||(n=a&~e,n!==0&&(i=Gn(n)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:i}function Il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pm(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 Er(){var e=eu;return eu<<=1,(eu&62914560)===0&&(eu=4194304),e}function xi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ev(e,t,n,a,i,c){var s=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 m=e.entanglements,g=e.expirationTimes,E=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var iv=/[\n"\\]/g;function Dt(e){return e.replace(iv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xi(e,t,n,a,i,c,s,m){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Vi(e,s,Nt(t)):n!=null?Vi(e,s,Nt(n)):a!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Nt(m):e.removeAttribute("name")}function xr(e,t,n,a,i,c,s,m){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Gi(e);return}n=n!=null?""+Nt(n):"",t=t!=null?""+Nt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Gi(e)}function Vi(e,t,n){t==="number"&&au(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ml(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ji=!1;if(kt)try{var la={};Object.defineProperty(la,"passive",{get:function(){Ji=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{Ji=!1}var mn=null,ki=null,iu=null;function Vr(){if(iu)return iu;var e,t=ki,n=t.length,a,i="value"in mn?mn.value:mn.textContent,c=i.length;for(e=0;e=ia),kr=" ",Wr=!1;function Fr(e,t){switch(e){case"keyup":return Cv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ir(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function xv(e,t){switch(e){case"compositionend":return Ir(t);case"keypress":return t.which!==32?null:(Wr=!0,kr);case"textInput":return e=t.data,e===kr&&Wr?null:e;default:return null}}function Hv(e,t){if(pl)return e==="compositionend"||!ec&&Fr(e,t)?(e=Vr(),iu=ki=mn=null,pl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=io(n)}}function fo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=au(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=au(e.document)}return t}function lc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Lv=kt&&"documentMode"in document&&11>=document.documentMode,_l=null,ac=null,oa=null,uc=!1;function oo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||_l==null||_l!==au(a)||(a=_l,"selectionStart"in a&&lc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),oa&&ra(oa,a)||(oa=a,a=Pu(ac,"onSelect"),0>=s,i-=s,Xt=1<<32-_t(t)+i|n<le?(re=L,L=null):re=L.sibling;var de=O(S,L,z[le],Z);if(de===null){L===null&&(L=re);break}e&&L&&de.alternate===null&&t(S,L),_=c(de,_,le),se===null?J=de:se.sibling=de,se=de,L=re}if(le===z.length)return n(S,L),oe&&Ft(S,le),J;if(L===null){for(;lele?(re=L,L=null):re=L.sibling;var xn=O(S,L,de.value,Z);if(xn===null){L===null&&(L=re);break}e&&L&&xn.alternate===null&&t(S,L),_=c(xn,_,le),se===null?J=xn:se.sibling=xn,se=xn,L=re}if(de.done)return n(S,L),oe&&Ft(S,le),J;if(L===null){for(;!de.done;le++,de=z.next())de=U(S,de.value,Z),de!==null&&(_=c(de,_,le),se===null?J=de:se.sibling=de,se=de);return oe&&Ft(S,le),J}for(L=a(L);!de.done;le++,de=z.next())de=A(L,S,le,de.value,Z),de!==null&&(e&&de.alternate!==null&&L.delete(de.key===null?le:de.key),_=c(de,_,le),se===null?J=de:se.sibling=de,se=de);return e&&L.forEach(function(sg){return t(S,sg)}),oe&&Ft(S,le),J}function Ee(S,_,z,Z){if(typeof z=="object"&&z!==null&&z.type===j&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case G:e:{for(var J=z.key;_!==null;){if(_.key===J){if(J=z.type,J===j){if(_.tag===7){n(S,_.sibling),Z=i(_,z.props.children),Z.return=S,S=Z;break e}}else if(_.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===De&&In(J)===_.type){n(S,_.sibling),Z=i(_,z.props),ya(Z,z),Z.return=S,S=Z;break e}n(S,_);break}else t(S,_);_=_.sibling}z.type===j?(Z=$n(z.props.children,S.mode,Z,z.key),Z.return=S,S=Z):(Z=yu(z.type,z.key,z.props,null,S.mode,Z),ya(Z,z),Z.return=S,S=Z)}return s(S);case R:e:{for(J=z.key;_!==null;){if(_.key===J)if(_.tag===4&&_.stateNode.containerInfo===z.containerInfo&&_.stateNode.implementation===z.implementation){n(S,_.sibling),Z=i(_,z.children||[]),Z.return=S,S=Z;break e}else{n(S,_);break}else t(S,_);_=_.sibling}Z=dc(z,S.mode,Z),Z.return=S,S=Z}return s(S);case De:return z=In(z),Ee(S,_,z,Z)}if(yt(z))return X(S,_,z,Z);if(Re(z)){if(J=Re(z),typeof J!="function")throw Error(r(150));return z=J.call(z),F(S,_,z,Z)}if(typeof z.then=="function")return Ee(S,_,Eu(z),Z);if(z.$$typeof===Q)return Ee(S,_,_u(S,z),Z);Tu(S,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,_!==null&&_.tag===6?(n(S,_.sibling),Z=i(_,z),Z.return=S,S=Z):(n(S,_),Z=sc(z,S.mode,Z),Z.return=S,S=Z),s(S)):n(S,_)}return function(S,_,z,Z){try{va=0;var J=Ee(S,_,z,Z);return Zl=null,J}catch(L){if(L===Dl||L===Su)throw L;var se=St(29,L,null,S.mode);return se.lanes=Z,se.return=S,se}}}var el=Co(!0),jo=Co(!1),_n=!1;function Tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(he&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=vu(e),po(e,null,n),t}return mu(e,a,t,n),vu(e)}function ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}function Ac(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?i=c=s:c=c.next=s,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Mc=!1;function pa(){if(Mc){var e=Nl;if(e!==null)throw e}}function _a(e,t,n,a){Mc=!1;var i=e.updateQueue;_n=!1;var c=i.firstBaseUpdate,s=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var g=m,E=g.next;g.next=null,s===null?c=E:s.next=E,s=g;var D=e.alternate;D!==null&&(D=D.updateQueue,m=D.lastBaseUpdate,m!==s&&(m===null?D.firstBaseUpdate=E:m.next=E,D.lastBaseUpdate=g))}if(c!==null){var U=i.baseState;s=0,D=E=g=null,m=c;do{var O=m.lane&-536870913,A=O!==m.lane;if(A?(fe&O)===O:(a&O)===O){O!==0&&O===Ml&&(Mc=!0),D!==null&&(D=D.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var X=e,F=m;O=t;var Ee=n;switch(F.tag){case 1:if(X=F.payload,typeof X=="function"){U=X.call(Ee,U,O);break e}U=X;break e;case 3:X.flags=X.flags&-65537|128;case 0:if(X=F.payload,O=typeof X=="function"?X.call(Ee,U,O):X,O==null)break e;U=N({},U,O);break e;case 2:_n=!0}}O=m.callback,O!==null&&(e.flags|=64,A&&(e.flags|=8192),A=i.callbacks,A===null?i.callbacks=[O]:A.push(O))}else A={lane:O,tag:m.tag,payload:m.payload,callback:m.callback,next:null},D===null?(E=D=A,g=U):D=D.next=A,s|=O;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;A=m,m=A.next,A.next=null,i.lastBaseUpdate=A,i.shared.pending=null}}while(!0);D===null&&(g=U),i.baseState=g,i.firstBaseUpdate=E,i.lastBaseUpdate=D,c===null&&(i.shared.lanes=0),An|=s,e.lanes=s,e.memoizedState=U}}function xo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ec?c:8;var s=M.T,m={};M.T=m,Kc(e,!1,t,n);try{var g=i(),E=M.S;if(E!==null&&E(m,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var D=ey(g,a);za(e,t,D,At(e))}else za(e,t,a,At(e))}catch(U){za(e,t,{then:function(){},status:"rejected",reason:U},At())}finally{B.p=c,s!==null&&m.types!==null&&(s.types=m.types),M.T=s}}function iy(){}function Qc(e,t,n,a){if(e.tag!==5)throw Error(r(476));var i=vs(e).queue;ms(e,i,t,W,n===null?iy:function(){return ys(e),n(a)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),za(e,t.next.queue,{},At())}function Lc(){return Ie(Ba)}function gs(){return qe().memoizedState}function ps(){return qe().memoizedState}function cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=At();e=bn(n);var a=Sn(t,e,n);a!==null&&(mt(a,t,n),ga(a,t,n)),t={cache:bc()},e.payload=t;return}t=t.return}}function fy(e,t,n){var a=At();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cu(e)?bs(t,n):(n=rc(e,t,n,a),n!==null&&(mt(n,e,a),Ss(n,t,a)))}function _s(e,t,n){var a=At();za(e,t,n,a)}function za(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cu(e))bs(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var s=t.lastRenderedState,m=c(s,n);if(i.hasEagerState=!0,i.eagerState=m,bt(m,s))return mu(e,t,i,0),Oe===null&&hu(),!1}catch{}if(n=rc(e,t,i,a),n!==null)return mt(n,e,a),Ss(n,t,a),!0}return!1}function Kc(e,t,n,a){if(a={lane:2,revertLane:Of(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Cu(e)){if(t)throw Error(r(479))}else t=rc(e,n,a,2),t!==null&&mt(t,e,2)}function Cu(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function bs(e,t){wl=Mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ss(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}var Ea={readContext:Ie,use:Zu,useCallback:Ce,useContext:Ce,useEffect:Ce,useImperativeHandle:Ce,useLayoutEffect:Ce,useInsertionEffect:Ce,useMemo:Ce,useReducer:Ce,useRef:Ce,useState:Ce,useDebugValue:Ce,useDeferredValue:Ce,useTransition:Ce,useSyncExternalStore:Ce,useId:Ce,useHostTransitionStatus:Ce,useFormState:Ce,useActionState:Ce,useOptimistic:Ce,useMemoCache:Ce,useCacheRefresh:Ce};Ea.useEffectEvent=Ce;var zs={readContext:Ie,use:Zu,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Ie,useEffect:us,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wu(4194308,4,rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wu(4194308,4,e,t)},useInsertionEffect:function(e,t){wu(4,2,e,t)},useMemo:function(e,t){var n=it();t=t===void 0?null:t;var a=e();if(tl){dn(!0);try{e()}finally{dn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=it();if(n!==void 0){var i=n(t);if(tl){dn(!0);try{n(t)}finally{dn(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=fy.bind(null,ne,e),[a.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Bc(e);var t=e.queue,n=_s.bind(null,ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xc,useDeferredValue:function(e,t){var n=it();return Vc(n,e,t)},useTransition:function(){var e=Bc(!1);return e=ms.bind(null,ne,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ne,i=it();if(oe){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Oe===null)throw Error(r(349));(fe&127)!==0||Vo(a,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,us(Lo.bind(null,a,c,e),[e]),a.flags|=2048,Cl(9,{destroy:void 0},Qo.bind(null,a,c,n,t),null),n},useId:function(){var e=it(),t=Oe.identifierPrefix;if(oe){var n=Vt,a=Xt;n=(a&~(1<<32-_t(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Nu++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?s.createElement(i,{is:a.is}):s.createElement(i)}}c[We]=t,c[ft]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)c.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=c;e:switch(et(c,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ln(t)}}return Ne(t),cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ln(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ae.current,Ol(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=Fe,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[We]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Gd(e.nodeValue,n)),e||gn(t,!0)}else e=ei(e).createTextNode(a),e[We]=t,t.stateNode=e}return Ne(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ol(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[We]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ne(t),e=!1}else n=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Et(t),t):(Et(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ne(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ol(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[We]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ne(t),i=!1}else i=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Et(t),t):(Et(t),null)}return Et(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bu(t,t.updateQueue),Ne(t),null);case 4:return xe(),e===null&&Df(t.stateNode.containerInfo),Ne(t),null;case 10:return Pt(t.type),Ne(t),null;case 19:if(C(He),a=t.memoizedState,a===null)return Ne(t),null;if(i=(t.flags&128)!==0,c=a.rendering,c===null)if(i)Oa(a,!1);else{if(je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Au(e),c!==null){for(t.flags|=128,Oa(a,!1),e=c.updateQueue,t.updateQueue=e,Bu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_o(n,e),n=n.sibling;return Y(He,He.current&1|2),oe&&Ft(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&>()>Qu&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304)}else{if(!i)if(e=Au(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bu(t,e),Oa(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!oe)return Ne(t),null}else 2*gt()-a.renderingStartTime>Qu&&n!==536870912&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=gt(),e.sibling=null,n=He.current,Y(He,i?n&1|2:n&1),oe&&Ft(t,a.treeForkCount),e):(Ne(t),null);case 22:case 23:return Et(t),Dc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),n=t.updateQueue,n!==null&&Bu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&C(Fn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pt(Be),Ne(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function hy(e,t){switch(mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pt(Be),xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wa(t),null;case 31:if(t.memoizedState!==null){if(Et(t),t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Et(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(He),null;case 4:return xe(),null;case 10:return Pt(t.type),null;case 22:case 23:return Et(t),Dc(),e!==null&&C(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pt(Be),null;case 25:return null;default:return null}}function Ks(e,t){switch(mc(t),t.tag){case 3:Pt(Be),xe();break;case 26:case 27:case 5:Wa(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&Et(t);break;case 13:Et(t);break;case 19:C(He);break;case 10:Pt(t.type);break;case 22:case 23:Et(t),Dc(),e!==null&&C(Fn);break;case 24:Pt(Be)}}function Aa(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var c=n.create,s=n.inst;a=c(),s.destroy=a}n=n.next}while(n!==i)}}catch(m){pe(t,t.return,m)}}function Tn(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){var s=a.inst,m=s.destroy;if(m!==void 0){s.destroy=void 0,i=t;var g=n,E=m;try{E()}catch(D){pe(i,g,D)}}}a=a.next}while(a!==c)}}catch(D){pe(t,t.return,D)}}function $s(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ho(t,n)}catch(a){pe(e,e.return,a)}}}function Js(e,t,n){n.props=nl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){pe(e,t,a)}}function Ma(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){pe(e,t,i)}}function Qt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){pe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){pe(e,t,i)}else n.current=null}function ks(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){pe(e,e.return,i)}}function ff(e,t,n){try{var a=e.stateNode;jy(a,e.type,n,t),a[ft]=t}catch(i){pe(e,e.return,i)}}function Ws(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Un(e.type)||e.tag===4}function rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ws(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(e.tag===27&&Un(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 of(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function Yu(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yu(e,t,n),e=e.sibling;e!==null;)Yu(e,t,n),e=e.sibling}function Fs(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);et(t,a,n),t[We]=e,t[ft]=n}catch(c){pe(e,e.return,c)}}var an=!1,Xe=!1,sf=!1,Is=typeof WeakSet=="function"?WeakSet:Set,Je=null;function my(e,t){if(e=e.containerInfo,wf=ci,e=ro(e),lc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var s=0,m=-1,g=-1,E=0,D=0,U=e,O=null;t:for(;;){for(var A;U!==n||i!==0&&U.nodeType!==3||(m=s+i),U!==c||a!==0&&U.nodeType!==3||(g=s+a),U.nodeType===3&&(s+=U.nodeValue.length),(A=U.firstChild)!==null;)O=U,U=A;for(;;){if(U===e)break t;if(O===n&&++E===i&&(m=s),O===c&&++D===a&&(g=s),(A=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=A}n=m===-1||g===-1?null:{start:m,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},ci=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),et(c,a,n),c[We]=e,$e(c),a=c;break e;case"link":var s=ah("link","href",i).get(a+(n.href||""));if(s){for(var m=0;mEe&&(s=Ee,Ee=F,F=s);var S=co(m,F),_=co(m,Ee);if(S&&_&&(A.rangeCount!==1||A.anchorNode!==S.node||A.anchorOffset!==S.offset||A.focusNode!==_.node||A.focusOffset!==_.offset)){var z=U.createRange();z.setStart(S.node,S.offset),A.removeAllRanges(),F>Ee?(A.addRange(z),A.extend(_.node,_.offset)):(z.setEnd(_.node,_.offset),A.addRange(z))}}}}for(U=[],A=m;A=A.parentNode;)A.nodeType===1&&U.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;mn?32:n,M.T=null,n=pf,pf=null;var c=Nn,s=on;if(Le=0,Bl=Nn=null,on=0,(he&6)!==0)throw Error(r(331));var m=he;if(he|=4,rd(c.current),id(c,c.current,s,n),he=m,Ra(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Fl,c)}catch{}return!0}finally{B.p=i,M.T=a,Md(e,t)}}function Dd(e,t,n){t=Ut(n,t),t=Wc(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Pl(e,2),Lt(e))}function pe(e,t,n){if(e.tag===3)Dd(e,e,n);else for(;t!==null;){if(t.tag===3){Dd(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Mn===null||!Mn.has(a))){e=Ut(n,e),n=Zs(2),a=Sn(t,n,2),a!==null&&(Us(n,a,t,e),Pl(a,2),Lt(a));break}}t=t.return}}function zf(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new gy;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(mf=!0,i.add(n),e=zy.bind(null,e,t,n),t.then(e,e))}function zy(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Oe===e&&(fe&n)===n&&(je===4||je===3&&(fe&62914560)===fe&&300>gt()-Vu?(he&2)===0&&Yl(e,0):vf|=n,ql===fe&&(ql=0)),Lt(e)}function Zd(e,t){t===0&&(t=Er()),e=Kn(e,t),e!==null&&(Pl(e,t),Lt(e))}function Ey(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zd(e,n)}function Ty(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Zd(e,n)}function Oy(e,t){return Ci(e,t)}var Wu=null,Xl=null,Ef=!1,Fu=!1,Tf=!1,Zn=0;function Lt(e){e!==Xl&&e.next===null&&(Xl===null?Wu=Xl=e:Xl=Xl.next=e),Fu=!0,Ef||(Ef=!0,My())}function Ra(e,t){if(!Tf&&Fu){Tf=!0;do for(var n=!1,a=Wu;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var c=0;else{var s=a.suspendedLanes,m=a.pingedLanes;c=(1<<31-_t(42|e)+1)-1,c&=i&~(s&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Cd(a,c))}else c=fe,c=tu(a,a===Oe?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Il(a,c)||(n=!0,Cd(a,c));a=a.next}while(n);Tf=!1}}function Ay(){Ud()}function Ud(){Fu=Ef=!1;var e=0;Zn!==0&&Hy()&&(e=Zn);for(var t=gt(),n=null,a=Wu;a!==null;){var i=a.next,c=wd(a,t);c===0?(a.next=null,n===null?Wu=i:n.next=i,i===null&&(Xl=n)):(n=a,(e!==0||(c&3)!==0)&&(Fu=!0)),a=i}Le!==0&&Le!==5||Ra(e),Zn!==0&&(Zn=0)}function wd(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0m)break;var D=g.transferSize,U=g.initiatorType;D&&Xd(U)&&(g=g.responseEnd,s+=D*(g"u"?null:document;function eh(e,t,n){var a=Vl;if(a&&typeof t=="string"&&t){var i=Dt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Pd.has(i)||(Pd.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),et(t,"link",e),$e(t),a.head.appendChild(t)))}}function Ky(e){sn.D(e),eh("dns-prefetch",e,null)}function $y(e,t){sn.C(e,t),eh("preconnect",e,t)}function Jy(e,t,n){sn.L(e,t,n);var a=Vl;if(a&&e&&t){var i='link[rel="preload"][as="'+Dt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Dt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Dt(n.imageSizes)+'"]')):i+='[href="'+Dt(e)+'"]';var c=i;switch(t){case"style":c=Ql(e);break;case"script":c=Ll(e)}Ht.has(c)||(e=N({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ht.set(c,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Ha(c))||t==="script"&&a.querySelector(qa(c))||(t=a.createElement("link"),et(t,"link",e),$e(t),a.head.appendChild(t)))}}function ky(e,t){sn.m(e,t);var n=Vl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Dt(a)+'"][href="'+Dt(e)+'"]',c=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ll(e)}if(!Ht.has(c)&&(e=N({rel:"modulepreload",href:e},t),Ht.set(c,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qa(c)))return}a=n.createElement("link"),et(a,"link",e),$e(a),n.head.appendChild(a)}}}function Wy(e,t,n){sn.S(e,t,n);var a=Vl;if(a&&e){var i=dl(a).hoistableStyles,c=Ql(e);t=t||"default";var s=i.get(c);if(!s){var m={loading:0,preload:null};if(s=a.querySelector(Ha(c)))m.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ht.get(c))&&Yf(e,n);var g=s=a.createElement("link");$e(g),et(g,"link",e),g._p=new Promise(function(E,D){g.onload=E,g.onerror=D}),g.addEventListener("load",function(){m.loading|=1}),g.addEventListener("error",function(){m.loading|=2}),m.loading|=4,ni(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:m},i.set(c,s)}}}function Fy(e,t){sn.X(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=N({src:e,async:!0},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),$e(c),et(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function Iy(e,t){sn.M(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=N({src:e,async:!0,type:"module"},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),$e(c),et(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function th(e,t,n,a){var i=(i=ae.current)?ti(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=dl(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var c=dl(i).hoistableStyles,s=c.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,s),(c=i.querySelector(Ha(e)))&&!c._p&&(s.instance=c,s.state.loading=5),Ht.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ht.set(e,n),c||Py(i,e,n,s.state))),t&&a===null)throw Error(r(528,""));return s}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ll(n),n=dl(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ql(e){return'href="'+Dt(e)+'"'}function Ha(e){return'link[rel="stylesheet"]['+e+"]"}function nh(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function Py(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),et(t,"link",n),$e(t),e.head.appendChild(t))}function Ll(e){return'[src="'+Dt(e)+'"]'}function qa(e){return"script[async]"+e}function lh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Dt(n.href)+'"]');if(a)return t.instance=a,$e(a),a;var i=N({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),$e(a),et(a,"style",i),ni(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ql(n.href);var c=e.querySelector(Ha(i));if(c)return t.state.loading|=4,t.instance=c,$e(c),c;a=nh(n),(i=Ht.get(i))&&Yf(a,i),c=(e.ownerDocument||e).createElement("link"),$e(c);var s=c;return s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),et(c,"link",a),t.state.loading|=4,ni(c,n.precedence,e),t.instance=c;case"script":return c=Ll(n.src),(i=e.querySelector(qa(c)))?(t.instance=i,$e(i),i):(a=n,(i=Ht.get(c))&&(a=N({},n),Gf(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),$e(i),et(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ni(a,n.precedence,e));return t.instance}function ni(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,c=i,s=0;s title"):null)}function eg(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ih(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tg(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Ql(a.href),c=t.querySelector(Ha(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ai.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,$e(c);return}c=t.ownerDocument||t,a=nh(a),(i=Ht.get(i))&&Yf(a,i),c=c.createElement("link"),$e(c);var s=c;s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),et(c,"link",a),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ai.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xf=0;function ng(e,t){return e.stylesheets&&e.count===0&&ii(e,e.stylesheets),0Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function ai(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ii(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ui=null;function ii(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ui=new Map,t.forEach(lg,e),ui=null,ai.call(e))}function lg(e,t){if(!(t.state.loading&4)){var n=ui.get(e);if(n)var a=n.get(null);else{n=new Map,ui.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),Ff.exports=_g(),Ff.exports}var Sg=bg();const zg=nm(Sg),Ka=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,Zh=Ka;var Uh=Object.prototype.hasOwnProperty;function lr(l,u){var f,r;if(l===u)return!0;if(l&&u&&(f=l.constructor)===u.constructor){if(f===Date)return l.getTime()===u.getTime();if(f===RegExp)return l.toString()===u.toString();if(f===Array){if((r=l.length)===u.length)for(;r--&&lr(l[r],u[r]););return r===-1}if(!f||typeof l=="object"){r=0;for(f in l)if(Uh.call(l,f)&&++r&&!Uh.call(u,f)||!(f in u)||!lr(l[f],u[f]))return!1;return Object.keys(u).length===r}}return l!==l&&u!==u}const Eg=new Error("request for lock canceled");var Tg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(N){h(N)}}function p(T){try{y(r.throw(T))}catch(N){h(N)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Og{constructor(u,f=Eg){this._value=u,this._cancelError=f,this._queue=[],this._weightedWaiters=[]}acquire(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return new Promise((r,o)=>{const d={resolve:r,reject:o,weight:u,priority:f},h=lm(this._queue,v=>f<=v.priority);h===-1&&u<=this._value?this._dispatchItem(d):this._queue.splice(h+1,0,d)})}runExclusive(u){return Tg(this,arguments,void 0,function*(f,r=1,o=0){const[d,h]=yield this.acquire(r,o);try{return yield f(d)}finally{h()}})}waitForUnlock(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return this._couldLockImmediately(u,f)?Promise.resolve():new Promise(r=>{this._weightedWaiters[u-1]||(this._weightedWaiters[u-1]=[]),Ag(this._weightedWaiters[u-1],{resolve:r,priority:f})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(u){this._value=u,this._dispatchQueue()}release(u=1){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);this._value+=u,this._dispatchQueue()}cancel(){this._queue.forEach(u=>u.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(u){const f=this._value;this._value-=u.weight,u.resolve([f,this._newReleaser(u.weight)])}_newReleaser(u){let f=!1;return()=>{f||(f=!0,this.release(u))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let u=this._value;u>0;u--){const f=this._weightedWaiters[u-1];f&&(f.forEach(r=>r.resolve()),this._weightedWaiters[u-1]=[])}else{const u=this._queue[0].priority;for(let f=this._value;f>0;f--){const r=this._weightedWaiters[f-1];if(!r)continue;const o=r.findIndex(d=>d.priority<=u);(o===-1?r:r.splice(0,o)).forEach((d=>d.resolve()))}}}_couldLockImmediately(u,f){return(this._queue.length===0||this._queue[0].priorityu.priority<=r.priority);l.splice(f+1,0,u)}function lm(l,u){for(let f=l.length-1;f>=0;f--)if(u(l[f]))return f;return-1}var Mg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(N){h(N)}}function p(T){try{y(r.throw(T))}catch(N){h(N)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Ng{constructor(u){this._semaphore=new Og(1,u)}acquire(){return Mg(this,arguments,void 0,function*(u=0){const[,f]=yield this._semaphore.acquire(1,u);return f})}runExclusive(u,f=0){return this._semaphore.runExclusive(()=>u(),1,f)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(u=0){return this._semaphore.waitForUnlock(1,u)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const am=Dg();function Dg(){const l={local:mi("local"),session:mi("session"),sync:mi("sync"),managed:mi("managed")},u=R=>{const j=l[R];if(j==null){const H=Object.keys(l).join(", ");throw Error(`Invalid area "${R}". Options: ${H}`)}return j},f=R=>{const j=R.indexOf(":"),H=R.substring(0,j),q=R.substring(j+1);if(q==null)throw Error(`Storage key should be in the form of "area:key", but received "${R}"`);return{driverArea:H,driverKey:q,driver:u(H)}},r=R=>R+"$",o=(R,j)=>{const H={...R};return Object.entries(j).forEach(([q,K])=>{K==null?delete H[q]:H[q]=K}),H},d=(R,j)=>R??j??null,h=R=>typeof R=="object"&&!Array.isArray(R)?R:{},v=async(R,j,H)=>d(await R.getItem(j),H?.fallback??H?.defaultValue),p=async(R,j)=>{const H=r(j);return h(await R.getItem(H))},y=async(R,j,H)=>{await R.setItem(j,H??null)},T=async(R,j,H)=>{const q=r(j),K=h(await R.getItem(q));await R.setItem(q,o(K,H))},N=async(R,j,H)=>{if(await R.removeItem(j),H?.removeMeta){const q=r(j);await R.removeItem(q)}},x=async(R,j,H)=>{const q=r(j);if(H==null)await R.removeItem(q);else{const K=h(await R.getItem(q));[H].flat().forEach(Q=>delete K[Q]),await R.setItem(q,K)}},G=(R,j,H)=>R.watch(j,H);return{getItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);return await v(H,q,j)},getItems:async R=>{const j=new Map,H=new Map,q=[];R.forEach(Q=>{let I,ee;typeof Q=="string"?I=Q:"getValue"in Q?(I=Q.key,ee={fallback:Q.fallback}):(I=Q.key,ee=Q.options),q.push(I);const{driverArea:Ae,driverKey:$}=f(I),De=j.get(Ae)??[];j.set(Ae,De.concat($)),H.set(I,ee)});const K=new Map;return await Promise.all(Array.from(j.entries()).map(async([Q,I])=>{(await l[Q].getItems(I)).forEach(ee=>{const Ae=`${Q}:${ee.key}`,$=H.get(Ae),De=d(ee.value,$?.fallback??$?.defaultValue);K.set(Ae,De)})})),q.map(Q=>({key:Q,value:K.get(Q)}))},getMeta:async R=>{const{driver:j,driverKey:H}=f(R);return await p(j,H)},getMetas:async R=>{const j=R.map(K=>{const Q=typeof K=="string"?K:K.key,{driverArea:I,driverKey:ee}=f(Q);return{key:Q,driverArea:I,driverKey:ee,driverMetaKey:r(ee)}}),H=j.reduce((K,Q)=>(K[Q.driverArea]??=[],K[Q.driverArea].push(Q),K),{}),q={};return await Promise.all(Object.entries(H).map(async([K,Q])=>{const I=await Ka.storage[K].get(Q.map(ee=>ee.driverMetaKey));Q.forEach(ee=>{q[ee.key]=I[ee.driverMetaKey]??{}})})),j.map(K=>({key:K.key,meta:q[K.key]}))},setItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await y(H,q,j)},setItems:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,value:H.value})}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).setItems(q)}))},setMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await T(H,q,j)},setMetas:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,properties:H.meta})}),await Promise.all(Object.entries(j).map(async([H,q])=>{const K=u(H),Q=q.map(({key:$})=>r($)),I=await K.getItems(Q),ee=Object.fromEntries(I.map(({key:$,value:De})=>[$,h(De)])),Ae=q.map(({key:$,properties:De})=>{const Ke=r($);return{key:Ke,value:o(ee[Ke]??{},De)}});await K.setItems(Ae)}))},removeItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await N(H,q,j)},removeItems:async R=>{const j={};R.forEach(H=>{let q,K;typeof H=="string"?q=H:"getValue"in H?q=H.key:"item"in H?(q=H.item.key,K=H.options):(q=H.key,K=H.options);const{driverArea:Q,driverKey:I}=f(q);j[Q]??=[],j[Q].push(I),K?.removeMeta&&j[Q].push(r(I))}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).removeItems(q)}))},clear:async R=>{await u(R).clear()},removeMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await x(H,q,j)},snapshot:async(R,j)=>{const H=await u(R).snapshot();return j?.excludeKeys?.forEach(q=>{delete H[q],delete H[r(q)]}),H},restoreSnapshot:async(R,j)=>{await u(R).restoreSnapshot(j)},watch:(R,j)=>{const{driver:H,driverKey:q}=f(R);return G(H,q,j)},unwatch(){Object.values(l).forEach(R=>{R.unwatch()})},defineItem:(R,j)=>{const{driver:H,driverKey:q}=f(R),{version:K=1,migrations:Q={},onMigrationComplete:I,debug:ee=!1}=j??{};if(K<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const Ae=async()=>{const ye=r(q),[{value:Re},{value:Mt}]=await H.getItems([q,ye]);if(Re==null)return;const nt=Mt?.v??1;if(nt>K)throw Error(`Version downgrade detected (v${nt} -> v${K}) for "${R}"`);if(nt===K)return;ee&&console.debug(`[@wxt-dev/storage] Running storage migration for ${R}: v${nt} -> v${K}`);const yt=Array.from({length:K-nt},(B,W)=>nt+W+1);let M=Re;for(const B of yt)try{M=await Q?.[B]?.(M)??M,ee&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${B}`)}catch(W){throw new Zg(R,B,{cause:W})}await H.setItems([{key:q,value:M},{key:ye,value:{...Mt,v:K}}]),ee&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${R} v${K}`,{migratedValue:M}),I?.(M,K)},$=j?.migrations==null?Promise.resolve():Ae().catch(ye=>{console.error(`[@wxt-dev/storage] Migration failed for ${R}`,ye)}),De=new Ng,Ke=()=>j?.fallback??j?.defaultValue??null,Kt=()=>De.runExclusive(async()=>{const ye=await H.getItem(q);if(ye!=null||j?.init==null)return ye;const Re=await j.init();return await H.setItem(q,Re),ye==null&&K>1&&await T(H,q,{v:K}),Re});return $.then(Kt),{key:R,get defaultValue(){return Ke()},get fallback(){return Ke()},getValue:async()=>(await $,j?.init?await Kt():await v(H,q,j)),getMeta:async()=>(await $,await p(H,q)),setValue:async ye=>(await $,await y(H,q,ye)),setMeta:async ye=>(await $,await T(H,q,ye)),removeValue:async ye=>(await $,await N(H,q,ye)),removeMeta:async ye=>(await $,await x(H,q,ye)),watch:ye=>G(H,q,(Re,Mt)=>ye(Re??Ke(),Mt??Ke())),migrate:Ae}}}}function mi(l){const u=()=>{if(Ka.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment +`+a.stack}}var Ri=Object.prototype.hasOwnProperty,Ci=l.unstable_scheduleCallback,ji=l.unstable_cancelCallback,Qm=l.unstable_shouldYield,Lm=l.unstable_requestPaint,pt=l.unstable_now,Km=l.unstable_getCurrentPriorityLevel,br=l.unstable_ImmediatePriority,Sr=l.unstable_UserBlockingPriority,Fa=l.unstable_NormalPriority,$m=l.unstable_LowPriority,zr=l.unstable_IdlePriority,Jm=l.log,km=l.unstable_setDisableYieldValue,Fl=null,_t=null;function dn(e){if(typeof Jm=="function"&&km(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Fl,e)}catch{}}var bt=Math.clz32?Math.clz32:Im,Wm=Math.log,Fm=Math.LN2;function Im(e){return e>>>=0,e===0?32:31-(Wm(e)/Fm|0)|0}var Ia=256,Pa=262144,eu=4194304;function Gn(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 tu(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,c=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~c,a!==0?i=Gn(a):(s&=m,s!==0?i=Gn(s):n||(n=m&~e,n!==0&&(i=Gn(n))))):(m=a&~c,m!==0?i=Gn(m):s!==0?i=Gn(s):n||(n=a&~e,n!==0&&(i=Gn(n)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:i}function Il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pm(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 Er(){var e=eu;return eu<<=1,(eu&62914560)===0&&(eu=4194304),e}function xi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ev(e,t,n,a,i,c){var s=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 m=e.entanglements,g=e.expirationTimes,E=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var iv=/[\n"\\]/g;function Dt(e){return e.replace(iv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xi(e,t,n,a,i,c,s,m){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Vi(e,s,Nt(t)):n!=null?Vi(e,s,Nt(n)):a!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Nt(m):e.removeAttribute("name")}function xr(e,t,n,a,i,c,s,m){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Gi(e);return}n=n!=null?""+Nt(n):"",t=t!=null?""+Nt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Gi(e)}function Vi(e,t,n){t==="number"&&au(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ml(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ji=!1;if(kt)try{var la={};Object.defineProperty(la,"passive",{get:function(){Ji=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{Ji=!1}var mn=null,ki=null,iu=null;function Vr(){if(iu)return iu;var e,t=ki,n=t.length,a,i="value"in mn?mn.value:mn.textContent,c=i.length;for(e=0;e=ia),kr=" ",Wr=!1;function Fr(e,t){switch(e){case"keyup":return Cv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ir(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function xv(e,t){switch(e){case"compositionend":return Ir(t);case"keypress":return t.which!==32?null:(Wr=!0,kr);case"textInput":return e=t.data,e===kr&&Wr?null:e;default:return null}}function Hv(e,t){if(pl)return e==="compositionend"||!ec&&Fr(e,t)?(e=Vr(),iu=ki=mn=null,pl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=io(n)}}function fo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=au(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=au(e.document)}return t}function lc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Lv=kt&&"documentMode"in document&&11>=document.documentMode,_l=null,ac=null,oa=null,uc=!1;function oo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||_l==null||_l!==au(a)||(a=_l,"selectionStart"in a&&lc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),oa&&ra(oa,a)||(oa=a,a=Pu(ac,"onSelect"),0>=s,i-=s,Vt=1<<32-bt(t)+i|n<le?(re=L,L=null):re=L.sibling;var me=O(S,L,z[le],Z);if(me===null){L===null&&(L=re);break}e&&L&&me.alternate===null&&t(S,L),_=c(me,_,le),he===null?$=me:he.sibling=me,he=me,L=re}if(le===z.length)return n(S,L),oe&&Ft(S,le),$;if(L===null){for(;lele?(re=L,L=null):re=L.sibling;var xn=O(S,L,me.value,Z);if(xn===null){L===null&&(L=re);break}e&&L&&xn.alternate===null&&t(S,L),_=c(xn,_,le),he===null?$=xn:he.sibling=xn,he=xn,L=re}if(me.done)return n(S,L),oe&&Ft(S,le),$;if(L===null){for(;!me.done;le++,me=z.next())me=U(S,me.value,Z),me!==null&&(_=c(me,_,le),he===null?$=me:he.sibling=me,he=me);return oe&&Ft(S,le),$}for(L=a(L);!me.done;le++,me=z.next())me=A(L,S,le,me.value,Z),me!==null&&(e&&me.alternate!==null&&L.delete(me.key===null?le:me.key),_=c(me,_,le),he===null?$=me:he.sibling=me,he=me);return e&&L.forEach(function(sg){return t(S,sg)}),oe&&Ft(S,le),$}function Te(S,_,z,Z){if(typeof z=="object"&&z!==null&&z.type===j&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case G:e:{for(var $=z.key;_!==null;){if(_.key===$){if($=z.type,$===j){if(_.tag===7){n(S,_.sibling),Z=i(_,z.props.children),Z.return=S,S=Z;break e}}else if(_.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===ge&&In($)===_.type){n(S,_.sibling),Z=i(_,z.props),ya(Z,z),Z.return=S,S=Z;break e}n(S,_);break}else t(S,_);_=_.sibling}z.type===j?(Z=$n(z.props.children,S.mode,Z,z.key),Z.return=S,S=Z):(Z=yu(z.type,z.key,z.props,null,S.mode,Z),ya(Z,z),Z.return=S,S=Z)}return s(S);case R:e:{for($=z.key;_!==null;){if(_.key===$)if(_.tag===4&&_.stateNode.containerInfo===z.containerInfo&&_.stateNode.implementation===z.implementation){n(S,_.sibling),Z=i(_,z.children||[]),Z.return=S,S=Z;break e}else{n(S,_);break}else t(S,_);_=_.sibling}Z=dc(z,S.mode,Z),Z.return=S,S=Z}return s(S);case ge:return z=In(z),Te(S,_,z,Z)}if(Le(z))return X(S,_,z,Z);if(se(z)){if($=se(z),typeof $!="function")throw Error(r(150));return z=$.call(z),F(S,_,z,Z)}if(typeof z.then=="function")return Te(S,_,Eu(z),Z);if(z.$$typeof===Q)return Te(S,_,_u(S,z),Z);Tu(S,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,_!==null&&_.tag===6?(n(S,_.sibling),Z=i(_,z),Z.return=S,S=Z):(n(S,_),Z=sc(z,S.mode,Z),Z.return=S,S=Z),s(S)):n(S,_)}return function(S,_,z,Z){try{va=0;var $=Te(S,_,z,Z);return Zl=null,$}catch(L){if(L===Dl||L===Su)throw L;var he=zt(29,L,null,S.mode);return he.lanes=Z,he.return=S,he}}}var el=Co(!0),jo=Co(!1),_n=!1;function Tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ve&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=vu(e),po(e,null,n),t}return mu(e,a,t,n),vu(e)}function ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}function Ac(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?i=c=s:c=c.next=s,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Mc=!1;function pa(){if(Mc){var e=Nl;if(e!==null)throw e}}function _a(e,t,n,a){Mc=!1;var i=e.updateQueue;_n=!1;var c=i.firstBaseUpdate,s=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var g=m,E=g.next;g.next=null,s===null?c=E:s.next=E,s=g;var N=e.alternate;N!==null&&(N=N.updateQueue,m=N.lastBaseUpdate,m!==s&&(m===null?N.firstBaseUpdate=E:m.next=E,N.lastBaseUpdate=g))}if(c!==null){var U=i.baseState;s=0,N=E=g=null,m=c;do{var O=m.lane&-536870913,A=O!==m.lane;if(A?(fe&O)===O:(a&O)===O){O!==0&&O===Ml&&(Mc=!0),N!==null&&(N=N.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var X=e,F=m;O=t;var Te=n;switch(F.tag){case 1:if(X=F.payload,typeof X=="function"){U=X.call(Te,U,O);break e}U=X;break e;case 3:X.flags=X.flags&-65537|128;case 0:if(X=F.payload,O=typeof X=="function"?X.call(Te,U,O):X,O==null)break e;U=M({},U,O);break e;case 2:_n=!0}}O=m.callback,O!==null&&(e.flags|=64,A&&(e.flags|=8192),A=i.callbacks,A===null?i.callbacks=[O]:A.push(O))}else A={lane:O,tag:m.tag,payload:m.payload,callback:m.callback,next:null},N===null?(E=N=A,g=U):N=N.next=A,s|=O;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;A=m,m=A.next,A.next=null,i.lastBaseUpdate=A,i.shared.pending=null}}while(!0);N===null&&(g=U),i.baseState=g,i.firstBaseUpdate=E,i.lastBaseUpdate=N,c===null&&(i.shared.lanes=0),An|=s,e.lanes=s,e.memoizedState=U}}function xo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ec?c:8;var s=D.T,m={};D.T=m,Kc(e,!1,t,n);try{var g=i(),E=D.S;if(E!==null&&E(m,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var N=ey(g,a);za(e,t,N,Mt(e))}else za(e,t,a,Mt(e))}catch(U){za(e,t,{then:function(){},status:"rejected",reason:U},Mt())}finally{B.p=c,s!==null&&m.types!==null&&(s.types=m.types),D.T=s}}function iy(){}function Qc(e,t,n,a){if(e.tag!==5)throw Error(r(476));var i=vs(e).queue;ms(e,i,t,J,n===null?iy:function(){return ys(e),n(a)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:J},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),za(e,t.next.queue,{},Mt())}function Lc(){return Fe(Ba)}function gs(){return He().memoizedState}function ps(){return He().memoizedState}function cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Mt();e=bn(n);var a=Sn(t,e,n);a!==null&&(vt(a,t,n),ga(a,t,n)),t={cache:bc()},e.payload=t;return}t=t.return}}function fy(e,t,n){var a=Mt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cu(e)?bs(t,n):(n=rc(e,t,n,a),n!==null&&(vt(n,e,a),Ss(n,t,a)))}function _s(e,t,n){var a=Mt();za(e,t,n,a)}function za(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cu(e))bs(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var s=t.lastRenderedState,m=c(s,n);if(i.hasEagerState=!0,i.eagerState=m,St(m,s))return mu(e,t,i,0),Me===null&&hu(),!1}catch{}if(n=rc(e,t,i,a),n!==null)return vt(n,e,a),Ss(n,t,a),!0}return!1}function Kc(e,t,n,a){if(a={lane:2,revertLane:Of(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Cu(e)){if(t)throw Error(r(479))}else t=rc(e,n,a,2),t!==null&&vt(t,e,2)}function Cu(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function bs(e,t){wl=Mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ss(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Or(e,n)}}var Ea={readContext:Fe,use:Zu,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useLayoutEffect:Re,useInsertionEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useSyncExternalStore:Re,useId:Re,useHostTransitionStatus:Re,useFormState:Re,useActionState:Re,useOptimistic:Re,useMemoCache:Re,useCacheRefresh:Re};Ea.useEffectEvent=Re;var zs={readContext:Fe,use:Zu,useCallback:function(e,t){return ct().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:us,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wu(4194308,4,rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wu(4194308,4,e,t)},useInsertionEffect:function(e,t){wu(4,2,e,t)},useMemo:function(e,t){var n=ct();t=t===void 0?null:t;var a=e();if(tl){dn(!0);try{e()}finally{dn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=ct();if(n!==void 0){var i=n(t);if(tl){dn(!0);try{n(t)}finally{dn(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=fy.bind(null,ne,e),[a.memoizedState,e]},useRef:function(e){var t=ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Bc(e);var t=e.queue,n=_s.bind(null,ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xc,useDeferredValue:function(e,t){var n=ct();return Vc(n,e,t)},useTransition:function(){var e=Bc(!1);return e=ms.bind(null,ne,e.queue,!0,!1),ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ne,i=ct();if(oe){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Me===null)throw Error(r(349));(fe&127)!==0||Vo(a,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,us(Lo.bind(null,a,c,e),[e]),a.flags|=2048,Cl(9,{destroy:void 0},Qo.bind(null,a,c,n,t),null),n},useId:function(){var e=ct(),t=Me.identifierPrefix;if(oe){var n=Qt,a=Vt;n=(a&~(1<<32-bt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Nu++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?s.createElement(i,{is:a.is}):s.createElement(i)}}c[ke]=t,c[rt]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)c.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=c;e:switch(Pe(c,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ln(t)}}return De(t),cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ln(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ae.current,Ol(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=We,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[ke]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Gd(e.nodeValue,n)),e||gn(t,!0)}else e=ei(e).createTextNode(a),e[ke]=t,t.stateNode=e}return De(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ol(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ke]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),e=!1}else n=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Tt(t),t):(Tt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return De(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ol(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[ke]=t}else Jn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),i=!1}else i=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Tt(t),t):(Tt(t),null)}return Tt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bu(t,t.updateQueue),De(t),null);case 4:return je(),e===null&&Df(t.stateNode.containerInfo),De(t),null;case 10:return Pt(t.type),De(t),null;case 19:if(C(xe),a=t.memoizedState,a===null)return De(t),null;if(i=(t.flags&128)!==0,c=a.rendering,c===null)if(i)Oa(a,!1);else{if(Ce!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Au(e),c!==null){for(t.flags|=128,Oa(a,!1),e=c.updateQueue,t.updateQueue=e,Bu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_o(n,e),n=n.sibling;return Y(xe,xe.current&1|2),oe&&Ft(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&pt()>Qu&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304)}else{if(!i)if(e=Au(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bu(t,e),Oa(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!oe)return De(t),null}else 2*pt()-a.renderingStartTime>Qu&&n!==536870912&&(t.flags|=128,i=!0,Oa(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=pt(),e.sibling=null,n=xe.current,Y(xe,i?n&1|2:n&1),oe&&Ft(t,a.treeForkCount),e):(De(t),null);case 22:case 23:return Tt(t),Dc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),n=t.updateQueue,n!==null&&Bu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&C(Fn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pt(qe),De(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function hy(e,t){switch(mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pt(qe),je(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wa(t),null;case 31:if(t.memoizedState!==null){if(Tt(t),t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Tt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(xe),null;case 4:return je(),null;case 10:return Pt(t.type),null;case 22:case 23:return Tt(t),Dc(),e!==null&&C(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pt(qe),null;case 25:return null;default:return null}}function Ks(e,t){switch(mc(t),t.tag){case 3:Pt(qe),je();break;case 26:case 27:case 5:Wa(t);break;case 4:je();break;case 31:t.memoizedState!==null&&Tt(t);break;case 13:Tt(t);break;case 19:C(xe);break;case 10:Pt(t.type);break;case 22:case 23:Tt(t),Dc(),e!==null&&C(Fn);break;case 24:Pt(qe)}}function Aa(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var c=n.create,s=n.inst;a=c(),s.destroy=a}n=n.next}while(n!==i)}}catch(m){be(t,t.return,m)}}function Tn(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){var s=a.inst,m=s.destroy;if(m!==void 0){s.destroy=void 0,i=t;var g=n,E=m;try{E()}catch(N){be(i,g,N)}}}a=a.next}while(a!==c)}}catch(N){be(t,t.return,N)}}function $s(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ho(t,n)}catch(a){be(e,e.return,a)}}}function Js(e,t,n){n.props=nl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){be(e,t,a)}}function Ma(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){be(e,t,i)}}function Lt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){be(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){be(e,t,i)}else n.current=null}function ks(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){be(e,e.return,i)}}function ff(e,t,n){try{var a=e.stateNode;jy(a,e.type,n,t),a[rt]=t}catch(i){be(e,e.return,i)}}function Ws(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Un(e.type)||e.tag===4}function rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ws(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(e.tag===27&&Un(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 of(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function Yu(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Un(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yu(e,t,n),e=e.sibling;e!==null;)Yu(e,t,n),e=e.sibling}function Fs(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pe(t,a,n),t[ke]=e,t[rt]=n}catch(c){be(e,e.return,c)}}var an=!1,Ge=!1,sf=!1,Is=typeof WeakSet=="function"?WeakSet:Set,$e=null;function my(e,t){if(e=e.containerInfo,wf=ci,e=ro(e),lc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var s=0,m=-1,g=-1,E=0,N=0,U=e,O=null;t:for(;;){for(var A;U!==n||i!==0&&U.nodeType!==3||(m=s+i),U!==c||a!==0&&U.nodeType!==3||(g=s+a),U.nodeType===3&&(s+=U.nodeValue.length),(A=U.firstChild)!==null;)O=U,U=A;for(;;){if(U===e)break t;if(O===n&&++E===i&&(m=s),O===c&&++N===a&&(g=s),(A=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=A}n=m===-1||g===-1?null:{start:m,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},ci=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),Pe(c,a,n),c[ke]=e,Ke(c),a=c;break e;case"link":var s=ah("link","href",i).get(a+(n.href||""));if(s){for(var m=0;mTe&&(s=Te,Te=F,F=s);var S=co(m,F),_=co(m,Te);if(S&&_&&(A.rangeCount!==1||A.anchorNode!==S.node||A.anchorOffset!==S.offset||A.focusNode!==_.node||A.focusOffset!==_.offset)){var z=U.createRange();z.setStart(S.node,S.offset),A.removeAllRanges(),F>Te?(A.addRange(z),A.extend(_.node,_.offset)):(z.setEnd(_.node,_.offset),A.addRange(z))}}}}for(U=[],A=m;A=A.parentNode;)A.nodeType===1&&U.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;mn?32:n,D.T=null,n=pf,pf=null;var c=Nn,s=on;if(Qe=0,Bl=Nn=null,on=0,(ve&6)!==0)throw Error(r(331));var m=ve;if(ve|=4,rd(c.current),id(c,c.current,s,n),ve=m,Ra(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Fl,c)}catch{}return!0}finally{B.p=i,D.T=a,Md(e,t)}}function Dd(e,t,n){t=Ut(n,t),t=Wc(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Pl(e,2),Kt(e))}function be(e,t,n){if(e.tag===3)Dd(e,e,n);else for(;t!==null;){if(t.tag===3){Dd(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Mn===null||!Mn.has(a))){e=Ut(n,e),n=Zs(2),a=Sn(t,n,2),a!==null&&(Us(n,a,t,e),Pl(a,2),Kt(a));break}}t=t.return}}function zf(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new gy;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(mf=!0,i.add(n),e=zy.bind(null,e,t,n),t.then(e,e))}function zy(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Me===e&&(fe&n)===n&&(Ce===4||Ce===3&&(fe&62914560)===fe&&300>pt()-Vu?(ve&2)===0&&Yl(e,0):vf|=n,ql===fe&&(ql=0)),Kt(e)}function Zd(e,t){t===0&&(t=Er()),e=Kn(e,t),e!==null&&(Pl(e,t),Kt(e))}function Ey(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zd(e,n)}function Ty(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Zd(e,n)}function Oy(e,t){return Ci(e,t)}var Wu=null,Xl=null,Ef=!1,Fu=!1,Tf=!1,Zn=0;function Kt(e){e!==Xl&&e.next===null&&(Xl===null?Wu=Xl=e:Xl=Xl.next=e),Fu=!0,Ef||(Ef=!0,My())}function Ra(e,t){if(!Tf&&Fu){Tf=!0;do for(var n=!1,a=Wu;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var c=0;else{var s=a.suspendedLanes,m=a.pingedLanes;c=(1<<31-bt(42|e)+1)-1,c&=i&~(s&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Cd(a,c))}else c=fe,c=tu(a,a===Me?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Il(a,c)||(n=!0,Cd(a,c));a=a.next}while(n);Tf=!1}}function Ay(){Ud()}function Ud(){Fu=Ef=!1;var e=0;Zn!==0&&Hy()&&(e=Zn);for(var t=pt(),n=null,a=Wu;a!==null;){var i=a.next,c=wd(a,t);c===0?(a.next=null,n===null?Wu=i:n.next=i,i===null&&(Xl=n)):(n=a,(e!==0||(c&3)!==0)&&(Fu=!0)),a=i}Qe!==0&&Qe!==5||Ra(e),Zn!==0&&(Zn=0)}function wd(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0m)break;var N=g.transferSize,U=g.initiatorType;N&&Xd(U)&&(g=g.responseEnd,s+=N*(g"u"?null:document;function eh(e,t,n){var a=Vl;if(a&&typeof t=="string"&&t){var i=Dt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Pd.has(i)||(Pd.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Ky(e){sn.D(e),eh("dns-prefetch",e,null)}function $y(e,t){sn.C(e,t),eh("preconnect",e,t)}function Jy(e,t,n){sn.L(e,t,n);var a=Vl;if(a&&e&&t){var i='link[rel="preload"][as="'+Dt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Dt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Dt(n.imageSizes)+'"]')):i+='[href="'+Dt(e)+'"]';var c=i;switch(t){case"style":c=Ql(e);break;case"script":c=Ll(e)}Ht.has(c)||(e=M({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ht.set(c,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Ha(c))||t==="script"&&a.querySelector(qa(c))||(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function ky(e,t){sn.m(e,t);var n=Vl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Dt(a)+'"][href="'+Dt(e)+'"]',c=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ll(e)}if(!Ht.has(c)&&(e=M({rel:"modulepreload",href:e},t),Ht.set(c,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qa(c)))return}a=n.createElement("link"),Pe(a,"link",e),Ke(a),n.head.appendChild(a)}}}function Wy(e,t,n){sn.S(e,t,n);var a=Vl;if(a&&e){var i=dl(a).hoistableStyles,c=Ql(e);t=t||"default";var s=i.get(c);if(!s){var m={loading:0,preload:null};if(s=a.querySelector(Ha(c)))m.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ht.get(c))&&Yf(e,n);var g=s=a.createElement("link");Ke(g),Pe(g,"link",e),g._p=new Promise(function(E,N){g.onload=E,g.onerror=N}),g.addEventListener("load",function(){m.loading|=1}),g.addEventListener("error",function(){m.loading|=2}),m.loading|=4,ni(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:m},i.set(c,s)}}}function Fy(e,t){sn.X(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=M({src:e,async:!0},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),Ke(c),Pe(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function Iy(e,t){sn.M(e,t);var n=Vl;if(n&&e){var a=dl(n).hoistableScripts,i=Ll(e),c=a.get(i);c||(c=n.querySelector(qa(i)),c||(e=M({src:e,async:!0,type:"module"},t),(t=Ht.get(i))&&Gf(e,t),c=n.createElement("script"),Ke(c),Pe(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function th(e,t,n,a){var i=(i=ae.current)?ti(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=dl(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var c=dl(i).hoistableStyles,s=c.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,s),(c=i.querySelector(Ha(e)))&&!c._p&&(s.instance=c,s.state.loading=5),Ht.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ht.set(e,n),c||Py(i,e,n,s.state))),t&&a===null)throw Error(r(528,""));return s}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ll(n),n=dl(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ql(e){return'href="'+Dt(e)+'"'}function Ha(e){return'link[rel="stylesheet"]['+e+"]"}function nh(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function Py(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Pe(t,"link",n),Ke(t),e.head.appendChild(t))}function Ll(e){return'[src="'+Dt(e)+'"]'}function qa(e){return"script[async]"+e}function lh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Dt(n.href)+'"]');if(a)return t.instance=a,Ke(a),a;var i=M({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),Pe(a,"style",i),ni(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ql(n.href);var c=e.querySelector(Ha(i));if(c)return t.state.loading|=4,t.instance=c,Ke(c),c;a=nh(n),(i=Ht.get(i))&&Yf(a,i),c=(e.ownerDocument||e).createElement("link"),Ke(c);var s=c;return s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),Pe(c,"link",a),t.state.loading|=4,ni(c,n.precedence,e),t.instance=c;case"script":return c=Ll(n.src),(i=e.querySelector(qa(c)))?(t.instance=i,Ke(i),i):(a=n,(i=Ht.get(c))&&(a=M({},n),Gf(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),Pe(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ni(a,n.precedence,e));return t.instance}function ni(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,c=i,s=0;s title"):null)}function eg(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ih(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tg(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Ql(a.href),c=t.querySelector(Ha(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ai.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,Ke(c);return}c=t.ownerDocument||t,a=nh(a),(i=Ht.get(i))&&Yf(a,i),c=c.createElement("link"),Ke(c);var s=c;s._p=new Promise(function(m,g){s.onload=m,s.onerror=g}),Pe(c,"link",a),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ai.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xf=0;function ng(e,t){return e.stylesheets&&e.count===0&&ii(e,e.stylesheets),0Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function ai(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ii(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ui=null;function ii(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ui=new Map,t.forEach(lg,e),ui=null,ai.call(e))}function lg(e,t){if(!(t.state.loading&4)){var n=ui.get(e);if(n)var a=n.get(null);else{n=new Map,ui.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),Ff.exports=_g(),Ff.exports}var Sg=bg();const zg=nm(Sg),Ka=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,Zh=Ka,Eg=new Error("request for lock canceled");var Tg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(M){h(M)}}function p(T){try{y(r.throw(T))}catch(M){h(M)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Og{constructor(u,f=Eg){this._value=u,this._cancelError=f,this._queue=[],this._weightedWaiters=[]}acquire(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return new Promise((r,o)=>{const d={resolve:r,reject:o,weight:u,priority:f},h=lm(this._queue,v=>f<=v.priority);h===-1&&u<=this._value?this._dispatchItem(d):this._queue.splice(h+1,0,d)})}runExclusive(u){return Tg(this,arguments,void 0,function*(f,r=1,o=0){const[d,h]=yield this.acquire(r,o);try{return yield f(d)}finally{h()}})}waitForUnlock(u=1,f=0){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);return this._couldLockImmediately(u,f)?Promise.resolve():new Promise(r=>{this._weightedWaiters[u-1]||(this._weightedWaiters[u-1]=[]),Ag(this._weightedWaiters[u-1],{resolve:r,priority:f})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(u){this._value=u,this._dispatchQueue()}release(u=1){if(u<=0)throw new Error(`invalid weight ${u}: must be positive`);this._value+=u,this._dispatchQueue()}cancel(){this._queue.forEach(u=>u.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(u){const f=this._value;this._value-=u.weight,u.resolve([f,this._newReleaser(u.weight)])}_newReleaser(u){let f=!1;return()=>{f||(f=!0,this.release(u))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let u=this._value;u>0;u--){const f=this._weightedWaiters[u-1];f&&(f.forEach(r=>r.resolve()),this._weightedWaiters[u-1]=[])}else{const u=this._queue[0].priority;for(let f=this._value;f>0;f--){const r=this._weightedWaiters[f-1];if(!r)continue;const o=r.findIndex(d=>d.priority<=u);(o===-1?r:r.splice(0,o)).forEach((d=>d.resolve()))}}}_couldLockImmediately(u,f){return(this._queue.length===0||this._queue[0].priorityu.priority<=r.priority);l.splice(f+1,0,u)}function lm(l,u){for(let f=l.length-1;f>=0;f--)if(u(l[f]))return f;return-1}var Mg=function(l,u,f,r){function o(d){return d instanceof f?d:new f(function(h){h(d)})}return new(f||(f=Promise))(function(d,h){function v(T){try{y(r.next(T))}catch(M){h(M)}}function p(T){try{y(r.throw(T))}catch(M){h(M)}}function y(T){T.done?d(T.value):o(T.value).then(v,p)}y((r=r.apply(l,u||[])).next())})};class Ng{constructor(u){this._semaphore=new Og(1,u)}acquire(){return Mg(this,arguments,void 0,function*(u=0){const[,f]=yield this._semaphore.acquire(1,u);return f})}runExclusive(u,f=0){return this._semaphore.runExclusive(()=>u(),1,f)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(u=0){return this._semaphore.waitForUnlock(1,u)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var Uh=Object.prototype.hasOwnProperty;function lr(l,u){var f,r;if(l===u)return!0;if(l&&u&&(f=l.constructor)===u.constructor){if(f===Date)return l.getTime()===u.getTime();if(f===RegExp)return l.toString()===u.toString();if(f===Array){if((r=l.length)===u.length)for(;r--&&lr(l[r],u[r]););return r===-1}if(!f||typeof l=="object"){r=0;for(f in l)if(Uh.call(l,f)&&++r&&!Uh.call(u,f)||!(f in u)||!lr(l[f],u[f]))return!1;return Object.keys(u).length===r}}return l!==l&&u!==u}const am=Dg();function Dg(){const l={local:mi("local"),session:mi("session"),sync:mi("sync"),managed:mi("managed")},u=R=>{const j=l[R];if(j==null){const H=Object.keys(l).join(", ");throw Error(`Invalid area "${R}". Options: ${H}`)}return j},f=R=>{const j=R.indexOf(":"),H=R.substring(0,j),q=R.substring(j+1);if(q==null)throw Error(`Storage key should be in the form of "area:key", but received "${R}"`);return{driverArea:H,driverKey:q,driver:u(H)}},r=R=>R+"$",o=(R,j)=>{const H={...R};return Object.entries(j).forEach(([q,K])=>{K==null?delete H[q]:H[q]=K}),H},d=(R,j)=>R??j??null,h=R=>typeof R=="object"&&!Array.isArray(R)?R:{},v=async(R,j,H)=>d(await R.getItem(j),H?.fallback??H?.defaultValue),p=async(R,j)=>{const H=r(j);return h(await R.getItem(H))},y=async(R,j,H)=>{await R.setItem(j,H??null)},T=async(R,j,H)=>{const q=r(j),K=h(await R.getItem(q));await R.setItem(q,o(K,H))},M=async(R,j,H)=>{if(await R.removeItem(j),H?.removeMeta){const q=r(j);await R.removeItem(q)}},x=async(R,j,H)=>{const q=r(j);if(H==null)await R.removeItem(q);else{const K=h(await R.getItem(q));[H].flat().forEach(Q=>delete K[Q]),await R.setItem(q,K)}},G=(R,j,H)=>R.watch(j,H);return{getItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);return await v(H,q,j)},getItems:async R=>{const j=new Map,H=new Map,q=[];R.forEach(Q=>{let I,ee;typeof Q=="string"?I=Q:"getValue"in Q?(I=Q.key,ee={fallback:Q.fallback}):(I=Q.key,ee=Q.options),q.push(I);const{driverArea:Oe,driverKey:W}=f(I),ge=j.get(Oe)??[];j.set(Oe,ge.concat(W)),H.set(I,ee)});const K=new Map;return await Promise.all(Array.from(j.entries()).map(async([Q,I])=>{(await l[Q].getItems(I)).forEach(ee=>{const Oe=`${Q}:${ee.key}`,W=H.get(Oe),ge=d(ee.value,W?.fallback??W?.defaultValue);K.set(Oe,ge)})})),q.map(Q=>({key:Q,value:K.get(Q)}))},getMeta:async R=>{const{driver:j,driverKey:H}=f(R);return await p(j,H)},getMetas:async R=>{const j=R.map(K=>{const Q=typeof K=="string"?K:K.key,{driverArea:I,driverKey:ee}=f(Q);return{key:Q,driverArea:I,driverKey:ee,driverMetaKey:r(ee)}}),H=j.reduce((K,Q)=>(K[Q.driverArea]??=[],K[Q.driverArea].push(Q),K),{}),q={};return await Promise.all(Object.entries(H).map(async([K,Q])=>{const I=await Ka.storage[K].get(Q.map(ee=>ee.driverMetaKey));Q.forEach(ee=>{q[ee.key]=I[ee.driverMetaKey]??{}})})),j.map(K=>({key:K.key,meta:q[K.key]}))},setItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await y(H,q,j)},setItems:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,value:H.value})}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).setItems(q)}))},setMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await T(H,q,j)},setMetas:async R=>{const j={};R.forEach(H=>{const{driverArea:q,driverKey:K}=f("key"in H?H.key:H.item.key);j[q]??=[],j[q].push({key:K,properties:H.meta})}),await Promise.all(Object.entries(j).map(async([H,q])=>{const K=u(H),Q=q.map(({key:W})=>r(W)),I=await K.getItems(Q),ee=Object.fromEntries(I.map(({key:W,value:ge})=>[W,h(ge)])),Oe=q.map(({key:W,properties:ge})=>{const at=r(W);return{key:at,value:o(ee[at]??{},ge)}});await K.setItems(Oe)}))},removeItem:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await M(H,q,j)},removeItems:async R=>{const j={};R.forEach(H=>{let q,K;typeof H=="string"?q=H:"getValue"in H?q=H.key:"item"in H?(q=H.item.key,K=H.options):(q=H.key,K=H.options);const{driverArea:Q,driverKey:I}=f(q);j[Q]??=[],j[Q].push(I),K?.removeMeta&&j[Q].push(r(I))}),await Promise.all(Object.entries(j).map(async([H,q])=>{await u(H).removeItems(q)}))},clear:async R=>{await u(R).clear()},removeMeta:async(R,j)=>{const{driver:H,driverKey:q}=f(R);await x(H,q,j)},snapshot:async(R,j)=>{const H=await u(R).snapshot();return j?.excludeKeys?.forEach(q=>{delete H[q],delete H[r(q)]}),H},restoreSnapshot:async(R,j)=>{await u(R).restoreSnapshot(j)},watch:(R,j)=>{const{driver:H,driverKey:q}=f(R);return G(H,q,j)},unwatch(){Object.values(l).forEach(R=>{R.unwatch()})},defineItem:(R,j)=>{const{driver:H,driverKey:q}=f(R),{version:K=1,migrations:Q={},onMigrationComplete:I,debug:ee=!1}=j??{};if(K<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");let Oe=!1;const W=async()=>{const se=r(q),[{value:tt},{value:ut}]=await H.getItems([q,se]);if(Oe=tt==null&&ut?.v==null&&!!K,tt==null)return;const Le=ut?.v??1;if(Le>K)throw Error(`Version downgrade detected (v${Le} -> v${K}) for "${R}"`);if(Le===K)return;ee&&console.debug(`[@wxt-dev/storage] Running storage migration for ${R}: v${Le} -> v${K}`);const D=Array.from({length:K-Le},(J,de)=>Le+de+1);let B=tt;for(const J of D)try{B=await Q?.[J]?.(B)??B,ee&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${J}`)}catch(de){throw new Zg(R,J,{cause:de})}await H.setItems([{key:q,value:B},{key:se,value:{...ut,v:K}}]),ee&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${R} v${K}`,{migratedValue:B}),I?.(B,K)},ge=j?.migrations==null?Promise.resolve():W().catch(se=>{console.error(`[@wxt-dev/storage] Migration failed for ${R}`,se)}),at=new Ng,Bt=()=>j?.fallback??j?.defaultValue??null,gt=()=>at.runExclusive(async()=>{const se=await H.getItem(q);if(se!=null||j?.init==null)return se;const tt=await j.init();return await H.setItem(q,tt),se==null&&K>1&&await T(H,q,{v:K}),tt});return ge.then(gt),{key:R,get defaultValue(){return Bt()},get fallback(){return Bt()},getValue:async()=>(await ge,j?.init?await gt():await v(H,q,j)),getMeta:async()=>(await ge,await p(H,q)),setValue:async se=>{await ge,Oe?(Oe=!1,await Promise.all([y(H,q,se),T(H,q,{v:K})])):await y(H,q,se)},setMeta:async se=>(await ge,await T(H,q,se)),removeValue:async se=>(await ge,await M(H,q,se)),removeMeta:async se=>(await ge,await x(H,q,se)),watch:se=>G(H,q,(tt,ut)=>se(tt??Bt(),ut??Bt())),migrate:W}}}}function mi(l){const u=()=>{if(Ka.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371 - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html -`);if(Ka.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=Ka.storage[l];if(r==null)throw Error(`"browser.storage.${l}" is undefined`);return r},f=new Set;return{getItem:async r=>(await u().get(r))[r],getItems:async r=>{const o=await u().get(r);return r.map(d=>({key:d,value:o[d]??null}))},setItem:async(r,o)=>{o==null?await u().remove(r):await u().set({[r]:o})},setItems:async r=>{const o=r.reduce((d,{key:h,value:v})=>(d[h]=v,d),{});await u().set(o)},removeItem:async r=>{await u().remove(r)},removeItems:async r=>{await u().remove(r)},clear:async()=>{await u().clear()},snapshot:async()=>await u().get(),restoreSnapshot:async r=>{await u().set(r)},watch(r,o){const d=h=>{const v=h[r];v==null||lr(v.newValue,v.oldValue)||o(v.newValue??null,v.oldValue??null)};return u().onChanged.addListener(d),f.add(d),()=>{u().onChanged.removeListener(d),f.delete(d)}},unwatch(){f.forEach(r=>{u().onChanged.removeListener(r)}),f.clear()}}}var Zg=class extends Error{constructor(l,u,f){super(`v${u} migration failed for "${l}"`,f),this.key=l,this.version=u}};function Hn(l,u){return Array.isArray(l)?l.includes(u):l}var Ug=l=>{const u=l.getBoundingClientRect();return{width:u.width,height:u.height}};function Oi(){const l=ce.useRef(null),[u,f]=ce.useState({width:1,height:1});ce.useLayoutEffect(()=>{const o=()=>{l.current&&f(Ug(l.current))},d=([{contentBoxSize:v}])=>{f({height:v[0].blockSize,width:v[0].inlineSize})};window.addEventListener("resize",o,!1);const h=new ResizeObserver(d);return l.current&&h.observe(l.current),()=>{window.removeEventListener("resize",o,!1),h.disconnect()}},[]);const r=ce.useCallback(()=>{const{left:o=1,right:d=1,top:h=1,bottom:v=1}=l.current?.getBoundingClientRect()??{};return{left:o,right:d,top:h,bottom:v}},[]);return[l,u,r]}function pi(l,u,f){return lf?f:l}var wg=class{convert(l,u){let f=this.toHex("#000000"),r=this.hex2rgb(f),o=this.rgb2hsv(r);if(l==="hex"){const d=u;f=this.toHex(d),r=this.hex2rgb(f),f.startsWith("rgba")&&(r=this.toRgb(f),f=this.rgb2hex(r)),o=this.rgb2hsv(r)}else l==="rgb"?(r=u,f=this.rgb2hex(r),o=this.rgb2hsv(r)):l==="hsv"&&(o=u,r=this.hsv2rgb(o),f=this.rgb2hex(r));return{hex:f,rgb:r,hsv:o}}toHex(l){if(l.startsWith("#")){if(l.length===4||l.length===5)return l=l.split("").map((u,f)=>f?f<4?u+u:u==="f"?void 0:u+u:"#").join(""),l;if(l.length===7)return l;if(l.length===9)return l.endsWith("ff")?l.slice(0,7):l}else{const u=document.createElement("canvas").getContext("2d");if(!u)throw new Error("2d context not supported or canvas already initialized");return u.fillStyle=l,u.fillStyle}return"#000000"}toRgb(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v<3?255:1));return{r:f,g:r,b:o,a:d}}toHsv(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v?v<3?100:1:360));return{h:f,s:r,v:o,a:d}}hex2rgb(l){l=l.slice(1);let[u,f,r,o]=Array.from({length:4}).map((d,h)=>parseInt(l.slice(h*2,h*2+2),16));return o=Number.isNaN(o)?1:o/255,{r:u,g:f,b:r,a:o}}rgb2hsv({r:l,g:u,b:f,a:r}){l/=255,u/=255,f/=255;const o=Math.max(l,u,f),d=o-Math.min(l,u,f),h=d?(o===l?(u-f)/d+(uMath.round(y<3?p:p*255).toString(16).padStart(2,"0"));return["#",o,d,h,v==="ff"?"":v].join("")}},at=new wg;function ul(l){return"touches"in l}var fr=ce.memo(({onCoordinateChange:l,children:u,disabled:f})=>{const[r,{width:o,height:d},h]=Oi(),v=ce.useCallback((y,T=!1)=>{const{left:N,top:x}=h(),G=pi(y.clientX-N,0,o),R=pi(y.clientY-x,0,d);l(T,G,R)},[o,d,h,l]),p=ce.useCallback(y=>{if(!ul(y)&&y.button!==0)return;const T=x=>{v(ul(x)?x.touches[0]:x)},N=x=>{v(ul(x)?x.changedTouches[0]:x,!0),document.removeEventListener(ul(x)?"touchmove":"mousemove",T,!1),document.removeEventListener(ul(x)?"touchend":"mouseup",N,!1)};T(y),document.addEventListener(ul(y)?"touchmove":"mousemove",T,!1),document.addEventListener(ul(y)?"touchend":"mouseup",N,!1)},[v]);return me.createElement("div",{ref:r,className:"rcp-interactive",onMouseDown:p,onTouchStart:p,"aria-disabled":f},u)}),Rg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.a*d}),[l.hsv.a,d]),v=ce.useCallback((T,N)=>{const x=at.convert("hsv",{...l.hsv,a:N/d});f(x),T&&r?.(x)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.rgb.r,l.rgb.g,l.rgb.b].join(" "),[l.rgb.r,l.rgb.g,l.rgb.b]),y=ce.useMemo(()=>[p,l.rgb.a].join(" / "),[p,l.rgb.a]);return me.createElement(fr,{disabled:u,onCoordinateChange:v},me.createElement("div",{ref:o,style:{background:`linear-gradient(to right, rgb(${p} / 0), rgb(${p} / 1)) top left / auto auto, +`);if(Ka.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=Ka.storage[l];if(r==null)throw Error(`"browser.storage.${l}" is undefined`);return r},f=new Set;return{getItem:async r=>(await u().get(r))[r],getItems:async r=>{const o=await u().get(r);return r.map(d=>({key:d,value:o[d]??null}))},setItem:async(r,o)=>{o==null?await u().remove(r):await u().set({[r]:o})},setItems:async r=>{const o=r.reduce((d,{key:h,value:v})=>(d[h]=v,d),{});await u().set(o)},removeItem:async r=>{await u().remove(r)},removeItems:async r=>{await u().remove(r)},clear:async()=>{await u().clear()},snapshot:async()=>await u().get(),restoreSnapshot:async r=>{await u().set(r)},watch(r,o){const d=h=>{const v=h[r];v==null||lr(v.newValue,v.oldValue)||o(v.newValue??null,v.oldValue??null)};return u().onChanged.addListener(d),f.add(d),()=>{u().onChanged.removeListener(d),f.delete(d)}},unwatch(){f.forEach(r=>{u().onChanged.removeListener(r)}),f.clear()}}}var Zg=class extends Error{constructor(l,u,f){super(`v${u} migration failed for "${l}"`,f),this.key=l,this.version=u}};function Hn(l,u){return Array.isArray(l)?l.includes(u):l}var Ug=l=>{const u=l.getBoundingClientRect();return{width:u.width,height:u.height}};function Oi(){const l=ce.useRef(null),[u,f]=ce.useState({width:1,height:1});ce.useLayoutEffect(()=>{const o=()=>{l.current&&f(Ug(l.current))},d=([{contentBoxSize:v}])=>{f({height:v[0].blockSize,width:v[0].inlineSize})};window.addEventListener("resize",o,!1);const h=new ResizeObserver(d);return l.current&&h.observe(l.current),()=>{window.removeEventListener("resize",o,!1),h.disconnect()}},[]);const r=ce.useCallback(()=>{const{left:o=1,right:d=1,top:h=1,bottom:v=1}=l.current?.getBoundingClientRect()??{};return{left:o,right:d,top:h,bottom:v}},[]);return[l,u,r]}function pi(l,u,f){return lf?f:l}var wg=class{convert(l,u){let f=this.toHex("#000000"),r=this.hex2rgb(f),o=this.rgb2hsv(r);if(l==="hex"){const d=u;f=this.toHex(d),r=this.hex2rgb(f),f.startsWith("rgba")&&(r=this.toRgb(f),f=this.rgb2hex(r)),o=this.rgb2hsv(r)}else l==="rgb"?(r=u,f=this.rgb2hex(r),o=this.rgb2hsv(r)):l==="hsv"&&(o=u,r=this.hsv2rgb(o),f=this.rgb2hex(r));return{hex:f,rgb:r,hsv:o}}toHex(l){if(l.startsWith("#")){if(l.length===4||l.length===5)return l=l.split("").map((u,f)=>f?f<4?u+u:u==="f"?void 0:u+u:"#").join(""),l;if(l.length===7)return l;if(l.length===9)return l.endsWith("ff")?l.slice(0,7):l}else{const u=document.createElement("canvas").getContext("2d");if(!u)throw new Error("2d context not supported or canvas already initialized");return u.fillStyle=l,u.fillStyle}return"#000000"}toRgb(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v<3?255:1));return{r:f,g:r,b:o,a:d}}toHsv(l){const u=l.match(/\d+(\.\d+)?/gu)??[],[f,r,o,d]=Array.from({length:4}).map((h,v)=>pi(+(u[v]??(v<3?0:1)),0,v?v<3?100:1:360));return{h:f,s:r,v:o,a:d}}hex2rgb(l){l=l.slice(1);let[u,f,r,o]=Array.from({length:4}).map((d,h)=>parseInt(l.slice(h*2,h*2+2),16));return o=Number.isNaN(o)?1:o/255,{r:u,g:f,b:r,a:o}}rgb2hsv({r:l,g:u,b:f,a:r}){l/=255,u/=255,f/=255;const o=Math.max(l,u,f),d=o-Math.min(l,u,f),h=d?(o===l?(u-f)/d+(uMath.round(y<3?p:p*255).toString(16).padStart(2,"0"));return["#",o,d,h,v==="ff"?"":v].join("")}},lt=new wg;function ul(l){return"touches"in l}var fr=ce.memo(({onCoordinateChange:l,children:u,disabled:f})=>{const[r,{width:o,height:d},h]=Oi(),v=ce.useCallback((y,T=!1)=>{const{left:M,top:x}=h(),G=pi(y.clientX-M,0,o),R=pi(y.clientY-x,0,d);l(T,G,R)},[o,d,h,l]),p=ce.useCallback(y=>{if(!ul(y)&&y.button!==0)return;const T=x=>{v(ul(x)?x.touches[0]:x)},M=x=>{v(ul(x)?x.changedTouches[0]:x,!0),document.removeEventListener(ul(x)?"touchmove":"mousemove",T,!1),document.removeEventListener(ul(x)?"touchend":"mouseup",M,!1)};T(y),document.addEventListener(ul(y)?"touchmove":"mousemove",T,!1),document.addEventListener(ul(y)?"touchend":"mouseup",M,!1)},[v]);return ye.createElement("div",{ref:r,className:"rcp-interactive",onMouseDown:p,onTouchStart:p,"aria-disabled":f},u)}),Rg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.a*d}),[l.hsv.a,d]),v=ce.useCallback((T,M)=>{const x=lt.convert("hsv",{...l.hsv,a:M/d});f(x),T&&r?.(x)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.rgb.r,l.rgb.g,l.rgb.b].join(" "),[l.rgb.r,l.rgb.g,l.rgb.b]),y=ce.useMemo(()=>[p,l.rgb.a].join(" / "),[p,l.rgb.a]);return ye.createElement(fr,{disabled:u,onCoordinateChange:v},ye.createElement("div",{ref:o,style:{background:`linear-gradient(to right, rgb(${p} / 0), rgb(${p} / 1)) top left / auto auto, conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) top left / 12px 12px - repeat`},className:"rcp-alpha"},me.createElement("div",{style:{left:h.x,background:`linear-gradient(to right, rgb(${y}), rgb(${y})) top left / auto auto, + repeat`},className:"rcp-alpha"},ye.createElement("div",{style:{left:h.x,background:`linear-gradient(to right, rgb(${y}), rgb(${y})) top left / auto auto, conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) ${-h.x-4}px 2px / 12px 12px - repeat`},className:"rcp-alpha-cursor"})))});function um(l,u){return Math.round(l*10**u)/10**u}function wh({r:l,g:u,b:f,a:r}){const o=[Math.round(l),Math.round(u),Math.round(f)],d=um(r,3);return d<1&&o.push(d),o.join(", ")}function Rh({h:l,s:u,v:f,a:r}){const o=[`${Math.round(l)}°`,`${Math.round(u)}%`,`${Math.round(f)}%`],d=um(r,3);return d<1&&o.push(d),o.join(", ")}var Cg=ce.memo(({hideInput:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,h]=ce.useState({hex:{value:u.hex,inputted:!1},rgb:{value:wh(u.rgb),inputted:!1},hsv:{value:Rh(u.hsv),inputted:!1}});ce.useEffect(()=>{d.hex.inputted||h(T=>({...T,hex:{...T.hex,value:u.hex}}))},[d.hex.inputted,u.hex]),ce.useEffect(()=>{d.rgb.inputted||h(T=>({...T,rgb:{...T.rgb,value:wh(u.rgb)}}))},[d.rgb.inputted,u.rgb]),ce.useEffect(()=>{d.hsv.inputted||h(T=>({...T,hsv:{...T.hsv,value:Rh(u.hsv)}}))},[d.hsv.inputted,u.hsv]);const v=ce.useCallback(T=>N=>{const{value:x}=N.target;h(G=>({...G,[T]:{...G[T],value:x}})),r(T==="hsv"?at.convert("hsv",at.toHsv(x)):T==="rgb"?at.convert("rgb",at.toRgb(x)):at.convert("hex",x))},[r]),p=ce.useCallback(T=>()=>{h(N=>({...N,[T]:{...N[T],inputted:!0}}))},[]),y=ce.useCallback(T=>N=>{const{value:x}=N.target;h(G=>({...G,[T]:{...G[T],inputted:!1}})),o?.(T==="hsv"?at.convert("hsv",at.toHsv(x)):T==="rgb"?at.convert("rgb",at.toRgb(x)):at.convert("hex",x))},[o]);return me.createElement("div",{className:"rcp-fields"},!Hn(l,"hex")&&me.createElement("div",{className:"rcp-fields-floor"},me.createElement("div",{className:"rcp-field"},me.createElement("input",{id:"hex",className:"rcp-field-input",readOnly:f,value:d.hex.value,onChange:v("hex"),onFocus:p("hex"),onBlur:y("hex")}),me.createElement("label",{htmlFor:"hex",className:"rcp-field-label"},"HEX"))),(!Hn(l,"rgb")||!Hn(l,"hsv"))&&me.createElement("div",{className:"rcp-fields-floor"},!Hn(l,"rgb")&&me.createElement("div",{className:"rcp-field"},me.createElement("input",{id:"rgb",className:"rcp-field-input",readOnly:f,value:d.rgb.value,onChange:v("rgb"),onFocus:p("rgb"),onBlur:y("rgb")}),me.createElement("label",{htmlFor:"rgb",className:"rcp-field-label"},"RGB")),!Hn(l,"hsv")&&me.createElement("div",{className:"rcp-field"},me.createElement("input",{id:"hsv",className:"rcp-field-input",readOnly:f,value:d.hsv.value,onChange:v("hsv"),onFocus:p("hsv"),onBlur:y("hsv")}),me.createElement("label",{htmlFor:"hsv",className:"rcp-field-label"},"HSV"))))}),jg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.h/360*d}),[l.hsv.h,d]),v=ce.useCallback((y,T)=>{const N=at.convert("hsv",{...l.hsv,h:T/d*360});f(N),y&&r?.(N)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.hsv.h,"100%","50%"].join(" "),[l.hsv.h]);return me.createElement(fr,{disabled:u,onCoordinateChange:v},me.createElement("div",{ref:o,className:"rcp-hue"},me.createElement("div",{style:{left:h.x,backgroundColor:`hsl(${p})`},className:"rcp-hue-cursor"})))}),xg=ce.memo(({height:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,{width:h}]=Oi(),v=ce.useMemo(()=>{const N=u.hsv.s/100*h,x=(100-u.hsv.v)/100*l;return{x:N,y:x}},[u.hsv.s,u.hsv.v,h,l]),p=ce.useCallback((N,x,G)=>{const R=at.convert("hsv",{...u.hsv,s:x/h*100,v:100-G/l*100});r(R),N&&o?.(R)},[u.hsv,h,l,r,o]),y=ce.useMemo(()=>[u.hsv.h,"100%","50%"].join(" "),[u.hsv.h]),T=ce.useMemo(()=>[u.rgb.r,u.rgb.g,u.rgb.b].join(" "),[u.rgb.r,u.rgb.g,u.rgb.b]);return me.createElement(fr,{disabled:f,onCoordinateChange:p},me.createElement("div",{ref:d,style:{height:l,backgroundColor:`hsl(${y})`},className:"rcp-saturation"},me.createElement("div",{style:{left:v.x,top:v.y,backgroundColor:`rgb(${T})`},className:"rcp-saturation-cursor"})))}),Hg=ce.memo(({height:l=200,hideAlpha:u=!1,hideInput:f=!1,color:r,disabled:o=!1,onChange:d,onChangeComplete:h})=>me.createElement("div",{className:"rcp-root rcp"},me.createElement(xg,{height:l,color:r,disabled:o,onChange:d,onChangeComplete:h}),me.createElement("div",{className:"rcp-body"},me.createElement("section",{className:"rcp-section"},me.createElement(jg,{color:r,disabled:o,onChange:d,onChangeComplete:h}),!u&&me.createElement(Rg,{color:r,disabled:o,onChange:d,onChangeComplete:h})),(!Hn(f,"hex")||!Hn(f,"rgb")||!Hn(f,"hsv"))&&me.createElement("section",{className:"rcp-section"},me.createElement(Cg,{hideInput:f,color:r,disabled:o,onChange:d,onChangeComplete:h})))));function qg(l){const[u,f]=ce.useState(at.convert("hex",l));return ce.useEffect(()=>{f(at.convert("hex",l))},[l]),[u,f]}function w(l,u,f){function r(v,p){if(v._zod||Object.defineProperty(v,"_zod",{value:{def:p,constr:h,traits:new Set},enumerable:!1}),v._zod.traits.has(l))return;v._zod.traits.add(l),u(v,p);const y=h.prototype,T=Object.keys(y);for(let N=0;Nf?.Parent&&v instanceof f.Parent?!0:v?._zod?.traits?.has(l)}),Object.defineProperty(h,"name",{value:l}),h}class Jl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class im extends Error{constructor(u){super(`Encountered unidirectional transform during encode: ${u}`),this.name="ZodEncodeError"}}const cm={};function il(l){return cm}function fm(l){const u=Object.values(l).filter(r=>typeof r=="number");return Object.entries(l).filter(([r,o])=>u.indexOf(+r)===-1).map(([r,o])=>o)}function ar(l,u){return typeof u=="bigint"?u.toString():u}function rr(l){return{get value(){{const u=l();return Object.defineProperty(this,"value",{value:u}),u}}}}function or(l){return l==null}function sr(l){const u=l.startsWith("^")?1:0,f=l.endsWith("$")?l.length-1:l.length;return l.slice(u,f)}function Bg(l,u){const f=(l.toString().split(".")[1]||"").length,r=u.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const p=r.match(/\d?e-(\d?)/);p?.[1]&&(o=Number.parseInt(p[1]))}const d=f>o?f:o,h=Number.parseInt(l.toFixed(d).replace(".","")),v=Number.parseInt(u.toFixed(d).replace(".",""));return h%v/10**d}const Ch=Symbol("evaluating");function _e(l,u,f){let r;Object.defineProperty(l,u,{get(){if(r!==Ch)return r===void 0&&(r=Ch,r=f()),r},set(o){Object.defineProperty(l,u,{value:o})},configurable:!0})}function fl(l,u,f){Object.defineProperty(l,u,{value:f,writable:!0,enumerable:!0,configurable:!0})}function qn(...l){const u={};for(const f of l){const r=Object.getOwnPropertyDescriptors(f);Object.assign(u,r)}return Object.defineProperties({},u)}function jh(l){return JSON.stringify(l)}function Yg(l){return l.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const rm="captureStackTrace"in Error?Error.captureStackTrace:(...l)=>{};function _i(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)}const Gg=rr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const l=Function;return new l(""),!0}catch{return!1}});function Ja(l){if(_i(l)===!1)return!1;const u=l.constructor;if(u===void 0||typeof u!="function")return!0;const f=u.prototype;return!(_i(f)===!1||Object.prototype.hasOwnProperty.call(f,"isPrototypeOf")===!1)}function om(l){return Ja(l)?{...l}:Array.isArray(l)?[...l]:l}const Xg=new Set(["string","number","symbol"]);function Ai(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bn(l,u,f){const r=new l._zod.constr(u??l._zod.def);return(!u||f?.parent)&&(r._zod.parent=l),r}function k(l){const u=l;if(!u)return{};if(typeof u=="string")return{error:()=>u};if(u?.message!==void 0){if(u?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");u.error=u.message}return delete u.message,typeof u.error=="string"?{...u,error:()=>u.error}:u}function Vg(l){return Object.keys(l).filter(u=>l[u]._zod.optin==="optional"&&l[u]._zod.optout==="optional")}const Qg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Lg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&(h[v]=f.shape[v])}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function Kg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={...l._zod.def.shape};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&delete h[v]}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function $g(l,u){if(!Ja(u))throw new Error("Invalid input to extend: expected a plain object");const f=l._zod.def.checks;if(f&&f.length>0){const d=l._zod.def.shape;for(const h in u)if(Object.getOwnPropertyDescriptor(d,h)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=qn(l._zod.def,{get shape(){const d={...l._zod.def.shape,...u};return fl(this,"shape",d),d}});return Bn(l,o)}function Jg(l,u){if(!Ja(u))throw new Error("Invalid input to safeExtend: expected a plain object");const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u};return fl(this,"shape",r),r}});return Bn(l,f)}function kg(l,u){const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u._zod.def.shape};return fl(this,"shape",r),r},get catchall(){return u._zod.def.catchall},checks:[]});return Bn(l,f)}function Wg(l,u,f){const o=u._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const h=qn(u._zod.def,{get shape(){const v=u._zod.def.shape,p={...v};if(f)for(const y in f){if(!(y in v))throw new Error(`Unrecognized key: "${y}"`);f[y]&&(p[y]=l?new l({type:"optional",innerType:v[y]}):v[y])}else for(const y in v)p[y]=l?new l({type:"optional",innerType:v[y]}):v[y];return fl(this,"shape",p),p},checks:[]});return Bn(u,h)}function Fg(l,u,f){const r=qn(u._zod.def,{get shape(){const o=u._zod.def.shape,d={...o};if(f)for(const h in f){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);f[h]&&(d[h]=new l({type:"nonoptional",innerType:o[h]}))}else for(const h in o)d[h]=new l({type:"nonoptional",innerType:o[h]});return fl(this,"shape",d),d}});return Bn(u,r)}function $l(l,u=0){if(l.aborted===!0)return!0;for(let f=u;f{var r;return(r=f).path??(r.path=[]),f.path.unshift(l),f})}function vi(l){return typeof l=="string"?l:l?.message}function cl(l,u,f){const r={...l,path:l.path??[]};if(!l.message){const o=vi(l.inst?._zod.def?.error?.(l))??vi(u?.error?.(l))??vi(f.customError?.(l))??vi(f.localeError?.(l))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,u?.reportInput||delete r.input,r}function dr(l){return Array.isArray(l)?"array":typeof l=="string"?"string":"unknown"}function ka(...l){const[u,f,r]=l;return typeof u=="string"?{message:u,code:"custom",input:f,inst:r}:{...u}}const dm=(l,u)=>{l.name="$ZodError",Object.defineProperty(l,"_zod",{value:l._zod,enumerable:!1}),Object.defineProperty(l,"issues",{value:u,enumerable:!1}),l.message=JSON.stringify(u,ar,2),Object.defineProperty(l,"toString",{value:()=>l.message,enumerable:!1})},hm=w("$ZodError",dm),mm=w("$ZodError",dm,{Parent:Error});function Ig(l,u=f=>f.message){const f={},r=[];for(const o of l.issues)o.path.length>0?(f[o.path[0]]=f[o.path[0]]||[],f[o.path[0]].push(u(o))):r.push(u(o));return{formErrors:r,fieldErrors:f}}function Pg(l,u=f=>f.message){const f={_errors:[]},r=o=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h}));else if(d.code==="invalid_key")r({issues:d.issues});else if(d.code==="invalid_element")r({issues:d.issues});else if(d.path.length===0)f._errors.push(u(d));else{let h=f,v=0;for(;v(u,f,r,o)=>{const d=r?Object.assign(r,{async:!1}):{async:!1},h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise)throw new Jl;if(h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},mr=l=>async(u,f,r,o)=>{const d=r?Object.assign(r,{async:!0}):{async:!0};let h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},Mi=l=>(u,f,r)=>{const o=r?{...r,async:!1}:{async:!1},d=u._zod.run({value:f,issues:[]},o);if(d instanceof Promise)throw new Jl;return d.issues.length?{success:!1,error:new(l??hm)(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},e0=Mi(mm),Ni=l=>async(u,f,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let d=u._zod.run({value:f,issues:[]},o);return d instanceof Promise&&(d=await d),d.issues.length?{success:!1,error:new l(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},t0=Ni(mm),n0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hr(l)(u,f,o)},l0=l=>(u,f,r)=>hr(l)(u,f,r),a0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return mr(l)(u,f,o)},u0=l=>async(u,f,r)=>mr(l)(u,f,r),i0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mi(l)(u,f,o)},c0=l=>(u,f,r)=>Mi(l)(u,f,r),f0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ni(l)(u,f,o)},r0=l=>async(u,f,r)=>Ni(l)(u,f,r),o0=/^[cC][^\s-]{8,}$/,s0=/^[0-9a-z]+$/,d0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,h0=/^[0-9a-vA-V]{20}$/,m0=/^[A-Za-z0-9]{27}$/,v0=/^[a-zA-Z0-9_-]{21}$/,y0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,g0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xh=l=>l?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${l}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,p0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function b0(){return new RegExp(_0,"u")}const S0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,E0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,T0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vm=/^[A-Za-z0-9_-]*$/,A0=/^\+[1-9]\d{6,14}$/,ym="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",M0=new RegExp(`^${ym}$`);function gm(l){const u="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof l.precision=="number"?l.precision===-1?`${u}`:l.precision===0?`${u}:[0-5]\\d`:`${u}:[0-5]\\d\\.\\d{${l.precision}}`:`${u}(?::[0-5]\\d(?:\\.\\d+)?)?`}function N0(l){return new RegExp(`^${gm(l)}$`)}function D0(l){const u=gm({precision:l.precision}),f=["Z"];l.local&&f.push(""),l.offset&&f.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${u}(?:${f.join("|")})`;return new RegExp(`^${ym}T(?:${r})$`)}const Z0=l=>{const u=l?`[\\s\\S]{${l?.minimum??0},${l?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${u}$`)},U0=/^-?\d+$/,w0=/^-?\d+(?:\.\d+)?$/,R0=/^[^A-Z]*$/,C0=/^[^a-z]*$/,vt=w("$ZodCheck",(l,u)=>{var f;l._zod??(l._zod={}),l._zod.def=u,(f=l._zod).onattach??(f.onattach=[])}),pm={number:"number",bigint:"bigint",object:"date"},_m=w("$ZodCheckLessThan",(l,u)=>{vt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;u.value{(u.inclusive?r.value<=u.value:r.value{vt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;u.value>d&&(u.inclusive?o.minimum=u.value:o.exclusiveMinimum=u.value)}),l._zod.check=r=>{(u.inclusive?r.value>=u.value:r.value>u.value)||r.issues.push({origin:f,code:"too_small",minimum:typeof u.value=="object"?u.value.getTime():u.value,input:r.value,inclusive:u.inclusive,inst:l,continue:!u.abort})}}),j0=w("$ZodCheckMultipleOf",(l,u)=>{vt.init(l,u),l._zod.onattach.push(f=>{var r;(r=f._zod.bag).multipleOf??(r.multipleOf=u.value)}),l._zod.check=f=>{if(typeof f.value!=typeof u.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof f.value=="bigint"?f.value%u.value===BigInt(0):Bg(f.value,u.value)===0)||f.issues.push({origin:typeof f.value,code:"not_multiple_of",divisor:u.value,input:f.value,inst:l,continue:!u.abort})}}),x0=w("$ZodCheckNumberFormat",(l,u)=>{vt.init(l,u),u.format=u.format||"float64";const f=u.format?.includes("int"),r=f?"int":"number",[o,d]=Qg[u.format];l._zod.onattach.push(h=>{const v=h._zod.bag;v.format=u.format,v.minimum=o,v.maximum=d,f&&(v.pattern=U0)}),l._zod.check=h=>{const v=h.value;if(f){if(!Number.isInteger(v)){h.issues.push({expected:r,format:u.format,code:"invalid_type",continue:!1,input:v,inst:l});return}if(!Number.isSafeInteger(v)){v>0?h.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort}):h.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort});return}}vd&&h.issues.push({origin:"number",input:v,code:"too_big",maximum:d,inclusive:!0,inst:l,continue:!u.abort})}}),H0=w("$ZodCheckMaxLength",(l,u)=>{var f;vt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;u.maximum{const o=r.value;if(o.length<=u.maximum)return;const h=dr(o);r.issues.push({origin:h,code:"too_big",maximum:u.maximum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),q0=w("$ZodCheckMinLength",(l,u)=>{var f;vt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;u.minimum>o&&(r._zod.bag.minimum=u.minimum)}),l._zod.check=r=>{const o=r.value;if(o.length>=u.minimum)return;const h=dr(o);r.issues.push({origin:h,code:"too_small",minimum:u.minimum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),B0=w("$ZodCheckLengthEquals",(l,u)=>{var f;vt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=u.length,o.maximum=u.length,o.length=u.length}),l._zod.check=r=>{const o=r.value,d=o.length;if(d===u.length)return;const h=dr(o),v=d>u.length;r.issues.push({origin:h,...v?{code:"too_big",maximum:u.length}:{code:"too_small",minimum:u.length},inclusive:!0,exact:!0,input:r.value,inst:l,continue:!u.abort})}}),Di=w("$ZodCheckStringFormat",(l,u)=>{var f,r;vt.init(l,u),l._zod.onattach.push(o=>{const d=o._zod.bag;d.format=u.format,u.pattern&&(d.patterns??(d.patterns=new Set),d.patterns.add(u.pattern))}),u.pattern?(f=l._zod).check??(f.check=o=>{u.pattern.lastIndex=0,!u.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:u.format,input:o.value,...u.pattern?{pattern:u.pattern.toString()}:{},inst:l,continue:!u.abort})}):(r=l._zod).check??(r.check=()=>{})}),Y0=w("$ZodCheckRegex",(l,u)=>{Di.init(l,u),l._zod.check=f=>{u.pattern.lastIndex=0,!u.pattern.test(f.value)&&f.issues.push({origin:"string",code:"invalid_format",format:"regex",input:f.value,pattern:u.pattern.toString(),inst:l,continue:!u.abort})}}),G0=w("$ZodCheckLowerCase",(l,u)=>{u.pattern??(u.pattern=R0),Di.init(l,u)}),X0=w("$ZodCheckUpperCase",(l,u)=>{u.pattern??(u.pattern=C0),Di.init(l,u)}),V0=w("$ZodCheckIncludes",(l,u)=>{vt.init(l,u);const f=Ai(u.includes),r=new RegExp(typeof u.position=="number"?`^.{${u.position}}${f}`:f);u.pattern=r,l._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(r)}),l._zod.check=o=>{o.value.includes(u.includes,u.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:u.includes,input:o.value,inst:l,continue:!u.abort})}}),Q0=w("$ZodCheckStartsWith",(l,u)=>{vt.init(l,u);const f=new RegExp(`^${Ai(u.prefix)}.*`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.startsWith(u.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:u.prefix,input:r.value,inst:l,continue:!u.abort})}}),L0=w("$ZodCheckEndsWith",(l,u)=>{vt.init(l,u);const f=new RegExp(`.*${Ai(u.suffix)}$`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.endsWith(u.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:u.suffix,input:r.value,inst:l,continue:!u.abort})}}),K0=w("$ZodCheckOverwrite",(l,u)=>{vt.init(l,u),l._zod.check=f=>{f.value=u.tx(f.value)}});class $0{constructor(u=[]){this.content=[],this.indent=0,this&&(this.args=u)}indented(u){this.indent+=1,u(this),this.indent-=1}write(u){if(typeof u=="function"){u(this,{execution:"sync"}),u(this,{execution:"async"});return}const r=u.split(` + repeat`},className:"rcp-alpha-cursor"})))});function um(l,u){return Math.round(l*10**u)/10**u}function wh({r:l,g:u,b:f,a:r}){const o=[Math.round(l),Math.round(u),Math.round(f)],d=um(r,3);return d<1&&o.push(d),o.join(", ")}function Rh({h:l,s:u,v:f,a:r}){const o=[`${Math.round(l)}°`,`${Math.round(u)}%`,`${Math.round(f)}%`],d=um(r,3);return d<1&&o.push(d),o.join(", ")}var Cg=ce.memo(({hideInput:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,h]=ce.useState({hex:{value:u.hex,inputted:!1},rgb:{value:wh(u.rgb),inputted:!1},hsv:{value:Rh(u.hsv),inputted:!1}});ce.useEffect(()=>{d.hex.inputted||h(T=>({...T,hex:{...T.hex,value:u.hex}}))},[d.hex.inputted,u.hex]),ce.useEffect(()=>{d.rgb.inputted||h(T=>({...T,rgb:{...T.rgb,value:wh(u.rgb)}}))},[d.rgb.inputted,u.rgb]),ce.useEffect(()=>{d.hsv.inputted||h(T=>({...T,hsv:{...T.hsv,value:Rh(u.hsv)}}))},[d.hsv.inputted,u.hsv]);const v=ce.useCallback(T=>M=>{const{value:x}=M.target;h(G=>({...G,[T]:{...G[T],value:x}})),r(T==="hsv"?lt.convert("hsv",lt.toHsv(x)):T==="rgb"?lt.convert("rgb",lt.toRgb(x)):lt.convert("hex",x))},[r]),p=ce.useCallback(T=>()=>{h(M=>({...M,[T]:{...M[T],inputted:!0}}))},[]),y=ce.useCallback(T=>M=>{const{value:x}=M.target;h(G=>({...G,[T]:{...G[T],inputted:!1}})),o?.(T==="hsv"?lt.convert("hsv",lt.toHsv(x)):T==="rgb"?lt.convert("rgb",lt.toRgb(x)):lt.convert("hex",x))},[o]);return ye.createElement("div",{className:"rcp-fields"},!Hn(l,"hex")&&ye.createElement("div",{className:"rcp-fields-floor"},ye.createElement("div",{className:"rcp-field"},ye.createElement("input",{id:"hex",className:"rcp-field-input",readOnly:f,value:d.hex.value,onChange:v("hex"),onFocus:p("hex"),onBlur:y("hex")}),ye.createElement("label",{htmlFor:"hex",className:"rcp-field-label"},"HEX"))),(!Hn(l,"rgb")||!Hn(l,"hsv"))&&ye.createElement("div",{className:"rcp-fields-floor"},!Hn(l,"rgb")&&ye.createElement("div",{className:"rcp-field"},ye.createElement("input",{id:"rgb",className:"rcp-field-input",readOnly:f,value:d.rgb.value,onChange:v("rgb"),onFocus:p("rgb"),onBlur:y("rgb")}),ye.createElement("label",{htmlFor:"rgb",className:"rcp-field-label"},"RGB")),!Hn(l,"hsv")&&ye.createElement("div",{className:"rcp-field"},ye.createElement("input",{id:"hsv",className:"rcp-field-input",readOnly:f,value:d.hsv.value,onChange:v("hsv"),onFocus:p("hsv"),onBlur:y("hsv")}),ye.createElement("label",{htmlFor:"hsv",className:"rcp-field-label"},"HSV"))))}),jg=ce.memo(({color:l,disabled:u,onChange:f,onChangeComplete:r})=>{const[o,{width:d}]=Oi(),h=ce.useMemo(()=>({x:l.hsv.h/360*d}),[l.hsv.h,d]),v=ce.useCallback((y,T)=>{const M=lt.convert("hsv",{...l.hsv,h:T/d*360});f(M),y&&r?.(M)},[l.hsv,d,f,r]),p=ce.useMemo(()=>[l.hsv.h,"100%","50%"].join(" "),[l.hsv.h]);return ye.createElement(fr,{disabled:u,onCoordinateChange:v},ye.createElement("div",{ref:o,className:"rcp-hue"},ye.createElement("div",{style:{left:h.x,backgroundColor:`hsl(${p})`},className:"rcp-hue-cursor"})))}),xg=ce.memo(({height:l,color:u,disabled:f,onChange:r,onChangeComplete:o})=>{const[d,{width:h}]=Oi(),v=ce.useMemo(()=>{const M=u.hsv.s/100*h,x=(100-u.hsv.v)/100*l;return{x:M,y:x}},[u.hsv.s,u.hsv.v,h,l]),p=ce.useCallback((M,x,G)=>{const R=lt.convert("hsv",{...u.hsv,s:x/h*100,v:100-G/l*100});r(R),M&&o?.(R)},[u.hsv,h,l,r,o]),y=ce.useMemo(()=>[u.hsv.h,"100%","50%"].join(" "),[u.hsv.h]),T=ce.useMemo(()=>[u.rgb.r,u.rgb.g,u.rgb.b].join(" "),[u.rgb.r,u.rgb.g,u.rgb.b]);return ye.createElement(fr,{disabled:f,onCoordinateChange:p},ye.createElement("div",{ref:d,style:{height:l,backgroundColor:`hsl(${y})`},className:"rcp-saturation"},ye.createElement("div",{style:{left:v.x,top:v.y,backgroundColor:`rgb(${T})`},className:"rcp-saturation-cursor"})))}),Hg=ce.memo(({height:l=200,hideAlpha:u=!1,hideInput:f=!1,color:r,disabled:o=!1,onChange:d,onChangeComplete:h})=>ye.createElement("div",{className:"rcp-root rcp"},ye.createElement(xg,{height:l,color:r,disabled:o,onChange:d,onChangeComplete:h}),ye.createElement("div",{className:"rcp-body"},ye.createElement("section",{className:"rcp-section"},ye.createElement(jg,{color:r,disabled:o,onChange:d,onChangeComplete:h}),!u&&ye.createElement(Rg,{color:r,disabled:o,onChange:d,onChangeComplete:h})),(!Hn(f,"hex")||!Hn(f,"rgb")||!Hn(f,"hsv"))&&ye.createElement("section",{className:"rcp-section"},ye.createElement(Cg,{hideInput:f,color:r,disabled:o,onChange:d,onChangeComplete:h})))));function qg(l){const[u,f]=ce.useState(lt.convert("hex",l));return ce.useEffect(()=>{f(lt.convert("hex",l))},[l]),[u,f]}function w(l,u,f){function r(v,p){if(v._zod||Object.defineProperty(v,"_zod",{value:{def:p,constr:h,traits:new Set},enumerable:!1}),v._zod.traits.has(l))return;v._zod.traits.add(l),u(v,p);const y=h.prototype,T=Object.keys(y);for(let M=0;Mf?.Parent&&v instanceof f.Parent?!0:v?._zod?.traits?.has(l)}),Object.defineProperty(h,"name",{value:l}),h}class Jl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class im extends Error{constructor(u){super(`Encountered unidirectional transform during encode: ${u}`),this.name="ZodEncodeError"}}const cm={};function il(l){return cm}function fm(l){const u=Object.values(l).filter(r=>typeof r=="number");return Object.entries(l).filter(([r,o])=>u.indexOf(+r)===-1).map(([r,o])=>o)}function ar(l,u){return typeof u=="bigint"?u.toString():u}function rr(l){return{get value(){{const u=l();return Object.defineProperty(this,"value",{value:u}),u}}}}function or(l){return l==null}function sr(l){const u=l.startsWith("^")?1:0,f=l.endsWith("$")?l.length-1:l.length;return l.slice(u,f)}function Bg(l,u){const f=(l.toString().split(".")[1]||"").length,r=u.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const p=r.match(/\d?e-(\d?)/);p?.[1]&&(o=Number.parseInt(p[1]))}const d=f>o?f:o,h=Number.parseInt(l.toFixed(d).replace(".","")),v=Number.parseInt(u.toFixed(d).replace(".",""));return h%v/10**d}const Ch=Symbol("evaluating");function Se(l,u,f){let r;Object.defineProperty(l,u,{get(){if(r!==Ch)return r===void 0&&(r=Ch,r=f()),r},set(o){Object.defineProperty(l,u,{value:o})},configurable:!0})}function fl(l,u,f){Object.defineProperty(l,u,{value:f,writable:!0,enumerable:!0,configurable:!0})}function qn(...l){const u={};for(const f of l){const r=Object.getOwnPropertyDescriptors(f);Object.assign(u,r)}return Object.defineProperties({},u)}function jh(l){return JSON.stringify(l)}function Yg(l){return l.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const rm="captureStackTrace"in Error?Error.captureStackTrace:(...l)=>{};function _i(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)}const Gg=rr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const l=Function;return new l(""),!0}catch{return!1}});function Ja(l){if(_i(l)===!1)return!1;const u=l.constructor;if(u===void 0||typeof u!="function")return!0;const f=u.prototype;return!(_i(f)===!1||Object.prototype.hasOwnProperty.call(f,"isPrototypeOf")===!1)}function om(l){return Ja(l)?{...l}:Array.isArray(l)?[...l]:l}const Xg=new Set(["string","number","symbol"]);function Ai(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bn(l,u,f){const r=new l._zod.constr(u??l._zod.def);return(!u||f?.parent)&&(r._zod.parent=l),r}function k(l){const u=l;if(!u)return{};if(typeof u=="string")return{error:()=>u};if(u?.message!==void 0){if(u?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");u.error=u.message}return delete u.message,typeof u.error=="string"?{...u,error:()=>u.error}:u}function Vg(l){return Object.keys(l).filter(u=>l[u]._zod.optin==="optional"&&l[u]._zod.optout==="optional")}const Qg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Lg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&(h[v]=f.shape[v])}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function Kg(l,u){const f=l._zod.def,r=f.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const d=qn(l._zod.def,{get shape(){const h={...l._zod.def.shape};for(const v in u){if(!(v in f.shape))throw new Error(`Unrecognized key: "${v}"`);u[v]&&delete h[v]}return fl(this,"shape",h),h},checks:[]});return Bn(l,d)}function $g(l,u){if(!Ja(u))throw new Error("Invalid input to extend: expected a plain object");const f=l._zod.def.checks;if(f&&f.length>0){const d=l._zod.def.shape;for(const h in u)if(Object.getOwnPropertyDescriptor(d,h)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=qn(l._zod.def,{get shape(){const d={...l._zod.def.shape,...u};return fl(this,"shape",d),d}});return Bn(l,o)}function Jg(l,u){if(!Ja(u))throw new Error("Invalid input to safeExtend: expected a plain object");const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u};return fl(this,"shape",r),r}});return Bn(l,f)}function kg(l,u){const f=qn(l._zod.def,{get shape(){const r={...l._zod.def.shape,...u._zod.def.shape};return fl(this,"shape",r),r},get catchall(){return u._zod.def.catchall},checks:[]});return Bn(l,f)}function Wg(l,u,f){const o=u._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const h=qn(u._zod.def,{get shape(){const v=u._zod.def.shape,p={...v};if(f)for(const y in f){if(!(y in v))throw new Error(`Unrecognized key: "${y}"`);f[y]&&(p[y]=l?new l({type:"optional",innerType:v[y]}):v[y])}else for(const y in v)p[y]=l?new l({type:"optional",innerType:v[y]}):v[y];return fl(this,"shape",p),p},checks:[]});return Bn(u,h)}function Fg(l,u,f){const r=qn(u._zod.def,{get shape(){const o=u._zod.def.shape,d={...o};if(f)for(const h in f){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);f[h]&&(d[h]=new l({type:"nonoptional",innerType:o[h]}))}else for(const h in o)d[h]=new l({type:"nonoptional",innerType:o[h]});return fl(this,"shape",d),d}});return Bn(u,r)}function $l(l,u=0){if(l.aborted===!0)return!0;for(let f=u;f{var r;return(r=f).path??(r.path=[]),f.path.unshift(l),f})}function vi(l){return typeof l=="string"?l:l?.message}function cl(l,u,f){const r={...l,path:l.path??[]};if(!l.message){const o=vi(l.inst?._zod.def?.error?.(l))??vi(u?.error?.(l))??vi(f.customError?.(l))??vi(f.localeError?.(l))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,u?.reportInput||delete r.input,r}function dr(l){return Array.isArray(l)?"array":typeof l=="string"?"string":"unknown"}function ka(...l){const[u,f,r]=l;return typeof u=="string"?{message:u,code:"custom",input:f,inst:r}:{...u}}const dm=(l,u)=>{l.name="$ZodError",Object.defineProperty(l,"_zod",{value:l._zod,enumerable:!1}),Object.defineProperty(l,"issues",{value:u,enumerable:!1}),l.message=JSON.stringify(u,ar,2),Object.defineProperty(l,"toString",{value:()=>l.message,enumerable:!1})},hm=w("$ZodError",dm),mm=w("$ZodError",dm,{Parent:Error});function Ig(l,u=f=>f.message){const f={},r=[];for(const o of l.issues)o.path.length>0?(f[o.path[0]]=f[o.path[0]]||[],f[o.path[0]].push(u(o))):r.push(u(o));return{formErrors:r,fieldErrors:f}}function Pg(l,u=f=>f.message){const f={_errors:[]},r=o=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h}));else if(d.code==="invalid_key")r({issues:d.issues});else if(d.code==="invalid_element")r({issues:d.issues});else if(d.path.length===0)f._errors.push(u(d));else{let h=f,v=0;for(;v(u,f,r,o)=>{const d=r?Object.assign(r,{async:!1}):{async:!1},h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise)throw new Jl;if(h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},mr=l=>async(u,f,r,o)=>{const d=r?Object.assign(r,{async:!0}):{async:!0};let h=u._zod.run({value:f,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const v=new(o?.Err??l)(h.issues.map(p=>cl(p,d,il())));throw rm(v,o?.callee),v}return h.value},Mi=l=>(u,f,r)=>{const o=r?{...r,async:!1}:{async:!1},d=u._zod.run({value:f,issues:[]},o);if(d instanceof Promise)throw new Jl;return d.issues.length?{success:!1,error:new(l??hm)(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},e0=Mi(mm),Ni=l=>async(u,f,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let d=u._zod.run({value:f,issues:[]},o);return d instanceof Promise&&(d=await d),d.issues.length?{success:!1,error:new l(d.issues.map(h=>cl(h,o,il())))}:{success:!0,data:d.value}},t0=Ni(mm),n0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hr(l)(u,f,o)},l0=l=>(u,f,r)=>hr(l)(u,f,r),a0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return mr(l)(u,f,o)},u0=l=>async(u,f,r)=>mr(l)(u,f,r),i0=l=>(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mi(l)(u,f,o)},c0=l=>(u,f,r)=>Mi(l)(u,f,r),f0=l=>async(u,f,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ni(l)(u,f,o)},r0=l=>async(u,f,r)=>Ni(l)(u,f,r),o0=/^[cC][^\s-]{8,}$/,s0=/^[0-9a-z]+$/,d0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,h0=/^[0-9a-vA-V]{20}$/,m0=/^[A-Za-z0-9]{27}$/,v0=/^[a-zA-Z0-9_-]{21}$/,y0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,g0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xh=l=>l?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${l}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,p0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function b0(){return new RegExp(_0,"u")}const S0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,E0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,T0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vm=/^[A-Za-z0-9_-]*$/,A0=/^\+[1-9]\d{6,14}$/,ym="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",M0=new RegExp(`^${ym}$`);function gm(l){const u="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof l.precision=="number"?l.precision===-1?`${u}`:l.precision===0?`${u}:[0-5]\\d`:`${u}:[0-5]\\d\\.\\d{${l.precision}}`:`${u}(?::[0-5]\\d(?:\\.\\d+)?)?`}function N0(l){return new RegExp(`^${gm(l)}$`)}function D0(l){const u=gm({precision:l.precision}),f=["Z"];l.local&&f.push(""),l.offset&&f.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${u}(?:${f.join("|")})`;return new RegExp(`^${ym}T(?:${r})$`)}const Z0=l=>{const u=l?`[\\s\\S]{${l?.minimum??0},${l?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${u}$`)},U0=/^-?\d+$/,w0=/^-?\d+(?:\.\d+)?$/,R0=/^[^A-Z]*$/,C0=/^[^a-z]*$/,yt=w("$ZodCheck",(l,u)=>{var f;l._zod??(l._zod={}),l._zod.def=u,(f=l._zod).onattach??(f.onattach=[])}),pm={number:"number",bigint:"bigint",object:"date"},_m=w("$ZodCheckLessThan",(l,u)=>{yt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;u.value{(u.inclusive?r.value<=u.value:r.value{yt.init(l,u);const f=pm[typeof u.value];l._zod.onattach.push(r=>{const o=r._zod.bag,d=(u.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;u.value>d&&(u.inclusive?o.minimum=u.value:o.exclusiveMinimum=u.value)}),l._zod.check=r=>{(u.inclusive?r.value>=u.value:r.value>u.value)||r.issues.push({origin:f,code:"too_small",minimum:typeof u.value=="object"?u.value.getTime():u.value,input:r.value,inclusive:u.inclusive,inst:l,continue:!u.abort})}}),j0=w("$ZodCheckMultipleOf",(l,u)=>{yt.init(l,u),l._zod.onattach.push(f=>{var r;(r=f._zod.bag).multipleOf??(r.multipleOf=u.value)}),l._zod.check=f=>{if(typeof f.value!=typeof u.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof f.value=="bigint"?f.value%u.value===BigInt(0):Bg(f.value,u.value)===0)||f.issues.push({origin:typeof f.value,code:"not_multiple_of",divisor:u.value,input:f.value,inst:l,continue:!u.abort})}}),x0=w("$ZodCheckNumberFormat",(l,u)=>{yt.init(l,u),u.format=u.format||"float64";const f=u.format?.includes("int"),r=f?"int":"number",[o,d]=Qg[u.format];l._zod.onattach.push(h=>{const v=h._zod.bag;v.format=u.format,v.minimum=o,v.maximum=d,f&&(v.pattern=U0)}),l._zod.check=h=>{const v=h.value;if(f){if(!Number.isInteger(v)){h.issues.push({expected:r,format:u.format,code:"invalid_type",continue:!1,input:v,inst:l});return}if(!Number.isSafeInteger(v)){v>0?h.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort}):h.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:l,origin:r,inclusive:!0,continue:!u.abort});return}}vd&&h.issues.push({origin:"number",input:v,code:"too_big",maximum:d,inclusive:!0,inst:l,continue:!u.abort})}}),H0=w("$ZodCheckMaxLength",(l,u)=>{var f;yt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;u.maximum{const o=r.value;if(o.length<=u.maximum)return;const h=dr(o);r.issues.push({origin:h,code:"too_big",maximum:u.maximum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),q0=w("$ZodCheckMinLength",(l,u)=>{var f;yt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;u.minimum>o&&(r._zod.bag.minimum=u.minimum)}),l._zod.check=r=>{const o=r.value;if(o.length>=u.minimum)return;const h=dr(o);r.issues.push({origin:h,code:"too_small",minimum:u.minimum,inclusive:!0,input:o,inst:l,continue:!u.abort})}}),B0=w("$ZodCheckLengthEquals",(l,u)=>{var f;yt.init(l,u),(f=l._zod.def).when??(f.when=r=>{const o=r.value;return!or(o)&&o.length!==void 0}),l._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=u.length,o.maximum=u.length,o.length=u.length}),l._zod.check=r=>{const o=r.value,d=o.length;if(d===u.length)return;const h=dr(o),v=d>u.length;r.issues.push({origin:h,...v?{code:"too_big",maximum:u.length}:{code:"too_small",minimum:u.length},inclusive:!0,exact:!0,input:r.value,inst:l,continue:!u.abort})}}),Di=w("$ZodCheckStringFormat",(l,u)=>{var f,r;yt.init(l,u),l._zod.onattach.push(o=>{const d=o._zod.bag;d.format=u.format,u.pattern&&(d.patterns??(d.patterns=new Set),d.patterns.add(u.pattern))}),u.pattern?(f=l._zod).check??(f.check=o=>{u.pattern.lastIndex=0,!u.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:u.format,input:o.value,...u.pattern?{pattern:u.pattern.toString()}:{},inst:l,continue:!u.abort})}):(r=l._zod).check??(r.check=()=>{})}),Y0=w("$ZodCheckRegex",(l,u)=>{Di.init(l,u),l._zod.check=f=>{u.pattern.lastIndex=0,!u.pattern.test(f.value)&&f.issues.push({origin:"string",code:"invalid_format",format:"regex",input:f.value,pattern:u.pattern.toString(),inst:l,continue:!u.abort})}}),G0=w("$ZodCheckLowerCase",(l,u)=>{u.pattern??(u.pattern=R0),Di.init(l,u)}),X0=w("$ZodCheckUpperCase",(l,u)=>{u.pattern??(u.pattern=C0),Di.init(l,u)}),V0=w("$ZodCheckIncludes",(l,u)=>{yt.init(l,u);const f=Ai(u.includes),r=new RegExp(typeof u.position=="number"?`^.{${u.position}}${f}`:f);u.pattern=r,l._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(r)}),l._zod.check=o=>{o.value.includes(u.includes,u.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:u.includes,input:o.value,inst:l,continue:!u.abort})}}),Q0=w("$ZodCheckStartsWith",(l,u)=>{yt.init(l,u);const f=new RegExp(`^${Ai(u.prefix)}.*`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.startsWith(u.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:u.prefix,input:r.value,inst:l,continue:!u.abort})}}),L0=w("$ZodCheckEndsWith",(l,u)=>{yt.init(l,u);const f=new RegExp(`.*${Ai(u.suffix)}$`);u.pattern??(u.pattern=f),l._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(f)}),l._zod.check=r=>{r.value.endsWith(u.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:u.suffix,input:r.value,inst:l,continue:!u.abort})}}),K0=w("$ZodCheckOverwrite",(l,u)=>{yt.init(l,u),l._zod.check=f=>{f.value=u.tx(f.value)}});class $0{constructor(u=[]){this.content=[],this.indent=0,this&&(this.args=u)}indented(u){this.indent+=1,u(this),this.indent-=1}write(u){if(typeof u=="function"){u(this,{execution:"sync"}),u(this,{execution:"async"});return}const r=u.split(` `).filter(h=>h),o=Math.min(...r.map(h=>h.length-h.trimStart().length)),d=r.map(h=>h.slice(o)).map(h=>" ".repeat(this.indent*2)+h);for(const h of d)this.content.push(h)}compile(){const u=Function,f=this?.args,o=[...(this?.content??[""]).map(d=>` ${d}`)];return new u(...f,o.join(` -`))}}const J0={major:4,minor:3,patch:6},Ve=w("$ZodType",(l,u)=>{var f;l??(l={}),l._zod.def=u,l._zod.bag=l._zod.bag||{},l._zod.version=J0;const r=[...l._zod.def.checks??[]];l._zod.traits.has("$ZodCheck")&&r.unshift(l);for(const o of r)for(const d of o._zod.onattach)d(l);if(r.length===0)(f=l._zod).deferred??(f.deferred=[]),l._zod.deferred?.push(()=>{l._zod.run=l._zod.parse});else{const o=(h,v,p)=>{let y=$l(h),T;for(const N of v){if(N._zod.def.when){if(!N._zod.def.when(h))continue}else if(y)continue;const x=h.issues.length,G=N._zod.check(h);if(G instanceof Promise&&p?.async===!1)throw new Jl;if(T||G instanceof Promise)T=(T??Promise.resolve()).then(async()=>{await G,h.issues.length!==x&&(y||(y=$l(h,x)))});else{if(h.issues.length===x)continue;y||(y=$l(h,x))}}return T?T.then(()=>h):h},d=(h,v,p)=>{if($l(h))return h.aborted=!0,h;const y=o(v,r,p);if(y instanceof Promise){if(p.async===!1)throw new Jl;return y.then(T=>l._zod.parse(T,p))}return l._zod.parse(y,p)};l._zod.run=(h,v)=>{if(v.skipChecks)return l._zod.parse(h,v);if(v.direction==="backward"){const y=l._zod.parse({value:h.value,issues:[]},{...v,skipChecks:!0});return y instanceof Promise?y.then(T=>d(T,h,v)):d(y,h,v)}const p=l._zod.parse(h,v);if(p instanceof Promise){if(v.async===!1)throw new Jl;return p.then(y=>o(y,r,v))}return o(p,r,v)}}_e(l,"~standard",()=>({validate:o=>{try{const d=e0(l,o);return d.success?{value:d.data}:{issues:d.error?.issues}}catch{return t0(l,o).then(h=>h.success?{value:h.data}:{issues:h.error?.issues})}},vendor:"zod",version:1}))}),vr=w("$ZodString",(l,u)=>{Ve.init(l,u),l._zod.pattern=[...l?._zod.bag?.patterns??[]].pop()??Z0(l._zod.bag),l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=String(f.value)}catch{}return typeof f.value=="string"||f.issues.push({expected:"string",code:"invalid_type",input:f.value,inst:l}),f}}),Ue=w("$ZodStringFormat",(l,u)=>{Di.init(l,u),vr.init(l,u)}),k0=w("$ZodGUID",(l,u)=>{u.pattern??(u.pattern=g0),Ue.init(l,u)}),W0=w("$ZodUUID",(l,u)=>{if(u.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[u.version];if(r===void 0)throw new Error(`Invalid UUID version: "${u.version}"`);u.pattern??(u.pattern=xh(r))}else u.pattern??(u.pattern=xh());Ue.init(l,u)}),F0=w("$ZodEmail",(l,u)=>{u.pattern??(u.pattern=p0),Ue.init(l,u)}),I0=w("$ZodURL",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{try{const r=f.value.trim(),o=new URL(r);u.hostname&&(u.hostname.lastIndex=0,u.hostname.test(o.hostname)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:u.hostname.source,input:f.value,inst:l,continue:!u.abort})),u.protocol&&(u.protocol.lastIndex=0,u.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:u.protocol.source,input:f.value,inst:l,continue:!u.abort})),u.normalize?f.value=o.href:f.value=r;return}catch{f.issues.push({code:"invalid_format",format:"url",input:f.value,inst:l,continue:!u.abort})}}}),P0=w("$ZodEmoji",(l,u)=>{u.pattern??(u.pattern=b0()),Ue.init(l,u)}),ep=w("$ZodNanoID",(l,u)=>{u.pattern??(u.pattern=v0),Ue.init(l,u)}),tp=w("$ZodCUID",(l,u)=>{u.pattern??(u.pattern=o0),Ue.init(l,u)}),np=w("$ZodCUID2",(l,u)=>{u.pattern??(u.pattern=s0),Ue.init(l,u)}),lp=w("$ZodULID",(l,u)=>{u.pattern??(u.pattern=d0),Ue.init(l,u)}),ap=w("$ZodXID",(l,u)=>{u.pattern??(u.pattern=h0),Ue.init(l,u)}),up=w("$ZodKSUID",(l,u)=>{u.pattern??(u.pattern=m0),Ue.init(l,u)}),ip=w("$ZodISODateTime",(l,u)=>{u.pattern??(u.pattern=D0(u)),Ue.init(l,u)}),cp=w("$ZodISODate",(l,u)=>{u.pattern??(u.pattern=M0),Ue.init(l,u)}),fp=w("$ZodISOTime",(l,u)=>{u.pattern??(u.pattern=N0(u)),Ue.init(l,u)}),rp=w("$ZodISODuration",(l,u)=>{u.pattern??(u.pattern=y0),Ue.init(l,u)}),op=w("$ZodIPv4",(l,u)=>{u.pattern??(u.pattern=S0),Ue.init(l,u),l._zod.bag.format="ipv4"}),sp=w("$ZodIPv6",(l,u)=>{u.pattern??(u.pattern=z0),Ue.init(l,u),l._zod.bag.format="ipv6",l._zod.check=f=>{try{new URL(`http://[${f.value}]`)}catch{f.issues.push({code:"invalid_format",format:"ipv6",input:f.value,inst:l,continue:!u.abort})}}}),dp=w("$ZodCIDRv4",(l,u)=>{u.pattern??(u.pattern=E0),Ue.init(l,u)}),hp=w("$ZodCIDRv6",(l,u)=>{u.pattern??(u.pattern=T0),Ue.init(l,u),l._zod.check=f=>{const r=f.value.split("/");try{if(r.length!==2)throw new Error;const[o,d]=r;if(!d)throw new Error;const h=Number(d);if(`${h}`!==d)throw new Error;if(h<0||h>128)throw new Error;new URL(`http://[${o}]`)}catch{f.issues.push({code:"invalid_format",format:"cidrv6",input:f.value,inst:l,continue:!u.abort})}}});function Sm(l){if(l==="")return!0;if(l.length%4!==0)return!1;try{return atob(l),!0}catch{return!1}}const mp=w("$ZodBase64",(l,u)=>{u.pattern??(u.pattern=O0),Ue.init(l,u),l._zod.bag.contentEncoding="base64",l._zod.check=f=>{Sm(f.value)||f.issues.push({code:"invalid_format",format:"base64",input:f.value,inst:l,continue:!u.abort})}});function vp(l){if(!vm.test(l))return!1;const u=l.replace(/[-_]/g,r=>r==="-"?"+":"/"),f=u.padEnd(Math.ceil(u.length/4)*4,"=");return Sm(f)}const yp=w("$ZodBase64URL",(l,u)=>{u.pattern??(u.pattern=vm),Ue.init(l,u),l._zod.bag.contentEncoding="base64url",l._zod.check=f=>{vp(f.value)||f.issues.push({code:"invalid_format",format:"base64url",input:f.value,inst:l,continue:!u.abort})}}),gp=w("$ZodE164",(l,u)=>{u.pattern??(u.pattern=A0),Ue.init(l,u)});function pp(l,u=null){try{const f=l.split(".");if(f.length!==3)return!1;const[r]=f;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||u&&(!("alg"in o)||o.alg!==u))}catch{return!1}}const _p=w("$ZodJWT",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{pp(f.value,u.alg)||f.issues.push({code:"invalid_format",format:"jwt",input:f.value,inst:l,continue:!u.abort})}}),zm=w("$ZodNumber",(l,u)=>{Ve.init(l,u),l._zod.pattern=l._zod.bag.pattern??w0,l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=Number(f.value)}catch{}const o=f.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return f;const d=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return f.issues.push({expected:"number",code:"invalid_type",input:o,inst:l,...d?{received:d}:{}}),f}}),bp=w("$ZodNumberFormat",(l,u)=>{x0.init(l,u),zm.init(l,u)}),Sp=w("$ZodUnknown",(l,u)=>{Ve.init(l,u),l._zod.parse=f=>f}),zp=w("$ZodNever",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>(f.issues.push({expected:"never",code:"invalid_type",input:f.value,inst:l}),f)});function Hh(l,u,f){l.issues.length&&u.issues.push(...sm(f,l.issues)),u.value[f]=l.value}const Ep=w("$ZodArray",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>{const o=f.value;if(!Array.isArray(o))return f.issues.push({expected:"array",code:"invalid_type",input:o,inst:l}),f;f.value=Array(o.length);const d=[];for(let h=0;hHh(y,f,h))):Hh(p,f,h)}return d.length?Promise.all(d).then(()=>f):f}});function bi(l,u,f,r,o){if(l.issues.length){if(o&&!(f in r))return;u.issues.push(...sm(f,l.issues))}l.value===void 0?f in r&&(u.value[f]=void 0):u.value[f]=l.value}function Em(l){const u=Object.keys(l.shape);for(const r of u)if(!l.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const f=Vg(l.shape);return{...l,keys:u,keySet:new Set(u),numKeys:u.length,optionalKeys:new Set(f)}}function Tm(l,u,f,r,o,d){const h=[],v=o.keySet,p=o.catchall._zod,y=p.def.type,T=p.optout==="optional";for(const N in u){if(v.has(N))continue;if(y==="never"){h.push(N);continue}const x=p.run({value:u[N],issues:[]},r);x instanceof Promise?l.push(x.then(G=>bi(G,f,N,u,T))):bi(x,f,N,u,T)}return h.length&&f.issues.push({code:"unrecognized_keys",keys:h,input:u,inst:d}),l.length?Promise.all(l).then(()=>f):f}const Tp=w("$ZodObject",(l,u)=>{if(Ve.init(l,u),!Object.getOwnPropertyDescriptor(u,"shape")?.get){const v=u.shape;Object.defineProperty(u,"shape",{get:()=>{const p={...v};return Object.defineProperty(u,"shape",{value:p}),p}})}const r=rr(()=>Em(u));_e(l._zod,"propValues",()=>{const v=u.shape,p={};for(const y in v){const T=v[y]._zod;if(T.values){p[y]??(p[y]=new Set);for(const N of T.values)p[y].add(N)}}return p});const o=_i,d=u.catchall;let h;l._zod.parse=(v,p)=>{h??(h=r.value);const y=v.value;if(!o(y))return v.issues.push({expected:"object",code:"invalid_type",input:y,inst:l}),v;v.value={};const T=[],N=h.shape;for(const x of h.keys){const G=N[x],R=G._zod.optout==="optional",j=G._zod.run({value:y[x],issues:[]},p);j instanceof Promise?T.push(j.then(H=>bi(H,v,x,y,R))):bi(j,v,x,y,R)}return d?Tm(T,y,v,p,r.value,l):T.length?Promise.all(T).then(()=>v):v}}),Op=w("$ZodObjectJIT",(l,u)=>{Tp.init(l,u);const f=l._zod.parse,r=rr(()=>Em(u)),o=x=>{const G=new $0(["shape","payload","ctx"]),R=r.value,j=Q=>{const I=jh(Q);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};G.write("const input = payload.value;");const H=Object.create(null);let q=0;for(const Q of R.keys)H[Q]=`key_${q++}`;G.write("const newResult = {};");for(const Q of R.keys){const I=H[Q],ee=jh(Q),$=x[Q]?._zod?.optout==="optional";G.write(`const ${I} = ${j(Q)};`),$?G.write(` +`))}}const J0={major:4,minor:3,patch:6},Xe=w("$ZodType",(l,u)=>{var f;l??(l={}),l._zod.def=u,l._zod.bag=l._zod.bag||{},l._zod.version=J0;const r=[...l._zod.def.checks??[]];l._zod.traits.has("$ZodCheck")&&r.unshift(l);for(const o of r)for(const d of o._zod.onattach)d(l);if(r.length===0)(f=l._zod).deferred??(f.deferred=[]),l._zod.deferred?.push(()=>{l._zod.run=l._zod.parse});else{const o=(h,v,p)=>{let y=$l(h),T;for(const M of v){if(M._zod.def.when){if(!M._zod.def.when(h))continue}else if(y)continue;const x=h.issues.length,G=M._zod.check(h);if(G instanceof Promise&&p?.async===!1)throw new Jl;if(T||G instanceof Promise)T=(T??Promise.resolve()).then(async()=>{await G,h.issues.length!==x&&(y||(y=$l(h,x)))});else{if(h.issues.length===x)continue;y||(y=$l(h,x))}}return T?T.then(()=>h):h},d=(h,v,p)=>{if($l(h))return h.aborted=!0,h;const y=o(v,r,p);if(y instanceof Promise){if(p.async===!1)throw new Jl;return y.then(T=>l._zod.parse(T,p))}return l._zod.parse(y,p)};l._zod.run=(h,v)=>{if(v.skipChecks)return l._zod.parse(h,v);if(v.direction==="backward"){const y=l._zod.parse({value:h.value,issues:[]},{...v,skipChecks:!0});return y instanceof Promise?y.then(T=>d(T,h,v)):d(y,h,v)}const p=l._zod.parse(h,v);if(p instanceof Promise){if(v.async===!1)throw new Jl;return p.then(y=>o(y,r,v))}return o(p,r,v)}}Se(l,"~standard",()=>({validate:o=>{try{const d=e0(l,o);return d.success?{value:d.data}:{issues:d.error?.issues}}catch{return t0(l,o).then(h=>h.success?{value:h.data}:{issues:h.error?.issues})}},vendor:"zod",version:1}))}),vr=w("$ZodString",(l,u)=>{Xe.init(l,u),l._zod.pattern=[...l?._zod.bag?.patterns??[]].pop()??Z0(l._zod.bag),l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=String(f.value)}catch{}return typeof f.value=="string"||f.issues.push({expected:"string",code:"invalid_type",input:f.value,inst:l}),f}}),Ue=w("$ZodStringFormat",(l,u)=>{Di.init(l,u),vr.init(l,u)}),k0=w("$ZodGUID",(l,u)=>{u.pattern??(u.pattern=g0),Ue.init(l,u)}),W0=w("$ZodUUID",(l,u)=>{if(u.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[u.version];if(r===void 0)throw new Error(`Invalid UUID version: "${u.version}"`);u.pattern??(u.pattern=xh(r))}else u.pattern??(u.pattern=xh());Ue.init(l,u)}),F0=w("$ZodEmail",(l,u)=>{u.pattern??(u.pattern=p0),Ue.init(l,u)}),I0=w("$ZodURL",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{try{const r=f.value.trim(),o=new URL(r);u.hostname&&(u.hostname.lastIndex=0,u.hostname.test(o.hostname)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:u.hostname.source,input:f.value,inst:l,continue:!u.abort})),u.protocol&&(u.protocol.lastIndex=0,u.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||f.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:u.protocol.source,input:f.value,inst:l,continue:!u.abort})),u.normalize?f.value=o.href:f.value=r;return}catch{f.issues.push({code:"invalid_format",format:"url",input:f.value,inst:l,continue:!u.abort})}}}),P0=w("$ZodEmoji",(l,u)=>{u.pattern??(u.pattern=b0()),Ue.init(l,u)}),ep=w("$ZodNanoID",(l,u)=>{u.pattern??(u.pattern=v0),Ue.init(l,u)}),tp=w("$ZodCUID",(l,u)=>{u.pattern??(u.pattern=o0),Ue.init(l,u)}),np=w("$ZodCUID2",(l,u)=>{u.pattern??(u.pattern=s0),Ue.init(l,u)}),lp=w("$ZodULID",(l,u)=>{u.pattern??(u.pattern=d0),Ue.init(l,u)}),ap=w("$ZodXID",(l,u)=>{u.pattern??(u.pattern=h0),Ue.init(l,u)}),up=w("$ZodKSUID",(l,u)=>{u.pattern??(u.pattern=m0),Ue.init(l,u)}),ip=w("$ZodISODateTime",(l,u)=>{u.pattern??(u.pattern=D0(u)),Ue.init(l,u)}),cp=w("$ZodISODate",(l,u)=>{u.pattern??(u.pattern=M0),Ue.init(l,u)}),fp=w("$ZodISOTime",(l,u)=>{u.pattern??(u.pattern=N0(u)),Ue.init(l,u)}),rp=w("$ZodISODuration",(l,u)=>{u.pattern??(u.pattern=y0),Ue.init(l,u)}),op=w("$ZodIPv4",(l,u)=>{u.pattern??(u.pattern=S0),Ue.init(l,u),l._zod.bag.format="ipv4"}),sp=w("$ZodIPv6",(l,u)=>{u.pattern??(u.pattern=z0),Ue.init(l,u),l._zod.bag.format="ipv6",l._zod.check=f=>{try{new URL(`http://[${f.value}]`)}catch{f.issues.push({code:"invalid_format",format:"ipv6",input:f.value,inst:l,continue:!u.abort})}}}),dp=w("$ZodCIDRv4",(l,u)=>{u.pattern??(u.pattern=E0),Ue.init(l,u)}),hp=w("$ZodCIDRv6",(l,u)=>{u.pattern??(u.pattern=T0),Ue.init(l,u),l._zod.check=f=>{const r=f.value.split("/");try{if(r.length!==2)throw new Error;const[o,d]=r;if(!d)throw new Error;const h=Number(d);if(`${h}`!==d)throw new Error;if(h<0||h>128)throw new Error;new URL(`http://[${o}]`)}catch{f.issues.push({code:"invalid_format",format:"cidrv6",input:f.value,inst:l,continue:!u.abort})}}});function Sm(l){if(l==="")return!0;if(l.length%4!==0)return!1;try{return atob(l),!0}catch{return!1}}const mp=w("$ZodBase64",(l,u)=>{u.pattern??(u.pattern=O0),Ue.init(l,u),l._zod.bag.contentEncoding="base64",l._zod.check=f=>{Sm(f.value)||f.issues.push({code:"invalid_format",format:"base64",input:f.value,inst:l,continue:!u.abort})}});function vp(l){if(!vm.test(l))return!1;const u=l.replace(/[-_]/g,r=>r==="-"?"+":"/"),f=u.padEnd(Math.ceil(u.length/4)*4,"=");return Sm(f)}const yp=w("$ZodBase64URL",(l,u)=>{u.pattern??(u.pattern=vm),Ue.init(l,u),l._zod.bag.contentEncoding="base64url",l._zod.check=f=>{vp(f.value)||f.issues.push({code:"invalid_format",format:"base64url",input:f.value,inst:l,continue:!u.abort})}}),gp=w("$ZodE164",(l,u)=>{u.pattern??(u.pattern=A0),Ue.init(l,u)});function pp(l,u=null){try{const f=l.split(".");if(f.length!==3)return!1;const[r]=f;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||u&&(!("alg"in o)||o.alg!==u))}catch{return!1}}const _p=w("$ZodJWT",(l,u)=>{Ue.init(l,u),l._zod.check=f=>{pp(f.value,u.alg)||f.issues.push({code:"invalid_format",format:"jwt",input:f.value,inst:l,continue:!u.abort})}}),zm=w("$ZodNumber",(l,u)=>{Xe.init(l,u),l._zod.pattern=l._zod.bag.pattern??w0,l._zod.parse=(f,r)=>{if(u.coerce)try{f.value=Number(f.value)}catch{}const o=f.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return f;const d=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return f.issues.push({expected:"number",code:"invalid_type",input:o,inst:l,...d?{received:d}:{}}),f}}),bp=w("$ZodNumberFormat",(l,u)=>{x0.init(l,u),zm.init(l,u)}),Sp=w("$ZodUnknown",(l,u)=>{Xe.init(l,u),l._zod.parse=f=>f}),zp=w("$ZodNever",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>(f.issues.push({expected:"never",code:"invalid_type",input:f.value,inst:l}),f)});function Hh(l,u,f){l.issues.length&&u.issues.push(...sm(f,l.issues)),u.value[f]=l.value}const Ep=w("$ZodArray",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>{const o=f.value;if(!Array.isArray(o))return f.issues.push({expected:"array",code:"invalid_type",input:o,inst:l}),f;f.value=Array(o.length);const d=[];for(let h=0;hHh(y,f,h))):Hh(p,f,h)}return d.length?Promise.all(d).then(()=>f):f}});function bi(l,u,f,r,o){if(l.issues.length){if(o&&!(f in r))return;u.issues.push(...sm(f,l.issues))}l.value===void 0?f in r&&(u.value[f]=void 0):u.value[f]=l.value}function Em(l){const u=Object.keys(l.shape);for(const r of u)if(!l.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const f=Vg(l.shape);return{...l,keys:u,keySet:new Set(u),numKeys:u.length,optionalKeys:new Set(f)}}function Tm(l,u,f,r,o,d){const h=[],v=o.keySet,p=o.catchall._zod,y=p.def.type,T=p.optout==="optional";for(const M in u){if(v.has(M))continue;if(y==="never"){h.push(M);continue}const x=p.run({value:u[M],issues:[]},r);x instanceof Promise?l.push(x.then(G=>bi(G,f,M,u,T))):bi(x,f,M,u,T)}return h.length&&f.issues.push({code:"unrecognized_keys",keys:h,input:u,inst:d}),l.length?Promise.all(l).then(()=>f):f}const Tp=w("$ZodObject",(l,u)=>{if(Xe.init(l,u),!Object.getOwnPropertyDescriptor(u,"shape")?.get){const v=u.shape;Object.defineProperty(u,"shape",{get:()=>{const p={...v};return Object.defineProperty(u,"shape",{value:p}),p}})}const r=rr(()=>Em(u));Se(l._zod,"propValues",()=>{const v=u.shape,p={};for(const y in v){const T=v[y]._zod;if(T.values){p[y]??(p[y]=new Set);for(const M of T.values)p[y].add(M)}}return p});const o=_i,d=u.catchall;let h;l._zod.parse=(v,p)=>{h??(h=r.value);const y=v.value;if(!o(y))return v.issues.push({expected:"object",code:"invalid_type",input:y,inst:l}),v;v.value={};const T=[],M=h.shape;for(const x of h.keys){const G=M[x],R=G._zod.optout==="optional",j=G._zod.run({value:y[x],issues:[]},p);j instanceof Promise?T.push(j.then(H=>bi(H,v,x,y,R))):bi(j,v,x,y,R)}return d?Tm(T,y,v,p,r.value,l):T.length?Promise.all(T).then(()=>v):v}}),Op=w("$ZodObjectJIT",(l,u)=>{Tp.init(l,u);const f=l._zod.parse,r=rr(()=>Em(u)),o=x=>{const G=new $0(["shape","payload","ctx"]),R=r.value,j=Q=>{const I=jh(Q);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};G.write("const input = payload.value;");const H=Object.create(null);let q=0;for(const Q of R.keys)H[Q]=`key_${q++}`;G.write("const newResult = {};");for(const Q of R.keys){const I=H[Q],ee=jh(Q),W=x[Q]?._zod?.optout==="optional";G.write(`const ${I} = ${j(Q)};`),W?G.write(` if (${I}.issues.length) { if (${ee} in input) { payload.issues = payload.issues.concat(${I}.issues.map(iss => ({ @@ -50,6 +50,6 @@ Error generating stack: `+a.message+` newResult[${ee}] = ${I}.value; } - `)}G.write("payload.value = newResult;"),G.write("return payload;");const K=G.compile();return(Q,I)=>K(x,Q,I)};let d;const h=_i,v=!cm.jitless,y=v&&Gg.value,T=u.catchall;let N;l._zod.parse=(x,G)=>{N??(N=r.value);const R=x.value;return h(R)?v&&y&&G?.async===!1&&G.jitless!==!0?(d||(d=o(u.shape)),x=d(x,G),T?Tm([],R,x,G,N,l):x):f(x,G):(x.issues.push({expected:"object",code:"invalid_type",input:R,inst:l}),x)}});function qh(l,u,f,r){for(const d of l)if(d.issues.length===0)return u.value=d.value,u;const o=l.filter(d=>!$l(d));return o.length===1?(u.value=o[0].value,o[0]):(u.issues.push({code:"invalid_union",input:u.value,inst:f,errors:l.map(d=>d.issues.map(h=>cl(h,r,il())))}),u)}const Ap=w("$ZodUnion",(l,u)=>{Ve.init(l,u),_e(l._zod,"optin",()=>u.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_e(l._zod,"optout",()=>u.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_e(l._zod,"values",()=>{if(u.options.every(o=>o._zod.values))return new Set(u.options.flatMap(o=>Array.from(o._zod.values)))}),_e(l._zod,"pattern",()=>{if(u.options.every(o=>o._zod.pattern)){const o=u.options.map(d=>d._zod.pattern);return new RegExp(`^(${o.map(d=>sr(d.source)).join("|")})$`)}});const f=u.options.length===1,r=u.options[0]._zod.run;l._zod.parse=(o,d)=>{if(f)return r(o,d);let h=!1;const v=[];for(const p of u.options){const y=p._zod.run({value:o.value,issues:[]},d);if(y instanceof Promise)v.push(y),h=!0;else{if(y.issues.length===0)return y;v.push(y)}}return h?Promise.all(v).then(p=>qh(p,o,l,d)):qh(v,o,l,d)}}),Mp=w("$ZodIntersection",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>{const o=f.value,d=u.left._zod.run({value:o,issues:[]},r),h=u.right._zod.run({value:o,issues:[]},r);return d instanceof Promise||h instanceof Promise?Promise.all([d,h]).then(([p,y])=>Bh(f,p,y)):Bh(f,d,h)}});function ur(l,u){if(l===u)return{valid:!0,data:l};if(l instanceof Date&&u instanceof Date&&+l==+u)return{valid:!0,data:l};if(Ja(l)&&Ja(u)){const f=Object.keys(u),r=Object.keys(l).filter(d=>f.indexOf(d)!==-1),o={...l,...u};for(const d of r){const h=ur(l[d],u[d]);if(!h.valid)return{valid:!1,mergeErrorPath:[d,...h.mergeErrorPath]};o[d]=h.data}return{valid:!0,data:o}}if(Array.isArray(l)&&Array.isArray(u)){if(l.length!==u.length)return{valid:!1,mergeErrorPath:[]};const f=[];for(let r=0;rv.l&&v.r).map(([v])=>v);if(d.length&&o&&l.issues.push({...o,keys:d}),$l(l))return l;const h=ur(u.value,f.value);if(!h.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(h.mergeErrorPath)}`);return l.value=h.data,l}const Np=w("$ZodEnum",(l,u)=>{Ve.init(l,u);const f=fm(u.entries),r=new Set(f);l._zod.values=r,l._zod.pattern=new RegExp(`^(${f.filter(o=>Xg.has(typeof o)).map(o=>typeof o=="string"?Ai(o):o.toString()).join("|")})$`),l._zod.parse=(o,d)=>{const h=o.value;return r.has(h)||o.issues.push({code:"invalid_value",values:f,input:h,inst:l}),o}}),Dp=w("$ZodTransform",(l,u)=>{Ve.init(l,u),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);const o=u.transform(f.value,f);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(h=>(f.value=h,f));if(o instanceof Promise)throw new Jl;return f.value=o,f}});function Yh(l,u){return l.issues.length&&u===void 0?{issues:[],value:void 0}:l}const Om=w("$ZodOptional",(l,u)=>{Ve.init(l,u),l._zod.optin="optional",l._zod.optout="optional",_e(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,void 0]):void 0),_e(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)})?$`):void 0}),l._zod.parse=(f,r)=>{if(u.innerType._zod.optin==="optional"){const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Yh(d,f.value)):Yh(o,f.value)}return f.value===void 0?f:u.innerType._zod.run(f,r)}}),Zp=w("$ZodExactOptional",(l,u)=>{Om.init(l,u),_e(l._zod,"values",()=>u.innerType._zod.values),_e(l._zod,"pattern",()=>u.innerType._zod.pattern),l._zod.parse=(f,r)=>u.innerType._zod.run(f,r)}),Up=w("$ZodNullable",(l,u)=>{Ve.init(l,u),_e(l._zod,"optin",()=>u.innerType._zod.optin),_e(l._zod,"optout",()=>u.innerType._zod.optout),_e(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)}|null)$`):void 0}),_e(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,null]):void 0),l._zod.parse=(f,r)=>f.value===null?f:u.innerType._zod.run(f,r)}),wp=w("$ZodDefault",(l,u)=>{Ve.init(l,u),l._zod.optin="optional",_e(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);if(f.value===void 0)return f.value=u.defaultValue,f;const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Gh(d,u)):Gh(o,u)}});function Gh(l,u){return l.value===void 0&&(l.value=u.defaultValue),l}const Rp=w("$ZodPrefault",(l,u)=>{Ve.init(l,u),l._zod.optin="optional",_e(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>(r.direction==="backward"||f.value===void 0&&(f.value=u.defaultValue),u.innerType._zod.run(f,r))}),Cp=w("$ZodNonOptional",(l,u)=>{Ve.init(l,u),_e(l._zod,"values",()=>{const f=u.innerType._zod.values;return f?new Set([...f].filter(r=>r!==void 0)):void 0}),l._zod.parse=(f,r)=>{const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Xh(d,l)):Xh(o,l)}});function Xh(l,u){return!l.issues.length&&l.value===void 0&&l.issues.push({code:"invalid_type",expected:"nonoptional",input:l.value,inst:u}),l}const jp=w("$ZodCatch",(l,u)=>{Ve.init(l,u),_e(l._zod,"optin",()=>u.innerType._zod.optin),_e(l._zod,"optout",()=>u.innerType._zod.optout),_e(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>(f.value=d.value,d.issues.length&&(f.value=u.catchValue({...f,error:{issues:d.issues.map(h=>cl(h,r,il()))},input:f.value}),f.issues=[]),f)):(f.value=o.value,o.issues.length&&(f.value=u.catchValue({...f,error:{issues:o.issues.map(d=>cl(d,r,il()))},input:f.value}),f.issues=[]),f)}}),xp=w("$ZodPipe",(l,u)=>{Ve.init(l,u),_e(l._zod,"values",()=>u.in._zod.values),_e(l._zod,"optin",()=>u.in._zod.optin),_e(l._zod,"optout",()=>u.out._zod.optout),_e(l._zod,"propValues",()=>u.in._zod.propValues),l._zod.parse=(f,r)=>{if(r.direction==="backward"){const d=u.out._zod.run(f,r);return d instanceof Promise?d.then(h=>yi(h,u.in,r)):yi(d,u.in,r)}const o=u.in._zod.run(f,r);return o instanceof Promise?o.then(d=>yi(d,u.out,r)):yi(o,u.out,r)}});function yi(l,u,f){return l.issues.length?(l.aborted=!0,l):u._zod.run({value:l.value,issues:l.issues},f)}const Hp=w("$ZodReadonly",(l,u)=>{Ve.init(l,u),_e(l._zod,"propValues",()=>u.innerType._zod.propValues),_e(l._zod,"values",()=>u.innerType._zod.values),_e(l._zod,"optin",()=>u.innerType?._zod?.optin),_e(l._zod,"optout",()=>u.innerType?._zod?.optout),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(Vh):Vh(o)}});function Vh(l){return l.value=Object.freeze(l.value),l}const qp=w("$ZodCustom",(l,u)=>{vt.init(l,u),Ve.init(l,u),l._zod.parse=(f,r)=>f,l._zod.check=f=>{const r=f.value,o=u.fn(r);if(o instanceof Promise)return o.then(d=>Qh(d,f,r,l));Qh(o,f,r,l)}});function Qh(l,u,f,r){if(!l){const o={code:"custom",input:f,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),u.issues.push(ka(o))}}var Lh;class Bp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(u,...f){const r=f[0];return this._map.set(u,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,u),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(u){const f=this._map.get(u);return f&&typeof f=="object"&&"id"in f&&this._idmap.delete(f.id),this._map.delete(u),this}get(u){const f=u._zod.parent;if(f){const r={...this.get(f)??{}};delete r.id;const o={...r,...this._map.get(u)};return Object.keys(o).length?o:void 0}return this._map.get(u)}has(u){return this._map.has(u)}}function Yp(){return new Bp}(Lh=globalThis).__zod_globalRegistry??(Lh.__zod_globalRegistry=Yp());const La=globalThis.__zod_globalRegistry;function Gp(l,u){return new l({type:"string",...k(u)})}function Xp(l,u){return new l({type:"string",format:"email",check:"string_format",abort:!1,...k(u)})}function Kh(l,u){return new l({type:"string",format:"guid",check:"string_format",abort:!1,...k(u)})}function Vp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,...k(u)})}function Qp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...k(u)})}function Lp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...k(u)})}function Kp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...k(u)})}function $p(l,u){return new l({type:"string",format:"url",check:"string_format",abort:!1,...k(u)})}function Jp(l,u){return new l({type:"string",format:"emoji",check:"string_format",abort:!1,...k(u)})}function kp(l,u){return new l({type:"string",format:"nanoid",check:"string_format",abort:!1,...k(u)})}function Wp(l,u){return new l({type:"string",format:"cuid",check:"string_format",abort:!1,...k(u)})}function Fp(l,u){return new l({type:"string",format:"cuid2",check:"string_format",abort:!1,...k(u)})}function Ip(l,u){return new l({type:"string",format:"ulid",check:"string_format",abort:!1,...k(u)})}function Pp(l,u){return new l({type:"string",format:"xid",check:"string_format",abort:!1,...k(u)})}function e1(l,u){return new l({type:"string",format:"ksuid",check:"string_format",abort:!1,...k(u)})}function t1(l,u){return new l({type:"string",format:"ipv4",check:"string_format",abort:!1,...k(u)})}function n1(l,u){return new l({type:"string",format:"ipv6",check:"string_format",abort:!1,...k(u)})}function l1(l,u){return new l({type:"string",format:"cidrv4",check:"string_format",abort:!1,...k(u)})}function a1(l,u){return new l({type:"string",format:"cidrv6",check:"string_format",abort:!1,...k(u)})}function u1(l,u){return new l({type:"string",format:"base64",check:"string_format",abort:!1,...k(u)})}function i1(l,u){return new l({type:"string",format:"base64url",check:"string_format",abort:!1,...k(u)})}function c1(l,u){return new l({type:"string",format:"e164",check:"string_format",abort:!1,...k(u)})}function f1(l,u){return new l({type:"string",format:"jwt",check:"string_format",abort:!1,...k(u)})}function r1(l,u){return new l({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...k(u)})}function o1(l,u){return new l({type:"string",format:"date",check:"string_format",...k(u)})}function s1(l,u){return new l({type:"string",format:"time",check:"string_format",precision:null,...k(u)})}function d1(l,u){return new l({type:"string",format:"duration",check:"string_format",...k(u)})}function h1(l,u){return new l({type:"number",checks:[],...k(u)})}function m1(l,u){return new l({type:"number",check:"number_format",abort:!1,format:"safeint",...k(u)})}function v1(l){return new l({type:"unknown"})}function y1(l,u){return new l({type:"never",...k(u)})}function $h(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!1})}function tr(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!0})}function Jh(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!1})}function nr(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!0})}function kh(l,u){return new j0({check:"multiple_of",...k(u),value:l})}function Am(l,u){return new H0({check:"max_length",...k(u),maximum:l})}function Si(l,u){return new q0({check:"min_length",...k(u),minimum:l})}function Mm(l,u){return new B0({check:"length_equals",...k(u),length:l})}function g1(l,u){return new Y0({check:"string_format",format:"regex",...k(u),pattern:l})}function p1(l){return new G0({check:"string_format",format:"lowercase",...k(l)})}function _1(l){return new X0({check:"string_format",format:"uppercase",...k(l)})}function b1(l,u){return new V0({check:"string_format",format:"includes",...k(u),includes:l})}function S1(l,u){return new Q0({check:"string_format",format:"starts_with",...k(u),prefix:l})}function z1(l,u){return new L0({check:"string_format",format:"ends_with",...k(u),suffix:l})}function kl(l){return new K0({check:"overwrite",tx:l})}function E1(l){return kl(u=>u.normalize(l))}function T1(){return kl(l=>l.trim())}function O1(){return kl(l=>l.toLowerCase())}function A1(){return kl(l=>l.toUpperCase())}function M1(){return kl(l=>Yg(l))}function N1(l,u,f){return new l({type:"array",element:u,...k(f)})}function D1(l,u,f){return new l({type:"custom",check:"custom",fn:u,...k(f)})}function Z1(l){const u=U1(f=>(f.addIssue=r=>{if(typeof r=="string")f.issues.push(ka(r,f.value,u._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=f.value),o.inst??(o.inst=u),o.continue??(o.continue=!u._zod.def.abort),f.issues.push(ka(o))}},l(f.value,f)));return u}function U1(l,u){const f=new vt({check:"custom",...k(u)});return f._zod.check=l,f}function Nm(l){let u=l?.target??"draft-2020-12";return u==="draft-4"&&(u="draft-04"),u==="draft-7"&&(u="draft-07"),{processors:l.processors??{},metadataRegistry:l?.metadata??La,target:u,unrepresentable:l?.unrepresentable??"throw",override:l?.override??(()=>{}),io:l?.io??"output",counter:0,seen:new Map,cycles:l?.cycles??"ref",reused:l?.reused??"inline",external:l?.external??void 0}}function tt(l,u,f={path:[],schemaPath:[]}){var r;const o=l._zod.def,d=u.seen.get(l);if(d)return d.count++,f.schemaPath.includes(l)&&(d.cycle=f.path),d.schema;const h={schema:{},count:1,cycle:void 0,path:f.path};u.seen.set(l,h);const v=l._zod.toJSONSchema?.();if(v)h.schema=v;else{const T={...f,schemaPath:[...f.schemaPath,l],path:f.path};if(l._zod.processJSONSchema)l._zod.processJSONSchema(u,h.schema,T);else{const x=h.schema,G=u.processors[o.type];if(!G)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);G(l,u,x,T)}const N=l._zod.parent;N&&(h.ref||(h.ref=N),tt(N,u,T),u.seen.get(N).isParent=!0)}const p=u.metadataRegistry.get(l);return p&&Object.assign(h.schema,p),u.io==="input"&&ct(l)&&(delete h.schema.examples,delete h.schema.default),u.io==="input"&&h.schema._prefault&&((r=h.schema).default??(r.default=h.schema._prefault)),delete h.schema._prefault,u.seen.get(l).schema}function Dm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of l.seen.entries()){const v=l.metadataRegistry.get(h[0])?.id;if(v){const p=r.get(v);if(p&&p!==h[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(v,h[0])}}const o=h=>{const v=l.target==="draft-2020-12"?"$defs":"definitions";if(l.external){const N=l.external.registry.get(h[0])?.id,x=l.external.uri??(R=>R);if(N)return{ref:x(N)};const G=h[1].defId??h[1].schema.id??`schema${l.counter++}`;return h[1].defId=G,{defId:G,ref:`${x("__shared")}#/${v}/${G}`}}if(h[1]===f)return{ref:"#"};const y=`#/${v}/`,T=h[1].schema.id??`__schema${l.counter++}`;return{defId:T,ref:y+T}},d=h=>{if(h[1].schema.$ref)return;const v=h[1],{ref:p,defId:y}=o(h);v.def={...v.schema},y&&(v.defId=y);const T=v.schema;for(const N in T)delete T[N];T.$ref=p};if(l.cycles==="throw")for(const h of l.seen.entries()){const v=h[1];if(v.cycle)throw new Error(`Cycle detected: #/${v.cycle?.join("/")}/ + `)}G.write("payload.value = newResult;"),G.write("return payload;");const K=G.compile();return(Q,I)=>K(x,Q,I)};let d;const h=_i,v=!cm.jitless,y=v&&Gg.value,T=u.catchall;let M;l._zod.parse=(x,G)=>{M??(M=r.value);const R=x.value;return h(R)?v&&y&&G?.async===!1&&G.jitless!==!0?(d||(d=o(u.shape)),x=d(x,G),T?Tm([],R,x,G,M,l):x):f(x,G):(x.issues.push({expected:"object",code:"invalid_type",input:R,inst:l}),x)}});function qh(l,u,f,r){for(const d of l)if(d.issues.length===0)return u.value=d.value,u;const o=l.filter(d=>!$l(d));return o.length===1?(u.value=o[0].value,o[0]):(u.issues.push({code:"invalid_union",input:u.value,inst:f,errors:l.map(d=>d.issues.map(h=>cl(h,r,il())))}),u)}const Ap=w("$ZodUnion",(l,u)=>{Xe.init(l,u),Se(l._zod,"optin",()=>u.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Se(l._zod,"optout",()=>u.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Se(l._zod,"values",()=>{if(u.options.every(o=>o._zod.values))return new Set(u.options.flatMap(o=>Array.from(o._zod.values)))}),Se(l._zod,"pattern",()=>{if(u.options.every(o=>o._zod.pattern)){const o=u.options.map(d=>d._zod.pattern);return new RegExp(`^(${o.map(d=>sr(d.source)).join("|")})$`)}});const f=u.options.length===1,r=u.options[0]._zod.run;l._zod.parse=(o,d)=>{if(f)return r(o,d);let h=!1;const v=[];for(const p of u.options){const y=p._zod.run({value:o.value,issues:[]},d);if(y instanceof Promise)v.push(y),h=!0;else{if(y.issues.length===0)return y;v.push(y)}}return h?Promise.all(v).then(p=>qh(p,o,l,d)):qh(v,o,l,d)}}),Mp=w("$ZodIntersection",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>{const o=f.value,d=u.left._zod.run({value:o,issues:[]},r),h=u.right._zod.run({value:o,issues:[]},r);return d instanceof Promise||h instanceof Promise?Promise.all([d,h]).then(([p,y])=>Bh(f,p,y)):Bh(f,d,h)}});function ur(l,u){if(l===u)return{valid:!0,data:l};if(l instanceof Date&&u instanceof Date&&+l==+u)return{valid:!0,data:l};if(Ja(l)&&Ja(u)){const f=Object.keys(u),r=Object.keys(l).filter(d=>f.indexOf(d)!==-1),o={...l,...u};for(const d of r){const h=ur(l[d],u[d]);if(!h.valid)return{valid:!1,mergeErrorPath:[d,...h.mergeErrorPath]};o[d]=h.data}return{valid:!0,data:o}}if(Array.isArray(l)&&Array.isArray(u)){if(l.length!==u.length)return{valid:!1,mergeErrorPath:[]};const f=[];for(let r=0;rv.l&&v.r).map(([v])=>v);if(d.length&&o&&l.issues.push({...o,keys:d}),$l(l))return l;const h=ur(u.value,f.value);if(!h.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(h.mergeErrorPath)}`);return l.value=h.data,l}const Np=w("$ZodEnum",(l,u)=>{Xe.init(l,u);const f=fm(u.entries),r=new Set(f);l._zod.values=r,l._zod.pattern=new RegExp(`^(${f.filter(o=>Xg.has(typeof o)).map(o=>typeof o=="string"?Ai(o):o.toString()).join("|")})$`),l._zod.parse=(o,d)=>{const h=o.value;return r.has(h)||o.issues.push({code:"invalid_value",values:f,input:h,inst:l}),o}}),Dp=w("$ZodTransform",(l,u)=>{Xe.init(l,u),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);const o=u.transform(f.value,f);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(h=>(f.value=h,f));if(o instanceof Promise)throw new Jl;return f.value=o,f}});function Yh(l,u){return l.issues.length&&u===void 0?{issues:[],value:void 0}:l}const Om=w("$ZodOptional",(l,u)=>{Xe.init(l,u),l._zod.optin="optional",l._zod.optout="optional",Se(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,void 0]):void 0),Se(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)})?$`):void 0}),l._zod.parse=(f,r)=>{if(u.innerType._zod.optin==="optional"){const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Yh(d,f.value)):Yh(o,f.value)}return f.value===void 0?f:u.innerType._zod.run(f,r)}}),Zp=w("$ZodExactOptional",(l,u)=>{Om.init(l,u),Se(l._zod,"values",()=>u.innerType._zod.values),Se(l._zod,"pattern",()=>u.innerType._zod.pattern),l._zod.parse=(f,r)=>u.innerType._zod.run(f,r)}),Up=w("$ZodNullable",(l,u)=>{Xe.init(l,u),Se(l._zod,"optin",()=>u.innerType._zod.optin),Se(l._zod,"optout",()=>u.innerType._zod.optout),Se(l._zod,"pattern",()=>{const f=u.innerType._zod.pattern;return f?new RegExp(`^(${sr(f.source)}|null)$`):void 0}),Se(l._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,null]):void 0),l._zod.parse=(f,r)=>f.value===null?f:u.innerType._zod.run(f,r)}),wp=w("$ZodDefault",(l,u)=>{Xe.init(l,u),l._zod.optin="optional",Se(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);if(f.value===void 0)return f.value=u.defaultValue,f;const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Gh(d,u)):Gh(o,u)}});function Gh(l,u){return l.value===void 0&&(l.value=u.defaultValue),l}const Rp=w("$ZodPrefault",(l,u)=>{Xe.init(l,u),l._zod.optin="optional",Se(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>(r.direction==="backward"||f.value===void 0&&(f.value=u.defaultValue),u.innerType._zod.run(f,r))}),Cp=w("$ZodNonOptional",(l,u)=>{Xe.init(l,u),Se(l._zod,"values",()=>{const f=u.innerType._zod.values;return f?new Set([...f].filter(r=>r!==void 0)):void 0}),l._zod.parse=(f,r)=>{const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>Xh(d,l)):Xh(o,l)}});function Xh(l,u){return!l.issues.length&&l.value===void 0&&l.issues.push({code:"invalid_type",expected:"nonoptional",input:l.value,inst:u}),l}const jp=w("$ZodCatch",(l,u)=>{Xe.init(l,u),Se(l._zod,"optin",()=>u.innerType._zod.optin),Se(l._zod,"optout",()=>u.innerType._zod.optout),Se(l._zod,"values",()=>u.innerType._zod.values),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(d=>(f.value=d.value,d.issues.length&&(f.value=u.catchValue({...f,error:{issues:d.issues.map(h=>cl(h,r,il()))},input:f.value}),f.issues=[]),f)):(f.value=o.value,o.issues.length&&(f.value=u.catchValue({...f,error:{issues:o.issues.map(d=>cl(d,r,il()))},input:f.value}),f.issues=[]),f)}}),xp=w("$ZodPipe",(l,u)=>{Xe.init(l,u),Se(l._zod,"values",()=>u.in._zod.values),Se(l._zod,"optin",()=>u.in._zod.optin),Se(l._zod,"optout",()=>u.out._zod.optout),Se(l._zod,"propValues",()=>u.in._zod.propValues),l._zod.parse=(f,r)=>{if(r.direction==="backward"){const d=u.out._zod.run(f,r);return d instanceof Promise?d.then(h=>yi(h,u.in,r)):yi(d,u.in,r)}const o=u.in._zod.run(f,r);return o instanceof Promise?o.then(d=>yi(d,u.out,r)):yi(o,u.out,r)}});function yi(l,u,f){return l.issues.length?(l.aborted=!0,l):u._zod.run({value:l.value,issues:l.issues},f)}const Hp=w("$ZodReadonly",(l,u)=>{Xe.init(l,u),Se(l._zod,"propValues",()=>u.innerType._zod.propValues),Se(l._zod,"values",()=>u.innerType._zod.values),Se(l._zod,"optin",()=>u.innerType?._zod?.optin),Se(l._zod,"optout",()=>u.innerType?._zod?.optout),l._zod.parse=(f,r)=>{if(r.direction==="backward")return u.innerType._zod.run(f,r);const o=u.innerType._zod.run(f,r);return o instanceof Promise?o.then(Vh):Vh(o)}});function Vh(l){return l.value=Object.freeze(l.value),l}const qp=w("$ZodCustom",(l,u)=>{yt.init(l,u),Xe.init(l,u),l._zod.parse=(f,r)=>f,l._zod.check=f=>{const r=f.value,o=u.fn(r);if(o instanceof Promise)return o.then(d=>Qh(d,f,r,l));Qh(o,f,r,l)}});function Qh(l,u,f,r){if(!l){const o={code:"custom",input:f,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),u.issues.push(ka(o))}}var Lh;class Bp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(u,...f){const r=f[0];return this._map.set(u,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,u),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(u){const f=this._map.get(u);return f&&typeof f=="object"&&"id"in f&&this._idmap.delete(f.id),this._map.delete(u),this}get(u){const f=u._zod.parent;if(f){const r={...this.get(f)??{}};delete r.id;const o={...r,...this._map.get(u)};return Object.keys(o).length?o:void 0}return this._map.get(u)}has(u){return this._map.has(u)}}function Yp(){return new Bp}(Lh=globalThis).__zod_globalRegistry??(Lh.__zod_globalRegistry=Yp());const La=globalThis.__zod_globalRegistry;function Gp(l,u){return new l({type:"string",...k(u)})}function Xp(l,u){return new l({type:"string",format:"email",check:"string_format",abort:!1,...k(u)})}function Kh(l,u){return new l({type:"string",format:"guid",check:"string_format",abort:!1,...k(u)})}function Vp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,...k(u)})}function Qp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...k(u)})}function Lp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...k(u)})}function Kp(l,u){return new l({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...k(u)})}function $p(l,u){return new l({type:"string",format:"url",check:"string_format",abort:!1,...k(u)})}function Jp(l,u){return new l({type:"string",format:"emoji",check:"string_format",abort:!1,...k(u)})}function kp(l,u){return new l({type:"string",format:"nanoid",check:"string_format",abort:!1,...k(u)})}function Wp(l,u){return new l({type:"string",format:"cuid",check:"string_format",abort:!1,...k(u)})}function Fp(l,u){return new l({type:"string",format:"cuid2",check:"string_format",abort:!1,...k(u)})}function Ip(l,u){return new l({type:"string",format:"ulid",check:"string_format",abort:!1,...k(u)})}function Pp(l,u){return new l({type:"string",format:"xid",check:"string_format",abort:!1,...k(u)})}function e1(l,u){return new l({type:"string",format:"ksuid",check:"string_format",abort:!1,...k(u)})}function t1(l,u){return new l({type:"string",format:"ipv4",check:"string_format",abort:!1,...k(u)})}function n1(l,u){return new l({type:"string",format:"ipv6",check:"string_format",abort:!1,...k(u)})}function l1(l,u){return new l({type:"string",format:"cidrv4",check:"string_format",abort:!1,...k(u)})}function a1(l,u){return new l({type:"string",format:"cidrv6",check:"string_format",abort:!1,...k(u)})}function u1(l,u){return new l({type:"string",format:"base64",check:"string_format",abort:!1,...k(u)})}function i1(l,u){return new l({type:"string",format:"base64url",check:"string_format",abort:!1,...k(u)})}function c1(l,u){return new l({type:"string",format:"e164",check:"string_format",abort:!1,...k(u)})}function f1(l,u){return new l({type:"string",format:"jwt",check:"string_format",abort:!1,...k(u)})}function r1(l,u){return new l({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...k(u)})}function o1(l,u){return new l({type:"string",format:"date",check:"string_format",...k(u)})}function s1(l,u){return new l({type:"string",format:"time",check:"string_format",precision:null,...k(u)})}function d1(l,u){return new l({type:"string",format:"duration",check:"string_format",...k(u)})}function h1(l,u){return new l({type:"number",checks:[],...k(u)})}function m1(l,u){return new l({type:"number",check:"number_format",abort:!1,format:"safeint",...k(u)})}function v1(l){return new l({type:"unknown"})}function y1(l,u){return new l({type:"never",...k(u)})}function $h(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!1})}function tr(l,u){return new _m({check:"less_than",...k(u),value:l,inclusive:!0})}function Jh(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!1})}function nr(l,u){return new bm({check:"greater_than",...k(u),value:l,inclusive:!0})}function kh(l,u){return new j0({check:"multiple_of",...k(u),value:l})}function Am(l,u){return new H0({check:"max_length",...k(u),maximum:l})}function Si(l,u){return new q0({check:"min_length",...k(u),minimum:l})}function Mm(l,u){return new B0({check:"length_equals",...k(u),length:l})}function g1(l,u){return new Y0({check:"string_format",format:"regex",...k(u),pattern:l})}function p1(l){return new G0({check:"string_format",format:"lowercase",...k(l)})}function _1(l){return new X0({check:"string_format",format:"uppercase",...k(l)})}function b1(l,u){return new V0({check:"string_format",format:"includes",...k(u),includes:l})}function S1(l,u){return new Q0({check:"string_format",format:"starts_with",...k(u),prefix:l})}function z1(l,u){return new L0({check:"string_format",format:"ends_with",...k(u),suffix:l})}function kl(l){return new K0({check:"overwrite",tx:l})}function E1(l){return kl(u=>u.normalize(l))}function T1(){return kl(l=>l.trim())}function O1(){return kl(l=>l.toLowerCase())}function A1(){return kl(l=>l.toUpperCase())}function M1(){return kl(l=>Yg(l))}function N1(l,u,f){return new l({type:"array",element:u,...k(f)})}function D1(l,u,f){return new l({type:"custom",check:"custom",fn:u,...k(f)})}function Z1(l){const u=U1(f=>(f.addIssue=r=>{if(typeof r=="string")f.issues.push(ka(r,f.value,u._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=f.value),o.inst??(o.inst=u),o.continue??(o.continue=!u._zod.def.abort),f.issues.push(ka(o))}},l(f.value,f)));return u}function U1(l,u){const f=new yt({check:"custom",...k(u)});return f._zod.check=l,f}function Nm(l){let u=l?.target??"draft-2020-12";return u==="draft-4"&&(u="draft-04"),u==="draft-7"&&(u="draft-07"),{processors:l.processors??{},metadataRegistry:l?.metadata??La,target:u,unrepresentable:l?.unrepresentable??"throw",override:l?.override??(()=>{}),io:l?.io??"output",counter:0,seen:new Map,cycles:l?.cycles??"ref",reused:l?.reused??"inline",external:l?.external??void 0}}function et(l,u,f={path:[],schemaPath:[]}){var r;const o=l._zod.def,d=u.seen.get(l);if(d)return d.count++,f.schemaPath.includes(l)&&(d.cycle=f.path),d.schema;const h={schema:{},count:1,cycle:void 0,path:f.path};u.seen.set(l,h);const v=l._zod.toJSONSchema?.();if(v)h.schema=v;else{const T={...f,schemaPath:[...f.schemaPath,l],path:f.path};if(l._zod.processJSONSchema)l._zod.processJSONSchema(u,h.schema,T);else{const x=h.schema,G=u.processors[o.type];if(!G)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);G(l,u,x,T)}const M=l._zod.parent;M&&(h.ref||(h.ref=M),et(M,u,T),u.seen.get(M).isParent=!0)}const p=u.metadataRegistry.get(l);return p&&Object.assign(h.schema,p),u.io==="input"&&ft(l)&&(delete h.schema.examples,delete h.schema.default),u.io==="input"&&h.schema._prefault&&((r=h.schema).default??(r.default=h.schema._prefault)),delete h.schema._prefault,u.seen.get(l).schema}function Dm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of l.seen.entries()){const v=l.metadataRegistry.get(h[0])?.id;if(v){const p=r.get(v);if(p&&p!==h[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(v,h[0])}}const o=h=>{const v=l.target==="draft-2020-12"?"$defs":"definitions";if(l.external){const M=l.external.registry.get(h[0])?.id,x=l.external.uri??(R=>R);if(M)return{ref:x(M)};const G=h[1].defId??h[1].schema.id??`schema${l.counter++}`;return h[1].defId=G,{defId:G,ref:`${x("__shared")}#/${v}/${G}`}}if(h[1]===f)return{ref:"#"};const y=`#/${v}/`,T=h[1].schema.id??`__schema${l.counter++}`;return{defId:T,ref:y+T}},d=h=>{if(h[1].schema.$ref)return;const v=h[1],{ref:p,defId:y}=o(h);v.def={...v.schema},y&&(v.defId=y);const T=v.schema;for(const M in T)delete T[M];T.$ref=p};if(l.cycles==="throw")for(const h of l.seen.entries()){const v=h[1];if(v.cycle)throw new Error(`Cycle detected: #/${v.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of l.seen.entries()){const v=h[1];if(u===h[0]){d(h);continue}if(l.external){const y=l.external.registry.get(h[0])?.id;if(u!==h[0]&&y){d(h);continue}}if(l.metadataRegistry.get(h[0])?.id){d(h);continue}if(v.cycle){d(h);continue}if(v.count>1&&l.reused==="ref"){d(h);continue}}}function Zm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const v=l.seen.get(h);if(v.ref===null)return;const p=v.def??v.schema,y={...p},T=v.ref;if(v.ref=null,T){r(T);const x=l.seen.get(T),G=x.schema;if(G.$ref&&(l.target==="draft-07"||l.target==="draft-04"||l.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(G)):Object.assign(p,G),Object.assign(p,y),h._zod.parent===T)for(const j in p)j==="$ref"||j==="allOf"||j in y||delete p[j];if(G.$ref&&x.def)for(const j in p)j==="$ref"||j==="allOf"||j in x.def&&JSON.stringify(p[j])===JSON.stringify(x.def[j])&&delete p[j]}const N=h._zod.parent;if(N&&N!==T){r(N);const x=l.seen.get(N);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const G in p)G==="$ref"||G==="allOf"||G in x.def&&JSON.stringify(p[G])===JSON.stringify(x.def[G])&&delete p[G]}l.override({zodSchema:h,jsonSchema:p,path:v.path??[]})};for(const h of[...l.seen.entries()].reverse())r(h[0]);const o={};if(l.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":l.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":l.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":l.target,l.external?.uri){const h=l.external.registry.get(u)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=l.external.uri(h)}Object.assign(o,f.def??f.schema);const d=l.external?.defs??{};for(const h of l.seen.entries()){const v=h[1];v.def&&v.defId&&(d[v.defId]=v.def)}l.external||Object.keys(d).length>0&&(l.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...u["~standard"],jsonSchema:{input:zi(u,"input",l.processors),output:zi(u,"output",l.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function ct(l,u){const f=u??{seen:new Set};if(f.seen.has(l))return!1;f.seen.add(l);const r=l._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ct(r.element,f);if(r.type==="set")return ct(r.valueType,f);if(r.type==="lazy")return ct(r.getter(),f);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ct(r.innerType,f);if(r.type==="intersection")return ct(r.left,f)||ct(r.right,f);if(r.type==="record"||r.type==="map")return ct(r.keyType,f)||ct(r.valueType,f);if(r.type==="pipe")return ct(r.in,f)||ct(r.out,f);if(r.type==="object"){for(const o in r.shape)if(ct(r.shape[o],f))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ct(o,f))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ct(o,f))return!0;return!!(r.rest&&ct(r.rest,f))}return!1}const w1=(l,u={})=>f=>{const r=Nm({...f,processors:u});return tt(l,r),Dm(r,l),Zm(r,l)},zi=(l,u,f={})=>r=>{const{libraryOptions:o,target:d}=r??{},h=Nm({...o??{},target:d,io:u,processors:f});return tt(l,h),Dm(h,l),Zm(h,l)},R1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},C1=(l,u,f,r)=>{const o=f;o.type="string";const{minimum:d,maximum:h,format:v,patterns:p,contentEncoding:y}=l._zod.bag;if(typeof d=="number"&&(o.minLength=d),typeof h=="number"&&(o.maxLength=h),v&&(o.format=R1[v]??v,o.format===""&&delete o.format,v==="time"&&delete o.format),y&&(o.contentEncoding=y),p&&p.size>0){const T=[...p];T.length===1?o.pattern=T[0].source:T.length>1&&(o.allOf=[...T.map(N=>({...u.target==="draft-07"||u.target==="draft-04"||u.target==="openapi-3.0"?{type:"string"}:{},pattern:N.source}))])}},j1=(l,u,f,r)=>{const o=f,{minimum:d,maximum:h,format:v,multipleOf:p,exclusiveMaximum:y,exclusiveMinimum:T}=l._zod.bag;typeof v=="string"&&v.includes("int")?o.type="integer":o.type="number",typeof T=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.minimum=T,o.exclusiveMinimum=!0):o.exclusiveMinimum=T),typeof d=="number"&&(o.minimum=d,typeof T=="number"&&u.target!=="draft-04"&&(T>=d?delete o.minimum:delete o.exclusiveMinimum)),typeof y=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.maximum=y,o.exclusiveMaximum=!0):o.exclusiveMaximum=y),typeof h=="number"&&(o.maximum=h,typeof y=="number"&&u.target!=="draft-04"&&(y<=h?delete o.maximum:delete o.exclusiveMaximum)),typeof p=="number"&&(o.multipleOf=p)},x1=(l,u,f,r)=>{f.not={}},H1=(l,u,f,r)=>{},q1=(l,u,f,r)=>{const o=l._zod.def,d=fm(o.entries);d.every(h=>typeof h=="number")&&(f.type="number"),d.every(h=>typeof h=="string")&&(f.type="string"),f.enum=d},B1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Y1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},G1=(l,u,f,r)=>{const o=f,d=l._zod.def,{minimum:h,maximum:v}=l._zod.bag;typeof h=="number"&&(o.minItems=h),typeof v=="number"&&(o.maxItems=v),o.type="array",o.items=tt(d.element,u,{...r,path:[...r.path,"items"]})},X1=(l,u,f,r)=>{const o=f,d=l._zod.def;o.type="object",o.properties={};const h=d.shape;for(const y in h)o.properties[y]=tt(h[y],u,{...r,path:[...r.path,"properties",y]});const v=new Set(Object.keys(h)),p=new Set([...v].filter(y=>{const T=d.shape[y]._zod;return u.io==="input"?T.optin===void 0:T.optout===void 0}));p.size>0&&(o.required=Array.from(p)),d.catchall?._zod.def.type==="never"?o.additionalProperties=!1:d.catchall?d.catchall&&(o.additionalProperties=tt(d.catchall,u,{...r,path:[...r.path,"additionalProperties"]})):u.io==="output"&&(o.additionalProperties=!1)},V1=(l,u,f,r)=>{const o=l._zod.def,d=o.inclusive===!1,h=o.options.map((v,p)=>tt(v,u,{...r,path:[...r.path,d?"oneOf":"anyOf",p]}));d?f.oneOf=h:f.anyOf=h},Q1=(l,u,f,r)=>{const o=l._zod.def,d=tt(o.left,u,{...r,path:[...r.path,"allOf",0]}),h=tt(o.right,u,{...r,path:[...r.path,"allOf",1]}),v=y=>"allOf"in y&&Object.keys(y).length===1,p=[...v(d)?d.allOf:[d],...v(h)?h.allOf:[h]];f.allOf=p},L1=(l,u,f,r)=>{const o=l._zod.def,d=tt(o.innerType,u,r),h=u.seen.get(l);u.target==="openapi-3.0"?(h.ref=o.innerType,f.nullable=!0):f.anyOf=[d,{type:"null"}]},K1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},$1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue))},J1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,u.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},k1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h},W1=(l,u,f,r)=>{const o=l._zod.def,d=u.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;tt(d,u,r);const h=u.seen.get(l);h.ref=d},F1=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.readOnly=!0},Um=(l,u,f,r)=>{const o=l._zod.def;tt(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},I1=w("ZodISODateTime",(l,u)=>{ip.init(l,u),we.init(l,u)});function P1(l){return r1(I1,l)}const e_=w("ZodISODate",(l,u)=>{cp.init(l,u),we.init(l,u)});function t_(l){return o1(e_,l)}const n_=w("ZodISOTime",(l,u)=>{fp.init(l,u),we.init(l,u)});function l_(l){return s1(n_,l)}const a_=w("ZodISODuration",(l,u)=>{rp.init(l,u),we.init(l,u)});function u_(l){return d1(a_,l)}const i_=(l,u)=>{hm.init(l,u),l.name="ZodError",Object.defineProperties(l,{format:{value:f=>Pg(l,f)},flatten:{value:f=>Ig(l,f)},addIssue:{value:f=>{l.issues.push(f),l.message=JSON.stringify(l.issues,ar,2)}},addIssues:{value:f=>{l.issues.push(...f),l.message=JSON.stringify(l.issues,ar,2)}},isEmpty:{get(){return l.issues.length===0}}})},qt=w("ZodError",i_,{Parent:Error}),c_=hr(qt),f_=mr(qt),r_=Mi(qt),o_=Ni(qt),s_=n0(qt),d_=l0(qt),h_=a0(qt),m_=u0(qt),v_=i0(qt),y_=c0(qt),g_=f0(qt),p_=r0(qt),Qe=w("ZodType",(l,u)=>(Ve.init(l,u),Object.assign(l["~standard"],{jsonSchema:{input:zi(l,"input"),output:zi(l,"output")}}),l.toJSONSchema=w1(l,{}),l.def=u,l.type=u.type,Object.defineProperty(l,"_def",{value:u}),l.check=(...f)=>l.clone(qn(u,{checks:[...u.checks??[],...f.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),l.with=l.check,l.clone=(f,r)=>Bn(l,f,r),l.brand=()=>l,l.register=((f,r)=>(f.add(l,r),l)),l.parse=(f,r)=>c_(l,f,r,{callee:l.parse}),l.safeParse=(f,r)=>r_(l,f,r),l.parseAsync=async(f,r)=>f_(l,f,r,{callee:l.parseAsync}),l.safeParseAsync=async(f,r)=>o_(l,f,r),l.spa=l.safeParseAsync,l.encode=(f,r)=>s_(l,f,r),l.decode=(f,r)=>d_(l,f,r),l.encodeAsync=async(f,r)=>h_(l,f,r),l.decodeAsync=async(f,r)=>m_(l,f,r),l.safeEncode=(f,r)=>v_(l,f,r),l.safeDecode=(f,r)=>y_(l,f,r),l.safeEncodeAsync=async(f,r)=>g_(l,f,r),l.safeDecodeAsync=async(f,r)=>p_(l,f,r),l.refine=(f,r)=>l.check(hb(f,r)),l.superRefine=f=>l.check(mb(f)),l.overwrite=f=>l.check(kl(f)),l.optional=()=>Ph(l),l.exactOptional=()=>eb(l),l.nullable=()=>em(l),l.nullish=()=>Ph(em(l)),l.nonoptional=f=>ib(l,f),l.array=()=>V_(l),l.or=f=>$_([l,f]),l.and=f=>k_(l,f),l.transform=f=>tm(l,I_(f)),l.default=f=>lb(l,f),l.prefault=f=>ub(l,f),l.catch=f=>fb(l,f),l.pipe=f=>tm(l,f),l.readonly=()=>sb(l),l.describe=f=>{const r=l.clone();return La.add(r,{description:f}),r},Object.defineProperty(l,"description",{get(){return La.get(l)?.description},configurable:!0}),l.meta=(...f)=>{if(f.length===0)return La.get(l);const r=l.clone();return La.add(r,f[0]),r},l.isOptional=()=>l.safeParse(void 0).success,l.isNullable=()=>l.safeParse(null).success,l.apply=f=>f(l),l)),wm=w("_ZodString",(l,u)=>{vr.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(r,o,d)=>C1(l,r,o);const f=l._zod.bag;l.format=f.format??null,l.minLength=f.minimum??null,l.maxLength=f.maximum??null,l.regex=(...r)=>l.check(g1(...r)),l.includes=(...r)=>l.check(b1(...r)),l.startsWith=(...r)=>l.check(S1(...r)),l.endsWith=(...r)=>l.check(z1(...r)),l.min=(...r)=>l.check(Si(...r)),l.max=(...r)=>l.check(Am(...r)),l.length=(...r)=>l.check(Mm(...r)),l.nonempty=(...r)=>l.check(Si(1,...r)),l.lowercase=r=>l.check(p1(r)),l.uppercase=r=>l.check(_1(r)),l.trim=()=>l.check(T1()),l.normalize=(...r)=>l.check(E1(...r)),l.toLowerCase=()=>l.check(O1()),l.toUpperCase=()=>l.check(A1()),l.slugify=()=>l.check(M1())}),__=w("ZodString",(l,u)=>{vr.init(l,u),wm.init(l,u),l.email=f=>l.check(Xp(b_,f)),l.url=f=>l.check($p(S_,f)),l.jwt=f=>l.check(f1(x_,f)),l.emoji=f=>l.check(Jp(z_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.uuid=f=>l.check(Vp(gi,f)),l.uuidv4=f=>l.check(Qp(gi,f)),l.uuidv6=f=>l.check(Lp(gi,f)),l.uuidv7=f=>l.check(Kp(gi,f)),l.nanoid=f=>l.check(kp(E_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.cuid=f=>l.check(Wp(T_,f)),l.cuid2=f=>l.check(Fp(O_,f)),l.ulid=f=>l.check(Ip(A_,f)),l.base64=f=>l.check(u1(R_,f)),l.base64url=f=>l.check(i1(C_,f)),l.xid=f=>l.check(Pp(M_,f)),l.ksuid=f=>l.check(e1(N_,f)),l.ipv4=f=>l.check(t1(D_,f)),l.ipv6=f=>l.check(n1(Z_,f)),l.cidrv4=f=>l.check(l1(U_,f)),l.cidrv6=f=>l.check(a1(w_,f)),l.e164=f=>l.check(c1(j_,f)),l.datetime=f=>l.check(P1(f)),l.date=f=>l.check(t_(f)),l.time=f=>l.check(l_(f)),l.duration=f=>l.check(u_(f))});function Ei(l){return Gp(__,l)}const we=w("ZodStringFormat",(l,u)=>{Ue.init(l,u),wm.init(l,u)}),b_=w("ZodEmail",(l,u)=>{F0.init(l,u),we.init(l,u)}),Wh=w("ZodGUID",(l,u)=>{k0.init(l,u),we.init(l,u)}),gi=w("ZodUUID",(l,u)=>{W0.init(l,u),we.init(l,u)}),S_=w("ZodURL",(l,u)=>{I0.init(l,u),we.init(l,u)}),z_=w("ZodEmoji",(l,u)=>{P0.init(l,u),we.init(l,u)}),E_=w("ZodNanoID",(l,u)=>{ep.init(l,u),we.init(l,u)}),T_=w("ZodCUID",(l,u)=>{tp.init(l,u),we.init(l,u)}),O_=w("ZodCUID2",(l,u)=>{np.init(l,u),we.init(l,u)}),A_=w("ZodULID",(l,u)=>{lp.init(l,u),we.init(l,u)}),M_=w("ZodXID",(l,u)=>{ap.init(l,u),we.init(l,u)}),N_=w("ZodKSUID",(l,u)=>{up.init(l,u),we.init(l,u)}),D_=w("ZodIPv4",(l,u)=>{op.init(l,u),we.init(l,u)}),Z_=w("ZodIPv6",(l,u)=>{sp.init(l,u),we.init(l,u)}),U_=w("ZodCIDRv4",(l,u)=>{dp.init(l,u),we.init(l,u)}),w_=w("ZodCIDRv6",(l,u)=>{hp.init(l,u),we.init(l,u)}),R_=w("ZodBase64",(l,u)=>{mp.init(l,u),we.init(l,u)}),C_=w("ZodBase64URL",(l,u)=>{yp.init(l,u),we.init(l,u)}),j_=w("ZodE164",(l,u)=>{gp.init(l,u),we.init(l,u)}),x_=w("ZodJWT",(l,u)=>{_p.init(l,u),we.init(l,u)}),Rm=w("ZodNumber",(l,u)=>{zm.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(r,o,d)=>j1(l,r,o),l.gt=(r,o)=>l.check(Jh(r,o)),l.gte=(r,o)=>l.check(nr(r,o)),l.min=(r,o)=>l.check(nr(r,o)),l.lt=(r,o)=>l.check($h(r,o)),l.lte=(r,o)=>l.check(tr(r,o)),l.max=(r,o)=>l.check(tr(r,o)),l.int=r=>l.check(Fh(r)),l.safe=r=>l.check(Fh(r)),l.positive=r=>l.check(Jh(0,r)),l.nonnegative=r=>l.check(nr(0,r)),l.negative=r=>l.check($h(0,r)),l.nonpositive=r=>l.check(tr(0,r)),l.multipleOf=(r,o)=>l.check(kh(r,o)),l.step=(r,o)=>l.check(kh(r,o)),l.finite=()=>l;const f=l._zod.bag;l.minValue=Math.max(f.minimum??Number.NEGATIVE_INFINITY,f.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,l.maxValue=Math.min(f.maximum??Number.POSITIVE_INFINITY,f.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,l.isInt=(f.format??"").includes("int")||Number.isSafeInteger(f.multipleOf??.5),l.isFinite=!0,l.format=f.format??null});function H_(l){return h1(Rm,l)}const q_=w("ZodNumberFormat",(l,u)=>{bp.init(l,u),Rm.init(l,u)});function Fh(l){return m1(q_,l)}const B_=w("ZodUnknown",(l,u)=>{Sp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>H1()});function Ih(){return v1(B_)}const Y_=w("ZodNever",(l,u)=>{zp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>x1(l,f,r)});function G_(l){return y1(Y_,l)}const X_=w("ZodArray",(l,u)=>{Ep.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>G1(l,f,r,o),l.element=u.element,l.min=(f,r)=>l.check(Si(f,r)),l.nonempty=f=>l.check(Si(1,f)),l.max=(f,r)=>l.check(Am(f,r)),l.length=(f,r)=>l.check(Mm(f,r)),l.unwrap=()=>l.element});function V_(l,u){return N1(X_,l,u)}const Q_=w("ZodObject",(l,u)=>{Op.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>X1(l,f,r,o),_e(l,"shape",()=>u.shape),l.keyof=()=>W_(Object.keys(l._zod.def.shape)),l.catchall=f=>l.clone({...l._zod.def,catchall:f}),l.passthrough=()=>l.clone({...l._zod.def,catchall:Ih()}),l.loose=()=>l.clone({...l._zod.def,catchall:Ih()}),l.strict=()=>l.clone({...l._zod.def,catchall:G_()}),l.strip=()=>l.clone({...l._zod.def,catchall:void 0}),l.extend=f=>$g(l,f),l.safeExtend=f=>Jg(l,f),l.merge=f=>kg(l,f),l.pick=f=>Lg(l,f),l.omit=f=>Kg(l,f),l.partial=(...f)=>Wg(Cm,l,f[0]),l.required=(...f)=>Fg(jm,l,f[0])});function L_(l,u){const f={type:"object",shape:l??{},...k(u)};return new Q_(f)}const K_=w("ZodUnion",(l,u)=>{Ap.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>V1(l,f,r,o),l.options=u.options});function $_(l,u){return new K_({type:"union",options:l,...k(u)})}const J_=w("ZodIntersection",(l,u)=>{Mp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Q1(l,f,r,o)});function k_(l,u){return new J_({type:"intersection",left:l,right:u})}const ir=w("ZodEnum",(l,u)=>{Np.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(r,o,d)=>q1(l,r,o),l.enum=u.entries,l.options=Object.values(u.entries);const f=new Set(Object.keys(u.entries));l.extract=(r,o)=>{const d={};for(const h of r)if(f.has(h))d[h]=u.entries[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})},l.exclude=(r,o)=>{const d={...u.entries};for(const h of r)if(f.has(h))delete d[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})}});function W_(l,u){const f=Array.isArray(l)?Object.fromEntries(l.map(r=>[r,r])):l;return new ir({type:"enum",entries:f,...k(u)})}const F_=w("ZodTransform",(l,u)=>{Dp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Y1(l,f),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);f.addIssue=d=>{if(typeof d=="string")f.issues.push(ka(d,f.value,u));else{const h=d;h.fatal&&(h.continue=!1),h.code??(h.code="custom"),h.input??(h.input=f.value),h.inst??(h.inst=l),f.issues.push(ka(h))}};const o=u.transform(f.value,f);return o instanceof Promise?o.then(d=>(f.value=d,f)):(f.value=o,f)}});function I_(l){return new F_({type:"transform",transform:l})}const Cm=w("ZodOptional",(l,u)=>{Om.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function Ph(l){return new Cm({type:"optional",innerType:l})}const P_=w("ZodExactOptional",(l,u)=>{Zp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function eb(l){return new P_({type:"optional",innerType:l})}const tb=w("ZodNullable",(l,u)=>{Up.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>L1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function em(l){return new tb({type:"nullable",innerType:l})}const nb=w("ZodDefault",(l,u)=>{wp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>$1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeDefault=l.unwrap});function lb(l,u){return new nb({type:"default",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const ab=w("ZodPrefault",(l,u)=>{Rp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>J1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ub(l,u){return new ab({type:"prefault",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const jm=w("ZodNonOptional",(l,u)=>{Cp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>K1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ib(l,u){return new jm({type:"nonoptional",innerType:l,...k(u)})}const cb=w("ZodCatch",(l,u)=>{jp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>k1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeCatch=l.unwrap});function fb(l,u){return new cb({type:"catch",innerType:l,catchValue:typeof u=="function"?u:()=>u})}const rb=w("ZodPipe",(l,u)=>{xp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>W1(l,f,r,o),l.in=u.in,l.out=u.out});function tm(l,u){return new rb({type:"pipe",in:l,out:u})}const ob=w("ZodReadonly",(l,u)=>{Hp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>F1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function sb(l){return new ob({type:"readonly",innerType:l})}const db=w("ZodCustom",(l,u)=>{qp.init(l,u),Qe.init(l,u),l._zod.processJSONSchema=(f,r,o)=>B1(l,f)});function hb(l,u={}){return D1(db,l,u)}function mb(l){return Z1(l)}L_({sessionARN:Ei(),hexColor:Ei()});const xm="sync:colorSettings";async function vb(){return await am.getItem(xm)}var yr=(l=>(l.getSessionARN="getSessionARN",l.changeColor="changeColor",l))(yr||{});const yb="*://*.signin.aws.amazon.com/*";function gb(){return["*://*.console.aws.amazon.com/*",yb]}function pb(l,u){return new RegExp(l.replaceAll("*",".*")).exec(u)!==null}const $a=-1,Hm="#161d26";function qm({index:l,hexColor:u,setIndex:f,setHexColor:r}){f(l),r(u)}async function Bm({colorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){qm({index:$a,hexColor:Hm,setIndex:u,setHexColor:r});const{success:o,data:d}=await Xm();o&&l.findIndex(({sessionARN:h})=>h===d)<0&&f(d)}async function Ym({setColorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){const o=await vb(),d=o!==null&&0pb(r,Ei().parse(u[0].url))).length?await Zh.tabs.sendMessage(H_().parse(u[0].id),l):void 0}async function Xm(){return Ei().safeParse(await Gm(yr.getSessionARN))}function Ti({colorSettings:l,index:u,setIndex:f,setHexColor:r}){qm({index:u,hexColor:l[u].hexColor,setIndex:f,setHexColor:r})}async function _b(l){const u=await Ym(l),{success:f,data:r}=await Xm();if(!f){0d===r);if(o<0){l.setSessionARN(r);return}Ti({...l,colorSettings:u,index:o})}async function bb({colorSettings:l,indexValue:u,getColorSettingsParams:f}){const r=Number.parseInt(u,10);r===$a?await Bm({...f,colorSettings:l}):-1(r===u.index&&(f.hexColor=l),f))})}function Eb(){const[l,u]=ce.useState([]),[f,r]=ce.useState($a),[o,d]=ce.useState(""),[h,v]=qg(Hm),p=T=>{v(at.convert("hex",T))};ce.useEffect(()=>{_b({setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p})},[]);const y=f===$a;return ke.jsxs(ke.Fragment,{children:[ke.jsx("h1",{children:"AWS management console colorize"}),ke.jsxs("div",{className:"card rcp-fields-floor",children:[ke.jsxs("div",{id:"session-arn-field",className:"rcp-field",children:[ke.jsxs("select",{id:"session-arn-index",className:"rcp-field-input",value:f,onChange:async({target:{value:T}})=>{await bb({indexValue:T,colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p}})},children:[l.map(({sessionARN:T},N)=>ke.jsx("option",{value:N,children:T},N)),ke.jsx("option",{value:$a,children:"[New]"})]}),y&&ke.jsx("input",{className:"rcp-field-input",placeholder:"arn:aws:iam::012345678901:user/user_name",required:!0,value:o,onChange:({target:{value:T}})=>d(T)}),ke.jsx("label",{htmlFor:"session-arn-index",className:"rcp-field-label",children:"Session ARN"})]}),ke.jsx(Hg,{color:h,onChange:v}),y&&ke.jsx("button",{disabled:o==="",onClick:async()=>{await Sb({colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},hexColor:h.hex,sessionARN:o})},children:"Add"}),-1{await zb(h.hex,{colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Update"}),ke.jsx("button",{onClick:async()=>{await gr({colorSettings:l.filter((T,N)=>N!==f),getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Delete"})]})]})]})}zg.createRoot(document.getElementById("root")).render(ke.jsx(me.StrictMode,{children:ke.jsx(Eb,{})})); +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of l.seen.entries()){const v=h[1];if(u===h[0]){d(h);continue}if(l.external){const y=l.external.registry.get(h[0])?.id;if(u!==h[0]&&y){d(h);continue}}if(l.metadataRegistry.get(h[0])?.id){d(h);continue}if(v.cycle){d(h);continue}if(v.count>1&&l.reused==="ref"){d(h);continue}}}function Zm(l,u){const f=l.seen.get(u);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const v=l.seen.get(h);if(v.ref===null)return;const p=v.def??v.schema,y={...p},T=v.ref;if(v.ref=null,T){r(T);const x=l.seen.get(T),G=x.schema;if(G.$ref&&(l.target==="draft-07"||l.target==="draft-04"||l.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(G)):Object.assign(p,G),Object.assign(p,y),h._zod.parent===T)for(const j in p)j==="$ref"||j==="allOf"||j in y||delete p[j];if(G.$ref&&x.def)for(const j in p)j==="$ref"||j==="allOf"||j in x.def&&JSON.stringify(p[j])===JSON.stringify(x.def[j])&&delete p[j]}const M=h._zod.parent;if(M&&M!==T){r(M);const x=l.seen.get(M);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const G in p)G==="$ref"||G==="allOf"||G in x.def&&JSON.stringify(p[G])===JSON.stringify(x.def[G])&&delete p[G]}l.override({zodSchema:h,jsonSchema:p,path:v.path??[]})};for(const h of[...l.seen.entries()].reverse())r(h[0]);const o={};if(l.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":l.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":l.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":l.target,l.external?.uri){const h=l.external.registry.get(u)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=l.external.uri(h)}Object.assign(o,f.def??f.schema);const d=l.external?.defs??{};for(const h of l.seen.entries()){const v=h[1];v.def&&v.defId&&(d[v.defId]=v.def)}l.external||Object.keys(d).length>0&&(l.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...u["~standard"],jsonSchema:{input:zi(u,"input",l.processors),output:zi(u,"output",l.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function ft(l,u){const f=u??{seen:new Set};if(f.seen.has(l))return!1;f.seen.add(l);const r=l._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ft(r.element,f);if(r.type==="set")return ft(r.valueType,f);if(r.type==="lazy")return ft(r.getter(),f);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ft(r.innerType,f);if(r.type==="intersection")return ft(r.left,f)||ft(r.right,f);if(r.type==="record"||r.type==="map")return ft(r.keyType,f)||ft(r.valueType,f);if(r.type==="pipe")return ft(r.in,f)||ft(r.out,f);if(r.type==="object"){for(const o in r.shape)if(ft(r.shape[o],f))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ft(o,f))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ft(o,f))return!0;return!!(r.rest&&ft(r.rest,f))}return!1}const w1=(l,u={})=>f=>{const r=Nm({...f,processors:u});return et(l,r),Dm(r,l),Zm(r,l)},zi=(l,u,f={})=>r=>{const{libraryOptions:o,target:d}=r??{},h=Nm({...o??{},target:d,io:u,processors:f});return et(l,h),Dm(h,l),Zm(h,l)},R1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},C1=(l,u,f,r)=>{const o=f;o.type="string";const{minimum:d,maximum:h,format:v,patterns:p,contentEncoding:y}=l._zod.bag;if(typeof d=="number"&&(o.minLength=d),typeof h=="number"&&(o.maxLength=h),v&&(o.format=R1[v]??v,o.format===""&&delete o.format,v==="time"&&delete o.format),y&&(o.contentEncoding=y),p&&p.size>0){const T=[...p];T.length===1?o.pattern=T[0].source:T.length>1&&(o.allOf=[...T.map(M=>({...u.target==="draft-07"||u.target==="draft-04"||u.target==="openapi-3.0"?{type:"string"}:{},pattern:M.source}))])}},j1=(l,u,f,r)=>{const o=f,{minimum:d,maximum:h,format:v,multipleOf:p,exclusiveMaximum:y,exclusiveMinimum:T}=l._zod.bag;typeof v=="string"&&v.includes("int")?o.type="integer":o.type="number",typeof T=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.minimum=T,o.exclusiveMinimum=!0):o.exclusiveMinimum=T),typeof d=="number"&&(o.minimum=d,typeof T=="number"&&u.target!=="draft-04"&&(T>=d?delete o.minimum:delete o.exclusiveMinimum)),typeof y=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(o.maximum=y,o.exclusiveMaximum=!0):o.exclusiveMaximum=y),typeof h=="number"&&(o.maximum=h,typeof y=="number"&&u.target!=="draft-04"&&(y<=h?delete o.maximum:delete o.exclusiveMaximum)),typeof p=="number"&&(o.multipleOf=p)},x1=(l,u,f,r)=>{f.not={}},H1=(l,u,f,r)=>{},q1=(l,u,f,r)=>{const o=l._zod.def,d=fm(o.entries);d.every(h=>typeof h=="number")&&(f.type="number"),d.every(h=>typeof h=="string")&&(f.type="string"),f.enum=d},B1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Y1=(l,u,f,r)=>{if(u.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},G1=(l,u,f,r)=>{const o=f,d=l._zod.def,{minimum:h,maximum:v}=l._zod.bag;typeof h=="number"&&(o.minItems=h),typeof v=="number"&&(o.maxItems=v),o.type="array",o.items=et(d.element,u,{...r,path:[...r.path,"items"]})},X1=(l,u,f,r)=>{const o=f,d=l._zod.def;o.type="object",o.properties={};const h=d.shape;for(const y in h)o.properties[y]=et(h[y],u,{...r,path:[...r.path,"properties",y]});const v=new Set(Object.keys(h)),p=new Set([...v].filter(y=>{const T=d.shape[y]._zod;return u.io==="input"?T.optin===void 0:T.optout===void 0}));p.size>0&&(o.required=Array.from(p)),d.catchall?._zod.def.type==="never"?o.additionalProperties=!1:d.catchall?d.catchall&&(o.additionalProperties=et(d.catchall,u,{...r,path:[...r.path,"additionalProperties"]})):u.io==="output"&&(o.additionalProperties=!1)},V1=(l,u,f,r)=>{const o=l._zod.def,d=o.inclusive===!1,h=o.options.map((v,p)=>et(v,u,{...r,path:[...r.path,d?"oneOf":"anyOf",p]}));d?f.oneOf=h:f.anyOf=h},Q1=(l,u,f,r)=>{const o=l._zod.def,d=et(o.left,u,{...r,path:[...r.path,"allOf",0]}),h=et(o.right,u,{...r,path:[...r.path,"allOf",1]}),v=y=>"allOf"in y&&Object.keys(y).length===1,p=[...v(d)?d.allOf:[d],...v(h)?h.allOf:[h]];f.allOf=p},L1=(l,u,f,r)=>{const o=l._zod.def,d=et(o.innerType,u,r),h=u.seen.get(l);u.target==="openapi-3.0"?(h.ref=o.innerType,f.nullable=!0):f.anyOf=[d,{type:"null"}]},K1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},$1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue))},J1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,u.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},k1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h},W1=(l,u,f,r)=>{const o=l._zod.def,d=u.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;et(d,u,r);const h=u.seen.get(l);h.ref=d},F1=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType,f.readOnly=!0},Um=(l,u,f,r)=>{const o=l._zod.def;et(o.innerType,u,r);const d=u.seen.get(l);d.ref=o.innerType},I1=w("ZodISODateTime",(l,u)=>{ip.init(l,u),we.init(l,u)});function P1(l){return r1(I1,l)}const e_=w("ZodISODate",(l,u)=>{cp.init(l,u),we.init(l,u)});function t_(l){return o1(e_,l)}const n_=w("ZodISOTime",(l,u)=>{fp.init(l,u),we.init(l,u)});function l_(l){return s1(n_,l)}const a_=w("ZodISODuration",(l,u)=>{rp.init(l,u),we.init(l,u)});function u_(l){return d1(a_,l)}const i_=(l,u)=>{hm.init(l,u),l.name="ZodError",Object.defineProperties(l,{format:{value:f=>Pg(l,f)},flatten:{value:f=>Ig(l,f)},addIssue:{value:f=>{l.issues.push(f),l.message=JSON.stringify(l.issues,ar,2)}},addIssues:{value:f=>{l.issues.push(...f),l.message=JSON.stringify(l.issues,ar,2)}},isEmpty:{get(){return l.issues.length===0}}})},qt=w("ZodError",i_,{Parent:Error}),c_=hr(qt),f_=mr(qt),r_=Mi(qt),o_=Ni(qt),s_=n0(qt),d_=l0(qt),h_=a0(qt),m_=u0(qt),v_=i0(qt),y_=c0(qt),g_=f0(qt),p_=r0(qt),Ve=w("ZodType",(l,u)=>(Xe.init(l,u),Object.assign(l["~standard"],{jsonSchema:{input:zi(l,"input"),output:zi(l,"output")}}),l.toJSONSchema=w1(l,{}),l.def=u,l.type=u.type,Object.defineProperty(l,"_def",{value:u}),l.check=(...f)=>l.clone(qn(u,{checks:[...u.checks??[],...f.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),l.with=l.check,l.clone=(f,r)=>Bn(l,f,r),l.brand=()=>l,l.register=((f,r)=>(f.add(l,r),l)),l.parse=(f,r)=>c_(l,f,r,{callee:l.parse}),l.safeParse=(f,r)=>r_(l,f,r),l.parseAsync=async(f,r)=>f_(l,f,r,{callee:l.parseAsync}),l.safeParseAsync=async(f,r)=>o_(l,f,r),l.spa=l.safeParseAsync,l.encode=(f,r)=>s_(l,f,r),l.decode=(f,r)=>d_(l,f,r),l.encodeAsync=async(f,r)=>h_(l,f,r),l.decodeAsync=async(f,r)=>m_(l,f,r),l.safeEncode=(f,r)=>v_(l,f,r),l.safeDecode=(f,r)=>y_(l,f,r),l.safeEncodeAsync=async(f,r)=>g_(l,f,r),l.safeDecodeAsync=async(f,r)=>p_(l,f,r),l.refine=(f,r)=>l.check(hb(f,r)),l.superRefine=f=>l.check(mb(f)),l.overwrite=f=>l.check(kl(f)),l.optional=()=>Ph(l),l.exactOptional=()=>eb(l),l.nullable=()=>em(l),l.nullish=()=>Ph(em(l)),l.nonoptional=f=>ib(l,f),l.array=()=>V_(l),l.or=f=>$_([l,f]),l.and=f=>k_(l,f),l.transform=f=>tm(l,I_(f)),l.default=f=>lb(l,f),l.prefault=f=>ub(l,f),l.catch=f=>fb(l,f),l.pipe=f=>tm(l,f),l.readonly=()=>sb(l),l.describe=f=>{const r=l.clone();return La.add(r,{description:f}),r},Object.defineProperty(l,"description",{get(){return La.get(l)?.description},configurable:!0}),l.meta=(...f)=>{if(f.length===0)return La.get(l);const r=l.clone();return La.add(r,f[0]),r},l.isOptional=()=>l.safeParse(void 0).success,l.isNullable=()=>l.safeParse(null).success,l.apply=f=>f(l),l)),wm=w("_ZodString",(l,u)=>{vr.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(r,o,d)=>C1(l,r,o);const f=l._zod.bag;l.format=f.format??null,l.minLength=f.minimum??null,l.maxLength=f.maximum??null,l.regex=(...r)=>l.check(g1(...r)),l.includes=(...r)=>l.check(b1(...r)),l.startsWith=(...r)=>l.check(S1(...r)),l.endsWith=(...r)=>l.check(z1(...r)),l.min=(...r)=>l.check(Si(...r)),l.max=(...r)=>l.check(Am(...r)),l.length=(...r)=>l.check(Mm(...r)),l.nonempty=(...r)=>l.check(Si(1,...r)),l.lowercase=r=>l.check(p1(r)),l.uppercase=r=>l.check(_1(r)),l.trim=()=>l.check(T1()),l.normalize=(...r)=>l.check(E1(...r)),l.toLowerCase=()=>l.check(O1()),l.toUpperCase=()=>l.check(A1()),l.slugify=()=>l.check(M1())}),__=w("ZodString",(l,u)=>{vr.init(l,u),wm.init(l,u),l.email=f=>l.check(Xp(b_,f)),l.url=f=>l.check($p(S_,f)),l.jwt=f=>l.check(f1(x_,f)),l.emoji=f=>l.check(Jp(z_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.uuid=f=>l.check(Vp(gi,f)),l.uuidv4=f=>l.check(Qp(gi,f)),l.uuidv6=f=>l.check(Lp(gi,f)),l.uuidv7=f=>l.check(Kp(gi,f)),l.nanoid=f=>l.check(kp(E_,f)),l.guid=f=>l.check(Kh(Wh,f)),l.cuid=f=>l.check(Wp(T_,f)),l.cuid2=f=>l.check(Fp(O_,f)),l.ulid=f=>l.check(Ip(A_,f)),l.base64=f=>l.check(u1(R_,f)),l.base64url=f=>l.check(i1(C_,f)),l.xid=f=>l.check(Pp(M_,f)),l.ksuid=f=>l.check(e1(N_,f)),l.ipv4=f=>l.check(t1(D_,f)),l.ipv6=f=>l.check(n1(Z_,f)),l.cidrv4=f=>l.check(l1(U_,f)),l.cidrv6=f=>l.check(a1(w_,f)),l.e164=f=>l.check(c1(j_,f)),l.datetime=f=>l.check(P1(f)),l.date=f=>l.check(t_(f)),l.time=f=>l.check(l_(f)),l.duration=f=>l.check(u_(f))});function Ei(l){return Gp(__,l)}const we=w("ZodStringFormat",(l,u)=>{Ue.init(l,u),wm.init(l,u)}),b_=w("ZodEmail",(l,u)=>{F0.init(l,u),we.init(l,u)}),Wh=w("ZodGUID",(l,u)=>{k0.init(l,u),we.init(l,u)}),gi=w("ZodUUID",(l,u)=>{W0.init(l,u),we.init(l,u)}),S_=w("ZodURL",(l,u)=>{I0.init(l,u),we.init(l,u)}),z_=w("ZodEmoji",(l,u)=>{P0.init(l,u),we.init(l,u)}),E_=w("ZodNanoID",(l,u)=>{ep.init(l,u),we.init(l,u)}),T_=w("ZodCUID",(l,u)=>{tp.init(l,u),we.init(l,u)}),O_=w("ZodCUID2",(l,u)=>{np.init(l,u),we.init(l,u)}),A_=w("ZodULID",(l,u)=>{lp.init(l,u),we.init(l,u)}),M_=w("ZodXID",(l,u)=>{ap.init(l,u),we.init(l,u)}),N_=w("ZodKSUID",(l,u)=>{up.init(l,u),we.init(l,u)}),D_=w("ZodIPv4",(l,u)=>{op.init(l,u),we.init(l,u)}),Z_=w("ZodIPv6",(l,u)=>{sp.init(l,u),we.init(l,u)}),U_=w("ZodCIDRv4",(l,u)=>{dp.init(l,u),we.init(l,u)}),w_=w("ZodCIDRv6",(l,u)=>{hp.init(l,u),we.init(l,u)}),R_=w("ZodBase64",(l,u)=>{mp.init(l,u),we.init(l,u)}),C_=w("ZodBase64URL",(l,u)=>{yp.init(l,u),we.init(l,u)}),j_=w("ZodE164",(l,u)=>{gp.init(l,u),we.init(l,u)}),x_=w("ZodJWT",(l,u)=>{_p.init(l,u),we.init(l,u)}),Rm=w("ZodNumber",(l,u)=>{zm.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(r,o,d)=>j1(l,r,o),l.gt=(r,o)=>l.check(Jh(r,o)),l.gte=(r,o)=>l.check(nr(r,o)),l.min=(r,o)=>l.check(nr(r,o)),l.lt=(r,o)=>l.check($h(r,o)),l.lte=(r,o)=>l.check(tr(r,o)),l.max=(r,o)=>l.check(tr(r,o)),l.int=r=>l.check(Fh(r)),l.safe=r=>l.check(Fh(r)),l.positive=r=>l.check(Jh(0,r)),l.nonnegative=r=>l.check(nr(0,r)),l.negative=r=>l.check($h(0,r)),l.nonpositive=r=>l.check(tr(0,r)),l.multipleOf=(r,o)=>l.check(kh(r,o)),l.step=(r,o)=>l.check(kh(r,o)),l.finite=()=>l;const f=l._zod.bag;l.minValue=Math.max(f.minimum??Number.NEGATIVE_INFINITY,f.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,l.maxValue=Math.min(f.maximum??Number.POSITIVE_INFINITY,f.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,l.isInt=(f.format??"").includes("int")||Number.isSafeInteger(f.multipleOf??.5),l.isFinite=!0,l.format=f.format??null});function H_(l){return h1(Rm,l)}const q_=w("ZodNumberFormat",(l,u)=>{bp.init(l,u),Rm.init(l,u)});function Fh(l){return m1(q_,l)}const B_=w("ZodUnknown",(l,u)=>{Sp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>H1()});function Ih(){return v1(B_)}const Y_=w("ZodNever",(l,u)=>{zp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>x1(l,f,r)});function G_(l){return y1(Y_,l)}const X_=w("ZodArray",(l,u)=>{Ep.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>G1(l,f,r,o),l.element=u.element,l.min=(f,r)=>l.check(Si(f,r)),l.nonempty=f=>l.check(Si(1,f)),l.max=(f,r)=>l.check(Am(f,r)),l.length=(f,r)=>l.check(Mm(f,r)),l.unwrap=()=>l.element});function V_(l,u){return N1(X_,l,u)}const Q_=w("ZodObject",(l,u)=>{Op.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>X1(l,f,r,o),Se(l,"shape",()=>u.shape),l.keyof=()=>W_(Object.keys(l._zod.def.shape)),l.catchall=f=>l.clone({...l._zod.def,catchall:f}),l.passthrough=()=>l.clone({...l._zod.def,catchall:Ih()}),l.loose=()=>l.clone({...l._zod.def,catchall:Ih()}),l.strict=()=>l.clone({...l._zod.def,catchall:G_()}),l.strip=()=>l.clone({...l._zod.def,catchall:void 0}),l.extend=f=>$g(l,f),l.safeExtend=f=>Jg(l,f),l.merge=f=>kg(l,f),l.pick=f=>Lg(l,f),l.omit=f=>Kg(l,f),l.partial=(...f)=>Wg(Cm,l,f[0]),l.required=(...f)=>Fg(jm,l,f[0])});function L_(l,u){const f={type:"object",shape:l??{},...k(u)};return new Q_(f)}const K_=w("ZodUnion",(l,u)=>{Ap.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>V1(l,f,r,o),l.options=u.options});function $_(l,u){return new K_({type:"union",options:l,...k(u)})}const J_=w("ZodIntersection",(l,u)=>{Mp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Q1(l,f,r,o)});function k_(l,u){return new J_({type:"intersection",left:l,right:u})}const ir=w("ZodEnum",(l,u)=>{Np.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(r,o,d)=>q1(l,r,o),l.enum=u.entries,l.options=Object.values(u.entries);const f=new Set(Object.keys(u.entries));l.extract=(r,o)=>{const d={};for(const h of r)if(f.has(h))d[h]=u.entries[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})},l.exclude=(r,o)=>{const d={...u.entries};for(const h of r)if(f.has(h))delete d[h];else throw new Error(`Key ${h} not found in enum`);return new ir({...u,checks:[],...k(o),entries:d})}});function W_(l,u){const f=Array.isArray(l)?Object.fromEntries(l.map(r=>[r,r])):l;return new ir({type:"enum",entries:f,...k(u)})}const F_=w("ZodTransform",(l,u)=>{Dp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Y1(l,f),l._zod.parse=(f,r)=>{if(r.direction==="backward")throw new im(l.constructor.name);f.addIssue=d=>{if(typeof d=="string")f.issues.push(ka(d,f.value,u));else{const h=d;h.fatal&&(h.continue=!1),h.code??(h.code="custom"),h.input??(h.input=f.value),h.inst??(h.inst=l),f.issues.push(ka(h))}};const o=u.transform(f.value,f);return o instanceof Promise?o.then(d=>(f.value=d,f)):(f.value=o,f)}});function I_(l){return new F_({type:"transform",transform:l})}const Cm=w("ZodOptional",(l,u)=>{Om.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function Ph(l){return new Cm({type:"optional",innerType:l})}const P_=w("ZodExactOptional",(l,u)=>{Zp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>Um(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function eb(l){return new P_({type:"optional",innerType:l})}const tb=w("ZodNullable",(l,u)=>{Up.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>L1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function em(l){return new tb({type:"nullable",innerType:l})}const nb=w("ZodDefault",(l,u)=>{wp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>$1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeDefault=l.unwrap});function lb(l,u){return new nb({type:"default",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const ab=w("ZodPrefault",(l,u)=>{Rp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>J1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ub(l,u){return new ab({type:"prefault",innerType:l,get defaultValue(){return typeof u=="function"?u():om(u)}})}const jm=w("ZodNonOptional",(l,u)=>{Cp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>K1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function ib(l,u){return new jm({type:"nonoptional",innerType:l,...k(u)})}const cb=w("ZodCatch",(l,u)=>{jp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>k1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType,l.removeCatch=l.unwrap});function fb(l,u){return new cb({type:"catch",innerType:l,catchValue:typeof u=="function"?u:()=>u})}const rb=w("ZodPipe",(l,u)=>{xp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>W1(l,f,r,o),l.in=u.in,l.out=u.out});function tm(l,u){return new rb({type:"pipe",in:l,out:u})}const ob=w("ZodReadonly",(l,u)=>{Hp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>F1(l,f,r,o),l.unwrap=()=>l._zod.def.innerType});function sb(l){return new ob({type:"readonly",innerType:l})}const db=w("ZodCustom",(l,u)=>{qp.init(l,u),Ve.init(l,u),l._zod.processJSONSchema=(f,r,o)=>B1(l,f)});function hb(l,u={}){return D1(db,l,u)}function mb(l){return Z1(l)}L_({sessionARN:Ei(),hexColor:Ei()});const xm="sync:colorSettings";async function vb(){return await am.getItem(xm)}var yr=(l=>(l.getSessionARN="getSessionARN",l.changeColor="changeColor",l))(yr||{});const yb="*://*.signin.aws.amazon.com/*";function gb(){return["*://*.console.aws.amazon.com/*",yb]}function pb(l,u){return new RegExp(l.replaceAll("*",".*")).exec(u)!==null}const $a=-1,Hm="#161d26";function qm({index:l,hexColor:u,setIndex:f,setHexColor:r}){f(l),r(u)}async function Bm({colorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){qm({index:$a,hexColor:Hm,setIndex:u,setHexColor:r});const{success:o,data:d}=await Xm();o&&l.findIndex(({sessionARN:h})=>h===d)<0&&f(d)}async function Ym({setColorSettings:l,setIndex:u,setSessionARN:f,setHexColor:r}){const o=await vb(),d=o!==null&&0pb(r,Ei().parse(u[0].url))).length?await Zh.tabs.sendMessage(H_().parse(u[0].id),l):void 0}async function Xm(){return Ei().safeParse(await Gm(yr.getSessionARN))}function Ti({colorSettings:l,index:u,setIndex:f,setHexColor:r}){qm({index:u,hexColor:l[u].hexColor,setIndex:f,setHexColor:r})}async function _b(l){const u=await Ym(l),{success:f,data:r}=await Xm();if(!f){0d===r);if(o<0){l.setSessionARN(r);return}Ti({...l,colorSettings:u,index:o})}async function bb({colorSettings:l,indexValue:u,getColorSettingsParams:f}){const r=Number.parseInt(u,10);r===$a?await Bm({...f,colorSettings:l}):-1(r===u.index&&(f.hexColor=l),f))})}function Eb(){const[l,u]=ce.useState([]),[f,r]=ce.useState($a),[o,d]=ce.useState(""),[h,v]=qg(Hm),p=T=>{v(lt.convert("hex",T))};ce.useEffect(()=>{_b({setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p})},[]);const y=f===$a;return Je.jsxs(Je.Fragment,{children:[Je.jsx("h1",{children:"AWS management console colorize"}),Je.jsxs("div",{className:"card rcp-fields-floor",children:[Je.jsxs("div",{id:"session-arn-field",className:"rcp-field",children:[Je.jsxs("select",{id:"session-arn-index",className:"rcp-field-input",value:f,onChange:async({target:{value:T}})=>{await bb({indexValue:T,colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p}})},children:[l.map(({sessionARN:T},M)=>Je.jsx("option",{value:M,children:T},M)),Je.jsx("option",{value:$a,children:"[New]"})]}),y&&Je.jsx("input",{className:"rcp-field-input",placeholder:"arn:aws:iam::012345678901:user/user_name",required:!0,value:o,onChange:({target:{value:T}})=>d(T)}),Je.jsx("label",{htmlFor:"session-arn-index",className:"rcp-field-label",children:"Session ARN"})]}),Je.jsx(Hg,{color:h,onChange:v}),y&&Je.jsx("button",{disabled:o==="",onClick:async()=>{await Sb({colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},hexColor:h.hex,sessionARN:o})},children:"Add"}),-1{await zb(h.hex,{colorSettings:l,getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Update"}),Je.jsx("button",{onClick:async()=>{await gr({colorSettings:l.filter((T,M)=>M!==f),getColorSettingsParams:{setColorSettings:u,setIndex:r,setSessionARN:d,setHexColor:p},index:f})},children:"Delete"})]})]})]})}zg.createRoot(document.getElementById("root")).render(Je.jsx(ye.StrictMode,{children:Je.jsx(Eb,{})})); diff --git a/dist/firefox-mv2/content-scripts/content.js b/dist/firefox-mv2/content-scripts/content.js index 0b483ee..f309029 100644 --- a/dist/firefox-mv2/content-scripts/content.js +++ b/dist/firefox-mv2/content-scripts/content.js @@ -1,6 +1,6 @@ -var content=(function(){"use strict";const H=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,te=H;function wi(e){return e}function u(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=s.prototype,p=Object.keys(l);for(let g=0;gn?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class K extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ce extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ae={};function x(e){return Ae}function je(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ve(e,t){return typeof t=="bigint"?t.toString():t}function we(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ye(e){return e==null}function ze(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Re=Symbol("evaluating");function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Re)return r===void 0&&(r=Re,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function M(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function D(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Ne(e){return JSON.stringify(e)}function At(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const De="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const jt=we(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Y(e){if(ne(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ne(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ue(e){return Y(e)?{...e}:Array.isArray(e)?[...e]:e}const Rt=new Set(["string","number","symbol"]);function re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function w(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Nt(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Dt(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return M(this,"shape",s),s},checks:[]});return U(e,i)}function Ut(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return M(this,"shape",s),s},checks:[]});return U(e,i)}function xt(e,t){if(!Y(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=D(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return M(this,"shape",i),i}});return U(e,o)}function Mt(e,t){if(!Y(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return M(this,"shape",r),r}});return U(e,n)}function Lt(e,t){const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return M(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return U(e,n)}function Ft(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=D(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return M(this,"shape",c),c},checks:[]});return U(t,s)}function Vt(e,t,n){const r=D(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return M(this,"shape",i),i}});return U(t,r)}function W(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function oe(e){return typeof e=="string"?e:e?.message}function L(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=oe(e.inst?._zod.def?.error?.(e))??oe(t?.error?.(e))??oe(n.customError?.(e))??oe(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function be(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function X(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Me=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ve,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Le=u("$ZodError",Me),Fe=u("$ZodError",Me,{Parent:Error});function Jt(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Kt(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new K;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>L(c,i,x())));throw De(a,o?.callee),a}return s.value},ke=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>L(c,i,x())));throw De(a,o?.callee),a}return s.value},se=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new K;return i.issues.length?{success:!1,error:new(e??Le)(i.issues.map(s=>L(s,o,x())))}:{success:!0,data:i.value}},Wt=se(Fe),ie=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>L(s,o,x())))}:{success:!0,data:i.value}},qt=ie(Fe),Bt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $e(e)(t,n,o)},Gt=e=>(t,n,r)=>$e(e)(t,n,r),Ht=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ke(e)(t,n,o)},Yt=e=>async(t,n,r)=>ke(e)(t,n,r),Xt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return se(e)(t,n,o)},Qt=e=>(t,n,r)=>se(e)(t,n,r),en=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ie(e)(t,n,o)},tn=e=>async(t,n,r)=>ie(e)(t,n,r),nn=/^[cC][^\s-]{8,}$/,rn=/^[0-9a-z]+$/,on=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sn=/^[0-9a-vA-V]{20}$/,an=/^[A-Za-z0-9]{27}$/,cn=/^[a-zA-Z0-9_-]{21}$/,un=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ln=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ve=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,dn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function hn(){return new RegExp(fn,"u")}const pn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,gn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,_n=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Je=/^[A-Za-z0-9_-]*$/,wn=/^\+[1-9]\d{6,14}$/,Ke="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",yn=new RegExp(`^${Ke}$`);function We(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zn(e){return new RegExp(`^${We(e)}$`)}function bn(e){const t=We({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Ke}T(?:${r})$`)}const $n=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},kn=/^[^A-Z]*$/,Sn=/^[^a-z]*$/,R=u("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),En=u("$ZodCheckMaxLength",(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ye(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const o=r.value;if(o.length<=t.maximum)return;const s=be(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zn=u("$ZodCheckMinLength",(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ye(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=be(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),On=u("$ZodCheckLengthEquals",(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ye(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=be(o),a=i>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ae=u("$ZodCheckStringFormat",(e,t)=>{var n,r;R.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),In=u("$ZodCheckRegex",(e,t)=>{ae.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tn=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=kn),ae.init(e,t)}),Pn=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Sn),ae.init(e,t)}),Cn=u("$ZodCheckIncludes",(e,t)=>{R.init(e,t);const n=re(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),An=u("$ZodCheckStartsWith",(e,t)=>{R.init(e,t);const n=new RegExp(`^${re(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),jn=u("$ZodCheckEndsWith",(e,t)=>{R.init(e,t);const n=new RegExp(`.*${re(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Rn=u("$ZodCheckOverwrite",(e,t)=>{R.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Nn{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` +var content=(function(){"use strict";const G=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,te=G;function yi(e){return e}function u(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=s.prototype,p=Object.keys(l);for(let g=0;gn?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class J extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ae extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const je={};function M(e){return je}function Re(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function we(e,t){return typeof t=="bigint"?t.toString():t}function ye(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ze(e){return e==null}function be(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Ne=Symbol("evaluating");function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ne)return r===void 0&&(r=Ne,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function L(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function D(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function De(e){return JSON.stringify(e)}function jt(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ue="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rt=ye(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function H(e){if(ne(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ne(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function xe(e){return H(e)?{...e}:Array.isArray(e)?[...e]:e}const Nt=new Set(["string","number","symbol"]);function re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function w(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Dt(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Ut(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return L(this,"shape",s),s},checks:[]});return U(e,i)}function xt(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return L(this,"shape",s),s},checks:[]});return U(e,i)}function Mt(e,t){if(!H(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=D(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return L(this,"shape",i),i}});return U(e,o)}function Lt(e,t){if(!H(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return L(this,"shape",r),r}});return U(e,n)}function Ft(e,t){const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return L(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return U(e,n)}function Vt(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=D(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return L(this,"shape",c),c},checks:[]});return U(t,s)}function Jt(e,t,n){const r=D(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return L(this,"shape",i),i}});return U(t,r)}function K(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function oe(e){return typeof e=="string"?e:e?.message}function F(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=oe(e.inst?._zod.def?.error?.(e))??oe(t?.error?.(e))??oe(n.customError?.(e))??oe(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function $e(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Y(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Le=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,we,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fe=u("$ZodError",Le),Ve=u("$ZodError",Le,{Parent:Error});function Kt(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Wt(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new J;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>F(c,i,M())));throw Ue(a,o?.callee),a}return s.value},Se=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>F(c,i,M())));throw Ue(a,o?.callee),a}return s.value},se=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new J;return i.issues.length?{success:!1,error:new(e??Fe)(i.issues.map(s=>F(s,o,M())))}:{success:!0,data:i.value}},qt=se(Ve),ie=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>F(s,o,M())))}:{success:!0,data:i.value}},Bt=ie(Ve),Gt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ke(e)(t,n,o)},Ht=e=>(t,n,r)=>ke(e)(t,n,r),Yt=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Se(e)(t,n,o)},Xt=e=>async(t,n,r)=>Se(e)(t,n,r),Qt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return se(e)(t,n,o)},en=e=>(t,n,r)=>se(e)(t,n,r),tn=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ie(e)(t,n,o)},nn=e=>async(t,n,r)=>ie(e)(t,n,r),rn=/^[cC][^\s-]{8,}$/,on=/^[0-9a-z]+$/,sn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,an=/^[0-9a-vA-V]{20}$/,cn=/^[A-Za-z0-9]{27}$/,un=/^[a-zA-Z0-9_-]{21}$/,ln=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Je=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,fn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pn(){return new RegExp(hn,"u")}const mn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_n=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,vn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ke=/^[A-Za-z0-9_-]*$/,yn=/^\+[1-9]\d{6,14}$/,We="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zn=new RegExp(`^${We}$`);function qe(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bn(e){return new RegExp(`^${qe(e)}$`)}function $n(e){const t=qe({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${We}T(?:${r})$`)}const kn=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Sn=/^[^A-Z]*$/,En=/^[^a-z]*$/,N=u("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Zn=u("$ZodCheckMaxLength",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const o=r.value;if(o.length<=t.maximum)return;const s=$e(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),On=u("$ZodCheckMinLength",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=$e(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),In=u("$ZodCheckLengthEquals",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ze(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=$e(o),a=i>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ae=u("$ZodCheckStringFormat",(e,t)=>{var n,r;N.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tn=u("$ZodCheckRegex",(e,t)=>{ae.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Pn=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Sn),ae.init(e,t)}),Cn=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=En),ae.init(e,t)}),An=u("$ZodCheckIncludes",(e,t)=>{N.init(e,t);const n=re(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),jn=u("$ZodCheckStartsWith",(e,t)=>{N.init(e,t);const n=new RegExp(`^${re(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Rn=u("$ZodCheckEndsWith",(e,t)=>{N.init(e,t);const n=new RegExp(`.*${re(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Nn=u("$ZodCheckOverwrite",(e,t)=>{N.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Dn{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` `).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(` -`))}}const Dn={major:4,minor:3,patch:6},O=u("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dn;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,c)=>{let l=W(s),p;for(const g of a){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(l)continue;const _=s.issues.length,y=g._zod.check(s);if(y instanceof Promise&&c?.async===!1)throw new K;if(p||y instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await y,s.issues.length!==_&&(l||(l=W(s,_)))});else{if(s.issues.length===_)continue;l||(l=W(s,_))}}return p?p.then(()=>s):s},i=(s,a,c)=>{if(W(s))return s.aborted=!0,s;const l=o(a,r,c);if(l instanceof Promise){if(c.async===!1)throw new K;return l.then(p=>e._zod.parse(p,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(p=>i(p,s,a)):i(l,s,a)}const c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new K;return c.then(l=>o(l,r,a))}return o(c,r,a)}}k(e,"~standard",()=>({validate:o=>{try{const i=Wt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return qt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Se=u("$ZodString",(e,t)=>{O.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$n(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),S=u("$ZodStringFormat",(e,t)=>{ae.init(e,t),Se.init(e,t)}),Un=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ln),S.init(e,t)}),xn=u("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ve(r))}else t.pattern??(t.pattern=Ve());S.init(e,t)}),Mn=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dn),S.init(e,t)}),Ln=u("$ZodURL",(e,t)=>{S.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Fn=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=hn()),S.init(e,t)}),Vn=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cn),S.init(e,t)}),Jn=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=nn),S.init(e,t)}),Kn=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rn),S.init(e,t)}),Wn=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=on),S.init(e,t)}),qn=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sn),S.init(e,t)}),Bn=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=an),S.init(e,t)}),Gn=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=bn(t)),S.init(e,t)}),Hn=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=yn),S.init(e,t)}),Yn=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=zn(t)),S.init(e,t)}),Xn=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=un),S.init(e,t)}),Qn=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pn),S.init(e,t),e._zod.bag.format="ipv4"}),er=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mn),S.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),tr=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=gn),S.init(e,t)}),nr=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=_n),S.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function qe(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const rr=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=vn),S.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{qe(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function or(e){if(!Je.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return qe(n)}const sr=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Je),S.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{or(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ir=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=wn),S.init(e,t)});function ar(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const cr=u("$ZodJWT",(e,t)=>{S.init(e,t),e._zod.check=n=>{ar(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),ur=u("$ZodUnknown",(e,t)=>{O.init(e,t),e._zod.parse=n=>n}),lr=u("$ZodNever",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Be(e,t,n){e.issues.length&&t.issues.push(...xe(n,e.issues)),t.value[n]=e.value}const dr=u("$ZodArray",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;sBe(l,n,s))):Be(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function ce(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...xe(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Ge(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Nt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function He(e,t,n,r,o,i){const s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optout==="optional";for(const g in t){if(a.has(g))continue;if(l==="never"){s.push(g);continue}const _=c.run({value:t[g],issues:[]},r);_ instanceof Promise?e.push(_.then(y=>ce(y,n,g,t,p))):ce(_,n,g,t,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const fr=u("$ZodObject",(e,t)=>{if(O.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=we(()=>Ge(t));k(e._zod,"propValues",()=>{const a=t.shape,c={};for(const l in a){const p=a[l]._zod;if(p.values){c[l]??(c[l]=new Set);for(const g of p.values)c[l].add(g)}}return c});const o=ne,i=t.catchall;let s;e._zod.parse=(a,c)=>{s??(s=r.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const p=[],g=s.shape;for(const _ of s.keys){const y=g[_],d=y._zod.optout==="optional",h=y._zod.run({value:l[_],issues:[]},c);h instanceof Promise?p.push(h.then(f=>ce(f,a,_,l,d))):ce(h,a,_,l,d)}return i?He(p,l,a,c,r.value,e):p.length?Promise.all(p).then(()=>a):a}}),hr=u("$ZodObjectJIT",(e,t)=>{fr.init(e,t);const n=e._zod.parse,r=we(()=>Ge(t)),o=_=>{const y=new Nn(["shape","payload","ctx"]),d=r.value,h=z=>{const b=Ne(z);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};y.write("const input = payload.value;");const f=Object.create(null);let m=0;for(const z of d.keys)f[z]=`key_${m++}`;y.write("const newResult = {};");for(const z of d.keys){const b=f[z],$=Ne(z),Z=_[z]?._zod?.optout==="optional";y.write(`const ${b} = ${h(z)};`),Z?y.write(` +`))}}const Un={major:4,minor:3,patch:6},Z=u("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Un;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,c)=>{let l=K(s),p;for(const g of a){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(l)continue;const v=s.issues.length,y=g._zod.check(s);if(y instanceof Promise&&c?.async===!1)throw new J;if(p||y instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await y,s.issues.length!==v&&(l||(l=K(s,v)))});else{if(s.issues.length===v)continue;l||(l=K(s,v))}}return p?p.then(()=>s):s},i=(s,a,c)=>{if(K(s))return s.aborted=!0,s;const l=o(a,r,c);if(l instanceof Promise){if(c.async===!1)throw new J;return l.then(p=>e._zod.parse(p,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(p=>i(p,s,a)):i(l,s,a)}const c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new J;return c.then(l=>o(l,r,a))}return o(c,r,a)}}k(e,"~standard",()=>({validate:o=>{try{const i=qt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Bt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Ee=u("$ZodString",(e,t)=>{Z.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??kn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),S=u("$ZodStringFormat",(e,t)=>{ae.init(e,t),Ee.init(e,t)}),xn=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=dn),S.init(e,t)}),Mn=u("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Je(r))}else t.pattern??(t.pattern=Je());S.init(e,t)}),Ln=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=fn),S.init(e,t)}),Fn=u("$ZodURL",(e,t)=>{S.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Vn=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pn()),S.init(e,t)}),Jn=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=un),S.init(e,t)}),Kn=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rn),S.init(e,t)}),Wn=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=on),S.init(e,t)}),qn=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=sn),S.init(e,t)}),Bn=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=an),S.init(e,t)}),Gn=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=cn),S.init(e,t)}),Hn=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=$n(t)),S.init(e,t)}),Yn=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zn),S.init(e,t)}),Xn=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bn(t)),S.init(e,t)}),Qn=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ln),S.init(e,t)}),er=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mn),S.init(e,t),e._zod.bag.format="ipv4"}),tr=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=gn),S.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),nr=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_n),S.init(e,t)}),rr=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vn),S.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Be(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const or=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=wn),S.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Be(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function sr(e){if(!Ke.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Be(n)}const ir=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ke),S.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{sr(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ar=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=yn),S.init(e,t)});function cr(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const ur=u("$ZodJWT",(e,t)=>{S.init(e,t),e._zod.check=n=>{cr(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),lr=u("$ZodUnknown",(e,t)=>{Z.init(e,t),e._zod.parse=n=>n}),dr=u("$ZodNever",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ge(e,t,n){e.issues.length&&t.issues.push(...Me(n,e.issues)),t.value[n]=e.value}const fr=u("$ZodArray",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;sGe(l,n,s))):Ge(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function ce(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Me(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function He(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Dt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ye(e,t,n,r,o,i){const s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optout==="optional";for(const g in t){if(a.has(g))continue;if(l==="never"){s.push(g);continue}const v=c.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(y=>ce(y,n,g,t,p))):ce(v,n,g,t,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const hr=u("$ZodObject",(e,t)=>{if(Z.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=ye(()=>He(t));k(e._zod,"propValues",()=>{const a=t.shape,c={};for(const l in a){const p=a[l]._zod;if(p.values){c[l]??(c[l]=new Set);for(const g of p.values)c[l].add(g)}}return c});const o=ne,i=t.catchall;let s;e._zod.parse=(a,c)=>{s??(s=r.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const p=[],g=s.shape;for(const v of s.keys){const y=g[v],f=y._zod.optout==="optional",h=y._zod.run({value:l[v],issues:[]},c);h instanceof Promise?p.push(h.then(d=>ce(d,a,v,l,f))):ce(h,a,v,l,f)}return i?Ye(p,l,a,c,r.value,e):p.length?Promise.all(p).then(()=>a):a}}),pr=u("$ZodObjectJIT",(e,t)=>{hr.init(e,t);const n=e._zod.parse,r=ye(()=>He(t)),o=v=>{const y=new Dn(["shape","payload","ctx"]),f=r.value,h=z=>{const b=De(z);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};y.write("const input = payload.value;");const d=Object.create(null);let m=0;for(const z of f.keys)d[z]=`key_${m++}`;y.write("const newResult = {};");for(const z of f.keys){const b=d[z],$=De(z),C=v[z]?._zod?.optout==="optional";y.write(`const ${b} = ${h(z)};`),C?y.write(` if (${b}.issues.length) { if (${$} in input) { payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ @@ -34,11 +34,11 @@ var content=(function(){"use strict";const H=globalThis.browser?.runtime?.id?glo newResult[${$}] = ${b}.value; } - `)}y.write("payload.value = newResult;"),y.write("return payload;");const v=y.compile();return(z,b)=>v(_,z,b)};let i;const s=ne,a=!Ae.jitless,l=a&&jt.value,p=t.catchall;let g;e._zod.parse=(_,y)=>{g??(g=r.value);const d=_.value;return s(d)?a&&l&&y?.async===!1&&y.jitless!==!0?(i||(i=o(t.shape)),_=i(_,y),p?He([],d,_,y,g,e):_):n(_,y):(_.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),_)}});function Ye(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!W(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>L(s,r,x())))}),t)}const pr=u("$ZodUnion",(e,t)=>{O.init(e,t),k(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),k(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),k(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),k(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>ze(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>Ye(c,o,e,i)):Ye(a,o,e,i)}}),mr=u("$ZodIntersection",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>Xe(n,c,l)):Xe(n,i,s)}});function Ee(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Y(e)&&Y(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=Ee(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;ra.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),W(e))return e;const s=Ee(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const gr=u("$ZodEnum",(e,t)=>{O.init(e,t);const n=je(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Rt.has(typeof o)).map(o=>typeof o=="string"?re(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),_r=u("$ZodTransform",(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ce(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new K;return n.value=o,n}});function Qe(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const et=u("$ZodOptional",(e,t)=>{O.init(e,t),e._zod.optin="optional",e._zod.optout="optional",k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ze(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Qe(i,n.value)):Qe(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),vr=u("$ZodExactOptional",(e,t)=>{et.init(e,t),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),wr=u("$ZodNullable",(e,t)=>{O.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ze(n.source)}|null)$`):void 0}),k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),yr=u("$ZodDefault",(e,t)=>{O.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>tt(i,t)):tt(o,t)}});function tt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const zr=u("$ZodPrefault",(e,t)=>{O.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),br=u("$ZodNonOptional",(e,t)=>{O.init(e,t),k(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>nt(i,e)):nt(o,e)}});function nt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const $r=u("$ZodCatch",(e,t)=>{O.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>L(s,r,x()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>L(i,r,x()))},input:n.value}),n.issues=[]),n)}}),kr=u("$ZodPipe",(e,t)=>{O.init(e,t),k(e._zod,"values",()=>t.in._zod.values),k(e._zod,"optin",()=>t.in._zod.optin),k(e._zod,"optout",()=>t.out._zod.optout),k(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>ue(s,t.in,r)):ue(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>ue(i,t.out,r)):ue(o,t.out,r)}});function ue(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Sr=u("$ZodReadonly",(e,t)=>{O.init(e,t),k(e._zod,"propValues",()=>t.innerType._zod.propValues),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"optin",()=>t.innerType?._zod?.optin),k(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(rt):rt(o)}});function rt(e){return e.value=Object.freeze(e.value),e}const Er=u("$ZodCustom",(e,t)=>{R.init(e,t),O.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>ot(i,n,r,e));ot(o,n,r,e)}});function ot(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(X(o))}}var st;class Zr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Or(){return new Zr}(st=globalThis).__zod_globalRegistry??(st.__zod_globalRegistry=Or());const Q=globalThis.__zod_globalRegistry;function Ir(e,t){return new e({type:"string",...w(t)})}function Tr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...w(t)})}function it(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...w(t)})}function Pr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...w(t)})}function Cr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(t)})}function jr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(t)})}function Rr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...w(t)})}function Nr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...w(t)})}function Dr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(t)})}function Ur(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...w(t)})}function xr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(t)})}function Mr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...w(t)})}function Lr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...w(t)})}function Fr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(t)})}function Vr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(t)})}function Jr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(t)})}function Kr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(t)})}function Wr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(t)})}function qr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...w(t)})}function Br(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...w(t)})}function Gr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...w(t)})}function Hr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...w(t)})}function Yr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(t)})}function Xr(e,t){return new e({type:"string",format:"date",check:"string_format",...w(t)})}function Qr(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...w(t)})}function eo(e,t){return new e({type:"string",format:"duration",check:"string_format",...w(t)})}function to(e){return new e({type:"unknown"})}function no(e,t){return new e({type:"never",...w(t)})}function at(e,t){return new En({check:"max_length",...w(t),maximum:e})}function le(e,t){return new Zn({check:"min_length",...w(t),minimum:e})}function ct(e,t){return new On({check:"length_equals",...w(t),length:e})}function ro(e,t){return new In({check:"string_format",format:"regex",...w(t),pattern:e})}function oo(e){return new Tn({check:"string_format",format:"lowercase",...w(e)})}function so(e){return new Pn({check:"string_format",format:"uppercase",...w(e)})}function io(e,t){return new Cn({check:"string_format",format:"includes",...w(t),includes:e})}function ao(e,t){return new An({check:"string_format",format:"starts_with",...w(t),prefix:e})}function co(e,t){return new jn({check:"string_format",format:"ends_with",...w(t),suffix:e})}function q(e){return new Rn({check:"overwrite",tx:e})}function uo(e){return q(t=>t.normalize(e))}function lo(){return q(e=>e.trim())}function fo(){return q(e=>e.toLowerCase())}function ho(){return q(e=>e.toUpperCase())}function po(){return q(e=>At(e))}function mo(e,t,n){return new e({type:"array",element:t,...w(n)})}function go(e,t,n){return new e({type:"custom",check:"custom",fn:t,...w(n)})}function _o(e){const t=vo(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(X(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(X(o))}},e(n.value,n)));return t}function vo(e,t){const n=new R({check:"custom",...w(t)});return n._zod.check=e,n}function ut(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Q,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function P(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,p);else{const _=s.schema,y=t.processors[o.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);y(e,t,_,p)}const g=e._zod.parent;g&&(s.ref||(s.ref=g),P(g,t,p),t.seen.get(g).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&C(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function lt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=r.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(s[0])?.id,_=e.external.uri??(d=>d);if(g)return{ref:_(g)};const y=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=y,{defId:y,ref:`${_("__shared")}#/${a}/${y}`}}if(s[1]===n)return{ref:"#"};const l=`#/${a}/`,p=s[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+p}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);const p=a.schema;for(const g in p)delete p[g];p.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/ + `)}y.write("payload.value = newResult;"),y.write("return payload;");const _=y.compile();return(z,b)=>_(v,z,b)};let i;const s=ne,a=!je.jitless,l=a&&Rt.value,p=t.catchall;let g;e._zod.parse=(v,y)=>{g??(g=r.value);const f=v.value;return s(f)?a&&l&&y?.async===!1&&y.jitless!==!0?(i||(i=o(t.shape)),v=i(v,y),p?Ye([],f,v,y,g,e):v):n(v,y):(v.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),v)}});function Xe(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!K(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>F(s,r,M())))}),t)}const mr=u("$ZodUnion",(e,t)=>{Z.init(e,t),k(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),k(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),k(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),k(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>be(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>Xe(c,o,e,i)):Xe(a,o,e,i)}}),gr=u("$ZodIntersection",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>Qe(n,c,l)):Qe(n,i,s)}});function Ze(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(H(e)&&H(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=Ze(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;ra.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),K(e))return e;const s=Ze(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const _r=u("$ZodEnum",(e,t)=>{Z.init(e,t);const n=Re(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Nt.has(typeof o)).map(o=>typeof o=="string"?re(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),vr=u("$ZodTransform",(e,t)=>{Z.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ae(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new J;return n.value=o,n}});function et(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const tt=u("$ZodOptional",(e,t)=>{Z.init(e,t),e._zod.optin="optional",e._zod.optout="optional",k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>et(i,n.value)):et(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),wr=u("$ZodExactOptional",(e,t)=>{tt.init(e,t),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),yr=u("$ZodNullable",(e,t)=>{Z.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)}|null)$`):void 0}),k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),zr=u("$ZodDefault",(e,t)=>{Z.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>nt(i,t)):nt(o,t)}});function nt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const br=u("$ZodPrefault",(e,t)=>{Z.init(e,t),e._zod.optin="optional",k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),$r=u("$ZodNonOptional",(e,t)=>{Z.init(e,t),k(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>rt(i,e)):rt(o,e)}});function rt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const kr=u("$ZodCatch",(e,t)=>{Z.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>F(s,r,M()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>F(i,r,M()))},input:n.value}),n.issues=[]),n)}}),Sr=u("$ZodPipe",(e,t)=>{Z.init(e,t),k(e._zod,"values",()=>t.in._zod.values),k(e._zod,"optin",()=>t.in._zod.optin),k(e._zod,"optout",()=>t.out._zod.optout),k(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>ue(s,t.in,r)):ue(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>ue(i,t.out,r)):ue(o,t.out,r)}});function ue(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Er=u("$ZodReadonly",(e,t)=>{Z.init(e,t),k(e._zod,"propValues",()=>t.innerType._zod.propValues),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"optin",()=>t.innerType?._zod?.optin),k(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(ot):ot(o)}});function ot(e){return e.value=Object.freeze(e.value),e}const Zr=u("$ZodCustom",(e,t)=>{N.init(e,t),Z.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>st(i,n,r,e));st(o,n,r,e)}});function st(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Y(o))}}var it;class Or{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ir(){return new Or}(it=globalThis).__zod_globalRegistry??(it.__zod_globalRegistry=Ir());const X=globalThis.__zod_globalRegistry;function Tr(e,t){return new e({type:"string",...w(t)})}function Pr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...w(t)})}function at(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...w(t)})}function Cr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...w(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w(t)})}function jr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w(t)})}function Rr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w(t)})}function Nr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...w(t)})}function Dr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...w(t)})}function Ur(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...w(t)})}function xr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...w(t)})}function Mr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...w(t)})}function Lr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...w(t)})}function Fr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...w(t)})}function Vr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...w(t)})}function Jr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...w(t)})}function Kr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...w(t)})}function Wr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w(t)})}function qr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w(t)})}function Br(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...w(t)})}function Gr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...w(t)})}function Hr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...w(t)})}function Yr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...w(t)})}function Xr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w(t)})}function Qr(e,t){return new e({type:"string",format:"date",check:"string_format",...w(t)})}function eo(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...w(t)})}function to(e,t){return new e({type:"string",format:"duration",check:"string_format",...w(t)})}function no(e){return new e({type:"unknown"})}function ro(e,t){return new e({type:"never",...w(t)})}function ct(e,t){return new Zn({check:"max_length",...w(t),maximum:e})}function le(e,t){return new On({check:"min_length",...w(t),minimum:e})}function ut(e,t){return new In({check:"length_equals",...w(t),length:e})}function oo(e,t){return new Tn({check:"string_format",format:"regex",...w(t),pattern:e})}function so(e){return new Pn({check:"string_format",format:"lowercase",...w(e)})}function io(e){return new Cn({check:"string_format",format:"uppercase",...w(e)})}function ao(e,t){return new An({check:"string_format",format:"includes",...w(t),includes:e})}function co(e,t){return new jn({check:"string_format",format:"starts_with",...w(t),prefix:e})}function uo(e,t){return new Rn({check:"string_format",format:"ends_with",...w(t),suffix:e})}function W(e){return new Nn({check:"overwrite",tx:e})}function lo(e){return W(t=>t.normalize(e))}function fo(){return W(e=>e.trim())}function ho(){return W(e=>e.toLowerCase())}function po(){return W(e=>e.toUpperCase())}function mo(){return W(e=>jt(e))}function go(e,t,n){return new e({type:"array",element:t,...w(n)})}function _o(e,t,n){return new e({type:"custom",check:"custom",fn:t,...w(n)})}function vo(e){const t=wo(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Y(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Y(o))}},e(n.value,n)));return t}function wo(e,t){const n=new N({check:"custom",...w(t)});return n._zod.check=e,n}function lt(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??X,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function T(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,p);else{const v=s.schema,y=t.processors[o.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);y(e,t,v,p)}const g=e._zod.parent;g&&(s.ref||(s.ref=g),T(g,t,p),t.seen.get(g).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&P(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function dt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=r.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(s[0])?.id,v=e.external.uri??(f=>f);if(g)return{ref:v(g)};const y=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=y,{defId:y,ref:`${v("__shared")}#/${a}/${y}`}}if(s[1]===n)return{ref:"#"};const l=`#/${a}/`,p=s[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+p}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);const p=a.schema;for(const g in p)delete p[g];p.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function dt(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const a=e.seen.get(s);if(a.ref===null)return;const c=a.def??a.schema,l={...c},p=a.ref;if(a.ref=null,p){r(p);const _=e.seen.get(p),y=_.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,l),s._zod.parent===p)for(const h in c)h==="$ref"||h==="allOf"||h in l||delete c[h];if(y.$ref&&_.def)for(const h in c)h==="$ref"||h==="allOf"||h in _.def&&JSON.stringify(c[h])===JSON.stringify(_.def[h])&&delete c[h]}const g=s._zod.parent;if(g&&g!==p){r(g);const _=e.seen.get(g);if(_?.schema.$ref&&(c.$ref=_.schema.$ref,_.def))for(const y in c)y==="$ref"||y==="allOf"||y in _.def&&JSON.stringify(c[y])===JSON.stringify(_.def[y])&&delete c[y]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:de(t,"input",e.processors),output:de(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function C(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return C(r.element,n);if(r.type==="set")return C(r.valueType,n);if(r.type==="lazy")return C(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return C(r.innerType,n);if(r.type==="intersection")return C(r.left,n)||C(r.right,n);if(r.type==="record"||r.type==="map")return C(r.keyType,n)||C(r.valueType,n);if(r.type==="pipe")return C(r.in,n)||C(r.out,n);if(r.type==="object"){for(const o in r.shape)if(C(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(C(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(C(o,n))return!0;return!!(r.rest&&C(r.rest,n))}return!1}const wo=(e,t={})=>n=>{const r=ut({...n,processors:t});return P(e,r),lt(r,e),dt(r,e)},de=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=ut({...o??{},target:i,io:t,processors:n});return P(e,s),lt(s,e),dt(s,e)},yo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},zo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=yo[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const p=[...c];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},bo=(e,t,n,r)=>{n.not={}},$o=(e,t,n,r)=>{},ko=(e,t,n,r)=>{const o=e._zod.def,i=je(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},So=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Eo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Zo=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=P(i.element,t,{...r,path:[...r.path,"items"]})},Oo=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const l in s)o.properties[l]=P(s[l],t,{...r,path:[...r.path,"properties",l]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{const p=i.shape[l]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=P(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Io=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>P(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},To=(e,t,n,r)=>{const o=e._zod.def,i=P(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=P(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},Po=(e,t,n,r)=>{const o=e._zod.def,i=P(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Co=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Ao=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},jo=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Ro=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},No=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;P(i,t,r);const s=t.seen.get(e);s.ref=i},Do=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},ft=(e,t,n,r)=>{const o=e._zod.def;P(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Uo=u("ZodISODateTime",(e,t)=>{Gn.init(e,t),E.init(e,t)});function xo(e){return Yr(Uo,e)}const Mo=u("ZodISODate",(e,t)=>{Hn.init(e,t),E.init(e,t)});function Lo(e){return Xr(Mo,e)}const Fo=u("ZodISOTime",(e,t)=>{Yn.init(e,t),E.init(e,t)});function Vo(e){return Qr(Fo,e)}const Jo=u("ZodISODuration",(e,t)=>{Xn.init(e,t),E.init(e,t)});function Ko(e){return eo(Jo,e)}const A=u("ZodError",(e,t)=>{Le.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Kt(e,n)},flatten:{value:n=>Jt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ve,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ve,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Wo=$e(A),qo=ke(A),Bo=se(A),Go=ie(A),Ho=Bt(A),Yo=Gt(A),Xo=Ht(A),Qo=Yt(A),es=Xt(A),ts=Qt(A),ns=en(A),rs=tn(A),I=u("ZodType",(e,t)=>(O.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:de(e,"input"),output:de(e,"output")}}),e.toJSONSchema=wo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(D(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>U(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Wo(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Bo(e,n,r),e.parseAsync=async(n,r)=>qo(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Go(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Ho(e,n,r),e.decode=(n,r)=>Yo(e,n,r),e.encodeAsync=async(n,r)=>Xo(e,n,r),e.decodeAsync=async(n,r)=>Qo(e,n,r),e.safeEncode=(n,r)=>es(e,n,r),e.safeDecode=(n,r)=>ts(e,n,r),e.safeEncodeAsync=async(n,r)=>ns(e,n,r),e.safeDecodeAsync=async(n,r)=>rs(e,n,r),e.refine=(n,r)=>e.check(Gs(n,r)),e.superRefine=n=>e.check(Hs(n)),e.overwrite=n=>e.check(q(n)),e.optional=()=>vt(e),e.exactOptional=()=>Ns(e),e.nullable=()=>wt(e),e.nullish=()=>vt(wt(e)),e.nonoptional=n=>Fs(e,n),e.array=()=>Es(e),e.or=n=>Is([e,n]),e.and=n=>Ps(e,n),e.transform=n=>zt(e,js(n)),e.default=n=>xs(e,n),e.prefault=n=>Ls(e,n),e.catch=n=>Js(e,n),e.pipe=n=>zt(e,n),e.readonly=()=>qs(e),e.describe=n=>{const r=e.clone();return Q.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Q.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Q.get(e);const r=e.clone();return Q.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),ht=u("_ZodString",(e,t)=>{Se.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,i)=>zo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(ro(...r)),e.includes=(...r)=>e.check(io(...r)),e.startsWith=(...r)=>e.check(ao(...r)),e.endsWith=(...r)=>e.check(co(...r)),e.min=(...r)=>e.check(le(...r)),e.max=(...r)=>e.check(at(...r)),e.length=(...r)=>e.check(ct(...r)),e.nonempty=(...r)=>e.check(le(1,...r)),e.lowercase=r=>e.check(oo(r)),e.uppercase=r=>e.check(so(r)),e.trim=()=>e.check(lo()),e.normalize=(...r)=>e.check(uo(...r)),e.toLowerCase=()=>e.check(fo()),e.toUpperCase=()=>e.check(ho()),e.slugify=()=>e.check(po())}),os=u("ZodString",(e,t)=>{Se.init(e,t),ht.init(e,t),e.email=n=>e.check(Tr(ss,n)),e.url=n=>e.check(Rr(is,n)),e.jwt=n=>e.check(Hr(zs,n)),e.emoji=n=>e.check(Nr(as,n)),e.guid=n=>e.check(it(pt,n)),e.uuid=n=>e.check(Pr(fe,n)),e.uuidv4=n=>e.check(Cr(fe,n)),e.uuidv6=n=>e.check(Ar(fe,n)),e.uuidv7=n=>e.check(jr(fe,n)),e.nanoid=n=>e.check(Dr(cs,n)),e.guid=n=>e.check(it(pt,n)),e.cuid=n=>e.check(Ur(us,n)),e.cuid2=n=>e.check(xr(ls,n)),e.ulid=n=>e.check(Mr(ds,n)),e.base64=n=>e.check(qr(vs,n)),e.base64url=n=>e.check(Br(ws,n)),e.xid=n=>e.check(Lr(fs,n)),e.ksuid=n=>e.check(Fr(hs,n)),e.ipv4=n=>e.check(Vr(ps,n)),e.ipv6=n=>e.check(Jr(ms,n)),e.cidrv4=n=>e.check(Kr(gs,n)),e.cidrv6=n=>e.check(Wr(_s,n)),e.e164=n=>e.check(Gr(ys,n)),e.datetime=n=>e.check(xo(n)),e.date=n=>e.check(Lo(n)),e.time=n=>e.check(Vo(n)),e.duration=n=>e.check(Ko(n))});function Ze(e){return Ir(os,e)}const E=u("ZodStringFormat",(e,t)=>{S.init(e,t),ht.init(e,t)}),ss=u("ZodEmail",(e,t)=>{Mn.init(e,t),E.init(e,t)}),pt=u("ZodGUID",(e,t)=>{Un.init(e,t),E.init(e,t)}),fe=u("ZodUUID",(e,t)=>{xn.init(e,t),E.init(e,t)}),is=u("ZodURL",(e,t)=>{Ln.init(e,t),E.init(e,t)}),as=u("ZodEmoji",(e,t)=>{Fn.init(e,t),E.init(e,t)}),cs=u("ZodNanoID",(e,t)=>{Vn.init(e,t),E.init(e,t)}),us=u("ZodCUID",(e,t)=>{Jn.init(e,t),E.init(e,t)}),ls=u("ZodCUID2",(e,t)=>{Kn.init(e,t),E.init(e,t)}),ds=u("ZodULID",(e,t)=>{Wn.init(e,t),E.init(e,t)}),fs=u("ZodXID",(e,t)=>{qn.init(e,t),E.init(e,t)}),hs=u("ZodKSUID",(e,t)=>{Bn.init(e,t),E.init(e,t)}),ps=u("ZodIPv4",(e,t)=>{Qn.init(e,t),E.init(e,t)}),ms=u("ZodIPv6",(e,t)=>{er.init(e,t),E.init(e,t)}),gs=u("ZodCIDRv4",(e,t)=>{tr.init(e,t),E.init(e,t)}),_s=u("ZodCIDRv6",(e,t)=>{nr.init(e,t),E.init(e,t)}),vs=u("ZodBase64",(e,t)=>{rr.init(e,t),E.init(e,t)}),ws=u("ZodBase64URL",(e,t)=>{sr.init(e,t),E.init(e,t)}),ys=u("ZodE164",(e,t)=>{ir.init(e,t),E.init(e,t)}),zs=u("ZodJWT",(e,t)=>{cr.init(e,t),E.init(e,t)}),bs=u("ZodUnknown",(e,t)=>{ur.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$o()});function mt(){return to(bs)}const $s=u("ZodNever",(e,t)=>{lr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bo(e,n,r)});function ks(e){return no($s,e)}const Ss=u("ZodArray",(e,t)=>{dr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zo(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(le(n,r)),e.nonempty=n=>e.check(le(1,n)),e.max=(n,r)=>e.check(at(n,r)),e.length=(n,r)=>e.check(ct(n,r)),e.unwrap=()=>e.element});function Es(e,t){return mo(Ss,e,t)}const Zs=u("ZodObject",(e,t)=>{hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Oo(e,n,r,o),k(e,"shape",()=>t.shape),e.keyof=()=>Cs(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mt()}),e.loose=()=>e.clone({...e._zod.def,catchall:mt()}),e.strict=()=>e.clone({...e._zod.def,catchall:ks()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>xt(e,n),e.safeExtend=n=>Mt(e,n),e.merge=n=>Lt(e,n),e.pick=n=>Dt(e,n),e.omit=n=>Ut(e,n),e.partial=(...n)=>Ft(_t,e,n[0]),e.required=(...n)=>Vt(yt,e,n[0])});function gt(e,t){const n={type:"object",shape:e??{},...w(t)};return new Zs(n)}const Os=u("ZodUnion",(e,t)=>{pr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Io(e,n,r,o),e.options=t.options});function Is(e,t){return new Os({type:"union",options:e,...w(t)})}const Ts=u("ZodIntersection",(e,t)=>{mr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>To(e,n,r,o)});function Ps(e,t){return new Ts({type:"intersection",left:e,right:t})}const Oe=u("ZodEnum",(e,t)=>{gr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,i)=>ko(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Oe({...t,checks:[],...w(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Oe({...t,checks:[],...w(o),entries:i})}});function Cs(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Oe({type:"enum",entries:n,...w(t)})}const As=u("ZodTransform",(e,t)=>{_r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ce(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(X(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(X(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function js(e){return new As({type:"transform",transform:e})}const _t=u("ZodOptional",(e,t)=>{et.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ft(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function vt(e){return new _t({type:"optional",innerType:e})}const Rs=u("ZodExactOptional",(e,t)=>{vr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ft(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ns(e){return new Rs({type:"optional",innerType:e})}const Ds=u("ZodNullable",(e,t)=>{wr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Po(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wt(e){return new Ds({type:"nullable",innerType:e})}const Us=u("ZodDefault",(e,t)=>{yr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ao(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xs(e,t){return new Us({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue(t)}})}const Ms=u("ZodPrefault",(e,t)=>{zr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ls(e,t){return new Ms({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ue(t)}})}const yt=u("ZodNonOptional",(e,t)=>{br.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Co(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Fs(e,t){return new yt({type:"nonoptional",innerType:e,...w(t)})}const Vs=u("ZodCatch",(e,t)=>{$r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ro(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Js(e,t){return new Vs({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ks=u("ZodPipe",(e,t)=>{kr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>No(e,n,r,o),e.in=t.in,e.out=t.out});function zt(e,t){return new Ks({type:"pipe",in:e,out:t})}const Ws=u("ZodReadonly",(e,t)=>{Sr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Do(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function qs(e){return new Ws({type:"readonly",innerType:e})}const Bs=u("ZodCustom",(e,t)=>{Er.init(e,t),I.init(e,t),e._zod.processJSONSchema=(n,r,o)=>So(e,n)});function Gs(e,t={}){return go(Bs,e,t)}function Hs(e){return _o(e)}var bt=Object.prototype.hasOwnProperty;function Ie(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ie(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(bt.call(e,n)&&++r&&!bt.call(t,n)||!(n in t)||!Ie(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Ys=new Error("request for lock canceled");var Xs=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class Qs{constructor(t,n=Ys){this._value=t,this._cancelError=n,this._queue=[],this._weightedWaiters=[]}acquire(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((r,o)=>{const i={resolve:r,reject:o,weight:t,priority:n},s=$t(this._queue,a=>n<=a.priority);s===-1&&t<=this._value?this._dispatchItem(i):this._queue.splice(s+1,0,i)})}runExclusive(t){return Xs(this,arguments,void 0,function*(n,r=1,o=0){const[i,s]=yield this.acquire(r,o);try{return yield n(i)}finally{s()}})}waitForUnlock(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,n)?Promise.resolve():new Promise(r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),ei(this._weightedWaiters[t-1],{resolve:r,priority:n})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach(t=>t.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){const n=this._value;this._value-=t.weight,t.resolve([n,this._newReleaser(t.weight)])}_newReleaser(t){let n=!1;return()=>{n||(n=!0,this.release(t))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let t=this._value;t>0;t--){const n=this._weightedWaiters[t-1];n&&(n.forEach(r=>r.resolve()),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let n=this._value;n>0;n--){const r=this._weightedWaiters[n-1];if(!r)continue;const o=r.findIndex(i=>i.priority<=t);(o===-1?r:r.splice(0,o)).forEach((i=>i.resolve()))}}}_couldLockImmediately(t,n){return(this._queue.length===0||this._queue[0].priorityt.priority<=r.priority);e.splice(n+1,0,t)}function $t(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}var ti=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class ni{constructor(t){this._semaphore=new Qs(1,t)}acquire(){return ti(this,arguments,void 0,function*(t=0){const[,n]=yield this._semaphore.acquire(1,t);return n})}runExclusive(t,n=0){return this._semaphore.runExclusive(()=>t(),1,n)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const ri=oi();function oi(){const e={local:he("local"),session:he("session"),sync:he("sync"),managed:he("managed")},t=d=>{const h=e[d];if(h==null){const f=Object.keys(e).join(", ");throw Error(`Invalid area "${d}". Options: ${f}`)}return h},n=d=>{const h=d.indexOf(":"),f=d.substring(0,h),m=d.substring(h+1);if(m==null)throw Error(`Storage key should be in the form of "area:key", but received "${d}"`);return{driverArea:f,driverKey:m,driver:t(f)}},r=d=>d+"$",o=(d,h)=>{const f={...d};return Object.entries(h).forEach(([m,v])=>{v==null?delete f[m]:f[m]=v}),f},i=(d,h)=>d??h??null,s=d=>typeof d=="object"&&!Array.isArray(d)?d:{},a=async(d,h,f)=>i(await d.getItem(h),f?.fallback??f?.defaultValue),c=async(d,h)=>{const f=r(h);return s(await d.getItem(f))},l=async(d,h,f)=>{await d.setItem(h,f??null)},p=async(d,h,f)=>{const m=r(h),v=s(await d.getItem(m));await d.setItem(m,o(v,f))},g=async(d,h,f)=>{if(await d.removeItem(h),f?.removeMeta){const m=r(h);await d.removeItem(m)}},_=async(d,h,f)=>{const m=r(h);if(f==null)await d.removeItem(m);else{const v=s(await d.getItem(m));[f].flat().forEach(z=>delete v[z]),await d.setItem(m,v)}},y=(d,h,f)=>d.watch(h,f);return{getItem:async(d,h)=>{const{driver:f,driverKey:m}=n(d);return await a(f,m,h)},getItems:async d=>{const h=new Map,f=new Map,m=[];d.forEach(z=>{let b,$;typeof z=="string"?b=z:"getValue"in z?(b=z.key,$={fallback:z.fallback}):(b=z.key,$=z.options),m.push(b);const{driverArea:j,driverKey:Z}=n(b),N=h.get(j)??[];h.set(j,N.concat(Z)),f.set(b,$)});const v=new Map;return await Promise.all(Array.from(h.entries()).map(async([z,b])=>{(await e[z].getItems(b)).forEach($=>{const j=`${z}:${$.key}`,Z=f.get(j),N=i($.value,Z?.fallback??Z?.defaultValue);v.set(j,N)})})),m.map(z=>({key:z,value:v.get(z)}))},getMeta:async d=>{const{driver:h,driverKey:f}=n(d);return await c(h,f)},getMetas:async d=>{const h=d.map(v=>{const z=typeof v=="string"?v:v.key,{driverArea:b,driverKey:$}=n(z);return{key:z,driverArea:b,driverKey:$,driverMetaKey:r($)}}),f=h.reduce((v,z)=>(v[z.driverArea]??=[],v[z.driverArea].push(z),v),{}),m={};return await Promise.all(Object.entries(f).map(async([v,z])=>{const b=await H.storage[v].get(z.map($=>$.driverMetaKey));z.forEach($=>{m[$.key]=b[$.driverMetaKey]??{}})})),h.map(v=>({key:v.key,meta:m[v.key]}))},setItem:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await l(f,m,h)},setItems:async d=>{const h={};d.forEach(f=>{const{driverArea:m,driverKey:v}=n("key"in f?f.key:f.item.key);h[m]??=[],h[m].push({key:v,value:f.value})}),await Promise.all(Object.entries(h).map(async([f,m])=>{await t(f).setItems(m)}))},setMeta:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await p(f,m,h)},setMetas:async d=>{const h={};d.forEach(f=>{const{driverArea:m,driverKey:v}=n("key"in f?f.key:f.item.key);h[m]??=[],h[m].push({key:v,properties:f.meta})}),await Promise.all(Object.entries(h).map(async([f,m])=>{const v=t(f),z=m.map(({key:Z})=>r(Z)),b=await v.getItems(z),$=Object.fromEntries(b.map(({key:Z,value:N})=>[Z,s(N)])),j=m.map(({key:Z,properties:N})=>{const V=r(Z);return{key:V,value:o($[V]??{},N)}});await v.setItems(j)}))},removeItem:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await g(f,m,h)},removeItems:async d=>{const h={};d.forEach(f=>{let m,v;typeof f=="string"?m=f:"getValue"in f?m=f.key:"item"in f?(m=f.item.key,v=f.options):(m=f.key,v=f.options);const{driverArea:z,driverKey:b}=n(m);h[z]??=[],h[z].push(b),v?.removeMeta&&h[z].push(r(b))}),await Promise.all(Object.entries(h).map(async([f,m])=>{await t(f).removeItems(m)}))},clear:async d=>{await t(d).clear()},removeMeta:async(d,h)=>{const{driver:f,driverKey:m}=n(d);await _(f,m,h)},snapshot:async(d,h)=>{const f=await t(d).snapshot();return h?.excludeKeys?.forEach(m=>{delete f[m],delete f[r(m)]}),f},restoreSnapshot:async(d,h)=>{await t(d).restoreSnapshot(h)},watch:(d,h)=>{const{driver:f,driverKey:m}=n(d);return y(f,m,h)},unwatch(){Object.values(e).forEach(d=>{d.unwatch()})},defineItem:(d,h)=>{const{driver:f,driverKey:m}=n(d),{version:v=1,migrations:z={},onMigrationComplete:b,debug:$=!1}=h??{};if(v<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const j=async()=>{const T=r(m),[{value:J},{value:ge}]=await f.getItems([m,T]);if(J==null)return;const B=ge?.v??1;if(B>v)throw Error(`Version downgrade detected (v${B} -> v${v}) for "${d}"`);if(B===v)return;$&&console.debug(`[@wxt-dev/storage] Running storage migration for ${d}: v${B} -> v${v}`);const vi=Array.from({length:v-B},(_e,Pe)=>B+Pe+1);let G=J;for(const _e of vi)try{G=await z?.[_e]?.(G)??G,$&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${_e}`)}catch(Pe){throw new si(d,_e,{cause:Pe})}await f.setItems([{key:m,value:G},{key:T,value:{...ge,v}}]),$&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${d} v${v}`,{migratedValue:G}),b?.(G,v)},Z=h?.migrations==null?Promise.resolve():j().catch(T=>{console.error(`[@wxt-dev/storage] Migration failed for ${d}`,T)}),N=new ni,V=()=>h?.fallback??h?.defaultValue??null,Pt=()=>N.runExclusive(async()=>{const T=await f.getItem(m);if(T!=null||h?.init==null)return T;const J=await h.init();return await f.setItem(m,J),T==null&&v>1&&await p(f,m,{v}),J});return Z.then(Pt),{key:d,get defaultValue(){return V()},get fallback(){return V()},getValue:async()=>(await Z,h?.init?await Pt():await a(f,m,h)),getMeta:async()=>(await Z,await c(f,m)),setValue:async T=>(await Z,await l(f,m,T)),setMeta:async T=>(await Z,await p(f,m,T)),removeValue:async T=>(await Z,await g(f,m,T)),removeMeta:async T=>(await Z,await _(f,m,T)),watch:T=>y(f,m,(J,ge)=>T(J??V(),ge??V())),migrate:j}}}}function he(e){const t=()=>{if(H.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function ft(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const a=e.seen.get(s);if(a.ref===null)return;const c=a.def??a.schema,l={...c},p=a.ref;if(a.ref=null,p){r(p);const v=e.seen.get(p),y=v.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,l),s._zod.parent===p)for(const h in c)h==="$ref"||h==="allOf"||h in l||delete c[h];if(y.$ref&&v.def)for(const h in c)h==="$ref"||h==="allOf"||h in v.def&&JSON.stringify(c[h])===JSON.stringify(v.def[h])&&delete c[h]}const g=s._zod.parent;if(g&&g!==p){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(c.$ref=v.schema.$ref,v.def))for(const y in c)y==="$ref"||y==="allOf"||y in v.def&&JSON.stringify(c[y])===JSON.stringify(v.def[y])&&delete c[y]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:de(t,"input",e.processors),output:de(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function P(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return P(r.element,n);if(r.type==="set")return P(r.valueType,n);if(r.type==="lazy")return P(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return P(r.innerType,n);if(r.type==="intersection")return P(r.left,n)||P(r.right,n);if(r.type==="record"||r.type==="map")return P(r.keyType,n)||P(r.valueType,n);if(r.type==="pipe")return P(r.in,n)||P(r.out,n);if(r.type==="object"){for(const o in r.shape)if(P(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(P(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(P(o,n))return!0;return!!(r.rest&&P(r.rest,n))}return!1}const yo=(e,t={})=>n=>{const r=lt({...n,processors:t});return T(e,r),dt(r,e),ft(r,e)},de=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=lt({...o??{},target:i,io:t,processors:n});return T(e,s),dt(s,e),ft(s,e)},zo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bo=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=zo[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const p=[...c];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},$o=(e,t,n,r)=>{n.not={}},ko=(e,t,n,r)=>{},So=(e,t,n,r)=>{const o=e._zod.def,i=Re(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Eo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Zo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Oo=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=T(i.element,t,{...r,path:[...r.path,"items"]})},Io=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const l in s)o.properties[l]=T(s[l],t,{...r,path:[...r.path,"properties",l]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{const p=i.shape[l]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=T(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},To=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>T(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},Po=(e,t,n,r)=>{const o=e._zod.def,i=T(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=T(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},Co=(e,t,n,r)=>{const o=e._zod.def,i=T(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Ao=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},jo=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Ro=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},No=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Do=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;T(i,t,r);const s=t.seen.get(e);s.ref=i},Uo=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},ht=(e,t,n,r)=>{const o=e._zod.def;T(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},xo=u("ZodISODateTime",(e,t)=>{Hn.init(e,t),E.init(e,t)});function Mo(e){return Xr(xo,e)}const Lo=u("ZodISODate",(e,t)=>{Yn.init(e,t),E.init(e,t)});function Fo(e){return Qr(Lo,e)}const Vo=u("ZodISOTime",(e,t)=>{Xn.init(e,t),E.init(e,t)});function Jo(e){return eo(Vo,e)}const Ko=u("ZodISODuration",(e,t)=>{Qn.init(e,t),E.init(e,t)});function Wo(e){return to(Ko,e)}const j=u("ZodError",(e,t)=>{Fe.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Wt(e,n)},flatten:{value:n=>Kt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,we,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,we,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),qo=ke(j),Bo=Se(j),Go=se(j),Ho=ie(j),Yo=Gt(j),Xo=Ht(j),Qo=Yt(j),es=Xt(j),ts=Qt(j),ns=en(j),rs=tn(j),os=nn(j),O=u("ZodType",(e,t)=>(Z.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:de(e,"input"),output:de(e,"output")}}),e.toJSONSchema=yo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(D(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>U(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>qo(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Go(e,n,r),e.parseAsync=async(n,r)=>Bo(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Ho(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Yo(e,n,r),e.decode=(n,r)=>Xo(e,n,r),e.encodeAsync=async(n,r)=>Qo(e,n,r),e.decodeAsync=async(n,r)=>es(e,n,r),e.safeEncode=(n,r)=>ts(e,n,r),e.safeDecode=(n,r)=>ns(e,n,r),e.safeEncodeAsync=async(n,r)=>rs(e,n,r),e.safeDecodeAsync=async(n,r)=>os(e,n,r),e.refine=(n,r)=>e.check(Hs(n,r)),e.superRefine=n=>e.check(Ys(n)),e.overwrite=n=>e.check(W(n)),e.optional=()=>wt(e),e.exactOptional=()=>Ds(e),e.nullable=()=>yt(e),e.nullish=()=>wt(yt(e)),e.nonoptional=n=>Vs(e,n),e.array=()=>Zs(e),e.or=n=>Ts([e,n]),e.and=n=>Cs(e,n),e.transform=n=>bt(e,Rs(n)),e.default=n=>Ms(e,n),e.prefault=n=>Fs(e,n),e.catch=n=>Ks(e,n),e.pipe=n=>bt(e,n),e.readonly=()=>Bs(e),e.describe=n=>{const r=e.clone();return X.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return X.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return X.get(e);const r=e.clone();return X.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),pt=u("_ZodString",(e,t)=>{Ee.init(e,t),O.init(e,t),e._zod.processJSONSchema=(r,o,i)=>bo(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(oo(...r)),e.includes=(...r)=>e.check(ao(...r)),e.startsWith=(...r)=>e.check(co(...r)),e.endsWith=(...r)=>e.check(uo(...r)),e.min=(...r)=>e.check(le(...r)),e.max=(...r)=>e.check(ct(...r)),e.length=(...r)=>e.check(ut(...r)),e.nonempty=(...r)=>e.check(le(1,...r)),e.lowercase=r=>e.check(so(r)),e.uppercase=r=>e.check(io(r)),e.trim=()=>e.check(fo()),e.normalize=(...r)=>e.check(lo(...r)),e.toLowerCase=()=>e.check(ho()),e.toUpperCase=()=>e.check(po()),e.slugify=()=>e.check(mo())}),ss=u("ZodString",(e,t)=>{Ee.init(e,t),pt.init(e,t),e.email=n=>e.check(Pr(is,n)),e.url=n=>e.check(Nr(as,n)),e.jwt=n=>e.check(Yr(bs,n)),e.emoji=n=>e.check(Dr(cs,n)),e.guid=n=>e.check(at(mt,n)),e.uuid=n=>e.check(Cr(fe,n)),e.uuidv4=n=>e.check(Ar(fe,n)),e.uuidv6=n=>e.check(jr(fe,n)),e.uuidv7=n=>e.check(Rr(fe,n)),e.nanoid=n=>e.check(Ur(us,n)),e.guid=n=>e.check(at(mt,n)),e.cuid=n=>e.check(xr(ls,n)),e.cuid2=n=>e.check(Mr(ds,n)),e.ulid=n=>e.check(Lr(fs,n)),e.base64=n=>e.check(Br(ws,n)),e.base64url=n=>e.check(Gr(ys,n)),e.xid=n=>e.check(Fr(hs,n)),e.ksuid=n=>e.check(Vr(ps,n)),e.ipv4=n=>e.check(Jr(ms,n)),e.ipv6=n=>e.check(Kr(gs,n)),e.cidrv4=n=>e.check(Wr(_s,n)),e.cidrv6=n=>e.check(qr(vs,n)),e.e164=n=>e.check(Hr(zs,n)),e.datetime=n=>e.check(Mo(n)),e.date=n=>e.check(Fo(n)),e.time=n=>e.check(Jo(n)),e.duration=n=>e.check(Wo(n))});function Oe(e){return Tr(ss,e)}const E=u("ZodStringFormat",(e,t)=>{S.init(e,t),pt.init(e,t)}),is=u("ZodEmail",(e,t)=>{Ln.init(e,t),E.init(e,t)}),mt=u("ZodGUID",(e,t)=>{xn.init(e,t),E.init(e,t)}),fe=u("ZodUUID",(e,t)=>{Mn.init(e,t),E.init(e,t)}),as=u("ZodURL",(e,t)=>{Fn.init(e,t),E.init(e,t)}),cs=u("ZodEmoji",(e,t)=>{Vn.init(e,t),E.init(e,t)}),us=u("ZodNanoID",(e,t)=>{Jn.init(e,t),E.init(e,t)}),ls=u("ZodCUID",(e,t)=>{Kn.init(e,t),E.init(e,t)}),ds=u("ZodCUID2",(e,t)=>{Wn.init(e,t),E.init(e,t)}),fs=u("ZodULID",(e,t)=>{qn.init(e,t),E.init(e,t)}),hs=u("ZodXID",(e,t)=>{Bn.init(e,t),E.init(e,t)}),ps=u("ZodKSUID",(e,t)=>{Gn.init(e,t),E.init(e,t)}),ms=u("ZodIPv4",(e,t)=>{er.init(e,t),E.init(e,t)}),gs=u("ZodIPv6",(e,t)=>{tr.init(e,t),E.init(e,t)}),_s=u("ZodCIDRv4",(e,t)=>{nr.init(e,t),E.init(e,t)}),vs=u("ZodCIDRv6",(e,t)=>{rr.init(e,t),E.init(e,t)}),ws=u("ZodBase64",(e,t)=>{or.init(e,t),E.init(e,t)}),ys=u("ZodBase64URL",(e,t)=>{ir.init(e,t),E.init(e,t)}),zs=u("ZodE164",(e,t)=>{ar.init(e,t),E.init(e,t)}),bs=u("ZodJWT",(e,t)=>{ur.init(e,t),E.init(e,t)}),$s=u("ZodUnknown",(e,t)=>{lr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ko()});function gt(){return no($s)}const ks=u("ZodNever",(e,t)=>{dr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$o(e,n,r)});function Ss(e){return ro(ks,e)}const Es=u("ZodArray",(e,t)=>{fr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Oo(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(le(n,r)),e.nonempty=n=>e.check(le(1,n)),e.max=(n,r)=>e.check(ct(n,r)),e.length=(n,r)=>e.check(ut(n,r)),e.unwrap=()=>e.element});function Zs(e,t){return go(Es,e,t)}const Os=u("ZodObject",(e,t)=>{pr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Io(e,n,r,o),k(e,"shape",()=>t.shape),e.keyof=()=>As(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:gt()}),e.loose=()=>e.clone({...e._zod.def,catchall:gt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ss()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Mt(e,n),e.safeExtend=n=>Lt(e,n),e.merge=n=>Ft(e,n),e.pick=n=>Ut(e,n),e.omit=n=>xt(e,n),e.partial=(...n)=>Vt(vt,e,n[0]),e.required=(...n)=>Jt(zt,e,n[0])});function _t(e,t){const n={type:"object",shape:e??{},...w(t)};return new Os(n)}const Is=u("ZodUnion",(e,t)=>{mr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>To(e,n,r,o),e.options=t.options});function Ts(e,t){return new Is({type:"union",options:e,...w(t)})}const Ps=u("ZodIntersection",(e,t)=>{gr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Po(e,n,r,o)});function Cs(e,t){return new Ps({type:"intersection",left:e,right:t})}const Ie=u("ZodEnum",(e,t)=>{_r.init(e,t),O.init(e,t),e._zod.processJSONSchema=(r,o,i)=>So(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ie({...t,checks:[],...w(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ie({...t,checks:[],...w(o),entries:i})}});function As(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ie({type:"enum",entries:n,...w(t)})}const js=u("ZodTransform",(e,t)=>{vr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ae(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Y(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Y(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function Rs(e){return new js({type:"transform",transform:e})}const vt=u("ZodOptional",(e,t)=>{tt.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ht(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wt(e){return new vt({type:"optional",innerType:e})}const Ns=u("ZodExactOptional",(e,t)=>{wr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ht(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ds(e){return new Ns({type:"optional",innerType:e})}const Us=u("ZodNullable",(e,t)=>{yr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Co(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function yt(e){return new Us({type:"nullable",innerType:e})}const xs=u("ZodDefault",(e,t)=>{zr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ms(e,t){return new xs({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():xe(t)}})}const Ls=u("ZodPrefault",(e,t)=>{br.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ro(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Fs(e,t){return new Ls({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():xe(t)}})}const zt=u("ZodNonOptional",(e,t)=>{$r.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ao(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Vs(e,t){return new zt({type:"nonoptional",innerType:e,...w(t)})}const Js=u("ZodCatch",(e,t)=>{kr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>No(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ks(e,t){return new Js({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ws=u("ZodPipe",(e,t)=>{Sr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Do(e,n,r,o),e.in=t.in,e.out=t.out});function bt(e,t){return new Ws({type:"pipe",in:e,out:t})}const qs=u("ZodReadonly",(e,t)=>{Er.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Bs(e){return new qs({type:"readonly",innerType:e})}const Gs=u("ZodCustom",(e,t)=>{Zr.init(e,t),O.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eo(e,n)});function Hs(e,t={}){return _o(Gs,e,t)}function Ys(e){return vo(e)}const Xs=new Error("request for lock canceled");var Qs=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class ei{constructor(t,n=Xs){this._value=t,this._cancelError=n,this._queue=[],this._weightedWaiters=[]}acquire(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((r,o)=>{const i={resolve:r,reject:o,weight:t,priority:n},s=$t(this._queue,a=>n<=a.priority);s===-1&&t<=this._value?this._dispatchItem(i):this._queue.splice(s+1,0,i)})}runExclusive(t){return Qs(this,arguments,void 0,function*(n,r=1,o=0){const[i,s]=yield this.acquire(r,o);try{return yield n(i)}finally{s()}})}waitForUnlock(t=1,n=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,n)?Promise.resolve():new Promise(r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),ti(this._weightedWaiters[t-1],{resolve:r,priority:n})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach(t=>t.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){const n=this._value;this._value-=t.weight,t.resolve([n,this._newReleaser(t.weight)])}_newReleaser(t){let n=!1;return()=>{n||(n=!0,this.release(t))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let t=this._value;t>0;t--){const n=this._weightedWaiters[t-1];n&&(n.forEach(r=>r.resolve()),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let n=this._value;n>0;n--){const r=this._weightedWaiters[n-1];if(!r)continue;const o=r.findIndex(i=>i.priority<=t);(o===-1?r:r.splice(0,o)).forEach((i=>i.resolve()))}}}_couldLockImmediately(t,n){return(this._queue.length===0||this._queue[0].priorityt.priority<=r.priority);e.splice(n+1,0,t)}function $t(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}var ni=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(g){s(g)}}function c(p){try{l(r.throw(p))}catch(g){s(g)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(e,t||[])).next())})};class ri{constructor(t){this._semaphore=new ei(1,t)}acquire(){return ni(this,arguments,void 0,function*(t=0){const[,n]=yield this._semaphore.acquire(1,t);return n})}runExclusive(t,n=0){return this._semaphore.runExclusive(()=>t(),1,n)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var kt=Object.prototype.hasOwnProperty;function Te(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Te(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(kt.call(e,n)&&++r&&!kt.call(t,n)||!(n in t)||!Te(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const oi=si();function si(){const e={local:he("local"),session:he("session"),sync:he("sync"),managed:he("managed")},t=f=>{const h=e[f];if(h==null){const d=Object.keys(e).join(", ");throw Error(`Invalid area "${f}". Options: ${d}`)}return h},n=f=>{const h=f.indexOf(":"),d=f.substring(0,h),m=f.substring(h+1);if(m==null)throw Error(`Storage key should be in the form of "area:key", but received "${f}"`);return{driverArea:d,driverKey:m,driver:t(d)}},r=f=>f+"$",o=(f,h)=>{const d={...f};return Object.entries(h).forEach(([m,_])=>{_==null?delete d[m]:d[m]=_}),d},i=(f,h)=>f??h??null,s=f=>typeof f=="object"&&!Array.isArray(f)?f:{},a=async(f,h,d)=>i(await f.getItem(h),d?.fallback??d?.defaultValue),c=async(f,h)=>{const d=r(h);return s(await f.getItem(d))},l=async(f,h,d)=>{await f.setItem(h,d??null)},p=async(f,h,d)=>{const m=r(h),_=s(await f.getItem(m));await f.setItem(m,o(_,d))},g=async(f,h,d)=>{if(await f.removeItem(h),d?.removeMeta){const m=r(h);await f.removeItem(m)}},v=async(f,h,d)=>{const m=r(h);if(d==null)await f.removeItem(m);else{const _=s(await f.getItem(m));[d].flat().forEach(z=>delete _[z]),await f.setItem(m,_)}},y=(f,h,d)=>f.watch(h,d);return{getItem:async(f,h)=>{const{driver:d,driverKey:m}=n(f);return await a(d,m,h)},getItems:async f=>{const h=new Map,d=new Map,m=[];f.forEach(z=>{let b,$;typeof z=="string"?b=z:"getValue"in z?(b=z.key,$={fallback:z.fallback}):(b=z.key,$=z.options),m.push(b);const{driverArea:R,driverKey:C}=n(b),A=h.get(R)??[];h.set(R,A.concat(C)),d.set(b,$)});const _=new Map;return await Promise.all(Array.from(h.entries()).map(async([z,b])=>{(await e[z].getItems(b)).forEach($=>{const R=`${z}:${$.key}`,C=d.get(R),A=i($.value,C?.fallback??C?.defaultValue);_.set(R,A)})})),m.map(z=>({key:z,value:_.get(z)}))},getMeta:async f=>{const{driver:h,driverKey:d}=n(f);return await c(h,d)},getMetas:async f=>{const h=f.map(_=>{const z=typeof _=="string"?_:_.key,{driverArea:b,driverKey:$}=n(z);return{key:z,driverArea:b,driverKey:$,driverMetaKey:r($)}}),d=h.reduce((_,z)=>(_[z.driverArea]??=[],_[z.driverArea].push(z),_),{}),m={};return await Promise.all(Object.entries(d).map(async([_,z])=>{const b=await G.storage[_].get(z.map($=>$.driverMetaKey));z.forEach($=>{m[$.key]=b[$.driverMetaKey]??{}})})),h.map(_=>({key:_.key,meta:m[_.key]}))},setItem:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await l(d,m,h)},setItems:async f=>{const h={};f.forEach(d=>{const{driverArea:m,driverKey:_}=n("key"in d?d.key:d.item.key);h[m]??=[],h[m].push({key:_,value:d.value})}),await Promise.all(Object.entries(h).map(async([d,m])=>{await t(d).setItems(m)}))},setMeta:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await p(d,m,h)},setMetas:async f=>{const h={};f.forEach(d=>{const{driverArea:m,driverKey:_}=n("key"in d?d.key:d.item.key);h[m]??=[],h[m].push({key:_,properties:d.meta})}),await Promise.all(Object.entries(h).map(async([d,m])=>{const _=t(d),z=m.map(({key:C})=>r(C)),b=await _.getItems(z),$=Object.fromEntries(b.map(({key:C,value:A})=>[C,s(A)])),R=m.map(({key:C,properties:A})=>{const ge=r(C);return{key:ge,value:o($[ge]??{},A)}});await _.setItems(R)}))},removeItem:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await g(d,m,h)},removeItems:async f=>{const h={};f.forEach(d=>{let m,_;typeof d=="string"?m=d:"getValue"in d?m=d.key:"item"in d?(m=d.item.key,_=d.options):(m=d.key,_=d.options);const{driverArea:z,driverKey:b}=n(m);h[z]??=[],h[z].push(b),_?.removeMeta&&h[z].push(r(b))}),await Promise.all(Object.entries(h).map(async([d,m])=>{await t(d).removeItems(m)}))},clear:async f=>{await t(f).clear()},removeMeta:async(f,h)=>{const{driver:d,driverKey:m}=n(f);await v(d,m,h)},snapshot:async(f,h)=>{const d=await t(f).snapshot();return h?.excludeKeys?.forEach(m=>{delete d[m],delete d[r(m)]}),d},restoreSnapshot:async(f,h)=>{await t(f).restoreSnapshot(h)},watch:(f,h)=>{const{driver:d,driverKey:m}=n(f);return y(d,m,h)},unwatch(){Object.values(e).forEach(f=>{f.unwatch()})},defineItem:(f,h)=>{const{driver:d,driverKey:m}=n(f),{version:_=1,migrations:z={},onMigrationComplete:b,debug:$=!1}=h??{};if(_<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");let R=!1;const C=async()=>{const I=r(m),[{value:x},{value:Q}]=await d.getItems([m,I]);if(R=x==null&&Q?.v==null&&!!_,x==null)return;const q=Q?.v??1;if(q>_)throw Error(`Version downgrade detected (v${q} -> v${_}) for "${f}"`);if(q===_)return;$&&console.debug(`[@wxt-dev/storage] Running storage migration for ${f}: v${q} -> v${_}`);const wi=Array.from({length:_-q},(ve,Ce)=>q+Ce+1);let B=x;for(const ve of wi)try{B=await z?.[ve]?.(B)??B,$&&console.debug(`[@wxt-dev/storage] Storage migration processed for version: v${ve}`)}catch(Ce){throw new ii(f,ve,{cause:Ce})}await d.setItems([{key:m,value:B},{key:I,value:{...Q,v:_}}]),$&&console.debug(`[@wxt-dev/storage] Storage migration completed for ${f} v${_}`,{migratedValue:B}),b?.(B,_)},A=h?.migrations==null?Promise.resolve():C().catch(I=>{console.error(`[@wxt-dev/storage] Migration failed for ${f}`,I)}),ge=new ri,_e=()=>h?.fallback??h?.defaultValue??null,Ct=()=>ge.runExclusive(async()=>{const I=await d.getItem(m);if(I!=null||h?.init==null)return I;const x=await h.init();return await d.setItem(m,x),I==null&&_>1&&await p(d,m,{v:_}),x});return A.then(Ct),{key:f,get defaultValue(){return _e()},get fallback(){return _e()},getValue:async()=>(await A,h?.init?await Ct():await a(d,m,h)),getMeta:async()=>(await A,await c(d,m)),setValue:async I=>{await A,R?(R=!1,await Promise.all([l(d,m,I),p(d,m,{v:_})])):await l(d,m,I)},setMeta:async I=>(await A,await p(d,m,I)),removeValue:async I=>(await A,await g(d,m,I)),removeMeta:async I=>(await A,await v(d,m,I)),watch:I=>y(d,m,(x,Q)=>I(x??_e(),Q??_e())),migrate:C}}}}function he(e){const t=()=>{if(G.runtime==null)throw Error(`'wxt/storage' must be loaded in a web extension environment - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371 - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html -`);if(H.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=H.storage[e];if(r==null)throw Error(`"browser.storage.${e}" is undefined`);return r},n=new Set;return{getItem:async r=>(await t().get(r))[r],getItems:async r=>{const o=await t().get(r);return r.map(i=>({key:i,value:o[i]??null}))},setItem:async(r,o)=>{o==null?await t().remove(r):await t().set({[r]:o})},setItems:async r=>{const o=r.reduce((i,{key:s,value:a})=>(i[s]=a,i),{});await t().set(o)},removeItem:async r=>{await t().remove(r)},removeItems:async r=>{await t().remove(r)},clear:async()=>{await t().clear()},snapshot:async()=>await t().get(),restoreSnapshot:async r=>{await t().set(r)},watch(r,o){const i=s=>{const a=s[r];a==null||Ie(a.newValue,a.oldValue)||o(a.newValue??null,a.oldValue??null)};return t().onChanged.addListener(i),n.add(i),()=>{t().onChanged.removeListener(i),n.delete(i)}},unwatch(){n.forEach(r=>{t().onChanged.removeListener(r)}),n.clear()}}}var si=class extends Error{constructor(e,t,n){super(`v${t} migration failed for "${e}"`,n),this.key=e,this.version=t}};gt({sessionARN:Ze(),hexColor:Ze()});const ii="sync:colorSettings";async function kt(){return await ri.getItem(ii)}var F=(e=>(e.getSessionARN="getSessionARN",e.changeColor="changeColor",e))(F||{});const St="*://*.signin.aws.amazon.com/*";function ai(){return["*://*.console.aws.amazon.com/*",St]}function ci(e,t){return new RegExp(e.replaceAll("*",".*")).exec(t)!==null}function Et(e,t,n){n.style.display="flex",n.style.justifyContent="space-between",e.title=`The color of ${t.sessionARN}`,e.style.backgroundColor=t.hexColor,e.style.width=`${n.clientHeight}px`}async function Zt(){const e=await kt();if(e===null)return!1;const t=document.querySelectorAll("div[class^='awsui_restore-pointer-events']");if(t.length===0)return!1;for(const n of t){const r=["span","a"].flatMap(p=>Array.from(n.getElementsByTagName(p))).map(({textContent:p})=>p).find(p=>p!==null);if(r===void 0)continue;const o=n.querySelector("p[class^='session-card_session_card_username']");if(o===null)continue;const i=o.textContent;if(i===null)continue;const s=e.find(({sessionARN:p})=>{const g=r.replaceAll("-","").replace("(","").replace(")","");return p.includes(`:${g}:`)&&p.endsWith(`/${i.trim()}`)}),a="aws-console-colorize-color-element",c=n.getElementsByClassName(a).item(0);if(c instanceof HTMLDivElement){if(s===void 0){c.remove();continue}Et(c,s,n);continue}if(s===void 0)continue;const l=document.createElement("div");l.className=a,Et(l,s,n),n.appendChild(l)}return!0}async function Ot(){if(await Zt())return;const e="__next",t=document.getElementById(e);if(t===null)throw new Error(`Can't get ${e}`);new MutationObserver(async(n,r)=>{await Zt()&&r.disconnect()}).observe(t,{childList:!0,subtree:!0})}function ui(e){switch(e){case F.getSessionARN:return;case F.changeColor:Ot();return;default:throw new Error(`Incorrect message ${e}`)}}function It(e,t){const n=t();return n===null?!1:(n.style.backgroundColor=e,!0)}async function Tt(e){const r=(await kt())?.find(i=>i.sessionARN===e)?.hexColor??"",o=[{getElement:()=>document.querySelector("#consoleNavHeader #awsc-nav-header > nav"),mutationObserveTargetID:"consoleNavHeader"},{getElement:()=>document.getElementById("console-nav-footer-inner"),mutationObserveTargetID:"console-nav-footer"}];for(const i of o){if(It(r,i.getElement))continue;const s=document.getElementById(i.mutationObserveTargetID);if(s===null)throw new Error(`Can't get ${i.mutationObserveTargetID}`);new MutationObserver((a,c)=>{It(r,i.getElement)&&c.disconnect()}).observe(s,{childList:!0})}}function li(e,t,n){switch(t){case F.getSessionARN:return n(e),!0;case F.changeColor:Tt(e);return;default:throw new Error(`Incorrect message ${t}`)}}async function di(){const e=document.documentURI.startsWith("file://")&&document.documentURI.endsWith("tests/e2e/html/sessions/selector.html");if(ci(St,document.documentURI)||e){if(!document.documentURI.includes(".signin.aws.amazon.com/sessions/selector")&&!e)return;te.runtime.onMessage.addListener(r=>ui(F[r])),await Ot();return}const t=document.querySelector('meta[name="awsc-session-data"]');if(!(t instanceof HTMLMetaElement))throw new Error("Can't get awsc-session-data");const n=gt({sessionARN:Ze()}).parse(JSON.parse(t.content)).sessionARN;te.runtime.onMessage.addListener((r,o,i)=>li(n,F[r],i)),await Tt(n)}const fi={matches:ai(),main:di};function pe(e,...t){}const hi={debug:(...e)=>pe(console.debug,...e),log:(...e)=>pe(console.log,...e),warn:(...e)=>pe(console.warn,...e),error:(...e)=>pe(console.error,...e)};var pi=class Ct extends Event{static EVENT_NAME=Te("wxt:locationchange");constructor(t,n){super(Ct.EVENT_NAME,{}),this.newUrl=t,this.oldUrl=n}};function Te(e){return`${te?.runtime?.id}:content:${e}`}function mi(e){let t,n;return{run(){t==null&&(n=new URL(location.href),t=e.setInterval(()=>{let r=new URL(location.href);r.href!==n.href&&(window.dispatchEvent(new pi(r,n)),n=r)},1e3))}}}var gi=class ee{static SCRIPT_STARTED_MESSAGE_TYPE=Te("wxt:content-script-started");id;abortController;locationWatcher=mi(this);constructor(t,n){this.contentScriptName=t,this.options=n,this.id=Math.random().toString(36).slice(2),this.abortController=new AbortController,this.stopOldScripts(),this.listenForNewerScripts()}get signal(){return this.abortController.signal}abort(t){return this.abortController.abort(t)}get isInvalid(){return te.runtime?.id==null&&this.notifyInvalidated(),this.signal.aborted}get isValid(){return!this.isInvalid}onInvalidated(t){return this.signal.addEventListener("abort",t),()=>this.signal.removeEventListener("abort",t)}block(){return new Promise(()=>{})}setInterval(t,n){const r=setInterval(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearInterval(r)),r}setTimeout(t,n){const r=setTimeout(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearTimeout(r)),r}requestAnimationFrame(t){const n=requestAnimationFrame((...r)=>{this.isValid&&t(...r)});return this.onInvalidated(()=>cancelAnimationFrame(n)),n}requestIdleCallback(t,n){const r=requestIdleCallback((...o)=>{this.signal.aborted||t(...o)},n);return this.onInvalidated(()=>cancelIdleCallback(r)),r}addEventListener(t,n,r,o){n==="wxt:locationchange"&&this.isValid&&this.locationWatcher.run(),t.addEventListener?.(n.startsWith("wxt:")?Te(n):n,r,{...o,signal:this.signal})}notifyInvalidated(){this.abort("Content script context invalidated"),hi.debug(`Content script "${this.contentScriptName}" context invalidated`)}stopOldScripts(){document.dispatchEvent(new CustomEvent(ee.SCRIPT_STARTED_MESSAGE_TYPE,{detail:{contentScriptName:this.contentScriptName,messageId:this.id}})),window.postMessage({type:ee.SCRIPT_STARTED_MESSAGE_TYPE,contentScriptName:this.contentScriptName,messageId:this.id},"*")}verifyScriptStartedEvent(t){const n=t.detail?.contentScriptName===this.contentScriptName,r=t.detail?.messageId===this.id;return n&&!r}listenForNewerScripts(){const t=n=>{!(n instanceof CustomEvent)||!this.verifyScriptStartedEvent(n)||this.notifyInvalidated()};document.addEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t),this.onInvalidated(()=>document.removeEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t))}};function zi(){}function me(e,...t){}const _i={debug:(...e)=>me(console.debug,...e),log:(...e)=>me(console.log,...e),warn:(...e)=>me(console.warn,...e),error:(...e)=>me(console.error,...e)};return(async()=>{try{const{main:e,...t}=fi;return await e(new gi("content",t))}catch(e){throw _i.error('The content script "content" crashed on startup!',e),e}})()})(); +`);if(G.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=G.storage[e];if(r==null)throw Error(`"browser.storage.${e}" is undefined`);return r},n=new Set;return{getItem:async r=>(await t().get(r))[r],getItems:async r=>{const o=await t().get(r);return r.map(i=>({key:i,value:o[i]??null}))},setItem:async(r,o)=>{o==null?await t().remove(r):await t().set({[r]:o})},setItems:async r=>{const o=r.reduce((i,{key:s,value:a})=>(i[s]=a,i),{});await t().set(o)},removeItem:async r=>{await t().remove(r)},removeItems:async r=>{await t().remove(r)},clear:async()=>{await t().clear()},snapshot:async()=>await t().get(),restoreSnapshot:async r=>{await t().set(r)},watch(r,o){const i=s=>{const a=s[r];a==null||Te(a.newValue,a.oldValue)||o(a.newValue??null,a.oldValue??null)};return t().onChanged.addListener(i),n.add(i),()=>{t().onChanged.removeListener(i),n.delete(i)}},unwatch(){n.forEach(r=>{t().onChanged.removeListener(r)}),n.clear()}}}var ii=class extends Error{constructor(e,t,n){super(`v${t} migration failed for "${e}"`,n),this.key=e,this.version=t}};_t({sessionARN:Oe(),hexColor:Oe()});const ai="sync:colorSettings";async function St(){return await oi.getItem(ai)}var V=(e=>(e.getSessionARN="getSessionARN",e.changeColor="changeColor",e))(V||{});const Et="*://*.signin.aws.amazon.com/*";function ci(){return["*://*.console.aws.amazon.com/*",Et]}function ui(e,t){return new RegExp(e.replaceAll("*",".*")).exec(t)!==null}function Zt(e,t,n){n.style.display="flex",n.style.justifyContent="space-between",e.title=`The color of ${t.sessionARN}`,e.style.backgroundColor=t.hexColor,e.style.width=`${n.clientHeight}px`}async function Ot(){const e=await St();if(e===null)return!1;const t=document.querySelectorAll("div[class^='awsui_restore-pointer-events']");if(t.length===0)return!1;for(const n of t){const r=["span","a"].flatMap(p=>Array.from(n.getElementsByTagName(p))).map(({textContent:p})=>p).find(p=>p!==null);if(r===void 0)continue;const o=n.querySelector("p[class^='session-card_session_card_username']");if(o===null)continue;const i=o.textContent;if(i===null)continue;const s=e.find(({sessionARN:p})=>{const g=r.replaceAll("-","").replace("(","").replace(")","");return p.includes(`:${g}:`)&&p.endsWith(`/${i.trim()}`)}),a="aws-console-colorize-color-element",c=n.getElementsByClassName(a).item(0);if(c instanceof HTMLDivElement){if(s===void 0){c.remove();continue}Zt(c,s,n);continue}if(s===void 0)continue;const l=document.createElement("div");l.className=a,Zt(l,s,n),n.appendChild(l)}return!0}async function It(){if(await Ot())return;const e="__next",t=document.getElementById(e);if(t===null)throw new Error(`Can't get ${e}`);new MutationObserver(async(n,r)=>{await Ot()&&r.disconnect()}).observe(t,{childList:!0,subtree:!0})}function li(e){switch(e){case V.getSessionARN:return;case V.changeColor:It();return;default:throw new Error(`Incorrect message ${e}`)}}function Tt(e,t){const n=t();return n===null?!1:(n.style.backgroundColor=e,!0)}async function Pt(e){const r=(await St())?.find(i=>i.sessionARN===e)?.hexColor??"",o=[{getElement:()=>document.querySelector("#consoleNavHeader #awsc-nav-header > nav"),mutationObserveTargetID:"consoleNavHeader"},{getElement:()=>document.getElementById("console-nav-footer-inner"),mutationObserveTargetID:"console-nav-footer"}];for(const i of o){if(Tt(r,i.getElement))continue;const s=document.getElementById(i.mutationObserveTargetID);if(s===null)throw new Error(`Can't get ${i.mutationObserveTargetID}`);new MutationObserver((a,c)=>{Tt(r,i.getElement)&&c.disconnect()}).observe(s,{childList:!0})}}function di(e,t,n){switch(t){case V.getSessionARN:return n(e),!0;case V.changeColor:Pt(e);return;default:throw new Error(`Incorrect message ${t}`)}}async function fi(){const e=document.documentURI.startsWith("file://")&&document.documentURI.endsWith("tests/e2e/html/sessions/selector.html");if(ui(Et,document.documentURI)||e){if(!document.documentURI.includes(".signin.aws.amazon.com/sessions/selector")&&!e)return;te.runtime.onMessage.addListener(r=>li(V[r])),await It();return}const t=document.querySelector('meta[name="awsc-session-data"]');if(!(t instanceof HTMLMetaElement))throw new Error("Can't get awsc-session-data");const n=_t({sessionARN:Oe()}).parse(JSON.parse(t.content)).sessionARN;te.runtime.onMessage.addListener((r,o,i)=>di(n,V[r],i)),await Pt(n)}const hi={matches:ci(),main:fi};function pe(e,...t){}const pi={debug:(...e)=>pe(console.debug,...e),log:(...e)=>pe(console.log,...e),warn:(...e)=>pe(console.warn,...e),error:(...e)=>pe(console.error,...e)};var mi=class At extends Event{static EVENT_NAME=Pe("wxt:locationchange");constructor(t,n){super(At.EVENT_NAME,{}),this.newUrl=t,this.oldUrl=n}};function Pe(e){return`${te?.runtime?.id}:content:${e}`}function gi(e){let t,n;return{run(){t==null&&(n=new URL(location.href),t=e.setInterval(()=>{let r=new URL(location.href);r.href!==n.href&&(window.dispatchEvent(new mi(r,n)),n=r)},1e3))}}}var _i=class ee{static SCRIPT_STARTED_MESSAGE_TYPE=Pe("wxt:content-script-started");id;abortController;locationWatcher=gi(this);constructor(t,n){this.contentScriptName=t,this.options=n,this.id=Math.random().toString(36).slice(2),this.abortController=new AbortController,this.stopOldScripts(),this.listenForNewerScripts()}get signal(){return this.abortController.signal}abort(t){return this.abortController.abort(t)}get isInvalid(){return te.runtime?.id==null&&this.notifyInvalidated(),this.signal.aborted}get isValid(){return!this.isInvalid}onInvalidated(t){return this.signal.addEventListener("abort",t),()=>this.signal.removeEventListener("abort",t)}block(){return new Promise(()=>{})}setInterval(t,n){const r=setInterval(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearInterval(r)),r}setTimeout(t,n){const r=setTimeout(()=>{this.isValid&&t()},n);return this.onInvalidated(()=>clearTimeout(r)),r}requestAnimationFrame(t){const n=requestAnimationFrame((...r)=>{this.isValid&&t(...r)});return this.onInvalidated(()=>cancelAnimationFrame(n)),n}requestIdleCallback(t,n){const r=requestIdleCallback((...o)=>{this.signal.aborted||t(...o)},n);return this.onInvalidated(()=>cancelIdleCallback(r)),r}addEventListener(t,n,r,o){n==="wxt:locationchange"&&this.isValid&&this.locationWatcher.run(),t.addEventListener?.(n.startsWith("wxt:")?Pe(n):n,r,{...o,signal:this.signal})}notifyInvalidated(){this.abort("Content script context invalidated"),pi.debug(`Content script "${this.contentScriptName}" context invalidated`)}stopOldScripts(){document.dispatchEvent(new CustomEvent(ee.SCRIPT_STARTED_MESSAGE_TYPE,{detail:{contentScriptName:this.contentScriptName,messageId:this.id}})),window.postMessage({type:ee.SCRIPT_STARTED_MESSAGE_TYPE,contentScriptName:this.contentScriptName,messageId:this.id},"*")}verifyScriptStartedEvent(t){const n=t.detail?.contentScriptName===this.contentScriptName,r=t.detail?.messageId===this.id;return n&&!r}listenForNewerScripts(){const t=n=>{!(n instanceof CustomEvent)||!this.verifyScriptStartedEvent(n)||this.notifyInvalidated()};document.addEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t),this.onInvalidated(()=>document.removeEventListener(ee.SCRIPT_STARTED_MESSAGE_TYPE,t))}};function bi(){}function me(e,...t){}const vi={debug:(...e)=>me(console.debug,...e),log:(...e)=>me(console.log,...e),warn:(...e)=>me(console.warn,...e),error:(...e)=>me(console.error,...e)};return(async()=>{try{const{main:e,...t}=hi;return await e(new _i("content",t))}catch(e){throw vi.error('The content script "content" crashed on startup!',e),e}})()})(); content; \ No newline at end of file diff --git a/dist/firefox-mv2/options.html b/dist/firefox-mv2/options.html index ee40d85..4cacacd 100644 --- a/dist/firefox-mv2/options.html +++ b/dist/firefox-mv2/options.html @@ -5,7 +5,7 @@ AWS management console colorize - + diff --git a/dist/firefox-mv2/popup.html b/dist/firefox-mv2/popup.html index 78a069a..6a2518a 100644 --- a/dist/firefox-mv2/popup.html +++ b/dist/firefox-mv2/popup.html @@ -5,7 +5,7 @@ AWS management console colorize - +