diff --git a/README.md b/README.md index 5f318c95..e6c92f95 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ go run main.go serve | 腾讯云 | √ | √ | 可签发在腾讯云注册的域名;可部署到腾讯云 CDN | | 华为云 | √ | | 可签发在华为云注册的域名 | | 七牛云 | | √ | 可部署到七牛云 CDN | +| AWS | √ | | 可签发在 AWS Route53 托管的域名 | | CloudFlare | √ | | 可签发在 CloudFlare 注册的域名;CloudFlare 服务自带 SSL 证书 | | GoDaddy | √ | | 可签发在 GoDaddy 注册的域名 | | Namesilo | √ | | 可签发在 Namesilo 注册的域名 | diff --git a/README_EN.md b/README_EN.md index 0e696bbd..3e3e3f6b 100644 --- a/README_EN.md +++ b/README_EN.md @@ -77,6 +77,7 @@ password:1234567890 | Tencent Cloud | √ | √ | Supports domains registered on Tencent Cloud; supports deployment to Tencent Cloud CDN | | Huawei Cloud | √ | | Supports domains registered on Huawei Cloud | | Qiniu Cloud | | √ | Supports deployment to Qiniu Cloud CDN | +| AWS | √ | | Supports domains managed on AWS Route53 | | CloudFlare | √ | | Supports domains registered on CloudFlare; CloudFlare services come with SSL certificates | | GoDaddy | √ | | Supports domains registered on GoDaddy | | Namesilo | √ | | Supports domains registered on Namesilo | diff --git a/go.mod b/go.mod index 4fcd5af2..f2a9dd28 100644 --- a/go.mod +++ b/go.mod @@ -29,6 +29,7 @@ require ( github.com/alibabacloud-go/tea-fileform v1.1.1 // indirect github.com/alibabacloud-go/tea-oss-sdk v1.1.3 // indirect github.com/alibabacloud-go/tea-oss-utils v1.1.0 // indirect + github.com/aws/aws-sdk-go-v2/service/route53 v1.43.2 // indirect github.com/blinkbean/dingtalk v1.1.3 // indirect github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.114 // indirect diff --git a/go.sum b/go.sum index 71279e5c..e47f4b50 100644 --- a/go.sum +++ b/go.sum @@ -117,6 +117,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsd github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17 h1:u+EfGmksnJc/x5tq3A+OD7LrMbSSR/5TrKLvkdy/fhY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17/go.mod h1:VaMx6302JHax2vHJWgRo+5n9zvbacs3bLU/23DNQrTY= +github.com/aws/aws-sdk-go-v2/service/route53 v1.43.2 h1:957e1/SwXIfPi/0OUJkH9YnPZRe9G6Kisd/xUhF7AUE= +github.com/aws/aws-sdk-go-v2/service/route53 v1.43.2/go.mod h1:343vcjcyOTuHTBBgUrOxPM36/jE96qLZnGL447ldrB0= github.com/aws/aws-sdk-go-v2/service/s3 v1.61.2 h1:Kp6PWAlXwP1UvIflkIP6MFZYBNDCa4mFCGtxrpICVOg= github.com/aws/aws-sdk-go-v2/service/s3 v1.61.2/go.mod h1:5FmD/Dqq57gP+XwaUnd5WFPipAuzrf0HmupX27Gvjvc= github.com/aws/aws-sdk-go-v2/service/sso v1.22.7 h1:pIaGg+08llrP7Q5aiz9ICWbY8cqhTkyy+0SHvfzQpTc= diff --git a/internal/applicant/applicant.go b/internal/applicant/applicant.go index 13c4a790..c941a13c 100644 --- a/internal/applicant/applicant.go +++ b/internal/applicant/applicant.go @@ -1,6 +1,8 @@ package applicant import ( + "certimate/internal/domain" + "certimate/internal/utils/app" "crypto" "crypto/ecdsa" "crypto/elliptic" @@ -16,15 +18,13 @@ import ( "github.com/go-acme/lego/v4/lego" "github.com/go-acme/lego/v4/registration" "github.com/pocketbase/pocketbase/models" - - "certimate/internal/domain" - "certimate/internal/utils/app" ) const ( configTypeAliyun = "aliyun" configTypeTencent = "tencent" configTypeHuaweicloud = "huaweicloud" + configTypeAws = "aws" configTypeCloudflare = "cloudflare" configTypeNamesilo = "namesilo" configTypeGodaddy = "godaddy" @@ -127,6 +127,8 @@ func Get(record *models.Record) (Applicant, error) { return NewTencent(option), nil case configTypeHuaweicloud: return NewHuaweiCloud(option), nil + case configTypeAws: + return NewAws(option), nil case configTypeCloudflare: return NewCloudflare(option), nil case configTypeNamesilo: diff --git a/internal/applicant/aws.go b/internal/applicant/aws.go new file mode 100644 index 00000000..154eb996 --- /dev/null +++ b/internal/applicant/aws.go @@ -0,0 +1,38 @@ +package applicant + +import ( + "certimate/internal/domain" + "encoding/json" + "fmt" + "os" + + "github.com/go-acme/lego/v4/providers/dns/route53" +) + +type aws struct { + option *ApplyOption +} + +func NewAws(option *ApplyOption) Applicant { + return &aws{ + option: option, + } +} + +func (t *aws) Apply() (*Certificate, error) { + access := &domain.AwsAccess{} + json.Unmarshal([]byte(t.option.Access), access) + + os.Setenv("AWS_REGION", access.Region) + os.Setenv("AWS_ACCESS_KEY_ID", access.AccessKeyId) + os.Setenv("AWS_SECRET_ACCESS_KEY", access.SecretAccessKey) + os.Setenv("AWS_HOSTED_ZONE_ID", access.HostedZoneId) + os.Setenv("AWS_PROPAGATION_TIMEOUT", fmt.Sprintf("%d", t.option.Timeout)) + + dnsProvider, err := route53.NewDNSProvider() + if err != nil { + return nil, err + } + + return apply(t.option, dnsProvider) +} diff --git a/internal/domain/access.go b/internal/domain/access.go index ca1df988..970dd922 100644 --- a/internal/domain/access.go +++ b/internal/domain/access.go @@ -16,6 +16,13 @@ type HuaweiCloudAccess struct { SecretAccessKey string `json:"secretAccessKey"` } +type AwsAccess struct { + Region string `json:"region"` + AccessKeyId string `json:"accessKeyId"` + SecretAccessKey string `json:"secretAccessKey"` + HostedZoneId string `json:"hostedZoneId"` +} + type CloudflareAccess struct { DnsApiToken string `json:"dnsApiToken"` } diff --git a/migrations/1729160433_updated_access.go b/migrations/1729160433_updated_access.go new file mode 100644 index 00000000..22290d79 --- /dev/null +++ b/migrations/1729160433_updated_access.go @@ -0,0 +1,93 @@ +package migrations + +import ( + "encoding/json" + + "github.com/pocketbase/dbx" + "github.com/pocketbase/pocketbase/daos" + m "github.com/pocketbase/pocketbase/migrations" + "github.com/pocketbase/pocketbase/models/schema" +) + +func init() { + m.Register(func(db dbx.Builder) error { + dao := daos.New(db); + + collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") + if err != nil { + return err + } + + // update + edit_configType := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "hwy7m03o", + "name": "configType", + "type": "select", + "required": false, + "presentable": false, + "unique": false, + "options": { + "maxSelect": 1, + "values": [ + "aliyun", + "tencent", + "huaweicloud", + "qiniu", + "aws", + "cloudflare", + "namesilo", + "godaddy", + "local", + "ssh", + "webhook" + ] + } + }`), edit_configType); err != nil { + return err + } + collection.Schema.AddField(edit_configType) + + return dao.SaveCollection(collection) + }, func(db dbx.Builder) error { + dao := daos.New(db); + + collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") + if err != nil { + return err + } + + // update + edit_configType := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "hwy7m03o", + "name": "configType", + "type": "select", + "required": false, + "presentable": false, + "unique": false, + "options": { + "maxSelect": 1, + "values": [ + "aliyun", + "tencent", + "huaweicloud", + "qiniu", + "cloudflare", + "namesilo", + "godaddy", + "local", + "ssh", + "webhook" + ] + } + }`), edit_configType); err != nil { + return err + } + collection.Schema.AddField(edit_configType) + + return dao.SaveCollection(collection) + }) +} diff --git a/ui/dist/assets/index-BTjl7ZFn.js b/ui/dist/assets/index-BTjl7ZFn.js deleted file mode 100644 index cb380b99..00000000 --- a/ui/dist/assets/index-BTjl7ZFn.js +++ /dev/null @@ -1,329 +0,0 @@ -var yP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YH=yP((i9,Ed)=>{function v1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var x1={exports:{}},Vf={},w1={exports:{}},nt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Gc=Symbol.for("react.element"),vP=Symbol.for("react.portal"),xP=Symbol.for("react.fragment"),wP=Symbol.for("react.strict_mode"),bP=Symbol.for("react.profiler"),_P=Symbol.for("react.provider"),SP=Symbol.for("react.context"),kP=Symbol.for("react.forward_ref"),CP=Symbol.for("react.suspense"),jP=Symbol.for("react.memo"),EP=Symbol.for("react.lazy"),u0=Symbol.iterator;function NP(e){return e===null||typeof e!="object"?null:(e=u0&&e[u0]||e["@@iterator"],typeof e=="function"?e:null)}var b1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_1=Object.assign,S1={};function Ka(e,t,n){this.props=e,this.context=t,this.refs=S1,this.updater=n||b1}Ka.prototype.isReactComponent={};Ka.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ka.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function k1(){}k1.prototype=Ka.prototype;function sy(e,t,n){this.props=e,this.context=t,this.refs=S1,this.updater=n||b1}var oy=sy.prototype=new k1;oy.constructor=sy;_1(oy,Ka.prototype);oy.isPureReactComponent=!0;var d0=Array.isArray,C1=Object.prototype.hasOwnProperty,iy={current:null},j1={key:!0,ref:!0,__self:!0,__source:!0};function E1(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)C1.call(t,r)&&!j1.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Gc,type:e,key:o,ref:i,props:s,_owner:iy.current}}function TP(e,t){return{$$typeof:Gc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ay(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gc}function PP(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var f0=/\/+/g;function hm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?PP(""+e.key):t.toString(36)}function sd(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Gc:case vP:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+hm(i,0):r,d0(s)?(n="",e!=null&&(n=e.replace(f0,"$&/")+"/"),sd(s,t,n,"",function(u){return u})):s!=null&&(ay(s)&&(s=TP(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(f0,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",d0(e))for(var a=0;a<e.length;a++){o=e[a];var c=r+hm(o,a);i+=sd(o,t,n,c,s)}else if(c=NP(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=r+hm(o,a++),i+=sd(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ju(e,t,n){if(e==null)return e;var r=[],s=0;return sd(e,r,"","",function(o){return t.call(n,o,s++)}),r}function RP(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Cn={current:null},od={transition:null},AP={ReactCurrentDispatcher:Cn,ReactCurrentBatchConfig:od,ReactCurrentOwner:iy};function N1(){throw Error("act(...) is not supported in production builds of React.")}nt.Children={map:ju,forEach:function(e,t,n){ju(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ju(e,function(){t++}),t},toArray:function(e){return ju(e,function(t){return t})||[]},only:function(e){if(!ay(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};nt.Component=Ka;nt.Fragment=xP;nt.Profiler=bP;nt.PureComponent=sy;nt.StrictMode=wP;nt.Suspense=CP;nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AP;nt.act=N1;nt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=_1({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=iy.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)C1.call(t,c)&&!j1.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Gc,type:e.type,key:s,ref:o,props:r,_owner:i}};nt.createContext=function(e){return e={$$typeof:SP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_P,_context:e},e.Consumer=e};nt.createElement=E1;nt.createFactory=function(e){var t=E1.bind(null,e);return t.type=e,t};nt.createRef=function(){return{current:null}};nt.forwardRef=function(e){return{$$typeof:kP,render:e}};nt.isValidElement=ay;nt.lazy=function(e){return{$$typeof:EP,_payload:{_status:-1,_result:e},_init:RP}};nt.memo=function(e,t){return{$$typeof:jP,type:e,compare:t===void 0?null:t}};nt.startTransition=function(e){var t=od.transition;od.transition={};try{e()}finally{od.transition=t}};nt.unstable_act=N1;nt.useCallback=function(e,t){return Cn.current.useCallback(e,t)};nt.useContext=function(e){return Cn.current.useContext(e)};nt.useDebugValue=function(){};nt.useDeferredValue=function(e){return Cn.current.useDeferredValue(e)};nt.useEffect=function(e,t){return Cn.current.useEffect(e,t)};nt.useId=function(){return Cn.current.useId()};nt.useImperativeHandle=function(e,t,n){return Cn.current.useImperativeHandle(e,t,n)};nt.useInsertionEffect=function(e,t){return Cn.current.useInsertionEffect(e,t)};nt.useLayoutEffect=function(e,t){return Cn.current.useLayoutEffect(e,t)};nt.useMemo=function(e,t){return Cn.current.useMemo(e,t)};nt.useReducer=function(e,t,n){return Cn.current.useReducer(e,t,n)};nt.useRef=function(e){return Cn.current.useRef(e)};nt.useState=function(e){return Cn.current.useState(e)};nt.useSyncExternalStore=function(e,t,n){return Cn.current.useSyncExternalStore(e,t,n)};nt.useTransition=function(){return Cn.current.useTransition()};nt.version="18.3.1";w1.exports=nt;var y=w1.exports;const We=Uf(y),T1=v1({__proto__:null,default:We},[y]);/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var DP=y,OP=Symbol.for("react.element"),IP=Symbol.for("react.fragment"),MP=Object.prototype.hasOwnProperty,LP=DP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zP={key:!0,ref:!0,__self:!0,__source:!0};function P1(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)MP.call(t,r)&&!zP.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:OP,type:e,key:o,ref:i,props:s,_owner:LP.current}}Vf.Fragment=IP;Vf.jsx=P1;Vf.jsxs=P1;x1.exports=Vf;var l=x1.exports,vp={},R1={exports:{}},Qn={},A1={exports:{}},D1={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(e){function t(W,I){var X=W.length;W.push(I);e:for(;0<X;){var $=X-1>>>1,B=W[$];if(0<s(B,I))W[$]=I,W[X]=B,X=$;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var I=W[0],X=W.pop();if(X!==I){W[0]=X;e:for(var $=0,B=W.length,he=B>>>1;$<he;){var se=2*($+1)-1,oe=W[se],Oe=se+1,me=W[Oe];if(0>s(oe,X))Oe<B&&0>s(me,oe)?(W[$]=me,W[Oe]=X,$=Oe):(W[$]=oe,W[se]=X,$=se);else if(Oe<B&&0>s(me,X))W[$]=me,W[Oe]=X,$=Oe;else break e}}return I}function s(W,I){var X=W.sortIndex-I.sortIndex;return X!==0?X:W.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var c=[],u=[],d=1,f=null,h=3,m=!1,x=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=W)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(W){if(p=!1,b(W),!x)if(n(c)!==null)x=!0,J(C);else{var I=n(u);I!==null&&F(_,I.startTime-W)}}function C(W,I){x=!1,p&&(p=!1,g(R),R=-1),m=!0;var X=h;try{for(b(I),f=n(c);f!==null&&(!(f.expirationTime>I)||W&&!G());){var $=f.callback;if(typeof $=="function"){f.callback=null,h=f.priorityLevel;var B=$(f.expirationTime<=I);I=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(I)}else r(c);f=n(c)}if(f!==null)var he=!0;else{var se=n(u);se!==null&&F(_,se.startTime-I),he=!1}return he}finally{f=null,h=X,m=!1}}var j=!1,T=null,R=-1,A=5,O=-1;function G(){return!(e.unstable_now()-O<A)}function N(){if(T!==null){var W=e.unstable_now();O=W;var I=!0;try{I=T(!0,W)}finally{I?z():(j=!1,T=null)}}else j=!1}var z;if(typeof v=="function")z=function(){v(N)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,U=S.port2;S.port1.onmessage=N,z=function(){U.postMessage(null)}}else z=function(){w(N,0)};function J(W){T=W,j||(j=!0,z())}function F(W,I){R=w(function(){W(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){x||m||(x=!0,J(C))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(W){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var X=h;h=I;try{return W()}finally{h=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,I){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=h;h=W;try{return I()}finally{h=X}},e.unstable_scheduleCallback=function(W,I,X){var $=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?$+X:$):X=$,W){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=X+B,W={id:d++,callback:I,priorityLevel:W,startTime:X,expirationTime:B,sortIndex:-1},X>$?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(p?(g(R),R=-1):p=!0,F(_,X-$))):(W.sortIndex=B,t(c,W),x||m||(x=!0,J(C))),W},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(W){var I=h;return function(){var X=h;h=I;try{return W.apply(this,arguments)}finally{h=X}}}})(D1);A1.exports=D1;var FP=A1.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var $P=y,Gn=FP;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var O1=new Set,rc={};function Si(e,t){Ta(e,t),Ta(e+"Capture",t)}function Ta(e,t){for(rc[e]=t,e=0;e<t.length;e++)O1.add(t[e])}var Ds=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xp=Object.prototype.hasOwnProperty,UP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h0={},m0={};function VP(e){return xp.call(m0,e)?!0:xp.call(h0,e)?!1:UP.test(e)?m0[e]=!0:(h0[e]=!0,!1)}function BP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function WP(e,t,n,r){if(t===null||typeof t>"u"||BP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var sn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){sn[e]=new jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];sn[t]=new jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){sn[e]=new jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){sn[e]=new jn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){sn[e]=new jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){sn[e]=new jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){sn[e]=new jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){sn[e]=new jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){sn[e]=new jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var ly=/[\-:]([a-z])/g;function cy(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ly,cy);sn[t]=new jn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ly,cy);sn[t]=new jn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ly,cy);sn[t]=new jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){sn[e]=new jn(e,1,!1,e.toLowerCase(),null,!1,!1)});sn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){sn[e]=new jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function uy(e,t,n,r){var s=sn.hasOwnProperty(t)?sn[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(WP(t,n,s,r)&&(n=null),r||s===null?VP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Vs=$P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Eu=Symbol.for("react.element"),Zi=Symbol.for("react.portal"),qi=Symbol.for("react.fragment"),dy=Symbol.for("react.strict_mode"),wp=Symbol.for("react.profiler"),I1=Symbol.for("react.provider"),M1=Symbol.for("react.context"),fy=Symbol.for("react.forward_ref"),bp=Symbol.for("react.suspense"),_p=Symbol.for("react.suspense_list"),hy=Symbol.for("react.memo"),so=Symbol.for("react.lazy"),L1=Symbol.for("react.offscreen"),p0=Symbol.iterator;function fl(e){return e===null||typeof e!="object"?null:(e=p0&&e[p0]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,mm;function Rl(e){if(mm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);mm=t&&t[1]||""}return` -`+mm+e}var pm=!1;function gm(e,t){if(!e||pm)return"";pm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` -`),o=r.stack.split(` -`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var c=` -`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=a);break}}}finally{pm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rl(e):""}function HP(e){switch(e.tag){case 5:return Rl(e.type);case 16:return Rl("Lazy");case 13:return Rl("Suspense");case 19:return Rl("SuspenseList");case 0:case 2:case 15:return e=gm(e.type,!1),e;case 11:return e=gm(e.type.render,!1),e;case 1:return e=gm(e.type,!0),e;default:return""}}function Sp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case qi:return"Fragment";case Zi:return"Portal";case wp:return"Profiler";case dy:return"StrictMode";case bp:return"Suspense";case _p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case M1:return(e.displayName||"Context")+".Consumer";case I1:return(e._context.displayName||"Context")+".Provider";case fy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hy:return t=e.displayName||null,t!==null?t:Sp(e.type)||"Memo";case so:t=e._payload,e=e._init;try{return Sp(e(t))}catch{}}return null}function YP(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sp(t);case 8:return t===dy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function z1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function KP(e){var t=z1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){e._valueTracker||(e._valueTracker=KP(e))}function F1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=z1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kp(e,t){var n=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function g0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $1(e,t){t=t.checked,t!=null&&uy(e,"checked",t,!1)}function Cp(e,t){$1(e,t);var n=jo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jp(e,t.type,n):t.hasOwnProperty("defaultValue")&&jp(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function y0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jp(e,t,n){(t!=="number"||Nd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Al=Array.isArray;function ma(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+jo(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ep(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ae(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function v0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ae(92));if(Al(n)){if(1<n.length)throw Error(ae(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:jo(n)}}function U1(e,t){var n=jo(t.value),r=jo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function x0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function V1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Np(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?V1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tu,B1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tu=Tu||document.createElement("div"),Tu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},GP=["Webkit","ms","Moz","O"];Object.keys(Bl).forEach(function(e){GP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bl[t]=Bl[e]})});function W1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bl.hasOwnProperty(e)&&Bl[e]?(""+t).trim():t+"px"}function H1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=W1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var ZP=Mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Tp(e,t){if(t){if(ZP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function Pp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rp=null;function my(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ap=null,pa=null,ga=null;function w0(e){if(e=Xc(e)){if(typeof Ap!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Kf(t),Ap(e.stateNode,e.type,t))}}function Y1(e){pa?ga?ga.push(e):ga=[e]:pa=e}function K1(){if(pa){var e=pa,t=ga;if(ga=pa=null,w0(e),t)for(e=0;e<t.length;e++)w0(t[e])}}function G1(e,t){return e(t)}function Z1(){}var ym=!1;function q1(e,t,n){if(ym)return e(t,n);ym=!0;try{return G1(e,t,n)}finally{ym=!1,(pa!==null||ga!==null)&&(Z1(),K1())}}function oc(e,t){var n=e.stateNode;if(n===null)return null;var r=Kf(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ae(231,t,typeof n));return n}var Dp=!1;if(Ds)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){Dp=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{Dp=!1}function qP(e,t,n,r,s,o,i,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Wl=!1,Td=null,Pd=!1,Op=null,XP={onError:function(e){Wl=!0,Td=e}};function QP(e,t,n,r,s,o,i,a,c){Wl=!1,Td=null,qP.apply(XP,arguments)}function JP(e,t,n,r,s,o,i,a,c){if(QP.apply(this,arguments),Wl){if(Wl){var u=Td;Wl=!1,Td=null}else throw Error(ae(198));Pd||(Pd=!0,Op=u)}}function ki(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function X1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b0(e){if(ki(e)!==e)throw Error(ae(188))}function eR(e){var t=e.alternate;if(!t){if(t=ki(e),t===null)throw Error(ae(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return b0(s),e;if(o===r)return b0(s),t;o=o.sibling}throw Error(ae(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(ae(189))}}if(n.alternate!==r)throw Error(ae(190))}if(n.tag!==3)throw Error(ae(188));return n.stateNode.current===n?e:t}function Q1(e){return e=eR(e),e!==null?J1(e):null}function J1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=J1(e);if(t!==null)return t;e=e.sibling}return null}var e_=Gn.unstable_scheduleCallback,_0=Gn.unstable_cancelCallback,tR=Gn.unstable_shouldYield,nR=Gn.unstable_requestPaint,Ut=Gn.unstable_now,rR=Gn.unstable_getCurrentPriorityLevel,py=Gn.unstable_ImmediatePriority,t_=Gn.unstable_UserBlockingPriority,Rd=Gn.unstable_NormalPriority,sR=Gn.unstable_LowPriority,n_=Gn.unstable_IdlePriority,Bf=null,Qr=null;function oR(e){if(Qr&&typeof Qr.onCommitFiberRoot=="function")try{Qr.onCommitFiberRoot(Bf,e,void 0,(e.current.flags&128)===128)}catch{}}var Er=Math.clz32?Math.clz32:lR,iR=Math.log,aR=Math.LN2;function lR(e){return e>>>=0,e===0?32:31-(iR(e)/aR|0)|0}var Pu=64,Ru=4194304;function Dl(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ad(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Dl(a):(o&=i,o!==0&&(r=Dl(o)))}else i=n&~s,i!==0?r=Dl(i):o!==0&&(r=Dl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Er(t),s=1<<n,r|=e[n],t&=~s;return r}function cR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Er(o),a=1<<i,c=s[i];c===-1?(!(a&n)||a&r)&&(s[i]=cR(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function Ip(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function r_(){var e=Pu;return Pu<<=1,!(Pu&4194240)&&(Pu=64),e}function vm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Er(t),e[t]=n}function dR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Er(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function gy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Er(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var gt=0;function s_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var o_,yy,i_,a_,l_,Mp=!1,Au=[],po=null,go=null,yo=null,ic=new Map,ac=new Map,io=[],fR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function S0(e,t){switch(e){case"focusin":case"focusout":po=null;break;case"dragenter":case"dragleave":go=null;break;case"mouseover":case"mouseout":yo=null;break;case"pointerover":case"pointerout":ic.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ac.delete(t.pointerId)}}function ml(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Xc(t),t!==null&&yy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function hR(e,t,n,r,s){switch(t){case"focusin":return po=ml(po,e,t,n,r,s),!0;case"dragenter":return go=ml(go,e,t,n,r,s),!0;case"mouseover":return yo=ml(yo,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return ic.set(o,ml(ic.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,ac.set(o,ml(ac.get(o)||null,e,t,n,r,s)),!0}return!1}function c_(e){var t=Yo(e.target);if(t!==null){var n=ki(t);if(n!==null){if(t=n.tag,t===13){if(t=X1(n),t!==null){e.blockedOn=t,l_(e.priority,function(){i_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function id(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Rp=r,n.target.dispatchEvent(r),Rp=null}else return t=Xc(n),t!==null&&yy(t),e.blockedOn=n,!1;t.shift()}return!0}function k0(e,t,n){id(e)&&n.delete(t)}function mR(){Mp=!1,po!==null&&id(po)&&(po=null),go!==null&&id(go)&&(go=null),yo!==null&&id(yo)&&(yo=null),ic.forEach(k0),ac.forEach(k0)}function pl(e,t){e.blockedOn===t&&(e.blockedOn=null,Mp||(Mp=!0,Gn.unstable_scheduleCallback(Gn.unstable_NormalPriority,mR)))}function lc(e){function t(s){return pl(s,e)}if(0<Au.length){pl(Au[0],e);for(var n=1;n<Au.length;n++){var r=Au[n];r.blockedOn===e&&(r.blockedOn=null)}}for(po!==null&&pl(po,e),go!==null&&pl(go,e),yo!==null&&pl(yo,e),ic.forEach(t),ac.forEach(t),n=0;n<io.length;n++)r=io[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<io.length&&(n=io[0],n.blockedOn===null);)c_(n),n.blockedOn===null&&io.shift()}var ya=Vs.ReactCurrentBatchConfig,Dd=!0;function pR(e,t,n,r){var s=gt,o=ya.transition;ya.transition=null;try{gt=1,vy(e,t,n,r)}finally{gt=s,ya.transition=o}}function gR(e,t,n,r){var s=gt,o=ya.transition;ya.transition=null;try{gt=4,vy(e,t,n,r)}finally{gt=s,ya.transition=o}}function vy(e,t,n,r){if(Dd){var s=Lp(e,t,n,r);if(s===null)Nm(e,t,r,Od,n),S0(e,r);else if(hR(s,e,t,n,r))r.stopPropagation();else if(S0(e,r),t&4&&-1<fR.indexOf(e)){for(;s!==null;){var o=Xc(s);if(o!==null&&o_(o),o=Lp(e,t,n,r),o===null&&Nm(e,t,r,Od,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Nm(e,t,r,null,n)}}var Od=null;function Lp(e,t,n,r){if(Od=null,e=my(r),e=Yo(e),e!==null)if(t=ki(e),t===null)e=null;else if(n=t.tag,n===13){if(e=X1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Od=e,null}function u_(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(rR()){case py:return 1;case t_:return 4;case Rd:case sR:return 16;case n_:return 536870912;default:return 16}default:return 16}}var co=null,xy=null,ad=null;function d_(){if(ad)return ad;var e,t=xy,n=t.length,r,s="value"in co?co.value:co.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return ad=s.slice(e,1<r?1-r:void 0)}function ld(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Du(){return!0}function C0(){return!1}function Jn(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Du:C0,this.isPropagationStopped=C0,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Du)},persist:function(){},isPersistent:Du}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wy=Jn(Ga),qc=Mt({},Ga,{view:0,detail:0}),yR=Jn(qc),xm,wm,gl,Wf=Mt({},qc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:by,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==gl&&(gl&&e.type==="mousemove"?(xm=e.screenX-gl.screenX,wm=e.screenY-gl.screenY):wm=xm=0,gl=e),xm)},movementY:function(e){return"movementY"in e?e.movementY:wm}}),j0=Jn(Wf),vR=Mt({},Wf,{dataTransfer:0}),xR=Jn(vR),wR=Mt({},qc,{relatedTarget:0}),bm=Jn(wR),bR=Mt({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),_R=Jn(bR),SR=Mt({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kR=Jn(SR),CR=Mt({},Ga,{data:0}),E0=Jn(CR),jR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ER={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},NR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=NR[e])?!!t[e]:!1}function by(){return TR}var PR=Mt({},qc,{key:function(e){if(e.key){var t=jR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ld(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ER[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:by,charCode:function(e){return e.type==="keypress"?ld(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ld(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),RR=Jn(PR),AR=Mt({},Wf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),N0=Jn(AR),DR=Mt({},qc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:by}),OR=Jn(DR),IR=Mt({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),MR=Jn(IR),LR=Mt({},Wf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zR=Jn(LR),FR=[9,13,27,32],_y=Ds&&"CompositionEvent"in window,Hl=null;Ds&&"documentMode"in document&&(Hl=document.documentMode);var $R=Ds&&"TextEvent"in window&&!Hl,f_=Ds&&(!_y||Hl&&8<Hl&&11>=Hl),T0=" ",P0=!1;function h_(e,t){switch(e){case"keyup":return FR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function UR(e,t){switch(e){case"compositionend":return m_(t);case"keypress":return t.which!==32?null:(P0=!0,T0);case"textInput":return e=t.data,e===T0&&P0?null:e;default:return null}}function VR(e,t){if(Xi)return e==="compositionend"||!_y&&h_(e,t)?(e=d_(),ad=xy=co=null,Xi=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return f_&&t.locale!=="ko"?null:t.data;default:return null}}var BR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function R0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!BR[e.type]:t==="textarea"}function p_(e,t,n,r){Y1(r),t=Id(t,"onChange"),0<t.length&&(n=new wy("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yl=null,cc=null;function WR(e){j_(e,0)}function Hf(e){var t=ea(e);if(F1(t))return e}function HR(e,t){if(e==="change")return t}var g_=!1;if(Ds){var _m;if(Ds){var Sm="oninput"in document;if(!Sm){var A0=document.createElement("div");A0.setAttribute("oninput","return;"),Sm=typeof A0.oninput=="function"}_m=Sm}else _m=!1;g_=_m&&(!document.documentMode||9<document.documentMode)}function D0(){Yl&&(Yl.detachEvent("onpropertychange",y_),cc=Yl=null)}function y_(e){if(e.propertyName==="value"&&Hf(cc)){var t=[];p_(t,cc,e,my(e)),q1(WR,t)}}function YR(e,t,n){e==="focusin"?(D0(),Yl=t,cc=n,Yl.attachEvent("onpropertychange",y_)):e==="focusout"&&D0()}function KR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hf(cc)}function GR(e,t){if(e==="click")return Hf(t)}function ZR(e,t){if(e==="input"||e==="change")return Hf(t)}function qR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pr=typeof Object.is=="function"?Object.is:qR;function uc(e,t){if(Pr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!xp.call(t,s)||!Pr(e[s],t[s]))return!1}return!0}function O0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function I0(e,t){var n=O0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=O0(n)}}function v_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?v_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x_(){for(var e=window,t=Nd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nd(e.document)}return t}function Sy(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")}function XR(e){var t=x_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&v_(n.ownerDocument.documentElement,n)){if(r!==null&&Sy(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=I0(n,o);var i=I0(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var QR=Ds&&"documentMode"in document&&11>=document.documentMode,Qi=null,zp=null,Kl=null,Fp=!1;function M0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fp||Qi==null||Qi!==Nd(r)||(r=Qi,"selectionStart"in r&&Sy(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kl&&uc(Kl,r)||(Kl=r,r=Id(zp,"onSelect"),0<r.length&&(t=new wy("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qi)))}function Ou(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ji={animationend:Ou("Animation","AnimationEnd"),animationiteration:Ou("Animation","AnimationIteration"),animationstart:Ou("Animation","AnimationStart"),transitionend:Ou("Transition","TransitionEnd")},km={},w_={};Ds&&(w_=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function Yf(e){if(km[e])return km[e];if(!Ji[e])return e;var t=Ji[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in w_)return km[e]=t[n];return e}var b_=Yf("animationend"),__=Yf("animationiteration"),S_=Yf("animationstart"),k_=Yf("transitionend"),C_=new Map,L0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Io(e,t){C_.set(e,t),Si(t,[e])}for(var Cm=0;Cm<L0.length;Cm++){var jm=L0[Cm],JR=jm.toLowerCase(),eA=jm[0].toUpperCase()+jm.slice(1);Io(JR,"on"+eA)}Io(b_,"onAnimationEnd");Io(__,"onAnimationIteration");Io(S_,"onAnimationStart");Io("dblclick","onDoubleClick");Io("focusin","onFocus");Io("focusout","onBlur");Io(k_,"onTransitionEnd");Ta("onMouseEnter",["mouseout","mouseover"]);Ta("onMouseLeave",["mouseout","mouseover"]);Ta("onPointerEnter",["pointerout","pointerover"]);Ta("onPointerLeave",["pointerout","pointerover"]);Si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Si("onBeforeInput",["compositionend","keypress","textInput","paste"]);Si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ol="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),tA=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ol));function z0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,JP(r,t,void 0,e),e.currentTarget=null}function j_(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&s.isPropagationStopped())break e;z0(s,a,u),o=c}else for(i=0;i<r.length;i++){if(a=r[i],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&s.isPropagationStopped())break e;z0(s,a,u),o=c}}}if(Pd)throw e=Op,Pd=!1,Op=null,e}function St(e,t){var n=t[Wp];n===void 0&&(n=t[Wp]=new Set);var r=e+"__bubble";n.has(r)||(E_(t,e,2,!1),n.add(r))}function Em(e,t,n){var r=0;t&&(r|=4),E_(n,e,r,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function dc(e){if(!e[Iu]){e[Iu]=!0,O1.forEach(function(n){n!=="selectionchange"&&(tA.has(n)||Em(n,!1,e),Em(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Iu]||(t[Iu]=!0,Em("selectionchange",!1,t))}}function E_(e,t,n,r){switch(u_(t)){case 1:var s=pR;break;case 4:s=gR;break;default:s=vy}n=s.bind(null,t,n,e),s=void 0,!Dp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Nm(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Yo(a),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}a=a.parentNode}}r=r.return}q1(function(){var u=o,d=my(n),f=[];e:{var h=C_.get(e);if(h!==void 0){var m=wy,x=e;switch(e){case"keypress":if(ld(n)===0)break e;case"keydown":case"keyup":m=RR;break;case"focusin":x="focus",m=bm;break;case"focusout":x="blur",m=bm;break;case"beforeblur":case"afterblur":m=bm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=j0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=xR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=OR;break;case b_:case __:case S_:m=_R;break;case k_:m=MR;break;case"scroll":m=yR;break;case"wheel":m=zR;break;case"copy":case"cut":case"paste":m=kR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=N0}var p=(t&4)!==0,w=!p&&e==="scroll",g=p?h!==null?h+"Capture":null:h;p=[];for(var v=u,b;v!==null;){b=v;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,g!==null&&(_=oc(v,g),_!=null&&p.push(fc(v,_,b)))),w)break;v=v.return}0<p.length&&(h=new m(h,x,null,n,d),f.push({event:h,listeners:p}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==Rp&&(x=n.relatedTarget||n.fromElement)&&(Yo(x)||x[Os]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(x=n.relatedTarget||n.toElement,m=u,x=x?Yo(x):null,x!==null&&(w=ki(x),x!==w||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=u),m!==x)){if(p=j0,_="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(p=N0,_="onPointerLeave",g="onPointerEnter",v="pointer"),w=m==null?h:ea(m),b=x==null?h:ea(x),h=new p(_,v+"leave",m,n,d),h.target=w,h.relatedTarget=b,_=null,Yo(d)===u&&(p=new p(g,v+"enter",x,n,d),p.target=b,p.relatedTarget=w,_=p),w=_,m&&x)t:{for(p=m,g=x,v=0,b=p;b;b=zi(b))v++;for(b=0,_=g;_;_=zi(_))b++;for(;0<v-b;)p=zi(p),v--;for(;0<b-v;)g=zi(g),b--;for(;v--;){if(p===g||g!==null&&p===g.alternate)break t;p=zi(p),g=zi(g)}p=null}else p=null;m!==null&&F0(f,h,m,p,!1),x!==null&&w!==null&&F0(f,w,x,p,!0)}}e:{if(h=u?ea(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var C=HR;else if(R0(h))if(g_)C=ZR;else{C=KR;var j=YR}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=GR);if(C&&(C=C(e,u))){p_(f,C,n,d);break e}j&&j(e,h,u),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&jp(h,"number",h.value)}switch(j=u?ea(u):window,e){case"focusin":(R0(j)||j.contentEditable==="true")&&(Qi=j,zp=u,Kl=null);break;case"focusout":Kl=zp=Qi=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,M0(f,n,d);break;case"selectionchange":if(QR)break;case"keydown":case"keyup":M0(f,n,d)}var T;if(_y)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Xi?h_(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(f_&&n.locale!=="ko"&&(Xi||R!=="onCompositionStart"?R==="onCompositionEnd"&&Xi&&(T=d_()):(co=d,xy="value"in co?co.value:co.textContent,Xi=!0)),j=Id(u,R),0<j.length&&(R=new E0(R,e,null,n,d),f.push({event:R,listeners:j}),T?R.data=T:(T=m_(n),T!==null&&(R.data=T)))),(T=$R?UR(e,n):VR(e,n))&&(u=Id(u,"onBeforeInput"),0<u.length&&(d=new E0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=T))}j_(f,t)})}function fc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=oc(e,n),o!=null&&r.unshift(fc(e,o,s)),o=oc(e,t),o!=null&&r.push(fc(e,o,s))),e=e.return}return r}function zi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function F0(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,s?(c=oc(n,o),c!=null&&i.unshift(fc(n,c,a))):s||(c=oc(n,o),c!=null&&i.push(fc(n,c,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var nA=/\r\n?/g,rA=/\u0000|\uFFFD/g;function $0(e){return(typeof e=="string"?e:""+e).replace(nA,` -`).replace(rA,"")}function Mu(e,t,n){if(t=$0(t),$0(e)!==t&&n)throw Error(ae(425))}function Md(){}var $p=null,Up=null;function Vp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bp=typeof setTimeout=="function"?setTimeout:void 0,sA=typeof clearTimeout=="function"?clearTimeout:void 0,U0=typeof Promise=="function"?Promise:void 0,oA=typeof queueMicrotask=="function"?queueMicrotask:typeof U0<"u"?function(e){return U0.resolve(null).then(e).catch(iA)}:Bp;function iA(e){setTimeout(function(){throw e})}function Tm(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),lc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);lc(t)}function vo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function V0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Za=Math.random().toString(36).slice(2),Wr="__reactFiber$"+Za,hc="__reactProps$"+Za,Os="__reactContainer$"+Za,Wp="__reactEvents$"+Za,aA="__reactListeners$"+Za,lA="__reactHandles$"+Za;function Yo(e){var t=e[Wr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Os]||n[Wr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=V0(e);e!==null;){if(n=e[Wr])return n;e=V0(e)}return t}e=n,n=e.parentNode}return null}function Xc(e){return e=e[Wr]||e[Os],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ea(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ae(33))}function Kf(e){return e[hc]||null}var Hp=[],ta=-1;function Mo(e){return{current:e}}function kt(e){0>ta||(e.current=Hp[ta],Hp[ta]=null,ta--)}function bt(e,t){ta++,Hp[ta]=e.current,e.current=t}var Eo={},gn=Mo(Eo),Dn=Mo(!1),li=Eo;function Pa(e,t){var n=e.type.contextTypes;if(!n)return Eo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function On(e){return e=e.childContextTypes,e!=null}function Ld(){kt(Dn),kt(gn)}function B0(e,t,n){if(gn.current!==Eo)throw Error(ae(168));bt(gn,t),bt(Dn,n)}function N_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ae(108,YP(e)||"Unknown",s));return Mt({},n,r)}function zd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,li=gn.current,bt(gn,e),bt(Dn,Dn.current),!0}function W0(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=N_(e,t,li),r.__reactInternalMemoizedMergedChildContext=e,kt(Dn),kt(gn),bt(gn,e)):kt(Dn),bt(Dn,n)}var Ss=null,Gf=!1,Pm=!1;function T_(e){Ss===null?Ss=[e]:Ss.push(e)}function cA(e){Gf=!0,T_(e)}function Lo(){if(!Pm&&Ss!==null){Pm=!0;var e=0,t=gt;try{var n=Ss;for(gt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ss=null,Gf=!1}catch(s){throw Ss!==null&&(Ss=Ss.slice(e+1)),e_(py,Lo),s}finally{gt=t,Pm=!1}}return null}var na=[],ra=0,Fd=null,$d=0,sr=[],or=0,ci=null,ks=1,Cs="";function Vo(e,t){na[ra++]=$d,na[ra++]=Fd,Fd=e,$d=t}function P_(e,t,n){sr[or++]=ks,sr[or++]=Cs,sr[or++]=ci,ci=e;var r=ks;e=Cs;var s=32-Er(r)-1;r&=~(1<<s),n+=1;var o=32-Er(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,ks=1<<32-Er(t)+s|n<<s|r,Cs=o+e}else ks=1<<o|n<<s|r,Cs=e}function ky(e){e.return!==null&&(Vo(e,1),P_(e,1,0))}function Cy(e){for(;e===Fd;)Fd=na[--ra],na[ra]=null,$d=na[--ra],na[ra]=null;for(;e===ci;)ci=sr[--or],sr[or]=null,Cs=sr[--or],sr[or]=null,ks=sr[--or],sr[or]=null}var Bn=null,Vn=null,Pt=!1,br=null;function R_(e,t){var n=ar(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function H0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Bn=e,Vn=vo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Bn=e,Vn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ci!==null?{id:ks,overflow:Cs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ar(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Bn=e,Vn=null,!0):!1;default:return!1}}function Yp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Kp(e){if(Pt){var t=Vn;if(t){var n=t;if(!H0(e,t)){if(Yp(e))throw Error(ae(418));t=vo(n.nextSibling);var r=Bn;t&&H0(e,t)?R_(r,n):(e.flags=e.flags&-4097|2,Pt=!1,Bn=e)}}else{if(Yp(e))throw Error(ae(418));e.flags=e.flags&-4097|2,Pt=!1,Bn=e}}}function Y0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Bn=e}function Lu(e){if(e!==Bn)return!1;if(!Pt)return Y0(e),Pt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vp(e.type,e.memoizedProps)),t&&(t=Vn)){if(Yp(e))throw A_(),Error(ae(418));for(;t;)R_(e,t),t=vo(t.nextSibling)}if(Y0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ae(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vn=vo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vn=null}}else Vn=Bn?vo(e.stateNode.nextSibling):null;return!0}function A_(){for(var e=Vn;e;)e=vo(e.nextSibling)}function Ra(){Vn=Bn=null,Pt=!1}function jy(e){br===null?br=[e]:br.push(e)}var uA=Vs.ReactCurrentBatchConfig;function yl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ae(309));var r=n.stateNode}if(!r)throw Error(ae(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(ae(284));if(!n._owner)throw Error(ae(290,e))}return e}function zu(e,t){throw e=Object.prototype.toString.call(t),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function K0(e){var t=e._init;return t(e._payload)}function D_(e){function t(g,v){if(e){var b=g.deletions;b===null?(g.deletions=[v],g.flags|=16):b.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function r(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function s(g,v){return g=_o(g,v),g.index=0,g.sibling=null,g}function o(g,v,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<v?(g.flags|=2,v):b):(g.flags|=2,v)):(g.flags|=1048576,v)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,v,b,_){return v===null||v.tag!==6?(v=Lm(b,g.mode,_),v.return=g,v):(v=s(v,b),v.return=g,v)}function c(g,v,b,_){var C=b.type;return C===qi?d(g,v,b.props.children,_,b.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===so&&K0(C)===v.type)?(_=s(v,b.props),_.ref=yl(g,v,b),_.return=g,_):(_=pd(b.type,b.key,b.props,null,g.mode,_),_.ref=yl(g,v,b),_.return=g,_)}function u(g,v,b,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=zm(b,g.mode,_),v.return=g,v):(v=s(v,b.children||[]),v.return=g,v)}function d(g,v,b,_,C){return v===null||v.tag!==7?(v=ni(b,g.mode,_,C),v.return=g,v):(v=s(v,b),v.return=g,v)}function f(g,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Lm(""+v,g.mode,b),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Eu:return b=pd(v.type,v.key,v.props,null,g.mode,b),b.ref=yl(g,null,v),b.return=g,b;case Zi:return v=zm(v,g.mode,b),v.return=g,v;case so:var _=v._init;return f(g,_(v._payload),b)}if(Al(v)||fl(v))return v=ni(v,g.mode,b,null),v.return=g,v;zu(g,v)}return null}function h(g,v,b,_){var C=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:a(g,v,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:return b.key===C?c(g,v,b,_):null;case Zi:return b.key===C?u(g,v,b,_):null;case so:return C=b._init,h(g,v,C(b._payload),_)}if(Al(b)||fl(b))return C!==null?null:d(g,v,b,_,null);zu(g,b)}return null}function m(g,v,b,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(b)||null,a(v,g,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Eu:return g=g.get(_.key===null?b:_.key)||null,c(v,g,_,C);case Zi:return g=g.get(_.key===null?b:_.key)||null,u(v,g,_,C);case so:var j=_._init;return m(g,v,b,j(_._payload),C)}if(Al(_)||fl(_))return g=g.get(b)||null,d(v,g,_,C,null);zu(v,_)}return null}function x(g,v,b,_){for(var C=null,j=null,T=v,R=v=0,A=null;T!==null&&R<b.length;R++){T.index>R?(A=T,T=null):A=T.sibling;var O=h(g,T,b[R],_);if(O===null){T===null&&(T=A);break}e&&T&&O.alternate===null&&t(g,T),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O,T=A}if(R===b.length)return n(g,T),Pt&&Vo(g,R),C;if(T===null){for(;R<b.length;R++)T=f(g,b[R],_),T!==null&&(v=o(T,v,R),j===null?C=T:j.sibling=T,j=T);return Pt&&Vo(g,R),C}for(T=r(g,T);R<b.length;R++)A=m(T,g,R,b[R],_),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?R:A.key),v=o(A,v,R),j===null?C=A:j.sibling=A,j=A);return e&&T.forEach(function(G){return t(g,G)}),Pt&&Vo(g,R),C}function p(g,v,b,_){var C=fl(b);if(typeof C!="function")throw Error(ae(150));if(b=C.call(b),b==null)throw Error(ae(151));for(var j=C=null,T=v,R=v=0,A=null,O=b.next();T!==null&&!O.done;R++,O=b.next()){T.index>R?(A=T,T=null):A=T.sibling;var G=h(g,T,O.value,_);if(G===null){T===null&&(T=A);break}e&&T&&G.alternate===null&&t(g,T),v=o(G,v,R),j===null?C=G:j.sibling=G,j=G,T=A}if(O.done)return n(g,T),Pt&&Vo(g,R),C;if(T===null){for(;!O.done;R++,O=b.next())O=f(g,O.value,_),O!==null&&(v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return Pt&&Vo(g,R),C}for(T=r(g,T);!O.done;R++,O=b.next())O=m(T,g,R,O.value,_),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?R:O.key),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return e&&T.forEach(function(N){return t(g,N)}),Pt&&Vo(g,R),C}function w(g,v,b,_){if(typeof b=="object"&&b!==null&&b.type===qi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:e:{for(var C=b.key,j=v;j!==null;){if(j.key===C){if(C=b.type,C===qi){if(j.tag===7){n(g,j.sibling),v=s(j,b.props.children),v.return=g,g=v;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===so&&K0(C)===j.type){n(g,j.sibling),v=s(j,b.props),v.ref=yl(g,j,b),v.return=g,g=v;break e}n(g,j);break}else t(g,j);j=j.sibling}b.type===qi?(v=ni(b.props.children,g.mode,_,b.key),v.return=g,g=v):(_=pd(b.type,b.key,b.props,null,g.mode,_),_.ref=yl(g,v,b),_.return=g,g=_)}return i(g);case Zi:e:{for(j=b.key;v!==null;){if(v.key===j)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=s(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=zm(b,g.mode,_),v.return=g,g=v}return i(g);case so:return j=b._init,w(g,v,j(b._payload),_)}if(Al(b))return x(g,v,b,_);if(fl(b))return p(g,v,b,_);zu(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,b),v.return=g,g=v):(n(g,v),v=Lm(b,g.mode,_),v.return=g,g=v),i(g)):n(g,v)}return w}var Aa=D_(!0),O_=D_(!1),Ud=Mo(null),Vd=null,sa=null,Ey=null;function Ny(){Ey=sa=Vd=null}function Ty(e){var t=Ud.current;kt(Ud),e._currentValue=t}function Gp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function va(e,t){Vd=e,Ey=sa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(An=!0),e.firstContext=null)}function fr(e){var t=e._currentValue;if(Ey!==e)if(e={context:e,memoizedValue:t,next:null},sa===null){if(Vd===null)throw Error(ae(308));sa=e,Vd.dependencies={lanes:0,firstContext:e}}else sa=sa.next=e;return t}var Ko=null;function Py(e){Ko===null?Ko=[e]:Ko.push(e)}function I_(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Py(t)):(n.next=s.next,s.next=n),t.interleaved=n,Is(e,r)}function Is(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oo=!1;function Ry(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M_(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ns(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Is(e,n)}return s=r.interleaved,s===null?(t.next=t,Py(r)):(t.next=s.next,s.next=t),r.interleaved=t,Is(e,n)}function cd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gy(e,n)}}function G0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bd(e,t,n,r){var s=e.updateQueue;oo=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,a=o;do{var h=a.lane,m=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,p=a;switch(h=t,m=n,p.tag){case 1:if(x=p.payload,typeof x=="function"){f=x.call(m,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=p.payload,h=typeof x=="function"?x.call(m,f,h):x,h==null)break e;f=Mt({},f,h);break e;case 2:oo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,i|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);di|=i,e.lanes=i,e.memoizedState=f}}function Z0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(ae(191,s));s.call(r)}}}var Qc={},Jr=Mo(Qc),mc=Mo(Qc),pc=Mo(Qc);function Go(e){if(e===Qc)throw Error(ae(174));return e}function Ay(e,t){switch(bt(pc,t),bt(mc,e),bt(Jr,Qc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Np(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Np(t,e)}kt(Jr),bt(Jr,t)}function Da(){kt(Jr),kt(mc),kt(pc)}function L_(e){Go(pc.current);var t=Go(Jr.current),n=Np(t,e.type);t!==n&&(bt(mc,e),bt(Jr,n))}function Dy(e){mc.current===e&&(kt(Jr),kt(mc))}var Dt=Mo(0);function Wd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rm=[];function Oy(){for(var e=0;e<Rm.length;e++)Rm[e]._workInProgressVersionPrimary=null;Rm.length=0}var ud=Vs.ReactCurrentDispatcher,Am=Vs.ReactCurrentBatchConfig,ui=0,It=null,Gt=null,Qt=null,Hd=!1,Gl=!1,gc=0,dA=0;function fn(){throw Error(ae(321))}function Iy(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pr(e[n],t[n]))return!1;return!0}function My(e,t,n,r,s,o){if(ui=o,It=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ud.current=e===null||e.memoizedState===null?pA:gA,e=n(r,s),Gl){o=0;do{if(Gl=!1,gc=0,25<=o)throw Error(ae(301));o+=1,Qt=Gt=null,t.updateQueue=null,ud.current=yA,e=n(r,s)}while(Gl)}if(ud.current=Yd,t=Gt!==null&&Gt.next!==null,ui=0,Qt=Gt=It=null,Hd=!1,t)throw Error(ae(300));return e}function Ly(){var e=gc!==0;return gc=0,e}function Br(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?It.memoizedState=Qt=e:Qt=Qt.next=e,Qt}function hr(){if(Gt===null){var e=It.alternate;e=e!==null?e.memoizedState:null}else e=Gt.next;var t=Qt===null?It.memoizedState:Qt.next;if(t!==null)Qt=t,Gt=e;else{if(e===null)throw Error(ae(310));Gt=e,e={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},Qt===null?It.memoizedState=Qt=e:Qt=Qt.next=e}return Qt}function yc(e,t){return typeof t=="function"?t(e):t}function Dm(e){var t=hr(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=Gt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,c=null,u=o;do{var d=u.lane;if((ui&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,i=r):c=c.next=f,It.lanes|=d,di|=d}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=a,Pr(r,t.memoizedState)||(An=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,It.lanes|=o,di|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Om(e){var t=hr(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Pr(o,t.memoizedState)||(An=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function z_(){}function F_(e,t){var n=It,r=hr(),s=t(),o=!Pr(r.memoizedState,s);if(o&&(r.memoizedState=s,An=!0),r=r.queue,zy(V_.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Qt!==null&&Qt.memoizedState.tag&1){if(n.flags|=2048,vc(9,U_.bind(null,n,r,s,t),void 0,null),Jt===null)throw Error(ae(349));ui&30||$_(n,t,s)}return s}function $_(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=It.updateQueue,t===null?(t={lastEffect:null,stores:null},It.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function U_(e,t,n,r){t.value=n,t.getSnapshot=r,B_(t)&&W_(e)}function V_(e,t,n){return n(function(){B_(t)&&W_(e)})}function B_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pr(e,n)}catch{return!0}}function W_(e){var t=Is(e,1);t!==null&&Nr(t,e,1,-1)}function q0(e){var t=Br();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yc,lastRenderedState:e},t.queue=e,e=e.dispatch=mA.bind(null,It,e),[t.memoizedState,e]}function vc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=It.updateQueue,t===null?(t={lastEffect:null,stores:null},It.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function H_(){return hr().memoizedState}function dd(e,t,n,r){var s=Br();It.flags|=e,s.memoizedState=vc(1|t,n,void 0,r===void 0?null:r)}function Zf(e,t,n,r){var s=hr();r=r===void 0?null:r;var o=void 0;if(Gt!==null){var i=Gt.memoizedState;if(o=i.destroy,r!==null&&Iy(r,i.deps)){s.memoizedState=vc(t,n,o,r);return}}It.flags|=e,s.memoizedState=vc(1|t,n,o,r)}function X0(e,t){return dd(8390656,8,e,t)}function zy(e,t){return Zf(2048,8,e,t)}function Y_(e,t){return Zf(4,2,e,t)}function K_(e,t){return Zf(4,4,e,t)}function G_(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Z_(e,t,n){return n=n!=null?n.concat([e]):null,Zf(4,4,G_.bind(null,t,e),n)}function Fy(){}function q_(e,t){var n=hr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Iy(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function X_(e,t){var n=hr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Iy(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Q_(e,t,n){return ui&21?(Pr(n,t)||(n=r_(),It.lanes|=n,di|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,An=!0),e.memoizedState=n)}function fA(e,t){var n=gt;gt=n!==0&&4>n?n:4,e(!0);var r=Am.transition;Am.transition={};try{e(!1),t()}finally{gt=n,Am.transition=r}}function J_(){return hr().memoizedState}function hA(e,t,n){var r=bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eS(e))tS(t,n);else if(n=I_(e,t,n,r),n!==null){var s=Sn();Nr(n,e,r,s),nS(n,t,r)}}function mA(e,t,n){var r=bo(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eS(e))tS(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,Pr(a,i)){var c=t.interleaved;c===null?(s.next=s,Py(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=I_(e,t,s,r),n!==null&&(s=Sn(),Nr(n,e,r,s),nS(n,t,r))}}function eS(e){var t=e.alternate;return e===It||t!==null&&t===It}function tS(e,t){Gl=Hd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gy(e,n)}}var Yd={readContext:fr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},pA={readContext:fr,useCallback:function(e,t){return Br().memoizedState=[e,t===void 0?null:t],e},useContext:fr,useEffect:X0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dd(4194308,4,G_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dd(4194308,4,e,t)},useInsertionEffect:function(e,t){return dd(4,2,e,t)},useMemo:function(e,t){var n=Br();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Br();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hA.bind(null,It,e),[r.memoizedState,e]},useRef:function(e){var t=Br();return e={current:e},t.memoizedState=e},useState:q0,useDebugValue:Fy,useDeferredValue:function(e){return Br().memoizedState=e},useTransition:function(){var e=q0(!1),t=e[0];return e=fA.bind(null,e[1]),Br().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=It,s=Br();if(Pt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),Jt===null)throw Error(ae(349));ui&30||$_(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,X0(V_.bind(null,r,o,e),[e]),r.flags|=2048,vc(9,U_.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Br(),t=Jt.identifierPrefix;if(Pt){var n=Cs,r=ks;n=(r&~(1<<32-Er(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=dA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},gA={readContext:fr,useCallback:q_,useContext:fr,useEffect:zy,useImperativeHandle:Z_,useInsertionEffect:Y_,useLayoutEffect:K_,useMemo:X_,useReducer:Dm,useRef:H_,useState:function(){return Dm(yc)},useDebugValue:Fy,useDeferredValue:function(e){var t=hr();return Q_(t,Gt.memoizedState,e)},useTransition:function(){var e=Dm(yc)[0],t=hr().memoizedState;return[e,t]},useMutableSource:z_,useSyncExternalStore:F_,useId:J_,unstable_isNewReconciler:!1},yA={readContext:fr,useCallback:q_,useContext:fr,useEffect:zy,useImperativeHandle:Z_,useInsertionEffect:Y_,useLayoutEffect:K_,useMemo:X_,useReducer:Om,useRef:H_,useState:function(){return Om(yc)},useDebugValue:Fy,useDeferredValue:function(e){var t=hr();return Gt===null?t.memoizedState=e:Q_(t,Gt.memoizedState,e)},useTransition:function(){var e=Om(yc)[0],t=hr().memoizedState;return[e,t]},useMutableSource:z_,useSyncExternalStore:F_,useId:J_,unstable_isNewReconciler:!1};function vr(e,t){if(e&&e.defaultProps){t=Mt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Zp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Mt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qf={isMounted:function(e){return(e=e._reactInternals)?ki(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=bo(e),o=Ns(r,s);o.payload=t,n!=null&&(o.callback=n),t=xo(e,o,s),t!==null&&(Nr(t,e,s,r),cd(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=bo(e),o=Ns(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=xo(e,o,s),t!==null&&(Nr(t,e,s,r),cd(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),r=bo(e),s=Ns(n,r);s.tag=2,t!=null&&(s.callback=t),t=xo(e,s,r),t!==null&&(Nr(t,e,r,n),cd(t,e,r))}};function Q0(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!uc(n,r)||!uc(s,o):!0}function rS(e,t,n){var r=!1,s=Eo,o=t.contextType;return typeof o=="object"&&o!==null?o=fr(o):(s=On(t)?li:gn.current,r=t.contextTypes,o=(r=r!=null)?Pa(e,s):Eo),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function J0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qf.enqueueReplaceState(t,t.state,null)}function qp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Ry(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=fr(o):(o=On(t)?li:gn.current,s.context=Pa(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Zp(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&qf.enqueueReplaceState(s,s.state,null),Bd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Oa(e,t){try{var n="",r=t;do n+=HP(r),r=r.return;while(r);var s=n}catch(o){s=` -Error generating stack: `+o.message+` -`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Im(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var vA=typeof WeakMap=="function"?WeakMap:Map;function sS(e,t,n){n=Ns(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gd||(Gd=!0,ag=r),Xp(e,t)},n}function oS(e,t,n){n=Ns(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Xp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Xp(e,t),typeof r!="function"&&(wo===null?wo=new Set([this]):wo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function ew(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new vA;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=AA.bind(null,e,t,n),t.then(e,e))}function tw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function nw(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ns(-1,1),t.tag=2,xo(n,t,1))),n.lanes|=1),e)}var xA=Vs.ReactCurrentOwner,An=!1;function bn(e,t,n,r){t.child=e===null?O_(t,null,n,r):Aa(t,e.child,n,r)}function rw(e,t,n,r,s){n=n.render;var o=t.ref;return va(t,s),r=My(e,t,n,r,o,s),n=Ly(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ms(e,t,s)):(Pt&&n&&ky(t),t.flags|=1,bn(e,t,r,s),t.child)}function sw(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Ky(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,iS(e,t,o,r,s)):(e=pd(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:uc,n(i,r)&&e.ref===t.ref)return Ms(e,t,s)}return t.flags|=1,e=_o(o,r),e.ref=t.ref,e.return=t,t.child=e}function iS(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(uc(o,r)&&e.ref===t.ref)if(An=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(An=!0);else return t.lanes=e.lanes,Ms(e,t,s)}return Qp(e,t,n,r,s)}function aS(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(ia,Fn),Fn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bt(ia,Fn),Fn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bt(ia,Fn),Fn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,bt(ia,Fn),Fn|=r;return bn(e,t,s,n),t.child}function lS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qp(e,t,n,r,s){var o=On(n)?li:gn.current;return o=Pa(t,o),va(t,s),n=My(e,t,n,r,o,s),r=Ly(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ms(e,t,s)):(Pt&&r&&ky(t),t.flags|=1,bn(e,t,n,s),t.child)}function ow(e,t,n,r,s){if(On(n)){var o=!0;zd(t)}else o=!1;if(va(t,s),t.stateNode===null)fd(e,t),rS(t,n,r),qp(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=fr(u):(u=On(n)?li:gn.current,u=Pa(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||c!==u)&&J0(t,i,r,u),oo=!1;var h=t.memoizedState;i.state=h,Bd(t,r,i,s),c=t.memoizedState,a!==r||h!==c||Dn.current||oo?(typeof d=="function"&&(Zp(t,n,d,r),c=t.memoizedState),(a=oo||Q0(t,n,a,r,h,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,M_(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:vr(t.type,a),i.props=u,f=t.pendingProps,h=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=fr(c):(c=On(n)?li:gn.current,c=Pa(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||h!==c)&&J0(t,i,r,c),oo=!1,h=t.memoizedState,i.state=h,Bd(t,r,i,s);var x=t.memoizedState;a!==f||h!==x||Dn.current||oo?(typeof m=="function"&&(Zp(t,n,m,r),x=t.memoizedState),(u=oo||Q0(t,n,u,r,h,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Jp(e,t,n,r,o,s)}function Jp(e,t,n,r,s,o){lS(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&W0(t,n,!1),Ms(e,t,o);r=t.stateNode,xA.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Aa(t,e.child,null,o),t.child=Aa(t,null,a,o)):bn(e,t,a,o),t.memoizedState=r.state,s&&W0(t,n,!0),t.child}function cS(e){var t=e.stateNode;t.pendingContext?B0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&B0(e,t.context,!1),Ay(e,t.containerInfo)}function iw(e,t,n,r,s){return Ra(),jy(s),t.flags|=256,bn(e,t,n,r),t.child}var eg={dehydrated:null,treeContext:null,retryLane:0};function tg(e){return{baseLanes:e,cachePool:null,transitions:null}}function uS(e,t,n){var r=t.pendingProps,s=Dt.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),bt(Dt,s&1),e===null)return Kp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Jf(i,r,0,null),e=ni(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=tg(n),t.memoizedState=eg,e):$y(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return wA(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=_o(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=_o(a,o):(o=ni(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?tg(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=eg,r}return o=e.child,e=o.sibling,r=_o(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $y(e,t){return t=Jf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fu(e,t,n,r){return r!==null&&jy(r),Aa(t,e.child,null,n),e=$y(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wA(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Im(Error(ae(422))),Fu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Jf({mode:"visible",children:r.children},s,0,null),o=ni(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Aa(t,e.child,null,i),t.child.memoizedState=tg(i),t.memoizedState=eg,o);if(!(t.mode&1))return Fu(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ae(419)),r=Im(o,r,void 0),Fu(e,t,i,r)}if(a=(i&e.childLanes)!==0,An||a){if(r=Jt,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Is(e,s),Nr(r,e,s,-1))}return Yy(),r=Im(Error(ae(421))),Fu(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=DA.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Vn=vo(s.nextSibling),Bn=t,Pt=!0,br=null,e!==null&&(sr[or++]=ks,sr[or++]=Cs,sr[or++]=ci,ks=e.id,Cs=e.overflow,ci=t),t=$y(t,r.children),t.flags|=4096,t)}function aw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gp(e.return,t,n)}function Mm(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function dS(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(bn(e,t,r.children,n),r=Dt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&aw(e,n,t);else if(e.tag===19)aw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(bt(Dt,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Wd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Mm(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Mm(t,!0,n,null,o);break;case"together":Mm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ms(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),di|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=_o(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_o(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bA(e,t,n){switch(t.tag){case 3:cS(t),Ra();break;case 5:L_(t);break;case 1:On(t.type)&&zd(t);break;case 4:Ay(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;bt(Ud,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(bt(Dt,Dt.current&1),t.flags|=128,null):n&t.child.childLanes?uS(e,t,n):(bt(Dt,Dt.current&1),e=Ms(e,t,n),e!==null?e.sibling:null);bt(Dt,Dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(Dt,Dt.current),r)break;return null;case 22:case 23:return t.lanes=0,aS(e,t,n)}return Ms(e,t,n)}var fS,ng,hS,mS;fS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ng=function(){};hS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Go(Jr.current);var o=null;switch(n){case"input":s=kp(e,s),r=kp(e,r),o=[];break;case"select":s=Mt({},s,{value:void 0}),r=Mt({},r,{value:void 0}),o=[];break;case"textarea":s=Ep(e,s),r=Ep(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Md)}Tp(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(rc.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&a[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(rc.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&St("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};mS=function(e,t,n,r){n!==r&&(t.flags|=4)};function vl(e,t){if(!Pt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _A(e,t,n){var r=t.pendingProps;switch(Cy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(t),null;case 1:return On(t.type)&&Ld(),hn(t),null;case 3:return r=t.stateNode,Da(),kt(Dn),kt(gn),Oy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Lu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,br!==null&&(ug(br),br=null))),ng(e,t),hn(t),null;case 5:Dy(t);var s=Go(pc.current);if(n=t.type,e!==null&&t.stateNode!=null)hS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return hn(t),null}if(e=Go(Jr.current),Lu(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Wr]=t,r[hc]=o,e=(t.mode&1)!==0,n){case"dialog":St("cancel",r),St("close",r);break;case"iframe":case"object":case"embed":St("load",r);break;case"video":case"audio":for(s=0;s<Ol.length;s++)St(Ol[s],r);break;case"source":St("error",r);break;case"img":case"image":case"link":St("error",r),St("load",r);break;case"details":St("toggle",r);break;case"input":g0(r,o),St("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},St("invalid",r);break;case"textarea":v0(r,o),St("invalid",r)}Tp(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,a,e),s=["children",""+a]):rc.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&St("scroll",r)}switch(n){case"input":Nu(r),y0(r,o,!0);break;case"textarea":Nu(r),x0(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Md)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=V1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Wr]=t,e[hc]=r,fS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Pp(n,r),n){case"dialog":St("cancel",e),St("close",e),s=r;break;case"iframe":case"object":case"embed":St("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ol.length;s++)St(Ol[s],e);s=r;break;case"source":St("error",e),s=r;break;case"img":case"image":case"link":St("error",e),St("load",e),s=r;break;case"details":St("toggle",e),s=r;break;case"input":g0(e,r),s=kp(e,r),St("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Mt({},r,{value:void 0}),St("invalid",e);break;case"textarea":v0(e,r),s=Ep(e,r),St("invalid",e);break;default:s=r}Tp(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?H1(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&B1(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&sc(e,c):typeof c=="number"&&sc(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(rc.hasOwnProperty(o)?c!=null&&o==="onScroll"&&St("scroll",e):c!=null&&uy(e,o,c,i))}switch(n){case"input":Nu(e),y0(e,r,!1);break;case"textarea":Nu(e),x0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+jo(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ma(e,!!r.multiple,o,!1):r.defaultValue!=null&&ma(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Md)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return hn(t),null;case 6:if(e&&t.stateNode!=null)mS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ae(166));if(n=Go(pc.current),Go(Jr.current),Lu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Wr]=t,(o=r.nodeValue!==n)&&(e=Bn,e!==null))switch(e.tag){case 3:Mu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mu(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Wr]=t,t.stateNode=r}return hn(t),null;case 13:if(kt(Dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pt&&Vn!==null&&t.mode&1&&!(t.flags&128))A_(),Ra(),t.flags|=98560,o=!1;else if(o=Lu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ae(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ae(317));o[Wr]=t}else Ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hn(t),o=!1}else br!==null&&(ug(br),br=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Dt.current&1?Zt===0&&(Zt=3):Yy())),t.updateQueue!==null&&(t.flags|=4),hn(t),null);case 4:return Da(),ng(e,t),e===null&&dc(t.stateNode.containerInfo),hn(t),null;case 10:return Ty(t.type._context),hn(t),null;case 17:return On(t.type)&&Ld(),hn(t),null;case 19:if(kt(Dt),o=t.memoizedState,o===null)return hn(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)vl(o,!1);else{if(Zt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Wd(e),i!==null){for(t.flags|=128,vl(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return bt(Dt,Dt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ut()>Ia&&(t.flags|=128,r=!0,vl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Wd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Pt)return hn(t),null}else 2*Ut()-o.renderingStartTime>Ia&&n!==1073741824&&(t.flags|=128,r=!0,vl(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ut(),t.sibling=null,n=Dt.current,bt(Dt,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return Hy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Fn&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function SA(e,t){switch(Cy(t),t.tag){case 1:return On(t.type)&&Ld(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Da(),kt(Dn),kt(gn),Oy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dy(t),null;case 13:if(kt(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kt(Dt),null;case 4:return Da(),null;case 10:return Ty(t.type._context),null;case 22:case 23:return Hy(),null;case 24:return null;default:return null}}var $u=!1,mn=!1,kA=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function oa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){zt(e,t,r)}else n.current=null}function rg(e,t,n){try{n()}catch(r){zt(e,t,r)}}var lw=!1;function CA(e,t){if($p=Dd,e=x_(),Sy(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=i),h===o&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Up={focusedElem:e,selectionRange:n},Dd=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var p=x.memoizedProps,w=x.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:vr(t.type,p),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(_){zt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return x=lw,lw=!1,x}function Zl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&rg(t,n,o)}s=s.next}while(s!==r)}}function Xf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pS(e){var t=e.alternate;t!==null&&(e.alternate=null,pS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wr],delete t[hc],delete t[Wp],delete t[aA],delete t[lA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gS(e){return e.tag===5||e.tag===3||e.tag===4}function cw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gS(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.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 og(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Md));else if(r!==4&&(e=e.child,e!==null))for(og(e,t,n),e=e.sibling;e!==null;)og(e,t,n),e=e.sibling}function ig(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ig(e,t,n),e=e.sibling;e!==null;)ig(e,t,n),e=e.sibling}var nn=null,xr=!1;function Js(e,t,n){for(n=n.child;n!==null;)yS(e,t,n),n=n.sibling}function yS(e,t,n){if(Qr&&typeof Qr.onCommitFiberUnmount=="function")try{Qr.onCommitFiberUnmount(Bf,n)}catch{}switch(n.tag){case 5:mn||oa(n,t);case 6:var r=nn,s=xr;nn=null,Js(e,t,n),nn=r,xr=s,nn!==null&&(xr?(e=nn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nn.removeChild(n.stateNode));break;case 18:nn!==null&&(xr?(e=nn,n=n.stateNode,e.nodeType===8?Tm(e.parentNode,n):e.nodeType===1&&Tm(e,n),lc(e)):Tm(nn,n.stateNode));break;case 4:r=nn,s=xr,nn=n.stateNode.containerInfo,xr=!0,Js(e,t,n),nn=r,xr=s;break;case 0:case 11:case 14:case 15:if(!mn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&rg(n,t,i),s=s.next}while(s!==r)}Js(e,t,n);break;case 1:if(!mn&&(oa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){zt(n,t,a)}Js(e,t,n);break;case 21:Js(e,t,n);break;case 22:n.mode&1?(mn=(r=mn)||n.memoizedState!==null,Js(e,t,n),mn=r):Js(e,t,n);break;default:Js(e,t,n)}}function uw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kA),t.forEach(function(r){var s=OA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function yr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:nn=a.stateNode,xr=!1;break e;case 3:nn=a.stateNode.containerInfo,xr=!0;break e;case 4:nn=a.stateNode.containerInfo,xr=!0;break e}a=a.return}if(nn===null)throw Error(ae(160));yS(o,i,s),nn=null,xr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){zt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vS(t,e),t=t.sibling}function vS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yr(t,e),Vr(e),r&4){try{Zl(3,e,e.return),Xf(3,e)}catch(p){zt(e,e.return,p)}try{Zl(5,e,e.return)}catch(p){zt(e,e.return,p)}}break;case 1:yr(t,e),Vr(e),r&512&&n!==null&&oa(n,n.return);break;case 5:if(yr(t,e),Vr(e),r&512&&n!==null&&oa(n,n.return),e.flags&32){var s=e.stateNode;try{sc(s,"")}catch(p){zt(e,e.return,p)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&$1(s,o),Pp(a,i);var u=Pp(a,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?H1(s,f):d==="dangerouslySetInnerHTML"?B1(s,f):d==="children"?sc(s,f):uy(s,d,f,u)}switch(a){case"input":Cp(s,o);break;case"textarea":U1(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?ma(s,!!o.multiple,m,!1):h!==!!o.multiple&&(o.defaultValue!=null?ma(s,!!o.multiple,o.defaultValue,!0):ma(s,!!o.multiple,o.multiple?[]:"",!1))}s[hc]=o}catch(p){zt(e,e.return,p)}}break;case 6:if(yr(t,e),Vr(e),r&4){if(e.stateNode===null)throw Error(ae(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(p){zt(e,e.return,p)}}break;case 3:if(yr(t,e),Vr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{lc(t.containerInfo)}catch(p){zt(e,e.return,p)}break;case 4:yr(t,e),Vr(e);break;case 13:yr(t,e),Vr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(By=Ut())),r&4&&uw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(mn=(u=mn)||d,yr(t,e),mn=u):yr(t,e),Vr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ne=e,d=e.child;d!==null;){for(f=Ne=d;Ne!==null;){switch(h=Ne,m=h.child,h.tag){case 0:case 11:case 14:case 15:Zl(4,h,h.return);break;case 1:oa(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(p){zt(r,n,p)}}break;case 5:oa(h,h.return);break;case 22:if(h.memoizedState!==null){fw(f);continue}}m!==null?(m.return=h,Ne=m):fw(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=W1("display",i))}catch(p){zt(e,e.return,p)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){zt(e,e.return,p)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:yr(t,e),Vr(e),r&4&&uw(e);break;case 21:break;default:yr(t,e),Vr(e)}}function Vr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gS(n)){var r=n;break e}n=n.return}throw Error(ae(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(sc(s,""),r.flags&=-33);var o=cw(e);ig(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=cw(e);og(e,a,i);break;default:throw Error(ae(161))}}catch(c){zt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jA(e,t,n){Ne=e,xS(e)}function xS(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var s=Ne,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||$u;if(!i){var a=s.alternate,c=a!==null&&a.memoizedState!==null||mn;a=$u;var u=mn;if($u=i,(mn=c)&&!u)for(Ne=s;Ne!==null;)i=Ne,c=i.child,i.tag===22&&i.memoizedState!==null?hw(s):c!==null?(c.return=i,Ne=c):hw(s);for(;o!==null;)Ne=o,xS(o),o=o.sibling;Ne=s,$u=a,mn=u}dw(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Ne=o):dw(e)}}function dw(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mn||Xf(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mn)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:vr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Z0(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Z0(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&lc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ae(163))}mn||t.flags&512&&sg(t)}catch(h){zt(t,t.return,h)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function fw(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function hw(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xf(4,t)}catch(c){zt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){zt(t,s,c)}}var o=t.return;try{sg(t)}catch(c){zt(t,o,c)}break;case 5:var i=t.return;try{sg(t)}catch(c){zt(t,i,c)}}}catch(c){zt(t,t.return,c)}if(t===e){Ne=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Ne=a;break}Ne=t.return}}var EA=Math.ceil,Kd=Vs.ReactCurrentDispatcher,Uy=Vs.ReactCurrentOwner,lr=Vs.ReactCurrentBatchConfig,ut=0,Jt=null,Ht=null,rn=0,Fn=0,ia=Mo(0),Zt=0,xc=null,di=0,Qf=0,Vy=0,ql=null,Rn=null,By=0,Ia=1/0,ws=null,Gd=!1,ag=null,wo=null,Uu=!1,uo=null,Zd=0,Xl=0,lg=null,hd=-1,md=0;function Sn(){return ut&6?Ut():hd!==-1?hd:hd=Ut()}function bo(e){return e.mode&1?ut&2&&rn!==0?rn&-rn:uA.transition!==null?(md===0&&(md=r_()),md):(e=gt,e!==0||(e=window.event,e=e===void 0?16:u_(e.type)),e):1}function Nr(e,t,n,r){if(50<Xl)throw Xl=0,lg=null,Error(ae(185));Zc(e,n,r),(!(ut&2)||e!==Jt)&&(e===Jt&&(!(ut&2)&&(Qf|=n),Zt===4&&ao(e,rn)),In(e,r),n===1&&ut===0&&!(t.mode&1)&&(Ia=Ut()+500,Gf&&Lo()))}function In(e,t){var n=e.callbackNode;uR(e,t);var r=Ad(e,e===Jt?rn:0);if(r===0)n!==null&&_0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_0(n),t===1)e.tag===0?cA(mw.bind(null,e)):T_(mw.bind(null,e)),oA(function(){!(ut&6)&&Lo()}),n=null;else{switch(s_(r)){case 1:n=py;break;case 4:n=t_;break;case 16:n=Rd;break;case 536870912:n=n_;break;default:n=Rd}n=ES(n,wS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wS(e,t){if(hd=-1,md=0,ut&6)throw Error(ae(327));var n=e.callbackNode;if(xa()&&e.callbackNode!==n)return null;var r=Ad(e,e===Jt?rn:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=qd(e,r);else{t=r;var s=ut;ut|=2;var o=_S();(Jt!==e||rn!==t)&&(ws=null,Ia=Ut()+500,ti(e,t));do try{PA();break}catch(a){bS(e,a)}while(!0);Ny(),Kd.current=o,ut=s,Ht!==null?t=0:(Jt=null,rn=0,t=Zt)}if(t!==0){if(t===2&&(s=Ip(e),s!==0&&(r=s,t=cg(e,s))),t===1)throw n=xc,ti(e,0),ao(e,r),In(e,Ut()),n;if(t===6)ao(e,r);else{if(s=e.current.alternate,!(r&30)&&!NA(s)&&(t=qd(e,r),t===2&&(o=Ip(e),o!==0&&(r=o,t=cg(e,o))),t===1))throw n=xc,ti(e,0),ao(e,r),In(e,Ut()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(ae(345));case 2:Bo(e,Rn,ws);break;case 3:if(ao(e,r),(r&130023424)===r&&(t=By+500-Ut(),10<t)){if(Ad(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Sn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Bp(Bo.bind(null,e,Rn,ws),t);break}Bo(e,Rn,ws);break;case 4:if(ao(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Er(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*EA(r/1960))-r,10<r){e.timeoutHandle=Bp(Bo.bind(null,e,Rn,ws),r);break}Bo(e,Rn,ws);break;case 5:Bo(e,Rn,ws);break;default:throw Error(ae(329))}}}return In(e,Ut()),e.callbackNode===n?wS.bind(null,e):null}function cg(e,t){var n=ql;return e.current.memoizedState.isDehydrated&&(ti(e,t).flags|=256),e=qd(e,t),e!==2&&(t=Rn,Rn=n,t!==null&&ug(t)),e}function ug(e){Rn===null?Rn=e:Rn.push.apply(Rn,e)}function NA(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Pr(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ao(e,t){for(t&=~Vy,t&=~Qf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Er(t),r=1<<n;e[n]=-1,t&=~r}}function mw(e){if(ut&6)throw Error(ae(327));xa();var t=Ad(e,0);if(!(t&1))return In(e,Ut()),null;var n=qd(e,t);if(e.tag!==0&&n===2){var r=Ip(e);r!==0&&(t=r,n=cg(e,r))}if(n===1)throw n=xc,ti(e,0),ao(e,t),In(e,Ut()),n;if(n===6)throw Error(ae(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bo(e,Rn,ws),In(e,Ut()),null}function Wy(e,t){var n=ut;ut|=1;try{return e(t)}finally{ut=n,ut===0&&(Ia=Ut()+500,Gf&&Lo())}}function fi(e){uo!==null&&uo.tag===0&&!(ut&6)&&xa();var t=ut;ut|=1;var n=lr.transition,r=gt;try{if(lr.transition=null,gt=1,e)return e()}finally{gt=r,lr.transition=n,ut=t,!(ut&6)&&Lo()}}function Hy(){Fn=ia.current,kt(ia)}function ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,sA(n)),Ht!==null)for(n=Ht.return;n!==null;){var r=n;switch(Cy(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ld();break;case 3:Da(),kt(Dn),kt(gn),Oy();break;case 5:Dy(r);break;case 4:Da();break;case 13:kt(Dt);break;case 19:kt(Dt);break;case 10:Ty(r.type._context);break;case 22:case 23:Hy()}n=n.return}if(Jt=e,Ht=e=_o(e.current,null),rn=Fn=t,Zt=0,xc=null,Vy=Qf=di=0,Rn=ql=null,Ko!==null){for(t=0;t<Ko.length;t++)if(n=Ko[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}Ko=null}return e}function bS(e,t){do{var n=Ht;try{if(Ny(),ud.current=Yd,Hd){for(var r=It.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Hd=!1}if(ui=0,Qt=Gt=It=null,Gl=!1,gc=0,Uy.current=null,n===null||n.return===null){Zt=1,xc=t,Ht=null;break}e:{var o=e,i=n.return,a=n,c=t;if(t=rn,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=tw(i);if(m!==null){m.flags&=-257,nw(m,i,a,o,t),m.mode&1&&ew(o,u,t),t=m,c=u;var x=t.updateQueue;if(x===null){var p=new Set;p.add(c),t.updateQueue=p}else x.add(c);break e}else{if(!(t&1)){ew(o,u,t),Yy();break e}c=Error(ae(426))}}else if(Pt&&a.mode&1){var w=tw(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),nw(w,i,a,o,t),jy(Oa(c,a));break e}}o=c=Oa(c,a),Zt!==4&&(Zt=2),ql===null?ql=[o]:ql.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=sS(o,c,t);G0(o,g);break e;case 1:a=c;var v=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(wo===null||!wo.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=oS(o,a,t);G0(o,_);break e}}o=o.return}while(o!==null)}kS(n)}catch(C){t=C,Ht===n&&n!==null&&(Ht=n=n.return);continue}break}while(!0)}function _S(){var e=Kd.current;return Kd.current=Yd,e===null?Yd:e}function Yy(){(Zt===0||Zt===3||Zt===2)&&(Zt=4),Jt===null||!(di&268435455)&&!(Qf&268435455)||ao(Jt,rn)}function qd(e,t){var n=ut;ut|=2;var r=_S();(Jt!==e||rn!==t)&&(ws=null,ti(e,t));do try{TA();break}catch(s){bS(e,s)}while(!0);if(Ny(),ut=n,Kd.current=r,Ht!==null)throw Error(ae(261));return Jt=null,rn=0,Zt}function TA(){for(;Ht!==null;)SS(Ht)}function PA(){for(;Ht!==null&&!tR();)SS(Ht)}function SS(e){var t=jS(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,t===null?kS(e):Ht=t,Uy.current=null}function kS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=SA(n,t),n!==null){n.flags&=32767,Ht=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Zt=6,Ht=null;return}}else if(n=_A(n,t,Fn),n!==null){Ht=n;return}if(t=t.sibling,t!==null){Ht=t;return}Ht=t=e}while(t!==null);Zt===0&&(Zt=5)}function Bo(e,t,n){var r=gt,s=lr.transition;try{lr.transition=null,gt=1,RA(e,t,n,r)}finally{lr.transition=s,gt=r}return null}function RA(e,t,n,r){do xa();while(uo!==null);if(ut&6)throw Error(ae(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ae(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(dR(e,o),e===Jt&&(Ht=Jt=null,rn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Uu||(Uu=!0,ES(Rd,function(){return xa(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=lr.transition,lr.transition=null;var i=gt;gt=1;var a=ut;ut|=4,Uy.current=null,CA(e,n),vS(n,e),XR(Up),Dd=!!$p,Up=$p=null,e.current=n,jA(n),nR(),ut=a,gt=i,lr.transition=o}else e.current=n;if(Uu&&(Uu=!1,uo=e,Zd=s),o=e.pendingLanes,o===0&&(wo=null),oR(n.stateNode),In(e,Ut()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Gd)throw Gd=!1,e=ag,ag=null,e;return Zd&1&&e.tag!==0&&xa(),o=e.pendingLanes,o&1?e===lg?Xl++:(Xl=0,lg=e):Xl=0,Lo(),null}function xa(){if(uo!==null){var e=s_(Zd),t=lr.transition,n=gt;try{if(lr.transition=null,gt=16>e?16:e,uo===null)var r=!1;else{if(e=uo,uo=null,Zd=0,ut&6)throw Error(ae(331));var s=ut;for(ut|=4,Ne=e.current;Ne!==null;){var o=Ne,i=o.child;if(Ne.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(Ne=u;Ne!==null;){var d=Ne;switch(d.tag){case 0:case 11:case 15:Zl(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ne=f;else for(;Ne!==null;){d=Ne;var h=d.sibling,m=d.return;if(pS(d),d===u){Ne=null;break}if(h!==null){h.return=m,Ne=h;break}Ne=m}}}var x=o.alternate;if(x!==null){var p=x.child;if(p!==null){x.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}Ne=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,Ne=i;else e:for(;Ne!==null;){if(o=Ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Zl(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,Ne=g;break e}Ne=o.return}}var v=e.current;for(Ne=v;Ne!==null;){i=Ne;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,Ne=b;else e:for(i=v;Ne!==null;){if(a=Ne,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Xf(9,a)}}catch(C){zt(a,a.return,C)}if(a===i){Ne=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,Ne=_;break e}Ne=a.return}}if(ut=s,Lo(),Qr&&typeof Qr.onPostCommitFiberRoot=="function")try{Qr.onPostCommitFiberRoot(Bf,e)}catch{}r=!0}return r}finally{gt=n,lr.transition=t}}return!1}function pw(e,t,n){t=Oa(n,t),t=sS(e,t,1),e=xo(e,t,1),t=Sn(),e!==null&&(Zc(e,1,t),In(e,t))}function zt(e,t,n){if(e.tag===3)pw(e,e,n);else for(;t!==null;){if(t.tag===3){pw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(wo===null||!wo.has(r))){e=Oa(n,e),e=oS(t,e,1),t=xo(t,e,1),e=Sn(),t!==null&&(Zc(t,1,e),In(t,e));break}}t=t.return}}function AA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Sn(),e.pingedLanes|=e.suspendedLanes&n,Jt===e&&(rn&n)===n&&(Zt===4||Zt===3&&(rn&130023424)===rn&&500>Ut()-By?ti(e,0):Vy|=n),In(e,t)}function CS(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=Sn();e=Is(e,t),e!==null&&(Zc(e,t,n),In(e,n))}function DA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),CS(e,n)}function OA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),CS(e,n)}var jS;jS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Dn.current)An=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return An=!1,bA(e,t,n);An=!!(e.flags&131072)}else An=!1,Pt&&t.flags&1048576&&P_(t,$d,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fd(e,t),e=t.pendingProps;var s=Pa(t,gn.current);va(t,n),s=My(null,t,r,e,s,n);var o=Ly();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,On(r)?(o=!0,zd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ry(t),s.updater=qf,t.stateNode=s,s._reactInternals=t,qp(t,r,e,n),t=Jp(null,t,r,!0,o,n)):(t.tag=0,Pt&&o&&ky(t),bn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=MA(r),e=vr(r,e),s){case 0:t=Qp(null,t,r,e,n);break e;case 1:t=ow(null,t,r,e,n);break e;case 11:t=rw(null,t,r,e,n);break e;case 14:t=sw(null,t,r,vr(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),Qp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),ow(e,t,r,s,n);case 3:e:{if(cS(t),e===null)throw Error(ae(387));r=t.pendingProps,o=t.memoizedState,s=o.element,M_(e,t),Bd(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Oa(Error(ae(423)),t),t=iw(e,t,r,n,s);break e}else if(r!==s){s=Oa(Error(ae(424)),t),t=iw(e,t,r,n,s);break e}else for(Vn=vo(t.stateNode.containerInfo.firstChild),Bn=t,Pt=!0,br=null,n=O_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ra(),r===s){t=Ms(e,t,n);break e}bn(e,t,r,n)}t=t.child}return t;case 5:return L_(t),e===null&&Kp(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Vp(r,s)?i=null:o!==null&&Vp(r,o)&&(t.flags|=32),lS(e,t),bn(e,t,i,n),t.child;case 6:return e===null&&Kp(t),null;case 13:return uS(e,t,n);case 4:return Ay(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):bn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),rw(e,t,r,s,n);case 7:return bn(e,t,t.pendingProps,n),t.child;case 8:return bn(e,t,t.pendingProps.children,n),t.child;case 12:return bn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,bt(Ud,r._currentValue),r._currentValue=i,o!==null)if(Pr(o.value,i)){if(o.children===s.children&&!Dn.current){t=Ms(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ns(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Gp(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(ae(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Gp(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}bn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,va(t,n),s=fr(s),r=r(s),t.flags|=1,bn(e,t,r,n),t.child;case 14:return r=t.type,s=vr(r,t.pendingProps),s=vr(r.type,s),sw(e,t,r,s,n);case 15:return iS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),fd(e,t),t.tag=1,On(r)?(e=!0,zd(t)):e=!1,va(t,n),rS(t,r,s),qp(t,r,s,n),Jp(null,t,r,!0,e,n);case 19:return dS(e,t,n);case 22:return aS(e,t,n)}throw Error(ae(156,t.tag))};function ES(e,t){return e_(e,t)}function IA(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(e,t,n,r){return new IA(e,t,n,r)}function Ky(e){return e=e.prototype,!(!e||!e.isReactComponent)}function MA(e){if(typeof e=="function")return Ky(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fy)return 11;if(e===hy)return 14}return 2}function _o(e,t){var n=e.alternate;return n===null?(n=ar(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function pd(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Ky(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case qi:return ni(n.children,s,o,t);case dy:i=8,s|=8;break;case wp:return e=ar(12,n,t,s|2),e.elementType=wp,e.lanes=o,e;case bp:return e=ar(13,n,t,s),e.elementType=bp,e.lanes=o,e;case _p:return e=ar(19,n,t,s),e.elementType=_p,e.lanes=o,e;case L1:return Jf(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I1:i=10;break e;case M1:i=9;break e;case fy:i=11;break e;case hy:i=14;break e;case so:i=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=ar(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ni(e,t,n,r){return e=ar(7,e,r,t),e.lanes=n,e}function Jf(e,t,n,r){return e=ar(22,e,r,t),e.elementType=L1,e.lanes=n,e.stateNode={isHidden:!1},e}function Lm(e,t,n){return e=ar(6,e,null,t),e.lanes=n,e}function zm(e,t,n){return t=ar(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function LA(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vm(0),this.expirationTimes=vm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Gy(e,t,n,r,s,o,i,a,c){return e=new LA(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ar(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ry(o),e}function zA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Zi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function NS(e){if(!e)return Eo;e=e._reactInternals;e:{if(ki(e)!==e||e.tag!==1)throw Error(ae(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(On(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ae(171))}if(e.tag===1){var n=e.type;if(On(n))return N_(e,n,t)}return t}function TS(e,t,n,r,s,o,i,a,c){return e=Gy(n,r,!0,e,s,o,i,a,c),e.context=NS(null),n=e.current,r=Sn(),s=bo(n),o=Ns(r,s),o.callback=t??null,xo(n,o,s),e.current.lanes=s,Zc(e,s,r),In(e,r),e}function eh(e,t,n,r){var s=t.current,o=Sn(),i=bo(s);return n=NS(n),t.context===null?t.context=n:t.pendingContext=n,t=Ns(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xo(s,t,i),e!==null&&(Nr(e,s,i,o),cd(e,s,i)),i}function Xd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function gw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zy(e,t){gw(e,t),(e=e.alternate)&&gw(e,t)}function FA(){return null}var PS=typeof reportError=="function"?reportError:function(e){console.error(e)};function qy(e){this._internalRoot=e}th.prototype.render=qy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ae(409));eh(e,t,null,null)};th.prototype.unmount=qy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fi(function(){eh(null,e,null,null)}),t[Os]=null}};function th(e){this._internalRoot=e}th.prototype.unstable_scheduleHydration=function(e){if(e){var t=a_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<io.length&&t!==0&&t<io[n].priority;n++);io.splice(n,0,e),n===0&&c_(e)}};function Xy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yw(){}function $A(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Xd(i);o.call(u)}}var i=TS(t,r,e,0,null,!1,!1,"",yw);return e._reactRootContainer=i,e[Os]=i.current,dc(e.nodeType===8?e.parentNode:e),fi(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Xd(c);a.call(u)}}var c=Gy(e,0,!1,null,null,!1,!1,"",yw);return e._reactRootContainer=c,e[Os]=c.current,dc(e.nodeType===8?e.parentNode:e),fi(function(){eh(t,c,n,r)}),c}function rh(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var c=Xd(i);a.call(c)}}eh(t,i,e,s)}else i=$A(n,t,e,s,r);return Xd(i)}o_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Dl(t.pendingLanes);n!==0&&(gy(t,n|1),In(t,Ut()),!(ut&6)&&(Ia=Ut()+500,Lo()))}break;case 13:fi(function(){var r=Is(e,1);if(r!==null){var s=Sn();Nr(r,e,1,s)}}),Zy(e,1)}};yy=function(e){if(e.tag===13){var t=Is(e,134217728);if(t!==null){var n=Sn();Nr(t,e,134217728,n)}Zy(e,134217728)}};i_=function(e){if(e.tag===13){var t=bo(e),n=Is(e,t);if(n!==null){var r=Sn();Nr(n,e,t,r)}Zy(e,t)}};a_=function(){return gt};l_=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}};Ap=function(e,t,n){switch(t){case"input":if(Cp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Kf(r);if(!s)throw Error(ae(90));F1(r),Cp(r,s)}}}break;case"textarea":U1(e,n);break;case"select":t=n.value,t!=null&&ma(e,!!n.multiple,t,!1)}};G1=Wy;Z1=fi;var UA={usingClientEntryPoint:!1,Events:[Xc,ea,Kf,Y1,K1,Wy]},xl={findFiberByHostInstance:Yo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},VA={bundleType:xl.bundleType,version:xl.version,rendererPackageName:xl.rendererPackageName,rendererConfig:xl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Q1(e),e===null?null:e.stateNode},findFiberByHostInstance:xl.findFiberByHostInstance||FA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Bf=Vu.inject(VA),Qr=Vu}catch{}}Qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=UA;Qn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xy(t))throw Error(ae(200));return zA(e,t,null,n)};Qn.createRoot=function(e,t){if(!Xy(e))throw Error(ae(299));var n=!1,r="",s=PS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Gy(e,1,!1,null,null,n,!1,r,s),e[Os]=t.current,dc(e.nodeType===8?e.parentNode:e),new qy(t)};Qn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ae(188)):(e=Object.keys(e).join(","),Error(ae(268,e)));return e=Q1(t),e=e===null?null:e.stateNode,e};Qn.flushSync=function(e){return fi(e)};Qn.hydrate=function(e,t,n){if(!nh(t))throw Error(ae(200));return rh(null,e,t,!0,n)};Qn.hydrateRoot=function(e,t,n){if(!Xy(e))throw Error(ae(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=PS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=TS(t,null,e,1,n??null,s,!1,o,i),e[Os]=t.current,dc(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new th(t)};Qn.render=function(e,t,n){if(!nh(t))throw Error(ae(200));return rh(null,e,t,!1,n)};Qn.unmountComponentAtNode=function(e){if(!nh(e))throw Error(ae(40));return e._reactRootContainer?(fi(function(){rh(null,null,e,!1,function(){e._reactRootContainer=null,e[Os]=null})}),!0):!1};Qn.unstable_batchedUpdates=Wy;Qn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nh(n))throw Error(ae(200));if(e==null||e._reactInternals===void 0)throw Error(ae(38));return rh(e,t,n,!1,r)};Qn.version="18.3.1-next-f1338f8080-20240426";function RS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RS)}catch(e){console.error(e)}}RS(),R1.exports=Qn;var Bs=R1.exports;const AS=Uf(Bs),BA=v1({__proto__:null,default:AS},[Bs]);var vw=Bs;vp.createRoot=vw.createRoot,vp.hydrateRoot=vw.hydrateRoot;/** - * @remix-run/router v1.18.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}var Wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Wt||(Wt={}));const xw="popstate";function WA(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:c=""}=Ws(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),wc("",{pathname:i,search:a,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){let i=s.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let c=s.location.href,u=c.indexOf("#");a=u===-1?c:c.slice(0,u)}return a+"#"+(typeof o=="string"?o:mi(o))}function r(s,o){hi(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return YA(t,n,r,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function HA(){return Math.random().toString(36).substr(2,8)}function ww(e,t){return{usr:e.state,key:e.key,idx:t}}function wc(e,t,n,r){return n===void 0&&(n=null),At({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ws(t):t,{state:n,key:t&&t.key||r||HA()})}function mi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ws(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function YA(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Wt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(At({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Wt.Pop;let w=d(),g=w==null?null:w-u;u=w,c&&c({action:a,location:p.location,delta:g})}function h(w,g){a=Wt.Push;let v=wc(p.location,w,g);n&&n(v,w),u=d()+1;let b=ww(v,u),_=p.createHref(v);try{i.pushState(b,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(_)}o&&c&&c({action:a,location:p.location,delta:1})}function m(w,g){a=Wt.Replace;let v=wc(p.location,w,g);n&&n(v,w),u=d();let b=ww(v,u),_=p.createHref(v);i.replaceState(b,"",_),o&&c&&c({action:a,location:p.location,delta:0})}function x(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:mi(w);return v=v.replace(/ $/,"%20"),tt(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let p={get action(){return a},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(xw,f),c=w,()=>{s.removeEventListener(xw,f),c=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let g=x(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(w){return i.go(w)}};return p}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const KA=new Set(["lazy","caseSensitive","path","id","index","children"]);function GA(e){return e.index===!0}function bc(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(tt(s.index!==!0||!s.children,"Cannot specify children on an index route"),tt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),GA(s)){let c=At({},s,t(s),{id:a});return r[a]=c,c}else{let c=At({},s,t(s),{id:a,children:void 0});return r[a]=c,s.children&&(c.children=bc(s.children,t,i,r)),c}})}function Ho(e,t,n){return n===void 0&&(n="/"),gd(e,t,n,!1)}function gd(e,t,n,r){let s=typeof t=="string"?Ws(t):t,o=qa(s.pathname||"/",n);if(o==null)return null;let i=DS(e);qA(i);let a=null;for(let c=0;a==null&&c<i.length;++c){let u=aD(o);a=oD(i[c],u,r)}return a}function ZA(e,t){let{route:n,pathname:r,params:s}=e;return{id:n.id,pathname:r,params:s,data:t[n.id],handle:n.handle}}function DS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(tt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ts([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),DS(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:rD(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let c of OS(o.path))s(o,i,c)}),t}function OS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=OS(r.join("/")),a=[];return a.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&a.push(...i),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function qA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const XA=/^:[\w-]+$/,QA=3,JA=2,eD=1,tD=10,nD=-2,bw=e=>e==="*";function rD(e,t){let n=e.split("/"),r=n.length;return n.some(bw)&&(r+=nD),t&&(r+=JA),n.filter(s=>!bw(s)).reduce((s,o)=>s+(XA.test(o)?QA:o===""?eD:tD),r)}function sD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function oD(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=_w({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=_w({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:Ts([o,f.pathname]),pathnameBase:uD(Ts([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=Ts([o,f.pathnameBase]))}return i}function _w(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=iD(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=a[f]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const x=a[f];return m&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function iD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),hi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function aD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function qa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function lD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ws(e):e;return{pathname:n?n.startsWith("/")?n:cD(n,t):t,search:dD(r),hash:fD(s)}}function cD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Fm(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function IS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sh(e,t){let n=IS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function oh(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ws(e):(s=At({},e),tt(!s.pathname||!s.pathname.includes("?"),Fm("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),Fm("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),Fm("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let c=lD(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ts=e=>e.join("/").replace(/\/\/+/g,"/"),uD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Qy{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ih(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const MS=["post","put","patch","delete"],hD=new Set(MS),mD=["get",...MS],pD=new Set(mD),gD=new Set([301,302,303,307,308]),yD=new Set([307,308]),$m={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vD={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),LS="remix-router-transitions";function wD(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;tt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let V=e.detectErrorBoundary;s=H=>({hasErrorBoundary:V(H)})}else s=xD;let o={},i=bc(e.routes,s,void 0,o),a,c=e.basename||"/",u=e.unstable_dataStrategy||CD,d=e.unstable_patchRoutesOnMiss,f=At({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,x=null,p=null,w=null,g=e.hydrationData!=null,v=Ho(i,e.history.location,c),b=null;if(v==null&&!d){let V=xn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=Aw(i);v=H,b={[q.id]:V}}v&&d&&!e.hydrationData&&fm(v,i,e.history.location.pathname).active&&(v=null);let _;if(!v)_=!1,v=[];else if(v.some(V=>V.route.lazy))_=!1;else if(!v.some(V=>V.route.loader))_=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,q=ne=>ne.route.loader?typeof ne.route.loader=="function"&&ne.route.loader.hydrate===!0?!1:V&&V[ne.route.id]!==void 0||H&&H[ne.route.id]!==void 0:!0;if(H){let ne=v.findIndex(_e=>H[_e.route.id]!==void 0);_=v.slice(0,ne+1).every(q)}else _=v.every(q)}else _=e.hydrationData!=null;let C,j={historyAction:e.history.action,location:e.history.location,matches:v,initialized:_,navigation:$m,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=Wt.Pop,R=!1,A,O=!1,G=new Map,N=null,z=!1,S=!1,U=[],J=[],F=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,he=new Map,se=new Set,oe=new Map,Oe=new Map,me=new Map,we=!1;function Te(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:ne}=V;if(we){we=!1;return}hi(Oe.size===0||ne!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let _e=wu({currentLocation:j.location,nextLocation:q,historyAction:H});if(_e&&ne!=null){we=!0,e.history.go(ne*-1),Di(_e,{state:"blocked",location:q,proceed(){Di(_e,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(ne)},reset(){let Ae=new Map(j.blockers);Ae.set(_e,wl),Re({blockers:Ae})}});return}return Z(H,q)}),n){zD(t,G);let V=()=>FD(t,G);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return j.initialized||Z(Wt.Pop,j.location,{initialHydration:!0}),C}function Fe(){h&&h(),N&&N(),m.clear(),A&&A.abort(),j.fetchers.forEach((V,H)=>Yt(H)),j.blockers.forEach((V,H)=>xu(H))}function Ie(V){return m.add(V),()=>m.delete(V)}function Re(V,H){H===void 0&&(H={}),j=At({},j,V);let q=[],ne=[];f.v7_fetcherPersist&&j.fetchers.forEach((_e,Ae)=>{_e.state==="idle"&&(se.has(Ae)?ne.push(Ae):q.push(Ae))}),[...m].forEach(_e=>_e(j,{deletedFetchers:ne,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(_e=>j.fetchers.delete(_e)),ne.forEach(_e=>Yt(_e)))}function st(V,H,q){var ne,_e;let{flushSync:Ae}=q===void 0?{}:q,Be=j.actionData!=null&&j.navigation.formMethod!=null&&wr(j.navigation.formMethod)&&j.navigation.state==="loading"&&((ne=V.state)==null?void 0:ne._isRedirect)!==!0,fe;H.actionData?Object.keys(H.actionData).length>0?fe=H.actionData:fe=null:Be?fe=j.actionData:fe=null;let qe=H.loaderData?Pw(j.loaderData,H.loaderData,H.matches||[],H.errors):j.loaderData,ze=j.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((pt,xt)=>ze.set(xt,wl)));let $e=R===!0||j.navigation.formMethod!=null&&wr(j.navigation.formMethod)&&((_e=V.state)==null?void 0:_e._isRedirect)!==!0;a&&(i=a,a=void 0),z||T===Wt.Pop||(T===Wt.Push?e.history.push(V,V.state):T===Wt.Replace&&e.history.replace(V,V.state));let yt;if(T===Wt.Pop){let pt=G.get(j.location.pathname);pt&&pt.has(V.pathname)?yt={currentLocation:j.location,nextLocation:V}:G.has(V.pathname)&&(yt={currentLocation:V,nextLocation:j.location})}else if(O){let pt=G.get(j.location.pathname);pt?pt.add(V.pathname):(pt=new Set([V.pathname]),G.set(j.location.pathname,pt)),yt={currentLocation:j.location,nextLocation:V}}Re(At({},H,{actionData:fe,loaderData:qe,historyAction:T,location:V,initialized:!0,navigation:$m,revalidation:"idle",restoreScrollPosition:l0(V,H.matches||j.matches),preventScrollReset:$e,blockers:ze}),{viewTransitionOpts:yt,flushSync:Ae===!0}),T=Wt.Pop,R=!1,O=!1,z=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=dg(j.location,j.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ne,submission:_e,error:Ae}=Sw(f.v7_normalizeFormMethod,!1,q,H),Be=j.location,fe=wc(j.location,ne,H&&H.state);fe=At({},fe,e.history.encodeLocation(fe));let qe=H&&H.replace!=null?H.replace:void 0,ze=Wt.Push;qe===!0?ze=Wt.Replace:qe===!1||_e!=null&&wr(_e.formMethod)&&_e.formAction===j.location.pathname+j.location.search&&(ze=Wt.Replace);let $e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,pt=wu({currentLocation:Be,nextLocation:fe,historyAction:ze});if(pt){Di(pt,{state:"blocked",location:fe,proceed(){Di(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),E(V,H)},reset(){let xt=new Map(j.blockers);xt.set(pt,wl),Re({blockers:xt})}});return}return await Z(ze,fe,{submission:_e,pendingError:Ae,preventScrollReset:$e,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ke(),Re({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){Z(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}Z(T||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function Z(V,H,q){A&&A.abort(),A=null,T=V,z=(q&&q.startUninterruptedRevalidation)===!0,hP(j.location,j.matches),R=(q&&q.preventScrollReset)===!0,O=(q&&q.enableViewTransition)===!0;let ne=a||i,_e=q&&q.overrideNavigation,Ae=Ho(ne,H,c),Be=(q&&q.flushSync)===!0,fe=fm(Ae,ne,H.pathname);if(fe.active&&fe.matches&&(Ae=fe.matches),!Ae){let{error:ht,notFoundMatches:tn,route:Bt}=Oi(H.pathname);st(H,{matches:tn,loaderData:{},errors:{[Bt.id]:ht}},{flushSync:Be});return}if(j.initialized&&!S&&RD(j.location,H)&&!(q&&q.submission&&wr(q.submission.formMethod))){st(H,{matches:Ae},{flushSync:Be});return}A=new AbortController;let qe=Fi(e.history,H,A.signal,q&&q.submission),ze;if(q&&q.pendingError)ze=[aa(Ae).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&wr(q.submission.formMethod)){let ht=await D(qe,H,q.submission,Ae,fe.active,{replace:q.replace,flushSync:Be});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[tn,Bt]=ht.pendingActionResult;if($n(Bt)&&ih(Bt.error)&&Bt.error.status===404){A=null,st(H,{matches:ht.matches,loaderData:{},errors:{[tn]:Bt.error}});return}}Ae=ht.matches||Ae,ze=ht.pendingActionResult,_e=Um(H,q.submission),Be=!1,fe.active=!1,qe=Fi(e.history,qe.url,qe.signal)}let{shortCircuited:$e,matches:yt,loaderData:pt,errors:xt}=await k(qe,H,Ae,fe.active,_e,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,Be,ze);$e||(A=null,st(H,At({matches:yt||Ae},Rw(ze),{loaderData:pt,errors:xt})))}async function D(V,H,q,ne,_e,Ae){Ae===void 0&&(Ae={}),Ke();let Be=MD(H,q);if(Re({navigation:Be},{flushSync:Ae.flushSync===!0}),_e){let ze=await bu(ne,H.pathname,V.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){let{boundaryId:$e,error:yt}=$r(H.pathname,ze);return{matches:ze.partialMatches,pendingActionResult:[$e,{type:wt.error,error:yt}]}}else if(ze.matches)ne=ze.matches;else{let{notFoundMatches:$e,error:yt,route:pt}=Oi(H.pathname);return{matches:$e,pendingActionResult:[pt.id,{type:wt.error,error:yt}]}}}let fe,qe=Il(ne,H);if(!qe.route.action&&!qe.route.lazy)fe={type:wt.error,error:xn(405,{method:V.method,pathname:H.pathname,routeId:qe.route.id})};else if(fe=(await te("action",V,[qe],ne))[0],V.signal.aborted)return{shortCircuited:!0};if(qo(fe)){let ze;return Ae&&Ae.replace!=null?ze=Ae.replace:ze=Ew(fe.response.headers.get("Location"),new URL(V.url),c)===j.location.pathname+j.location.search,await Q(V,fe,{submission:q,replace:ze}),{shortCircuited:!0}}if(Zo(fe))throw xn(400,{type:"defer-action"});if($n(fe)){let ze=aa(ne,qe.route.id);return(Ae&&Ae.replace)!==!0&&(T=Wt.Push),{matches:ne,pendingActionResult:[ze.route.id,fe]}}return{matches:ne,pendingActionResult:[qe.route.id,fe]}}async function k(V,H,q,ne,_e,Ae,Be,fe,qe,ze,$e){let yt=_e||Um(H,Ae),pt=Ae||Be||Iw(yt),xt=!z&&(!f.v7_partialHydration||!qe);if(ne){if(xt){let Lt=P($e);Re(At({navigation:yt},Lt!==void 0?{actionData:Lt}:{}),{flushSync:ze})}let Je=await bu(q,H.pathname,V.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let{boundaryId:Lt,error:Mn}=$r(H.pathname,Je);return{matches:Je.partialMatches,loaderData:{},errors:{[Lt]:Mn}}}else if(Je.matches)q=Je.matches;else{let{error:Lt,notFoundMatches:Mn,route:Nt}=Oi(H.pathname);return{matches:Mn,loaderData:{},errors:{[Nt.id]:Lt}}}}let ht=a||i,[tn,Bt]=kw(e.history,j,q,pt,H,f.v7_partialHydration&&qe===!0,f.v7_skipActionErrorRevalidation,S,U,J,se,B,$,ht,c,$e);if(Xs(Je=>!(q&&q.some(Lt=>Lt.route.id===Je))||tn&&tn.some(Lt=>Lt.route.id===Je)),I=++W,tn.length===0&&Bt.length===0){let Je=ms();return st(H,At({matches:q,loaderData:{},errors:$e&&$n($e[1])?{[$e[0]]:$e[1].error}:null},Rw($e),Je?{fetchers:new Map(j.fetchers)}:{}),{flushSync:ze}),{shortCircuited:!0}}if(xt){let Je={};if(!ne){Je.navigation=yt;let Lt=P($e);Lt!==void 0&&(Je.actionData=Lt)}Bt.length>0&&(Je.fetchers=M(Bt)),Re(Je,{flushSync:ze})}Bt.forEach(Je=>{F.has(Je.key)&&ct(Je.key),Je.controller&&F.set(Je.key,Je.controller)});let dl=()=>Bt.forEach(Je=>ct(Je.key));A&&A.signal.addEventListener("abort",dl);let{loaderResults:Qs,fetcherResults:Ii}=await ge(j.matches,q,tn,Bt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",dl),Bt.forEach(Je=>F.delete(Je.key));let Mi=Dw([...Qs,...Ii]);if(Mi){if(Mi.idx>=tn.length){let Je=Bt[Mi.idx-tn.length].key;$.add(Je)}return await Q(V,Mi.result,{replace:fe}),{shortCircuited:!0}}let{loaderData:Li,errors:Ur}=Tw(j,q,tn,Qs,$e,Bt,Ii,oe);oe.forEach((Je,Lt)=>{Je.subscribe(Mn=>{(Mn||Je.done)&&oe.delete(Lt)})}),f.v7_partialHydration&&qe&&j.errors&&Object.entries(j.errors).filter(Je=>{let[Lt]=Je;return!tn.some(Mn=>Mn.route.id===Lt)}).forEach(Je=>{let[Lt,Mn]=Je;Ur=Object.assign(Ur||{},{[Lt]:Mn})});let _u=ms(),Su=rr(I),ku=_u||Su||Bt.length>0;return At({matches:q,loaderData:Li,errors:Ur},ku?{fetchers:new Map(j.fetchers)}:{})}function P(V){if(V&&!$n(V[1]))return{[V[0]]:V[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(V){return V.forEach(H=>{let q=j.fetchers.get(H.key),ne=bl(void 0,q?q.data:void 0);j.fetchers.set(H.key,ne)}),new Map(j.fetchers)}function K(V,H,q,ne){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");F.has(V)&&ct(V);let _e=(ne&&ne.unstable_flushSync)===!0,Ae=a||i,Be=dg(j.location,j.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,ne==null?void 0:ne.relative),fe=Ho(Ae,Be,c),qe=fm(fe,Ae,Be);if(qe.active&&qe.matches&&(fe=qe.matches),!fe){Et(V,H,xn(404,{pathname:Be}),{flushSync:_e});return}let{path:ze,submission:$e,error:yt}=Sw(f.v7_normalizeFormMethod,!0,Be,ne);if(yt){Et(V,H,yt,{flushSync:_e});return}let pt=Il(fe,ze);if(R=(ne&&ne.preventScrollReset)===!0,$e&&wr($e.formMethod)){L(V,H,ze,pt,fe,qe.active,_e,$e);return}B.set(V,{routeId:H,path:ze}),Y(V,H,ze,pt,fe,qe.active,_e,$e)}async function L(V,H,q,ne,_e,Ae,Be,fe){Ke(),B.delete(V);function qe(Nt){if(!Nt.route.action&&!Nt.route.lazy){let ps=xn(405,{method:fe.formMethod,pathname:q,routeId:H});return Et(V,H,ps,{flushSync:Be}),!0}return!1}if(!Ae&&qe(ne))return;let ze=j.fetchers.get(V);Ue(V,LD(fe,ze),{flushSync:Be});let $e=new AbortController,yt=Fi(e.history,q,$e.signal,fe);if(Ae){let Nt=await bu(_e,q,yt.signal);if(Nt.type==="aborted")return;if(Nt.type==="error"){let{error:ps}=$r(q,Nt);Et(V,H,ps,{flushSync:Be});return}else if(Nt.matches){if(_e=Nt.matches,ne=Il(_e,q),qe(ne))return}else{Et(V,H,xn(404,{pathname:q}),{flushSync:Be});return}}F.set(V,$e);let pt=W,ht=(await te("action",yt,[ne],_e))[0];if(yt.signal.aborted){F.get(V)===$e&&F.delete(V);return}if(f.v7_fetcherPersist&&se.has(V)){if(qo(ht)||$n(ht)){Ue(V,no(void 0));return}}else{if(qo(ht))if(F.delete(V),I>pt){Ue(V,no(void 0));return}else return $.add(V),Ue(V,bl(fe)),Q(yt,ht,{fetcherSubmission:fe});if($n(ht)){Et(V,H,ht.error);return}}if(Zo(ht))throw xn(400,{type:"defer-action"});let tn=j.navigation.location||j.location,Bt=Fi(e.history,tn,$e.signal),dl=a||i,Qs=j.navigation.state!=="idle"?Ho(dl,j.navigation.location,c):j.matches;tt(Qs,"Didn't find any matches after fetcher action");let Ii=++W;X.set(V,Ii);let Mi=bl(fe,ht.data);j.fetchers.set(V,Mi);let[Li,Ur]=kw(e.history,j,Qs,fe,tn,!1,f.v7_skipActionErrorRevalidation,S,U,J,se,B,$,dl,c,[ne.route.id,ht]);Ur.filter(Nt=>Nt.key!==V).forEach(Nt=>{let ps=Nt.key,c0=j.fetchers.get(ps),gP=bl(void 0,c0?c0.data:void 0);j.fetchers.set(ps,gP),F.has(ps)&&ct(ps),Nt.controller&&F.set(ps,Nt.controller)}),Re({fetchers:new Map(j.fetchers)});let _u=()=>Ur.forEach(Nt=>ct(Nt.key));$e.signal.addEventListener("abort",_u);let{loaderResults:Su,fetcherResults:ku}=await ge(j.matches,Qs,Li,Ur,Bt);if($e.signal.aborted)return;$e.signal.removeEventListener("abort",_u),X.delete(V),F.delete(V),Ur.forEach(Nt=>F.delete(Nt.key));let Je=Dw([...Su,...ku]);if(Je){if(Je.idx>=Li.length){let Nt=Ur[Je.idx-Li.length].key;$.add(Nt)}return Q(Bt,Je.result)}let{loaderData:Lt,errors:Mn}=Tw(j,j.matches,Li,Su,void 0,Ur,ku,oe);if(j.fetchers.has(V)){let Nt=no(ht.data);j.fetchers.set(V,Nt)}rr(Ii),j.navigation.state==="loading"&&Ii>I?(tt(T,"Expected pending action"),A&&A.abort(),st(j.navigation.location,{matches:Qs,loaderData:Lt,errors:Mn,fetchers:new Map(j.fetchers)})):(Re({errors:Mn,loaderData:Pw(j.loaderData,Lt,Qs,Mn),fetchers:new Map(j.fetchers)}),S=!1)}async function Y(V,H,q,ne,_e,Ae,Be,fe){let qe=j.fetchers.get(V);Ue(V,bl(fe,qe?qe.data:void 0),{flushSync:Be});let ze=new AbortController,$e=Fi(e.history,q,ze.signal);if(Ae){let ht=await bu(_e,q,$e.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:tn}=$r(q,ht);Et(V,H,tn,{flushSync:Be});return}else if(ht.matches)_e=ht.matches,ne=Il(_e,q);else{Et(V,H,xn(404,{pathname:q}),{flushSync:Be});return}}F.set(V,ze);let yt=W,xt=(await te("loader",$e,[ne],_e))[0];if(Zo(xt)&&(xt=await VS(xt,$e.signal,!0)||xt),F.get(V)===ze&&F.delete(V),!$e.signal.aborted){if(se.has(V)){Ue(V,no(void 0));return}if(qo(xt))if(I>yt){Ue(V,no(void 0));return}else{$.add(V),await Q($e,xt);return}if($n(xt)){Et(V,H,xt.error);return}tt(!Zo(xt),"Unhandled fetcher deferred data"),Ue(V,no(xt.data))}}async function Q(V,H,q){let{submission:ne,fetcherSubmission:_e,replace:Ae}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let Be=H.response.headers.get("Location");tt(Be,"Expected a Location header on the redirect Response"),Be=Ew(Be,new URL(V.url),c);let fe=wc(j.location,Be,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(Jy.test(Be)){const ht=e.history.createURL(Be);xt=ht.origin!==t.location.origin||qa(ht.pathname,c)==null}if(xt){Ae?t.location.replace(Be):t.location.assign(Be);return}}A=null;let qe=Ae===!0?Wt.Replace:Wt.Push,{formMethod:ze,formAction:$e,formEncType:yt}=j.navigation;!ne&&!_e&&ze&&$e&&yt&&(ne=Iw(j.navigation));let pt=ne||_e;if(yD.has(H.response.status)&&pt&&wr(pt.formMethod))await Z(qe,fe,{submission:At({},pt,{formAction:Be}),preventScrollReset:R});else{let xt=Um(fe,ne);await Z(qe,fe,{overrideNavigation:xt,fetcherSubmission:_e,preventScrollReset:R})}}async function te(V,H,q,ne){try{let _e=await jD(u,V,H,q,ne,o,s);return await Promise.all(_e.map((Ae,Be)=>{if(DD(Ae)){let fe=Ae.result;return{type:wt.redirect,response:TD(fe,H,q[Be].route.id,ne,c,f.v7_relativeSplatPath)}}return ND(Ae)}))}catch(_e){return q.map(()=>({type:wt.error,error:_e}))}}async function ge(V,H,q,ne,_e){let[Ae,...Be]=await Promise.all([q.length?te("loader",_e,q,H):[],...ne.map(fe=>{if(fe.matches&&fe.match&&fe.controller){let qe=Fi(e.history,fe.path,fe.controller.signal);return te("loader",qe,[fe.match],fe.matches).then(ze=>ze[0])}else return Promise.resolve({type:wt.error,error:xn(404,{pathname:fe.path})})})]);return await Promise.all([Ow(V,q,Ae,Ae.map(()=>_e.signal),!1,j.loaderData),Ow(V,ne.map(fe=>fe.match),Be,ne.map(fe=>fe.controller?fe.controller.signal:null),!0)]),{loaderResults:Ae,fetcherResults:Be}}function Ke(){S=!0,U.push(...Xs()),B.forEach((V,H)=>{F.has(H)&&(J.push(H),ct(H))})}function Ue(V,H,q){q===void 0&&(q={}),j.fetchers.set(V,H),Re({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Et(V,H,q,ne){ne===void 0&&(ne={});let _e=aa(j.matches,H);Yt(V),Re({errors:{[_e.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(ne&&ne.flushSync)===!0})}function nr(V){return f.v7_fetcherPersist&&(he.set(V,(he.get(V)||0)+1),se.has(V)&&se.delete(V)),j.fetchers.get(V)||vD}function Yt(V){let H=j.fetchers.get(V);F.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&ct(V),B.delete(V),X.delete(V),$.delete(V),se.delete(V),j.fetchers.delete(V)}function fs(V){if(f.v7_fetcherPersist){let H=(he.get(V)||0)-1;H<=0?(he.delete(V),se.add(V)):he.set(V,H)}else Yt(V);Re({fetchers:new Map(j.fetchers)})}function ct(V){let H=F.get(V);tt(H,"Expected fetch controller: "+V),H.abort(),F.delete(V)}function hs(V){for(let H of V){let q=nr(H),ne=no(q.data);j.fetchers.set(H,ne)}}function ms(){let V=[],H=!1;for(let q of $){let ne=j.fetchers.get(q);tt(ne,"Expected fetcher: "+q),ne.state==="loading"&&($.delete(q),V.push(q),H=!0)}return hs(V),H}function rr(V){let H=[];for(let[q,ne]of X)if(ne<V){let _e=j.fetchers.get(q);tt(_e,"Expected fetcher: "+q),_e.state==="loading"&&(ct(q),X.delete(q),H.push(q))}return hs(H),H.length>0}function vu(V,H){let q=j.blockers.get(V)||wl;return Oe.get(V)!==H&&Oe.set(V,H),q}function xu(V){j.blockers.delete(V),Oe.delete(V)}function Di(V,H){let q=j.blockers.get(V)||wl;tt(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let ne=new Map(j.blockers);ne.set(V,H),Re({blockers:ne})}function wu(V){let{currentLocation:H,nextLocation:q,historyAction:ne}=V;if(Oe.size===0)return;Oe.size>1&&hi(!1,"A router only supports one blocker at a time");let _e=Array.from(Oe.entries()),[Ae,Be]=_e[_e.length-1],fe=j.blockers.get(Ae);if(!(fe&&fe.state==="proceeding")&&Be({currentLocation:H,nextLocation:q,historyAction:ne}))return Ae}function Oi(V){let H=xn(404,{pathname:V}),q=a||i,{matches:ne,route:_e}=Aw(q);return Xs(),{notFoundMatches:ne,route:_e,error:H}}function $r(V,H){return{boundaryId:aa(H.partialMatches).route.id,error:xn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function Xs(V){let H=[];return oe.forEach((q,ne)=>{(!V||V(ne))&&(q.cancel(),H.push(ne),oe.delete(ne))}),H}function fP(V,H,q){if(x=V,w=H,p=q||null,!g&&j.navigation===$m){g=!0;let ne=l0(j.location,j.matches);ne!=null&&Re({restoreScrollPosition:ne})}return()=>{x=null,w=null,p=null}}function a0(V,H){return p&&p(V,H.map(ne=>ZA(ne,j.loaderData)))||V.key}function hP(V,H){if(x&&w){let q=a0(V,H);x[q]=w()}}function l0(V,H){if(x){let q=a0(V,H),ne=x[q];if(typeof ne=="number")return ne}return null}function fm(V,H,q){if(d)if(V){let ne=V[V.length-1].route;if(ne.path&&(ne.path==="*"||ne.path.endsWith("/*")))return{active:!0,matches:gd(H,q,c,!0)}}else return{active:!0,matches:gd(H,q,c,!0)||[]};return{active:!1,matches:null}}async function bu(V,H,q){let ne=V,_e=ne.length>0?ne[ne.length-1].route:null;for(;;){let Ae=a==null,Be=a||i;try{await kD(d,H,ne,Be,o,s,me,q)}catch($e){return{type:"error",error:$e,partialMatches:ne}}finally{Ae&&(i=[...i])}if(q.aborted)return{type:"aborted"};let fe=Ho(Be,H,c),qe=!1;if(fe){let $e=fe[fe.length-1].route;if($e.index)return{type:"success",matches:fe};if($e.path&&$e.path.length>0)if($e.path==="*")qe=!0;else return{type:"success",matches:fe}}let ze=gd(Be,H,c,!0);if(!ze||ne.map($e=>$e.route.id).join("-")===ze.map($e=>$e.route.id).join("-"))return{type:"success",matches:qe?fe:null};if(ne=ze,_e=ne[ne.length-1].route,_e.path==="*")return{type:"success",matches:ne}}}function mP(V){o={},a=bc(V,s,void 0,o)}function pP(V,H){let q=a==null;FS(V,H,a||i,o,s),q&&(i=[...i],Re({}))}return C={get basename(){return c},get future(){return f},get state(){return j},get routes(){return i},get window(){return t},initialize:Te,subscribe:Ie,enableScrollRestoration:fP,navigate:E,fetch:K,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:nr,deleteFetcher:fs,dispose:Fe,getBlocker:vu,deleteBlocker:xu,patchRoutes:pP,_internalFetchControllers:F,_internalActiveDeferreds:oe,_internalSetRoutes:mP},C}function bD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function dg(e,t,n,r,s,o,i,a){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=oh(s||".",sh(c,o),qa(e.pathname,n)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!ev(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Ts([n,d.pathname])),mi(d)}function Sw(e,t,n,r){if(!r||!bD(r))return{path:n};if(r.formMethod&&!ID(r.formMethod))return{path:n,error:xn(405,{method:r.formMethod})};let s=()=>({path:n,error:xn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=$S(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!wr(i))return s();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,x)=>{let[p,w]=x;return""+m+p+"="+w+` -`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!wr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}tt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=fg(r.formData),u=r.formData;else if(r.body instanceof FormData)c=fg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Nw(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Nw(c)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(wr(d.formMethod))return{path:n,submission:d};let f=Ws(n);return t&&f.search&&ev(f.search)&&c.append("index",""),f.search="?"+c,{path:mi(f),submission:d}}function _D(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function kw(e,t,n,r,s,o,i,a,c,u,d,f,h,m,x,p){let w=p?$n(p[1])?p[1].error:p[1].data:void 0,g=e.createURL(t.location),v=e.createURL(s),b=p&&$n(p[1])?p[0]:void 0,_=b?_D(n,b):n,C=p?p[1].statusCode:void 0,j=i&&C&&C>=400,T=_.filter((A,O)=>{let{route:G}=A;if(G.lazy)return!0;if(G.loader==null)return!1;if(o)return typeof G.loader!="function"||G.loader.hydrate?!0:t.loaderData[G.id]===void 0&&(!t.errors||t.errors[G.id]===void 0);if(SD(t.loaderData,t.matches[O],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[O],z=A;return Cw(A,At({currentUrl:g,currentParams:N.params,nextUrl:v,nextParams:z.params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||zS(N,z)}))}),R=[];return f.forEach((A,O)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(O))return;let G=Ho(m,A.path,x);if(!G){R.push({key:O,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),z=Il(G,A.path),S=!1;h.has(O)?S=!1:u.includes(O)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=a:S=Cw(z,At({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a})),S&&R.push({key:O,routeId:A.routeId,path:A.path,matches:G,match:z,controller:new AbortController})}),[T,R]}function SD(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function zS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Cw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function kD(e,t,n,r,s,o,i,a){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:n,patch:(d,f)=>{a.aborted||FS(d,f,r,s,o)}}),i.set(c,u)),u&&AD(u)&&await u}finally{i.delete(c)}}function FS(e,t,n,r,s){if(e){var o;let i=r[e];tt(i,"No route found to patch children into: routeId = "+e);let a=bc(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=bc(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function jw(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];tt(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";hi(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!KA.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,At({},t(s),{lazy:void 0}))}function CD(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function jD(e,t,n,r,s,o,i,a){let c=r.reduce((f,h)=>f.add(h.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let h=c.has(f.route.id);return At({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?ED(t,n,f,o,i,x,a):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(f=>tt(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>c.has(s[h].route.id))}async function ED(e,t,n,r,s,o,i){let a,c,u=d=>{let f,h=new Promise((p,w)=>f=w);c=()=>f(),t.signal.addEventListener("abort",c);let m=p=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...p!==void 0?[p]:[]),x;return o?x=o(p=>m(p)):x=(async()=>{try{return{type:"data",result:await m()}}catch(p){return{type:"error",result:p}}})(),Promise.race([x,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([u(d).catch(m=>{f=m}),jw(n.route,s,r)]);if(f!==void 0)throw f;a=h}else if(await jw(n.route,s,r),d=n.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw xn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw xn(404,{pathname:h})}tt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:wt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return a}async function ND(e){let{result:t,type:n,status:r}=e;if(US(t)){let i;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(a){return{type:wt.error,error:a}}return n===wt.error?{type:wt.error,error:new Qy(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:wt.data,data:i,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:ih(t)?t.status:r};if(OD(t)){var s,o;return{type:wt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:wt.data,data:t,statusCode:r}}function TD(e,t,n,r,s,o){let i=e.headers.get("Location");if(tt(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Jy.test(i)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=dg(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function Ew(e,t,n){if(Jy.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=qa(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Fi(e,t,n,r){let s=e.createURL($S(t)).toString(),o={signal:n};if(r&&wr(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=fg(r.formData):o.body=r.formData}return new Request(s,o)}function fg(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Nw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function PD(e,t,n,r,s,o){let i={},a=null,c,u=!1,d={},f=r&&$n(r[1])?r[1].error:void 0;return n.forEach((h,m)=>{let x=t[m].route.id;if(tt(!qo(h),"Cannot handle redirect results in processLoaderData"),$n(h)){let p=h.error;f!==void 0&&(p=f,f=void 0),a=a||{};{let w=aa(e,x);a[w.route.id]==null&&(a[w.route.id]=p)}i[x]=void 0,u||(u=!0,c=ih(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else Zo(h)?(s.set(x,h.deferredData),i[x]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers)):(i[x]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers))}),f!==void 0&&r&&(a={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:c||200,loaderHeaders:d}}function Tw(e,t,n,r,s,o,i,a){let{loaderData:c,errors:u}=PD(t,n,r,s,a);for(let d=0;d<o.length;d++){let{key:f,match:h,controller:m}=o[d];tt(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(m&&m.signal.aborted))if($n(x)){let p=aa(e.matches,h==null?void 0:h.route.id);u&&u[p.route.id]||(u=At({},u,{[p.route.id]:x.error})),e.fetchers.delete(f)}else if(qo(x))tt(!1,"Unhandled fetcher revalidation redirect");else if(Zo(x))tt(!1,"Unhandled fetcher deferred data");else{let p=no(x.data);e.fetchers.set(f,p)}}return{loaderData:c,errors:u}}function Pw(e,t,n,r){let s=At({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),r&&r.hasOwnProperty(i))break}return s}function Rw(e){return e?$n(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function aa(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Aw(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: -`+i):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",c='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new Qy(e||500,a,new Error(c),!0)}function Dw(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(qo(n))return{result:n,idx:t}}}function $S(e){let t=typeof e=="string"?Ws(e):e;return mi(At({},t,{hash:""}))}function RD(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function AD(e){return typeof e=="object"&&e!=null&&"then"in e}function DD(e){return US(e.result)&&gD.has(e.result.status)}function Zo(e){return e.type===wt.deferred}function $n(e){return e.type===wt.error}function qo(e){return(e&&e.type)===wt.redirect}function OD(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function US(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ID(e){return pD.has(e.toLowerCase())}function wr(e){return hD.has(e.toLowerCase())}async function Ow(e,t,n,r,s,o){for(let i=0;i<n.length;i++){let a=n[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!zS(u,c)&&(o&&o[c.route.id])!==void 0;if(Zo(a)&&(s||d)){let f=r[i];tt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await VS(a,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function VS(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:wt.error,error:s}}return{type:wt.data,data:e.deferredData.data}}}function ev(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Il(e,t){let n=typeof t=="string"?Ws(t).search:t.search;if(e[e.length-1].route.index&&ev(n||""))return e[e.length-1];let r=IS(e);return r[r.length-1]}function Iw(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Um(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function MD(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function bl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function LD(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function no(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function zD(e,t){try{let n=e.sessionStorage.getItem(LS);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function FD(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(LS,JSON.stringify(n))}catch(r){hi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** - * React Router v6.25.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Qd(){return Qd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qd.apply(this,arguments)}const ah=y.createContext(null),BS=y.createContext(null),zo=y.createContext(null),tv=y.createContext(null),Hs=y.createContext({outlet:null,matches:[],isDataRoute:!1}),WS=y.createContext(null);function $D(e,t){let{relative:n}=t===void 0?{}:t;Xa()||tt(!1);let{basename:r,navigator:s}=y.useContext(zo),{hash:o,pathname:i,search:a}=YS(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:Ts([r,i])),s.createHref({pathname:c,search:a,hash:o})}function Xa(){return y.useContext(tv)!=null}function Mr(){return Xa()||tt(!1),y.useContext(tv).location}function HS(e){y.useContext(zo).static||y.useLayoutEffect(e)}function er(){let{isDataRoute:e}=y.useContext(Hs);return e?eO():UD()}function UD(){Xa()||tt(!1);let e=y.useContext(ah),{basename:t,future:n,navigator:r}=y.useContext(zo),{matches:s}=y.useContext(Hs),{pathname:o}=Mr(),i=JSON.stringify(sh(s,n.v7_relativeSplatPath)),a=y.useRef(!1);return HS(()=>{a.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=oh(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ts([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const VD=y.createContext(null);function BD(e){let t=y.useContext(Hs).outlet;return t&&y.createElement(VD.Provider,{value:e},t)}function YS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(zo),{matches:s}=y.useContext(Hs),{pathname:o}=Mr(),i=JSON.stringify(sh(s,r.v7_relativeSplatPath));return y.useMemo(()=>oh(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function WD(e,t,n,r){Xa()||tt(!1);let{navigator:s}=y.useContext(zo),{matches:o}=y.useContext(Hs),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Mr(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let p=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=Ho(e,{pathname:h});return ZD(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},a,p.params),pathname:Ts([c,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?c:Ts([c,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,n,r)}function HD(){let e=JD(),t=ih(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:s},n):null,null)}const YD=y.createElement(HD,null);class KD extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Hs.Provider,{value:this.props.routeContext},y.createElement(WS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function GD(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(ah);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Hs.Provider,{value:t},r)}function ZD(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||tt(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:m}=n,x=f.route.loader&&h[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,h)=>{let m,x=!1,p=null,w=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,p=f.route.errorElement||YD,c&&(u<0&&h===0?(tO("route-fallback"),x=!0,w=null):u===h&&(x=!0,w=f.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),v=()=>{let b;return m?b=p:x?b=w:f.route.Component?b=y.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,y.createElement(GD,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(KD,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var KS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(KS||{}),Jd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Jd||{});function qD(e){let t=y.useContext(ah);return t||tt(!1),t}function XD(e){let t=y.useContext(BS);return t||tt(!1),t}function QD(e){let t=y.useContext(Hs);return t||tt(!1),t}function GS(e){let t=QD(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function JD(){var e;let t=y.useContext(WS),n=XD(Jd.UseRouteError),r=GS(Jd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function eO(){let{router:e}=qD(KS.UseNavigateStable),t=GS(Jd.UseNavigateStable),n=y.useRef(!1);return HS(()=>{n.current=!0}),y.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Qd({fromRouteId:t},o)))},[e,t])}const Mw={};function tO(e,t,n){Mw[e]||(Mw[e]=!0)}function ZS(e){let{to:t,replace:n,state:r,relative:s}=e;Xa()||tt(!1);let{future:o,static:i}=y.useContext(zo),{matches:a}=y.useContext(Hs),{pathname:c}=Mr(),u=er(),d=oh(t,sh(a,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function nv(e){return BD(e.context)}function nO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Wt.Pop,navigator:o,static:i=!1,future:a}=e;Xa()&&tt(!1);let c=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:o,static:i,future:Qd({v7_relativeSplatPath:!1},a)}),[c,a,o,i]);typeof r=="string"&&(r=Ws(r));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:x="default"}=r,p=y.useMemo(()=>{let w=qa(d,c);return w==null?null:{location:{pathname:w,search:f,hash:h,state:m,key:x},navigationType:s}},[c,d,f,h,m,x,s]);return p==null?null:y.createElement(zo.Provider,{value:u},y.createElement(tv.Provider,{children:n,value:p}))}new Promise(()=>{});function rO(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** - * React Router DOM v6.25.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function _c(){return _c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_c.apply(this,arguments)}function sO(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function oO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iO(e,t){return e.button===0&&(!t||t==="_self")&&!oO(e)}function hg(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function aO(e,t){let n=hg(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const lO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],cO="6";try{window.__reactRouterVersion=cO}catch{}function uO(e,t){return wD({basename:void 0,future:_c({},void 0,{v7_prependBasename:!0}),history:WA({window:void 0}),hydrationData:dO(),routes:e,mapRouteProperties:rO,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function dO(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=_c({},t,{errors:fO(t.errors)})),t}function fO(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new Qy(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const hO=y.createContext({isTransitioning:!1}),mO=y.createContext(new Map),pO="startTransition",Lw=T1[pO],gO="flushSync",zw=BA[gO];function yO(e){Lw?Lw(e):e()}function _l(e){zw?zw(e):e()}class vO{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function xO(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=y.useState(n.state),[i,a]=y.useState(),[c,u]=y.useState({isTransitioning:!1}),[d,f]=y.useState(),[h,m]=y.useState(),[x,p]=y.useState(),w=y.useRef(new Map),{v7_startTransition:g}=r||{},v=y.useCallback(R=>{g?yO(R):R()},[g]),b=y.useCallback((R,A)=>{let{deletedFetchers:O,unstable_flushSync:G,unstable_viewTransitionOpts:N}=A;O.forEach(S=>w.current.delete(S)),R.fetchers.forEach((S,U)=>{S.data!==void 0&&w.current.set(U,S.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||z){G?_l(()=>o(R)):v(()=>o(R));return}if(G){_l(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let S=n.window.document.startViewTransition(()=>{_l(()=>o(R))});S.finished.finally(()=>{_l(()=>{f(void 0),m(void 0),a(void 0),u({isTransitioning:!1})})}),_l(()=>m(S));return}h?(d&&d.resolve(),h.skipTransition(),p({state:R,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(R),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,w,v]);y.useLayoutEffect(()=>n.subscribe(b),[n,b]),y.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new vO)},[c]),y.useEffect(()=>{if(d&&i&&n.window){let R=i,A=d.promise,O=n.window.document.startViewTransition(async()=>{v(()=>o(R)),await A});O.finished.finally(()=>{f(void 0),m(void 0),a(void 0),u({isTransitioning:!1})}),m(O)}},[v,i,d,n.window]),y.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,h,s.location,i]),y.useEffect(()=>{!c.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),p(void 0))},[c.isTransitioning,x]),y.useEffect(()=>{},[]);let _=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,A,O)=>n.navigate(R,{state:A,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(R,A,O)=>n.navigate(R,{replace:!0,state:A,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",j=y.useMemo(()=>({router:n,navigator:_,static:!1,basename:C}),[n,_,C]),T=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(ah.Provider,{value:j},y.createElement(BS.Provider,{value:s},y.createElement(mO.Provider,{value:w.current},y.createElement(hO.Provider,{value:c},y.createElement(nO,{basename:C,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?y.createElement(wO,{routes:n.routes,future:n.future,state:s}):t))))),null)}const wO=y.memo(bO);function bO(e){let{routes:t,future:n,state:r}=e;return WD(t,void 0,r,n)}const _O=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",SO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wn=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,h=sO(t,lO),{basename:m}=y.useContext(zo),x,p=!1;if(typeof u=="string"&&SO.test(u)&&(x=u,_O))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=qa(_.pathname,m);_.origin===b.origin&&C!=null?u=C+_.search+_.hash:p=!0}catch{}let w=$D(u,{relative:s}),g=kO(u,{replace:i,state:a,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function v(b){r&&r(b),b.defaultPrevented||g(b)}return y.createElement("a",_c({},h,{href:x||w,onClick:p||o?r:v,ref:n,target:c}))});var Fw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fw||(Fw={}));var $w;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($w||($w={}));function kO(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,c=er(),u=Mr(),d=YS(e,{relative:i});return y.useCallback(f=>{if(iO(f,n)){f.preventDefault();let h=r!==void 0?r:mi(u)===mi(d);c(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[u,c,d,r,s,n,e,o,i,a])}function CO(e){let t=y.useRef(hg(e)),n=y.useRef(!1),r=Mr(),s=y.useMemo(()=>aO(r.search,n.current?null:t.current),[r.search]),o=er(),i=y.useCallback((a,c)=>{const u=hg(typeof a=="function"?a(s):a);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var jO={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const EO=Uf(jO);var NO=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Uw(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(EO[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(NO),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),a=[i,""];i.indexOf("=")>-1&&(a=i.split("=")),t.attrs[a[0]]=a[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var TO=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,PO=/^\s*$/,RO=Object.create(null);function qS(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(qS,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var AO={parse:function(e,t){t||(t={}),t.components||(t.components=RO);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var a=e.indexOf("<");r.push({type:"text",content:a===-1?e:e.substring(0,a)})}return e.replace(TO,function(c,u){if(i){if(c!=="</"+n.name+">")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("<!--"),m=u+c.length,x=e.charAt(m);if(h){var p=Uw(c);return o<0?(r.push(p),r):((d=s[o]).children.push(p),r)}if(f&&(o++,(n=Uw(c)).type==="tag"&&t.components[n.name]&&(n.type="component",i=!0),n.voidElement||i||!x||x==="<"||n.children.push({type:"text",content:e.slice(m,e.indexOf("<",m))}),o===0&&r.push(n),(d=s[o-1])&&d.children.push(n),s[o]=n),(!f||n.voidElement)&&(o>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(o--,n=o===-1?r:s[o]),!i&&x!=="<"&&x)){d=o===-1?r:s[o].children;var w=e.indexOf("<",m),g=e.slice(m,w===-1?void 0:w);PO.test(g)&&(g=" "),(w>-1&&o+d.length>=0||g!==" ")&&d.push({type:"text",content:g})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+qS("",n)},"")}};const yd=(...e)=>{console!=null&&console.warn&&(cr(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},Vw={},ef=(...e)=>{cr(e[0])&&Vw[e[0]]||(cr(e[0])&&(Vw[e[0]]=new Date),yd(...e))},XS=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Bw=(e,t,n)=>{e.loadNamespaces(t,XS(e,n))},Ww=(e,t,n,r)=>{cr(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,XS(e,r))},DO=(e,t,n={})=>!t.languages||!t.languages.length?(ef("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{var o;if(((o=n.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),cr=e=>typeof e=="string",la=e=>typeof e=="object"&&e!==null,OO=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,IO={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},MO=e=>IO[e],LO=e=>e.replace(OO,MO);let mg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:LO};const zO=(e={})=>{mg={...mg,...e}},QS=()=>mg;let JS;const FO=e=>{JS=e},rv=()=>JS,Vm=(e,t)=>{var r;if(!e)return!1;const n=((r=e.props)==null?void 0:r.children)??e.children;return t?n.length>0:!!n},Bm=e=>{var n,r;if(!e)return[];const t=((n=e.props)==null?void 0:n.children)??e.children;return(r=e.props)!=null&&r.i18nIsDynamicList?ca(t):t},$O=e=>Array.isArray(e)&&e.every(y.isValidElement),ca=e=>Array.isArray(e)?e:[e],UO=(e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n},ek=(e,t)=>{if(!e)return"";let n="";const r=ca(e),s=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,i)=>{if(cr(o))n+=`${o}`;else if(y.isValidElement(o)){const{props:a,type:c}=o,u=Object.keys(a).length,d=s.indexOf(c)>-1,f=a.children;if(!f&&d&&!u)n+=`<${c}/>`;else if(!f&&(!d||u)||a.i18nIsDynamicList)n+=`<${i}></${i}>`;else if(d&&u===1&&cr(f))n+=`<${c}>${f}</${c}>`;else{const h=ek(f,t);n+=`<${i}>${h}</${i}>`}}else if(o===null)yd("Trans: the passed in value is invalid - seems you passed in a null child.");else if(la(o)){const{format:a,...c}=o,u=Object.keys(c);if(u.length===1){const d=a?`${u[0]}, ${a}`:u[0];n+=`{{${d}}}`}else yd("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else yd("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),n},VO=(e,t,n,r,s,o)=>{if(t==="")return[];const i=r.transKeepBasicHtmlNodesFor||[],a=t&&new RegExp(i.map(w=>`<${w}`).join("|")).test(t);if(!e&&!a&&!o)return[t];const c={},u=w=>{ca(w).forEach(v=>{cr(v)||(Vm(v)?u(Bm(v)):la(v)&&!y.isValidElement(v)&&Object.assign(c,v))})};u(e);const d=AO.parse(`<0>${t}</0>`),f={...c,...s},h=(w,g,v)=>{var C;const b=Bm(w),_=x(b,g.children,v);return $O(b)&&_.length===0||(C=w.props)!=null&&C.i18nIsDynamicList?b:_},m=(w,g,v,b,_)=>{w.dummy?(w.children=g,v.push(y.cloneElement(w,{key:b},_?void 0:g))):v.push(...y.Children.map([w],C=>{const j={...C.props};return delete j.i18nIsDynamicList,y.createElement(C.type,{...j,key:b,ref:C.ref},_?null:g)}))},x=(w,g,v)=>{const b=ca(w);return ca(g).reduce((C,j,T)=>{var A,O;const R=((O=(A=j.children)==null?void 0:A[0])==null?void 0:O.content)&&n.services.interpolator.interpolate(j.children[0].content,f,n.language);if(j.type==="tag"){let G=b[parseInt(j.name,10)];v.length===1&&!G&&(G=v[0][j.name]),G||(G={});const N=Object.keys(j.attrs).length!==0?UO({props:j.attrs},G):G,z=y.isValidElement(N),S=z&&Vm(j,!0)&&!j.voidElement,U=a&&la(N)&&N.dummy&&!z,J=la(e)&&Object.hasOwnProperty.call(e,j.name);if(cr(N)){const F=n.services.interpolator.interpolate(N,f,n.language);C.push(F)}else if(Vm(N)||S){const F=h(N,j,v);m(N,F,C,T)}else if(U){const F=x(b,j.children,v);m(N,F,C,T)}else if(Number.isNaN(parseFloat(j.name)))if(J){const F=h(N,j,v);m(N,F,C,T,j.voidElement)}else if(r.transSupportBasicHtmlNodes&&i.indexOf(j.name)>-1)if(j.voidElement)C.push(y.createElement(j.name,{key:`${j.name}-${T}`}));else{const F=x(b,j.children,v);C.push(y.createElement(j.name,{key:`${j.name}-${T}`},F))}else if(j.voidElement)C.push(`<${j.name} />`);else{const F=x(b,j.children,v);C.push(`<${j.name}>${F}</${j.name}>`)}else if(la(N)&&!z){const F=j.children[0]?R:null;F&&C.push(F)}else m(N,R,C,T,j.children.length!==1||!R)}else if(j.type==="text"){const G=r.transWrapTextNodes,N=o?r.unescape(n.services.interpolator.interpolate(j.content,f,n.language)):n.services.interpolator.interpolate(j.content,f,n.language);G?C.push(y.createElement(G,{key:`${j.name}-${T}`},N)):C.push(N)}return C},[])},p=x([{dummy:!0,children:e||[]}],d,ca(e||[]));return Bm(p[0])};function BO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var G,N,z,S,U,J;const x=d||rv();if(!x)return ef("You will need to pass in an i18next instance by using i18nextReactModule"),e;const p=f||x.t.bind(x)||(F=>F),w={...QS(),...(G=x.options)==null?void 0:G.react};let g=u||p.ns||((N=x.options)==null?void 0:N.defaultNS);g=cr(g)?[g]:g||["translation"];const v=ek(e,w),b=a||v||w.transEmptyNodeValue||r,{hashTransKey:_}=w,C=r||(_?_(v||b):v||b);(S=(z=x.options)==null?void 0:z.interpolation)!=null&&S.defaultVariables&&(i=i&&Object.keys(i).length>0?{...i,...x.options.interpolation.defaultVariables}:{...x.options.interpolation.defaultVariables});const j=i||t!==void 0&&!((J=(U=x.options)==null?void 0:U.interpolation)!=null&&J.alwaysFormat)||!e?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},T={...o,context:s||o.context,count:t,...i,...j,defaultValue:b,ns:g},R=C?p(C,T):b;c&&Object.keys(c).forEach(F=>{const W=c[F];if(typeof W.type=="function"||!W.props||!W.props.children||R.indexOf(`${F}/>`)<0&&R.indexOf(`${F} />`)<0)return;function I(){return y.createElement(y.Fragment,null,W)}c[F]=y.createElement(I)});const A=VO(c||e,R,x,w,T,h),O=n??w.defaultTransParent;return O?y.createElement(O,m,A):A}const WO={type:"3rdParty",init(e){zO(e.options.react),FO(e)}},tk=y.createContext();class HO{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{var r;(r=this.usedNamespaces)[n]??(r[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function YO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var v;const{i18n:x,defaultNS:p}=y.useContext(tk)||{},w=d||x||rv(),g=f||(w==null?void 0:w.t.bind(w));return BO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o,values:i,defaults:a,components:c,ns:u||(g==null?void 0:g.ns)||p||((v=w==null?void 0:w.options)==null?void 0:v.defaultNS),i18n:w,t:f,shouldUnescape:h,...m})}const KO=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},nk=(e,t,n,r)=>e.getFixedT(t,n,r),GO=(e,t,n,r)=>y.useCallback(nk(e,t,n,r),[e,t,n,r]),Ye=(e,t={})=>{var _,C,j,T;const{i18n:n}=t,{i18n:r,defaultNS:s}=y.useContext(tk)||{},o=n||r||rv();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new HO),!o){ef("You will need to pass in an i18next instance by using initReactI18next");const R=(O,G)=>cr(G)?G:la(G)&&cr(G.defaultValue)?G.defaultValue:Array.isArray(O)?O[O.length-1]:O,A=[R,{},!1];return A.t=R,A.i18n={},A.ready=!1,A}(_=o.options.react)!=null&&_.wait&&ef("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...QS(),...o.options.react,...t},{useSuspense:a,keyPrefix:c}=i;let u=s||((C=o.options)==null?void 0:C.defaultNS);u=cr(u)?[u]:u||["translation"],(T=(j=o.reportNamespaces).addUsedNamespaces)==null||T.call(j,u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(R=>DO(R,o,i)),f=GO(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),h=()=>f,m=()=>nk(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),[x,p]=y.useState(h);let w=u.join();t.lng&&(w=`${t.lng}${w}`);const g=KO(w),v=y.useRef(!0);y.useEffect(()=>{const{bindI18n:R,bindI18nStore:A}=i;v.current=!0,!d&&!a&&(t.lng?Ww(o,t.lng,u,()=>{v.current&&p(m)}):Bw(o,u,()=>{v.current&&p(m)})),d&&g&&g!==w&&v.current&&p(m);const O=()=>{v.current&&p(m)};return R&&(o==null||o.on(R,O)),A&&(o==null||o.store.on(A,O)),()=>{v.current=!1,o&&(R==null||R.split(" ").forEach(G=>o.off(G,O))),A&&o&&A.split(" ").forEach(G=>o.store.off(G,O))}},[o,w]),y.useEffect(()=>{v.current&&d&&p(h)},[o,c,d]);const b=[x,o,d];if(b.t=x,b.i18n=o,b.ready=d,d||!d&&!a)return b;throw new Promise(R=>{t.lng?Ww(o,t.lng,u,()=>R()):Bw(o,u,()=>R())})};/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rk=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var qO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XO=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>y.createElement("svg",{ref:c,...qO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:rk("lucide",s),...a},[...i.map(([u,d])=>y.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const at=(e,t)=>{const n=y.forwardRef(({className:r,...s},o)=>y.createElement(XO,{ref:o,iconNode:t,className:rk(`lucide-${ZO(e)}`,r),...s}));return n.displayName=`${e}`,n};/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QO=at("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JO=at("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eI=at("CalendarX2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sk=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sv=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ok=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tI=at("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nI=at("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rI=at("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sI=at("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hw=at("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ik=at("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pg=at("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oI=at("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yw=at("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kw=at("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Gw=at("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iI=at("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aI=at("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lI=at("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cI=at("LoaderPinwheel",[["path",{d:"M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5",key:"1cg5zf"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uI=at("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dI=at("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fI=at("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pi=at("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zw=at("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hI=at("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ak=at("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ov=at("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mI=at("SquareSigma",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pI=at("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iv=at("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gI=at("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/** - * @license lucide-react v0.417.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const av=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function yI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function lh(...e){return t=>e.forEach(n=>yI(n,t))}function Ge(...e){return y.useCallback(lh(...e),e)}var ts=y.forwardRef((e,t)=>{const{children:n,...r}=e,s=y.Children.toArray(n),o=s.find(vI);if(o){const i=o.props.children,a=s.map(c=>c===o?y.Children.count(i)>1?y.Children.only(null):y.isValidElement(i)?i.props.children:null:c);return l.jsx(gg,{...r,ref:t,children:y.isValidElement(i)?y.cloneElement(i,void 0,a):null})}return l.jsx(gg,{...r,ref:t,children:n})});ts.displayName="Slot";var gg=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const s=wI(n);return y.cloneElement(n,{...xI(r,n.props),ref:t?lh(t,s):s})}return y.Children.count(n)>1?y.Children.only(null):null});gg.displayName="SlotClone";var lv=({children:e})=>l.jsx(l.Fragment,{children:e});function vI(e){return y.isValidElement(e)&&e.type===lv}function xI(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function wI(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=lk(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function bI(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=lk(e))&&(r&&(r+=" "),r+=t);return r}const qw=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Xw=bI,Jc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],f=o==null?void 0:o[u];if(d===null)return null;const h=qw(d)||qw(f);return s[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(x=>{let[p,w]=x;return Array.isArray(w)?w.includes({...o,...a}[p]):{...o,...a}[p]===w})?[...u,f,h]:u},[]);return Xw(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};function ck(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=ck(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _I(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=ck(e))&&(r&&(r+=" "),r+=t);return r}const cv="-";function SI(e){const t=CI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const a=i.split(cv);return a[0]===""&&a.length!==1&&a.shift(),uk(a,t)||kI(i)}function o(i,a){const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function uk(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?uk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(cv);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const Qw=/^\[(.+)\]$/;function kI(e){if(Qw.test(e)){const t=Qw.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function CI(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return EI(Object.entries(e.classGroups),n).forEach(([o,i])=>{yg(i,r,o,t)}),r}function yg(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Jw(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(jI(s)){yg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{yg(i,Jw(t,o),n,r)})})}function Jw(e,t){let n=e;return t.split(cv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function jI(e){return e.isThemeGetter}function EI(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e}function NI(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const dk="!";function TI(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(a){const c=[];let u=0,d=0,f;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(r||a.slice(w,w+o)===t)){c.push(a.slice(d,w)),d=w+o;continue}if(g==="/"){f=w;continue}}g==="["?u++:g==="]"&&u--}const h=c.length===0?a:a.substring(d),m=h.startsWith(dk),x=m?h.substring(1):h,p=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:p}}return n?function(c){return n({className:c,parseClassName:i})}:i}function PI(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function RI(e){return{cache:NI(e.cacheSize),parseClassName:TI(e),...SI(e)}}const AI=/\s+/;function DI(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(AI).map(i=>{const{modifiers:a,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(i);let f=!!d,h=r(f?u.substring(0,d):u);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(u),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const m=PI(a).join(":");return{isTailwindClass:!0,modifierId:c?m+dk:m,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:u}=i,d=a+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function OI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fk(t))&&(r&&(r+=" "),r+=n);return r}function fk(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fk(e[r]))&&(n&&(n+=" "),n+=t);return n}function II(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return n=RI(u),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=DI(c,n);return s(c,d),d}return function(){return o(OI.apply(null,arguments))}}function _t(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const hk=/^\[(?:([a-z-]+):)?(.+)\]$/i,MI=/^\d+\/\d+$/,LI=new Set(["px","full","screen"]),zI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$I=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,UI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function gs(e){return Xo(e)||LI.has(e)||MI.test(e)}function eo(e){return Qa(e,"length",qI)}function Xo(e){return!!e&&!Number.isNaN(Number(e))}function Bu(e){return Qa(e,"number",Xo)}function Sl(e){return!!e&&Number.isInteger(Number(e))}function BI(e){return e.endsWith("%")&&Xo(e.slice(0,-1))}function Xe(e){return hk.test(e)}function to(e){return zI.test(e)}const WI=new Set(["length","size","percentage"]);function HI(e){return Qa(e,WI,mk)}function YI(e){return Qa(e,"position",mk)}const KI=new Set(["image","url"]);function GI(e){return Qa(e,KI,QI)}function ZI(e){return Qa(e,"",XI)}function kl(){return!0}function Qa(e,t,n){const r=hk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function qI(e){return FI.test(e)&&!$I.test(e)}function mk(){return!1}function XI(e){return UI.test(e)}function QI(e){return VI.test(e)}function JI(){const e=_t("colors"),t=_t("spacing"),n=_t("blur"),r=_t("brightness"),s=_t("borderColor"),o=_t("borderRadius"),i=_t("borderSpacing"),a=_t("borderWidth"),c=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),h=_t("gap"),m=_t("gradientColorStops"),x=_t("gradientColorStopPositions"),p=_t("inset"),w=_t("margin"),g=_t("opacity"),v=_t("padding"),b=_t("saturate"),_=_t("scale"),C=_t("sepia"),j=_t("skew"),T=_t("space"),R=_t("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",Xe,t],N=()=>[Xe,t],z=()=>["",gs,eo],S=()=>["auto",Xo,Xe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Xe],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Xo,Bu],B=()=>[Xo,Xe];return{cacheSize:500,separator:":",theme:{colors:[kl],spacing:[gs,eo],blur:["none","",to,Xe],brightness:$(),borderColor:[e],borderRadius:["none","","full",to,Xe],borderSpacing:N(),borderWidth:z(),contrast:$(),grayscale:I(),hueRotate:B(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[BI,eo],inset:G(),margin:G(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:I(),skew:B(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Xe]}],container:["container"],columns:[{columns:[to]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Xe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sl,Xe]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Sl,Xe]}],"grid-cols":[{"grid-cols":[kl]}],"col-start-end":[{col:["auto",{span:["full",Sl,Xe]},Xe]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[kl]}],"row-start-end":[{row:["auto",{span:[Sl,Xe]},Xe]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xe,t]}],"min-w":[{"min-w":[Xe,t,"min","max","fit"]}],"max-w":[{"max-w":[Xe,t,"none","full","min","max","fit","prose",{screen:[to]},to]}],h:[{h:[Xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",to,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bu]}],"font-family":[{font:[kl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Xe]}],"line-clamp":[{"line-clamp":["none",Xo,Bu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gs,Xe]}],"list-image":[{"list-image":["none",Xe]}],"list-style-type":[{list:["none","disc","decimal",Xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gs,eo]}],"underline-offset":[{"underline-offset":["auto",gs,Xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),YI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",HI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:J()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[gs,Xe]}],"outline-w":[{outline:[gs,eo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[gs,eo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",to,ZI]}],"shadow-color":[{shadow:[kl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",to,Xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Xe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Sl,Xe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gs,eo,Bu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const eM=II(JI);function re(...e){return eM(_I(e))}const ch=Jc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Me=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?ts:"button";return l.jsx(i,{className:re(ch({variant:t,size:n,className:e})),ref:o,...s})});Me.displayName="Button";function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function tM(e,t){const n=y.createContext(t);function r(o){const{children:i,...a}=o,c=y.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})}function s(o){const i=y.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function on(e,t=[]){let n=[];function r(o,i){const a=y.createContext(i),c=n.length;n=[...n,i];function u(f){const{scope:h,children:m,...x}=f,p=(h==null?void 0:h[e][c])||a,w=y.useMemo(()=>x,Object.values(x));return l.jsx(p.Provider,{value:w,children:m})}function d(f,h){const m=(h==null?void 0:h[e][c])||a,x=y.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(i=>y.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,nM(s,...t)]}function nM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ot(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Zn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=rM({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=Ot(n),c=y.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,c]}function rM({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,s=y.useRef(r),o=Ot(t);return y.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var sM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Pe=sM.reduce((e,t)=>{const n=y.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?ts:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function uv(e,t){e&&Bs.flushSync(()=>e.dispatchEvent(t))}function eu(e){const t=e+"CollectionProvider",[n,r]=on(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:x,children:p}=m,w=We.useRef(null),g=We.useRef(new Map).current;return l.jsx(s,{scope:x,itemMap:g,collectionRef:w,children:p})};i.displayName=t;const a=e+"CollectionSlot",c=We.forwardRef((m,x)=>{const{scope:p,children:w}=m,g=o(a,p),v=Ge(x,g.collectionRef);return l.jsx(ts,{ref:v,children:w})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=We.forwardRef((m,x)=>{const{scope:p,children:w,...g}=m,v=We.useRef(null),b=Ge(x,v),_=o(u,p);return We.useEffect(()=>(_.itemMap.set(v,{ref:v,...g}),()=>void _.itemMap.delete(v))),l.jsx(ts,{[d]:"",ref:b,children:w})});f.displayName=u;function h(m){const x=o(e+"CollectionConsumer",m);return We.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const g=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,C)=>g.indexOf(_.ref.current)-g.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},h,r]}var oM=y.createContext(void 0);function Ci(e){const t=y.useContext(oM);return e||t||"ltr"}function iM(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e);y.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var aM="DismissableLayer",vg="dismissableLayer.update",lM="dismissableLayer.pointerDownOutside",cM="dismissableLayer.focusOutside",eb,pk=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ja=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,u=y.useContext(pk),[d,f]=y.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=y.useState({}),x=Ge(t,T=>f(T)),p=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(w),v=d?p.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=g,C=dM(T=>{const R=T.target,A=[...u.branches].some(O=>O.contains(R));!_||A||(s==null||s(T),i==null||i(T),T.defaultPrevented||a==null||a())},h),j=fM(T=>{const R=T.target;[...u.branches].some(O=>O.contains(R))||(o==null||o(T),i==null||i(T),T.defaultPrevented||a==null||a())},h);return iM(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),y.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(eb=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),tb(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=eb)}},[d,h,n,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),tb())},[d,u]),y.useEffect(()=>{const T=()=>m({});return document.addEventListener(vg,T),()=>document.removeEventListener(vg,T)},[]),l.jsx(Pe.div,{...c,ref:x,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,C.onPointerDownCapture)})});Ja.displayName=aM;var uM="DismissableLayerBranch",gk=y.forwardRef((e,t)=>{const n=y.useContext(pk),r=y.useRef(null),s=Ge(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),l.jsx(Pe.div,{...e,ref:s})});gk.displayName=uM;function dM(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),r=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){yk(lM,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fM(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),r=y.useRef(!1);return y.useEffect(()=>{const s=o=>{o.target&&!r.current&&yk(cM,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tb(){const e=new CustomEvent(vg);document.dispatchEvent(e)}function yk(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?uv(s,o):s.dispatchEvent(o)}var hM=Ja,mM=gk,Wm=0;function dv(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nb()),document.body.insertAdjacentElement("beforeend",e[1]??nb()),Wm++,()=>{Wm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Wm--}},[])}function nb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Hm="focusScope.autoFocusOnMount",Ym="focusScope.autoFocusOnUnmount",rb={bubbles:!1,cancelable:!0},pM="FocusScope",uh=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=y.useState(null),u=Ot(s),d=Ot(o),f=y.useRef(null),h=Ge(t,p=>c(p)),m=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let p=function(b){if(m.paused||!a)return;const _=b.target;a.contains(_)?f.current=_:ro(f.current,{select:!0})},w=function(b){if(m.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||ro(f.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&ro(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),v.disconnect()}}},[r,a,m.paused]),y.useEffect(()=>{if(a){ob.add(m);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(Hm,rb);a.addEventListener(Hm,u),a.dispatchEvent(g),g.defaultPrevented||(gM(bM(vk(a)),{select:!0}),document.activeElement===p&&ro(a))}return()=>{a.removeEventListener(Hm,u),setTimeout(()=>{const g=new CustomEvent(Ym,rb);a.addEventListener(Ym,d),a.dispatchEvent(g),g.defaultPrevented||ro(p??document.body,{select:!0}),a.removeEventListener(Ym,d),ob.remove(m)},0)}}},[a,u,d,m]);const x=y.useCallback(p=>{if(!n&&!r||m.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(w&&g){const v=p.currentTarget,[b,_]=yM(v);b&&_?!p.shiftKey&&g===_?(p.preventDefault(),n&&ro(b,{select:!0})):p.shiftKey&&g===b&&(p.preventDefault(),n&&ro(_,{select:!0})):g===v&&p.preventDefault()}},[n,r,m.paused]);return l.jsx(Pe.div,{tabIndex:-1,...i,ref:h,onKeyDown:x})});uh.displayName=pM;function gM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ro(r,{select:t}),document.activeElement!==n)return}function yM(e){const t=vk(e),n=sb(t,e),r=sb(t.reverse(),e);return[n,r]}function vk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function sb(e,t){for(const n of e)if(!vM(n,{upTo:t}))return n}function vM(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xM(e){return e instanceof HTMLInputElement&&"select"in e}function ro(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xM(e)&&t&&e.select()}}var ob=wM();function wM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ib(e,t),e.unshift(t)},remove(t){var n;e=ib(e,t),(n=e[0])==null||n.resume()}}}function ib(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bM(e){return e.filter(t=>t.tagName!=="A")}var en=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},_M=T1.useId||(()=>{}),SM=0;function Wn(e){const[t,n]=y.useState(_M());return en(()=>{e||n(r=>r??String(SM++))},[e]),e||(t?`radix-${t}`:"")}const kM=["top","right","bottom","left"],Gr=Math.min,Un=Math.max,tf=Math.round,Wu=Math.floor,No=e=>({x:e,y:e}),CM={left:"right",right:"left",bottom:"top",top:"bottom"},jM={start:"end",end:"start"};function xg(e,t,n){return Un(e,Gr(t,n))}function Ls(e,t){return typeof e=="function"?e(t):e}function zs(e){return e.split("-")[0]}function el(e){return e.split("-")[1]}function fv(e){return e==="x"?"y":"x"}function hv(e){return e==="y"?"height":"width"}function To(e){return["top","bottom"].includes(zs(e))?"y":"x"}function mv(e){return fv(To(e))}function EM(e,t,n){n===void 0&&(n=!1);const r=el(e),s=mv(e),o=hv(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nf(i)),[i,nf(i)]}function NM(e){const t=nf(e);return[wg(e),t,wg(t)]}function wg(e){return e.replace(/start|end/g,t=>jM[t])}function TM(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function PM(e,t,n,r){const s=el(e);let o=TM(zs(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(wg)))),o}function nf(e){return e.replace(/left|right|bottom|top/g,t=>CM[t])}function RM(e){return{top:0,right:0,bottom:0,left:0,...e}}function xk(e){return typeof e!="number"?RM(e):{top:e,right:e,bottom:e,left:e}}function rf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ab(e,t,n){let{reference:r,floating:s}=e;const o=To(t),i=mv(t),a=hv(i),c=zs(t),u=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-s.width,y:f};break;default:m={x:r.x,y:r.y}}switch(el(t)){case"start":m[i]-=h*(n&&u?-1:1);break;case"end":m[i]+=h*(n&&u?-1:1);break}return m}const AM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=ab(u,r,c),h=r,m={},x=0;for(let p=0;p<a.length;p++){const{name:w,fn:g}=a[p],{x:v,y:b,data:_,reset:C}=await g({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});d=v??d,f=b??f,m={...m,[w]:{...m[w],..._}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:f}=ab(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:m}};async function Sc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Ls(t,e),x=xk(m),w=a[h?f==="floating"?"reference":"floating":f],g=rf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},C=rf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:c}):v);return{top:(g.top-C.top+x.top)/_.y,bottom:(C.bottom-g.bottom+x.bottom)/_.y,left:(g.left-C.left+x.left)/_.x,right:(C.right-g.right+x.right)/_.x}}const DM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Ls(e,t)||{};if(u==null)return{};const f=xk(d),h={x:n,y:r},m=mv(s),x=hv(m),p=await i.getDimensions(u),w=m==="y",g=w?"top":"left",v=w?"bottom":"right",b=w?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[m]-h[m]-o.floating[x],C=h[m]-o.reference[m],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=j?j[b]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=a.floating[b]||o.floating[x]);const R=_/2-C/2,A=T/2-p[x]/2-1,O=Gr(f[g],A),G=Gr(f[v],A),N=O,z=T-p[x]-G,S=T/2-p[x]/2+R,U=xg(N,S,z),J=!c.arrow&&el(s)!=null&&S!==U&&o.reference[x]/2-(S<N?O:G)-p[x]/2<0,F=J?S<N?S-N:S-z:0;return{[m]:h[m]+F,data:{[m]:U,centerOffset:S-U-F,...J&&{alignmentOffset:F}},reset:J}}}),OM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...w}=Ls(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=zs(s),v=To(a),b=zs(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(b||!p?[nf(a)]:NM(a)),j=x!=="none";!h&&j&&C.push(...PM(a,p,x,_));const T=[a,...C],R=await Sc(t,w),A=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&A.push(R[g]),f){const S=EM(s,i,_);A.push(R[S[0]],R[S[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every(S=>S<=0)){var G,N;const S=(((G=o.flip)==null?void 0:G.index)||0)+1,U=T[S];if(U)return{data:{index:S,overflows:O},reset:{placement:U}};let J=(N=O.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!J)switch(m){case"bestFit":{var z;const F=(z=O.filter(W=>{if(j){const I=To(W.placement);return I===v||I==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(I=>I>0).reduce((I,X)=>I+X,0)]).sort((W,I)=>W[1]-I[1])[0])==null?void 0:z[0];F&&(J=F);break}case"initialPlacement":J=a;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function lb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cb(e){return kM.some(t=>e[t]>=0)}const IM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ls(e,t);switch(r){case"referenceHidden":{const o=await Sc(t,{...s,elementContext:"reference"}),i=lb(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:cb(i)}}}case"escaped":{const o=await Sc(t,{...s,altBoundary:!0}),i=lb(o,n.floating);return{data:{escapedOffsets:i,escaped:cb(i)}}}default:return{}}}}};async function MM(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=zs(n),a=el(n),c=To(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=Ls(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(m=a==="end"?x*-1:x),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const LM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,c=await MM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},zM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:g,y:v}=w;return{x:g,y:v}}},...c}=Ls(e,t),u={x:n,y:r},d=await Sc(t,c),f=To(zs(s)),h=fv(f);let m=u[h],x=u[f];if(o){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",v=m+d[w],b=m-d[g];m=xg(v,m,b)}if(i){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=x+d[w],b=x-d[g];x=xg(v,x,b)}const p=a.fn({...t,[h]:m,[f]:x});return{...p,data:{x:p.x-n,y:p.y-r}}}}},FM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Ls(e,t),d={x:n,y:r},f=To(s),h=fv(f);let m=d[h],x=d[f];const p=Ls(a,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=h==="y"?"height":"width",_=o.reference[h]-o.floating[b]+w.mainAxis,C=o.reference[h]+o.reference[b]-w.mainAxis;m<_?m=_:m>C&&(m=C)}if(u){var g,v;const b=h==="y"?"width":"height",_=["top","left"].includes(zs(s)),C=o.reference[f]-o.floating[b]+(_&&((g=i.offset)==null?void 0:g[f])||0)+(_?0:w.crossAxis),j=o.reference[f]+o.reference[b]+(_?0:((v=i.offset)==null?void 0:v[f])||0)-(_?w.crossAxis:0);x<C?x=C:x>j&&(x=j)}return{[h]:m,[f]:x}}}},$M=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...a}=Ls(e,t),c=await Sc(t,a),u=zs(n),d=el(n),f=To(n)==="y",{width:h,height:m}=r.floating;let x,p;u==="top"||u==="bottom"?(x=u,p=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(p=u,x=d==="end"?"top":"bottom");const w=m-c.top-c.bottom,g=h-c.left-c.right,v=Gr(m-c[x],w),b=Gr(h-c[p],g),_=!t.middlewareData.shift;let C=v,j=b;if(f?j=d||_?Gr(b,g):g:C=d||_?Gr(v,w):w,_&&!d){const R=Un(c.left,0),A=Un(c.right,0),O=Un(c.top,0),G=Un(c.bottom,0);f?j=h-2*(R!==0||A!==0?R+A:Un(c.left,c.right)):C=m-2*(O!==0||G!==0?O+G:Un(c.top,c.bottom))}await i({...t,availableWidth:j,availableHeight:C});const T=await s.getDimensions(o.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function tl(e){return wk(e)?(e.nodeName||"").toLowerCase():"#document"}function Hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ys(e){var t;return(t=(wk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wk(e){return e instanceof Node||e instanceof Hn(e).Node}function Rr(e){return e instanceof Element||e instanceof Hn(e).Element}function ns(e){return e instanceof HTMLElement||e instanceof Hn(e).HTMLElement}function ub(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hn(e).ShadowRoot}function tu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function UM(e){return["table","td","th"].includes(tl(e))}function dh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function pv(e){const t=gv(),n=Rr(e)?Ar(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function VM(e){let t=Po(e);for(;ns(t)&&!Ma(t);){if(pv(t))return t;if(dh(t))return null;t=Po(t)}return null}function gv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ma(e){return["html","body","#document"].includes(tl(e))}function Ar(e){return Hn(e).getComputedStyle(e)}function fh(e){return Rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Po(e){if(tl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ub(e)&&e.host||Ys(e);return ub(t)?t.host:t}function bk(e){const t=Po(e);return Ma(t)?e.ownerDocument?e.ownerDocument.body:e.body:ns(t)&&tu(t)?t:bk(t)}function kc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=bk(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Hn(s);return o?t.concat(i,i.visualViewport||[],tu(s)?s:[],i.frameElement&&n?kc(i.frameElement):[]):t.concat(s,kc(s,[],n))}function _k(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ns(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=tf(n)!==o||tf(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function yv(e){return Rr(e)?e:e.contextElement}function wa(e){const t=yv(e);if(!ns(t))return No(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=_k(t);let i=(o?tf(n.width):n.width)/r,a=(o?tf(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const BM=No(0);function Sk(e){const t=Hn(e);return!gv()||!t.visualViewport?BM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hn(e)?!1:t}function gi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=yv(e);let i=No(1);t&&(r?Rr(r)&&(i=wa(r)):i=wa(e));const a=WM(o,n,r)?Sk(o):No(0);let c=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const h=Hn(o),m=r&&Rr(r)?Hn(r):r;let x=h,p=x.frameElement;for(;p&&r&&m!==x;){const w=wa(p),g=p.getBoundingClientRect(),v=Ar(p),b=g.left+(p.clientLeft+parseFloat(v.paddingLeft))*w.x,_=g.top+(p.clientTop+parseFloat(v.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,f*=w.y,c+=b,u+=_,x=Hn(p),p=x.frameElement}}return rf({width:d,height:f,x:c,y:u})}function HM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ys(r),a=t?dh(t.floating):!1;if(r===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=No(1);const d=No(0),f=ns(r);if((f||!f&&!o)&&((tl(r)!=="body"||tu(i))&&(c=fh(r)),ns(r))){const h=gi(r);u=wa(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function YM(e){return Array.from(e.getClientRects())}function kk(e){return gi(Ys(e)).left+fh(e).scrollLeft}function KM(e){const t=Ys(e),n=fh(e),r=e.ownerDocument.body,s=Un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+kk(e);const a=-n.scrollTop;return Ar(r).direction==="rtl"&&(i+=Un(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function GM(e,t){const n=Hn(e),r=Ys(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const u=gv();(!u||u&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}function ZM(e,t){const n=gi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=ns(e)?wa(e):No(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:i,height:a,x:c,y:u}}function db(e,t,n){let r;if(t==="viewport")r=GM(e,n);else if(t==="document")r=KM(Ys(e));else if(Rr(t))r=ZM(t,n);else{const s=Sk(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return rf(r)}function Ck(e,t){const n=Po(e);return n===t||!Rr(n)||Ma(n)?!1:Ar(n).position==="fixed"||Ck(n,t)}function qM(e,t){const n=t.get(e);if(n)return n;let r=kc(e,[],!1).filter(a=>Rr(a)&&tl(a)!=="body"),s=null;const o=Ar(e).position==="fixed";let i=o?Po(e):e;for(;Rr(i)&&!Ma(i);){const a=Ar(i),c=pv(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||tu(i)&&!c&&Ck(e,i))?r=r.filter(d=>d!==i):s=a,i=Po(i)}return t.set(e,r),r}function XM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?dh(t)?[]:qM(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,d)=>{const f=db(t,d,s);return u.top=Un(f.top,u.top),u.right=Gr(f.right,u.right),u.bottom=Gr(f.bottom,u.bottom),u.left=Un(f.left,u.left),u},db(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function QM(e){const{width:t,height:n}=_k(e);return{width:t,height:n}}function JM(e,t,n){const r=ns(t),s=Ys(t),o=n==="fixed",i=gi(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=No(0);if(r||!r&&!o)if((tl(t)!=="body"||tu(s))&&(a=fh(t)),r){const f=gi(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=kk(s));const u=i.left+a.scrollLeft-c.x,d=i.top+a.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Km(e){return Ar(e).position==="static"}function fb(e,t){return!ns(e)||Ar(e).position==="fixed"?null:t?t(e):e.offsetParent}function jk(e,t){const n=Hn(e);if(dh(e))return n;if(!ns(e)){let s=Po(e);for(;s&&!Ma(s);){if(Rr(s)&&!Km(s))return s;s=Po(s)}return n}let r=fb(e,t);for(;r&&UM(r)&&Km(r);)r=fb(r,t);return r&&Ma(r)&&Km(r)&&!pv(r)?n:r||VM(e)||n}const eL=async function(e){const t=this.getOffsetParent||jk,n=this.getDimensions,r=await n(e.floating);return{reference:JM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tL(e){return Ar(e).direction==="rtl"}const nL={convertOffsetParentRelativeRectToViewportRelativeRect:HM,getDocumentElement:Ys,getClippingRect:XM,getOffsetParent:jk,getElementRects:eL,getClientRects:YM,getDimensions:QM,getScale:wa,isElement:Rr,isRTL:tL};function rL(e,t){let n=null,r;const s=Ys(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const m=Wu(d),x=Wu(s.clientWidth-(u+f)),p=Wu(s.clientHeight-(d+h)),w=Wu(u),v={rootMargin:-m+"px "+-x+"px "+-p+"px "+-w+"px",threshold:Un(0,Gr(1,c))||1};let b=!0;function _(C){const j=C[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return i(!0),o}function sL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=yv(e),d=s||o?[...u?kc(u):[],...kc(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=u&&a?rL(u,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let x,p=c?gi(e):null;c&&w();function w(){const g=gi(e);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,x=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(v=>{s&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(x)}}const oL=LM,iL=zM,aL=OM,lL=$M,cL=IM,hb=DM,uL=FM,dL=(e,t,n)=>{const r=new Map,s={platform:nL,...n},o={...s.platform,_c:r};return AM(e,t,{...s,platform:o})};var vd=typeof document<"u"?y.useLayoutEffect:y.useEffect;function sf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!sf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ek(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mb(e,t){const n=Ek(e);return Math.round(t*n)/n}function pb(e){const t=y.useRef(e);return vd(()=>{t.current=e}),t}function fL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=y.useState(r);sf(h,r)||m(r);const[x,p]=y.useState(null),[w,g]=y.useState(null),v=y.useCallback(F=>{F!==j.current&&(j.current=F,p(F))},[]),b=y.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),_=o||x,C=i||w,j=y.useRef(null),T=y.useRef(null),R=y.useRef(d),A=c!=null,O=pb(c),G=pb(s),N=y.useCallback(()=>{if(!j.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};G.current&&(F.platform=G.current),dL(j.current,T.current,F).then(W=>{const I={...W,isPositioned:!0};z.current&&!sf(R.current,I)&&(R.current=I,Bs.flushSync(()=>{f(I)}))})},[h,t,n,G]);vd(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const z=y.useRef(!1);vd(()=>(z.current=!0,()=>{z.current=!1}),[]),vd(()=>{if(_&&(j.current=_),C&&(T.current=C),_&&C){if(O.current)return O.current(_,C,N);N()}},[_,C,N,O,A]);const S=y.useMemo(()=>({reference:j,floating:T,setReference:v,setFloating:b}),[v,b]),U=y.useMemo(()=>({reference:_,floating:C}),[_,C]),J=y.useMemo(()=>{const F={position:n,left:0,top:0};if(!U.floating)return F;const W=mb(U.floating,d.x),I=mb(U.floating,d.y);return a?{...F,transform:"translate("+W+"px, "+I+"px)",...Ek(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,a,U.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:N,refs:S,elements:U,floatingStyles:J}),[d,N,S,U,J])}const hL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?hb({element:r.current,padding:s}).fn(n):{}:r?hb({element:r,padding:s}).fn(n):{}}}},mL=(e,t)=>({...oL(e),options:[e,t]}),pL=(e,t)=>({...iL(e),options:[e,t]}),gL=(e,t)=>({...uL(e),options:[e,t]}),yL=(e,t)=>({...aL(e),options:[e,t]}),vL=(e,t)=>({...lL(e),options:[e,t]}),xL=(e,t)=>({...cL(e),options:[e,t]}),wL=(e,t)=>({...hL(e),options:[e,t]});var bL="Arrow",Nk=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return l.jsx(Pe.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nk.displayName=bL;var _L=Nk;function vv(e){const[t,n]=y.useState(void 0);return en(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xv="Popper",[Tk,nl]=on(xv),[SL,Pk]=Tk(xv),Rk=e=>{const{__scopePopper:t,children:n}=e,[r,s]=y.useState(null);return l.jsx(SL,{scope:t,anchor:r,onAnchorChange:s,children:n})};Rk.displayName=xv;var Ak="PopperAnchor",Dk=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Pk(Ak,n),i=y.useRef(null),a=Ge(t,i);return y.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:l.jsx(Pe.div,{...s,ref:a})});Dk.displayName=Ak;var wv="PopperContent",[kL,CL]=Tk(wv),Ok=y.forwardRef((e,t)=>{var me,we,Te,Fe,Ie,Re;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:x,...p}=e,w=Pk(wv,n),[g,v]=y.useState(null),b=Ge(t,st=>v(st)),[_,C]=y.useState(null),j=vv(_),T=(j==null?void 0:j.width)??0,R=(j==null?void 0:j.height)??0,A=r+(o!=="center"?"-"+o:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(u)?u:[u],N=G.length>0,z={padding:O,boundary:G.filter(EL),altBoundary:N},{refs:S,floatingStyles:U,placement:J,isPositioned:F,middlewareData:W}=fL({strategy:"fixed",placement:A,whileElementsMounted:(...st)=>sL(...st,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[mL({mainAxis:s+R,alignmentAxis:i}),c&&pL({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?gL():void 0,...z}),c&&yL({...z}),vL({...z,apply:({elements:st,rects:E,availableWidth:ee,availableHeight:Z})=>{const{width:D,height:k}=E.reference,P=st.floating.style;P.setProperty("--radix-popper-available-width",`${ee}px`),P.setProperty("--radix-popper-available-height",`${Z}px`),P.setProperty("--radix-popper-anchor-width",`${D}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),_&&wL({element:_,padding:a}),NL({arrowWidth:T,arrowHeight:R}),h&&xL({strategy:"referenceHidden",...z})]}),[I,X]=Lk(J),$=Ot(x);en(()=>{F&&($==null||$())},[F,$]);const B=(me=W.arrow)==null?void 0:me.x,he=(we=W.arrow)==null?void 0:we.y,se=((Te=W.arrow)==null?void 0:Te.centerOffset)!==0,[oe,Oe]=y.useState();return en(()=>{g&&Oe(window.getComputedStyle(g).zIndex)},[g]),l.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:F?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Fe=W.transformOrigin)==null?void 0:Fe.x,(Ie=W.transformOrigin)==null?void 0:Ie.y].join(" "),...((Re=W.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(kL,{scope:n,placedSide:I,onArrowChange:C,arrowX:B,arrowY:he,shouldHideArrow:se,children:l.jsx(Pe.div,{"data-side":I,"data-align":X,...p,ref:b,style:{...p.style,animation:F?void 0:"none"}})})})});Ok.displayName=wv;var Ik="PopperArrow",jL={top:"bottom",right:"left",bottom:"top",left:"right"},Mk=y.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=CL(Ik,r),i=jL[o.placedSide];return l.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:l.jsx(_L,{...s,ref:n,style:{...s.style,display:"block"}})})});Mk.displayName=Ik;function EL(e){return e!==null}var NL=e=>({name:"transformOrigin",options:e,fn(t){var w,g,v;const{placement:n,rects:r,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Lk(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let x="",p="";return u==="bottom"?(x=i?f:`${h}px`,p=`${-c}px`):u==="top"?(x=i?f:`${h}px`,p=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,p=i?f:`${m}px`):u==="left"&&(x=`${r.floating.width+c}px`,p=i?f:`${m}px`),{data:{x,y:p}}}});function Lk(e){const[t,n="center"]=e.split("-");return[t,n]}var bv=Rk,_v=Dk,Sv=Ok,kv=Mk,TL="Portal",nu=y.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=y.useState(!1);en(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?AS.createPortal(l.jsx(Pe.div,{...r,ref:t}),i):null});nu.displayName=TL;function PL(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var an=e=>{const{present:t,children:n}=e,r=RL(t),s=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Ge(r.ref,AL(s));return typeof n=="function"||r.isPresent?y.cloneElement(s,{ref:o}):null};an.displayName="Presence";function RL(e){const[t,n]=y.useState(),r=y.useRef({}),s=y.useRef(e),o=y.useRef("none"),i=e?"mounted":"unmounted",[a,c]=PL(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=Hu(r.current);o.current=a==="mounted"?u:"none"},[a]),en(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,m=Hu(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),en(()=>{if(t){const u=f=>{const m=Hu(r.current).includes(f.animationName);f.target===t&&m&&Bs.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Hu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Hu(e){return(e==null?void 0:e.animationName)||"none"}function AL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gm="rovingFocusGroup.onEntryFocus",DL={bubbles:!1,cancelable:!0},hh="RovingFocusGroup",[bg,zk,OL]=eu(hh),[IL,rl]=on(hh,[OL]),[ML,LL]=IL(hh),Fk=y.forwardRef((e,t)=>l.jsx(bg.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(bg.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(zL,{...e,ref:t})})}));Fk.displayName=hh;var zL=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=y.useRef(null),m=Ge(t,h),x=Ci(o),[p=null,w]=Zn({prop:i,defaultProp:a,onChange:c}),[g,v]=y.useState(!1),b=Ot(u),_=zk(n),C=y.useRef(!1),[j,T]=y.useState(0);return y.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(Gm,b),()=>R.removeEventListener(Gm,b)},[b]),l.jsx(ML,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:p,onItemFocus:y.useCallback(R=>w(R),[w]),onItemShiftTab:y.useCallback(()=>v(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:y.useCallback(()=>T(R=>R-1),[]),children:l.jsx(Pe.div,{tabIndex:g||j===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{C.current=!0}),onFocus:ue(e.onFocus,R=>{const A=!C.current;if(R.target===R.currentTarget&&A&&!g){const O=new CustomEvent(Gm,DL);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const G=_().filter(J=>J.focusable),N=G.find(J=>J.active),z=G.find(J=>J.id===p),U=[N,z,...G].filter(Boolean).map(J=>J.ref.current);Vk(U,d)}}C.current=!1}),onBlur:ue(e.onBlur,()=>v(!1))})})}),$k="RovingFocusGroupItem",Uk=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=Wn(),c=o||a,u=LL($k,n),d=u.currentTabStopId===c,f=zk(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=u;return y.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),l.jsx(bg.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:l.jsx(Pe.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:ue(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ue(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const p=UL(x,u.orientation,u.dir);if(p!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let g=f().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")g.reverse();else if(p==="prev"||p==="next"){p==="prev"&&g.reverse();const v=g.indexOf(x.currentTarget);g=u.loop?VL(g,v+1):g.slice(v+1)}setTimeout(()=>Vk(g))}})})})});Uk.displayName=$k;var FL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $L(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function UL(e,t,n){const r=$L(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return FL[r]}function Vk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function VL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Cv=Fk,jv=Uk,BL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$i=new WeakMap,Yu=new WeakMap,Ku={},Zm=0,Bk=function(e){return e&&(e.host||Bk(e.parentNode))},WL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},HL=function(e,t,n,r){var s=WL(t,Array.isArray(e)?e:[e]);Ku[n]||(Ku[n]=new WeakMap);var o=Ku[n],i=[],a=new Set,c=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var m=h.getAttribute(r),x=m!==null&&m!=="false",p=($i.get(h)||0)+1,w=(o.get(h)||0)+1;$i.set(h,p),o.set(h,w),i.push(h),p===1&&x&&Yu.set(h,!0),w===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return d(t),a.clear(),Zm++,function(){i.forEach(function(f){var h=$i.get(f)-1,m=o.get(f)-1;$i.set(f,h),o.set(f,m),h||(Yu.has(f)||f.removeAttribute(r),Yu.delete(f)),m||f.removeAttribute(n)}),Zm--,Zm||($i=new WeakMap,$i=new WeakMap,Yu=new WeakMap,Ku={})}},Ev=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=BL(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),HL(r,s,n,"aria-hidden")):function(){return null}},Hr=function(){return Hr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Hr.apply(this,arguments)};function Wk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function YL(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var xd="right-scroll-bar-position",wd="width-before-scroll-bar",KL="with-scroll-bars-hidden",GL="--removed-body-scroll-bar-size";function qm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ZL(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var qL=typeof window<"u"?y.useLayoutEffect:y.useEffect,gb=new WeakMap;function XL(e,t){var n=ZL(null,function(r){return e.forEach(function(s){return qm(s,r)})});return qL(function(){var r=gb.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||qm(a,null)}),o.forEach(function(a){s.has(a)||qm(a,i)})}gb.set(n,e)},[e]),n}function QL(e){return e}function JL(e,t){t===void 0&&(t=QL);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return s}function ez(e){e===void 0&&(e={});var t=JL(null);return t.options=Hr({async:!0,ssr:!1},e),t}var Hk=function(e){var t=e.sideCar,n=Wk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Hr({},n))};Hk.isSideCarExport=!0;function tz(e,t){return e.useMedium(t),Hk}var Yk=ez(),Xm=function(){},mh=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Xm,onWheelCapture:Xm,onTouchMoveCapture:Xm}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noIsolation,x=e.inert,p=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,v=e.gapMode,b=Wk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,C=XL([n,t]),j=Hr(Hr({},b),s);return y.createElement(y.Fragment,null,d&&y.createElement(_,{sideCar:Yk,removeScrollBar:u,shards:f,noIsolation:m,inert:x,setCallbacks:o,allowPinchZoom:!!p,lockRef:n,gapMode:v}),i?y.cloneElement(y.Children.only(a),Hr(Hr({},j),{ref:C})):y.createElement(g,Hr({},j,{className:c,ref:C}),a))});mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mh.classNames={fullWidth:wd,zeroRight:xd};var nz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nz();return t&&e.setAttribute("nonce",t),e}function sz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var iz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rz())&&(sz(t,n),oz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},az=function(){var e=iz();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Kk=function(){var e=az(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},lz={left:0,top:0,right:0,gap:0},Qm=function(e){return parseInt(e||"",10)||0},cz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Qm(n),Qm(r),Qm(s)]},uz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lz;var t=cz(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dz=Kk(),ba="data-scroll-locked",fz=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` - .`.concat(KL,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(a,"px ").concat(r,`; - } - body[`).concat(ba,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(s,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(i,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(a,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(xd,` { - right: `).concat(a,"px ").concat(r,`; - } - - .`).concat(wd,` { - margin-right: `).concat(a,"px ").concat(r,`; - } - - .`).concat(xd," .").concat(xd,` { - right: 0 `).concat(r,`; - } - - .`).concat(wd," .").concat(wd,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(ba,`] { - `).concat(GL,": ").concat(a,`px; - } -`)},yb=function(){var e=parseInt(document.body.getAttribute(ba)||"0",10);return isFinite(e)?e:0},hz=function(){y.useEffect(function(){return document.body.setAttribute(ba,(yb()+1).toString()),function(){var e=yb()-1;e<=0?document.body.removeAttribute(ba):document.body.setAttribute(ba,e.toString())}},[])},mz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;hz();var o=y.useMemo(function(){return uz(s)},[s]);return y.createElement(dz,{styles:fz(o,!t,s,n?"":"!important")})},_g=!1;if(typeof window<"u")try{var Gu=Object.defineProperty({},"passive",{get:function(){return _g=!0,!0}});window.addEventListener("test",Gu,Gu),window.removeEventListener("test",Gu,Gu)}catch{_g=!1}var Ui=_g?{passive:!1}:!1,pz=function(e){return e.tagName==="TEXTAREA"},Gk=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pz(e)&&n[t]==="visible")},gz=function(e){return Gk(e,"overflowY")},yz=function(e){return Gk(e,"overflowX")},vb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Zk(e,r);if(s){var o=qk(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},xz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Zk=function(e,t){return e==="v"?gz(t):yz(t)},qk=function(e,t){return e==="v"?vz(t):xz(t)},wz=function(e,t){return e==="h"&&t==="rtl"?-1:1},bz=function(e,t,n,r,s){var o=wz(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),u=!1,d=i>0,f=0,h=0;do{var m=qk(e,a),x=m[0],p=m[1],w=m[2],g=p-w-o*x;(x||g)&&Zk(e,a)&&(f+=g,h+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},Zu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xb=function(e){return[e.deltaX,e.deltaY]},wb=function(e){return e&&"current"in e?e.current:e},_z=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sz=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},kz=0,Vi=[];function Cz(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),s=y.useState(kz++)[0],o=y.useState(Kk)[0],i=y.useRef(e);y.useEffect(function(){i.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=YL([e.lockRef.current],(e.shards||[]).map(wb),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(p,w){if("touches"in p&&p.touches.length===2)return!i.current.allowPinchZoom;var g=Zu(p),v=n.current,b="deltaX"in p?p.deltaX:v[0]-g[0],_="deltaY"in p?p.deltaY:v[1]-g[1],C,j=p.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in p&&T==="h"&&j.type==="range")return!1;var R=vb(T,j);if(!R)return!0;if(R?C=T:(C=T==="v"?"h":"v",R=vb(T,j)),!R)return!1;if(!r.current&&"changedTouches"in p&&(b||_)&&(r.current=C),!C)return!0;var A=r.current||C;return bz(A,w,p,A==="h"?b:_,!0)},[]),c=y.useCallback(function(p){var w=p;if(!(!Vi.length||Vi[Vi.length-1]!==o)){var g="deltaY"in w?xb(w):Zu(w),v=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&_z(C.delta,g)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(wb).filter(Boolean).filter(function(C){return C.contains(w.target)}),_=b.length>0?a(w,b[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),u=y.useCallback(function(p,w,g,v){var b={name:p,delta:w,target:g,should:v,shadowParent:jz(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),d=y.useCallback(function(p){n.current=Zu(p),r.current=void 0},[]),f=y.useCallback(function(p){u(p.type,xb(p),p.target,a(p,e.lockRef.current))},[]),h=y.useCallback(function(p){u(p.type,Zu(p),p.target,a(p,e.lockRef.current))},[]);y.useEffect(function(){return Vi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Ui),document.addEventListener("touchmove",c,Ui),document.addEventListener("touchstart",d,Ui),function(){Vi=Vi.filter(function(p){return p!==o}),document.removeEventListener("wheel",c,Ui),document.removeEventListener("touchmove",c,Ui),document.removeEventListener("touchstart",d,Ui)}},[]);var m=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(o,{styles:Sz(s)}):null,m?y.createElement(mz,{gapMode:e.gapMode}):null)}function jz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ez=tz(Yk,Cz);var ph=y.forwardRef(function(e,t){return y.createElement(mh,Hr({},e,{ref:t,sideCar:Ez}))});ph.classNames=mh.classNames;var Sg=["Enter"," "],Nz=["ArrowDown","PageUp","Home"],Xk=["ArrowUp","PageDown","End"],Tz=[...Nz,...Xk],Pz={ltr:[...Sg,"ArrowRight"],rtl:[...Sg,"ArrowLeft"]},Rz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ru="Menu",[Cc,Az,Dz]=eu(ru),[ji,Qk]=on(ru,[Dz,nl,rl]),gh=nl(),Jk=rl(),[Oz,Ei]=ji(ru),[Iz,su]=ji(ru),eC=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=gh(t),[c,u]=y.useState(null),d=y.useRef(!1),f=Ot(o),h=Ci(s);return y.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),l.jsx(bv,{...a,children:l.jsx(Oz,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(Iz,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})};eC.displayName=ru;var Mz="MenuAnchor",Nv=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=gh(n);return l.jsx(_v,{...s,...r,ref:t})});Nv.displayName=Mz;var Tv="MenuPortal",[Lz,tC]=ji(Tv,{forceMount:void 0}),nC=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Ei(Tv,t);return l.jsx(Lz,{scope:t,forceMount:n,children:l.jsx(an,{present:n||o.open,children:l.jsx(nu,{asChild:!0,container:s,children:r})})})};nC.displayName=Tv;var ur="MenuContent",[zz,Pv]=ji(ur),rC=y.forwardRef((e,t)=>{const n=tC(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ei(ur,e.__scopeMenu),i=su(ur,e.__scopeMenu);return l.jsx(Cc.Provider,{scope:e.__scopeMenu,children:l.jsx(an,{present:r||o.open,children:l.jsx(Cc.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(Fz,{...s,ref:t}):l.jsx($z,{...s,ref:t})})})})}),Fz=y.forwardRef((e,t)=>{const n=Ei(ur,e.__scopeMenu),r=y.useRef(null),s=Ge(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Ev(o)},[]),l.jsx(Rv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$z=y.forwardRef((e,t)=>{const n=Ei(ur,e.__scopeMenu);return l.jsx(Rv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Rv=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:x,...p}=e,w=Ei(ur,n),g=su(ur,n),v=gh(n),b=Jk(n),_=Az(n),[C,j]=y.useState(null),T=y.useRef(null),R=Ge(t,T,w.onContentChange),A=y.useRef(0),O=y.useRef(""),G=y.useRef(0),N=y.useRef(null),z=y.useRef("right"),S=y.useRef(0),U=x?ph:y.Fragment,J=x?{as:ts,allowPinchZoom:!0}:void 0,F=I=>{var me,we;const X=O.current+I,$=_().filter(Te=>!Te.disabled),B=document.activeElement,he=(me=$.find(Te=>Te.ref.current===B))==null?void 0:me.textValue,se=$.map(Te=>Te.textValue),oe=Qz(se,X,he),Oe=(we=$.find(Te=>Te.textValue===oe))==null?void 0:we.ref.current;(function Te(Fe){O.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>Te(""),1e3))})(X),Oe&&setTimeout(()=>Oe.focus())};y.useEffect(()=>()=>window.clearTimeout(A.current),[]),dv();const W=y.useCallback(I=>{var $,B;return z.current===(($=N.current)==null?void 0:$.side)&&eF(I,(B=N.current)==null?void 0:B.area)},[]);return l.jsx(zz,{scope:n,searchRef:O,onItemEnter:y.useCallback(I=>{W(I)&&I.preventDefault()},[W]),onItemLeave:y.useCallback(I=>{var X;W(I)||((X=T.current)==null||X.focus(),j(null))},[W]),onTriggerLeave:y.useCallback(I=>{W(I)&&I.preventDefault()},[W]),pointerGraceTimerRef:G,onPointerGraceIntentChange:y.useCallback(I=>{N.current=I},[]),children:l.jsx(U,{...J,children:l.jsx(uh,{asChild:!0,trapped:s,onMountAutoFocus:ue(o,I=>{var X;I.preventDefault(),(X=T.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:l.jsx(Cv,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:j,onEntryFocus:ue(c,I=>{g.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Sv,{role:"menu","aria-orientation":"vertical","data-state":xC(w.open),"data-radix-menu-content":"",dir:g.dir,...v,...p,ref:R,style:{outline:"none",...p.style},onKeyDown:ue(p.onKeyDown,I=>{const $=I.target.closest("[data-radix-menu-content]")===I.currentTarget,B=I.ctrlKey||I.altKey||I.metaKey,he=I.key.length===1;$&&(I.key==="Tab"&&I.preventDefault(),!B&&he&&F(I.key));const se=T.current;if(I.target!==se||!Tz.includes(I.key))return;I.preventDefault();const Oe=_().filter(me=>!me.disabled).map(me=>me.ref.current);Xk.includes(I.key)&&Oe.reverse(),qz(Oe)}),onBlur:ue(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:ue(e.onPointerMove,jc(I=>{const X=I.target,$=S.current!==I.clientX;if(I.currentTarget.contains(X)&&$){const B=I.clientX>S.current?"right":"left";z.current=B,S.current=I.clientX}}))})})})})})})});rC.displayName=ur;var Uz="MenuGroup",Av=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Pe.div,{role:"group",...r,ref:t})});Av.displayName=Uz;var Vz="MenuLabel",sC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});sC.displayName=Vz;var of="MenuItem",bb="menu.itemSelect",yh=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=y.useRef(null),i=su(of,e.__scopeMenu),a=Pv(of,e.__scopeMenu),c=Ge(t,o),u=y.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(bb,{bubbles:!0,cancelable:!0});f.addEventListener(bb,m=>r==null?void 0:r(m),{once:!0}),uv(f,h),h.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(oC,{...s,ref:c,disabled:n,onClick:ue(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ue(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ue(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||Sg.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});yh.displayName=of;var oC=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=Pv(of,n),a=Jk(n),c=y.useRef(null),u=Ge(t,c),[d,f]=y.useState(!1),[h,m]=y.useState("");return y.useEffect(()=>{const x=c.current;x&&m((x.textContent??"").trim())},[o.children]),l.jsx(Cc.ItemSlot,{scope:n,disabled:r,textValue:s??h,children:l.jsx(jv,{asChild:!0,...a,focusable:!r,children:l.jsx(Pe.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:ue(e.onPointerMove,jc(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(e.onPointerLeave,jc(x=>i.onItemLeave(x))),onFocus:ue(e.onFocus,()=>f(!0)),onBlur:ue(e.onBlur,()=>f(!1))})})})}),Bz="MenuCheckboxItem",iC=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return l.jsx(dC,{scope:e.__scopeMenu,checked:n,children:l.jsx(yh,{role:"menuitemcheckbox","aria-checked":af(n)?"mixed":n,...s,ref:t,"data-state":Ov(n),onSelect:ue(s.onSelect,()=>r==null?void 0:r(af(n)?!0:!n),{checkForDefaultPrevented:!1})})})});iC.displayName=Bz;var aC="MenuRadioGroup",[Wz,Hz]=ji(aC,{value:void 0,onValueChange:()=>{}}),lC=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Ot(r);return l.jsx(Wz,{scope:e.__scopeMenu,value:n,onValueChange:o,children:l.jsx(Av,{...s,ref:t})})});lC.displayName=aC;var cC="MenuRadioItem",uC=y.forwardRef((e,t)=>{const{value:n,...r}=e,s=Hz(cC,e.__scopeMenu),o=n===s.value;return l.jsx(dC,{scope:e.__scopeMenu,checked:o,children:l.jsx(yh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Ov(o),onSelect:ue(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});uC.displayName=cC;var Dv="MenuItemIndicator",[dC,Yz]=ji(Dv,{checked:!1}),fC=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=Yz(Dv,n);return l.jsx(an,{present:r||af(o.checked)||o.checked===!0,children:l.jsx(Pe.span,{...s,ref:t,"data-state":Ov(o.checked)})})});fC.displayName=Dv;var Kz="MenuSeparator",hC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Pe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});hC.displayName=Kz;var Gz="MenuArrow",mC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=gh(n);return l.jsx(kv,{...s,...r,ref:t})});mC.displayName=Gz;var Zz="MenuSub",[GH,pC]=ji(Zz),Ml="MenuSubTrigger",gC=y.forwardRef((e,t)=>{const n=Ei(Ml,e.__scopeMenu),r=su(Ml,e.__scopeMenu),s=pC(Ml,e.__scopeMenu),o=Pv(Ml,e.__scopeMenu),i=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=y.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return y.useEffect(()=>d,[d]),y.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),l.jsx(Nv,{asChild:!0,...u,children:l.jsx(oC,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":xC(n.open),...e,ref:lh(t,s.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(e.onPointerMove,jc(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ue(e.onPointerLeave,jc(f=>{var m,x;d();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const p=(x=n.content)==null?void 0:x.dataset.side,w=p==="right",g=w?-5:5,v=h[w?"left":"right"],b=h[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:v,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:v,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ue(e.onKeyDown,f=>{var m;const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Pz[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});gC.displayName=Ml;var yC="MenuSubContent",vC=y.forwardRef((e,t)=>{const n=tC(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ei(ur,e.__scopeMenu),i=su(ur,e.__scopeMenu),a=pC(yC,e.__scopeMenu),c=y.useRef(null),u=Ge(t,c);return l.jsx(Cc.Provider,{scope:e.__scopeMenu,children:l.jsx(an,{present:r||o.open,children:l.jsx(Cc.Slot,{scope:e.__scopeMenu,children:l.jsx(Rv,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ue(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ue(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ue(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),h=Rz[i.dir].includes(d.key);f&&h&&(o.onOpenChange(!1),(m=a.trigger)==null||m.focus(),d.preventDefault())})})})})})});vC.displayName=yC;function xC(e){return e?"open":"closed"}function af(e){return e==="indeterminate"}function Ov(e){return af(e)?"indeterminate":e?"checked":"unchecked"}function qz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qz(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=Xz(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function Jz(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function eF(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jz(n,t)}function jc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var tF=eC,nF=Nv,rF=nC,sF=rC,oF=Av,iF=sC,aF=yh,lF=iC,cF=lC,uF=uC,dF=fC,fF=hC,hF=mC,mF=gC,pF=vC,Iv="DropdownMenu",[gF,ZH]=on(Iv,[Qk]),En=Qk(),[yF,wC]=gF(Iv),bC=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=En(t),u=y.useRef(null),[d=!1,f]=Zn({prop:s,defaultProp:o,onChange:i});return l.jsx(yF,{scope:t,triggerId:Wn(),triggerRef:u,contentId:Wn(),open:d,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:a,children:l.jsx(tF,{...c,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};bC.displayName=Iv;var _C="DropdownMenuTrigger",SC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=wC(_C,n),i=En(n);return l.jsx(nF,{asChild:!0,...i,children:l.jsx(Pe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:lh(t,o.triggerRef),onPointerDown:ue(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ue(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});SC.displayName=_C;var vF="DropdownMenuPortal",kC=e=>{const{__scopeDropdownMenu:t,...n}=e,r=En(t);return l.jsx(rF,{...r,...n})};kC.displayName=vF;var CC="DropdownMenuContent",jC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=wC(CC,n),o=En(n),i=y.useRef(!1);return l.jsx(sF,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ue(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jC.displayName=CC;var xF="DropdownMenuGroup",wF=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(oF,{...s,...r,ref:t})});wF.displayName=xF;var bF="DropdownMenuLabel",EC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(iF,{...s,...r,ref:t})});EC.displayName=bF;var _F="DropdownMenuItem",NC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(aF,{...s,...r,ref:t})});NC.displayName=_F;var SF="DropdownMenuCheckboxItem",TC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(lF,{...s,...r,ref:t})});TC.displayName=SF;var kF="DropdownMenuRadioGroup",CF=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(cF,{...s,...r,ref:t})});CF.displayName=kF;var jF="DropdownMenuRadioItem",PC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(uF,{...s,...r,ref:t})});PC.displayName=jF;var EF="DropdownMenuItemIndicator",RC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(dF,{...s,...r,ref:t})});RC.displayName=EF;var NF="DropdownMenuSeparator",AC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(fF,{...s,...r,ref:t})});AC.displayName=NF;var TF="DropdownMenuArrow",PF=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(hF,{...s,...r,ref:t})});PF.displayName=TF;var RF="DropdownMenuSubTrigger",DC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(mF,{...s,...r,ref:t})});DC.displayName=RF;var AF="DropdownMenuSubContent",OC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(pF,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});OC.displayName=AF;var DF=bC,OF=SC,IF=kC,IC=jC,MC=EC,LC=NC,zC=TC,FC=PC,$C=RC,UC=AC,VC=DC,BC=OC;const Mv=DF,Lv=OF,MF=y.forwardRef(({className:e,inset:t,children:n,...r},s)=>l.jsxs(VC,{ref:s,className:re("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,l.jsx(ok,{className:"ml-auto h-4 w-4"})]}));MF.displayName=VC.displayName;const LF=y.forwardRef(({className:e,...t},n)=>l.jsx(BC,{ref:n,className:re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));LF.displayName=BC.displayName;const vh=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(IF,{children:l.jsx(IC,{ref:r,sideOffset:t,className:re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));vh.displayName=IC.displayName;const ri=y.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(LC,{ref:r,className:re("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));ri.displayName=LC.displayName;const zF=y.forwardRef(({className:e,children:t,checked:n,...r},s)=>l.jsxs(zC,{ref:s,className:re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx($C,{children:l.jsx(sk,{className:"h-4 w-4"})})}),t]}));zF.displayName=zC.displayName;const FF=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(FC,{ref:r,className:re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx($C,{children:l.jsx(ik,{className:"h-2 w-2 fill-current"})})}),t]}));FF.displayName=FC.displayName;const $F=y.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(MC,{ref:r,className:re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));$F.displayName=MC.displayName;const UF=y.forwardRef(({className:e,...t},n)=>l.jsx(UC,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));UF.displayName=UC.displayName;function VF(){const{i18n:e}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(lI,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(vh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(ri,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}const BF={theme:"system",setTheme:()=>null},WC=y.createContext(BF);function WF({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=y.useState(()=>localStorage.getItem(n)||t);y.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return l.jsx(WC.Provider,{...r,value:i,children:e})}const HF=()=>{const e=y.useContext(WC);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function YF(){const{setTheme:e}=HF(),{t}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(pI,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(fI,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(vh,{align:"end",children:[l.jsx(ri,{onClick:()=>e("light"),children:t("common.theme.light")}),l.jsx(ri,{onClick:()=>e("dark"),children:t("common.theme.dark")}),l.jsx(ri,{onClick:()=>e("system"),children:t("common.theme.system")})]})]})}var zv="Dialog",[HC,YC]=on(zv),[KF,Lr]=HC(zv),KC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=y.useRef(null),c=y.useRef(null),[u=!1,d]=Zn({prop:r,defaultProp:s,onChange:o});return l.jsx(KF,{scope:t,triggerRef:a,contentRef:c,contentId:Wn(),titleId:Wn(),descriptionId:Wn(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};KC.displayName=zv;var GC="DialogTrigger",ZC=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(GC,n),o=Ge(t,s.triggerRef);return l.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Uv(s.open),...r,ref:o,onClick:ue(e.onClick,s.onOpenToggle)})});ZC.displayName=GC;var Fv="DialogPortal",[GF,qC]=HC(Fv,{forceMount:void 0}),XC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Lr(Fv,t);return l.jsx(GF,{scope:t,forceMount:n,children:y.Children.map(r,i=>l.jsx(an,{present:n||o.open,children:l.jsx(nu,{asChild:!0,container:s,children:i})}))})};XC.displayName=Fv;var lf="DialogOverlay",QC=y.forwardRef((e,t)=>{const n=qC(lf,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Lr(lf,e.__scopeDialog);return o.modal?l.jsx(an,{present:r||o.open,children:l.jsx(ZF,{...s,ref:t})}):null});QC.displayName=lf;var ZF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(lf,n);return l.jsx(ph,{as:ts,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Pe.div,{"data-state":Uv(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),yi="DialogContent",JC=y.forwardRef((e,t)=>{const n=qC(yi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Lr(yi,e.__scopeDialog);return l.jsx(an,{present:r||o.open,children:o.modal?l.jsx(qF,{...s,ref:t}):l.jsx(XF,{...s,ref:t})})});JC.displayName=yi;var qF=y.forwardRef((e,t)=>{const n=Lr(yi,e.__scopeDialog),r=y.useRef(null),s=Ge(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Ev(o)},[]),l.jsx(ej,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault())})}),XF=y.forwardRef((e,t)=>{const n=Lr(yi,e.__scopeDialog),r=y.useRef(!1),s=y.useRef(!1);return l.jsx(ej,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),ej=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Lr(yi,n),c=y.useRef(null),u=Ge(t,c);return dv(),l.jsxs(l.Fragment,{children:[l.jsx(uh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:l.jsx(Ja,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Uv(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(JF,{titleId:a.titleId}),l.jsx(t4,{contentRef:c,descriptionId:a.descriptionId})]})]})}),$v="DialogTitle",tj=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr($v,n);return l.jsx(Pe.h2,{id:s.titleId,...r,ref:t})});tj.displayName=$v;var nj="DialogDescription",rj=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(nj,n);return l.jsx(Pe.p,{id:s.descriptionId,...r,ref:t})});rj.displayName=nj;var sj="DialogClose",oj=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(sj,n);return l.jsx(Pe.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>s.onOpenChange(!1))})});oj.displayName=sj;function Uv(e){return e?"open":"closed"}var ij="DialogTitleWarning",[QF,aj]=tM(ij,{contentName:yi,titleName:$v,docsSlug:"dialog"}),JF=({titleId:e})=>{const t=aj(ij),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},e4="DialogDescriptionWarning",t4=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aj(e4).contentName}}.`;return y.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vv=KC,Bv=ZC,Wv=XC,ou=QC,iu=JC,au=tj,lu=rj,xh=oj;const Hv=Vv,Yv=Bv,n4=Wv,lj=y.forwardRef(({className:e,...t},n)=>l.jsx(ou,{className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));lj.displayName=ou.displayName;const r4=Jc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),wh=y.forwardRef(({side:e="right",className:t,children:n,...r},s)=>l.jsxs(n4,{children:[l.jsx(lj,{}),l.jsxs(iu,{ref:s,className:re(r4({side:e}),t),...r,children:[n,l.jsxs(xh,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[l.jsx(av,{className:"h-4 w-4 dark:text-stone-200"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wh.displayName=iu.displayName;const Kv=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Kv.displayName="SheetHeader";const Gv=y.forwardRef(({className:e,...t},n)=>l.jsx(au,{ref:n,className:re("text-lg font-semibold text-foreground",e),...t}));Gv.displayName=au.displayName;const s4=y.forwardRef(({className:e,...t},n)=>l.jsx(lu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));s4.displayName=lu.displayName;class Yn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Yn.prototype),t!==null&&typeof t=="object"&&(this.url=typeof t.url=="string"?t.url:"",this.status=typeof t.status=="number"?t.status:0,this.isAbort=!!t.isAbort,this.originalError=t.originalError,t.response!==null&&typeof t.response=="object"?this.response=t.response:t.data!==null&&typeof t.data=="object"?this.response=t.data:this.response={}),this.originalError||t instanceof Yn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(r=this.originalError)==null?void 0:r.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const qu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o4(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||i4;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const a=e.slice(s,o).trim();if(n[a]===void 0){let c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{n[a]=r(c)}catch{n[a]=c}}s=i+1}return n}function _b(e,t,n){const r=Object.assign({},n||{}),s=r.encode||a4;if(!qu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!qu.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(r.maxAge!=null){const a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(a)}if(r.domain){if(!qu.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!qu.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){if(!function(c){return Object.prototype.toString.call(c)==="[object Date]"||c instanceof Date}(r.expires)||isNaN(r.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function i4(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function a4(e){return encodeURIComponent(e)}const l4=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let cj;function _a(e){if(e)try{const t=decodeURIComponent(cj(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function uj(e,t=0){let n=_a(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}cj=typeof atob!="function"||l4?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const Sb="pb_auth";class c4{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!uj(this.token)}get isAdmin(){return _a(this.token).type==="admin"}get isAuthRecord(){return _a(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=Sb){const r=o4(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=Sb){var c,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=_a(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=_b(n,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(c=o==null?void 0:o.model)==null?void 0:c.id,email:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=_b(n,JSON.stringify(o),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class u4 extends c4{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(t,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.removeItem(t)),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",t=>{if(t.key!=this.storageKey)return;const n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class Ni{constructor(t){this.client=t}}class d4 extends Ni{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Zv extends Ni{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Yn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Yn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(s=>this.decode(s))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],s=async o=>this.getList(o,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?s(o+1):r});return s(1)}}function Ln(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function Jm(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class f4 extends Zv{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o;return r&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};o=Ln("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||Jm(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(u,d,f,h){Jm(u);const m=u.beforeSend,x=u.authStore.model,p=u.authStore.onChange((w,g)=>{(!w||(g==null?void 0:g.id)!=(x==null?void 0:x.id)||(g!=null&&g.collectionId||x!=null&&x.collectionId)&&(g==null?void 0:g.collectionId)!=(x==null?void 0:x.collectionId))&&Jm(u)});u._resetAutoRefresh=function(){p(),u.beforeSend=m,delete u._resetAutoRefresh},u.beforeSend=async(w,g)=>{var C;const v=u.authStore.token;if((C=g.query)!=null&&C.autoRefresh)return m?m(w,g):{url:w,sendOptions:g};let b=u.authStore.isValid;if(b&&uj(u.authStore.token,d))try{await f()}catch{b=!1}b||await h();const _=g.headers||{};for(let j in _)if(j.toLowerCase()=="authorization"&&v==_[j]&&u.authStore.token){_[j]=u.authStore.token;break}return g.headers=_,m?m(w,g):{url:w,sendOptions:g}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,n){let r={method:"POST"};return r=Ln("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Ln("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Ln("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const h4=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function dj(e){if(e){e.query=e.query||{};for(let t in e)h4.includes(t)||(e.query[t]=e[t],delete e[t])}}class fj extends Ni{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,n,r){var i;if(!t)throw new Error("topic must be set.");let s=t;if(r){dj(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const c=a;let u;try{u=JSON.parse(c==null?void 0:c.data)}catch{}n(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let a=!1;for(let c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===n&&(a=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,1),(o=this.eventSource)==null||o.removeEventListener(i,n));a&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let s in this.subscriptions)if((r=this.subscriptions[s])!=null&&r.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Yn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class m4 extends Zv{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i,a;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((a=this.client.authStore.model)==null?void 0:a.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};return o=Ln("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,a){let c={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return c=Ln("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",c,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",c).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=kb(void 0));const s=new fj(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(c=>{var h;const u=c.authProviders.find(m=>m.name===n.provider);if(!u)throw new Yn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(h=this.client.cancelControllers)==null?void 0:h[a]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(m,x)=>{var p;try{await s.subscribe("@oauth2",async b=>{var C;const _=s.clientId;try{if(!b.state||_!==b.state)throw new Error("State parameters don't match.");if(b.error||!b.code)throw new Error("OAuth2 redirect error or missing code: "+b.error);const j=Object.assign({},n);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const T=await this.authWithOAuth2Code(u.name,b.code,u.codeVerifier,d,n.createData,j);m(T)}catch(j){x(new Yn(j))}o()});const w={state:s.clientId};(p=n.scopes)!=null&&p.length&&(w.scope=n.scopes.join(" "));const g=this._replaceQueryParams(u.authUrl+d,w);await(n.urlCallback||function(b){r?r.location.href=b:r=kb(b)})(g)}catch(w){o(),x(new Yn(w))}})}).catch(c=>{throw o(),c})}async authRefresh(t,n){let r={method:"POST"};return r=Ln("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Ln("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Ln("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,n,r){let s={method:"POST",body:{email:t}};return s=Ln("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=Ln("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=_a(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,n,r){let s={method:"POST",body:{newEmail:t}};return s=Ln("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=Ln("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=_a(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,s="";t.indexOf("?")>=0&&(r=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const a of i){if(a=="")continue;const c=a.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[1]||"").replace(/\+/g," "))}for(let a in n)n.hasOwnProperty(a)&&(n[a]==null?delete o[a]:o[a]=n[a]);s="";for(let a in o)o.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return s!=""?r+"?"+s:r}}function kb(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Yn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class p4 extends Zv{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class g4 extends Ni{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Yn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class y4 extends Ni{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class v4 extends Ni{getUrl(t,n,r={}){if(!n||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class x4 extends Ni{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class w4{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new u4,this.admins=new f4(this),this.collections=new p4(this),this.files=new v4(this),this.logs=new g4(this),this.settings=new d4(this),this.realtime=new fj(this),this.health=new y4(this),this.backups=new x4(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new m4(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,n){if(!n)return t;for(let r in n){let s=n[r];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+r+"}",s)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Yn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Yn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),dj(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const s=new AbortController;this.cancelControllers[r]=s,n.signal=s.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}const b4=void 0;console.log(b4);let Xu;const ot=()=>Xu||(Xu=new w4("/"),Xu);//! moment.js -//! version : 2.30.1 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com -var hj;function xe(){return hj.apply(null,arguments)}function _4(e){hj=e}function Dr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function si(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function dt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(dt(e,t))return!1;return!0}function Nn(e){return e===void 0}function Fs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function cu(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function mj(e,t){var n=[],r,s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function fo(e,t){for(var n in t)dt(t,n)&&(e[n]=t[n]);return dt(t,"toString")&&(e.toString=t.toString),dt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function is(e,t,n,r){return Lj(e,t,n,r,!0).utc()}function S4(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Qe(e){return e._pf==null&&(e._pf=S4()),e._pf}var kg;Array.prototype.some?kg=Array.prototype.some:kg=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Xv(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Qe(e),n=kg.call(t.parsedDateParts,function(s){return s!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function bh(e){var t=is(NaN);return e!=null?fo(Qe(t),e):Qe(t).userInvalidated=!0,t}var Cb=xe.momentProperties=[],ep=!1;function Qv(e,t){var n,r,s,o=Cb.length;if(Nn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Nn(t._i)||(e._i=t._i),Nn(t._f)||(e._f=t._f),Nn(t._l)||(e._l=t._l),Nn(t._strict)||(e._strict=t._strict),Nn(t._tzm)||(e._tzm=t._tzm),Nn(t._isUTC)||(e._isUTC=t._isUTC),Nn(t._offset)||(e._offset=t._offset),Nn(t._pf)||(e._pf=Qe(t)),Nn(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=Cb[n],s=t[r],Nn(s)||(e[r]=s);return e}function uu(e){Qv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),ep===!1&&(ep=!0,xe.updateOffset(this),ep=!1)}function Or(e){return e instanceof uu||e!=null&&e._isAMomentObject!=null}function pj(e){xe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function mr(e,t){var n=!0;return fo(function(){if(xe.deprecationHandler!=null&&xe.deprecationHandler(null,e),n){var r=[],s,o,i,a=arguments.length;for(o=0;o<a;o++){if(s="",typeof arguments[o]=="object"){s+=` -[`+o+"] ";for(i in arguments[0])dt(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}pj(e+` -Arguments: `+Array.prototype.slice.call(r).join("")+` -`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var jb={};function gj(e,t){xe.deprecationHandler!=null&&xe.deprecationHandler(e,t),jb[e]||(pj(t),jb[e]=!0)}xe.suppressDeprecationWarnings=!1;xe.deprecationHandler=null;function as(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function k4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],as(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Cg(e,t){var n=fo({},e),r;for(r in t)dt(t,r)&&(si(e[r])&&si(t[r])?(n[r]={},fo(n[r],e[r]),fo(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&si(e[r])&&(n[r]=fo({},n[r]));return n}function Jv(e){e!=null&&this.set(e)}var jg;Object.keys?jg=Object.keys:jg=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var C4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function j4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return as(r)?r.call(t,n):r}function rs(e,t,n){var r=""+Math.abs(e),s=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var ex=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Qu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tp={},Sa={};function Le(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Sa[e]=s),t&&(Sa[t[0]]=function(){return rs(s.apply(this,arguments),t[1],t[2])}),n&&(Sa[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function E4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function N4(e){var t=e.match(ex),n,r;for(n=0,r=t.length;n<r;n++)Sa[t[n]]?t[n]=Sa[t[n]]:t[n]=E4(t[n]);return function(s){var o="",i;for(i=0;i<r;i++)o+=as(t[i])?t[i].call(s,e):t[i];return o}}function bd(e,t){return e.isValid()?(t=yj(t,e.localeData()),tp[t]=tp[t]||N4(t),tp[t](e)):e.localeData().invalidDate()}function yj(e,t){var n=5;function r(s){return t.longDateFormat(s)||s}for(Qu.lastIndex=0;n>=0&&Qu.test(e);)e=e.replace(Qu,r),Qu.lastIndex=0,n-=1;return e}var T4={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function P4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ex).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var R4="Invalid date";function A4(){return this._invalidDate}var D4="%d",O4=/\d{1,2}/;function I4(e){return this._ordinal.replace("%d",e)}var M4={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function L4(e,t,n,r){var s=this._relativeTime[n];return as(s)?s(e,t,n,r):s.replace(/%d/i,e)}function z4(e,t){var n=this._relativeTime[e>0?"future":"past"];return as(n)?n(t):n.replace(/%s/i,t)}var Eb={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function pr(e){return typeof e=="string"?Eb[e]||Eb[e.toLowerCase()]:void 0}function tx(e){var t={},n,r;for(r in e)dt(e,r)&&(n=pr(r),n&&(t[n]=e[r]));return t}var F4={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function $4(e){var t=[],n;for(n in e)dt(e,n)&&t.push({unit:n,priority:F4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var vj=/\d/,tr=/\d\d/,xj=/\d{3}/,nx=/\d{4}/,_h=/[+-]?\d{6}/,jt=/\d\d?/,wj=/\d\d\d\d?/,bj=/\d\d\d\d\d\d?/,Sh=/\d{1,3}/,rx=/\d{1,4}/,kh=/[+-]?\d{1,6}/,sl=/\d+/,Ch=/[+-]?\d+/,U4=/Z|[+-]\d\d:?\d\d/gi,jh=/Z|[+-]\d\d(?::?\d\d)?/gi,V4=/[+-]?\d+(\.\d{1,3})?/,du=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ol=/^[1-9]\d?/,sx=/^([1-9]\d|\d)/,cf;cf={};function Ee(e,t,n){cf[e]=as(t)?t:function(r,s){return r&&n?n:t}}function B4(e,t){return dt(cf,e)?cf[e](t._strict,t._locale):new RegExp(W4(e))}function W4(e){return Ps(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function Ps(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ir(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=ir(t)),n}var Eg={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),Fs(t)&&(r=function(o,i){i[t]=rt(o)}),s=e.length,n=0;n<s;n++)Eg[e[n]]=r}function fu(e,t){vt(e,function(n,r,s,o){s._w=s._w||{},t(n,s._w,s,o)})}function H4(e,t,n){t!=null&&dt(Eg,e)&&Eg[e](t,n._a,n,e)}function Eh(e){return e%4===0&&e%100!==0||e%400===0}var pn=0,js=1,Yr=2,qt=3,Cr=4,Es=5,Qo=6,Y4=7,K4=8;Le("Y",0,0,function(){var e=this.year();return e<=9999?rs(e,4):"+"+e});Le(0,["YY",2],0,function(){return this.year()%100});Le(0,["YYYY",4],0,"year");Le(0,["YYYYY",5],0,"year");Le(0,["YYYYYY",6,!0],0,"year");Ee("Y",Ch);Ee("YY",jt,tr);Ee("YYYY",rx,nx);Ee("YYYYY",kh,_h);Ee("YYYYYY",kh,_h);vt(["YYYYY","YYYYYY"],pn);vt("YYYY",function(e,t){t[pn]=e.length===2?xe.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[pn]=xe.parseTwoDigitYear(e)});vt("Y",function(e,t){t[pn]=parseInt(e,10)});function Ql(e){return Eh(e)?366:365}xe.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var _j=il("FullYear",!0);function G4(){return Eh(this.year())}function il(e,t){return function(n){return n!=null?(Sj(this,e,n),xe.updateOffset(this,t),this):Ec(this,e)}}function Ec(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Sj(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Eh(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function Z4(e){return e=pr(e),as(this[e])?this[e]():this}function q4(e,t){if(typeof e=="object"){e=tx(e);var n=$4(e),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(e=pr(e),as(this[e]))return this[e](t);return this}function X4(e,t){return(e%t+t)%t}var $t;Array.prototype.indexOf?$t=Array.prototype.indexOf:$t=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function ox(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=X4(t,12);return e+=(t-n)/12,n===1?Eh(e)?29:28:31-n%7%2}Le("M",["MM",2],"Mo",function(){return this.month()+1});Le("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Le("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ee("M",jt,ol);Ee("MM",jt,tr);Ee("MMM",function(e,t){return t.monthsShortRegex(e)});Ee("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[js]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);s!=null?t[js]=s:Qe(n).invalidMonth=e});var Q4="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),kj="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Cj=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,J4=du,e3=du;function t3(e,t){return e?Dr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Cj).test(t)?"format":"standalone"][e.month()]:Dr(this._months)?this._months:this._months.standalone}function n3(e,t){return e?Dr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Cj.test(t)?"format":"standalone"][e.month()]:Dr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function r3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=is([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(s=$t.call(this._shortMonthsParse,i),s!==-1?s:null):(s=$t.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=$t.call(this._shortMonthsParse,i),s!==-1?s:(s=$t.call(this._longMonthsParse,i),s!==-1?s:null)):(s=$t.call(this._longMonthsParse,i),s!==-1?s:(s=$t.call(this._shortMonthsParse,i),s!==-1?s:null))}function s3(e,t,n){var r,s,o;if(this._monthsParseExact)return r3.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=is([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function jj(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=rt(t);else if(t=e.localeData().monthsParse(t),!Fs(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,ox(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Ej(e){return e!=null?(jj(this,e),xe.updateOffset(this,!0),this):Ec(this,"Month")}function o3(){return ox(this.year(),this.month())}function i3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||Nj.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(dt(this,"_monthsShortRegex")||(this._monthsShortRegex=J4),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function a3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||Nj.call(this),e?this._monthsStrictRegex:this._monthsRegex):(dt(this,"_monthsRegex")||(this._monthsRegex=e3),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Nj(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],s,o,i,a;for(s=0;s<12;s++)o=is([2e3,s]),i=Ps(this.monthsShort(o,"")),a=Ps(this.months(o,"")),t.push(i),n.push(a),r.push(a),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function l3(e,t,n,r,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function Nc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function uf(e,t,n){var r=7+t-n,s=(7+Nc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function Tj(e,t,n,r,s){var o=(7+n-r)%7,i=uf(e,r,s),a=1+7*(t-1)+o+i,c,u;return a<=0?(c=e-1,u=Ql(c)+a):a>Ql(e)?(c=e+1,u=a-Ql(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Tc(e,t,n){var r=uf(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+Rs(i,t,n)):s>Rs(e.year(),t,n)?(o=s-Rs(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function Rs(e,t,n){var r=uf(e,t,n),s=uf(e+1,t,n);return(Ql(e)-r+s)/7}Le("w",["ww",2],"wo","week");Le("W",["WW",2],"Wo","isoWeek");Ee("w",jt,ol);Ee("ww",jt,tr);Ee("W",jt,ol);Ee("WW",jt,tr);fu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=rt(e)});function c3(e){return Tc(e,this._week.dow,this._week.doy).week}var u3={dow:0,doy:6};function d3(){return this._week.dow}function f3(){return this._week.doy}function h3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function m3(e){var t=Tc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Le("d",0,"do","day");Le("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Le("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Le("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Le("e",0,0,"weekday");Le("E",0,0,"isoWeekday");Ee("d",jt);Ee("e",jt);Ee("E",jt);Ee("dd",function(e,t){return t.weekdaysMinRegex(e)});Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ee("dddd",function(e,t){return t.weekdaysRegex(e)});fu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Qe(n).invalidWeekday=e});fu(["d","e","E"],function(e,t,n,r){t[r]=rt(e)});function p3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function g3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ix(e,t){return e.slice(t,7).concat(e.slice(0,t))}var y3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pj="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),v3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),x3=du,w3=du,b3=du;function _3(e,t){var n=Dr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ix(n,this._week.dow):e?n[e.day()]:n}function S3(e){return e===!0?ix(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function k3(e){return e===!0?ix(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function C3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=is([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1||(s=$t.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=$t.call(this._minWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function j3(e,t,n){var r,s,o;if(this._weekdaysParseExact)return C3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=is([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function E3(e){if(!this.isValid())return e!=null?this:NaN;var t=Ec(this,"Day");return e!=null?(e=p3(e,this.localeData()),this.add(e-t,"d")):t}function N3(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function T3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=g3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function P3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=x3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function R3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=w3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function A3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=b3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ax(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,c,u;for(o=0;o<7;o++)i=is([2e3,1]).day(o),a=Ps(this.weekdaysMin(i,"")),c=Ps(this.weekdaysShort(i,"")),u=Ps(this.weekdays(i,"")),t.push(a),n.push(c),r.push(u),s.push(a),s.push(c),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function lx(){return this.hours()%12||12}function D3(){return this.hours()||24}Le("H",["HH",2],0,"hour");Le("h",["hh",2],0,lx);Le("k",["kk",2],0,D3);Le("hmm",0,0,function(){return""+lx.apply(this)+rs(this.minutes(),2)});Le("hmmss",0,0,function(){return""+lx.apply(this)+rs(this.minutes(),2)+rs(this.seconds(),2)});Le("Hmm",0,0,function(){return""+this.hours()+rs(this.minutes(),2)});Le("Hmmss",0,0,function(){return""+this.hours()+rs(this.minutes(),2)+rs(this.seconds(),2)});function Rj(e,t){Le(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Rj("a",!0);Rj("A",!1);function Aj(e,t){return t._meridiemParse}Ee("a",Aj);Ee("A",Aj);Ee("H",jt,sx);Ee("h",jt,ol);Ee("k",jt,ol);Ee("HH",jt,tr);Ee("hh",jt,tr);Ee("kk",jt,tr);Ee("hmm",wj);Ee("hmmss",bj);Ee("Hmm",wj);Ee("Hmmss",bj);vt(["H","HH"],qt);vt(["k","kk"],function(e,t,n){var r=rt(e);t[qt]=r===24?0:r});vt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vt(["h","hh"],function(e,t,n){t[qt]=rt(e),Qe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[qt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r)),Qe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r,2)),t[Es]=rt(e.substr(s)),Qe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[qt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r,2)),t[Es]=rt(e.substr(s))});function O3(e){return(e+"").toLowerCase().charAt(0)==="p"}var I3=/[ap]\.?m?\.?/i,M3=il("Hours",!0);function L3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Dj={calendar:C4,longDateFormat:T4,invalidDate:R4,ordinal:D4,dayOfMonthOrdinalParse:O4,relativeTime:M4,months:Q4,monthsShort:kj,week:u3,weekdays:y3,weekdaysMin:v3,weekdaysShort:Pj,meridiemParse:I3},Tt={},Cl={},Pc;function z3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Nb(e){return e&&e.toLowerCase().replace("_","-")}function F3(e){for(var t=0,n,r,s,o;t<e.length;){for(o=Nb(e[t]).split("-"),n=o.length,r=Nb(e[t+1]),r=r?r.split("-"):null;n>0;){if(s=Nh(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&z3(o,r)>=n-1)break;n--}t++}return Pc}function $3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Nh(e){var t=null,n;if(Tt[e]===void 0&&typeof Ed<"u"&&Ed&&Ed.exports&&$3(e))try{t=Pc._abbr,n=require,n("./locale/"+e),So(t)}catch{Tt[e]=null}return Tt[e]}function So(e,t){var n;return e&&(Nn(t)?n=Ks(e):n=cx(e,t),n?Pc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Pc._abbr}function cx(e,t){if(t!==null){var n,r=Dj;if(t.abbr=e,Tt[e]!=null)gj("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)r=Tt[t.parentLocale]._config;else if(n=Nh(t.parentLocale),n!=null)r=n._config;else return Cl[t.parentLocale]||(Cl[t.parentLocale]=[]),Cl[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new Jv(Cg(r,t)),Cl[e]&&Cl[e].forEach(function(s){cx(s.name,s.config)}),So(e),Tt[e]}else return delete Tt[e],null}function U3(e,t){if(t!=null){var n,r,s=Dj;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Cg(Tt[e]._config,t)):(r=Nh(e),r!=null&&(s=r._config),t=Cg(s,t),r==null&&(t.abbr=e),n=new Jv(t),n.parentLocale=Tt[e],Tt[e]=n),So(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===So()&&So(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Ks(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Pc;if(!Dr(e)){if(t=Nh(e),t)return t;e=[e]}return F3(e)}function V3(){return jg(Tt)}function ux(e){var t,n=e._a;return n&&Qe(e).overflow===-2&&(t=n[js]<0||n[js]>11?js:n[Yr]<1||n[Yr]>ox(n[pn],n[js])?Yr:n[qt]<0||n[qt]>24||n[qt]===24&&(n[Cr]!==0||n[Es]!==0||n[Qo]!==0)?qt:n[Cr]<0||n[Cr]>59?Cr:n[Es]<0||n[Es]>59?Es:n[Qo]<0||n[Qo]>999?Qo:-1,Qe(e)._overflowDayOfYear&&(t<pn||t>Yr)&&(t=Yr),Qe(e)._overflowWeeks&&t===-1&&(t=Y4),Qe(e)._overflowWeekday&&t===-1&&(t=K4),Qe(e).overflow=t),e}var B3=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,W3=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,H3=/Z|[+-]\d\d(?::?\d\d)?/,Ju=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],np=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Y3=/^\/?Date\((-?\d+)/i,K3=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,G3={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Oj(e){var t,n,r=e._i,s=B3.exec(r)||W3.exec(r),o,i,a,c,u=Ju.length,d=np.length;if(s){for(Qe(e).iso=!0,t=0,n=u;t<n;t++)if(Ju[t][1].exec(s[1])){i=Ju[t][0],o=Ju[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,n=d;t<n;t++)if(np[t][1].exec(s[3])){a=(s[2]||" ")+np[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(H3.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),fx(e)}else e._isValid=!1}function Z3(e,t,n,r,s,o){var i=[q3(e),kj.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function q3(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function X3(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Q3(e,t,n){if(e){var r=Pj.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(r!==s)return Qe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function J3(e,t,n){if(e)return G3[e];if(t)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function Ij(e){var t=K3.exec(X3(e._i)),n;if(t){if(n=Z3(t[4],t[3],t[2],t[5],t[6],t[7]),!Q3(t[1],n,e))return;e._a=n,e._tzm=J3(t[8],t[9],t[10]),e._d=Nc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Qe(e).rfc2822=!0}else e._isValid=!1}function e5(e){var t=Y3.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Oj(e),e._isValid===!1)delete e._isValid;else return;if(Ij(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:xe.createFromInputFallback(e)}xe.createFromInputFallback=mr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ki(e,t,n){return e??t??n}function t5(e){var t=new Date(xe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function dx(e){var t,n,r=[],s,o,i;if(!e._d){for(s=t5(e),e._w&&e._a[Yr]==null&&e._a[js]==null&&n5(e),e._dayOfYear!=null&&(i=Ki(e._a[pn],s[pn]),(e._dayOfYear>Ql(i)||e._dayOfYear===0)&&(Qe(e)._overflowDayOfYear=!0),n=Nc(i,0,e._dayOfYear),e._a[js]=n.getUTCMonth(),e._a[Yr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[qt]===24&&e._a[Cr]===0&&e._a[Es]===0&&e._a[Qo]===0&&(e._nextDay=!0,e._a[qt]=0),e._d=(e._useUTC?Nc:l3).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Qe(e).weekdayMismatch=!0)}}function n5(e){var t,n,r,s,o,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Ki(t.GG,e._a[pn],Tc(Ct(),1,4).year),r=Ki(t.W,1),s=Ki(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Tc(Ct(),o,i),n=Ki(t.gg,e._a[pn],u.year),r=Ki(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),r<1||r>Rs(n,o,i)?Qe(e)._overflowWeeks=!0:c!=null?Qe(e)._overflowWeekday=!0:(a=Tj(n,r,s,o,i),e._a[pn]=a.year,e._dayOfYear=a.dayOfYear)}xe.ISO_8601=function(){};xe.RFC_2822=function(){};function fx(e){if(e._f===xe.ISO_8601){Oj(e);return}if(e._f===xe.RFC_2822){Ij(e);return}e._a=[],Qe(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,c=0,u,d;for(s=yj(e._f,e._locale).match(ex)||[],d=s.length,n=0;n<d;n++)o=s[n],r=(t.match(B4(o,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Qe(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),Sa[o]?(r?Qe(e).empty=!1:Qe(e).unusedTokens.push(o),H4(o,r,e)):e._strict&&!r&&Qe(e).unusedTokens.push(o);Qe(e).charsLeftOver=a-c,t.length>0&&Qe(e).unusedInput.push(t),e._a[qt]<=12&&Qe(e).bigHour===!0&&e._a[qt]>0&&(Qe(e).bigHour=void 0),Qe(e).parsedDateParts=e._a.slice(0),Qe(e).meridiem=e._meridiem,e._a[qt]=r5(e._locale,e._a[qt],e._meridiem),u=Qe(e).era,u!==null&&(e._a[pn]=e._locale.erasConvertYear(u,e._a[pn])),dx(e),ux(e)}function r5(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function s5(e){var t,n,r,s,o,i,a=!1,c=e._f.length;if(c===0){Qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=Qv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],fx(t),Xv(t)&&(i=!0),o+=Qe(t).charsLeftOver,o+=Qe(t).unusedTokens.length*10,Qe(t).score=o,a?o<r&&(r=o,n=t):(r==null||o<r||i)&&(r=o,n=t,i&&(a=!0));fo(e,n||t)}function o5(e){if(!e._d){var t=tx(e._i),n=t.day===void 0?t.date:t.day;e._a=mj([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),dx(e)}}function i5(e){var t=new uu(ux(Mj(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Mj(e){var t=e._i,n=e._f;return e._locale=e._locale||Ks(e._l),t===null||n===void 0&&t===""?bh({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Or(t)?new uu(ux(t)):(cu(t)?e._d=t:Dr(n)?s5(e):n?fx(e):a5(e),Xv(e)||(e._d=null),e))}function a5(e){var t=e._i;Nn(t)?e._d=new Date(xe.now()):cu(t)?e._d=new Date(t.valueOf()):typeof t=="string"?e5(e):Dr(t)?(e._a=mj(t.slice(0),function(n){return parseInt(n,10)}),dx(e)):si(t)?o5(e):Fs(t)?e._d=new Date(t):xe.createFromInputFallback(e)}function Lj(e,t,n,r,s){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(si(e)&&qv(e)||Dr(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=n,o._i=e,o._f=t,o._strict=r,i5(o)}function Ct(e,t,n,r){return Lj(e,t,n,r,!1)}var l5=mr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:bh()}),c5=mr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:bh()});function zj(e,t){var n,r;if(t.length===1&&Dr(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function u5(){var e=[].slice.call(arguments,0);return zj("isBefore",e)}function d5(){var e=[].slice.call(arguments,0);return zj("isAfter",e)}var f5=function(){return Date.now?Date.now():+new Date},jl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function h5(e){var t,n=!1,r,s=jl.length;for(t in e)if(dt(e,t)&&!($t.call(jl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<s;++r)if(e[jl[r]]){if(n)return!1;parseFloat(e[jl[r]])!==rt(e[jl[r]])&&(n=!0)}return!0}function m5(){return this._isValid}function p5(){return zr(NaN)}function Th(e){var t=tx(e),n=t.year||0,r=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=h5(t),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=Ks(),this._bubble()}function _d(e){return e instanceof Th}function Ng(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function g5(e,t,n){var r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<r;i++)rt(e[i])!==rt(t[i])&&o++;return o+s}function Fj(e,t){Le(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+rs(~~(n/60),2)+t+rs(~~n%60,2)})}Fj("Z",":");Fj("ZZ","");Ee("Z",jh);Ee("ZZ",jh);vt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=hx(jh,e)});var y5=/([\+\-]|\d\d)/gi;function hx(e,t){var n=(t||"").match(e),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(y5)||["-",0,0],o=+(s[1]*60)+rt(s[2]),o===0?0:s[0]==="+"?o:-o)}function mx(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Or(e)||cu(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),xe.updateOffset(n,!1),n):Ct(e).local()}function Tg(e){return-Math.round(e._d.getTimezoneOffset())}xe.updateOffset=function(){};function v5(e,t,n){var r=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=hx(jh,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=Tg(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==e&&(!t||this._changeInProgress?Vj(this,zr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,xe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Tg(this)}function x5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function w5(e){return this.utcOffset(0,e)}function b5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Tg(this),"m")),this}function _5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=hx(U4,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function S5(e){return this.isValid()?(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function k5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function C5(){if(!Nn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Qv(e,this),e=Mj(e),e._a?(t=e._isUTC?is(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&g5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function j5(){return this.isValid()?!this._isUTC:!1}function E5(){return this.isValid()?this._isUTC:!1}function $j(){return this.isValid()?this._isUTC&&this._offset===0:!1}var N5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,T5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zr(e,t){var n=e,r=null,s,o,i;return _d(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Fs(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=N5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:rt(r[Yr])*s,h:rt(r[qt])*s,m:rt(r[Cr])*s,s:rt(r[Es])*s,ms:rt(Ng(r[Qo]*1e3))*s}):(r=T5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Uo(r[2],s),M:Uo(r[3],s),w:Uo(r[4],s),d:Uo(r[5],s),h:Uo(r[6],s),m:Uo(r[7],s),s:Uo(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=P5(Ct(n.from),Ct(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Th(n),_d(e)&&dt(e,"_locale")&&(o._locale=e._locale),_d(e)&&dt(e,"_isValid")&&(o._isValid=e._isValid),o}zr.fn=Th.prototype;zr.invalid=p5;function Uo(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Tb(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function P5(e,t){var n;return e.isValid()&&t.isValid()?(t=mx(t,e),e.isBefore(t)?n=Tb(e,t):(n=Tb(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Uj(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(gj(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),s=zr(n,r),Vj(this,s,e),this}}function Vj(e,t,n,r){var s=t._milliseconds,o=Ng(t._days),i=Ng(t._months);e.isValid()&&(r=r??!0,i&&jj(e,Ec(e,"Month")+i*n),o&&Sj(e,"Date",Ec(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&xe.updateOffset(e,o||i))}var R5=Uj(1,"add"),A5=Uj(-1,"subtract");function Bj(e){return typeof e=="string"||e instanceof String}function D5(e){return Or(e)||cu(e)||Bj(e)||Fs(e)||I5(e)||O5(e)||e===null||e===void 0}function O5(e){var t=si(e)&&!qv(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=r.length;for(s=0;s<i;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function I5(e){var t=Dr(e),n=!1;return t&&(n=e.filter(function(r){return!Fs(r)&&Bj(e)}).length===0),t&&n}function M5(e){var t=si(e)&&!qv(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<r.length;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function L5(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function z5(e,t){arguments.length===1&&(arguments[0]?D5(arguments[0])?(e=arguments[0],t=void 0):M5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ct(),r=mx(n,this).startOf("day"),s=xe.calendarFormat(this,r)||"sameElse",o=t&&(as(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,Ct(n)))}function F5(){return new uu(this)}function $5(e,t){var n=Or(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=pr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function U5(e,t){var n=Or(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=pr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function V5(e,t,n,r){var s=Or(e)?e:Ct(e),o=Or(t)?t:Ct(t);return this.isValid()&&s.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function B5(e,t){var n=Or(e)?e:Ct(e),r;return this.isValid()&&n.isValid()?(t=pr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function W5(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function H5(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Y5(e,t,n){var r,s,o;if(!this.isValid())return NaN;if(r=mx(e,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,t=pr(t),t){case"year":o=Sd(this,r)/12;break;case"month":o=Sd(this,r);break;case"quarter":o=Sd(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-s)/864e5;break;case"week":o=(this-r-s)/6048e5;break;default:o=this-r}return n?o:ir(o)}function Sd(e,t){if(e.date()<t.date())return-Sd(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),s,o;return t-r<0?(s=e.clone().add(n-1,"months"),o=(t-r)/(r-s)):(s=e.clone().add(n+1,"months"),o=(t-r)/(s-r)),-(n+o)||0}xe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";xe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function K5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function G5(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?bd(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):as(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",bd(n,"Z")):bd(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Z5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function q5(e){e||(e=this.isUtc()?xe.defaultFormatUtc:xe.defaultFormat);var t=bd(this,e);return this.localeData().postformat(t)}function X5(e,t){return this.isValid()&&(Or(e)&&e.isValid()||Ct(e).isValid())?zr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Q5(e){return this.from(Ct(),e)}function J5(e,t){return this.isValid()&&(Or(e)&&e.isValid()||Ct(e).isValid())?zr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function e6(e){return this.to(Ct(),e)}function Wj(e){var t;return e===void 0?this._locale._abbr:(t=Ks(e),t!=null&&(this._locale=t),this)}var Hj=mr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Yj(){return this._locale}var df=1e3,ka=60*df,ff=60*ka,Kj=(365*400+97)*24*ff;function Ca(e,t){return(e%t+t)%t}function Gj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Kj:new Date(e,t,n).valueOf()}function Zj(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Kj:Date.UTC(e,t,n)}function t6(e){var t,n;if(e=pr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Zj:Gj,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ca(t+(this._isUTC?0:this.utcOffset()*ka),ff);break;case"minute":t=this._d.valueOf(),t-=Ca(t,ka);break;case"second":t=this._d.valueOf(),t-=Ca(t,df);break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function n6(e){var t,n;if(e=pr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Zj:Gj,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ff-Ca(t+(this._isUTC?0:this.utcOffset()*ka),ff)-1;break;case"minute":t=this._d.valueOf(),t+=ka-Ca(t,ka)-1;break;case"second":t=this._d.valueOf(),t+=df-Ca(t,df)-1;break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function r6(){return this._d.valueOf()-(this._offset||0)*6e4}function s6(){return Math.floor(this.valueOf()/1e3)}function o6(){return new Date(this.valueOf())}function i6(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function a6(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function l6(){return this.isValid()?this.toISOString():null}function c6(){return Xv(this)}function u6(){return fo({},Qe(this))}function d6(){return Qe(this).overflow}function f6(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Le("N",0,0,"eraAbbr");Le("NN",0,0,"eraAbbr");Le("NNN",0,0,"eraAbbr");Le("NNNN",0,0,"eraName");Le("NNNNN",0,0,"eraNarrow");Le("y",["y",1],"yo","eraYear");Le("y",["yy",2],0,"eraYear");Le("y",["yyy",3],0,"eraYear");Le("y",["yyyy",4],0,"eraYear");Ee("N",px);Ee("NN",px);Ee("NNN",px);Ee("NNNN",S6);Ee("NNNNN",k6);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Qe(n).era=s:Qe(n).invalidEra=e});Ee("y",sl);Ee("yy",sl);Ee("yyy",sl);Ee("yyyy",sl);Ee("yo",C6);vt(["y","yy","yyy","yyyy"],pn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pn]=n._locale.eraYearOrdinalParse(e,s):t[pn]=parseInt(e,10)});function h6(e,t){var n,r,s,o=this._eras||Ks("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=xe(o[n].since).startOf("day"),o[n].since=s.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=xe(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function m6(e,t,n){var r,s,o=this.eras(),i,a,c;for(e=e.toUpperCase(),r=0,s=o.length;r<s;++r)if(i=o[r].name.toUpperCase(),a=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[r];break;case"NNNN":if(i===e)return o[r];break;case"NNNNN":if(c===e)return o[r];break}else if([i,a,c].indexOf(e)>=0)return o[r]}function p6(e,t){var n=e.since<=e.until?1:-1;return t===void 0?xe(e.since).year():xe(e.since).year()+(t-e.offset)*n}function g6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function y6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function v6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function x6(){var e,t,n,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-xe(s[e].since).year())*n+s[e].offset;return this.year()}function w6(e){return dt(this,"_erasNameRegex")||gx.call(this),e?this._erasNameRegex:this._erasRegex}function b6(e){return dt(this,"_erasAbbrRegex")||gx.call(this),e?this._erasAbbrRegex:this._erasRegex}function _6(e){return dt(this,"_erasNarrowRegex")||gx.call(this),e?this._erasNarrowRegex:this._erasRegex}function px(e,t){return t.erasAbbrRegex(e)}function S6(e,t){return t.erasNameRegex(e)}function k6(e,t){return t.erasNarrowRegex(e)}function C6(e,t){return t._eraYearOrdinalRegex||sl}function gx(){var e=[],t=[],n=[],r=[],s,o,i,a,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=Ps(u[s].name),a=Ps(u[s].abbr),c=Ps(u[s].narrow),t.push(i),e.push(a),n.push(c),r.push(i),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Le(0,["gg",2],0,function(){return this.weekYear()%100});Le(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ph(e,t){Le(0,[e,e.length],0,t)}Ph("gggg","weekYear");Ph("ggggg","weekYear");Ph("GGGG","isoWeekYear");Ph("GGGGG","isoWeekYear");Ee("G",Ch);Ee("g",Ch);Ee("GG",jt,tr);Ee("gg",jt,tr);Ee("GGGG",rx,nx);Ee("gggg",rx,nx);Ee("GGGGG",kh,_h);Ee("ggggg",kh,_h);fu(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=rt(e)});fu(["gg","GG"],function(e,t,n,r){t[r]=xe.parseTwoDigitYear(e)});function j6(e){return qj.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function E6(e){return qj.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function N6(){return Rs(this.year(),1,4)}function T6(){return Rs(this.isoWeekYear(),1,4)}function P6(){var e=this.localeData()._week;return Rs(this.year(),e.dow,e.doy)}function R6(){var e=this.localeData()._week;return Rs(this.weekYear(),e.dow,e.doy)}function qj(e,t,n,r,s){var o;return e==null?Tc(this,r,s).year:(o=Rs(e,r,s),t>o&&(t=o),A6.call(this,e,t,n,r,s))}function A6(e,t,n,r,s){var o=Tj(e,t,n,r,s),i=Nc(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Le("Q",0,"Qo","quarter");Ee("Q",vj);vt("Q",function(e,t){t[js]=(rt(e)-1)*3});function D6(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Le("D",["DD",2],"Do","date");Ee("D",jt,ol);Ee("DD",jt,tr);Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Yr);vt("Do",function(e,t){t[Yr]=rt(e.match(jt)[0])});var Xj=il("Date",!0);Le("DDD",["DDDD",3],"DDDo","dayOfYear");Ee("DDD",Sh);Ee("DDDD",xj);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=rt(e)});function O6(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Le("m",["mm",2],0,"minute");Ee("m",jt,sx);Ee("mm",jt,tr);vt(["m","mm"],Cr);var I6=il("Minutes",!1);Le("s",["ss",2],0,"second");Ee("s",jt,sx);Ee("ss",jt,tr);vt(["s","ss"],Es);var M6=il("Seconds",!1);Le("S",0,0,function(){return~~(this.millisecond()/100)});Le(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Le(0,["SSS",3],0,"millisecond");Le(0,["SSSS",4],0,function(){return this.millisecond()*10});Le(0,["SSSSS",5],0,function(){return this.millisecond()*100});Le(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Le(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Le(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Le(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ee("S",Sh,vj);Ee("SS",Sh,tr);Ee("SSS",Sh,xj);var ho,Qj;for(ho="SSSS";ho.length<=9;ho+="S")Ee(ho,sl);function L6(e,t){t[Qo]=rt(("0."+e)*1e3)}for(ho="S";ho.length<=9;ho+="S")vt(ho,L6);Qj=il("Milliseconds",!1);Le("z",0,0,"zoneAbbr");Le("zz",0,0,"zoneName");function z6(){return this._isUTC?"UTC":""}function F6(){return this._isUTC?"Coordinated Universal Time":""}var ce=uu.prototype;ce.add=R5;ce.calendar=z5;ce.clone=F5;ce.diff=Y5;ce.endOf=n6;ce.format=q5;ce.from=X5;ce.fromNow=Q5;ce.to=J5;ce.toNow=e6;ce.get=Z4;ce.invalidAt=d6;ce.isAfter=$5;ce.isBefore=U5;ce.isBetween=V5;ce.isSame=B5;ce.isSameOrAfter=W5;ce.isSameOrBefore=H5;ce.isValid=c6;ce.lang=Hj;ce.locale=Wj;ce.localeData=Yj;ce.max=c5;ce.min=l5;ce.parsingFlags=u6;ce.set=q4;ce.startOf=t6;ce.subtract=A5;ce.toArray=i6;ce.toObject=a6;ce.toDate=o6;ce.toISOString=G5;ce.inspect=Z5;typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ce.toJSON=l6;ce.toString=K5;ce.unix=s6;ce.valueOf=r6;ce.creationData=f6;ce.eraName=g6;ce.eraNarrow=y6;ce.eraAbbr=v6;ce.eraYear=x6;ce.year=_j;ce.isLeapYear=G4;ce.weekYear=j6;ce.isoWeekYear=E6;ce.quarter=ce.quarters=D6;ce.month=Ej;ce.daysInMonth=o3;ce.week=ce.weeks=h3;ce.isoWeek=ce.isoWeeks=m3;ce.weeksInYear=P6;ce.weeksInWeekYear=R6;ce.isoWeeksInYear=N6;ce.isoWeeksInISOWeekYear=T6;ce.date=Xj;ce.day=ce.days=E3;ce.weekday=N3;ce.isoWeekday=T3;ce.dayOfYear=O6;ce.hour=ce.hours=M3;ce.minute=ce.minutes=I6;ce.second=ce.seconds=M6;ce.millisecond=ce.milliseconds=Qj;ce.utcOffset=v5;ce.utc=w5;ce.local=b5;ce.parseZone=_5;ce.hasAlignedHourOffset=S5;ce.isDST=k5;ce.isLocal=j5;ce.isUtcOffset=E5;ce.isUtc=$j;ce.isUTC=$j;ce.zoneAbbr=z6;ce.zoneName=F6;ce.dates=mr("dates accessor is deprecated. Use date instead.",Xj);ce.months=mr("months accessor is deprecated. Use month instead",Ej);ce.years=mr("years accessor is deprecated. Use year instead",_j);ce.zone=mr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",x5);ce.isDSTShifted=mr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",C5);function $6(e){return Ct(e*1e3)}function U6(){return Ct.apply(null,arguments).parseZone()}function Jj(e){return e}var ft=Jv.prototype;ft.calendar=j4;ft.longDateFormat=P4;ft.invalidDate=A4;ft.ordinal=I4;ft.preparse=Jj;ft.postformat=Jj;ft.relativeTime=L4;ft.pastFuture=z4;ft.set=k4;ft.eras=h6;ft.erasParse=m6;ft.erasConvertYear=p6;ft.erasAbbrRegex=b6;ft.erasNameRegex=w6;ft.erasNarrowRegex=_6;ft.months=t3;ft.monthsShort=n3;ft.monthsParse=s3;ft.monthsRegex=a3;ft.monthsShortRegex=i3;ft.week=c3;ft.firstDayOfYear=f3;ft.firstDayOfWeek=d3;ft.weekdays=_3;ft.weekdaysMin=k3;ft.weekdaysShort=S3;ft.weekdaysParse=j3;ft.weekdaysRegex=P3;ft.weekdaysShortRegex=R3;ft.weekdaysMinRegex=A3;ft.isPM=O3;ft.meridiem=L3;function hf(e,t,n,r){var s=Ks(),o=is().set(r,t);return s[n](o,e)}function eE(e,t,n){if(Fs(e)&&(t=e,e=void 0),e=e||"",t!=null)return hf(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=hf(e,r,n,"month");return s}function yx(e,t,n,r){typeof e=="boolean"?(Fs(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Fs(t)&&(n=t,t=void 0),t=t||"");var s=Ks(),o=e?s._week.dow:0,i,a=[];if(n!=null)return hf(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=hf(t,(i+o)%7,r,"day");return a}function V6(e,t){return eE(e,t,"months")}function B6(e,t){return eE(e,t,"monthsShort")}function W6(e,t,n){return yx(e,t,n,"weekdays")}function H6(e,t,n){return yx(e,t,n,"weekdaysShort")}function Y6(e,t,n){return yx(e,t,n,"weekdaysMin")}So("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});xe.lang=mr("moment.lang is deprecated. Use moment.locale instead.",So);xe.langData=mr("moment.langData is deprecated. Use moment.localeData instead.",Ks);var ys=Math.abs;function K6(){var e=this._data;return this._milliseconds=ys(this._milliseconds),this._days=ys(this._days),this._months=ys(this._months),e.milliseconds=ys(e.milliseconds),e.seconds=ys(e.seconds),e.minutes=ys(e.minutes),e.hours=ys(e.hours),e.months=ys(e.months),e.years=ys(e.years),this}function tE(e,t,n,r){var s=zr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function G6(e,t){return tE(this,e,t,1)}function Z6(e,t){return tE(this,e,t,-1)}function Pb(e){return e<0?Math.floor(e):Math.ceil(e)}function q6(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Pb(Pg(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=ir(e/1e3),r.seconds=s%60,o=ir(s/60),r.minutes=o%60,i=ir(o/60),r.hours=i%24,t+=ir(i/24),c=ir(nE(t)),n+=c,t-=Pb(Pg(c)),a=ir(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function nE(e){return e*4800/146097}function Pg(e){return e*146097/4800}function X6(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=pr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+nE(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Pg(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Gs(e){return function(){return this.as(e)}}var rE=Gs("ms"),Q6=Gs("s"),J6=Gs("m"),e$=Gs("h"),t$=Gs("d"),n$=Gs("w"),r$=Gs("M"),s$=Gs("Q"),o$=Gs("y"),i$=rE;function a$(){return zr(this)}function l$(e){return e=pr(e),this.isValid()?this[e+"s"]():NaN}function Ti(e){return function(){return this.isValid()?this._data[e]:NaN}}var c$=Ti("milliseconds"),u$=Ti("seconds"),d$=Ti("minutes"),f$=Ti("hours"),h$=Ti("days"),m$=Ti("months"),p$=Ti("years");function g$(){return ir(this.days()/7)}var bs=Math.round,ua={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function y$(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function v$(e,t,n,r){var s=zr(e).abs(),o=bs(s.as("s")),i=bs(s.as("m")),a=bs(s.as("h")),c=bs(s.as("d")),u=bs(s.as("M")),d=bs(s.as("w")),f=bs(s.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||i<=1&&["m"]||i<n.m&&["mm",i]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=r,y$.apply(null,h)}function x$(e){return e===void 0?bs:typeof e=="function"?(bs=e,!0):!1}function w$(e,t){return ua[e]===void 0?!1:t===void 0?ua[e]:(ua[e]=t,e==="s"&&(ua.ss=t-1),!0)}function b$(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ua,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ua,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=v$(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var rp=Math.abs;function Bi(e){return(e>0)-(e<0)||+e}function Rh(){if(!this.isValid())return this.localeData().invalidDate();var e=rp(this._milliseconds)/1e3,t=rp(this._days),n=rp(this._months),r,s,o,i,a=this.asSeconds(),c,u,d,f;return a?(r=ir(e/60),s=ir(r/60),e%=60,r%=60,o=ir(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Bi(this._months)!==Bi(a)?"-":"",d=Bi(this._days)!==Bi(a)?"-":"",f=Bi(this._milliseconds)!==Bi(a)?"-":"",c+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var lt=Th.prototype;lt.isValid=m5;lt.abs=K6;lt.add=G6;lt.subtract=Z6;lt.as=X6;lt.asMilliseconds=rE;lt.asSeconds=Q6;lt.asMinutes=J6;lt.asHours=e$;lt.asDays=t$;lt.asWeeks=n$;lt.asMonths=r$;lt.asQuarters=s$;lt.asYears=o$;lt.valueOf=i$;lt._bubble=q6;lt.clone=a$;lt.get=l$;lt.milliseconds=c$;lt.seconds=u$;lt.minutes=d$;lt.hours=f$;lt.days=h$;lt.weeks=g$;lt.months=m$;lt.years=p$;lt.humanize=b$;lt.toISOString=Rh;lt.toString=Rh;lt.toJSON=Rh;lt.locale=Wj;lt.localeData=Yj;lt.toIsoString=mr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rh);lt.lang=Hj;Le("X",0,0,"unix");Le("x",0,0,"valueOf");Ee("x",Ch);Ee("X",V4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(rt(e))});//! moment.js -xe.version="2.30.1";_4(Ct);xe.fn=ce;xe.min=u5;xe.max=d5;xe.now=f5;xe.utc=is;xe.unix=$6;xe.months=V6;xe.isDate=cu;xe.locale=So;xe.invalid=bh;xe.duration=zr;xe.isMoment=Or;xe.weekdays=W6;xe.parseZone=U6;xe.localeData=Ks;xe.isDuration=_d;xe.monthsShort=B6;xe.weekdaysMin=Y6;xe.defineLocale=cx;xe.updateLocale=U3;xe.locales=V3;xe.weekdaysShort=H6;xe.normalizeUnits=pr;xe.relativeTimeRounding=x$;xe.relativeTimeThreshold=w$;xe.calendarFormat=L5;xe.prototype=ce;xe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const _$=async()=>await ot().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),ls=async e=>e.id?await ot().collection("access").update(e.id,e):await ot().collection("access").create(e),S$=async e=>(e.deleted=xe.utc().format("YYYY-MM-DD HH:mm:ss"),await ot().collection("access").update(e.id,e)),Rb=async()=>await ot().collection("access_groups").getFullList({sort:"-created",expand:"access"}),k$=async e=>{const t=ot();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},C$=async e=>{const t=ot();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Ab=async e=>await ot().collection("access_groups").update(e.id,e),j$=async()=>{try{return await ot().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},vx=async e=>{try{return await ot().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},al=async e=>{const t=ot();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},E$=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},sE=y.createContext({}),ln=()=>y.useContext(sE),N$=({children:e})=>{const[t,n]=y.useReducer(E$,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});y.useEffect(()=>{(async()=>{const d=await _$();n({type:"SET_ACCESSES",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await j$();n({type:"SET_EMAILS",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await Rb();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=y.useCallback(async()=>{const u=await Rb();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=y.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=y.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=y.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=y.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=y.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(sE.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})};var T$="Separator",Db="horizontal",P$=["horizontal","vertical"],oE=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=Db,...s}=e,o=R$(r)?r:Db,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(Pe.div,{"data-orientation":o,...a,...s,ref:t})});oE.displayName=T$;function R$(e){return P$.includes(e)}var iE=oE;const _r=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(iE,{ref:s,decorative:n,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));_r.displayName=iE.displayName;const A$="Certimate v0.2.2",aE=()=>{const{t:e}=Ye();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(JO,{size:16}),l.jsx("div",{className:"ml-1",children:e("common.menu.document")})]}),l.jsx(_r,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:A$})]})]})};function D$(){const e=er(),t=Mr(),{t:n}=Ye();if(!ot().authStore.isValid||!ot().authStore.isAdmin)return l.jsx(ZS,{to:"/login"});const r=t.pathname,s=a=>a==r?"bg-muted text-primary":"text-muted-foreground",o=()=>{ot().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(N$,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(wn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(wn,{to:"/",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(Gw,{className:"h-4 w-4"}),n("dashboard.page.title")]}),l.jsxs(wn,{to:"/domains",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx(pg,{className:"h-4 w-4"}),n("domain.page.title")]}),l.jsxs(wn,{to:"/access",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(Zw,{className:"h-4 w-4"}),n("access.page.title")]}),l.jsxs(wn,{to:"/history",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(Kw,{className:"h-4 w-4"}),n("history.page.title")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(dI,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(wh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(wn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(wn,{to:"/",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(Gw,{className:"h-5 w-5"}),n("dashboard.page.title")]}),l.jsxs(wn,{to:"/domains",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx(pg,{className:"h-5 w-5"}),n("domain.page.title")]}),l.jsxs(wn,{to:"/access",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(Zw,{className:"h-5 w-5"}),n("access.page.title")]}),l.jsxs(wn,{to:"/history",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(Kw,{className:"h-5 w-5"}),n("history.page.title")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(YF,{}),l.jsx(VF,{}),l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(sI,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(vh,{align:"end",children:[l.jsx(ri,{onClick:i,children:n("common.menu.settings")}),l.jsx(ri,{onClick:o,children:n("common.menu.logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(nv,{}),l.jsx(aE,{})]})]})]})})})}var O$="VisuallyHidden",hu=y.forwardRef((e,t)=>l.jsx(Pe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));hu.displayName=O$;var I$=hu,[Ah,qH]=on("Tooltip",[nl]),Dh=nl(),lE="TooltipProvider",M$=700,Rg="tooltip.open",[L$,xx]=Ah(lE),wx=e=>{const{__scopeTooltip:t,delayDuration:n=M$,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=y.useState(!0),c=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(L$,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};wx.displayName=lE;var Oh="Tooltip",[z$,Ih]=Ah(Oh),cE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=xx(Oh,e.__scopeTooltip),u=Dh(t),[d,f]=y.useState(null),h=Wn(),m=y.useRef(0),x=i??c.disableHoverableContent,p=a??c.delayDuration,w=y.useRef(!1),[g=!1,v]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Rg))):c.onClose(),o==null||o(T)}}),b=y.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),_=y.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,v(!0)},[v]),C=y.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),j=y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,v(!0)},p)},[p,v]);return y.useEffect(()=>()=>window.clearTimeout(m.current),[]),l.jsx(bv,{...u,children:l.jsx(z$,{scope:t,contentId:h,open:g,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:y.useCallback(()=>{x?C():window.clearTimeout(m.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};cE.displayName=Oh;var Ag="TooltipTrigger",uE=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ih(Ag,n),o=xx(Ag,n),i=Dh(n),a=y.useRef(null),c=Ge(t,a,s.onTriggerChange),u=y.useRef(!1),d=y.useRef(!1),f=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(_v,{asChild:!0,...i,children:l.jsx(Pe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});uE.displayName=Ag;var F$="TooltipPortal",[XH,$$]=Ah(F$,{forceMount:void 0}),La="TooltipContent",bx=y.forwardRef((e,t)=>{const n=$$(La,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Ih(La,e.__scopeTooltip);return l.jsx(an,{present:r||i.open,children:i.disableHoverableContent?l.jsx(dE,{side:s,...o,ref:t}):l.jsx(U$,{side:s,...o,ref:t})})}),U$=y.forwardRef((e,t)=>{const n=Ih(La,e.__scopeTooltip),r=xx(La,e.__scopeTooltip),s=y.useRef(null),o=Ge(t,s),[i,a]=y.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{a(null),f(!1)},[f]),m=y.useCallback((x,p)=>{const w=x.currentTarget,g={x:x.clientX,y:x.clientY},v=H$(g,w.getBoundingClientRect()),b=Y$(g,v),_=K$(p.getBoundingClientRect()),C=Z$([...b,..._]);a(C),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(c&&d){const x=w=>m(w,d),p=w=>m(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),y.useEffect(()=>{if(i){const x=p=>{const w=p.target,g={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!G$(g,i);v?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),l.jsx(dE,{...e,ref:o})}),[V$,B$]=Ah(Oh,{isInside:!1}),dE=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=Ih(La,n),u=Dh(n),{onClose:d}=c;return y.useEffect(()=>(document.addEventListener(Rg,d),()=>document.removeEventListener(Rg,d)),[d]),y.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Sv,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(lv,{children:r}),l.jsx(V$,{scope:n,isInside:!0,children:l.jsx(I$,{id:c.contentId,role:"tooltip",children:s||r})})]})})});bx.displayName=La;var fE="TooltipArrow",W$=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Dh(n);return B$(fE,n).isInside?null:l.jsx(kv,{...s,...r,ref:t})});W$.displayName=fE;function H$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Y$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function K$(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function G$(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function Z$(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),q$(t)}function q$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var X$=wx,Q$=cE,J$=uE,hE=bx;const dr=({when:e,children:t,fallback:n})=>e?t:n,_x=({phase:e,phaseSuccess:t})=>{const{t:n}=Ye();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:re("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("history.props.stage.progress.check")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("history.props.stage.progress.apply")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("history.props.stage.progress.deploy")})]})},eU=X$,mE=Q$,pE=J$,gE=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(hE,{ref:r,sideOffset:t,className:re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));gE.displayName=hE.displayName;const Sx=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(rI,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(eU,{children:l.jsxs(mE,{children:[l.jsx(pE,{asChild:!0,className:"cursor-pointer",children:l.jsx(Hw,{size:16,className:"text-red-700"})}),l.jsx(gE,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(Hw,{size:16,className:"text-red-700"})})})},yE=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:re("mx-auto flex w-full justify-center",e),...t});yE.displayName="Pagination";const vE=y.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:re("flex flex-row items-center gap-1",e),...t}));vE.displayName="PaginationContent";const Dg=y.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("",e),...t}));Dg.displayName="PaginationItem";const xE=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:re(ch({variant:t?"outline":"ghost",size:n}),e),...r});xE.displayName="PaginationLink";const wE=({className:e,...t})=>{const{t:n}=Ye();return l.jsxs("span",{"aria-hidden":!0,className:re("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(oI,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:n("common.pagination.more")})]})};wE.displayName="PaginationEllipsis";const bE=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=o(d,f),t>3&&u.unshift("..."),t<h-1&&u.push("..."),u.unshift(1),u.push(e),u}return o(1,e)},o=(a,c,u=1)=>{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return l.jsx(l.Fragment,{children:l.jsx(yE,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(vE,{children:i.map((a,c)=>a==="..."?l.jsx(Dg,{children:l.jsx(wE,{})},c):l.jsx(Dg,{children:l.jsx(xE,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})};var _E="AlertDialog",[tU,QH]=on(_E,[YC]),Zs=YC(),SE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Vv,{...r,...n,modal:!0})};SE.displayName=_E;var nU="AlertDialogTrigger",kE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(Bv,{...s,...r,ref:t})});kE.displayName=nU;var rU="AlertDialogPortal",CE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Wv,{...r,...n})};CE.displayName=rU;var sU="AlertDialogOverlay",jE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(ou,{...s,...r,ref:t})});jE.displayName=sU;var ja="AlertDialogContent",[oU,iU]=tU(ja),EE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=Zs(n),i=y.useRef(null),a=Ge(t,i),c=y.useRef(null);return l.jsx(QF,{contentName:ja,titleName:NE,docsSlug:"alert-dialog",children:l.jsx(oU,{scope:n,cancelRef:c,children:l.jsxs(iu,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(lv,{children:r}),l.jsx(lU,{contentRef:i})]})})})});EE.displayName=ja;var NE="AlertDialogTitle",TE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(au,{...s,...r,ref:t})});TE.displayName=NE;var PE="AlertDialogDescription",RE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(lu,{...s,...r,ref:t})});RE.displayName=PE;var aU="AlertDialogAction",AE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(xh,{...s,...r,ref:t})});AE.displayName=aU;var DE="AlertDialogCancel",OE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=iU(DE,n),o=Zs(n),i=Ge(t,s);return l.jsx(xh,{...o,...r,ref:i})});OE.displayName=DE;var lU=({contentRef:e})=>{const t=`\`${ja}\` requires a description for the component to be accessible for screen reader users. - -You can add a description to the \`${ja}\` by passing a \`${PE}\` component as a child, which also benefits sighted users by adding visible context to the dialog. - -Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ja}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. - -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},cU=SE,uU=kE,dU=CE,IE=jE,ME=EE,LE=AE,zE=OE,FE=TE,$E=RE;const kx=cU,Cx=uU,fU=dU,UE=y.forwardRef(({className:e,...t},n)=>l.jsx(IE,{className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));UE.displayName=IE.displayName;const Mh=y.forwardRef(({className:e,...t},n)=>l.jsxs(fU,{children:[l.jsx(UE,{}),l.jsx(ME,{ref:n,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Mh.displayName=ME.displayName;const Lh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Lh.displayName="AlertDialogHeader";const zh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zh.displayName="AlertDialogFooter";const Fh=y.forwardRef(({className:e,...t},n)=>l.jsx(FE,{ref:n,className:re("text-lg font-semibold",e),...t}));Fh.displayName=FE.displayName;const $h=y.forwardRef(({className:e,...t},n)=>l.jsx($E,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));$h.displayName=$E.displayName;const Uh=y.forwardRef(({className:e,...t},n)=>l.jsx(LE,{ref:n,className:re(ch(),e),...t}));Uh.displayName=LE.displayName;const Vh=y.forwardRef(({className:e,...t},n)=>l.jsx(zE,{ref:n,className:re(ch({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vh.displayName=zE.displayName;function jx(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ex="Switch",[hU,JH]=on(Ex),[mU,pU]=hU(Ex),VE=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:c="on",onCheckedChange:u,...d}=e,[f,h]=y.useState(null),m=Ge(t,v=>h(v)),x=y.useRef(!1),p=f?!!f.closest("form"):!0,[w=!1,g]=Zn({prop:s,defaultProp:o,onChange:u});return l.jsxs(mU,{scope:n,checked:w,disabled:a,children:[l.jsx(Pe.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":HE(w),"data-disabled":a?"":void 0,disabled:a,value:c,...d,ref:m,onClick:ue(e.onClick,v=>{g(b=>!b),p&&(x.current=v.isPropagationStopped(),x.current||v.stopPropagation())})}),p&&l.jsx(gU,{control:f,bubbles:!x.current,name:r,value:c,checked:w,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});VE.displayName=Ex;var BE="SwitchThumb",WE=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=pU(BE,n);return l.jsx(Pe.span,{"data-state":HE(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});WE.displayName=BE;var gU=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=y.useRef(null),i=jx(n),a=vv(t);return y.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function HE(e){return e?"checked":"unchecked"}var YE=VE,yU=WE;const mu=y.forwardRef(({className:e,...t},n)=>l.jsx(YE,{className:re("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(yU,{className:re("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));mu.displayName=YE.displayName;var Nx="ToastProvider",[Tx,vU,xU]=eu("Toast"),[KE,e9]=on("Toast",[xU]),[wU,Bh]=KE(Nx),GE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,c]=y.useState(null),[u,d]=y.useState(0),f=y.useRef(!1),h=y.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nx}\`. Expected non-empty \`string\`.`),l.jsx(Tx.Provider,{scope:t,children:l.jsx(wU,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:y.useCallback(()=>d(m=>m+1),[]),onToastRemove:y.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};GE.displayName=Nx;var ZE="ToastViewport",bU=["F8"],Og="toast.viewportPause",Ig="toast.viewportResume",qE=y.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=bU,label:s="Notifications ({hotkey})",...o}=e,i=Bh(ZE,n),a=vU(n),c=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),h=Ge(t,f,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;y.useEffect(()=>{const w=g=>{var b;r.every(_=>g[_]||g.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),y.useEffect(()=>{const w=c.current,g=f.current;if(x&&w&&g){const v=()=>{if(!i.isClosePausedRef.current){const j=new CustomEvent(Og);g.dispatchEvent(j),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const j=new CustomEvent(Ig);g.dispatchEvent(j),i.isClosePausedRef.current=!1}},_=j=>{!w.contains(j.relatedTarget)&&b()},C=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",v),w.addEventListener("focusout",_),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",C),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[x,i.isClosePausedRef]);const p=y.useCallback(({tabbingDirection:w})=>{const v=a().map(b=>{const _=b.ref.current,C=[_,...OU(_)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?v.reverse():v).flat()},[a]);return y.useEffect(()=>{const w=f.current;if(w){const g=v=>{var C,j,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const R=document.activeElement,A=v.shiftKey;if(v.target===w&&A){(C=u.current)==null||C.focus();return}const N=p({tabbingDirection:A?"backwards":"forwards"}),z=N.findIndex(S=>S===R);sp(N.slice(z+1))?v.preventDefault():A?(j=u.current)==null||j.focus():(T=d.current)==null||T.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[a,p]),l.jsxs(mM,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&l.jsx(Mg,{ref:u,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"forwards"});sp(w)}}),l.jsx(Tx.Slot,{scope:n,children:l.jsx(Pe.ol,{tabIndex:-1,...o,ref:h})}),x&&l.jsx(Mg,{ref:d,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"backwards"});sp(w)}})]})});qE.displayName=ZE;var XE="ToastFocusProxy",Mg=y.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Bh(XE,n);return l.jsx(hu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});Mg.displayName=XE;var Wh="Toast",_U="toast.swipeStart",SU="toast.swipeMove",kU="toast.swipeCancel",CU="toast.swipeEnd",QE=y.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,c]=Zn({prop:r,defaultProp:s,onChange:o});return l.jsx(an,{present:n||a,children:l.jsx(NU,{open:a,...i,ref:t,onClose:()=>c(!1),onPause:Ot(e.onPause),onResume:Ot(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});QE.displayName=Wh;var[jU,EU]=KE(Wh,{onClose(){}}),NU=y.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...x}=e,p=Bh(Wh,n),[w,g]=y.useState(null),v=Ge(t,S=>g(S)),b=y.useRef(null),_=y.useRef(null),C=s||p.duration,j=y.useRef(0),T=y.useRef(C),R=y.useRef(0),{onToastAdd:A,onToastRemove:O}=p,G=Ot(()=>{var U;(w==null?void 0:w.contains(document.activeElement))&&((U=p.viewport)==null||U.focus()),i()}),N=y.useCallback(S=>{!S||S===1/0||(window.clearTimeout(R.current),j.current=new Date().getTime(),R.current=window.setTimeout(G,S))},[G]);y.useEffect(()=>{const S=p.viewport;if(S){const U=()=>{N(T.current),u==null||u()},J=()=>{const F=new Date().getTime()-j.current;T.current=T.current-F,window.clearTimeout(R.current),c==null||c()};return S.addEventListener(Og,J),S.addEventListener(Ig,U),()=>{S.removeEventListener(Og,J),S.removeEventListener(Ig,U)}}},[p.viewport,C,c,u,N]),y.useEffect(()=>{o&&!p.isClosePausedRef.current&&N(C)},[o,C,p.isClosePausedRef,N]),y.useEffect(()=>(A(),()=>O()),[A,O]);const z=y.useMemo(()=>w?oN(w):null,[w]);return p.viewport?l.jsxs(l.Fragment,{children:[z&&l.jsx(TU,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),l.jsx(jU,{scope:n,onClose:G,children:Bs.createPortal(l.jsx(Tx.ItemSlot,{scope:n,children:l.jsx(hM,{asChild:!0,onEscapeKeyDown:ue(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||G(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Pe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,S=>{S.key==="Escape"&&(a==null||a(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:ue(e.onPointerDown,S=>{S.button===0&&(b.current={x:S.clientX,y:S.clientY})}),onPointerMove:ue(e.onPointerMove,S=>{if(!b.current)return;const U=S.clientX-b.current.x,J=S.clientY-b.current.y,F=!!_.current,W=["left","right"].includes(p.swipeDirection),I=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,X=W?I(0,U):0,$=W?0:I(0,J),B=S.pointerType==="touch"?10:2,he={x:X,y:$},se={originalEvent:S,delta:he};F?(_.current=he,ed(SU,f,se,{discrete:!1})):Ob(he,p.swipeDirection,B)?(_.current=he,ed(_U,d,se,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs(U)>B||Math.abs(J)>B)&&(b.current=null)}),onPointerUp:ue(e.onPointerUp,S=>{const U=_.current,J=S.target;if(J.hasPointerCapture(S.pointerId)&&J.releasePointerCapture(S.pointerId),_.current=null,b.current=null,U){const F=S.currentTarget,W={originalEvent:S,delta:U};Ob(U,p.swipeDirection,p.swipeThreshold)?ed(CU,m,W,{discrete:!0}):ed(kU,h,W,{discrete:!0}),F.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),TU=e=>{const{__scopeToast:t,children:n,...r}=e,s=Bh(Wh,t),[o,i]=y.useState(!1),[a,c]=y.useState(!1);return AU(()=>i(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx(nu,{asChild:!0,children:l.jsx(hu,{...r,children:o&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},PU="ToastTitle",JE=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});JE.displayName=PU;var RU="ToastDescription",eN=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});eN.displayName=RU;var tN="ToastAction",nN=y.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(sN,{altText:n,asChild:!0,children:l.jsx(Px,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${tN}\`. Expected non-empty \`string\`.`),null)});nN.displayName=tN;var rN="ToastClose",Px=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=EU(rN,n);return l.jsx(sN,{asChild:!0,children:l.jsx(Pe.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,s.onClose)})})});Px.displayName=rN;var sN=y.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return l.jsx(Pe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function oN(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),DU(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...oN(r))}}),t}function ed(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?uv(s,o):s.dispatchEvent(o)}var Ob=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function AU(e=()=>{}){const t=Ot(e);en(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function DU(e){return e.nodeType===e.ELEMENT_NODE}function OU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function sp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var IU=GE,iN=qE,aN=QE,lN=JE,cN=eN,uN=nN,dN=Px;const MU=IU,fN=y.forwardRef(({className:e,...t},n)=>l.jsx(iN,{ref:n,className:re("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));fN.displayName=iN.displayName;const LU=Jc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),hN=y.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(aN,{ref:r,className:re(LU({variant:t}),e),...n}));hN.displayName=aN.displayName;const zU=y.forwardRef(({className:e,...t},n)=>l.jsx(uN,{ref:n,className:re("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));zU.displayName=uN.displayName;const mN=y.forwardRef(({className:e,...t},n)=>l.jsx(dN,{ref:n,className:re("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx(av,{className:"h-4 w-4"})}));mN.displayName=dN.displayName;const pN=y.forwardRef(({className:e,...t},n)=>l.jsx(lN,{ref:n,className:re("text-sm font-semibold",e),...t}));pN.displayName=lN.displayName;const gN=y.forwardRef(({className:e,...t},n)=>l.jsx(cN,{ref:n,className:re("text-sm opacity-90",e),...t}));gN.displayName=cN.displayName;const FU=1,$U=1e6;let op=0;function UU(){return op=(op+1)%Number.MAX_SAFE_INTEGER,op.toString()}const ip=new Map,Ib=e=>{if(ip.has(e))return;const t=setTimeout(()=>{ip.delete(e),Jl({type:"REMOVE_TOAST",toastId:e})},$U);ip.set(e,t)},VU=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,FU)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ib(n):e.toasts.forEach(r=>{Ib(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},kd=[];let Cd={toasts:[]};function Jl(e){Cd=VU(Cd,e),kd.forEach(t=>{t(Cd)})}function BU({...e}){const t=UU(),n=s=>Jl({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Jl({type:"DISMISS_TOAST",toastId:t});return Jl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Fr(){const[e,t]=y.useState(Cd);return y.useEffect(()=>(kd.push(t),()=>{const n=kd.indexOf(t);n>-1&&kd.splice(n,1)}),[e]),{...e,toast:BU,dismiss:n=>Jl({type:"DISMISS_TOAST",toastId:n})}}function Rx(){const{toasts:e}=Fr();return l.jsxs(MU,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return l.jsxs(hN,{...o,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(pN,{children:n}),r&&l.jsx(gN,{children:r})]}),s,l.jsx(mN,{})]},t)}),l.jsx(fN,{})]})}function td(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yN={exports:{}};/*! - -JSZip v3.10.1 - A JavaScript class for generating and reading zip files -<http://stuartk.com/jszip> - -(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(e,t){(function(n){e.exports=n()})(function(){return function n(r,s,o){function i(u,d){if(!s[u]){if(!r[u]){var f=typeof td=="function"&&td;if(!d&&f)return f(u,!0);if(a)return a(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var m=s[u]={exports:{}};r[u][0].call(m.exports,function(x){var p=r[u][1][x];return i(p||x)},m,m.exports,n,r,s,o)}return s[u].exports}for(var a=typeof td=="function"&&td,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(n,r,s){var o=n("./utils"),i=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,h,m,x,p,w=[],g=0,v=c.length,b=v,_=o.getTypeOf(c)!=="string";g<c.length;)b=v-g,f=_?(u=c[g++],d=g<v?c[g++]:0,g<v?c[g++]:0):(u=c.charCodeAt(g++),d=g<v?c.charCodeAt(g++):0,g<v?c.charCodeAt(g++):0),h=u>>2,m=(3&u)<<4|d>>4,x=1<b?(15&d)<<2|f>>6:64,p=2<b?63&f:64,w.push(a.charAt(h)+a.charAt(m)+a.charAt(x)+a.charAt(p));return w.join("")},s.decode=function(c){var u,d,f,h,m,x,p=0,w=0,g="data:";if(c.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var v,b=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&b--,c.charAt(c.length-2)===a.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|b):new Array(0|b);p<c.length;)u=a.indexOf(c.charAt(p++))<<2|(h=a.indexOf(c.charAt(p++)))>>4,d=(15&h)<<4|(m=a.indexOf(c.charAt(p++)))>>2,f=(3&m)<<6|(x=a.indexOf(c.charAt(p++))),v[w++]=u,m!==64&&(v[w++]=d),x!==64&&(v[w++]=f);return v}},{"./support":30,"./utils":32}],2:[function(n,r,s){var o=n("./external"),i=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,m,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=m,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,h){return d.pipe(new a).pipe(new c("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,s){var o=n("./utils"),i=function(){for(var a,c=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c}();r.exports=function(a,c){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d[p])];return-1^u}(0|c,a,a.length,0):function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d.charCodeAt(p))];return-1^u}(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,r,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:o}},{lie:37}],7:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,h){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,s){function o(m,x){var p,w="";for(p=0;p<x;p++)w+=String.fromCharCode(255&m),m>>>=8;return w}function i(m,x,p,w,g,v){var b,_,C=m.file,j=m.compression,T=v!==u.utf8encode,R=a.transformTo("string",v(C.name)),A=a.transformTo("string",u.utf8encode(C.name)),O=C.comment,G=a.transformTo("string",v(O)),N=a.transformTo("string",u.utf8encode(O)),z=A.length!==C.name.length,S=N.length!==O.length,U="",J="",F="",W=C.dir,I=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};x&&!p||(X.crc32=m.crc32,X.compressedSize=m.compressedSize,X.uncompressedSize=m.uncompressedSize);var $=0;x&&($|=8),T||!z&&!S||($|=2048);var B=0,he=0;W&&(B|=16),g==="UNIX"?(he=798,B|=function(oe,Oe){var me=oe;return oe||(me=Oe?16893:33204),(65535&me)<<16}(C.unixPermissions,W)):(he=20,B|=function(oe){return 63&(oe||0)}(C.dosPermissions)),b=I.getUTCHours(),b<<=6,b|=I.getUTCMinutes(),b<<=5,b|=I.getUTCSeconds()/2,_=I.getUTCFullYear()-1980,_<<=4,_|=I.getUTCMonth()+1,_<<=5,_|=I.getUTCDate(),z&&(J=o(1,1)+o(d(R),4)+A,U+="up"+o(J.length,2)+J),S&&(F=o(1,1)+o(d(G),4)+N,U+="uc"+o(F.length,2)+F);var se="";return se+=` -\0`,se+=o($,2),se+=j.magic,se+=o(b,2),se+=o(_,2),se+=o(X.crc32,4),se+=o(X.compressedSize,4),se+=o(X.uncompressedSize,4),se+=o(R.length,2),se+=o(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+se+R+U,dirRecord:f.CENTRAL_FILE_HEADER+o(he,2)+se+o(G.length,2)+"\0\0\0\0"+o(B,4)+o(w,4)+R+U+G}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(m,x,p,w){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=p,this.encodeFileName=w,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,c),h.prototype.push=function(m){var x=m.meta.percent||0,p=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,c.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:p?(x+100*(p-w-1))/p:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var x=this.streamFiles&&!m.file.dir;if(x){var p=i(m,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var x=this.streamFiles&&!m.file.dir,p=i(m,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+o(w.crc32,4)+o(w.compressedSize,4)+o(w.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var p=this.bytesWritten-m,w=function(g,v,b,_,C){var j=a.transformTo("string",C(_));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(g,2)+o(g,2)+o(v,4)+o(b,4)+o(j.length,2)+j}(this.dirRecords.length,p,m,this.zipComment,this.encodeFileName);this.push({data:w,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(m){this._sources.push(m);var x=this;return m.on("data",function(p){x.processChunk(p)}),m.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),m.on("error",function(p){x.error(p)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(m){var x=this._sources;if(!c.prototype.error.call(this,m))return!1;for(var p=0;p<x.length;p++)try{x[p].error(m)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var m=this._sources,x=0;x<m.length;x++)m[x].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,s){var o=n("../compressions"),i=n("./ZipFileWorker");s.generateWorker=function(a,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{a.forEach(function(h,m){f++;var x=function(v,b){var _=v||b,C=o[_];if(!C)throw new Error(_+" is not a valid compression method !");return C}(m.options.compression,c.compression),p=m.options.compressionOptions||c.compressionOptions||{},w=m.dir,g=m.date;m._compressWorker(x,p).withStreamInfo("file",{name:h,dir:w,date:g,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,s){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new o;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(o.prototype=n("./object")).loadAsync=n("./load"),o.support=n("./support"),o.defaults=n("./defaults"),o.version="3.10.1",o.loadAsync=function(i,a){return new o().loadAsync(i,a)},o.external=n("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,s){var o=n("./utils"),i=n("./external"),a=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(m,x){var p=h.decompressed.getContentWorker().pipe(new u);p.on("error",function(w){x(w)}).on("end",function(){p.streamInfo.crc32!==h.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}r.exports=function(h,m){var x=this;return m=o.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(h)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",h,!0,m.optimizedBinaryString,m.base64).then(function(p){var w=new c(m);return w.load(p),w}).then(function(p){var w=[i.Promise.resolve(p)],g=p.files;if(m.checkCRC32)for(var v=0;v<g.length;v++)w.push(f(g[v]));return i.Promise.all(w)}).then(function(p){for(var w=p.shift(),g=w.files,v=0;v<g.length;v++){var b=g[v],_=b.fileNameStr,C=o.resolve(b.fileNameStr);x.file(C,b.decompressed,{binary:!0,optimizedBinaryString:!0,date:b.date,dir:b.dir,comment:b.fileCommentStr.length?b.fileCommentStr:null,unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions,createFolders:m.createFolders}),b.dir||(x.file(C).unsafeOriginalName=_)}return w.zipComment.length&&(x.comment=w.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,s){var o=n("../utils"),i=n("../stream/GenericWorker");function a(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(a,i),a.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,s){var o=n("readable-stream").Readable;function i(a,c,u){o.call(this,c),this._helper=a;var d=this;a.on("data",function(f,h){d.push(f)||d._helper.pause(),u&&u(h)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,s){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,i);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,i)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var i=new Buffer(o);return i.fill(0),i},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(n,r,s){function o(C,j,T){var R,A=a.getTypeOf(j),O=a.extend(T||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(C=g(C)),O.createFolders&&(R=w(C))&&v.call(this,R,!0);var G=A==="string"&&O.binary===!1&&O.base64===!1;T&&T.binary!==void 0||(O.binary=!G),(j instanceof f&&j.uncompressedSize===0||O.dir||!j||j.length===0)&&(O.base64=!1,O.binary=!0,j="",O.compression="STORE",A="string");var N=null;N=j instanceof f||j instanceof c?j:x.isNode&&x.isStream(j)?new p(C,j):a.prepareContent(C,j,O.binary,O.optimizedBinaryString,O.base64);var z=new h(C,N,O);this.files[C]=z}var i=n("./utf8"),a=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),m=n("./generate"),x=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),w=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var j=C.lastIndexOf("/");return 0<j?C.substring(0,j):""},g=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},v=function(C,j){return j=j!==void 0?j:d.createFolders,C=g(C),this.files[C]||o.call(this,C,null,{dir:!0,createFolders:j}),this.files[C]};function b(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var j,T,R;for(j in this.files)R=this.files[j],(T=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&C(T,R)},filter:function(C){var j=[];return this.forEach(function(T,R){C(T,R)&&j.push(R)}),j},file:function(C,j,T){if(arguments.length!==1)return C=this.root+C,o.call(this,C,j,T),this;if(b(C)){var R=C;return this.filter(function(O,G){return!G.dir&&R.test(O)})}var A=this.files[this.root+C];return A&&!A.dir?A:null},folder:function(C){if(!C)return this;if(b(C))return this.filter(function(A,O){return O.dir&&C.test(A)});var j=this.root+C,T=v.call(this,j),R=this.clone();return R.root=T.name,R},remove:function(C){C=this.root+C;var j=this.files[C];if(j||(C.slice(-1)!=="/"&&(C+="/"),j=this.files[C]),j&&!j.dir)delete this.files[C];else for(var T=this.filter(function(A,O){return O.name.slice(0,C.length)===C}),R=0;R<T.length;R++)delete this.files[T[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var j,T={};try{if((T=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");a.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var R=T.comment||this.comment||"";j=m.generateWorker(this,T,R)}catch(A){(j=new c("error")).error(A)}return new u(j,T.type||"string",T.mimeType)},generateAsync:function(C,j){return this.generateInternalStream(C).accumulate(j)},generateNodeStream:function(C,j){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(j)}};r.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,s){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}n("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===u&&this.data[h+2]===d&&this.data[h+3]===f)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,s){var o=n("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var c,u=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,s){var o=n("./Uint8ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var o=n("./ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var o=n("../utils"),i=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=o.getTypeOf(f);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new u(f):i.uint8array?new d(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,s){var o=n("./GenericWorker"),i=n("../utils");function a(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,o),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var o=n("./GenericWorker"),i=n("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,o),a.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(a,i),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=o.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=o},{}],29:[function(n,r,s){var o=n("../utils"),i=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(x,p){return new d.Promise(function(w,g){var v=[],b=x._internalType,_=x._outputType,C=x._mimeType;x.on("data",function(j,T){v.push(j),p&&p(T)}).on("error",function(j){v=[],g(j)}).on("end",function(){try{var j=function(T,R,A){switch(T){case"blob":return o.newBlob(o.transformTo("arraybuffer",R),A);case"base64":return c.encode(R);default:return o.transformTo(T,R)}}(_,function(T,R){var A,O=0,G=null,N=0;for(A=0;A<R.length;A++)N+=R[A].length;switch(T){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(G=new Uint8Array(N),A=0;A<R.length;A++)G.set(R[A],O),O+=R[A].length;return G;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+T+"'")}}(b,v),C);w(j)}catch(T){g(T)}v=[]}).resume()})}function m(x,p,w){var g=p;switch(p){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=p,this._mimeType=w,o.checkSupport(g),this._worker=x.pipe(new i(g)),x.lock()}catch(v){this._worker=new a("error"),this._worker.error(v)}}m.prototype={accumulate:function(x){return h(this,x)},on:function(x,p){var w=this;return x==="data"?this._worker.on(x,function(g){p.call(w,g.data,g.meta)}):this._worker.on(x,function(){o.delay(p,arguments,w)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},r.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var o=n("./utils"),i=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}s.utf8encode=function(m){return i.nodebuffer?a.newBufferFrom(m,"utf-8"):function(x){var p,w,g,v,b,_=x.length,C=0;for(v=0;v<_;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(g=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(g-56320),v++),C+=w<128?1:w<2048?2:w<65536?3:4;for(p=i.uint8array?new Uint8Array(C):new Array(C),v=b=0;b<C;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(g=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(g-56320),v++),w<128?p[b++]=w:(w<2048?p[b++]=192|w>>>6:(w<65536?p[b++]=224|w>>>12:(p[b++]=240|w>>>18,p[b++]=128|w>>>12&63),p[b++]=128|w>>>6&63),p[b++]=128|63&w);return p}(m)},s.utf8decode=function(m){return i.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(x){var p,w,g,v,b=x.length,_=new Array(2*b);for(p=w=0;p<b;)if((g=x[p++])<128)_[w++]=g;else if(4<(v=u[g]))_[w++]=65533,p+=v-1;else{for(g&=v===2?31:v===3?15:7;1<v&&p<b;)g=g<<6|63&x[p++],v--;1<v?_[w++]=65533:g<65536?_[w++]=g:(g-=65536,_[w++]=55296|g>>10&1023,_[w++]=56320|1023&g)}return _.length!==w&&(_.subarray?_=_.subarray(0,w):_.length=w),o.applyFromCharCode(_)}(m=o.transformTo(i.uint8array?"uint8array":"array",m))},o.inherits(f,c),f.prototype.processChunk=function(m){var x=o.transformTo(i.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var p=x;(x=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),x.set(p,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(v,b){var _;for((b=b||v.length)>v.length&&(b=v.length),_=b-1;0<=_&&(192&v[_])==128;)_--;return _<0||_===0?b:_+u[v[_]]>b?_:b}(x),g=x;w!==x.length&&(i.uint8array?(g=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(g=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(g),meta:m.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,o.inherits(h,c),h.prototype.processChunk=function(m){this.push({data:s.utf8encode(m.data),meta:m.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var o=n("./support"),i=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(p){return p}function d(p,w){for(var g=0;g<p.length;++g)w[g]=255&p.charCodeAt(g);return w}n("setimmediate"),s.newBlob=function(p,w){s.checkSupport("blob");try{return new Blob([p],{type:w})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(p),g.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,w,g){var v=[],b=0,_=p.length;if(_<=g)return String.fromCharCode.apply(null,p);for(;b<_;)w==="array"||w==="nodebuffer"?v.push(String.fromCharCode.apply(null,p.slice(b,Math.min(b+g,_)))):v.push(String.fromCharCode.apply(null,p.subarray(b,Math.min(b+g,_)))),b+=g;return v.join("")},stringifyByChar:function(p){for(var w="",g=0;g<p.length;g++)w+=String.fromCharCode(p[g]);return w},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function h(p){var w=65536,g=s.getTypeOf(p),v=!0;if(g==="uint8array"?v=f.applyCanBeUsed.uint8array:g==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<w;)try{return f.stringifyByChunk(p,g,w)}catch{w=Math.floor(w/2)}return f.stringifyByChar(p)}function m(p,w){for(var g=0;g<p.length;g++)w[g]=p[g];return w}s.applyFromCharCode=h;var x={};x.string={string:u,array:function(p){return d(p,new Array(p.length))},arraybuffer:function(p){return x.string.uint8array(p).buffer},uint8array:function(p){return d(p,new Uint8Array(p.length))},nodebuffer:function(p){return d(p,a.allocBuffer(p.length))}},x.array={string:h,array:u,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},x.arraybuffer={string:function(p){return h(new Uint8Array(p))},array:function(p){return m(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:u,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},x.uint8array={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:u,nodebuffer:function(p){return a.newBufferFrom(p)}},x.nodebuffer={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return x.nodebuffer.uint8array(p).buffer},uint8array:function(p){return m(p,new Uint8Array(p.length))},nodebuffer:u},s.transformTo=function(p,w){if(w=w||"",!p)return w;s.checkSupport(p);var g=s.getTypeOf(w);return x[g][p](w)},s.resolve=function(p){for(var w=p.split("/"),g=[],v=0;v<w.length;v++){var b=w[v];b==="."||b===""&&v!==0&&v!==w.length-1||(b===".."?g.pop():g.push(b))}return g.join("/")},s.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(p)?"nodebuffer":o.uint8array&&p instanceof Uint8Array?"uint8array":o.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(p){if(!o[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(p){var w,g,v="";for(g=0;g<(p||"").length;g++)v+="\\x"+((w=p.charCodeAt(g))<16?"0":"")+w.toString(16).toUpperCase();return v},s.delay=function(p,w,g){setImmediate(function(){p.apply(g||null,w||[])})},s.inherits=function(p,w){function g(){}g.prototype=w.prototype,p.prototype=new g},s.extend=function(){var p,w,g={};for(p=0;p<arguments.length;p++)for(w in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],w)&&g[w]===void 0&&(g[w]=arguments[p][w]);return g},s.prepareContent=function(p,w,g,v,b){return c.Promise.resolve(w).then(function(_){return o.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,j){var T=new FileReader;T.onload=function(R){C(R.target.result)},T.onerror=function(R){j(R.target.error)},T.readAsArrayBuffer(_)}):_}).then(function(_){var C=s.getTypeOf(_);return C?(C==="arraybuffer"?_=s.transformTo("uint8array",_):C==="string"&&(b?_=i.decode(_):g&&v!==!0&&(_=function(j){return d(j,o.uint8array?new Uint8Array(j.length):new Array(j.length))}(_))),_):c.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(h)+", expected "+i.pretty(f)+")")}},isSignature:function(f,h){var m=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===h;return this.reader.setIndex(m),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=u.uint8array?"uint8array":"array",m=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(m)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,h,m,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:m}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var h=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var x=h-m;if(0<x)this.isSignature(h,a.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(m,x){this.options=m,this.loadOptions=x}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var x,p;if(m.skip(22),this.fileNameLength=m.readInt(2),p=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=function(w){for(var g in d)if(Object.prototype.hasOwnProperty.call(d,g)&&d[g].magic===w)return d[g];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,x,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var x=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(x),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var x,p,w,g=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<g;)x=m.readInt(2),p=m.readInt(2),w=m.readData(p),this.extraFields[x]={id:x,length:p,value:w};m.setIndex(g)},handleUTF8:function(){var m=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var p=i.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var g=i.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(m.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,s){function o(x,p,w){this.name=x,this.dir=w.dir,this.date=w.date,this.comment=w.comment,this.unixPermissions=w.unixPermissions,this.dosPermissions=w.dosPermissions,this._data=p,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var i=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");o.prototype={internalStream:function(x){var p=null,w="string";try{if(!x)throw new Error("No output type specified.");var g=(w=x.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),p=this._decompressWorker();var v=!this._dataBinary;v&&!g&&(p=p.pipe(new c.Utf8EncodeWorker)),!v&&g&&(p=p.pipe(new c.Utf8DecodeWorker))}catch(b){(p=new d("error")).error(b)}return new i(p,w,"")},async:function(x,p){return this.internalStream(x).accumulate(p)},nodeStream:function(x,p){return this.internalStream(x||"nodebuffer").toNodejsStream(p)},_compressWorker:function(x,p){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var w=this._decompressWorker();return this._dataBinary||(w=w.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(w,x,p)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},m=0;m<f.length;m++)o.prototype[f[m]]=h;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,s){(function(o){var i,a,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var u=0,d=new c(x),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var p=o.document.createElement("script");p.onreadystatechange=function(){x(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},o.document.documentElement.appendChild(p)}:function(){setTimeout(x,0)};else{var h=new o.MessageChannel;h.port1.onmessage=x,i=function(){h.port2.postMessage(0)}}var m=[];function x(){var p,w;a=!0;for(var g=m.length;g;){for(w=m,m=[],p=-1;++p<g;)w[p]();g=m.length}a=!1}r.exports=function(p){m.push(p)!==1||a||i()}}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,s){var o=n("immediate");function i(){}var a={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,g!==i&&p(this,g)}function h(g,v,b){this.promise=g,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof b=="function"&&(this.onRejected=b,this.callRejected=this.otherCallRejected)}function m(g,v,b){o(function(){var _;try{_=v(b)}catch(C){return a.reject(g,C)}_===g?a.reject(g,new TypeError("Cannot resolve promise with itself")):a.resolve(g,_)})}function x(g){var v=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof v=="function")return function(){v.apply(g,arguments)}}function p(g,v){var b=!1;function _(T){b||(b=!0,a.reject(g,T))}function C(T){b||(b=!0,a.resolve(g,T))}var j=w(function(){v(C,_)});j.status==="error"&&_(j.value)}function w(g,v){var b={};try{b.value=g(v),b.status="success"}catch(_){b.status="error",b.value=_}return b}(r.exports=f).prototype.finally=function(g){if(typeof g!="function")return this;var v=this.constructor;return this.then(function(b){return v.resolve(g()).then(function(){return b})},function(b){return v.resolve(g()).then(function(){throw b})})},f.prototype.catch=function(g){return this.then(null,g)},f.prototype.then=function(g,v){if(typeof g!="function"&&this.state===u||typeof v!="function"&&this.state===c)return this;var b=new this.constructor(i);return this.state!==d?m(b,this.state===u?g:v,this.outcome):this.queue.push(new h(b,g,v)),b},h.prototype.callFulfilled=function(g){a.resolve(this.promise,g)},h.prototype.otherCallFulfilled=function(g){m(this.promise,this.onFulfilled,g)},h.prototype.callRejected=function(g){a.reject(this.promise,g)},h.prototype.otherCallRejected=function(g){m(this.promise,this.onRejected,g)},a.resolve=function(g,v){var b=w(x,v);if(b.status==="error")return a.reject(g,b.value);var _=b.value;if(_)p(g,_);else{g.state=u,g.outcome=v;for(var C=-1,j=g.queue.length;++C<j;)g.queue[C].callFulfilled(v)}return g},a.reject=function(g,v){g.state=c,g.outcome=v;for(var b=-1,_=g.queue.length;++b<_;)g.queue[b].callRejected(v);return g},f.resolve=function(g){return g instanceof this?g:a.resolve(new this(i),g)},f.reject=function(g){var v=new this(i);return a.reject(v,g)},f.all=function(g){var v=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=g.length,_=!1;if(!b)return this.resolve([]);for(var C=new Array(b),j=0,T=-1,R=new this(i);++T<b;)A(g[T],T);return R;function A(O,G){v.resolve(O).then(function(N){C[G]=N,++j!==b||_||(_=!0,a.resolve(R,C))},function(N){_||(_=!0,a.reject(R,N))})}},f.race=function(g){var v=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=g.length,_=!1;if(!b)return this.resolve([]);for(var C=-1,j=new this(i);++C<b;)T=g[C],v.resolve(T).then(function(R){_||(_=!0,a.resolve(j,R))},function(R){_||(_=!0,a.reject(j,R))});var T;return j}},{immediate:36}],38:[function(n,r,s){var o={};(0,n("./lib/utils/common").assign)(o,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,s){var o=n("./zlib/deflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,m=0,x=8;function p(g){if(!(this instanceof p))return new p(g);this.options=i.assign({level:h,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},g||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var b=o.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(b!==f)throw new Error(c[b]);if(v.header&&o.deflateSetHeader(this.strm,v.header),v.dictionary){var _;if(_=typeof v.dictionary=="string"?a.string2buf(v.dictionary):d.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(b=o.deflateSetDictionary(this.strm,_))!==f)throw new Error(c[b]);this._dict_set=!0}}function w(g,v){var b=new p(v);if(b.push(g,!0),b.err)throw b.msg||c[b.err];return b.result}p.prototype.push=function(g,v){var b,_,C=this.strm,j=this.options.chunkSize;if(this.ended)return!1;_=v===~~v?v:v===!0?4:0,typeof g=="string"?C.input=a.string2buf(g):d.call(g)==="[object ArrayBuffer]"?C.input=new Uint8Array(g):C.input=g,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(j),C.next_out=0,C.avail_out=j),(b=o.deflate(C,_))!==1&&b!==f)return this.onEnd(b),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&b!==1);return _===4?(b=o.deflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===f):_!==2||(this.onEnd(f),!(C.avail_out=0))},p.prototype.onData=function(g){this.chunks.push(g)},p.prototype.onEnd=function(g){g===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Deflate=p,s.deflate=w,s.deflateRaw=function(g,v){return(v=v||{}).raw=!0,w(g,v)},s.gzip=function(g,v){return(v=v||{}).gzip=!0,w(g,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,s){var o=n("./zlib/inflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function m(p){if(!(this instanceof m))return new m(p);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},p||{});var w=this.options;w.raw&&0<=w.windowBits&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),!(0<=w.windowBits&&w.windowBits<16)||p&&p.windowBits||(w.windowBits+=32),15<w.windowBits&&w.windowBits<48&&!(15&w.windowBits)&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var g=o.inflateInit2(this.strm,w.windowBits);if(g!==c.Z_OK)throw new Error(u[g]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(p,w){var g=new m(w);if(g.push(p,!0),g.err)throw g.msg||u[g.err];return g.result}m.prototype.push=function(p,w){var g,v,b,_,C,j,T=this.strm,R=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;v=w===~~w?w:w===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof p=="string"?T.input=a.binstring2buf(p):h.call(p)==="[object ArrayBuffer]"?T.input=new Uint8Array(p):T.input=p,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(R),T.next_out=0,T.avail_out=R),(g=o.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(j=typeof A=="string"?a.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,g=o.inflateSetDictionary(this.strm,j)),g===c.Z_BUF_ERROR&&O===!0&&(g=c.Z_OK,O=!1),g!==c.Z_STREAM_END&&g!==c.Z_OK)return this.onEnd(g),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&g!==c.Z_STREAM_END&&(T.avail_in!==0||v!==c.Z_FINISH&&v!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(b=a.utf8border(T.output,T.next_out),_=T.next_out-b,C=a.buf2string(T.output,b),T.next_out=_,T.avail_out=R-_,_&&i.arraySet(T.output,T.output,b,_,0),this.onData(C)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(O=!0)}while((0<T.avail_in||T.avail_out===0)&&g!==c.Z_STREAM_END);return g===c.Z_STREAM_END&&(v=c.Z_FINISH),v===c.Z_FINISH?(g=o.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===c.Z_OK):v!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},m.prototype.onData=function(p){this.chunks.push(p)},m.prototype.onEnd=function(p){p===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Inflate=m,s.inflate=x,s.inflateRaw=function(p,w){return(w=w||{}).raw=!0,x(p,w)},s.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){var u,d,f,h,m,x;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(x=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)m=c[u],x.set(m,h),h+=m.length;return x}},a={arraySet:function(c,u,d,f,h){for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(o)},{}],42:[function(n,r,s){var o=n("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var c=new o.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,h){if(h<65537&&(f.subarray&&a||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,h));for(var m="",x=0;x<h;x++)m+=String.fromCharCode(f[x]);return m}c[254]=c[254]=1,s.string2buf=function(f){var h,m,x,p,w,g=f.length,v=0;for(p=0;p<g;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<g&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),v+=m<128?1:m<2048?2:m<65536?3:4;for(h=new o.Buf8(v),p=w=0;w<v;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<g&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),m<128?h[w++]=m:(m<2048?h[w++]=192|m>>>6:(m<65536?h[w++]=224|m>>>12:(h[w++]=240|m>>>18,h[w++]=128|m>>>12&63),h[w++]=128|m>>>6&63),h[w++]=128|63&m);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new o.Buf8(f.length),m=0,x=h.length;m<x;m++)h[m]=f.charCodeAt(m);return h},s.buf2string=function(f,h){var m,x,p,w,g=h||f.length,v=new Array(2*g);for(m=x=0;m<g;)if((p=f[m++])<128)v[x++]=p;else if(4<(w=c[p]))v[x++]=65533,m+=w-1;else{for(p&=w===2?31:w===3?15:7;1<w&&m<g;)p=p<<6|63&f[m++],w--;1<w?v[x++]=65533:p<65536?v[x++]=p:(p-=65536,v[x++]=55296|p>>10&1023,v[x++]=56320|1023&p)}return d(v,x)},s.utf8border=function(f,h){var m;for((h=h||f.length)>f.length&&(h=f.length),m=h-1;0<=m&&(192&f[m])==128;)m--;return m<0||m===0?h:m+c[f[m]]>h?m:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(o,i,a,c){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,s){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,s){var o=function(){for(var i,a=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a}();r.exports=function(i,a,c,u){var d=o,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^a[h])];return-1^i}},{}],46:[function(n,r,s){var o,i=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,m=0,x=-2,p=-1,w=4,g=2,v=8,b=9,_=286,C=30,j=19,T=2*_+1,R=15,A=3,O=258,G=O+A+1,N=42,z=113,S=1,U=2,J=3,F=4;function W(E,ee){return E.msg=d[ee],ee}function I(E){return(E<<1)-(4<E?9:0)}function X(E){for(var ee=E.length;0<=--ee;)E[ee]=0}function $(E){var ee=E.state,Z=ee.pending;Z>E.avail_out&&(Z=E.avail_out),Z!==0&&(i.arraySet(E.output,ee.pending_buf,ee.pending_out,Z,E.next_out),E.next_out+=Z,ee.pending_out+=Z,E.total_out+=Z,E.avail_out-=Z,ee.pending-=Z,ee.pending===0&&(ee.pending_out=0))}function B(E,ee){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,ee),E.block_start=E.strstart,$(E.strm)}function he(E,ee){E.pending_buf[E.pending++]=ee}function se(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function oe(E,ee){var Z,D,k=E.max_chain_length,P=E.strstart,M=E.prev_length,K=E.nice_match,L=E.strstart>E.w_size-G?E.strstart-(E.w_size-G):0,Y=E.window,Q=E.w_mask,te=E.prev,ge=E.strstart+O,Ke=Y[P+M-1],Ue=Y[P+M];E.prev_length>=E.good_match&&(k>>=2),K>E.lookahead&&(K=E.lookahead);do if(Y[(Z=ee)+M]===Ue&&Y[Z+M-1]===Ke&&Y[Z]===Y[P]&&Y[++Z]===Y[P+1]){P+=2,Z++;do;while(Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&P<ge);if(D=O-(ge-P),P=ge-O,M<D){if(E.match_start=ee,K<=(M=D))break;Ke=Y[P+M-1],Ue=Y[P+M]}}while((ee=te[ee&Q])>L&&--k!=0);return M<=E.lookahead?M:E.lookahead}function Oe(E){var ee,Z,D,k,P,M,K,L,Y,Q,te=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=te+(te-G)){for(i.arraySet(E.window,E.window,te,te,0),E.match_start-=te,E.strstart-=te,E.block_start-=te,ee=Z=E.hash_size;D=E.head[--ee],E.head[ee]=te<=D?D-te:0,--Z;);for(ee=Z=te;D=E.prev[--ee],E.prev[ee]=te<=D?D-te:0,--Z;);k+=te}if(E.strm.avail_in===0)break;if(M=E.strm,K=E.window,L=E.strstart+E.lookahead,Y=k,Q=void 0,Q=M.avail_in,Y<Q&&(Q=Y),Z=Q===0?0:(M.avail_in-=Q,i.arraySet(K,M.input,M.next_in,Q,L),M.state.wrap===1?M.adler=c(M.adler,K,Q,L):M.state.wrap===2&&(M.adler=u(M.adler,K,Q,L)),M.next_in+=Q,M.total_in+=Q,Q),E.lookahead+=Z,E.lookahead+E.insert>=A)for(P=E.strstart-E.insert,E.ins_h=E.window[P],E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+A-1])&E.hash_mask,E.prev[P&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=P,P++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<G&&E.strm.avail_in!==0)}function me(E,ee){for(var Z,D;;){if(E.lookahead<G){if(Oe(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),Z!==0&&E.strstart-Z<=E.w_size-G&&(E.match_length=oe(E,Z)),E.match_length>=A)if(D=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else D=a._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(D&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function we(E,ee){for(var Z,D,k;;){if(E.lookahead<G){if(Oe(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=A-1,Z!==0&&E.prev_length<E.max_lazy_match&&E.strstart-Z<=E.w_size-G&&(E.match_length=oe(E,Z),E.match_length<=5&&(E.strategy===1||E.match_length===A&&4096<E.strstart-E.match_start)&&(E.match_length=A-1)),E.prev_length>=A&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-A,D=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=A-1,E.strstart++,D&&(B(E,!1),E.strm.avail_out===0))return S}else if(E.match_available){if((D=a._tr_tally(E,0,E.window[E.strstart-1]))&&B(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return S}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(D=a._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function Te(E,ee,Z,D,k){this.good_length=E,this.max_lazy=ee,this.nice_length=Z,this.max_chain=D,this.func=k}function Fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*T),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*j+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(R+1),this.heap=new i.Buf16(2*_+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*_+1),X(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ie(E){var ee;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=g,(ee=E.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?N:z,E.adler=ee.wrap===2?0:1,ee.last_flush=f,a._tr_init(ee),m):W(E,x)}function Re(E){var ee=Ie(E);return ee===m&&function(Z){Z.window_size=2*Z.w_size,X(Z.head),Z.max_lazy_match=o[Z.level].max_lazy,Z.good_match=o[Z.level].good_length,Z.nice_match=o[Z.level].nice_length,Z.max_chain_length=o[Z.level].max_chain,Z.strstart=0,Z.block_start=0,Z.lookahead=0,Z.insert=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,Z.ins_h=0}(E.state),ee}function st(E,ee,Z,D,k,P){if(!E)return x;var M=1;if(ee===p&&(ee=6),D<0?(M=0,D=-D):15<D&&(M=2,D-=16),k<1||b<k||Z!==v||D<8||15<D||ee<0||9<ee||P<0||w<P)return W(E,x);D===8&&(D=9);var K=new Fe;return(E.state=K).strm=E,K.wrap=M,K.gzhead=null,K.w_bits=D,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=k+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+A-1)/A),K.window=new i.Buf8(2*K.w_size),K.head=new i.Buf16(K.hash_size),K.prev=new i.Buf16(K.w_size),K.lit_bufsize=1<<k+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new i.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=ee,K.strategy=P,K.method=Z,Re(E)}o=[new Te(0,0,0,0,function(E,ee){var Z=65535;for(Z>E.pending_buf_size-5&&(Z=E.pending_buf_size-5);;){if(E.lookahead<=1){if(Oe(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var D=E.block_start+Z;if((E.strstart===0||E.strstart>=D)&&(E.lookahead=E.strstart-D,E.strstart=D,B(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-G&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=0,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Te(4,4,8,4,me),new Te(4,5,16,8,me),new Te(4,6,32,32,me),new Te(4,4,16,16,we),new Te(8,16,32,32,we),new Te(8,16,128,128,we),new Te(8,32,128,256,we),new Te(32,128,258,1024,we),new Te(32,258,258,4096,we)],s.deflateInit=function(E,ee){return st(E,ee,v,15,8,0)},s.deflateInit2=st,s.deflateReset=Re,s.deflateResetKeep=Ie,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,m):x},s.deflate=function(E,ee){var Z,D,k,P;if(!E||!E.state||5<ee||ee<0)return E?W(E,x):x;if(D=E.state,!E.output||!E.input&&E.avail_in!==0||D.status===666&&ee!==h)return W(E,E.avail_out===0?-5:x);if(D.strm=E,Z=D.last_flush,D.last_flush=ee,D.status===N)if(D.wrap===2)E.adler=0,he(D,31),he(D,139),he(D,8),D.gzhead?(he(D,(D.gzhead.text?1:0)+(D.gzhead.hcrc?2:0)+(D.gzhead.extra?4:0)+(D.gzhead.name?8:0)+(D.gzhead.comment?16:0)),he(D,255&D.gzhead.time),he(D,D.gzhead.time>>8&255),he(D,D.gzhead.time>>16&255),he(D,D.gzhead.time>>24&255),he(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),he(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(he(D,255&D.gzhead.extra.length),he(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(E.adler=u(E.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(he(D,0),he(D,0),he(D,0),he(D,0),he(D,0),he(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),he(D,3),D.status=z);else{var M=v+(D.w_bits-8<<4)<<8;M|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(M|=32),M+=31-M%31,D.status=z,se(D,M),D.strstart!==0&&(se(D,E.adler>>>16),se(D,65535&E.adler)),E.adler=1}if(D.status===69)if(D.gzhead.extra){for(k=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending!==D.pending_buf_size));)he(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.name.length?255&D.gzhead.name.charCodeAt(D.gzindex++):0,he(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.comment.length?255&D.gzhead.comment.charCodeAt(D.gzindex++):0,he(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&$(E),D.pending+2<=D.pending_buf_size&&(he(D,255&E.adler),he(D,E.adler>>8&255),E.adler=0,D.status=z)):D.status=z),D.pending!==0){if($(E),E.avail_out===0)return D.last_flush=-1,m}else if(E.avail_in===0&&I(ee)<=I(Z)&&ee!==h)return W(E,-5);if(D.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||D.lookahead!==0||ee!==f&&D.status!==666){var K=D.strategy===2?function(L,Y){for(var Q;;){if(L.lookahead===0&&(Oe(L),L.lookahead===0)){if(Y===f)return S;break}if(L.match_length=0,Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):D.strategy===3?function(L,Y){for(var Q,te,ge,Ke,Ue=L.window;;){if(L.lookahead<=O){if(Oe(L),L.lookahead<=O&&Y===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0<L.strstart&&(te=Ue[ge=L.strstart-1])===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]){Ke=L.strstart+O;do;while(te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&ge<Ke);L.match_length=O-(Ke-ge),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=a._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):o[D.level].func(D,ee);if(K!==J&&K!==F||(D.status=666),K===S||K===J)return E.avail_out===0&&(D.last_flush=-1),m;if(K===U&&(ee===1?a._tr_align(D):ee!==5&&(a._tr_stored_block(D,0,0,!1),ee===3&&(X(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),$(E),E.avail_out===0))return D.last_flush=-1,m}return ee!==h?m:D.wrap<=0?1:(D.wrap===2?(he(D,255&E.adler),he(D,E.adler>>8&255),he(D,E.adler>>16&255),he(D,E.adler>>24&255),he(D,255&E.total_in),he(D,E.total_in>>8&255),he(D,E.total_in>>16&255),he(D,E.total_in>>24&255)):(se(D,E.adler>>>16),se(D,65535&E.adler)),$(E),0<D.wrap&&(D.wrap=-D.wrap),D.pending!==0?m:1)},s.deflateEnd=function(E){var ee;return E&&E.state?(ee=E.state.status)!==N&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==z&&ee!==666?W(E,x):(E.state=null,ee===z?W(E,-3):m):x},s.deflateSetDictionary=function(E,ee){var Z,D,k,P,M,K,L,Y,Q=ee.length;if(!E||!E.state||(P=(Z=E.state).wrap)===2||P===1&&Z.status!==N||Z.lookahead)return x;for(P===1&&(E.adler=c(E.adler,ee,Q,0)),Z.wrap=0,Q>=Z.w_size&&(P===0&&(X(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),Y=new i.Buf8(Z.w_size),i.arraySet(Y,ee,Q-Z.w_size,Z.w_size,0),ee=Y,Q=Z.w_size),M=E.avail_in,K=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,Oe(Z);Z.lookahead>=A;){for(D=Z.strstart,k=Z.lookahead-(A-1);Z.ins_h=(Z.ins_h<<Z.hash_shift^Z.window[D+A-1])&Z.hash_mask,Z.prev[D&Z.w_mask]=Z.head[Z.ins_h],Z.head[Z.ins_h]=D,D++,--k;);Z.strstart=D,Z.lookahead=A-1,Oe(Z)}return Z.strstart+=Z.lookahead,Z.block_start=Z.strstart,Z.insert=Z.lookahead,Z.lookahead=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,E.next_in=K,E.input=L,E.avail_in=M,Z.wrap=P,m},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,s){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,s){r.exports=function(o,i){var a,c,u,d,f,h,m,x,p,w,g,v,b,_,C,j,T,R,A,O,G,N,z,S,U;a=o.state,c=o.next_in,S=o.input,u=c+(o.avail_in-5),d=o.next_out,U=o.output,f=d-(i-o.avail_out),h=d+(o.avail_out-257),m=a.dmax,x=a.wsize,p=a.whave,w=a.wnext,g=a.window,v=a.hold,b=a.bits,_=a.lencode,C=a.distcode,j=(1<<a.lenbits)-1,T=(1<<a.distbits)-1;e:do{b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=_[v&j];t:for(;;){if(v>>>=A=R>>>24,b-=A,(A=R>>>16&255)===0)U[d++]=65535&R;else{if(!(16&A)){if(!(64&A)){R=_[(65535&R)+(v&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}O=65535&R,(A&=15)&&(b<A&&(v+=S[c++]<<b,b+=8),O+=v&(1<<A)-1,v>>>=A,b-=A),b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=C[v&T];n:for(;;){if(v>>>=A=R>>>24,b-=A,!(16&(A=R>>>16&255))){if(!(64&A)){R=C[(65535&R)+(v&(1<<A)-1)];continue n}o.msg="invalid distance code",a.mode=30;break e}if(G=65535&R,b<(A&=15)&&(v+=S[c++]<<b,(b+=8)<A&&(v+=S[c++]<<b,b+=8)),m<(G+=v&(1<<A)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(v>>>=A,b-=A,(A=d-f)<G){if(p<(A=G-A)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(z=g,(N=0)===w){if(N+=x-A,A<O){for(O-=A;U[d++]=g[N++],--A;);N=d-G,z=U}}else if(w<A){if(N+=x+w-A,(A-=w)<O){for(O-=A;U[d++]=g[N++],--A;);if(N=0,w<O){for(O-=A=w;U[d++]=g[N++],--A;);N=d-G,z=U}}}else if(N+=w-A,A<O){for(O-=A;U[d++]=g[N++],--A;);N=d-G,z=U}for(;2<O;)U[d++]=z[N++],U[d++]=z[N++],U[d++]=z[N++],O-=3;O&&(U[d++]=z[N++],1<O&&(U[d++]=z[N++]))}else{for(N=d-G;U[d++]=U[N++],U[d++]=U[N++],U[d++]=U[N++],2<(O-=3););O&&(U[d++]=U[N++],1<O&&(U[d++]=U[N++]))}break}}break}}while(c<u&&d<h);c-=O=b>>3,v&=(1<<(b-=O<<3))-1,o.next_in=c,o.next_out=d,o.avail_in=c<u?u-c+5:5-(c-u),o.avail_out=d<h?h-d+257:257-(d-h),a.hold=v,a.bits=b}},{}],49:[function(n,r,s){var o=n("../utils/common"),i=n("./adler32"),a=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,m=-2,x=1,p=852,w=592;function g(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(N){var z;return N&&N.state?(z=N.state,N.total_in=N.total_out=z.total=0,N.msg="",z.wrap&&(N.adler=1&z.wrap),z.mode=x,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new o.Buf32(p),z.distcode=z.distdyn=new o.Buf32(w),z.sane=1,z.back=-1,h):m}function _(N){var z;return N&&N.state?((z=N.state).wsize=0,z.whave=0,z.wnext=0,b(N)):m}function C(N,z){var S,U;return N&&N.state?(U=N.state,z<0?(S=0,z=-z):(S=1+(z>>4),z<48&&(z&=15)),z&&(z<8||15<z)?m:(U.window!==null&&U.wbits!==z&&(U.window=null),U.wrap=S,U.wbits=z,_(N))):m}function j(N,z){var S,U;return N?(U=new v,(N.state=U).window=null,(S=C(N,z))!==h&&(N.state=null),S):m}var T,R,A=!0;function O(N){if(A){var z;for(T=new o.Buf32(512),R=new o.Buf32(32),z=0;z<144;)N.lens[z++]=8;for(;z<256;)N.lens[z++]=9;for(;z<280;)N.lens[z++]=7;for(;z<288;)N.lens[z++]=8;for(u(d,N.lens,0,288,T,0,N.work,{bits:9}),z=0;z<32;)N.lens[z++]=5;u(f,N.lens,0,32,R,0,N.work,{bits:5}),A=!1}N.lencode=T,N.lenbits=9,N.distcode=R,N.distbits=5}function G(N,z,S,U){var J,F=N.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new o.Buf8(F.wsize)),U>=F.wsize?(o.arraySet(F.window,z,S-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(U<(J=F.wsize-F.wnext)&&(J=U),o.arraySet(F.window,z,S-U,J,F.wnext),(U-=J)?(o.arraySet(F.window,z,S-U,U,0),F.wnext=U,F.whave=F.wsize):(F.wnext+=J,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=J))),0}s.inflateReset=_,s.inflateReset2=C,s.inflateResetKeep=b,s.inflateInit=function(N){return j(N,15)},s.inflateInit2=j,s.inflate=function(N,z){var S,U,J,F,W,I,X,$,B,he,se,oe,Oe,me,we,Te,Fe,Ie,Re,st,E,ee,Z,D,k=0,P=new o.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return m;(S=N.state).mode===12&&(S.mode=13),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,he=I,se=X,ee=h;e:for(;;)switch(S.mode){case x:if(S.wrap===0){S.mode=13;break}for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(2&S.wrap&&$===35615){P[S.check=0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0),B=$=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&$)<<8)+($>>8))%31){N.msg="incorrect header check",S.mode=30;break}if((15&$)!=8){N.msg="unknown compression method",S.mode=30;break}if(B-=4,E=8+(15&($>>>=4)),S.wbits===0)S.wbits=E;else if(E>S.wbits){N.msg="invalid window size",S.mode=30;break}S.dmax=1<<E,N.adler=S.check=1,S.mode=512&$?10:12,B=$=0;break;case 2:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.flags=$,(255&S.flags)!=8){N.msg="unknown compression method",S.mode=30;break}if(57344&S.flags){N.msg="unknown header flags set",S.mode=30;break}S.head&&(S.head.text=$>>8&1),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.time=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,P[2]=$>>>16&255,P[3]=$>>>24&255,S.check=a(S.check,P,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.xflags=255&$,S.head.os=$>>8),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length=$,S.head&&(S.head.extra_len=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(oe=S.length)&&(oe=I),oe&&(S.head&&(E=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),o.arraySet(S.head.extra,U,F,oe,E)),512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,S.length-=oe),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(oe=0;E=U[F+oe++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&oe<I;);if(512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,E)break e}else S.head&&(S.head.name=null);S.length=0,S.mode=8;case 8:if(4096&S.flags){if(I===0)break e;for(oe=0;E=U[F+oe++],S.head&&E&&S.length<65536&&(S.head.comment+=String.fromCharCode(E)),E&&oe<I;);if(512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,E)break e}else S.head&&(S.head.comment=null);S.mode=9;case 9:if(512&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(65535&S.check)){N.msg="header crc mismatch",S.mode=30;break}B=$=0}S.head&&(S.head.hcrc=S.flags>>9&1,S.head.done=!0),N.adler=S.check=0,S.mode=12;break;case 10:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}N.adler=S.check=g($),B=$=0,S.mode=11;case 11:if(S.havedict===0)return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,2;N.adler=S.check=1,S.mode=12;case 12:if(z===5||z===6)break e;case 13:if(S.last){$>>>=7&B,B-=7&B,S.mode=27;break}for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}switch(S.last=1&$,B-=1,3&($>>>=1)){case 0:S.mode=14;break;case 1:if(O(S),S.mode=20,z!==6)break;$>>>=2,B-=2;break e;case 2:S.mode=17;break;case 3:N.msg="invalid block type",S.mode=30}$>>>=2,B-=2;break;case 14:for($>>>=7&B,B-=7&B;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if((65535&$)!=($>>>16^65535)){N.msg="invalid stored block lengths",S.mode=30;break}if(S.length=65535&$,B=$=0,S.mode=15,z===6)break e;case 15:S.mode=16;case 16:if(oe=S.length){if(I<oe&&(oe=I),X<oe&&(oe=X),oe===0)break e;o.arraySet(J,U,F,oe,W),I-=oe,F+=oe,X-=oe,W+=oe,S.length-=oe;break}S.mode=12;break;case 17:for(;B<14;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.nlen=257+(31&$),$>>>=5,B-=5,S.ndist=1+(31&$),$>>>=5,B-=5,S.ncode=4+(15&$),$>>>=4,B-=4,286<S.nlen||30<S.ndist){N.msg="too many length or distance symbols",S.mode=30;break}S.have=0,S.mode=18;case 18:for(;S.have<S.ncode;){for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.lens[M[S.have++]]=7&$,$>>>=3,B-=3}for(;S.have<19;)S.lens[M[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,Z={bits:S.lenbits},ee=u(0,S.lens,0,19,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid code lengths set",S.mode=30;break}S.have=0,S.mode=19;case 19:for(;S.have<S.nlen+S.ndist;){for(;Te=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Fe<16)$>>>=we,B-=we,S.lens[S.have++]=Fe;else{if(Fe===16){for(D=we+2;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($>>>=we,B-=we,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],oe=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(D=we+3;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=we,E=0,oe=3+(7&($>>>=we)),$>>>=3,B-=3}else{for(D=we+7;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=we,E=0,oe=11+(127&($>>>=we)),$>>>=7,B-=7}if(S.have+oe>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;oe--;)S.lens[S.have++]=E}}if(S.mode===30)break;if(S.lens[256]===0){N.msg="invalid code -- missing end-of-block",S.mode=30;break}if(S.lenbits=9,Z={bits:S.lenbits},ee=u(d,S.lens,0,S.nlen,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid literal/lengths set",S.mode=30;break}if(S.distbits=6,S.distcode=S.distdyn,Z={bits:S.distbits},ee=u(f,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,Z),S.distbits=Z.bits,ee){N.msg="invalid distances set",S.mode=30;break}if(S.mode=20,z===6)break e;case 20:S.mode=21;case 21:if(6<=I&&258<=X){N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,c(N,se),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,S.mode===12&&(S.back=-1);break}for(S.back=0;Te=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Te&&!(240&Te)){for(Ie=we,Re=Te,st=Fe;Te=(k=S.lencode[st+(($&(1<<Ie+Re)-1)>>Ie)])>>>16&255,Fe=65535&k,!(Ie+(we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Ie,B-=Ie,S.back+=Ie}if($>>>=we,B-=we,S.back+=we,S.length=Fe,Te===0){S.mode=26;break}if(32&Te){S.back=-1,S.mode=12;break}if(64&Te){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Te,S.mode=22;case 22:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;Te=(k=S.distcode[$&(1<<S.distbits)-1])>>>16&255,Fe=65535&k,!((we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(!(240&Te)){for(Ie=we,Re=Te,st=Fe;Te=(k=S.distcode[st+(($&(1<<Ie+Re)-1)>>Ie)])>>>16&255,Fe=65535&k,!(Ie+(we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Ie,B-=Ie,S.back+=Ie}if($>>>=we,B-=we,S.back+=we,64&Te){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Te,S.mode=24;case 24:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.offset+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){N.msg="invalid distance too far back",S.mode=30;break}S.mode=25;case 25:if(X===0)break e;if(oe=se-X,S.offset>oe){if((oe=S.offset-oe)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}Oe=oe>S.wnext?(oe-=S.wnext,S.wsize-oe):S.wnext-oe,oe>S.length&&(oe=S.length),me=S.window}else me=J,Oe=W-S.offset,oe=S.length;for(X<oe&&(oe=X),X-=oe,S.length-=oe;J[W++]=me[Oe++],--oe;);S.length===0&&(S.mode=21);break;case 26:if(X===0)break e;J[W++]=S.length,X--,S.mode=21;break;case 27:if(S.wrap){for(;B<32;){if(I===0)break e;I--,$|=U[F++]<<B,B+=8}if(se-=X,N.total_out+=se,S.total+=se,se&&(N.adler=S.check=S.flags?a(S.check,J,se,W-se):i(S.check,J,se,W-se)),se=X,(S.flags?$:g($))!==S.check){N.msg="incorrect data check",S.mode=30;break}B=$=0}S.mode=28;case 28:if(S.wrap&&S.flags){for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(4294967295&S.total)){N.msg="incorrect length check",S.mode=30;break}B=$=0}S.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;case 32:default:return m}return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,(S.wsize||se!==N.avail_out&&S.mode<30&&(S.mode<27||z!==4))&&G(N,N.output,N.next_out,se-N.avail_out)?(S.mode=31,-4):(he-=N.avail_in,se-=N.avail_out,N.total_in+=he,N.total_out+=se,S.total+=se,S.wrap&&se&&(N.adler=S.check=S.flags?a(S.check,J,se,N.next_out-se):i(S.check,J,se,N.next_out-se)),N.data_type=S.bits+(S.last?64:0)+(S.mode===12?128:0)+(S.mode===20||S.mode===15?256:0),(he==0&&se===0||z===4)&&ee===h&&(ee=-5),ee)},s.inflateEnd=function(N){if(!N||!N.state)return m;var z=N.state;return z.window&&(z.window=null),N.state=null,h},s.inflateGetHeader=function(N,z){var S;return N&&N.state&&2&(S=N.state).wrap?((S.head=z).done=!1,h):m},s.inflateSetDictionary=function(N,z){var S,U=z.length;return N&&N.state?(S=N.state).wrap!==0&&S.mode!==11?m:S.mode===11&&i(1,z,U,0)!==S.check?-3:G(N,z,U,U)?(S.mode=31,-4):(S.havedict=1,h):m},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,s){var o=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,h,m,x,p,w,g){var v,b,_,C,j,T,R,A,O,G=g.bits,N=0,z=0,S=0,U=0,J=0,F=0,W=0,I=0,X=0,$=0,B=null,he=0,se=new o.Buf16(16),oe=new o.Buf16(16),Oe=null,me=0;for(N=0;N<=15;N++)se[N]=0;for(z=0;z<m;z++)se[f[h+z]]++;for(J=G,U=15;1<=U&&se[U]===0;U--);if(U<J&&(J=U),U===0)return x[p++]=20971520,x[p++]=20971520,g.bits=1,0;for(S=1;S<U&&se[S]===0;S++);for(J<S&&(J=S),N=I=1;N<=15;N++)if(I<<=1,(I-=se[N])<0)return-1;if(0<I&&(d===0||U!==1))return-1;for(oe[1]=0,N=1;N<15;N++)oe[N+1]=oe[N]+se[N];for(z=0;z<m;z++)f[h+z]!==0&&(w[oe[f[h+z]]++]=z);if(T=d===0?(B=Oe=w,19):d===1?(B=i,he-=257,Oe=a,me-=257,256):(B=c,Oe=u,-1),N=S,j=p,W=z=$=0,_=-1,C=(X=1<<(F=J))-1,d===1&&852<X||d===2&&592<X)return 1;for(;;){for(R=N-W,O=w[z]<T?(A=0,w[z]):w[z]>T?(A=Oe[me+w[z]],B[he+w[z]]):(A=96,0),v=1<<N-W,S=b=1<<F;x[j+($>>W)+(b-=v)]=R<<24|A<<16|O|0,b!==0;);for(v=1<<N-1;$&v;)v>>=1;if(v!==0?($&=v-1,$+=v):$=0,z++,--se[N]==0){if(N===U)break;N=f[h+w[z]]}if(J<N&&($&C)!==_){for(W===0&&(W=J),j+=S,I=1<<(F=N-W);F+W<U&&!((I-=se[F+W])<=0);)F++,I<<=1;if(X+=1<<F,d===1&&852<X||d===2&&592<X)return 1;x[_=$&C]=J<<24|F<<16|j-p|0}}return $!==0&&(x[j+$]=N-W<<24|64<<16|0),g.bits=J,0}},{"../utils/common":41}],51:[function(n,r,s){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,s){var o=n("../utils/common"),i=0,a=1;function c(k){for(var P=k.length;0<=--P;)k[P]=0}var u=0,d=29,f=256,h=f+1+d,m=30,x=19,p=2*h+1,w=15,g=16,v=7,b=256,_=16,C=17,j=18,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(h+2));c(G);var N=new Array(2*m);c(N);var z=new Array(512);c(z);var S=new Array(256);c(S);var U=new Array(d);c(U);var J,F,W,I=new Array(m);function X(k,P,M,K,L){this.static_tree=k,this.extra_bits=P,this.extra_base=M,this.elems=K,this.max_length=L,this.has_stree=k&&k.length}function $(k,P){this.dyn_tree=k,this.max_code=0,this.stat_desc=P}function B(k){return k<256?z[k]:z[256+(k>>>7)]}function he(k,P){k.pending_buf[k.pending++]=255&P,k.pending_buf[k.pending++]=P>>>8&255}function se(k,P,M){k.bi_valid>g-M?(k.bi_buf|=P<<k.bi_valid&65535,he(k,k.bi_buf),k.bi_buf=P>>g-k.bi_valid,k.bi_valid+=M-g):(k.bi_buf|=P<<k.bi_valid&65535,k.bi_valid+=M)}function oe(k,P,M){se(k,M[2*P],M[2*P+1])}function Oe(k,P){for(var M=0;M|=1&k,k>>>=1,M<<=1,0<--P;);return M>>>1}function me(k,P,M){var K,L,Y=new Array(w+1),Q=0;for(K=1;K<=w;K++)Y[K]=Q=Q+M[K-1]<<1;for(L=0;L<=P;L++){var te=k[2*L+1];te!==0&&(k[2*L]=Oe(Y[te]++,te))}}function we(k){var P;for(P=0;P<h;P++)k.dyn_ltree[2*P]=0;for(P=0;P<m;P++)k.dyn_dtree[2*P]=0;for(P=0;P<x;P++)k.bl_tree[2*P]=0;k.dyn_ltree[2*b]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function Te(k){8<k.bi_valid?he(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function Fe(k,P,M,K){var L=2*P,Y=2*M;return k[L]<k[Y]||k[L]===k[Y]&&K[P]<=K[M]}function Ie(k,P,M){for(var K=k.heap[M],L=M<<1;L<=k.heap_len&&(L<k.heap_len&&Fe(P,k.heap[L+1],k.heap[L],k.depth)&&L++,!Fe(P,K,k.heap[L],k.depth));)k.heap[M]=k.heap[L],M=L,L<<=1;k.heap[M]=K}function Re(k,P,M){var K,L,Y,Q,te=0;if(k.last_lit!==0)for(;K=k.pending_buf[k.d_buf+2*te]<<8|k.pending_buf[k.d_buf+2*te+1],L=k.pending_buf[k.l_buf+te],te++,K===0?oe(k,L,P):(oe(k,(Y=S[L])+f+1,P),(Q=T[Y])!==0&&se(k,L-=U[Y],Q),oe(k,Y=B(--K),M),(Q=R[Y])!==0&&se(k,K-=I[Y],Q)),te<k.last_lit;);oe(k,b,P)}function st(k,P){var M,K,L,Y=P.dyn_tree,Q=P.stat_desc.static_tree,te=P.stat_desc.has_stree,ge=P.stat_desc.elems,Ke=-1;for(k.heap_len=0,k.heap_max=p,M=0;M<ge;M++)Y[2*M]!==0?(k.heap[++k.heap_len]=Ke=M,k.depth[M]=0):Y[2*M+1]=0;for(;k.heap_len<2;)Y[2*(L=k.heap[++k.heap_len]=Ke<2?++Ke:0)]=1,k.depth[L]=0,k.opt_len--,te&&(k.static_len-=Q[2*L+1]);for(P.max_code=Ke,M=k.heap_len>>1;1<=M;M--)Ie(k,Y,M);for(L=ge;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Ie(k,Y,1),K=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=K,Y[2*L]=Y[2*M]+Y[2*K],k.depth[L]=(k.depth[M]>=k.depth[K]?k.depth[M]:k.depth[K])+1,Y[2*M+1]=Y[2*K+1]=L,k.heap[1]=L++,Ie(k,Y,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function(Ue,Et){var nr,Yt,fs,ct,hs,ms,rr=Et.dyn_tree,vu=Et.max_code,xu=Et.stat_desc.static_tree,Di=Et.stat_desc.has_stree,wu=Et.stat_desc.extra_bits,Oi=Et.stat_desc.extra_base,$r=Et.stat_desc.max_length,Xs=0;for(ct=0;ct<=w;ct++)Ue.bl_count[ct]=0;for(rr[2*Ue.heap[Ue.heap_max]+1]=0,nr=Ue.heap_max+1;nr<p;nr++)$r<(ct=rr[2*rr[2*(Yt=Ue.heap[nr])+1]+1]+1)&&(ct=$r,Xs++),rr[2*Yt+1]=ct,vu<Yt||(Ue.bl_count[ct]++,hs=0,Oi<=Yt&&(hs=wu[Yt-Oi]),ms=rr[2*Yt],Ue.opt_len+=ms*(ct+hs),Di&&(Ue.static_len+=ms*(xu[2*Yt+1]+hs)));if(Xs!==0){do{for(ct=$r-1;Ue.bl_count[ct]===0;)ct--;Ue.bl_count[ct]--,Ue.bl_count[ct+1]+=2,Ue.bl_count[$r]--,Xs-=2}while(0<Xs);for(ct=$r;ct!==0;ct--)for(Yt=Ue.bl_count[ct];Yt!==0;)vu<(fs=Ue.heap[--nr])||(rr[2*fs+1]!==ct&&(Ue.opt_len+=(ct-rr[2*fs+1])*rr[2*fs],rr[2*fs+1]=ct),Yt--)}}(k,P),me(Y,Ke,k.bl_count)}function E(k,P,M){var K,L,Y=-1,Q=P[1],te=0,ge=7,Ke=4;for(Q===0&&(ge=138,Ke=3),P[2*(M+1)+1]=65535,K=0;K<=M;K++)L=Q,Q=P[2*(K+1)+1],++te<ge&&L===Q||(te<Ke?k.bl_tree[2*L]+=te:L!==0?(L!==Y&&k.bl_tree[2*L]++,k.bl_tree[2*_]++):te<=10?k.bl_tree[2*C]++:k.bl_tree[2*j]++,Y=L,Ke=(te=0)===Q?(ge=138,3):L===Q?(ge=6,3):(ge=7,4))}function ee(k,P,M){var K,L,Y=-1,Q=P[1],te=0,ge=7,Ke=4;for(Q===0&&(ge=138,Ke=3),K=0;K<=M;K++)if(L=Q,Q=P[2*(K+1)+1],!(++te<ge&&L===Q)){if(te<Ke)for(;oe(k,L,k.bl_tree),--te!=0;);else L!==0?(L!==Y&&(oe(k,L,k.bl_tree),te--),oe(k,_,k.bl_tree),se(k,te-3,2)):te<=10?(oe(k,C,k.bl_tree),se(k,te-3,3)):(oe(k,j,k.bl_tree),se(k,te-11,7));Y=L,Ke=(te=0)===Q?(ge=138,3):L===Q?(ge=6,3):(ge=7,4)}}c(I);var Z=!1;function D(k,P,M,K){se(k,(u<<1)+(K?1:0),3),function(L,Y,Q,te){Te(L),he(L,Q),he(L,~Q),o.arraySet(L.pending_buf,L.window,Y,Q,L.pending),L.pending+=Q}(k,P,M)}s._tr_init=function(k){Z||(function(){var P,M,K,L,Y,Q=new Array(w+1);for(L=K=0;L<d-1;L++)for(U[L]=K,P=0;P<1<<T[L];P++)S[K++]=L;for(S[K-1]=L,L=Y=0;L<16;L++)for(I[L]=Y,P=0;P<1<<R[L];P++)z[Y++]=L;for(Y>>=7;L<m;L++)for(I[L]=Y<<7,P=0;P<1<<R[L]-7;P++)z[256+Y++]=L;for(M=0;M<=w;M++)Q[M]=0;for(P=0;P<=143;)G[2*P+1]=8,P++,Q[8]++;for(;P<=255;)G[2*P+1]=9,P++,Q[9]++;for(;P<=279;)G[2*P+1]=7,P++,Q[7]++;for(;P<=287;)G[2*P+1]=8,P++,Q[8]++;for(me(G,h+1,Q),P=0;P<m;P++)N[2*P+1]=5,N[2*P]=Oe(P,5);J=new X(G,T,f+1,h,w),F=new X(N,R,0,m,w),W=new X(new Array(0),A,0,x,v)}(),Z=!0),k.l_desc=new $(k.dyn_ltree,J),k.d_desc=new $(k.dyn_dtree,F),k.bl_desc=new $(k.bl_tree,W),k.bi_buf=0,k.bi_valid=0,we(k)},s._tr_stored_block=D,s._tr_flush_block=function(k,P,M,K){var L,Y,Q=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=function(te){var ge,Ke=4093624447;for(ge=0;ge<=31;ge++,Ke>>>=1)if(1&Ke&&te.dyn_ltree[2*ge]!==0)return i;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return a;for(ge=32;ge<f;ge++)if(te.dyn_ltree[2*ge]!==0)return a;return i}(k)),st(k,k.l_desc),st(k,k.d_desc),Q=function(te){var ge;for(E(te,te.dyn_ltree,te.l_desc.max_code),E(te,te.dyn_dtree,te.d_desc.max_code),st(te,te.bl_desc),ge=x-1;3<=ge&&te.bl_tree[2*O[ge]+1]===0;ge--);return te.opt_len+=3*(ge+1)+5+5+4,ge}(k),L=k.opt_len+3+7>>>3,(Y=k.static_len+3+7>>>3)<=L&&(L=Y)):L=Y=M+5,M+4<=L&&P!==-1?D(k,P,M,K):k.strategy===4||Y===L?(se(k,2+(K?1:0),3),Re(k,G,N)):(se(k,4+(K?1:0),3),function(te,ge,Ke,Ue){var Et;for(se(te,ge-257,5),se(te,Ke-1,5),se(te,Ue-4,4),Et=0;Et<Ue;Et++)se(te,te.bl_tree[2*O[Et]+1],3);ee(te,te.dyn_ltree,ge-1),ee(te,te.dyn_dtree,Ke-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Re(k,k.dyn_ltree,k.dyn_dtree)),we(k),K&&Te(k)},s._tr_tally=function(k,P,M){return k.pending_buf[k.d_buf+2*k.last_lit]=P>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&P,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,P===0?k.dyn_ltree[2*M]++:(k.matches++,P--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(P)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){se(k,2,3),oe(k,b,G),function(P){P.bi_valid===16?(he(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):8<=P.bi_valid&&(P.pending_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=8,P.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(n,r,s){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,s){(function(o){(function(i,a){if(!i.setImmediate){var c,u,d,f,h=1,m={},x=!1,p=i.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(i);w=w&&w.setTimeout?w:i,c={}.toString.call(i.process)==="[object process]"?function(_){process.nextTick(function(){v(_)})}:function(){if(i.postMessage&&!i.importScripts){var _=!0,C=i.onmessage;return i.onmessage=function(){_=!1},i.postMessage("","*"),i.onmessage=C,_}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",b,!1):i.attachEvent("onmessage",b),function(_){i.postMessage(f+_,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){v(_.data)},function(_){d.port2.postMessage(_)}):p&&"onreadystatechange"in p.createElement("script")?(u=p.documentElement,function(_){var C=p.createElement("script");C.onreadystatechange=function(){v(_),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(_){setTimeout(v,0,_)},w.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),j=0;j<C.length;j++)C[j]=arguments[j+1];var T={callback:_,args:C};return m[h]=T,c(h),h++},w.clearImmediate=g}function g(_){delete m[_]}function v(_){if(x)setTimeout(v,0,_);else{var C=m[_];if(C){x=!0;try{(function(j){var T=j.callback,R=j.args;switch(R.length){case 0:T();break;case 1:T(R[0]);break;case 2:T(R[0],R[1]);break;case 3:T(R[0],R[1],R[2]);break;default:T.apply(a,R)}})(C)}finally{g(_),x=!1}}}}function b(_){_.source===i&&typeof _.data=="string"&&_.data.indexOf(f)===0&&v(+_.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(yN);var WU=yN.exports;const HU=Uf(WU);function YU(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const KU=async(e,t)=>{const n=new HU;t.forEach(o=>{n.file(o.name,o.content)});const r=await n.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,s.click()},za=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},GU=e=>za(e).split(" ")[0];function vN(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${o}:${i}:${a}`}const ZU=async e=>{const t=ot();let n=1;e.page&&(n=e.page);let r=2;e.perPage&&(r=e.perPage);let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=t.filter("expiredAt<{:expiredAt}",{expiredAt:vN(15)})),t.collection("domains").getList(n,r,{sort:"-created",expand:"lastDeployment",filter:s})},qU=async()=>{const e=ot(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:vN(15)})}),r=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:n.totalItems,enabled:r.totalItems,disabled:s.totalItems}},XU=async e=>await ot().collection("domains").getOne(e),mf=async e=>e.id?await ot().collection("domains").update(e.id,e):await ot().collection("domains").create(e),QU=async e=>await ot().collection("domains").delete(e),JU=(e,t)=>ot().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),e8=e=>{ot().collection("domains").unsubscribe(e)},t8=()=>{const e=Fr(),t=er(),{t:n}=Ye(),r=Mr(),s=new URLSearchParams(r.search),o=s.get("page"),i=s.get("state"),[a,c]=y.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},m=async _=>{try{await QU(_),p(x.filter(C=>C.id!==_))}catch(C){console.error("Error deleting domain:",C)}},[x,p]=y.useState([]);y.useEffect(()=>{(async()=>{const C=await ZU({page:o?Number(o):1,perPage:10,state:i||""});p(C.items),c(C.totalPages)})()},[o,i]);const w=async _=>{const C=x.filter(A=>A.id===_),j=C[0].enabled,T=C[0];T.enabled=!j,await mf(T);const R=x.map(A=>A.id===_?{...A,checked:!j}:A);p(R)},g=async _=>{try{e8(_.id??""),JU(_.id??"",C=>{const j=x.map(T=>T.id===C.id?{...C}:T);p(j)}),_.rightnow=!0,await mf(_),e.toast({title:n("domain.deploy.started.message"),description:n("domain.deploy.started.tips")})}catch{e.toast({title:n("domain.deploy.failed.message"),description:l.jsxs(YO,{i18nKey:"domain.deploy.failed.tips",children:["text1",l.jsx(wn,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},v=async _=>{await g({..._,deployed:!1})},b=async _=>{const C=`${_.id}-${_.domain}.zip`,j=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await KU(C,j)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Rx,{}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:n("domain.page.title")}),l.jsx(Me,{onClick:u,children:n("domain.add")})]}),x.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-36",children:n("common.text.domain")}),l.jsx("div",{className:"w-40",children:n("domain.props.expiry")}),l.jsx("div",{className:"w-32",children:n("domain.props.last_execution_status")}),l.jsx("div",{className:"w-64",children:n("domain.props.last_execution_stage")}),l.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.props.last_execution_time")}),l.jsx("div",{className:"w-24",children:n("domain.props.enable")}),l.jsx("div",{className:"grow",children:n("common.text.operations")})]}),x.map(_=>{var C,j,T,R;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate",children:_.domain.split(";").map(A=>l.jsxs(l.Fragment,{children:[A,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx("div",{children:_.expiredAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:n("domain.props.expiry.date1",{date:90})}),l.jsx("div",{children:n("domain.props.expiry.date2",{date:GU(_.expiredAt)})})]}):"---"})}),l.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?l.jsx(l.Fragment,{children:l.jsx(Sx,{deployment:_.expand.lastDeployment})}):"---"}),l.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?l.jsx(_x,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(R=_.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),l.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?za(_.lastDeployedAt):"---"}),l.jsx("div",{className:"sm:w-24 flex items-center",children:l.jsx(wx,{children:l.jsxs(mE,{children:[l.jsx(pE,{children:l.jsx(mu,{checked:_.enabled,onCheckedChange:()=>{w(_.id??"")}})}),l.jsx(bx,{children:l.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("domain.props.enable.disabled"):n("domain.props.enable.enabled")})})]})})}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>h(_.id??""),children:n("domain.history")}),l.jsxs(dr,{when:!!_.enabled,children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>g(_),children:n("domain.deploy")})]}),l.jsxs(dr,{when:!!(_.enabled&&_.deployed),children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>v(_),children:n("domain.deploy_forced")})]}),l.jsxs(dr,{when:!!_.expiredAt,children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("common.download")})]}),!_.enabled&&l.jsxs(l.Fragment,{children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(kx,{children:[l.jsx(Cx,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:n("common.delete")})}),l.jsxs(Mh,{children:[l.jsxs(Lh,{children:[l.jsx(Fh,{children:n("domain.delete")}),l.jsx($h,{children:n("domain.delete.confirm")})]}),l.jsxs(zh,{children:[l.jsx(Vh,{children:n("common.cancel")}),l.jsx(Uh,{onClick:()=>{m(_.id??"")},children:n("common.confirm")})]})]})]}),l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>f(_.id??""),children:n("common.edit")})]})]})]},_.id)}),l.jsx(bE,{totalPages:a,currentPage:o?Number(o):1,onPageChange:_=>{d(_)}})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(pg,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.nodata")}),l.jsx(Me,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})};var pu=e=>e.type==="checkbox",da=e=>e instanceof Date,_n=e=>e==null;const xN=e=>typeof e=="object";var Xt=e=>!_n(e)&&!Array.isArray(e)&&xN(e)&&!da(e),wN=e=>Xt(e)&&e.target?pu(e.target)?e.target.checked:e.target.value:e,n8=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bN=(e,t)=>e.has(n8(t)),r8=e=>{const t=e.constructor&&e.constructor.prototype;return Xt(t)&&t.hasOwnProperty("isPrototypeOf")},Ax=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Tn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ax&&(e instanceof Blob||e instanceof FileList))&&(n||Xt(e)))if(t=n?[]:{},!n&&!r8(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Tn(e[r]));else return e;return t}var Hh=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,de=(e,t,n)=>{if(!t||!Xt(e))return n;const r=Hh(t.split(/[,[\].]+?/)).reduce((s,o)=>_n(s)?s:s[o],e);return Ft(r)||r===e?Ft(e[t])?n:e[t]:r},Kr=e=>typeof e=="boolean",Dx=e=>/^\w*$/.test(e),_N=e=>Hh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{let r=-1;const s=Dx(t)?[t]:_N(t),o=s.length,i=o-1;for(;++r<o;){const a=s[r];let c=n;if(r!==i){const u=e[a];c=Xt(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;e[a]=c,e=e[a]}return e};const pf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Sr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},vs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},SN=We.createContext(null),Yh=()=>We.useContext(SN),s8=e=>{const{children:t,...n}=e;return We.createElement(SN.Provider,{value:n},t)};var kN=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Sr.all&&(t._proxyFormState[i]=!r||Sr.all),n&&(n[i]=!0),e[i]}});return s},zn=e=>Xt(e)&&!Object.keys(e).length,CN=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return zn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Sr.all))},ec=e=>Array.isArray(e)?e:[e],jN=(e,t,n)=>!e||!t||e===t||ec(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Ox(e){const t=We.useRef(e);t.current=e,We.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function o8(e){const t=Yh(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=We.useState(n._formState),c=We.useRef(!0),u=We.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=We.useRef(s);return d.current=s,Ox({disabled:r,next:f=>c.current&&jN(d.current,f.name,o)&&CN(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),We.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),kN(i,n,u.current,!1)}var Zr=e=>typeof e=="string",EN=(e,t,n,r,s)=>Zr(e)?(r&&t.watch.add(e),de(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),de(n,o))):(r&&(t.watchAll=!0),n);function i8(e){const t=Yh(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=We.useRef(r);a.current=r,Ox({disabled:o,subject:n._subjects.values,next:d=>{jN(a.current,d.name,i)&&u(Tn(EN(a.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=We.useState(n._getWatch(r,s));return We.useEffect(()=>n._removeUnmounted()),c}function a8(e){const t=Yh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=bN(s._names.array,n),a=i8({control:s,name:n,defaultValue:de(s._formValues,n,de(s._defaultValues,n,e.defaultValue)),exact:!0}),c=o8({control:s,name:n}),u=We.useRef(s.register(n,{...e.rules,value:a,...Kr(e.disabled)?{disabled:e.disabled}:{}}));return We.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(h,m)=>{const x=de(s._fields,h);x&&x._f&&(x._f.mount=m)};if(f(n,!0),d){const h=Tn(de(s._options.defaultValues,n));mt(s._defaultValues,n,h),Ft(de(s._formValues,n))&&mt(s._formValues,n,h)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),We.useEffect(()=>{de(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:de(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Kr(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:We.useCallback(d=>u.current.onChange({target:{value:wN(d),name:n},type:pf.CHANGE}),[n]),onBlur:We.useCallback(()=>u.current.onBlur({target:{value:de(s._formValues,n),name:n},type:pf.BLUR}),[n,s]),ref:d=>{const f=de(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!de(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!de(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!de(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!de(c.validatingFields,n)},error:{enumerable:!0,get:()=>de(c.errors,n)}})}}const l8=e=>e.render(a8(e));var NN=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Mb=e=>({isOnSubmit:!e||e===Sr.onSubmit,isOnBlur:e===Sr.onBlur,isOnChange:e===Sr.onChange,isOnAll:e===Sr.all,isOnTouch:e===Sr.onTouched}),Lb=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const tc=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=de(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;tc(a,t)}else Xt(a)&&tc(a,t)}}};var c8=(e,t,n)=>{const r=ec(de(e,n));return mt(r,"root",t[n]),mt(e,n,r),e},Ix=e=>e.type==="file",mo=e=>typeof e=="function",gf=e=>{if(!Ax)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jd=e=>Zr(e),Mx=e=>e.type==="radio",yf=e=>e instanceof RegExp;const zb={value:!1,isValid:!1},Fb={value:!0,isValid:!0};var TN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?Fb:{value:e[0].value,isValid:!0}:Fb:zb}return zb};const $b={isValid:!1,value:null};var PN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,$b):$b;function Ub(e,t,n="validate"){if(jd(e)||Array.isArray(e)&&e.every(jd)||Kr(e)&&!e)return{type:n,message:jd(e)?e:"",ref:t}}var Wi=e=>Xt(e)&&!yf(e)?e:{value:e,message:""},Vb=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:m,name:x,valueAsNumber:p,mount:w,disabled:g}=e._f,v=de(t,x);if(!w||g)return{};const b=i?i[0]:o,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(Kr(N)?"":N||""),b.reportValidity())},C={},j=Mx(o),T=pu(o),R=j||T,A=(p||Ix(o))&&Ft(o.value)&&Ft(v)||gf(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,O=NN.bind(null,x,n,C),G=(N,z,S,U=vs.maxLength,J=vs.minLength)=>{const F=N?z:S;C[x]={type:N?U:J,message:F,ref:o,...O(N?U:J,F)}};if(s?!Array.isArray(v)||!v.length:a&&(!R&&(A||_n(v))||Kr(v)&&!v||T&&!TN(i).isValid||j&&!PN(i).isValid)){const{value:N,message:z}=jd(a)?{value:!!a,message:a}:Wi(a);if(N&&(C[x]={type:vs.required,message:z,ref:b,...O(vs.required,z)},!n))return _(z),C}if(!A&&(!_n(d)||!_n(f))){let N,z;const S=Wi(f),U=Wi(d);if(!_n(v)&&!isNaN(v)){const J=o.valueAsNumber||v&&+v;_n(S.value)||(N=J>S.value),_n(U.value)||(z=J<U.value)}else{const J=o.valueAsDate||new Date(v),F=X=>new Date(new Date().toDateString()+" "+X),W=o.type=="time",I=o.type=="week";Zr(S.value)&&v&&(N=W?F(v)>F(S.value):I?v>S.value:J>new Date(S.value)),Zr(U.value)&&v&&(z=W?F(v)<F(U.value):I?v<U.value:J<new Date(U.value))}if((N||z)&&(G(!!N,S.message,U.message,vs.max,vs.min),!n))return _(C[x].message),C}if((c||u)&&!A&&(Zr(v)||s&&Array.isArray(v))){const N=Wi(c),z=Wi(u),S=!_n(N.value)&&v.length>+N.value,U=!_n(z.value)&&v.length<+z.value;if((S||U)&&(G(S,N.message,z.message),!n))return _(C[x].message),C}if(h&&!A&&Zr(v)){const{value:N,message:z}=Wi(h);if(yf(N)&&!v.match(N)&&(C[x]={type:vs.pattern,message:z,ref:o,...O(vs.pattern,z)},!n))return _(z),C}if(m){if(mo(m)){const N=await m(v,t),z=Ub(N,b);if(z&&(C[x]={...z,...O(vs.validate,z.message)},!n))return _(z.message),C}else if(Xt(m)){let N={};for(const z in m){if(!zn(N)&&!n)break;const S=Ub(await m[z](v,t),b,z);S&&(N={...S,...O(z,S.message)},_(S.message),n&&(C[x]=N))}if(!zn(N)&&(C[x]={ref:b,...N},!n))return C}}return _(!0),C};function u8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ft(e)?r++:e[t[r++]];return e}function d8(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function Kt(e,t){const n=Array.isArray(t)?t:Dx(t)?[t]:_N(t),r=n.length===1?e:u8(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(Xt(r)&&zn(r)||Array.isArray(r)&&d8(r))&&Kt(e,n.slice(0,-1)),e}var ap=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},vf=e=>_n(e)||!xN(e);function Jo(e,t){if(vf(e)||vf(t))return e===t;if(da(e)&&da(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(da(o)&&da(i)||Xt(o)&&Xt(i)||Array.isArray(o)&&Array.isArray(i)?!Jo(o,i):o!==i)return!1}}return!0}var RN=e=>e.type==="select-multiple",f8=e=>Mx(e)||pu(e),lp=e=>gf(e)&&e.isConnected,AN=e=>{for(const t in e)if(mo(e[t]))return!0;return!1};function xf(e,t={}){const n=Array.isArray(e);if(Xt(e)||n)for(const r in e)Array.isArray(e[r])||Xt(e[r])&&!AN(e[r])?(t[r]=Array.isArray(e[r])?[]:{},xf(e[r],t[r])):_n(e[r])||(t[r]=!0);return t}function DN(e,t,n){const r=Array.isArray(e);if(Xt(e)||r)for(const s in e)Array.isArray(e[s])||Xt(e[s])&&!AN(e[s])?Ft(t)||vf(n[s])?n[s]=Array.isArray(e[s])?xf(e[s],[]):{...xf(e[s])}:DN(e[s],_n(t)?{}:t[s],n[s]):n[s]=!Jo(e[s],t[s]);return n}var nd=(e,t)=>DN(e,t,xf(t)),ON=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ft(e)?e:t?e===""?NaN:e&&+e:n&&Zr(e)?new Date(e):r?r(e):e;function cp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ix(t)?t.files:Mx(t)?PN(e.refs).value:RN(t)?[...t.selectedOptions].map(({value:n})=>n):pu(t)?TN(e.refs).value:ON(Ft(t.value)?e.ref.value:t.value,e)}var h8=(e,t,n,r)=>{const s={};for(const o of e){const i=de(t,o);i&&mt(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},El=e=>Ft(e)?e:yf(e)?e.source:Xt(e)?yf(e.value)?e.value.source:e.value:e,m8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Bb(e,t,n){const r=de(e,n);if(r||Dx(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=de(t,o),a=de(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var p8=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,g8=(e,t)=>!Hh(de(e,t)).length&&Kt(e,t);const y8={mode:Sr.onSubmit,reValidateMode:Sr.onChange,shouldFocusError:!0};function v8(e={}){let t={...y8,...e},n={submitCount:0,isDirty:!1,isLoading:mo(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Xt(t.defaultValues)||Xt(t.values)?Tn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Tn(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:ap(),array:ap(),state:ap()},h=Mb(t.mode),m=Mb(t.reValidateMode),x=t.criteriaMode===Sr.all,p=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},w=async k=>{if(d.isValid||k){const P=t.resolver?zn((await R()).errors):await O(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},g=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(M=>{M&&(P?mt(n.validatingFields,M,P):Kt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!zn(n.validatingFields)}))},v=(k,P=[],M,K,L=!0,Y=!0)=>{if(K&&M){if(i.action=!0,Y&&Array.isArray(de(r,k))){const Q=M(de(r,k),K.argA,K.argB);L&&mt(r,k,Q)}if(Y&&Array.isArray(de(n.errors,k))){const Q=M(de(n.errors,k),K.argA,K.argB);L&&mt(n.errors,k,Q),g8(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(de(n.touchedFields,k))){const Q=M(de(n.touchedFields,k),K.argA,K.argB);L&&mt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=nd(s,o)),f.state.next({name:k,isDirty:N(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else mt(o,k,P)},b=(k,P)=>{mt(n.errors,k,P),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,P,M,K)=>{const L=de(r,k);if(L){const Y=de(o,k,Ft(M)?de(s,k):M);Ft(Y)||K&&K.defaultChecked||P?mt(o,k,P?Y:cp(L._f)):U(k,Y),i.mount&&w()}},j=(k,P,M,K,L)=>{let Y=!1,Q=!1;const te={name:k},ge=!!(de(r,k)&&de(r,k)._f&&de(r,k)._f.disabled);if(!M||K){d.isDirty&&(Q=n.isDirty,n.isDirty=te.isDirty=N(),Y=Q!==te.isDirty);const Ke=ge||Jo(de(s,k),P);Q=!!(!ge&&de(n.dirtyFields,k)),Ke||ge?Kt(n.dirtyFields,k):mt(n.dirtyFields,k,!0),te.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&Q!==!Ke}if(M){const Ke=de(n.touchedFields,k);Ke||(mt(n.touchedFields,k,M),te.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&Ke!==M)}return Y&&L&&f.state.next(te),Y?te:{}},T=(k,P,M,K)=>{const L=de(n.errors,k),Y=d.isValid&&Kr(P)&&n.isValid!==P;if(e.delayError&&M?(c=p(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?mt(n.errors,k,M):Kt(n.errors,k)),(M?!Jo(L,M):L)||!zn(K)||Y){const Q={...K,...Y&&Kr(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},R=async k=>{g(k,!0);const P=await t.resolver(o,t.context,h8(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return g(k),P},A=async k=>{const{errors:P}=await R(k);if(k)for(const M of k){const K=de(P,M);K?mt(n.errors,M,K):Kt(n.errors,M)}else n.errors=P;return P},O=async(k,P,M={valid:!0})=>{for(const K in k){const L=k[K];if(L){const{_f:Y,...Q}=L;if(Y){const te=a.array.has(Y.name);g([K],!0);const ge=await Vb(L,o,x,t.shouldUseNativeValidation&&!P,te);if(g([K]),ge[Y.name]&&(M.valid=!1,P))break;!P&&(de(ge,Y.name)?te?c8(n.errors,ge,Y.name):mt(n.errors,Y.name,ge[Y.name]):Kt(n.errors,Y.name))}Q&&await O(Q,P,M)}}return M.valid},G=()=>{for(const k of a.unMount){const P=de(r,k);P&&(P._f.refs?P._f.refs.every(M=>!lp(M)):!lp(P._f.ref))&&Oe(k)}a.unMount=new Set},N=(k,P)=>(k&&P&&mt(o,k,P),!Jo($(),s)),z=(k,P,M)=>EN(k,a,{...i.mount?o:Ft(P)?s:Zr(k)?{[k]:P}:P},M,P),S=k=>Hh(de(i.mount?o:s,k,e.shouldUnregister?de(s,k,[]):[])),U=(k,P,M={})=>{const K=de(r,k);let L=P;if(K){const Y=K._f;Y&&(!Y.disabled&&mt(o,k,ON(P,Y)),L=gf(Y.ref)&&_n(P)?"":P,RN(Y.ref)?[...Y.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):Y.refs?pu(Y.ref)?Y.refs.length>1?Y.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(te=>te===Q.value):L===Q.value)):Y.refs[0]&&(Y.refs[0].checked=!!L):Y.refs.forEach(Q=>Q.checked=Q.value===L):Ix(Y.ref)?Y.ref.value="":(Y.ref.value=L,Y.ref.type||f.values.next({name:k,values:{...o}})))}(M.shouldDirty||M.shouldTouch)&&j(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,P,M)=>{for(const K in P){const L=P[K],Y=`${k}.${K}`,Q=de(r,Y);(a.array.has(k)||!vf(L)||Q&&!Q._f)&&!da(L)?J(Y,L,M):U(Y,L,M)}},F=(k,P,M={})=>{const K=de(r,k),L=a.array.has(k),Y=Tn(P);mt(o,k,Y),L?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:nd(s,o),isDirty:N(k,Y)})):K&&!K._f&&!_n(Y)?J(k,Y,M):U(k,Y,M),Lb(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},W=async k=>{i.mount=!0;const P=k.target;let M=P.name,K=!0;const L=de(r,M),Y=()=>P.type?cp(L._f):wN(k),Q=te=>{K=Number.isNaN(te)||te===de(o,M,te)};if(L){let te,ge;const Ke=Y(),Ue=k.type===pf.BLUR||k.type===pf.FOCUS_OUT,Et=!m8(L._f)&&!t.resolver&&!de(n.errors,M)&&!L._f.deps||p8(Ue,de(n.touchedFields,M),n.isSubmitted,m,h),nr=Lb(M,a,Ue);mt(o,M,Ke),Ue?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Yt=j(M,Ke,Ue,!1),fs=!zn(Yt)||nr;if(!Ue&&f.values.next({name:M,type:k.type,values:{...o}}),Et)return d.isValid&&w(),fs&&f.state.next({name:M,...nr?{}:Yt});if(!Ue&&nr&&f.state.next({...n}),t.resolver){const{errors:ct}=await R([M]);if(Q(Ke),K){const hs=Bb(n.errors,r,M),ms=Bb(ct,r,hs.name||M);te=ms.error,M=ms.name,ge=zn(ct)}}else g([M],!0),te=(await Vb(L,o,x,t.shouldUseNativeValidation))[M],g([M]),Q(Ke),K&&(te?ge=!1:d.isValid&&(ge=await O(r,!0)));K&&(L._f.deps&&X(L._f.deps),T(M,ge,te,Yt))}},I=(k,P)=>{if(de(n.errors,P)&&k.focus)return k.focus(),1},X=async(k,P={})=>{let M,K;const L=ec(k);if(t.resolver){const Y=await A(Ft(k)?k:L);M=zn(Y),K=k?!L.some(Q=>de(Y,Q)):M}else k?(K=(await Promise.all(L.map(async Y=>{const Q=de(r,Y);return await O(Q&&Q._f?{[Y]:Q}:Q)}))).every(Boolean),!(!K&&!n.isValid)&&w()):K=M=await O(r);return f.state.next({...!Zr(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),P.shouldFocus&&!K&&tc(r,I,k?L:a.mount),K},$=k=>{const P={...i.mount?o:s};return Ft(k)?P:Zr(k)?de(P,k):k.map(M=>de(P,M))},B=(k,P)=>({invalid:!!de((P||n).errors,k),isDirty:!!de((P||n).dirtyFields,k),error:de((P||n).errors,k),isValidating:!!de(n.validatingFields,k),isTouched:!!de((P||n).touchedFields,k)}),he=k=>{k&&ec(k).forEach(P=>Kt(n.errors,P)),f.state.next({errors:k?n.errors:{}})},se=(k,P,M)=>{const K=(de(r,k,{_f:{}})._f||{}).ref,L=de(n.errors,k)||{},{ref:Y,message:Q,type:te,...ge}=L;mt(n.errors,k,{...ge,...P,ref:K}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&K&&K.focus&&K.focus()},oe=(k,P)=>mo(k)?f.values.subscribe({next:M=>k(z(void 0,P),M)}):z(k,P,!0),Oe=(k,P={})=>{for(const M of k?ec(k):a.mount)a.mount.delete(M),a.array.delete(M),P.keepValue||(Kt(r,M),Kt(o,M)),!P.keepError&&Kt(n.errors,M),!P.keepDirty&&Kt(n.dirtyFields,M),!P.keepTouched&&Kt(n.touchedFields,M),!P.keepIsValidating&&Kt(n.validatingFields,M),!t.shouldUnregister&&!P.keepDefaultValue&&Kt(s,M);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:N()}:{}}),!P.keepIsValid&&w()},me=({disabled:k,name:P,field:M,fields:K,value:L})=>{if(Kr(k)&&i.mount||k){const Y=k?void 0:Ft(L)?cp(M?M._f:de(K,P)._f):L;mt(o,P,Y),j(P,Y,!1,!1,!0)}},we=(k,P={})=>{let M=de(r,k);const K=Kr(P.disabled);return mt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),M?me({field:M,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...K?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:El(P.min),max:El(P.max),minLength:El(P.minLength),maxLength:El(P.maxLength),pattern:El(P.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){we(k,P),M=de(r,k);const Y=Ft(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=f8(Y),te=M._f.refs||[];if(Q?te.find(ge=>ge===Y):Y===M._f.ref)return;mt(r,k,{_f:{...M._f,...Q?{refs:[...te.filter(lp),Y,...Array.isArray(de(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else M=de(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(bN(a.array,k)&&i.action)&&a.unMount.add(k)}}},Te=()=>t.shouldFocusError&&tc(r,I,a.mount),Fe=k=>{Kr(k)&&(f.state.next({disabled:k}),tc(r,(P,M)=>{const K=de(r,M);K&&(P.disabled=K._f.disabled||k,Array.isArray(K._f.refs)&&K._f.refs.forEach(L=>{L.disabled=K._f.disabled||k}))},0,!1))},Ie=(k,P)=>async M=>{let K;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Tn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:Q}=await R();n.errors=Y,L=Q}else await O(r);if(Kt(n.errors,"root"),zn(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(Y){K=Y}}else P&&await P({...n.errors},M),Te(),setTimeout(Te);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:zn(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},Re=(k,P={})=>{de(r,k)&&(Ft(P.defaultValue)?F(k,Tn(de(s,k))):(F(k,P.defaultValue),mt(s,k,Tn(P.defaultValue))),P.keepTouched||Kt(n.touchedFields,k),P.keepDirty||(Kt(n.dirtyFields,k),n.isDirty=P.defaultValue?N(k,Tn(de(s,k))):N()),P.keepError||(Kt(n.errors,k),d.isValid&&w()),f.state.next({...n}))},st=(k,P={})=>{const M=k?Tn(k):s,K=Tn(M),L=zn(k),Y=L?s:K;if(P.keepDefaultValues||(s=M),!P.keepValues){if(P.keepDirtyValues)for(const Q of a.mount)de(n.dirtyFields,Q)?mt(Y,Q,de(o,Q)):F(Q,de(Y,Q));else{if(Ax&&Ft(k))for(const Q of a.mount){const te=de(r,Q);if(te&&te._f){const ge=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(gf(ge)){const Ke=ge.closest("form");if(Ke){Ke.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?Tn(s):{}:Tn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:L?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!Jo(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:P.keepDirtyValues?P.keepDefaultValues&&o?nd(s,o):n.dirtyFields:P.keepDefaultValues&&k?nd(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,P)=>st(mo(k)?k(o):k,P);return{control:{register:we,unregister:Oe,getFieldState:B,handleSubmit:Ie,setError:se,_executeSchema:R,_getWatch:z,_getDirty:N,_updateValid:w,_removeUnmounted:G,_updateFieldArray:v,_updateDisabledField:me,_getFieldArray:S,_reset:st,_resetDefaultValues:()=>mo(t.defaultValues)&&t.defaultValues().then(k=>{E(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:we,handleSubmit:Ie,watch:oe,setValue:F,getValues:$,reset:E,resetField:Re,clearErrors:he,unregister:Oe,setError:se,setFocus:(k,P={})=>{const M=de(r,k),K=M&&M._f;if(K){const L=K.refs?K.refs[0]:K.ref;L.focus&&(L.focus(),P.shouldSelect&&L.select())}},getFieldState:B}}function cn(e={}){const t=We.useRef(),n=We.useRef(),[r,s]=We.useState({isDirty:!1,isValidating:!1,isLoading:mo(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:mo(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...v8(e),formState:r});const o=t.current.control;return o._options=e,Ox({subject:o._subjects.state,next:i=>{CN(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),We.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),We.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),We.useEffect(()=>{e.values&&!Jo(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),We.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),We.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),We.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=kN(r,o),t.current}var it;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(it||(it={}));var Lg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Lg||(Lg={}));const Se=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lo=e=>{switch(typeof e){case"undefined":return Se.undefined;case"string":return Se.string;case"number":return isNaN(e)?Se.nan:Se.number;case"boolean":return Se.boolean;case"function":return Se.function;case"bigint":return Se.bigint;case"symbol":return Se.symbol;case"object":return Array.isArray(e)?Se.array:e===null?Se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Se.promise:typeof Map<"u"&&e instanceof Map?Se.map:typeof Set<"u"&&e instanceof Set?Se.set:typeof Date<"u"&&e instanceof Date?Se.date:Se.object;default:return Se.unknown}},le=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),x8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Kn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof Kn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Kn.create=e=>new Kn(e);const Fa=(e,t)=>{let n;switch(e.code){case le.invalid_type:e.received===Se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case le.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case le.invalid_union:n="Invalid input";break;case le.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case le.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case le.invalid_arguments:n="Invalid function arguments";break;case le.invalid_return_type:n="Invalid function return type";break;case le.invalid_date:n="Invalid date";break;case le.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case le.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case le.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case le.custom:n="Invalid input";break;case le.invalid_intersection_types:n="Intersection results could not be merged";break;case le.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case le.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let IN=Fa;function w8(e){IN=e}function wf(){return IN}const bf=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},b8=[];function ve(e,t){const n=wf(),r=bf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Fa?void 0:Fa].filter(s=>!!s)});e.common.issues.push(r)}class yn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return He;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return He;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),fa=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),zg=e=>e.status==="aborted",Fg=e=>e.status==="dirty",Rc=e=>e.status==="valid",Ac=e=>typeof Promise<"u"&&e instanceof Promise;function _f(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function MN(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var De;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(De||(De={}));var Ll,zl;class ss{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wb=(e,t)=>{if(Rc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Kn(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class et{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return lo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ac(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lo(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Wb(s,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lo(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(Ac(s)?s:Promise.resolve(s));return Wb(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:le.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Ir({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return es.create(this,this._def)}nullable(){return Oo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Tr.create(this,this._def)}promise(){return Ua.create(this,this._def)}or(t){return Mc.create([this,t],this._def)}and(t){return Lc.create(this,t,this._def)}transform(t){return new Ir({...Ze(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Vc({...Ze(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new Lx({typeName:Ve.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Bc({...Ze(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return gu.create(this,t)}readonly(){return Wc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _8=/^c[^\s-]{8,}$/i,S8=/^[0-9a-z]+$/,k8=/^[0-9A-HJKMNP-TV-Z]{26}$/,C8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,j8=/^[a-z0-9_-]{21}$/i,E8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,N8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,T8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let up;const P8=/^(?:(?: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])$/,R8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,A8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,LN="((\\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])))",D8=new RegExp(`^${LN}$`);function zN(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function O8(e){return new RegExp(`^${zN(e)}$`)}function FN(e){let t=`${LN}T${zN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function I8(e,t){return!!((t==="v4"||!t)&&P8.test(e)||(t==="v6"||!t)&&R8.test(e))}class jr extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Se.string){const o=this._getOrReturnCtx(t);return ve(o,{code:le.invalid_type,expected:Se.string,received:o.parsedType}),He}const r=new yn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?ve(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&ve(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")N8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"email",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")up||(up=new RegExp(T8,"u")),up.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"emoji",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")C8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"uuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")j8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"nanoid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")_8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")S8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid2",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")k8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ulid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ve(s,{validation:"url",code:le.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"regex",code:le.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ve(s,{code:le.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:le.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:le.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?FN(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:le.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?D8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:le.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?O8(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:le.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?E8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"duration",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?I8(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ip",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?A8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"base64",code:le.invalid_string,message:o.message}),r.dirty()):it.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:le.invalid_string,...De.errToObj(r)})}_addCheck(t){return new jr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...De.errToObj(t)})}url(t){return this._addCheck({kind:"url",...De.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...De.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...De.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...De.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...De.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...De.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...De.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...De.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...De.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...De.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...De.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...De.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...De.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...De.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...De.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...De.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...De.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...De.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...De.errToObj(n)})}nonempty(t){return this.min(1,De.errToObj(t))}trim(){return new jr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new jr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new jr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}jr.create=e=>{var t;return new jr({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};function M8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class Ro extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Se.number){const o=this._getOrReturnCtx(t);return ve(o,{code:le.invalid_type,expected:Se.number,received:o.parsedType}),He}let r;const s=new yn;for(const o of this._def.checks)o.kind==="int"?it.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ve(r,{code:le.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:le.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:le.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?M8(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ve(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ve(r,{code:le.not_finite,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,r,s){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:De.toString(s)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:De.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:De.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:De.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:De.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ro.create=e=>new Ro({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Ao extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Se.bigint){const o=this._getOrReturnCtx(t);return ve(o,{code:le.invalid_type,expected:Se.bigint,received:o.parsedType}),He}let r;const s=new yn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:le.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:le.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,r,s){return new Ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:De.toString(s)}]})}_addCheck(t){return new Ao({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ao.create=e=>{var t;return new Ao({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};class Dc extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Se.boolean){const r=this._getOrReturnCtx(t);return ve(r,{code:le.invalid_type,expected:Se.boolean,received:r.parsedType}),He}return kn(t.data)}}Dc.create=e=>new Dc({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class vi extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Se.date){const o=this._getOrReturnCtx(t);return ve(o,{code:le.invalid_type,expected:Se.date,received:o.parsedType}),He}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ve(o,{code:le.invalid_date}),He}const r=new yn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:le.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:le.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):it.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:De.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:De.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}vi.create=e=>new vi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ze(e)});class Sf extends et{_parse(t){if(this._getType(t)!==Se.symbol){const r=this._getOrReturnCtx(t);return ve(r,{code:le.invalid_type,expected:Se.symbol,received:r.parsedType}),He}return kn(t.data)}}Sf.create=e=>new Sf({typeName:Ve.ZodSymbol,...Ze(e)});class Oc extends et{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return ve(r,{code:le.invalid_type,expected:Se.undefined,received:r.parsedType}),He}return kn(t.data)}}Oc.create=e=>new Oc({typeName:Ve.ZodUndefined,...Ze(e)});class Ic extends et{_parse(t){if(this._getType(t)!==Se.null){const r=this._getOrReturnCtx(t);return ve(r,{code:le.invalid_type,expected:Se.null,received:r.parsedType}),He}return kn(t.data)}}Ic.create=e=>new Ic({typeName:Ve.ZodNull,...Ze(e)});class $a extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}$a.create=e=>new $a({typeName:Ve.ZodAny,...Ze(e)});class oi extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}oi.create=e=>new oi({typeName:Ve.ZodUnknown,...Ze(e)});class $s extends et{_parse(t){const n=this._getOrReturnCtx(t);return ve(n,{code:le.invalid_type,expected:Se.never,received:n.parsedType}),He}}$s.create=e=>new $s({typeName:Ve.ZodNever,...Ze(e)});class kf extends et{_parse(t){if(this._getType(t)!==Se.undefined){const r=this._getOrReturnCtx(t);return ve(r,{code:le.invalid_type,expected:Se.void,received:r.parsedType}),He}return kn(t.data)}}kf.create=e=>new kf({typeName:Ve.ZodVoid,...Ze(e)});class Tr extends et{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Se.array)return ve(n,{code:le.invalid_type,expected:Se.array,received:n.parsedType}),He;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(ve(n,{code:i?le.too_big:le.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ve(n,{code:le.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ve(n,{code:le.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new ss(n,i,n.path,a)))).then(i=>yn.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new ss(n,i,n.path,a)));return yn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Tr({...this._def,minLength:{value:t,message:De.toString(n)}})}max(t,n){return new Tr({...this._def,maxLength:{value:t,message:De.toString(n)}})}length(t,n){return new Tr({...this._def,exactLength:{value:t,message:De.toString(n)}})}nonempty(t){return this.min(1,t)}}Tr.create=(e,t)=>new Tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ze(t)});function Gi(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=es.create(Gi(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof Tr?new Tr({...e._def,type:Gi(e.element)}):e instanceof es?es.create(Gi(e.unwrap())):e instanceof Oo?Oo.create(Gi(e.unwrap())):e instanceof os?os.create(e.items.map(t=>Gi(t))):e}class Rt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=it.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Se.object){const u=this._getOrReturnCtx(t);return ve(u,{code:le.invalid_type,expected:Se.object,received:u.parsedType}),He}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof $s&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const c=[];for(const u of i){const d=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new ss(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof $s){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ve(s,{code:le.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new ss(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>yn.mergeObjectSync(r,u)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return De.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=De.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};return it.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}omit(t){const n={};return it.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}deepPartial(){return Gi(this)}partial(t){const n={};return it.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Rt({...this._def,shape:()=>n})}required(t){const n={};return it.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof es;)o=o._def.innerType;n[r]=o}}),new Rt({...this._def,shape:()=>n})}keyof(){return $N(it.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:$s.create(),typeName:Ve.ZodObject,...Ze(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:$s.create(),typeName:Ve.ZodObject,...Ze(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:$s.create(),typeName:Ve.ZodObject,...Ze(t)});class Mc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Kn(a.ctx.common.issues));return ve(n,{code:le.invalid_union,unionErrors:i}),He}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(c=>new Kn(c));return ve(n,{code:le.invalid_union,unionErrors:a}),He}}get options(){return this._def.options}}Mc.create=(e,t)=>new Mc({options:e,typeName:Ve.ZodUnion,...Ze(t)});const xs=e=>e instanceof Fc?xs(e.schema):e instanceof Ir?xs(e.innerType()):e instanceof $c?[e.value]:e instanceof Do?e.options:e instanceof Uc?it.objectValues(e.enum):e instanceof Vc?xs(e._def.innerType):e instanceof Oc?[void 0]:e instanceof Ic?[null]:e instanceof es?[void 0,...xs(e.unwrap())]:e instanceof Oo?[null,...xs(e.unwrap())]:e instanceof Lx||e instanceof Wc?xs(e.unwrap()):e instanceof Bc?xs(e._def.innerType):[];class Kh extends et{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.object)return ve(n,{code:le.invalid_type,expected:Se.object,received:n.parsedType}),He;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ve(n,{code:le.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=xs(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new Kh({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ze(r)})}}function $g(e,t){const n=lo(e),r=lo(t);if(e===t)return{valid:!0,data:e};if(n===Se.object&&r===Se.object){const s=it.objectKeys(t),o=it.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const c=$g(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(n===Se.array&&r===Se.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],a=t[o],c=$g(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Se.date&&r===Se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Lc extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,i)=>{if(zg(o)||zg(i))return He;const a=$g(o.value,i.value);return a.valid?((Fg(o)||Fg(i))&&n.dirty(),{status:n.value,value:a.data}):(ve(r,{code:le.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Lc.create=(e,t,n)=>new Lc({left:e,right:t,typeName:Ve.ZodIntersection,...Ze(n)});class os extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.array)return ve(r,{code:le.invalid_type,expected:Se.array,received:r.parsedType}),He;if(r.data.length<this._def.items.length)return ve(r,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&r.data.length>this._def.items.length&&(ve(r,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new ss(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>yn.mergeArray(n,i)):yn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new os({...this._def,rest:t})}}os.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new os({items:e,typeName:Ve.ZodTuple,rest:null,...Ze(t)})};class zc extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.object)return ve(r,{code:le.invalid_type,expected:Se.object,received:r.parsedType}),He;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new ss(r,a,r.path,a)),value:i._parse(new ss(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?yn.mergeObjectAsync(n,s):yn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof et?new zc({keyType:t,valueType:n,typeName:Ve.ZodRecord,...Ze(r)}):new zc({keyType:jr.create(),valueType:t,typeName:Ve.ZodRecord,...Ze(n)})}}class Cf extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.map)return ve(r,{code:le.invalid_type,expected:Se.map,received:r.parsedType}),He;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,c],u)=>({key:s._parse(new ss(r,a,r.path,[u,"key"])),value:o._parse(new ss(r,c,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}Cf.create=(e,t,n)=>new Cf({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ze(n)});class xi extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Se.set)return ve(r,{code:le.invalid_type,expected:Se.set,received:r.parsedType}),He;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ve(r,{code:le.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ve(r,{code:le.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(c){const u=new Set;for(const d of c){if(d.status==="aborted")return He;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((c,u)=>o._parse(new ss(r,c,r.path,u)));return r.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,n){return new xi({...this._def,minSize:{value:t,message:De.toString(n)}})}max(t,n){return new xi({...this._def,maxSize:{value:t,message:De.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}xi.create=(e,t)=>new xi({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ze(t)});class Ea extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.function)return ve(n,{code:le.invalid_type,expected:Se.function,received:n.parsedType}),He;function r(a,c){return bf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wf(),Fa].filter(u=>!!u),issueData:{code:le.invalid_arguments,argumentsError:c}})}function s(a,c){return bf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wf(),Fa].filter(u=>!!u),issueData:{code:le.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ua){const a=this;return kn(async function(...c){const u=new Kn([]),d=await a._def.args.parseAsync(c,o).catch(m=>{throw u.addIssue(r(c,m)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(m=>{throw u.addIssue(s(f,m)),u})})}else{const a=this;return kn(function(...c){const u=a._def.args.safeParse(c,o);if(!u.success)throw new Kn([r(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Kn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ea({...this._def,args:os.create(t).rest(oi.create())})}returns(t){return new Ea({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ea({args:t||os.create([]).rest(oi.create()),returns:n||oi.create(),typeName:Ve.ZodFunction,...Ze(r)})}}class Fc extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Fc.create=(e,t)=>new Fc({getter:e,typeName:Ve.ZodLazy,...Ze(t)});class $c extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ve(n,{received:n.data,code:le.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}$c.create=(e,t)=>new $c({value:e,typeName:Ve.ZodLiteral,...Ze(t)});function $N(e,t){return new Do({values:e,typeName:Ve.ZodEnum,...Ze(t)})}class Do extends et{constructor(){super(...arguments),Ll.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ve(n,{expected:it.joinValues(r),received:n.parsedType,code:le.invalid_type}),He}if(_f(this,Ll)||MN(this,Ll,new Set(this._def.values)),!_f(this,Ll).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ve(n,{received:n.data,code:le.invalid_enum_value,options:r}),He}return kn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Do.create(t,{...this._def,...n})}exclude(t,n=this._def){return Do.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ll=new WeakMap;Do.create=$N;class Uc extends et{constructor(){super(...arguments),zl.set(this,void 0)}_parse(t){const n=it.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Se.string&&r.parsedType!==Se.number){const s=it.objectValues(n);return ve(r,{expected:it.joinValues(s),received:r.parsedType,code:le.invalid_type}),He}if(_f(this,zl)||MN(this,zl,new Set(it.getValidEnumValues(this._def.values))),!_f(this,zl).has(t.data)){const s=it.objectValues(n);return ve(r,{received:r.data,code:le.invalid_enum_value,options:s}),He}return kn(t.data)}get enum(){return this._def.values}}zl=new WeakMap;Uc.create=(e,t)=>new Uc({values:e,typeName:Ve.ZodNativeEnum,...Ze(t)});class Ua extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Se.promise&&n.common.async===!1)return ve(n,{code:le.invalid_type,expected:Se.promise,received:n.parsedType}),He;const r=n.parsedType===Se.promise?n.data:Promise.resolve(n.data);return kn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ua.create=(e,t)=>new Ua({type:e,typeName:Ve.ZodPromise,...Ze(t)});class Ir extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{ve(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return He;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?He:c.status==="dirty"||n.value==="dirty"?fa(c.value):c});{if(n.value==="aborted")return He;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?He:a.status==="dirty"||n.value==="dirty"?fa(a.value):a}}if(s.type==="refinement"){const i=a=>{const c=s.refinement(a,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Rc(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Rc(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);it.assertNever(s)}}Ir.create=(e,t,n)=>new Ir({schema:e,typeName:Ve.ZodEffects,effect:t,...Ze(n)});Ir.createWithPreprocess=(e,t,n)=>new Ir({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ze(n)});class es extends et{_parse(t){return this._getType(t)===Se.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}es.create=(e,t)=>new es({innerType:e,typeName:Ve.ZodOptional,...Ze(t)});class Oo extends et{_parse(t){return this._getType(t)===Se.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oo.create=(e,t)=>new Oo({innerType:e,typeName:Ve.ZodNullable,...Ze(t)});class Vc extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Vc.create=(e,t)=>new Vc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class Bc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ac(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Bc.create=(e,t)=>new Bc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class jf extends et{_parse(t){if(this._getType(t)!==Se.nan){const r=this._getOrReturnCtx(t);return ve(r,{code:le.invalid_type,expected:Se.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}jf.create=e=>new jf({typeName:Ve.ZodNaN,...Ze(e)});const L8=Symbol("zod_brand");class Lx extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class gu extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?He:o.status==="dirty"?(n.dirty(),fa(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new gu({in:t,out:n,typeName:Ve.ZodPipeline})}}class Wc extends et{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Rc(s)&&(s.value=Object.freeze(s.value)),s);return Ac(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Wc.create=(e,t)=>new Wc({innerType:e,typeName:Ve.ZodReadonly,...Ze(t)});function UN(e,t={},n){return e?$a.create().superRefine((r,s)=>{var o,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:c})}}):$a.create()}const z8={object:Rt.lazycreate};var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const F8=(e,t={message:`Input not instance of ${e.name}`})=>UN(n=>n instanceof e,t),VN=jr.create,BN=Ro.create,$8=jf.create,U8=Ao.create,WN=Dc.create,V8=vi.create,B8=Sf.create,W8=Oc.create,H8=Ic.create,Y8=$a.create,K8=oi.create,G8=$s.create,Z8=kf.create,q8=Tr.create,X8=Rt.create,Q8=Rt.strictCreate,J8=Mc.create,eV=Kh.create,tV=Lc.create,nV=os.create,rV=zc.create,sV=Cf.create,oV=xi.create,iV=Ea.create,aV=Fc.create,lV=$c.create,cV=Do.create,uV=Uc.create,dV=Ua.create,Hb=Ir.create,fV=es.create,hV=Oo.create,mV=Ir.createWithPreprocess,pV=gu.create,gV=()=>VN().optional(),yV=()=>BN().optional(),vV=()=>WN().optional(),xV={string:e=>jr.create({...e,coerce:!0}),number:e=>Ro.create({...e,coerce:!0}),boolean:e=>Dc.create({...e,coerce:!0}),bigint:e=>Ao.create({...e,coerce:!0}),date:e=>vi.create({...e,coerce:!0})},wV=He;var ie=Object.freeze({__proto__:null,defaultErrorMap:Fa,setErrorMap:w8,getErrorMap:wf,makeIssue:bf,EMPTY_PATH:b8,addIssueToContext:ve,ParseStatus:yn,INVALID:He,DIRTY:fa,OK:kn,isAborted:zg,isDirty:Fg,isValid:Rc,isAsync:Ac,get util(){return it},get objectUtil(){return Lg},ZodParsedType:Se,getParsedType:lo,ZodType:et,datetimeRegex:FN,ZodString:jr,ZodNumber:Ro,ZodBigInt:Ao,ZodBoolean:Dc,ZodDate:vi,ZodSymbol:Sf,ZodUndefined:Oc,ZodNull:Ic,ZodAny:$a,ZodUnknown:oi,ZodNever:$s,ZodVoid:kf,ZodArray:Tr,ZodObject:Rt,ZodUnion:Mc,ZodDiscriminatedUnion:Kh,ZodIntersection:Lc,ZodTuple:os,ZodRecord:zc,ZodMap:Cf,ZodSet:xi,ZodFunction:Ea,ZodLazy:Fc,ZodLiteral:$c,ZodEnum:Do,ZodNativeEnum:Uc,ZodPromise:Ua,ZodEffects:Ir,ZodTransformer:Ir,ZodOptional:es,ZodNullable:Oo,ZodDefault:Vc,ZodCatch:Bc,ZodNaN:jf,BRAND:L8,ZodBranded:Lx,ZodPipeline:gu,ZodReadonly:Wc,custom:UN,Schema:et,ZodSchema:et,late:z8,get ZodFirstPartyTypeKind(){return Ve},coerce:xV,any:Y8,array:q8,bigint:U8,boolean:WN,date:V8,discriminatedUnion:eV,effect:Hb,enum:cV,function:iV,instanceof:F8,intersection:tV,lazy:aV,literal:lV,map:sV,nan:$8,nativeEnum:uV,never:G8,null:H8,nullable:hV,number:BN,object:X8,oboolean:vV,onumber:yV,optional:fV,ostring:gV,pipeline:pV,preprocess:mV,promise:dV,record:rV,set:oV,strictObject:Q8,string:VN,symbol:B8,transformer:Hb,tuple:nV,undefined:W8,union:J8,unknown:K8,void:Z8,NEVER:wV,ZodIssueCode:le,quotelessJson:x8,ZodError:Kn});const Yb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=de(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},HN=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Yb(r.ref,n,e):r.refs&&r.refs.forEach(s=>Yb(s,n,e))}},bV=(e,t)=>{t.shouldUseNativeValidation&&HN(e,t);const n={};for(const r in e){const s=de(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(_V(t.names||Object.keys(e),r)){const i=Object.assign({},de(n,r));mt(i,"root",o),mt(n,r,i)}else mt(n,r,o)}return n},_V=(e,t)=>e.some(n=>n.startsWith(t+"."));var SV=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=NN(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},un=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&HN({},o),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:bV(SV(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}};const YN=y.forwardRef(({...e},t)=>l.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));YN.displayName="Breadcrumb";const KN=y.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:re("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));KN.displayName="BreadcrumbList";const Ug=y.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("inline-flex items-center gap-1.5",e),...t}));Ug.displayName="BreadcrumbItem";const GN=y.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?ts:"a";return l.jsx(s,{ref:r,className:re("transition-colors hover:text-foreground",t),...n})});GN.displayName="BreadcrumbLink";const ZN=y.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:re("font-normal text-foreground",e),...t}));ZN.displayName="BreadcrumbPage";const qN=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:re("[&>svg]:size-3.5",t),...n,children:e??l.jsx(ok,{})});qN.displayName="BreadcrumbSeparator";var zx="Collapsible",[kV,XN]=on(zx),[CV,Fx]=kV(zx),QN=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[c=!1,u]=Zn({prop:r,defaultProp:s,onChange:i});return l.jsx(CV,{scope:n,disabled:o,contentId:Wn(),open:c,onOpenToggle:y.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Pe.div,{"data-state":Vx(c),"data-disabled":o?"":void 0,...a,ref:t})})});QN.displayName=zx;var JN="CollapsibleTrigger",$x=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=Fx(JN,n);return l.jsx(Pe.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Vx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});$x.displayName=JN;var Ux="CollapsibleContent",Gh=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Fx(Ux,e.__scopeCollapsible);return l.jsx(an,{present:n||s.open,children:({present:o})=>l.jsx(jV,{...r,ref:t,present:o})})});Gh.displayName=Ux;var jV=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=Fx(Ux,n),[a,c]=y.useState(r),u=y.useRef(null),d=Ge(t,u),f=y.useRef(0),h=f.current,m=y.useRef(0),x=m.current,p=i.open||a,w=y.useRef(p),g=y.useRef();return y.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),en(()=>{const v=u.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();f.current=b.height,m.current=b.width,w.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(r)}},[i.open,r]),l.jsx(Pe.div,{"data-state":Vx(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...o,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:p&&s})});function Vx(e){return e?"open":"closed"}var e2=QN,EV=$x,NV=Gh;const TV=e2,PV=$x,t2=y.forwardRef(({className:e,...t},n)=>l.jsx(Gh,{ref:n,className:re("overflow-y-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...t}));t2.displayName=Gh.displayName;var RV="Label",n2=y.forwardRef((e,t)=>l.jsx(Pe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));n2.displayName=RV;var r2=n2;const AV=Jc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Vt=y.forwardRef(({className:e,...t},n)=>l.jsx(r2,{ref:n,className:re(AV(),e),...t}));Vt.displayName=r2.displayName;const dn=s8,s2=y.createContext({}),ke=({...e})=>l.jsx(s2.Provider,{value:{name:e.name},children:l.jsx(l8,{...e})}),Zh=()=>{const e=y.useContext(s2),t=y.useContext(o2),{getFieldState:n,formState:r}=Yh(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},o2=y.createContext({}),be=y.forwardRef(({className:e,...t},n)=>{const r=y.useId();return l.jsx(o2.Provider,{value:{id:r},children:l.jsx("div",{ref:n,className:re("space-y-2",e),...t})})});be.displayName="FormItem";const Ce=y.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Zh();return l.jsx(Vt,{ref:n,className:re(r&&"text-destructive",e),htmlFor:s,...t})});Ce.displayName="FormLabel";const je=y.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Zh();return l.jsx(ts,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});je.displayName="FormControl";const DV=y.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Zh();return l.jsx("p",{ref:n,id:r,className:re("text-sm text-muted-foreground",e),...t})});DV.displayName="FormDescription";const ye=y.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=Zh(),{t:i}=Ye(),a=s?i(String(s==null?void 0:s.message)):t;return a?l.jsx("p",{ref:r,id:o,className:re("text-sm font-medium text-destructive",e),...n,children:a}):null});ye.displayName="FormMessage";const pe=y.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:re("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));pe.displayName="Input";function Vg(e,[t,n]){return Math.min(n,Math.max(t,e))}var OV=[" ","Enter","ArrowUp","ArrowDown"],IV=[" ","Enter"],yu="Select",[qh,Xh,MV]=eu(yu),[ll,t9]=on(yu,[MV,nl]),Qh=nl(),[LV,Fo]=ll(yu),[zV,FV]=ll(yu),i2=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:m}=e,x=Qh(t),[p,w]=y.useState(null),[g,v]=y.useState(null),[b,_]=y.useState(!1),C=Ci(u),[j=!1,T]=Zn({prop:r,defaultProp:s,onChange:o}),[R,A]=Zn({prop:i,defaultProp:a,onChange:c}),O=y.useRef(null),G=p?!!p.closest("form"):!0,[N,z]=y.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return l.jsx(bv,{...x,children:l.jsxs(LV,{required:m,scope:t,trigger:p,onTriggerChange:w,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Wn(),value:R,onValueChange:A,open:j,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:h,children:[l.jsx(qh.Provider,{scope:t,children:l.jsx(zV,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(U=>{z(J=>new Set(J).add(U))},[]),onNativeOptionRemove:y.useCallback(U=>{z(J=>{const F=new Set(J);return F.delete(U),F})},[]),children:n})}),G?l.jsxs(A2,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:U=>A(U.target.value),disabled:h,children:[R===void 0?l.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};i2.displayName=yu;var a2="SelectTrigger",l2=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Qh(n),i=Fo(a2,n),a=i.disabled||r,c=Ge(t,i.onTriggerChange),u=Xh(n),[d,f,h]=D2(x=>{const p=u().filter(v=>!v.disabled),w=p.find(v=>v.value===i.value),g=O2(p,x,w);g!==void 0&&i.onValueChange(g.value)}),m=()=>{a||(i.onOpenChange(!0),h())};return l.jsx(_v,{asChild:!0,...o,children:l.jsx(Pe.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":R2(i.value)?"":void 0,...s,ref:c,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const p=x.target;p.hasPointerCapture(x.pointerId)&&p.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const p=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(p&&x.key===" ")&&OV.includes(x.key)&&(m(),x.preventDefault())})})})});l2.displayName=a2;var c2="SelectValue",u2=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,c=Fo(c2,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ge(t,c.onValueNodeChange);return en(()=>{u(d)},[u,d]),l.jsx(Pe.span,{...a,ref:f,style:{pointerEvents:"none"},children:R2(c.value)?l.jsx(l.Fragment,{children:i}):o})});u2.displayName=c2;var $V="SelectIcon",d2=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return l.jsx(Pe.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});d2.displayName=$V;var UV="SelectPortal",f2=e=>l.jsx(nu,{asChild:!0,...e});f2.displayName=UV;var wi="SelectContent",h2=y.forwardRef((e,t)=>{const n=Fo(wi,e.__scopeSelect),[r,s]=y.useState();if(en(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Bs.createPortal(l.jsx(m2,{scope:e.__scopeSelect,children:l.jsx(qh.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),o):null}return l.jsx(p2,{...e,ref:t})});h2.displayName=wi;var _s=10,[m2,$o]=ll(wi),VV="SelectContentImpl",p2=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w,...g}=e,v=Fo(wi,n),[b,_]=y.useState(null),[C,j]=y.useState(null),T=Ge(t,me=>_(me)),[R,A]=y.useState(null),[O,G]=y.useState(null),N=Xh(n),[z,S]=y.useState(!1),U=y.useRef(!1);y.useEffect(()=>{if(b)return Ev(b)},[b]),dv();const J=y.useCallback(me=>{const[we,...Te]=N().map(Re=>Re.ref.current),[Fe]=Te.slice(-1),Ie=document.activeElement;for(const Re of me)if(Re===Ie||(Re==null||Re.scrollIntoView({block:"nearest"}),Re===we&&C&&(C.scrollTop=0),Re===Fe&&C&&(C.scrollTop=C.scrollHeight),Re==null||Re.focus(),document.activeElement!==Ie))return},[N,C]),F=y.useCallback(()=>J([R,b]),[J,R,b]);y.useEffect(()=>{z&&F()},[z,F]);const{onOpenChange:W,triggerPointerDownPosRef:I}=v;y.useEffect(()=>{if(b){let me={x:0,y:0};const we=Fe=>{var Ie,Re;me={x:Math.abs(Math.round(Fe.pageX)-(((Ie=I.current)==null?void 0:Ie.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Re=I.current)==null?void 0:Re.y)??0))}},Te=Fe=>{me.x<=10&&me.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",we),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",Te,{capture:!0})}}},[b,W,I]),y.useEffect(()=>{const me=()=>W(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[W]);const[X,$]=D2(me=>{const we=N().filter(Ie=>!Ie.disabled),Te=we.find(Ie=>Ie.ref.current===document.activeElement),Fe=O2(we,me,Te);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=y.useCallback((me,we,Te)=>{const Fe=!U.current&&!Te;(v.value!==void 0&&v.value===we||Fe)&&(A(me),Fe&&(U.current=!0))},[v.value]),he=y.useCallback(()=>b==null?void 0:b.focus(),[b]),se=y.useCallback((me,we,Te)=>{const Fe=!U.current&&!Te;(v.value!==void 0&&v.value===we||Fe)&&G(me)},[v.value]),oe=r==="popper"?Bg:g2,Oe=oe===Bg?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w}:{};return l.jsx(m2,{scope:n,content:b,viewport:C,onViewportChange:j,itemRefCallback:B,selectedItem:R,onItemLeave:he,itemTextRefCallback:se,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:z,searchRef:X,children:l.jsx(ph,{as:ts,allowPinchZoom:!0,children:l.jsx(uh,{asChild:!0,trapped:v.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:ue(s,me=>{var we;(we=v.trigger)==null||we.focus({preventScroll:!0}),me.preventDefault()}),children:l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:l.jsx(oe,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:me=>me.preventDefault(),...g,...Oe,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ue(g.onKeyDown,me=>{const we=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!we&&me.key.length===1&&$(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let Fe=N().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(me.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const Ie=me.target,Re=Fe.indexOf(Ie);Fe=Fe.slice(Re+1)}setTimeout(()=>J(Fe)),me.preventDefault()}})})})})})})});p2.displayName=VV;var BV="SelectItemAlignedPosition",g2=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Fo(wi,n),i=$o(wi,n),[a,c]=y.useState(null),[u,d]=y.useState(null),f=Ge(t,T=>d(T)),h=Xh(n),m=y.useRef(!1),x=y.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:g,focusSelectedItem:v}=i,b=y.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&p&&w&&g){const T=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),O=g.getBoundingClientRect();if(o.dir!=="rtl"){const Ie=O.left-R.left,Re=A.left-Ie,st=T.left-Re,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-_s,D=Vg(Re,[_s,Z-ee]);a.style.minWidth=E+"px",a.style.left=D+"px"}else{const Ie=R.right-O.right,Re=window.innerWidth-A.right-Ie,st=window.innerWidth-T.right-Re,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-_s,D=Vg(Re,[_s,Z-ee]);a.style.minWidth=E+"px",a.style.right=D+"px"}const G=h(),N=window.innerHeight-_s*2,z=p.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),F=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+z+W+F,X=Math.min(w.offsetHeight*5,I),$=window.getComputedStyle(p),B=parseInt($.paddingTop,10),he=parseInt($.paddingBottom,10),se=T.top+T.height/2-_s,oe=N-se,Oe=w.offsetHeight/2,me=w.offsetTop+Oe,we=U+J+me,Te=I-we;if(we<=se){const Ie=w===G[G.length-1].ref.current;a.style.bottom="0px";const Re=u.clientHeight-p.offsetTop-p.offsetHeight,st=Math.max(oe,Oe+(Ie?he:0)+Re+F),E=we+st;a.style.height=E+"px"}else{const Ie=w===G[0].ref.current;a.style.top="0px";const st=Math.max(se,U+p.offsetTop+(Ie?B:0)+Oe)+Te;a.style.height=st+"px",p.scrollTop=we-se+p.offsetTop}a.style.margin=`${_s}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,a,u,p,w,g,o.dir,r]);en(()=>b(),[b]);const[_,C]=y.useState();en(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=y.useCallback(T=>{T&&x.current===!0&&(b(),v==null||v(),x.current=!1)},[b,v]);return l.jsx(HV,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:l.jsx(Pe.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});g2.displayName=BV;var WV="SelectPopperPosition",Bg=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=_s,...o}=e,i=Qh(n);return l.jsx(Sv,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Bg.displayName=WV;var[HV,Bx]=ll(wi,{}),Wg="SelectViewport",y2=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=$o(Wg,n),i=Bx(Wg,n),a=Ge(t,o.onViewportChange),c=y.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(qh.Slot,{scope:n,children:l.jsx(Pe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const x=window.innerHeight-_s*2,p=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),g=Math.max(p,w);if(g<x){const v=g+m,b=Math.min(x,v),_=v-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});y2.displayName=Wg;var v2="SelectGroup",[YV,KV]=ll(v2),x2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Wn();return l.jsx(YV,{scope:n,id:s,children:l.jsx(Pe.div,{role:"group","aria-labelledby":s,...r,ref:t})})});x2.displayName=v2;var w2="SelectLabel",b2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=KV(w2,n);return l.jsx(Pe.div,{id:s.id,...r,ref:t})});b2.displayName=w2;var Ef="SelectItem",[GV,_2]=ll(Ef),S2=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=Fo(Ef,n),c=$o(Ef,n),u=a.value===r,[d,f]=y.useState(o??""),[h,m]=y.useState(!1),x=Ge(t,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,r,s)}),p=Wn(),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(GV,{scope:n,value:r,disabled:s,textId:p,isSelected:u,onItemTextChange:y.useCallback(g=>{f(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:l.jsx(qh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:l.jsx(Pe.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:ue(i.onFocus,()=>m(!0)),onBlur:ue(i.onBlur,()=>m(!1)),onPointerUp:ue(i.onPointerUp,w),onPointerMove:ue(i.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ue(i.onKeyDown,g=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(IV.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});S2.displayName=Ef;var Fl="SelectItemText",k2=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Fo(Fl,n),a=$o(Fl,n),c=_2(Fl,n),u=FV(Fl,n),[d,f]=y.useState(null),h=Ge(t,g=>f(g),c.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,c.value,c.disabled)}),m=d==null?void 0:d.textContent,x=y.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return en(()=>(p(x),()=>w(x)),[p,w,x]),l.jsxs(l.Fragment,{children:[l.jsx(Pe.span,{id:c.textId,...o,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Bs.createPortal(o.children,i.valueNode):null]})});k2.displayName=Fl;var C2="SelectItemIndicator",j2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _2(C2,n).isSelected?l.jsx(Pe.span,{"aria-hidden":!0,...r,ref:t}):null});j2.displayName=C2;var Hg="SelectScrollUpButton",E2=y.forwardRef((e,t)=>{const n=$o(Hg,e.__scopeSelect),r=Bx(Hg,e.__scopeSelect),[s,o]=y.useState(!1),i=Ge(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(T2,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});E2.displayName=Hg;var Yg="SelectScrollDownButton",N2=y.forwardRef((e,t)=>{const n=$o(Yg,e.__scopeSelect),r=Bx(Yg,e.__scopeSelect),[s,o]=y.useState(!1),i=Ge(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(T2,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});N2.displayName=Yg;var T2=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=$o("SelectScrollButton",n),i=y.useRef(null),a=Xh(n),c=y.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return y.useEffect(()=>()=>c(),[c]),en(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),l.jsx(Pe.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{c()})})}),ZV="SelectSeparator",P2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Pe.div,{"aria-hidden":!0,...r,ref:t})});P2.displayName=ZV;var Kg="SelectArrow",qV=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Qh(n),o=Fo(Kg,n),i=$o(Kg,n);return o.open&&i.position==="popper"?l.jsx(kv,{...s,...r,ref:t}):null});qV.displayName=Kg;function R2(e){return e===""||e===void 0}var A2=y.forwardRef((e,t)=>{const{value:n,...r}=e,s=y.useRef(null),o=Ge(t,s),i=jx(n);return y.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),l.jsx(hu,{asChild:!0,children:l.jsx("select",{...r,ref:o,defaultValue:n})})});A2.displayName="BubbleSelect";function D2(e){const t=Ot(e),n=y.useRef(""),r=y.useRef(0),s=y.useCallback(i=>{const a=n.current+i;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function O2(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=XV(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function XV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var QV=i2,I2=l2,JV=u2,eB=d2,tB=f2,M2=h2,nB=y2,rB=x2,L2=b2,z2=S2,sB=k2,oB=j2,F2=E2,$2=N2,U2=P2;const ii=QV,Na=rB,ai=JV,ko=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(I2,{ref:r,className:re("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(eB,{asChild:!0,children:l.jsx(sv,{className:"h-4 w-4 opacity-50"})})]}));ko.displayName=I2.displayName;const V2=y.forwardRef(({className:e,...t},n)=>l.jsx(F2,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(tI,{className:"h-4 w-4"})}));V2.displayName=F2.displayName;const B2=y.forwardRef(({className:e,...t},n)=>l.jsx($2,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(sv,{className:"h-4 w-4"})}));B2.displayName=$2.displayName;const Co=y.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>l.jsx(tB,{children:l.jsxs(M2,{ref:s,className:re("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(V2,{}),l.jsx(nB,{className:re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(B2,{})]})}));Co.displayName=M2.displayName;const Va=y.forwardRef(({className:e,...t},n)=>l.jsx(L2,{ref:n,className:re("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Va.displayName=L2.displayName;const Pn=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(z2,{ref:r,className:re("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(oB,{children:l.jsx(sk,{className:"h-4 w-4"})})}),l.jsx(sB,{children:t})]}));Pn.displayName=z2.displayName;const iB=y.forwardRef(({className:e,...t},n)=>l.jsx(U2,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));iB.displayName=U2.displayName;const cl=Vv,ul=Bv,aB=Wv,W2=y.forwardRef(({className:e,...t},n)=>l.jsx(ou,{ref:n,className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));W2.displayName=ou.displayName;const Pi=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(aB,{children:[l.jsx(W2,{}),l.jsxs(iu,{ref:r,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(xh,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(av,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pi.displayName=iu.displayName;const Ri=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ri.displayName="DialogHeader";const Jh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jh.displayName="DialogFooter";const Ai=y.forwardRef(({className:e,...t},n)=>l.jsx(au,{ref:n,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));Ai.displayName=au.displayName;const H2=y.forwardRef(({className:e,...t},n)=>l.jsx(lu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));H2.displayName=lu.displayName;function lB(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Wx="ScrollArea",[Y2,n9]=on(Wx),[cB,gr]=Y2(Wx),K2=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,c]=y.useState(null),[u,d]=y.useState(null),[f,h]=y.useState(null),[m,x]=y.useState(null),[p,w]=y.useState(null),[g,v]=y.useState(0),[b,_]=y.useState(0),[C,j]=y.useState(!1),[T,R]=y.useState(!1),A=Ge(t,G=>c(G)),O=Ci(s);return l.jsx(cB,{scope:n,type:r,dir:O,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:p,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:v,onCornerHeightChange:_,children:l.jsx(Pe.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});K2.displayName=Wx;var G2="ScrollAreaViewport",Z2=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,i=gr(G2,n),a=y.useRef(null),c=Ge(t,a,i.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),l.jsx(Pe.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Z2.displayName=G2;var cs="ScrollAreaScrollbar",Hx=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gr(cs,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?l.jsx(uB,{...r,ref:t,forceMount:n}):s.type==="scroll"?l.jsx(dB,{...r,ref:t,forceMount:n}):s.type==="auto"?l.jsx(q2,{...r,ref:t,forceMount:n}):s.type==="always"?l.jsx(Yx,{...r,ref:t}):null});Hx.displayName=cs;var uB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gr(cs,e.__scopeScrollArea),[o,i]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),l.jsx(an,{present:n||o,children:l.jsx(q2,{"data-state":o?"visible":"hidden",...r,ref:t})})}),dB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gr(cs,e.__scopeScrollArea),o=e.orientation==="horizontal",i=tm(()=>c("SCROLL_END"),100),[a,c]=lB("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),y.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(c("SCROLL"),i()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,o,c,i]),l.jsx(an,{present:n||a!=="hidden",children:l.jsx(Yx,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),q2=y.forwardRef((e,t)=>{const n=gr(cs,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,i]=y.useState(!1),a=e.orientation==="horizontal",c=tm(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?u:d)}},10);return Ba(n.viewport,c),Ba(n.content,c),l.jsx(an,{present:r||o,children:l.jsx(Yx,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Yx=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=gr(cs,e.__scopeScrollArea),o=y.useRef(null),i=y.useRef(0),[a,c]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=tT(a.viewport,a.content),d={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,m){return yB(h,i.current,a,m)}return n==="horizontal"?l.jsx(fB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,m=Kb(h,a,s.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?l.jsx(hB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,m=Kb(h,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),fB=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=gr(cs,e.__scopeScrollArea),[i,a]=y.useState(),c=y.useRef(null),u=Ge(t,c,o.onScrollbarXChange);return y.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(Q2,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":em(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),rT(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Tf(i.paddingLeft),paddingEnd:Tf(i.paddingRight)}})}})}),hB=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=gr(cs,e.__scopeScrollArea),[i,a]=y.useState(),c=y.useRef(null),u=Ge(t,c,o.onScrollbarYChange);return y.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(Q2,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":em(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),rT(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Tf(i.paddingTop),paddingEnd:Tf(i.paddingBottom)}})}})}),[mB,X2]=Y2(cs),Q2=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=gr(cs,n),[x,p]=y.useState(null),w=Ge(t,A=>p(A)),g=y.useRef(null),v=y.useRef(""),b=m.viewport,_=r.content-r.viewport,C=Ot(d),j=Ot(c),T=tm(f,10);function R(A){if(g.current){const O=A.clientX-g.current.left,G=A.clientY-g.current.top;u({x:O,y:G})}}return y.useEffect(()=>{const A=O=>{const G=O.target;(x==null?void 0:x.contains(G))&&C(O,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,C]),y.useEffect(j,[r,j]),Ba(x,T),Ba(m.content,T),l.jsx(mB,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:Ot(o),onThumbPointerUp:Ot(i),onThumbPositionChange:j,onThumbPointerDown:Ot(a),children:l.jsx(Pe.div,{...h,ref:w,style:{position:"absolute",...h.style},onPointerDown:ue(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),g.current=x.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),R(A))}),onPointerMove:ue(e.onPointerMove,R),onPointerUp:ue(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),Nf="ScrollAreaThumb",J2=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=X2(Nf,e.__scopeScrollArea);return l.jsx(an,{present:n||s.hasThumb,children:l.jsx(pB,{ref:t,...r})})}),pB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=gr(Nf,n),i=X2(Nf,n),{onThumbPositionChange:a}=i,c=Ge(t,f=>i.onThumbChange(f)),u=y.useRef(),d=tm(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(d(),!u.current){const m=vB(f,a);u.current=m,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,d,a]),l.jsx(Pe.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),x=f.clientX-m.left,p=f.clientY-m.top;i.onThumbPointerDown({x,y:p})}),onPointerUp:ue(e.onPointerUp,i.onThumbPointerUp)})});J2.displayName=Nf;var Kx="ScrollAreaCorner",eT=y.forwardRef((e,t)=>{const n=gr(Kx,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(gB,{...e,ref:t}):null});eT.displayName=Kx;var gB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=gr(Kx,n),[o,i]=y.useState(0),[a,c]=y.useState(0),u=!!(o&&a);return Ba(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Ba(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?l.jsx(Pe.div,{...r,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Tf(e){return e?parseInt(e,10):0}function tT(e,t){const n=e/t;return isNaN(n)?0:n}function em(e){const t=tT(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function yB(e,t,n,r="ltr"){const s=em(n),o=s/2,i=t||o,a=s-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return nT([c,u],f)(e)}function Kb(e,t,n="ltr"){const r=em(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Vg(e,c);return nT([0,i],[0,a])(u)}function nT(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function rT(e,t){return e>0&&e<t}var vB=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,a=n.top!==o.top;(i||a)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function tm(e,t){const n=Ot(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ba(e,t){const n=Ot(t);en(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var sT=K2,xB=Z2,wB=eT;const nm=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(sT,{ref:r,className:re("relative overflow-hidden",e),...n,children:[l.jsx(xB,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(oT,{}),l.jsx(wB,{})]}));nm.displayName=sT.displayName;const oT=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(Hx,{ref:r,orientation:t,className:re("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:l.jsx(J2,{className:"relative flex-1 rounded-full bg-border"})}));oT.displayName=Hx.displayName;const As=new Map([["aliyun",["common.provider.aliyun","/imgs/providers/aliyun.svg"]],["tencent",["common.provider.tencent","/imgs/providers/tencent.svg"]],["huaweicloud",["common.provider.huaweicloud","/imgs/providers/huaweicloud.svg"]],["qiniu",["common.provider.qiniu","/imgs/providers/qiniu.svg"]],["cloudflare",["common.provider.cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["common.provider.namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["common.provider.godaddy","/imgs/providers/godaddy.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]]]),Gb=e=>As.get(e),us=ie.union([ie.literal("aliyun"),ie.literal("tencent"),ie.literal("huaweicloud"),ie.literal("qiniu"),ie.literal("cloudflare"),ie.literal("namesilo"),ie.literal("godaddy"),ie.literal("local"),ie.literal("ssh"),ie.literal("webhook")],{message:"access.authorization.form.type.placeholder"}),ds=e=>{switch(e){case"aliyun":case"tencent":case"huaweicloud":return"all";case"qiniu":case"local":case"ssh":case"webhook":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},bB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,accessKeyId:ie.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessSecretId:ie.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={accessKeyId:"",accessKeySecret:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:a.accessKeyId,accessSecretId:a.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_id.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessSecretId",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_secret.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_secret.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},_B=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,secretId:ie.string().min(1,"access.authorization.form.secret_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretKey:ie.string().min(1,"access.authorization.form.secret_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={secretId:"",secretKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:a.secretId,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretId",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.secret_id.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.secret_id.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.secret_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},SB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,region:ie.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:ie.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:ie.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={region:"cn-north-1",accessKeyId:"",secretAccessKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"huaweicloud",region:a.region,accessKeyId:a.accessKeyId,secretAccessKey:a.secretAccessKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"region",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.region.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_id.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretAccessKey",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_secret.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_secret.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},kB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,accessKey:ie.string().min(1,"access.authorization.form.access_key.placeholder").max(64),secretKey:ie.string().min(1,"access.authorization.form.secret_key.placeholder").max(64)});let a={accessKey:"",secretKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:a.accessKey,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessKey",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.secret_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},CB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,dnsApiToken:ie.string().min(1,"access.authorization.form.cloud_dns_api_token.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={dnsApiToken:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:a.dnsApiToken}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"dnsApiToken",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.cloud_dns_api_token.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.cloud_dns_api_token.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},jB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,apiKey:ie.string().min(1,"access.authorization.form.namesilo_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={apiKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:a.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.namesilo_api_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.namesilo_api_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},EB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,apiKey:ie.string().min(1,"access.authorization.form.godaddy_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),apiSecret:ie.string().min(1,"access.authorization.form.godaddy_api_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={apiKey:"",apiSecret:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:a.apiKey,apiSecret:a.apiSecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.godaddy_api_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.godaddy_api_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"apiSecret",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.godaddy_api_secret.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.godaddy_api_secret.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},NB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o}=ln(),{t:i}=Ye(),a=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,i("common.errmsg.string_max",{max:64})),configType:us}),c=cn({resolver:un(a),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local"}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"?s(f):r(f),o()}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-3",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:i("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:i("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:i("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:i("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:i("common.save")})})]})})})})},Gx=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=ln(),[r,s]=y.useState(!1),{t:o}=Ye(),i=ie.object({name:ie.string().min(1,"access.group.form.name.errmsg.empty").max(64,o("common.errmsg.string_max",{max:64}))}),a=cn({resolver:un(i),defaultValues:{name:""}}),c=async u=>{try{await C$({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,m])=>{a.setError(h,{type:"manual",message:m.message})})}};return l.jsxs(cl,{onOpenChange:s,open:r,children:[l.jsx(ul,{asChild:!0,className:re(e),children:t}),l.jsxs(Pi,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ri,{children:l.jsx(Ai,{children:o("access.group.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(dn,{...a,children:l.jsxs("form",{onSubmit:u=>{u.stopPropagation(),a.handleSubmit(c)(u)},className:"space-y-8",children:[l.jsx(ke,{control:a.control,name:"name",render:({field:u})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.group.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.group.form.name.errmsg.empty"),...u,type:"text"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})]})]})},TB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o,config:{accessGroups:i}}=ln(),a=y.useRef(null),[c,u]=y.useState(""),{t:d}=Ye(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,m=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,x=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,d("common.errmsg.string_max",{max:64})),configType:us,host:ie.string().refine(_=>m.test(_)||h.test(_),{message:"common.errmsg.host_invalid"}),group:ie.string().optional(),port:ie.string().min(1,"access.authorization.form.ssh_port.placeholder").max(5,d("common.errmsg.string_max",{max:5})),username:ie.string().min(1,"access.authorization.form.ssh_username.placeholder").max(64,d("common.errmsg.string_max",{max:64})),password:ie.string().min(0,"access.authorization.form.ssh_password.placeholder").max(64,d("common.errmsg.string_max",{max:64})),key:ie.string().min(0,"access.authorization.form.ssh_key.placeholder").max(20480,d("common.errmsg.string_max",{max:20480})),keyFile:ie.any().optional(),keyPassphrase:ie.string().min(0,"access.authorization.form.ssh_key_passphrase.placeholder").max(2048,d("common.errmsg.string_max",{max:2048}))});let p={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",keyPassphrase:""};e&&(p=e.config);const w=cn({resolver:un(x),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"ssh",group:e==null?void 0:e.group,host:p.host,port:p.port,username:p.username,password:p.password,key:p.key,keyFile:p.keyFile,keyPassphrase:p.keyPassphrase}}),g=async _=>{let C=_.group;C=="emptyId"&&(C="");const j={id:_.id,name:_.name,configType:_.configType,usage:ds(_.configType),group:C,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key,keyPassphrase:_.keyPassphrase}};try{j.id=t=="copy"?"":j.id;const T=await ls(j);n(),j.id=T.id,j.created=T.created,j.updated=T.updated,_.id&&t=="edit"?s(j):r(j),C!=f&&(f&&await Ab({id:f,"access-":j.id}),C&&await Ab({id:C,"access+":j.id})),o()}catch(T){Object.entries(T.response.data).forEach(([A,O])=>{w.setError(A,{type:"manual",message:O.message})});return}},v=async _=>{var R;const C=(R=_.target.files)==null?void 0:R[0];if(!C)return;const j=C;u(j.name);const T=await YU(j);w.setValue("key",T)},b=()=>{var _;(_=a.current)==null||_.click()};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...w,children:l.jsxs("form",{onSubmit:_=>{_.stopPropagation(),w.handleSubmit(g)(_)},className:"space-y-3",children:[l.jsx(ke,{control:w.control,name:"name",render:({field:_})=>l.jsxs(be,{children:[l.jsx(Ce,{children:d("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.name.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"group",render:({field:_})=>l.jsxs(be,{children:[l.jsxs(Ce,{className:"w-full flex justify-between",children:[l.jsx("div",{children:d("access.authorization.form.ssh_group.label")}),l.jsx(Gx,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),d("common.add")]})})]}),l.jsx(je,{children:l.jsxs(ii,{..._,value:_.value,defaultValue:"emptyId",onValueChange:C=>{w.setValue("group",C)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:d("access.authorization.form.access_group.placeholder")})}),l.jsxs(Co,{children:[l.jsx(Pn,{value:"emptyId",children:l.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(C=>l.jsx(Pn,{value:C.id?C.id:"",children:l.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:C.name})},C.id))]})]})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"id",render:({field:_})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:d("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"configType",render:({field:_})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:d("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{..._})}),l.jsx(ye,{})]})}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(ke,{control:w.control,name:"host",render:({field:_})=>l.jsxs(be,{className:"grow",children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_host.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_host.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"port",render:({field:_})=>l.jsxs(be,{children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_port.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_port.placeholder"),..._,type:"number"})}),l.jsx(ye,{})]})})]}),l.jsx(ke,{control:w.control,name:"username",render:({field:_})=>l.jsxs(be,{children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_username.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_username.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"password",render:({field:_})=>l.jsxs(be,{children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_password.placeholder"),..._,type:"password"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"key",render:({field:_})=>l.jsxs(be,{hidden:!0,children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"keyFile",render:({field:_})=>l.jsxs(be,{children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_key.label")}),l.jsx(je,{children:l.jsxs("div",{children:[l.jsx(Me,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.authorization.form.ssh_key_file.placeholder")}),l.jsx(pe,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._,ref:a,className:"hidden",hidden:!0,type:"file",onChange:v})]})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"keyPassphrase",render:({field:_})=>l.jsxs(be,{children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_key_passphrase.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_key_passphrase.placeholder"),..._,type:"password"})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:d("common.save")})})]})})})})},PB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:us,url:ie.string().url("common.errmsg.url_invalid")});let a={url:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:a.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:ds(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await ls(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(be,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"url",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("access.authorization.form.webhook_url.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.webhook_url.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},ha=({trigger:e,op:t,data:n,className:r})=>{const[s,o]=y.useState(!1),{t:i}=Ye(),a=Array.from(As.keys()),[c,u]=y.useState((n==null?void 0:n.configType)||"");let d=l.jsx(l.Fragment,{children:" "});switch(c){case"aliyun":d=l.jsx(bB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"tencent":d=l.jsx(_B,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"huaweicloud":d=l.jsx(SB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"qiniu":d=l.jsx(kB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"cloudflare":d=l.jsx(CB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"namesilo":d=l.jsx(jB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"godaddy":d=l.jsx(EB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"local":d=l.jsx(NB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"ssh":d=l.jsx(TB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"webhook":d=l.jsx(PB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break}const f=h=>h==c?"border-primary":"";return l.jsxs(cl,{onOpenChange:o,open:s,children:[l.jsx(ul,{asChild:!0,className:re(r),children:e}),l.jsxs(Pi,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ri,{children:l.jsx(Ai,{children:t=="add"?i("access.authorization.add"):t=="edit"?i("access.authorization.edit"):i("access.authorization.copy")})}),l.jsx(nm,{className:"max-h-[80vh]",children:l.jsxs("div",{className:"container py-3",children:[l.jsx(Vt,{children:i("access.authorization.form.type.label")}),l.jsxs(ii,{onValueChange:h=>{u(h)},defaultValue:c,children:[l.jsx(ko,{className:"mt-3",children:l.jsx(ai,{placeholder:i("access.authorization.form.type.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:i("access.authorization.form.type.list")}),a.map(h=>{var m,x;return l.jsx(Pn,{value:h,children:l.jsxs("div",{className:re("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[l.jsx("img",{src:(m=As.get(h))==null?void 0:m[1],className:"h-6 w-6"}),l.jsx("div",{children:i(((x=As.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})};var iT=Symbol.for("immer-nothing"),Zb=Symbol.for("immer-draftable"),qn=Symbol.for("immer-state");function kr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Wa=Object.getPrototypeOf;function Ha(e){return!!e&&!!e[qn]}function bi(e){var t;return e?aT(e)||Array.isArray(e)||!!e[Zb]||!!((t=e.constructor)!=null&&t[Zb])||sm(e)||om(e):!1}var RB=Object.prototype.constructor.toString();function aT(e){if(!e||typeof e!="object")return!1;const t=Wa(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===RB}function Pf(e,t){rm(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function rm(e){const t=e[qn];return t?t.type_:Array.isArray(e)?1:sm(e)?2:om(e)?3:0}function Gg(e,t){return rm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lT(e,t,n){const r=rm(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function AB(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sm(e){return e instanceof Map}function om(e){return e instanceof Set}function Wo(e){return e.copy_||e.base_}function Zg(e,t){if(sm(e))return new Map(e);if(om(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=aT(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[qn];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Wa(e),r)}else{const r=Wa(e);if(r!==null&&n)return{...e};const s=Object.create(r);return Object.assign(s,e)}}function Zx(e,t=!1){return im(e)||Ha(e)||!bi(e)||(rm(e)>1&&(e.set=e.add=e.clear=e.delete=DB),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Zx(r,!0))),e}function DB(){kr(2)}function im(e){return Object.isFrozen(e)}var OB={};function _i(e){const t=OB[e];return t||kr(0,e),t}var Hc;function cT(){return Hc}function IB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qb(e,t){t&&(_i("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qg(e){Xg(e),e.drafts_.forEach(MB),e.drafts_=null}function Xg(e){e===Hc&&(Hc=e.parent_)}function Xb(e){return Hc=IB(Hc,e)}function MB(e){const t=e[qn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qb(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[qn].modified_&&(qg(t),kr(4)),bi(e)&&(e=Rf(t,e),t.parent_||Af(t,e)),t.patches_&&_i("Patches").generateReplacementPatches_(n[qn].base_,e,t.patches_,t.inversePatches_)):e=Rf(t,n,[]),qg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iT?e:void 0}function Rf(e,t,n){if(im(t))return t;const r=t[qn];if(!r)return Pf(t,(s,o)=>Jb(e,r,t,s,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Af(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let o=s,i=!1;r.type_===3&&(o=new Set(s),s.clear(),i=!0),Pf(o,(a,c)=>Jb(e,r,s,a,c,n,i)),Af(e,s,!1),n&&e.patches_&&_i("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Jb(e,t,n,r,s,o,i){if(Ha(s)){const a=o&&t&&t.type_!==3&&!Gg(t.assigned_,r)?o.concat(r):void 0,c=Rf(e,s,a);if(lT(n,r,c),Ha(c))e.canAutoFreeze_=!1;else return}else i&&n.add(s);if(bi(s)&&!im(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Rf(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Af(e,s)}}function Af(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zx(t,n)}function LB(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:cT(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=qx;n&&(s=[r],o=Yc);const{revoke:i,proxy:a}=Proxy.revocable(s,o);return r.draft_=a,r.revoke_=i,a}var qx={get(e,t){if(t===qn)return e;const n=Wo(e);if(!Gg(n,t))return zB(e,n,t);const r=n[t];return e.finalized_||!bi(r)?r:r===dp(e.base_,t)?(fp(e),e.copy_[t]=Jg(r,e)):r},has(e,t){return t in Wo(e)},ownKeys(e){return Reflect.ownKeys(Wo(e))},set(e,t,n){const r=uT(Wo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=dp(Wo(e),t),o=s==null?void 0:s[qn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(AB(n,s)&&(n!==void 0||Gg(e.base_,t)))return!0;fp(e),Qg(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return dp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fp(e),Qg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){kr(11)},getPrototypeOf(e){return Wa(e.base_)},setPrototypeOf(){kr(12)}},Yc={};Pf(qx,(e,t)=>{Yc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Yc.deleteProperty=function(e,t){return Yc.set.call(this,e,t,void 0)};Yc.set=function(e,t,n){return qx.set.call(this,e[0],t,n,e[0])};function dp(e,t){const n=e[qn];return(n?Wo(n):e)[t]}function zB(e,t,n){var s;const r=uT(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function uT(e,t){if(!(t in e))return;let n=Wa(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Wa(n)}}function Qg(e){e.modified_||(e.modified_=!0,e.parent_&&Qg(e.parent_))}function fp(e){e.copy_||(e.copy_=Zg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var FB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const i=this;return function(c=o,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&kr(6),r!==void 0&&typeof r!="function"&&kr(7);let s;if(bi(t)){const o=Xb(this),i=Jg(t,void 0);let a=!0;try{s=n(i),a=!1}finally{a?qg(o):Xg(o)}return qb(o,r),Qb(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===iT&&(s=void 0),this.autoFreeze_&&Zx(s,!0),r){const o=[],i=[];_i("Patches").generateReplacementPatches_(t,s,o,i),r(o,i)}return s}else kr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,c=>t(c,...a));let r,s;return[this.produce(t,n,(i,a)=>{r=i,s=a}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){bi(e)||kr(8),Ha(e)&&(e=$B(e));const t=Xb(this),n=Jg(e,void 0);return n[qn].isManual_=!0,Xg(t),n}finishDraft(e,t){const n=e&&e[qn];(!n||!n.isManual_)&&kr(9);const{scope_:r}=n;return qb(r,t),Qb(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=_i("Patches").applyPatches_;return Ha(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Jg(e,t){const n=sm(e)?_i("MapSet").proxyMap_(e,t):om(e)?_i("MapSet").proxySet_(e,t):LB(e,t);return(t?t.scope_:cT()).drafts_.push(n),n}function $B(e){return Ha(e)||kr(10,e),dT(e)}function dT(e){if(!bi(e)||im(e))return e;const t=e[qn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zg(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Zg(e,!0);return Pf(n,(r,s)=>{lT(n,r,dT(s))}),t&&(t.finalized_=!1),n}var Xn=new FB,qr=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseStrictShallowCopy.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);const UB="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let VB=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=UB[n[e]&63];return t};const BB=Jc("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),am=y.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:re(BB({variant:t}),e),...n}));am.displayName="Alert";const Xx=y.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:re("mb-1 font-medium leading-none tracking-tight",e),...t}));Xx.displayName="AlertTitle";const lm=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("text-sm [&_p]:leading-relaxed",e),...t}));lm.displayName="AlertDescription";const Df=y.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:re("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Df.displayName="Textarea";const WB=({variables:e,onValueChange:t})=>{const[n,r]=y.useState([]),{t:s}=Ye();y.useEffect(()=>{e&&r(e)},[e]);const o=c=>{const u=n.findIndex(f=>f.key===c.key),d=qr(n,f=>{u===-1?f.push(c):f[u]=c});r(d),t==null||t(d)},i=c=>{const u=[...n];u.splice(c,1),r(u),t==null||t(u)},a=(c,u)=>{const d=[...n];d[c]=u,r(d),t==null||t(d)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex justify-between dark:text-stone-200",children:[l.jsx(Vt,{children:s("domain.deployment.form.variables.label")}),l.jsx(dr,{when:!!(n!=null&&n.length),children:l.jsx(hp,{variable:{key:"",value:""},trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(pi,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:s("common.add")})]}),onSave:c=>{o(c)}})})]}),l.jsx(dr,{when:!!(n!=null&&n.length),fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:s("domain.deployment.form.variables.empty")}),l.jsx(hp,{trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(pi,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:s("common.add")})]}),variable:{key:"",value:""},onSave:c=>{o(c)}})]}),children:l.jsx("div",{className:"border p-3 rounded-md text-stone-700 text-sm dark:text-stone-200",children:n==null?void 0:n.map((c,u)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[c.key,"=",c.value]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(hp,{trigger:l.jsx(ov,{size:16,className:"cursor-pointer"}),variable:c,onSave:d=>{a(u,d)}}),l.jsx(iv,{size:16,className:"cursor-pointer",onClick:()=>{i(u)}})]})]},u))})})]})},hp=({variable:e,trigger:t,onSave:n})=>{const[r,s]=y.useState({key:"",value:""});y.useEffect(()=>{e&&s(e)},[e]);const{t:o}=Ye(),[i,a]=y.useState(!1),[c,u]=y.useState({}),d=()=>{if(!r.key){u({key:o("domain.deployment.form.variables.key.required")});return}if(!r.value){u({value:o("domain.deployment.form.variables.value.required")});return}n==null||n(r),a(!1),u({})};return l.jsxs(cl,{open:i,onOpenChange:()=>{a(!i)},children:[l.jsx(ul,{children:t}),l.jsxs(Pi,{className:"dark:text-stone-200",children:[l.jsxs(Ri,{className:"flex flex-col",children:[l.jsx(Ai,{children:o("domain.deployment.form.variables.label")}),l.jsxs("div",{className:"pt-5 flex flex-col items-start",children:[l.jsx(Vt,{children:o("domain.deployment.form.variables.key")}),l.jsx(pe,{placeholder:o("domain.deployment.form.variables.key.placeholder"),value:r==null?void 0:r.key,onChange:f=>{s({...r,key:f.target.value})},className:"w-full mt-1"}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.key})]}),l.jsxs("div",{className:"pt-2 flex flex-col items-start",children:[l.jsx(Vt,{children:o("domain.deployment.form.variables.value")}),l.jsx(pe,{placeholder:o("domain.deployment.form.variables.value.placeholder"),value:r==null?void 0:r.value,onChange:f=>{s({...r,value:f.target.value})},className:"w-full mt-1"}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.value})]})]}),l.jsx(Jh,{children:l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{onClick:()=>{d()},children:o("common.save")})})})]})]})},Of=new Map([["aliyun-oss",["common.provider.aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-cdn",["common.provider.aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["common.provider.aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["common.provider.tencent.cdn","/imgs/providers/tencent.svg"]],["qiniu-cdn",["common.provider.qiniu.cdn","/imgs/providers/qiniu.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]]]),HB=Array.from(Of.keys()),fT=y.createContext({}),Ya=()=>y.useContext(fT),YB=({deploys:e,onChange:t})=>{const[n,r]=y.useState([]),{t:s}=Ye();y.useEffect(()=>{r(e)},[e]);const o=c=>{c.id=VB();const u=[...n,c];r(u),t(u)},i=c=>{const u=n.filter(d=>d.id!==c);r(u),t(u)},a=c=>{const u=n.map(d=>d.id===c.id?{...c}:d);r(u),t(u)};return l.jsx(l.Fragment,{children:l.jsxs(dr,{when:n.length>0,fallback:l.jsx(am,{className:"w-full border dark:border-stone-400",children:l.jsxs(lm,{className:"flex flex-col items-center",children:[l.jsx("div",{children:s("domain.deployment.nodata")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(ey,{onSave:c=>{o(c)},trigger:l.jsx(Me,{size:"sm",children:s("common.add")})})})]})}),children:[l.jsx("div",{className:"flex justify-end py-2 border-b dark:border-stone-400",children:l.jsx(ey,{trigger:l.jsx(Me,{size:"sm",children:s("common.add")}),onSave:c=>{o(c)}})}),l.jsx("div",{className:"w-full md:w-[35em] rounded mt-5 border dark:border-stone-400 dark:text-stone-200",children:l.jsx("div",{className:"",children:n.map(c=>l.jsx(KB,{item:c,onDelete:()=>{i(c.id??"")},onSave:u=>{a(u)}},c.id))})})]})})},KB=({item:e,onDelete:t,onSave:n})=>{const{config:{accesses:r}}=ln(),{t:s}=Ye(),o=r.find(c=>c.id===e.access),i=()=>{if(!o)return"";const c=As.get(o.configType);return c?c[1]:""},a=()=>{if(!o)return"";const c=Of.get(e.type);return c?s(c[0]):""};return l.jsxs("div",{className:"flex justify-between text-sm p-3 items-center text-stone-700 dark:text-stone-200",children:[l.jsxs("div",{className:"flex space-x-2 items-center",children:[l.jsx("div",{children:l.jsx("img",{src:i(),className:"w-9"})}),l.jsxs("div",{className:"text-stone-600 flex-col flex space-y-0 dark:text-stone-200",children:[l.jsx("div",{children:a()}),l.jsx("div",{children:o==null?void 0:o.name})]})]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(ey,{trigger:l.jsx(ov,{size:16,className:"cursor-pointer"}),deployConfig:e,onSave:c=>{n(c)}}),l.jsx(iv,{size:16,className:"cursor-pointer",onClick:()=>{t()}})]})]})},ey=({trigger:e,deployConfig:t,onSave:n})=>{const{config:{accesses:r}}=ln(),[s,o]=y.useState(),[i,a]=y.useState({access:"",type:""}),[c,u]=y.useState({}),[d,f]=y.useState(!1);y.useEffect(()=>{a(t?{...t}:{access:"",type:""})},[t]),y.useEffect(()=>{const w=i.type.split("-");let g;w&&w.length>1?g=w[1]:g=i.type,o(g),u({})},[i.type]);const h=y.useCallback(w=>{w.type!==i.type?a({...w,access:"",config:{}}):a({...w})},[i.type]),{t:m}=Ye(),x=r.filter(w=>{if(w.usage=="apply")return!1;if(i.type=="")return!0;const g=i.type.split("-");return w.configType===g[0]}),p=()=>{const w={...c};i.type===""?w.type=m("domain.deployment.form.access.placeholder"):w.type="",i.access===""?w.access=m("domain.deployment.form.access.placeholder"):w.access="",u(w);for(const g in w)if(w[g]!=="")return;n(i),a({access:"",type:""}),u({}),f(!1)};return l.jsx(fT.Provider,{value:{deploy:i,setDeploy:h,error:c,setError:u},children:l.jsxs(cl,{open:d,onOpenChange:f,children:[l.jsx(ul,{children:e}),l.jsxs(Pi,{className:"dark:text-stone-200",children:[l.jsxs(Ri,{children:[l.jsx(Ai,{children:m("history.page.title")}),l.jsx(H2,{})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:m("domain.deployment.form.type.label")}),l.jsxs(ii,{value:i.type,onValueChange:w=>{h({...i,type:w})},children:[l.jsx(ko,{className:"mt-2",children:l.jsx(ai,{placeholder:m("domain.deployment.form.type.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:m("domain.deployment.form.type.list")}),HB.map(w=>{var g,v;return l.jsx(Pn,{value:w,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(g=Of.get(w))==null?void 0:g[1]}),l.jsx("div",{children:m(((v=Of.get(w))==null?void 0:v[0])??"")})]})},w)})]})})]}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.type})]}),l.jsxs("div",{children:[l.jsxs(Vt,{className:"flex justify-between",children:[l.jsx("div",{children:m("domain.deployment.form.access.label")}),l.jsx(ha,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),m("common.add")]}),op:"add"})]}),l.jsxs(ii,{value:i.access,onValueChange:w=>{h({...i,access:w})},children:[l.jsx(ko,{className:"mt-2",children:l.jsx(ai,{placeholder:m("domain.deployment.form.access.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:m("domain.deployment.form.access.list")}),x.map(w=>{var g;return l.jsx(Pn,{value:w.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(g=As.get(w.configType))==null?void 0:g[1]}),l.jsx("div",{children:w.name})]})},w.id)})]})})]}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.access})]}),l.jsx(GB,{type:s}),l.jsx(Jh,{children:l.jsx(Me,{onClick:w=>{w.stopPropagation(),p()},children:m("common.save")})})]})]})})},GB=({type:e})=>(()=>{switch(e){case"ssh":return l.jsx(e1,{});case"local":return l.jsx(e1,{});case"cdn":return l.jsx(mp,{});case"dcdn":return l.jsx(mp,{});case"oss":return l.jsx(ZB,{});case"webhook":return l.jsx(qB,{});default:return l.jsx(mp,{})}})(),e1=()=>{var s,o,i,a;const{t:e}=Ye(),{setError:t}=Ya();y.useEffect(()=>{t({})},[]);const{deploy:n,setDeploy:r}=Ya();return y.useEffect(()=>{n.id||r({...n,config:{certPath:"/etc/nginx/ssl/nginx.crt",keyPath:"/etc/nginx/ssl/nginx.key",preCommand:"",command:"sudo service nginx reload"}})},[]),l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col space-y-2",children:[l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_cert_path.label")}),l.jsx(pe,{placeholder:e("access.authorization.form.ssh_cert_path.label"),className:"w-full mt-1",value:(s=n==null?void 0:n.config)==null?void 0:s.certPath,onChange:c=>{const u=qr(n,d=>{d.config||(d.config={}),d.config.certPath=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_key_path.label")}),l.jsx(pe,{placeholder:e("access.authorization.form.ssh_key_path.placeholder"),className:"w-full mt-1",value:(o=n==null?void 0:n.config)==null?void 0:o.keyPath,onChange:c=>{const u=qr(n,d=>{d.config||(d.config={}),d.config.keyPath=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_pre_command.label")}),l.jsx(Df,{className:"mt-1",value:(i=n==null?void 0:n.config)==null?void 0:i.preCommand,placeholder:e("access.authorization.form.ssh_pre_command.placeholder"),onChange:c=>{const u=qr(n,d=>{d.config||(d.config={}),d.config.preCommand=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_command.label")}),l.jsx(Df,{className:"mt-1",value:(a=n==null?void 0:n.config)==null?void 0:a.command,placeholder:e("access.authorization.form.ssh_command.placeholder"),onChange:c=>{const u=qr(n,d=>{d.config||(d.config={}),d.config.command=c.target.value});r(u)}})]})]})})},mp=()=>{var i;const{deploy:e,setDeploy:t,error:n,setError:r}=Ya(),{t:s}=Ye();y.useEffect(()=>{r({})},[]),y.useEffect(()=>{var c;const a=o.safeParse((c=e.config)==null?void 0:c.domain);a.success?r({...n,domain:""}):r({...n,domain:JSON.parse(a.error.message)[0].message})},[e]);const o=ie.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")});return l.jsx("div",{className:"flex flex-col space-y-2",children:l.jsxs("div",{children:[l.jsx(Vt,{children:s("domain.deployment.form.cdn_domain.label")}),l.jsx(pe,{placeholder:s("domain.deployment.form.cdn_domain.placeholder"),className:"w-full mt-1",value:(i=e==null?void 0:e.config)==null?void 0:i.domain,onChange:a=>{const c=a.target.value,u=o.safeParse(c);u.success?r({...n,domain:""}):r({...n,domain:JSON.parse(u.error.message)[0].message});const d=qr(e,f=>{f.config||(f.config={}),f.config.domain=c});t(d)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},ZB=()=>{var a,c,u;const{deploy:e,setDeploy:t,error:n,setError:r}=Ya(),{t:s}=Ye();y.useEffect(()=>{r({})},[]),y.useEffect(()=>{var f;const d=o.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,domain:""}):r({...n,domain:JSON.parse(d.error.message)[0].message})},[e]),y.useEffect(()=>{var f;const d=i.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(d.error.message)[0].message})},[]),y.useEffect(()=>{e.id||t({...e,config:{endpoint:"oss-cn-hangzhou.aliyuncs.com",bucket:"",domain:""}})},[]);const o=ie.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")}),i=ie.string().min(1,{message:s("domain.deployment.form.oss_bucket.placeholder")});return l.jsx("div",{className:"flex flex-col space-y-2",children:l.jsxs("div",{children:[l.jsx(Vt,{children:s("domain.deployment.form.oss_endpoint.label")}),l.jsx(pe,{className:"w-full mt-1",value:(a=e==null?void 0:e.config)==null?void 0:a.endpoint,onChange:d=>{const f=d.target.value,h=qr(e,m=>{m.config||(m.config={}),m.config.endpoint=f});t(h)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.endpoint}),l.jsx(Vt,{children:s("domain.deployment.form.oss_bucket")}),l.jsx(pe,{placeholder:s("domain.deployment.form.oss_bucket.placeholder"),className:"w-full mt-1",value:(c=e==null?void 0:e.config)==null?void 0:c.bucket,onChange:d=>{const f=d.target.value,h=i.safeParse(f);h.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(h.error.message)[0].message});const m=qr(e,x=>{x.config||(x.config={}),x.config.bucket=f});t(m)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.bucket}),l.jsx(Vt,{children:s("domain.deployment.form.cdn_domain.label")}),l.jsx(pe,{placeholder:s("domain.deployment.form.cdn_domain.label"),className:"w-full mt-1",value:(u=e==null?void 0:e.config)==null?void 0:u.domain,onChange:d=>{const f=d.target.value,h=o.safeParse(f);h.success?r({...n,domain:""}):r({...n,domain:JSON.parse(h.error.message)[0].message});const m=qr(e,x=>{x.config||(x.config={}),x.config.domain=f});t(m)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},qB=()=>{var r;const{deploy:e,setDeploy:t}=Ya(),{setError:n}=Ya();return y.useEffect(()=>{n({})},[]),l.jsx(l.Fragment,{children:l.jsx(WB,{variables:(r=e==null?void 0:e.config)==null?void 0:r.variables,onValueChange:s=>{const o=qr(e,i=>{i.config||(i.config={}),i.config.variables=s});t(o)}})})},XB=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=ln(),[s,o]=y.useState(!1),{t:i}=Ye(),a=ie.object({email:ie.string().email("common.errmsg.email_invalid")}),c=cn({resolver:un(a),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"common.errmsg.email_duplicate"});return}const f=[...n.content.emails,d.email];try{const h=await al({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),o(!1)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsxs(cl,{onOpenChange:o,open:s,children:[l.jsx(ul,{asChild:!0,className:re(e),children:t}),l.jsxs(Pi,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ri,{children:l.jsx(Ai,{children:i("domain.application.form.email.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"email",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:i("domain.application.form.email.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:i("common.errmsg.email_empty"),...d,type:"email"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:i("common.save")})})]})})})]})]})},hT={domain:"common.text.domain",ip:"common.text.ip",dns:"common.text.dns"},t1=({value:e,className:t,onValueChange:n,valueType:r="domain"})=>{const[s,o]=y.useState([]),{t:i}=Ye();y.useMemo(()=>{e&&o(e.split(";"))},[e]),y.useEffect(()=>{(()=>{n(s.join(";"))})()},[s]);const a=d=>{s.includes(d)||o([...s,d])},c=(d,f)=>{const h=[...s];h[d]=f,o(h)},u=d=>{const f=[...s];f.splice(d,1),o(f)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:re(t),children:[l.jsxs(Ce,{className:"flex justify-between items-center",children:[l.jsx("div",{children:i(hT[r])}),l.jsx(dr,{when:s.length>0,children:l.jsx(pp,{op:"add",onValueChange:d=>{a(d)},valueType:r,value:"",trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(pi,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:i("common.add")})]})})})]}),l.jsx(je,{children:l.jsx(dr,{when:s.length>0,fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:i("common.text."+r+".empty")}),l.jsx(pp,{value:"",trigger:i("common.add"),onValueChange:a,valueType:r})]}),children:l.jsx("div",{className:"border rounded-md p-3 text-sm mt-2 text-gray-700 space-y-2 dark:text-white dark:border-stone-700 dark:bg-stone-950",children:s.map((d,f)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{children:d}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(pp,{op:"edit",valueType:r,trigger:l.jsx(ov,{size:16,className:"cursor-pointer text-gray-600 dark:text-white"}),value:d,onValueChange:h=>{c(f,h)}}),l.jsx(iv,{size:16,className:"cursor-pointer",onClick:()=>{u(f)}})]})]},f))})})})]})})},pp=({trigger:e,value:t,onValueChange:n,op:r="add",valueType:s})=>{const[o,i]=y.useState(""),[a,c]=y.useState(!1),[u,d]=y.useState(""),{t:f}=Ye();y.useEffect(()=>{i(t)},[t]);const h=ie.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:f("common.errmsg.domain_invalid")}),m=ie.string().ip({message:f("common.errmsg.ip_invalid")}),x={domain:h,dns:m,host:m},p=y.useCallback(()=>{const g=x[s].safeParse(o);if(!g.success){d(JSON.parse(g.error.message)[0].message);return}i(""),c(!1),d(""),n(o)},[o]);return l.jsxs(cl,{open:a,onOpenChange:w=>{c(w)},children:[l.jsx(ul,{className:"text-primary",children:e}),l.jsxs(Pi,{className:"dark:text-white",children:[l.jsx(Ri,{children:l.jsx(Ai,{className:"dark:text-white",children:f(hT[s])})}),l.jsx(pe,{value:o,className:"dark:text-white",onChange:w=>{i(w.target.value)}}),l.jsx(dr,{when:u.length>0,children:l.jsx("div",{className:"text-red-500 text-sm",children:u})}),l.jsx(Jh,{children:l.jsx(Me,{onClick:()=>{p()},children:f(r==="add"?"common.add":"common.confirm")})})]})]})},QB=()=>{const{config:{accesses:e,emails:t}}=ln(),[n,r]=y.useState({}),s=Mr(),{t:o}=Ye(),[i,a]=y.useState("apply");y.useEffect(()=>{const x=new URLSearchParams(s.search).get("id");x&&(async()=>{const w=await XU(x);r(w)})()},[s.search]);const c=ie.object({id:ie.string().optional(),domain:ie.string().min(1,{message:"common.errmsg.domain_invalid"}),email:ie.string().email("common.errmsg.email_invalid").optional(),access:ie.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.application.form.access.placeholder"}),keyAlgorithm:ie.string().optional(),nameservers:ie.string().optional(),timeout:ie.number().optional()}),u=cn({resolver:un(c),defaultValues:{id:"",domain:"",email:"",access:"",keyAlgorithm:"RSA2048",nameservers:"",timeout:60}});y.useEffect(()=>{var m,x,p,w,g;n&&u.reset({id:n.id,domain:n.domain,email:(m=n.applyConfig)==null?void 0:m.email,access:(x=n.applyConfig)==null?void 0:x.access,keyAlgorithm:(p=n.applyConfig)==null?void 0:p.keyAlgorithm,nameservers:(w=n.applyConfig)==null?void 0:w.nameservers,timeout:(g=n.applyConfig)==null?void 0:g.timeout})},[n,u]);const{toast:d}=Fr(),f=async m=>{const x={id:m.id,crontab:"0 0 * * *",domain:m.domain,email:m.email,access:m.access,applyConfig:{email:m.email??"",access:m.access,keyAlgorithm:m.keyAlgorithm,nameservers:m.nameservers,timeout:m.timeout}};try{const p=await mf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||a("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([g,v])=>{u.setError(g,{type:"manual",message:v.message})});return}},h=async m=>{const x={...n,deployConfig:m};try{const p=await mf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||a("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([g,v])=>{u.setError(g,{type:"manual",message:v.message})});return}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Rx,{}),l.jsx("div",{className:" h-5 text-muted-foreground",children:l.jsx(YN,{children:l.jsxs(KN,{children:[l.jsx(Ug,{children:l.jsx(GN,{href:"#/domains",children:o("domain.page.title")})}),l.jsx(qN,{}),l.jsx(Ug,{children:l.jsx(ZN,{children:n!=null&&n.id?o("domain.edit"):o("domain.add")})})]})})}),l.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex md:mt-5",children:[l.jsx("div",{className:re("cursor-pointer text-right",i==="apply"?"text-primary":""),onClick:()=>{a("apply")},children:o("domain.application.tab")}),l.jsx("div",{className:re("cursor-pointer text-right",i==="deploy"?"text-primary":""),onClick:()=>{if(!(n!=null&&n.id)){d({title:o("domain.application.unsaved.message"),description:o("domain.application.unsaved.message"),variant:"destructive"});return}a("deploy")},children:o("domain.deployment.tab")})]}),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:re("w-full md:w-[35em] p-5 rounded mt-3 md:mt-0",i=="deploy"&&"hidden"),children:l.jsx(dn,{...u,children:l.jsxs("form",{onSubmit:u.handleSubmit(f),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:u.control,name:"domain",render:({field:m})=>l.jsxs(be,{children:[l.jsx(l.Fragment,{children:l.jsx(t1,{value:m.value,valueType:"domain",onValueChange:x=>{u.setValue("domain",x)}})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:u.control,name:"email",render:({field:m})=>l.jsxs(be,{children:[l.jsxs(Ce,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.application.form.email.label")+" "+o("domain.application.form.email.tips")}),l.jsx(XB,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),o("common.add")]})})]}),l.jsx(je,{children:l.jsxs(ii,{...m,value:m.value,onValueChange:x=>{u.setValue("email",x)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:o("domain.application.form.email.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:o("domain.application.form.email.list")}),t.content.emails.map(x=>l.jsx(Pn,{value:x,children:l.jsx("div",{children:x})},x))]})})]})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:u.control,name:"access",render:({field:m})=>l.jsxs(be,{children:[l.jsxs(Ce,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.application.form.access.label")}),l.jsx(ha,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),o("common.add")]}),op:"add"})]}),l.jsx(je,{children:l.jsxs(ii,{...m,value:m.value,onValueChange:x=>{u.setValue("access",x)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:o("domain.application.form.access.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:o("domain.application.form.access.list")}),e.filter(x=>x.usage!="deploy").map(x=>{var p;return l.jsx(Pn,{value:x.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(p=As.get(x.configType))==null?void 0:p[1]}),l.jsx("div",{children:x.name})]})},x.id)})]})})]})}),l.jsx(ye,{})]})}),l.jsxs("div",{children:[l.jsx("hr",{}),l.jsxs(TV,{children:[l.jsx(PV,{className:"w-full my-4",children:l.jsxs("div",{className:"flex items-center justify-between space-x-4",children:[l.jsx("span",{className:"flex-1 text-sm text-gray-600 text-left",children:o("domain.application.form.advanced_settings.label")}),l.jsx(nI,{className:"h-4 w-4"})]})}),l.jsx(t2,{children:l.jsxs("div",{className:"flex flex-col space-y-8",children:[l.jsx(ke,{control:u.control,name:"keyAlgorithm",render:({field:m})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("domain.application.form.key_algorithm.label")}),l.jsxs(ii,{...m,value:m.value,onValueChange:x=>{u.setValue("keyAlgorithm",x)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:o("domain.application.form.key_algorithm.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Pn,{value:"RSA2048",children:"RSA2048"}),l.jsx(Pn,{value:"RSA3072",children:"RSA3072"}),l.jsx(Pn,{value:"RSA4096",children:"RSA4096"}),l.jsx(Pn,{value:"RSA8192",children:"RSA8192"}),l.jsx(Pn,{value:"EC256",children:"EC256"}),l.jsx(Pn,{value:"EC384",children:"EC384"})]})})]})]})}),l.jsx(ke,{control:u.control,name:"nameservers",render:({field:m})=>l.jsxs(be,{children:[l.jsx(t1,{value:m.value??"",onValueChange:x=>{u.setValue("nameservers",x)},valueType:"dns"}),l.jsx(ye,{})]})}),l.jsx(ke,{control:u.control,name:"timeout",render:({field:m})=>l.jsxs(be,{children:[l.jsx(Ce,{children:o("domain.application.form.timeout.label")}),l.jsx(je,{children:l.jsx(pe,{type:"number",placeholder:o("domain.application.form.timeout.placeholder"),...m,value:m.value,onChange:x=>{u.setValue("timeout",parseInt(x.target.value))}})}),l.jsx(ye,{})]})})]})})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:n!=null&&n.id?o("common.save"):o("common.next")})})]})})}),l.jsx("div",{className:re("flex flex-col space-y-5 w-full md:w-[35em]",i=="apply"&&"hidden"),children:l.jsx(YB,{deploys:(n==null?void 0:n.deployConfig)??[],onChange:m=>{h(m)}})})]})]})]})})};var Qx="Tabs",[JB,r9]=on(Qx,[rl]),mT=rl(),[eW,Jx]=JB(Qx),pT=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=Ci(a),[f,h]=Zn({prop:r,onChange:s,defaultProp:o});return l.jsx(eW,{scope:n,baseId:Wn(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:l.jsx(Pe.div,{dir:d,"data-orientation":i,...u,ref:t})})});pT.displayName=Qx;var gT="TabsList",yT=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=Jx(gT,n),i=mT(n);return l.jsx(Cv,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:l.jsx(Pe.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});yT.displayName=gT;var vT="TabsTrigger",xT=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,i=Jx(vT,n),a=mT(n),c=_T(i.baseId,r),u=ST(i.baseId,r),d=r===i.value;return l.jsx(jv,{asChild:!0,...a,focusable:!s,active:d,children:l.jsx(Pe.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})});xT.displayName=vT;var wT="TabsContent",bT=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=e,a=Jx(wT,n),c=_T(a.baseId,r),u=ST(a.baseId,r),d=r===a.value,f=y.useRef(d);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(an,{present:s||d,children:({present:h})=>l.jsx(Pe.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});bT.displayName=wT;function _T(e,t){return`${e}-trigger-${t}`}function ST(e,t){return`${e}-content-${t}`}var tW=pT,kT=yT,CT=xT,jT=bT;const ET=tW,e0=y.forwardRef(({className:e,...t},n)=>l.jsx(kT,{ref:n,className:re("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));e0.displayName=kT.displayName;const ei=y.forwardRef(({className:e,...t},n)=>l.jsx(CT,{ref:n,className:re("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));ei.displayName=CT.displayName;const If=y.forwardRef(({className:e,...t},n)=>l.jsx(jT,{ref:n,className:re("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));If.displayName=jT.displayName;const NT=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));NT.displayName="Card";const TT=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex flex-col space-y-1.5 p-6",e),...t}));TT.displayName="CardHeader";const PT=y.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:re("text-2xl font-semibold leading-none tracking-tight",e),...t}));PT.displayName="CardTitle";const RT=y.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:re("text-sm text-muted-foreground",e),...t}));RT.displayName="CardDescription";const AT=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("p-6 pt-0",e),...t}));AT.displayName="CardContent";const DT=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex items-center p-6 pt-0",e),...t}));DT.displayName="CardFooter";const Us=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",nW=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=ln(),{toast:n}=Fr(),r=er(),{t:s}=Ye(),o=async a=>{try{await k$(a),t()}catch(c){n({title:s("common.delete.failed.message"),description:Us(c),variant:"destructive"});return}},i=()=>{r("/access")};return l.jsxs("div",{className:"mt-10",children:[l.jsx(dr,{when:e.length==0,children:l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(Yw,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domains.nodata")}),l.jsx(Gx,{trigger:l.jsx(Me,{children:s("access.group.add")}),className:"mt-3"})]})})}),l.jsx(nm,{className:"h-[75vh] overflow-hidden",children:l.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(a=>l.jsxs(NT,{className:"w-full md:w-[350px]",children:[l.jsxs(TT,{children:[l.jsx(PT,{children:a.name}),l.jsx(RT,{children:s("access.group.total",{total:a.expand?a.expand.access.length:0})})]}),l.jsx(AT,{className:"min-h-[180px]",children:a.expand?l.jsx(l.Fragment,{children:a.expand.access.slice(0,3).map(c=>l.jsx("div",{className:"flex flex-col mb-3",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"",children:l.jsx("img",{src:Gb(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),l.jsxs("div",{className:"ml-3",children:[l.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:Gb(c.configType)[0]})]})]})},c.id))}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[l.jsx("div",{children:l.jsx(Yw,{size:40})}),l.jsx("div",{className:"ml-2",children:s("access.group.nodata")})]})})}),l.jsx(DT,{children:l.jsxs("div",{className:"flex justify-end w-full",children:[l.jsx(dr,{when:!!(a.expand&&a.expand.access.length>0),children:l.jsx("div",{children:l.jsx(Me,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${a.id}&tab=access`,{replace:!0})},children:s("access.group.domains")})})}),l.jsx(dr,{when:!a.expand||a.expand.access.length==0,children:l.jsx("div",{children:l.jsx(Me,{size:"sm",onClick:i,children:s("access.authorization.add")})})}),l.jsx("div",{className:"ml-3",children:l.jsxs(kx,{children:[l.jsx(Cx,{asChild:!0,children:l.jsx(Me,{variant:"destructive",size:"sm",children:s("common.delete")})}),l.jsxs(Mh,{children:[l.jsxs(Lh,{children:[l.jsx(Fh,{className:"dark:text-gray-200",children:s("access.group.delete")}),l.jsx($h,{children:s("access.group.delete.confirm")})]}),l.jsxs(zh,{children:[l.jsx(Vh,{className:"dark:text-gray-200",children:s("common.cancel")}),l.jsx(Uh,{onClick:()=>{o(a.id?a.id:"")},children:s("common.confirm")})]})]})]})})]})})]}))})})]})},rW=()=>{const{t:e}=Ye(),{config:t,deleteAccess:n}=ln(),{accesses:r}=t,s=10,o=Math.ceil(r.length/s),i=er(),a=Mr(),c=new URLSearchParams(a.search),u=c.get("page"),d=u?Number(u):1,f=c.get("tab"),h=c.get("accessGroupId"),m=(d-1)*s,x=m+s,p=async g=>{const v=await S$(g);n(v.id)},w=g=>{c.set("tab",g),i({search:c.toString()})};return l.jsxs("div",{className:"",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:e("access.page.title")}),f!="access_group"?l.jsx(ha,{trigger:l.jsx(Me,{children:e("access.authorization.add")}),op:"add"}):l.jsx(Gx,{trigger:l.jsx(Me,{children:e("access.group.add")})})]}),l.jsxs(ET,{defaultValue:f||"access",value:f||"access",className:"w-full mt-5",children:[l.jsxs(e0,{className:"space-x-5 px-3",children:[l.jsx(ei,{value:"access",onClick:()=>{w("access")},children:e("access.authorization.tab")}),l.jsx(ei,{value:"access_group",onClick:()=>{w("access_group")},children:e("access.group.tab")})]}),l.jsx(If,{value:"access",children:r.length===0?l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(aI,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:e("access.authorization.nodata")}),l.jsx(ha,{trigger:l.jsx(Me,{children:e("access.authorization.add")}),op:"add",className:"mt-3"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:e("common.text.name")}),l.jsx("div",{className:"w-48",children:e("common.text.provider")}),l.jsx("div",{className:"w-60",children:e("common.text.created_at")}),l.jsx("div",{className:"w-60",children:e("common.text.updated_at")}),l.jsx("div",{className:"grow",children:e("common.text.operations")})]}),r.filter(g=>h?g.group==h:!0).slice(m,x).map(g=>{var v,b;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:g.name}),l.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[l.jsx("img",{src:(v=As.get(g.configType))==null?void 0:v[1],className:"w-6"}),l.jsx("div",{children:e(((b=As.get(g.configType))==null?void 0:b[0])||"")})]}),l.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:g.created&&za(g.created)}),l.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:g.updated&&za(g.updated)}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(ha,{trigger:l.jsx(Me,{variant:"link",className:"p-0",children:e("common.edit")}),op:"edit",data:g}),l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(ha,{trigger:l.jsx(Me,{variant:"link",className:"p-0",children:e("common.copy")}),op:"copy",data:g}),l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(kx,{children:[l.jsx(Cx,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:e("common.delete")})}),l.jsxs(Mh,{children:[l.jsxs(Lh,{children:[l.jsx(Fh,{className:"dark:text-gray-200",children:e("access.authorization.delete")}),l.jsx($h,{children:e("access.authorization.delete.confirm")})]}),l.jsxs(zh,{children:[l.jsx(Vh,{className:"dark:text-gray-200",children:e("common.cancel")}),l.jsx(Uh,{onClick:()=>{p(g)},children:e("common.confirm")})]})]})]})]})]},g.id)}),l.jsx(bE,{totalPages:o,currentPage:d,onPageChange:g=>{c.set("page",g.toString()),i({search:c.toString()})}})]})}),l.jsx(If,{value:"access_group",children:l.jsx(nW,{})})]})]})},OT=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await ot().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},sW=()=>{const e=er(),[t,n]=y.useState(),[r]=CO(),{t:s}=Ye(),o=r.get("domain");return y.useEffect(()=>{(async()=>{const a={};o&&(a.domain=o);const c=await OT(a);n(c.items)})()},[o]),l.jsxs(nm,{className:"h-[80vh] overflow-hidden",children:[l.jsx("div",{className:"text-muted-foreground",children:s("history.page.title")}),t!=null&&t.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:s("history.props.domain")}),l.jsx("div",{className:"w-24",children:s("history.props.status")}),l.jsx("div",{className:"w-56",children:s("history.props.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("history.props.last_execution_time")}),l.jsx("div",{className:"grow",children:s("common.text.operations")})]}),t==null?void 0:t.map(i=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Sx,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(_x,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:za(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:s("history.log")})}),l.jsxs(wh,{className:"sm:max-w-5xl",children:[l.jsx(Kv,{children:l.jsxs(Gv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,s("history.log")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]}):l.jsx(l.Fragment,{children:l.jsxs(am,{className:"max-w-[40em] mx-auto mt-20",children:[l.jsx(Xx,{children:s("common.text.nodata")}),l.jsxs(lm,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(ak,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",s("history.nodata")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Me,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},oW=ie.object({username:ie.string().email({message:"login.username.errmsg.invalid"}),password:ie.string().min(10,{message:"login.password.errmsg.invalid"})}),iW=()=>{const{t:e}=Ye(),t=cn({resolver:un(oW),defaultValues:{username:"",password:""}}),n=async s=>{try{await ot().admins.authWithPassword(s.username,s.password),r("/")}catch(o){const i=Us(o);t.setError("username",{message:i}),t.setError("password",{message:i})}},r=er();return l.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[l.jsx("div",{className:"flex justify-center mb-10",children:l.jsx("img",{src:"/vite.svg",className:"w-16"})}),l.jsx(dn,{...t,children:l.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:t.control,name:"username",render:({field:s})=>l.jsxs(be,{children:[l.jsx(Ce,{children:e("login.username.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("login.username.placeholder"),...s})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:t.control,name:"password",render:({field:s})=>l.jsxs(be,{children:[l.jsx(Ce,{children:e("login.password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("login.password.placeholder"),...s,type:"password"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:e("login.submit")})})]})})]})},aW=()=>ot().authStore.isValid&&ot().authStore.isAdmin?l.jsx(ZS,{to:"/"}):l.jsxs("div",{className:"container",children:[l.jsx(nv,{}),l.jsx(aE,{})]}),lW=ie.object({oldPassword:ie.string().min(10,{message:"settings.password.password.errmsg.length"}),newPassword:ie.string().min(10,{message:"settings.password.password.errmsg.length"}),confirmPassword:ie.string().min(10,{message:"settings.password.password.errmsg.length"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"settings.password.password.errmsg.not_matched",path:["confirmPassword"]}),cW=()=>{const{toast:e}=Fr(),t=er(),{t:n}=Ye(),r=cn({resolver:un(lW),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async o=>{var i,a;try{await ot().admins.authWithPassword((i=ot().authStore.model)==null?void 0:i.email,o.oldPassword)}catch(c){const u=Us(c);r.setError("oldPassword",{message:u})}try{await ot().admins.update((a=ot().authStore.model)==null?void 0:a.id,{password:o.newPassword,passwordConfirm:o.confirmPassword}),ot().authStore.clear(),e({title:n("settings.password.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=Us(c);e({title:n("settings.password.failed.message"),description:u,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(dn,{...r,children:l.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:r.control,name:"oldPassword",render:({field:o})=>l.jsxs(be,{children:[l.jsx(Ce,{children:n("settings.password.current_password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.password.current_password.placeholder"),...o,type:"password"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:r.control,name:"newPassword",render:({field:o})=>l.jsxs(be,{children:[l.jsx(Ce,{children:n("settings.password.new_password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.password.new_password.placeholder"),...o,type:"password"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:r.control,name:"confirmPassword",render:({field:o})=>l.jsxs(be,{children:[l.jsx(Ce,{children:n("settings.password.confirm_password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.password.confirm_password.placeholder"),...o,type:"password"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:n("common.update")})})]})})})})},uW=()=>{const e=Mr(),[t,n]=y.useState("account"),r=er(),{t:s}=Ye();return y.useEffect(()=>{const i=e.pathname.split("/")[2];n(i)},[e]),l.jsxs("div",{children:[l.jsx(Rx,{}),l.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("settings.page.title")}),l.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:l.jsxs(ET,{defaultValue:"account",className:"w-full",value:t,children:[l.jsxs(e0,{className:"mx-auto",children:[l.jsxs(ei,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[l.jsx(gI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.account.tab")})]}),l.jsxs(ei,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[l.jsx(iI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.password.tab")})]}),l.jsxs(ei,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[l.jsx(uI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.notification.tab")})]}),l.jsxs(ei,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[l.jsx(hI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.ca.tab")})]})]}),l.jsx(If,{value:t,children:l.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:l.jsx(nv,{})})})]})})]})},dW=()=>{const[e,t]=y.useState(),[n,r]=y.useState(),s=er(),{t:o}=Ye();return y.useEffect(()=>{(async()=>{const a=await qU();t(a)})()},[]),y.useEffect(()=>{(async()=>{const c=await OT({perPage:8});r(c.items)})()},[]),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("div",{className:"text-muted-foreground",children:o("dashboard.page.title")})}),l.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(mI,{size:48,strokeWidth:1,className:"text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.all")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?l.jsx(wn,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(eI,{size:48,strokeWidth:1,className:"text-red-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.near_expired")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?l.jsx(wn,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(cI,{size:48,strokeWidth:1,className:"text-green-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?l.jsx(wn,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(QO,{size:48,strokeWidth:1,className:"text-gray-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.disabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?l.jsx(wn,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]})]}),l.jsx("div",{className:"my-4",children:l.jsx("hr",{})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:o("dashboard.history")}),(n==null?void 0:n.length)==0?l.jsx(l.Fragment,{children:l.jsxs(am,{className:"max-w-[40em] mt-10",children:[l.jsx(Xx,{children:o("common.text.nodata")}),l.jsxs(lm,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(ak,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",o("history.nodata")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Me,{onClick:()=>{s("/edit")},children:o("domain.add")})})]})]})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:o("history.props.domain")}),l.jsx("div",{className:"w-24",children:o("history.props.status")}),l.jsx("div",{className:"w-56",children:o("history.props.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:o("history.props.last_execution_time")}),l.jsx("div",{className:"grow",children:o("common.text.operations")})]}),n==null?void 0:n.map(i=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Sx,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(_x,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:za(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:o("history.log")})}),l.jsxs(wh,{className:"sm:max-w-5xl",children:[l.jsx(Kv,{children:l.jsxs(Gv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,o("history.log")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]})]})]})},fW=ie.object({email:ie.string().email("settings.account.email.errmsg.invalid")}),hW=()=>{var a;const{toast:e}=Fr(),t=er(),{t:n}=Ye(),[r,s]=y.useState(!1),o=cn({resolver:un(fW),defaultValues:{email:(a=ot().authStore.model)==null?void 0:a.email}}),i=async c=>{var u;try{await ot().admins.update((u=ot().authStore.model)==null?void 0:u.id,{email:c.email}),ot().authStore.clear(),e({title:n("settings.account.email.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=Us(d);e({title:n("settings.account.email.failed.message"),description:f,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(dn,{...o,children:l.jsxs("form",{onSubmit:o.handleSubmit(i),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:o.control,name:"email",render:({field:c})=>l.jsxs(be,{children:[l.jsx(Ce,{children:n("settings.account.email.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.account.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),o.setValue("email",u.target.value)}})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:r?l.jsx(Me,{type:"submit",children:n("common.update")}):l.jsx(Me,{type:"submit",disabled:!0,variant:"secondary",children:n("common.update")})})]})})})})};var qs="Accordion",mW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[t0,pW,gW]=eu(qs),[cm,s9]=on(qs,[gW,XN]),n0=XN(),IT=We.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,o=r;return l.jsx(t0.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(wW,{...o,ref:t}):l.jsx(xW,{...s,ref:t})})});IT.displayName=qs;var[MT,yW]=cm(qs),[LT,vW]=cm(qs,{collapsible:!1}),xW=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,c]=Zn({prop:n,defaultProp:r,onChange:s});return l.jsx(MT,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:We.useCallback(()=>o&&c(""),[o,c]),children:l.jsx(LT,{scope:e.__scopeAccordion,collapsible:o,children:l.jsx(zT,{...i,ref:t})})})}),wW=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[i=[],a]=Zn({prop:n,defaultProp:r,onChange:s}),c=We.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=We.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return l.jsx(MT,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:l.jsx(LT,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(zT,{...o,ref:t})})})}),[bW,um]=cm(qs),zT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=e,a=We.useRef(null),c=Ge(a,t),u=pW(n),f=Ci(s)==="ltr",h=ue(e.onKeyDown,m=>{var R;if(!mW.includes(m.key))return;const x=m.target,p=u().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),w=p.findIndex(A=>A.ref.current===x),g=p.length;if(w===-1)return;m.preventDefault();let v=w;const b=0,_=g-1,C=()=>{v=w+1,v>_&&(v=b)},j=()=>{v=w-1,v<b&&(v=_)};switch(m.key){case"Home":v=b;break;case"End":v=_;break;case"ArrowRight":o==="horizontal"&&(f?C():j());break;case"ArrowDown":o==="vertical"&&C();break;case"ArrowLeft":o==="horizontal"&&(f?j():C());break;case"ArrowUp":o==="vertical"&&j();break}const T=v%g;(R=p[T].ref.current)==null||R.focus()});return l.jsx(bW,{scope:n,disabled:r,direction:s,orientation:o,children:l.jsx(t0.Slot,{scope:n,children:l.jsx(Pe.div,{...i,"data-orientation":o,ref:c,onKeyDown:r?void 0:h})})})}),Mf="AccordionItem",[_W,r0]=cm(Mf),FT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=um(Mf,n),i=yW(Mf,n),a=n0(n),c=Wn(),u=r&&i.value.includes(r)||!1,d=o.disabled||e.disabled;return l.jsx(_W,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(e2,{"data-orientation":o.orientation,"data-state":HT(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});FT.displayName=Mf;var $T="AccordionHeader",UT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=r0($T,n);return l.jsx(Pe.h3,{"data-orientation":s.orientation,"data-state":HT(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});UT.displayName=$T;var ty="AccordionTrigger",VT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=r0(ty,n),i=vW(ty,n),a=n0(n);return l.jsx(t0.ItemSlot,{scope:n,children:l.jsx(EV,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...r,ref:t})})});VT.displayName=ty;var BT="AccordionContent",WT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=r0(BT,n),i=n0(n);return l.jsx(NV,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});WT.displayName=BT;function HT(e){return e?"open":"closed"}var SW=IT,kW=FT,CW=UT,YT=VT,KT=WT;const n1=SW,$l=y.forwardRef(({className:e,...t},n)=>l.jsx(kW,{ref:n,className:re("border-b",e),...t}));$l.displayName="AccordionItem";const Ul=y.forwardRef(({className:e,children:t,...n},r)=>l.jsx(CW,{className:"flex",children:l.jsxs(YT,{ref:r,className:re("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(sv,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Ul.displayName=YT.displayName;const Vl=y.forwardRef(({className:e,children:t,...n},r)=>l.jsx(KT,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:re("pb-4 pt-0",e),children:t})}));Vl.displayName=KT.displayName;const jW=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const n=t.payload.channel;return{...e,content:{...e.content,[n]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},GT=y.createContext({}),s0=()=>y.useContext(GT),EW=({children:e})=>{const[t,n]=y.useReducer(jW,{});y.useEffect(()=>{(async()=>{const i=await vx("notifyChannels");n({type:"SET_CHANNELS",payload:i})})()},[]);const r=y.useCallback(o=>{n({type:"SET_CHANNEL",payload:o})},[]),s=y.useCallback(o=>{n({type:"SET_CHANNELS",payload:o})},[]);return l.jsx(GT.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},NW=()=>{const{config:e,setChannels:t}=s0(),{t:n}=Ye(),[r,s]=y.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});y.useEffect(()=>{const c=(()=>{const u={accessToken:"",secret:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.dingtalk?d.dingtalk:u})();s({id:e.id??"",name:"dingtalk",data:c})},[e]);const{toast:o}=Fr(),i=async()=>{try{const a=await al({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=Us(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(pe,{placeholder:"AccessToken",value:r.data.accessToken,onChange:a=>{s({...r,data:{...r.data,accessToken:a.target.value}})}}),l.jsx(pe,{placeholder:n("settings.notification.dingtalk.secret.placeholder"),className:"mt-2",value:r.data.secret,onChange:a=>{s({...r,data:{...r.data,secret:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:()=>{i()},children:n("common.save")})})]})},TW={title:"您有 {COUNT} 张证书即将过期",content:"有 {COUNT} 张证书即将过期,域名分别为 {DOMAINS},请保持关注!"},PW=()=>{const[e,t]=y.useState(""),[n,r]=y.useState([TW]),{toast:s}=Fr(),{t:o}=Ye();y.useEffect(()=>{(async()=>{const d=await vx("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const i=u=>{const d=n[0];r([{...d,title:u}])},a=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await al({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:o("common.save.succeeded.message"),description:o("settings.notification.template.saved.message")})};return l.jsxs("div",{children:[l.jsx(pe,{value:n[0].title,onChange:u=>{i(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.title")}),l.jsx(Df,{className:"mt-2",value:n[0].content,onChange:u=>{a(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.content")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:c,children:o("common.save")})})]})},RW=()=>{const{config:e,setChannels:t}=s0(),{t:n}=Ye(),[r,s]=y.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});y.useEffect(()=>{const c=(()=>{const u={apiToken:"",chatId:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.telegram?d.telegram:u})();s({id:e.id??"",name:"common.provider.telegram",data:c})},[e]);const{toast:o}=Fr(),i=async()=>{try{const a=await al({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=Us(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(pe,{placeholder:"ApiToken",value:r.data.apiToken,onChange:a=>{s({...r,data:{...r.data,apiToken:a.target.value}})}}),l.jsx(pe,{placeholder:"ChatId",value:r.data.chatId,onChange:a=>{s({...r,data:{...r.data,chatId:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:()=>{i()},children:n("common.save")})})]})};function AW(e){try{return new URL(e),!0}catch{return!1}}const DW=()=>{const{config:e,setChannels:t}=s0(),{t:n}=Ye(),[r,s]=y.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});y.useEffect(()=>{const c=(()=>{const u={url:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.webhook?d.webhook:u})();s({id:e.id??"",name:"webhook",data:c})},[e]);const{toast:o}=Fr(),i=async()=>{try{if(r.data.url=r.data.url.trim(),!AW(r.data.url)){o({title:n("common.save.failed.message"),description:n("settings.notification.url.errmsg.invalid"),variant:"destructive"});return}const a=await al({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=Us(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(pe,{placeholder:"Url",value:r.data.url,onChange:a=>{s({...r,data:{...r.data,url:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:()=>{i()},children:n("common.save")})})]})},OW=()=>{const{t:e}=Ye();return l.jsx(l.Fragment,{children:l.jsxs(EW,{children:[l.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:l.jsx(n1,{type:"multiple",className:"dark:text-stone-200",children:l.jsxs($l,{value:"item-1",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("settings.notification.template.label")}),l.jsx(Vl,{children:l.jsx(PW,{})})]})})}),l.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:l.jsxs(n1,{type:"single",className:"dark:text-stone-200",children:[l.jsxs($l,{value:"item-2",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("common.provider.dingtalk")}),l.jsx(Vl,{children:l.jsx(NW,{})})]}),l.jsxs($l,{value:"item-4",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("common.provider.telegram")}),l.jsx(Vl,{children:l.jsx(RW,{})})]}),l.jsxs($l,{value:"item-5",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("common.provider.webhook")}),l.jsx(Vl,{children:l.jsx(DW,{})})]})]})})]})})};var o0="Radio",[IW,ZT]=on(o0),[MW,LW]=IW(o0),qT=y.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:c,...u}=e,[d,f]=y.useState(null),h=Ge(t,p=>f(p)),m=y.useRef(!1),x=d?!!d.closest("form"):!0;return l.jsxs(MW,{scope:n,checked:s,disabled:i,children:[l.jsx(Pe.button,{type:"button",role:"radio","aria-checked":s,"data-state":JT(s),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:h,onClick:ue(e.onClick,p=>{s||c==null||c(),x&&(m.current=p.isPropagationStopped(),m.current||p.stopPropagation())})}),x&&l.jsx(zW,{control:d,bubbles:!m.current,name:r,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});qT.displayName=o0;var XT="RadioIndicator",QT=y.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=LW(XT,n);return l.jsx(an,{present:r||o.checked,children:l.jsx(Pe.span,{"data-state":JT(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});QT.displayName=XT;var zW=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=y.useRef(null),i=jx(n),a=vv(t);return y.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function JT(e){return e?"checked":"unchecked"}var FW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],i0="RadioGroup",[$W,o9]=on(i0,[rl,ZT]),eP=rl(),tP=ZT(),[UW,VW]=$W(i0),nP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,m=eP(n),x=Ci(u),[p,w]=Zn({prop:o,defaultProp:s,onChange:f});return l.jsx(UW,{scope:n,name:r,required:i,disabled:a,value:p,onValueChange:w,children:l.jsx(Cv,{asChild:!0,...m,orientation:c,dir:x,loop:d,children:l.jsx(Pe.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x,...h,ref:t})})})});nP.displayName=i0;var rP="RadioGroupItem",sP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=VW(rP,n),i=o.disabled||r,a=eP(n),c=tP(n),u=y.useRef(null),d=Ge(t,u),f=o.value===s.value,h=y.useRef(!1);return y.useEffect(()=>{const m=p=>{FW.includes(p.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",x)}},[]),l.jsx(jv,{asChild:!0,...a,focusable:!i,active:f,children:l.jsx(qT,{disabled:i,required:o.required,checked:f,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:ue(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ue(s.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});sP.displayName=rP;var BW="RadioGroupIndicator",oP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=tP(n);return l.jsx(QT,{...s,...r,ref:t})});oP.displayName=BW;var iP=nP,aP=sP,WW=oP;const lP=y.forwardRef(({className:e,...t},n)=>l.jsx(iP,{className:re("grid gap-2",e),...t,ref:n}));lP.displayName=iP.displayName;const ny=y.forwardRef(({className:e,...t},n)=>l.jsx(aP,{ref:n,className:re("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(WW,{className:"flex items-center justify-center",children:l.jsx(ik,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ny.displayName=aP.displayName;const HW=()=>{const{t:e}=Ye(),t=ie.object({provider:ie.enum(["letsencrypt","zerossl"],{message:e("settings.ca.provider.errmsg.empty")}),eabKid:ie.string().optional(),eabHmacKey:ie.string().optional()}),n=cn({resolver:un(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=y.useState("letsencrypt"),[o,i]=y.useState(),{toast:a}=Fr();y.useEffect(()=>{(async()=>{const f=await vx("ssl-provider");if(f){i(f);const h=f.content;n.setValue("provider",h.provider),n.setValue("eabKid",h.config[h.provider].eabKid),n.setValue("eabHmacKey",h.config[h.provider].eabHmacKey),s(h.provider)}else n.setValue("provider","letsencrypt"),s("letsencrypt")})()},[]);const c=d=>r===d?"border-primary":"",u=async d=>{if(d.provider==="zerossl"&&(d.eabKid||n.setError("eabKid",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),!d.eabKid||!d.eabHmacKey))return;const f={id:o==null?void 0:o.id,name:"ssl-provider",content:{provider:d.provider,config:{letsencrypt:{},zerossl:{eabKid:d.eabKid??"",eabHmacKey:d.eabHmacKey??""}}}};try{await al(f),a({title:e("common.update.succeeded.message"),description:e("common.update.succeeded.message")})}catch(h){const m=Us(h);a({title:e("common.update.failed.message"),description:m,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(dn,{...n,children:l.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:n.control,name:"provider",render:({field:d})=>l.jsxs(be,{children:[l.jsx(Ce,{children:e("common.text.ca")}),l.jsx(je,{children:l.jsxs(lP,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(ny,{value:"letsencrypt",id:"letsencrypt"}),l.jsx(Vt,{htmlFor:"letsencrypt",children:l.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[l.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),l.jsx("div",{children:"Let's Encrypt"})]})})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(ny,{value:"zerossl",id:"zerossl"}),l.jsx(Vt,{htmlFor:"zerossl",children:l.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[l.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),l.jsx("div",{children:"ZeroSSL"})]})})]})]})}),l.jsx(ke,{control:n.control,name:"eabKid",render:({field:f})=>l.jsxs(be,{hidden:r!=="zerossl",children:[l.jsx(Ce,{children:"EAB_KID"}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("settings.ca.eab_kid.errmsg.empty"),...f,type:"text"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:n.control,name:"eabHmacKey",render:({field:f})=>l.jsxs(be,{hidden:r!=="zerossl",children:[l.jsx(Ce,{children:"EAB_HMAC_KEY"}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("settings.ca.eab_hmac_key.errmsg.empty"),...f,type:"text"})}),l.jsx(ye,{})]})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:e("common.update")})})]})})})})},YW=uO([{path:"/",element:l.jsx(D$,{}),children:[{path:"/",element:l.jsx(dW,{})},{path:"/domains",element:l.jsx(t8,{})},{path:"/edit",element:l.jsx(QB,{})},{path:"/access",element:l.jsx(rW,{})},{path:"/history",element:l.jsx(sW,{})},{path:"/setting",element:l.jsx(uW,{}),children:[{path:"/setting/password",element:l.jsx(cW,{})},{path:"/setting/account",element:l.jsx(hW,{})},{path:"/setting/notify",element:l.jsx(OW,{})},{path:"/setting/ssl-provider",element:l.jsx(HW,{})}]}]},{path:"/login",element:l.jsx(aW,{}),children:[{path:"/login",element:l.jsx(iW,{})}]},{path:"/about",element:l.jsx("div",{children:"About"})}]),KW={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Lf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||KW,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Lf(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Lf(this.logger,t)}}var Xr=new Lf;class dm{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a.apply(a,[t,...r])})}}const Nl=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},r1=e=>e==null?"":""+e,GW=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},ZW=/###/g,s1=e=>e&&e.indexOf("###")>-1?e.replace(ZW,"."):e,o1=e=>!e||typeof e=="string",nc=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s<r.length-1;){if(o1(e))return{};const o=s1(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return o1(e)?{}:{obj:e,k:s1(r[s])}},i1=(e,t,n)=>{const{obj:r,k:s}=nc(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),a=nc(e,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=nc(e,i,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},qW=(e,t,n,r)=>{const{obj:s,k:o}=nc(e,t,Object);s[o]=s[o]||[],s[o].push(n)},zf=(e,t)=>{const{obj:n,k:r}=nc(e,t);if(n)return n[r]},XW=(e,t,n)=>{const r=zf(e,n);return r!==void 0?r:zf(t,n)},cP=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):cP(e[r],t[r],n):e[r]=t[r]);return e},Hi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var QW={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const JW=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>QW[t]):e;class eH{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const tH=[" ",",","?","!",";"],nH=new eH(20),rH=(e,t,n)=>{t=t||"",n=n||"";const r=tH.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=nH.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},ry=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,a="";for(let c=o;c<r.length;++c)if(c!==o&&(a+=n),a+=r[c],i=s[a],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=i}return s},Ff=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class a1 extends dm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const c=zf(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!i||typeof r!="string"?c:ry(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),i1(this.data,a,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=zf(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?cP(c,r,o):c={...c,...r},i1(this.data,a,c),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var uP={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const l1={};class $f extends dm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),GW(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Xr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!rH(t,r,s);if(i&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let h=f&&f.res;const m=f&&f.usedKey||i,x=f&&f.exactUsedKey||i,p=Object.prototype.toString.apply(h),w=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&w.indexOf(p)<0&&!(typeof g=="string"&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,{...n,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(f.res=_,f.usedParams=this.getUsedParamsDetails(n),f):_}if(o){const _=Array.isArray(h),C=_?[]:{},j=_?x:m;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const R=`${j}${o}${T}`;C[T]=this.translate(R,{...n,joinArrays:!1,ns:a}),C[T]===R&&(C[T]=h[T])}h=C}}else if(v&&typeof g=="string"&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,C=!1;const j=n.count!==void 0&&typeof n.count!="string",T=$f.hasDefaultValue(n),R=j?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",O=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=G),this.isValidLookup(h)||(C=!0,h=i);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,S=T&&G!==h&&this.options.updateMissing;if(C||_||S){if(this.logger.log(S?"updateKey":"missingKey",u,c,i,S?G:h),o){const W=this.resolve(i,{...n,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let W=0;W<J.length;W++)U.push(J[W]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(n.lng||this.language):U.push(n.lng||this.language);const F=(W,I,X)=>{const $=T&&X!==h?X:z;this.options.missingKeyHandler?this.options.missingKeyHandler(W,c,I,$,S,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,c,I,$,S,n),this.emit("missingKey",W,c,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{F([W],i+X,n[`defaultValue${X}`]||G)})}):F(U,i,G))}h=this.extendTranslation(h,t,n,f,r),C&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${i}`),(C||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${i}`:i,_?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),u){const h=t.match(this.interpolator.nestingRegexp),m=h&&h.length;d<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var h=arguments.length,m=new Array(h),x=0;x<h;x++)m[x]=arguments[x];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=typeof a=="string"?[a]:a;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=uP.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,a;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;s=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",m=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",p=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{this.isValidLookup(r)||(a=w,!l1[`${p[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(l1[`${p[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(g=>{if(this.isValidLookup(r))return;i=g;const v=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,d,g,w,n);else{let _;h&&(_=this.pluralResolver.getSuffix(g,n.count,n));const C=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(v.push(d+_),n.ordinal&&_.indexOf(j)===0&&v.push(d+_.replace(j,this.options.pluralSeparator)),m&&v.push(d+C)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;v.push(T),h&&(v.push(T+_),n.ordinal&&_.indexOf(j)===0&&v.push(T+_.replace(j,this.options.pluralSeparator)),m&&v.push(T+C))}}let b;for(;b=v.pop();)this.isValidLookup(r)||(o=b,r=this.getResource(g,w,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const gp=e=>e.charAt(0).toUpperCase()+e.slice(1);class c1{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xr.create("languageUtils")}getScriptPartFromCode(t){if(t=Ff(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ff(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=gp(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=gp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=gp(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let sH=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],oH={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const iH=["v1","v2","v3"],aH=["v4"],u1={zero:0,one:1,two:2,few:3,many:4,other:5},lH=()=>{const e={};return sH.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:oH[t.fc]}})}),e};class cH{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Xr.create("pluralResolver"),(!this.options.compatibilityJSON||aH.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=lH(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=Ff(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[o]=i,i}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>u1[s]-u1[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!iH.includes(this.options.compatibilityJSON)}}const d1=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=XW(e,t,n);return!o&&s&&typeof n=="string"&&(o=ry(e,n,r),o===void 0&&(o=ry(t,n,r))),o},yp=e=>e.replace(/\$/g,"$$$$");class uH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:x,nestingSuffixEscaped:p,nestingOptionsSeparator:w,maxReplaces:g,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:JW,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Hi(o):i||"{{",this.suffix=a?Hi(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Hi(h):m||Hi("$t("),this.nestingSuffix=x?Hi(x):p||Hi(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const g=d1(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...s,...n,interpolationkey:m}):g}const x=m.split(this.formatSeparator),p=x.shift().trim(),w=x.join(this.formatSeparator).trim();return this.format(d1(n,c,p,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:p})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>yp(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?yp(this.escape(m)):yp(m)}].forEach(m=>{for(a=0;o=m.regex.exec(t);){const x=o[1].trim();if(i=u(x),i===void 0)if(typeof d=="function"){const w=d(t,o,s);i=typeof w=="string"?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=r1(i));const p=m.safeValue(i);if(t=t.replace(o[0],p),f?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const a=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,i);const m=h.match(/'/g),x=h.match(/"/g);(m&&m.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),u&&(i={...u,...i})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,p),`${c}${d}${h}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),c=d,u=!0}if(o=n(a.call(this,s[1].trim(),i),i),o&&s[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=r1(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const dH=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...c]=i.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Yi=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(Ff(r),s),t[i]=a),a(n)}};class fH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xr.create("formatter"),this.options=t,this.formats={number:Yi((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Yi((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Yi((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Yi((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Yi((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Yi(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,c)=>{const{formatName:u,formatOptions:d}=dH(c);if(this.formats[u]){let f=a;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](a,m,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const hH=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class mH extends dm{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Xr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},a={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?i[h]===void 0&&(i[h]=!0):(this.state[h]=1,d=!1,i[h]===void 0&&(i[h]=!0),o[h]===void 0&&(o[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{qW(c.loaded,[o],i),hH(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,a),this.loaded(t,i,a)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,c):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,s,a,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const f1=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),h1=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),rd=()=>{},pH=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Kc extends dm{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=h1(t),this.services={},this.logger=Xr,this.modules={external:[]},pH(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=f1();this.options={...s,...this.options,...h1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Xr.init(o(this.modules.logger),this.options):Xr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=fH);const f=new c1(this.options);this.store=new a1(this.options.resources,this.options);const h=this.services;h.logger=Xr,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new cH(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new uH(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new mH(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new $f(this.services,this.options),this.translator.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rd),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=Nl(),u=()=>{const d=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rd;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>i(c)),this.options.preload&&this.options.preload.forEach(a=>i(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const s=Nl();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=rd),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&uP.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Nl();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},i=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const o=function(i,a){let c;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];c=s.options.overloadTranslationOptionHandler([i,a].concat(d))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const h=s.options.keySeparator||".";let m;return c.keyPrefix&&Array.isArray(i)?m=i.map(x=>`${c.keyPrefix}${h}${x}`):m=c.keyPrefix?`${c.keyPrefix}${h}${i}`:i,s.t(m,c)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Nl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Nl();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new c1(f1());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Kc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rd;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Kc(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new a1(this.store.data,s),o.services.resourceStore=o.store),o.translator=new $f(o.services,s),o.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];o.emit(a,...u)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vn=Kc.createInstance();vn.createInstance=Kc.createInstance;vn.createInstance;vn.dir;vn.init;vn.loadResources;vn.reloadResources;vn.use;vn.changeLanguage;vn.getFixedT;vn.t;vn.exists;vn.setDefaultNamespace;vn.hasLoadedNamespace;vn.loadNamespaces;vn.loadLanguages;const{slice:gH,forEach:yH}=[];function vH(e){return yH.call(gH.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const m1=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,xH=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!m1.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!m1.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},p1={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=xH(e,encodeURIComponent(t),s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e){this.create(e,"",-1)}};var wH={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return p1.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&p1.create(n,e,r,s,o)}},bH={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const i=s.substring(1).split("&");for(let a=0;a<i.length;a++){const c=i[a].indexOf("=");c>0&&i[a].substring(0,c)===t&&(n=i[a].substring(c+1))}}return n}};let Tl=null;const g1=()=>{if(Tl!==null)return Tl;try{Tl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Tl=!1}return Tl};var _H={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&g1())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&g1()&&window.localStorage.setItem(n,e)}};let Pl=null;const y1=()=>{if(Pl!==null)return Pl;try{Pl=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Pl=!1}return Pl};var SH={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&y1())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&y1()&&window.sessionStorage.setItem(n,e)}},kH={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},CH={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},jH={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},EH={name:"subdomain",lookup(e){var s,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(s=window.location)==null?void 0:s.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function NH(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class dP{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=vH(n,this.options||{},NH()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(wH),this.addDetector(bH),this.addDetector(_H),this.addDetector(SH),this.addDetector(kH),this.addDetector(CH),this.addDetector(jH),this.addDetector(EH)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}dP.type="languageDetector";const TH={"common.add":"新增","common.save":"保存","common.save.succeeded.message":"保存成功","common.save.failed.message":"保存失败","common.edit":"编辑","common.copy":"复制","common.download":"下载","common.delete":"刪除","common.delete.succeeded.message":"删除成功","common.delete.failed.message":"删除失败","common.next":"下一步","common.confirm":"确认","common.cancel":"取消","common.submit":"提交","common.update":"更新","common.update.succeeded.message":"修改成功","common.update.failed.message":"修改失败","common.text.domain":"域名","common.text.domain.empty":"无域名","common.text.ip":"IP 地址","common.text.ip.empty":"无 IP 地址","common.text.dns":"DNS(域名服务器)","common.text.dns.empty":"无 DNS 地址","common.text.ca":"CA(证书颁发机构)","common.text.name":"名称","common.text.provider":"服务商","common.text.created_at":"创建时间","common.text.updated_at":"更新时间","common.text.operations":"操作","common.text.nodata":"暂无数据","common.menu.settings":"系统设置","common.menu.logout":"退出登录","common.menu.document":"文档","common.pagination.next":"下一页","common.pagination.prev":"上一页","common.pagination.more":"更多","common.theme.light":"浅色","common.theme.dark":"暗黑","common.theme.system":"跟随系统","common.errmsg.string_max":"请输入不超过 {{max}} 个字符","common.errmsg.email_empty":"请输入邮箱","common.errmsg.email_invalid":"请输入正确的邮箱","common.errmsg.email_duplicate":"邮箱已存在","common.errmsg.domain_invalid":"请输入正确的域名","common.errmsg.host_invalid":"请输入正确的域名或 IP 地址","common.errmsg.ip_invalid":"请输入正确的 IP 地址","common.errmsg.url_invalid":"请输入正确的 URL","common.provider.tencent":"腾讯云","common.provider.tencent.cdn":"腾讯云 - CDN","common.provider.aliyun":"阿里云","common.provider.aliyun.oss":"阿里云 - OSS","common.provider.aliyun.cdn":"阿里云 - CDN","common.provider.aliyun.dcdn":"阿里云 - DCDN","common.provider.huaweicloud":"华为云","common.provider.qiniu":"七牛云","common.provider.qiniu.cdn":"七牛云 - CDN","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"本地部署","common.provider.ssh":"SSH 部署","common.provider.webhook":"Webhook","common.provider.dingtalk":"钉钉","common.provider.telegram":"Telegram"},PH={"login.username.label":"用户名","login.username.placeholder":"请输入用户名/邮箱","login.username.errmsg.invalid":"请输入正确的用户名/邮箱","login.password.label":"密码","login.password.placeholder":"请输入密码","login.password.errmsg.invalid":"密码至少 10 个字符","login.submit":"登录"},RH={"dashboard.page.title":"仪表盘","dashboard.statistics.all":"所有","dashboard.statistics.near_expired":"即将过期","dashboard.statistics.enabled":"启用中","dashboard.statistics.disabled":"未启用","dashboard.statistics.unit":"个","dashboard.history":"部署历史"},AH={"settings.page.title":"系统设置","settings.account.relogin.message":"请重新登录","settings.account.tab":"账号","settings.account.email.label":"登录邮箱","settings.account.email.errmsg.invalid":"请输入正确的邮箱地址","settings.account.email.placeholder":"请输入邮箱","settings.account.email.changed.message":"修改账户邮箱成功","settings.account.email.failed.message":"修改账户邮箱失败","settings.password.tab":"密码","settings.password.password.errmsg.length":"密码至少10个字符","settings.password.password.errmsg.not_matched":"两次密码不一致","settings.password.current_password.label":"当前密码","settings.password.current_password.placeholder":"请输入旧密码","settings.password.new_password.label":"新密码","settings.password.new_password.placeholder":"请输入新密码","settings.password.confirm_password.label":"确认密码","settings.password.confirm_password.placeholder":"请再次输入新密码","settings.password.changed.message":"修改密码成功","settings.password.failed.message":"修改密码失败","settings.notification.tab":"消息推送","settings.notification.template.label":"内容模板","settings.notification.template.saved.message":"通知模板保存成功","settings.notification.template.variables.tips.title":"可选的变量({COUNT}: 即将过期张数)","settings.notification.template.variables.tips.content":"可选的变量({COUNT}: 即将过期张数;{DOMAINS}: 域名列表)","settings.notification.config.enable":"是否启用","settings.notification.config.saved.message":"配置保存成功","settings.notification.config.failed.message":"配置保存失败","settings.notification.dingtalk.secret.placeholder":"加签的签名","settings.notification.url.errmsg.invalid":"URL 格式不正确","settings.ca.tab":"证书颁发机构(CA)","settings.ca.provider.errmsg.empty":"请选择证书分发机构","settings.ca.eab_kid.errmsg.empty":"请输入EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"请输入EAB_HMAC_KEY","settings.ca.eab_kid_hmac_key.errmsg.empty":"请输入EAB_KID和EAB_HMAC_KEY"},DH={"domain.page.title":"域名列表","domain.nodata":"请添加域名开始部署证书吧。","domain.add":"新增域名","domain.edit":"编辑域名","domain.delete":"删除域名","domain.delete.confirm":"确定要删除域名吗?","domain.history":"部署历史","domain.deploy":"立即部署","domain.deploy.started.message":"开始部署","domain.deploy.started.tips":"已发起部署,请稍后查看部署日志。","domain.deploy.failed.message":"执行失败","domain.deploy.failed.tips":"执行失败,请在 <1>部署历史</1> 查看详情。","domain.deploy_forced":"强行部署","domain.props.expiry":"有效期限","domain.props.expiry.date1":"有效期 {{date}} 天","domain.props.expiry.date2":"{{date}} 到期","domain.props.last_execution_status":"最近执行状态","domain.props.last_execution_stage":"最近执行阶段","domain.props.last_execution_time":"最近执行时间","domain.props.enable":"是否启用","domain.props.enable.enabled":"启用","domain.props.enable.disabled":"禁用","domain.application.tab":"申请配置","domain.application.form.domain.added.message":"域名添加成功","domain.application.form.domain.changed.message":"域名编辑成功","domain.application.form.email.label":"邮箱","domain.application.form.email.tips":"(申请证书需要提供邮箱)","domain.application.form.email.placeholder":"请选择邮箱","domain.application.form.email.add":"添加邮箱","domain.application.form.email.list":"邮箱列表","domain.application.form.access.label":"DNS 服务商授权配置","domain.application.form.access.placeholder":"请选择 DNS 服务商授权配置","domain.application.form.access.list":"已有的 DNS 服务商授权配置","domain.application.form.advanced_settings.label":"高级设置","domain.application.form.key_algorithm.label":"数字证书算法","domain.application.form.key_algorithm.placeholder":"请选择数字证书算法","domain.application.form.timeout.label":"DNS 传播检查超时时间(单位:秒)","domain.application.form.timeoue.placeholder":"请输入 DNS 传播检查超时时间","domain.application.unsaved.message":"请先保存申请配置","domain.deployment.tab":"部署配置","domain.deployment.nodata":"暂无部署配置,请添加后开始部署证书吧","domain.deployment.form.type.label":"部署方式","domain.deployment.form.type.placeholder":"请选择部署方式","domain.deployment.form.type.list":"支持的部署方式","domain.deployment.form.access.label":"授权配置","domain.deployment.form.access.placeholder":"请选择授权配置","domain.deployment.form.access.list":"已有的服务商授权配置","domain.deployment.form.cdn_domain.label":"部署到域名","domain.deployment.form.cdn_domain.placeholder":"请输入 CDN 域名","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_bucket":"存储桶","domain.deployment.form.oss_bucket.placeholder":"请输入存储桶名","domain.deployment.form.variables.label":"变量","domain.deployment.form.variables.key":"变量名","domain.deployment.form.variables.value":"值","domain.deployment.form.variables.empty":"尚未添加变量","domain.deployment.form.variables.key.required":"变量名不能为空","domain.deployment.form.variables.value.required":"变量值不能为空","domain.deployment.form.variables.key.placeholder":"请输入变量名","domain.deployment.form.variables.value.placeholder":"请输入变量值"},OH={"access.page.title":"授权管理","access.authorization.tab":"授权","access.authorization.nodata":"请添加授权开始部署证书吧。","access.authorization.add":"新增授权","access.authorization.edit":"编辑授权","access.authorization.copy":"复制授权","access.authorization.delete":"删除授权","access.authorization.delete.confirm":"确定要删除授权吗?","access.authorization.form.type.label":"服务商","access.authorization.form.type.placeholder":"请选择服务商","access.authorization.form.type.list":"服务商列表","access.authorization.form.name.label":"名称","access.authorization.form.name.placeholder":"请输入授权名称","access.authorization.form.config.label":"配置类型","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"请输入区域","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"请输入 AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"请输入 AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"请输入 AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"请输入 SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"请输入 SecretKey","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"请输入 CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"请输入 GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"请输入 GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"请输入 NAMESILO_API_KEY","access.authorization.form.username.label":"用户名","access.authorization.form.username.placeholder":"请输入用户名","access.authorization.form.password.label":"密码","access.authorization.form.password.placeholder":"请输入密码","access.authorization.form.access_group.placeholder":"请选择分组","access.authorization.form.ssh_group.label":"授权配置组(用于将一个域名证书部署到多个 SSH 主机)","access.authorization.form.ssh_host.label":"服务器 Host","access.authorization.form.ssh_host.placeholder":"请输入 Host","access.authorization.form.ssh_port.label":"SSH 端口","access.authorization.form.ssh_port.placeholder":"请输入 Port","access.authorization.form.ssh_username.label":"用户名","access.authorization.form.ssh_username.placeholder":"请输入用户名","access.authorization.form.ssh_password.label":"密码(使用密码登录)","access.authorization.form.ssh_password.placeholder":"请输入密码","access.authorization.form.ssh_key.label":"Key(使用私钥登录)","access.authorization.form.ssh_key.placeholder":"请输入 Key","access.authorization.form.ssh_key_file.placeholder":"请选择文件","access.authorization.form.ssh_key_passphrase.label":"Key 口令(使用私钥登录)","access.authorization.form.ssh_key_passphrase.placeholder":"请输入 Key 口令","access.authorization.form.ssh_key_path.label":"私钥保存路径","access.authorization.form.ssh_key_path.placeholder":"请输入私钥保存路径","access.authorization.form.ssh_cert_path.label":"证书保存路径","access.authorization.form.ssh_cert_path.placeholder":"请输入证书保存路径","access.authorization.form.ssh_pre_command.label":"前置 Command","access.authorization.form.ssh_pre_command.placeholder":"在部署证书前执行的前置命令","access.authorization.form.ssh_command.label":"Command","access.authorization.form.ssh_command.placeholder":"请输入要执行的命令","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"请输入 Webhook URL","access.group.tab":"授权组","access.group.nodata":"暂无部署授权配置,请添加后开始使用吧","access.group.total":"共有 {{total}} 个部署授权配置","access.group.add":"添加授权组","access.group.delete":"删除组","access.group.delete.confirm":"确定要删除部署授权组吗?","access.group.form.name.label":"组名","access.group.form.name.errmsg.empty":"请输入组名","access.group.domains":"所有授权","access.group.domains.nodata":"请添加域名开始部署证书吧。"},IH={"history.page.title":"部署","history.nodata":"你暂未创建任何部署,请先添加域名进行部署吧!","history.props.domain":"域名","history.props.status":"状态","history.props.stage":"阶段","history.props.stage.progress.check":"检查","history.props.stage.progress.apply":"获取","history.props.stage.progress.deploy":"部署","history.props.last_execution_time":"最近执行时间","history.log":"日志"},MH=Object.freeze({...TH,...PH,...RH,...AH,...DH,...OH,...IH}),LH={"common.save":"Save","common.save.succeeded.message":"Save Successful","common.save.failed.message":"Save Failed","common.add":"Add","common.edit":"Edit","common.copy":"Copy","common.download":"Download","common.delete":"Delete","common.delete.succeeded.message":"Delete Successful","common.delete.failed.message":"Delete Failed","common.next":"Next","common.confirm":"Confirm","common.cancel":"Cancel","common.submit":"Submit","common.update":"Update","common.update.succeeded.message":"Update Successful","common.update.failed.message":"Update Failed","common.text.domain":"Domain","common.text.domain.empty":"No Domain","common.text.ip":"IP Address","common.text.ip.empty":"No IP address","common.text.dns":"Domain Name Server","common.text.dns.empty":"No DNS","common.text.ca":"Certificate Authority","common.text.provider":"Provider","common.text.name":"Name","common.text.created_at":"Created At","common.text.updated_at":"Updated At","common.text.operations":"Operations","common.text.nodata":"No data available","common.menu.settings":"Settings","common.menu.logout":"Logout","common.menu.document":"Document","common.pagination.next":"Next","common.pagination.prev":"Previous","common.pagination.more":"More pages","common.theme.light":"Light","common.theme.dark":"Dark","common.theme.system":"System","common.errmsg.string_max":"Please enter no more than {{max}} characters","common.errmsg.email_invalid":"Please enter a valid email address","common.errmsg.email_empty":"Please enter email","common.errmsg.email_duplicate":"Email already exists","common.errmsg.domain_invalid":"Please enter domain","common.errmsg.host_invalid":"Please enter the correct domain name or IP","common.errmsg.ip_invalid":"Please enter IP","common.errmsg.url_invalid":"Please enter a valid URL","common.provider.aliyun":"Alibaba Cloud","common.provider.aliyun.oss":"Alibaba Cloud - OSS","common.provider.aliyun.cdn":"Alibaba Cloud - CDN","common.provider.aliyun.dcdn":"Alibaba Cloud - DCDN","common.provider.tencent":"Tencent","common.provider.tencent.cdn":"Tencent - CDN","common.provider.huaweicloud":"Huawei Cloud","common.provider.qiniu":"Qiniu","common.provider.qiniu.cdn":"Qiniu - CDN","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"Local Deployment","common.provider.ssh":"SSH Deployment","common.provider.webhook":"Webhook","common.provider.dingtalk":"DingTalk","common.provider.telegram":"Telegram"},zH={"login.username.label":"Username","login.username.placeholder":"Username/Email","login.username.errmsg.invalid":"Please enter a valid email address","login.password.label":"Password","login.password.placeholder":"Password","login.password.errmsg.invalid":"Password should be at least 10 characters","login.submit":"Log In"},FH={"dashboard.page.title":"Dashboard","dashboard.statistics.all":"All","dashboard.statistics.near_expired":"About to Expire","dashboard.statistics.enabled":"Enabled","dashboard.statistics.disabled":"Not Enabled","dashboard.statistics.unit":"","dashboard.history":"Deployment History"},$H={"settings.page.title":"Settings","settings.account.relogin.message":"Please login again","settings.account.tab":"Account","settings.account.email.label":"Email","settings.account.email.placeholder":"Please enter email","settings.account.email.errmsg.invalid":"Please enter a valid email address","settings.account.email.changed.message":"Account email altered successfully","settings.account.email.failed.message":"Account email alteration failed","settings.password.tab":"Password","settings.password.current_password.label":"Current Password","settings.password.current_password.placeholder":"Please enter the current password","settings.password.new_password.label":"New Password","settings.password.new_password.placeholder":"Please enter the new password","settings.password.confirm_password.label":"Confirm Password","settings.password.confirm_password.placeholder":"Please enter the new password again","settings.password.password.errmsg.length":"Password should be at least 10 characters","settings.password.password.errmsg.not_matched":"Passwords do not match","settings.password.changed.message":"Password changed successfully","settings.password.failed.message":"Password change failed","settings.notification.tab":"Notification","settings.notification.template.label":"Template","settings.notification.template.saved.message":"Notification template saved successfully","settings.notification.template.variables.tips.title":"Optional variables ({COUNT}: number of expiring soon)","settings.notification.template.variables.tips.content":"Optional variables ({COUNT}: number of expiring soon. {DOMAINS}: Domain list)","settings.notification.config.enable":"Enable","settings.notification.config.saved.message":"Configuration saved successfully","settings.notification.config.failed.message":"Configuration save failed","settings.notification.dingtalk.secret.placeholder":"Signature for signed addition","settings.notification.url.errmsg.invalid":"Invalid Url format","settings.ca.tab":"Certificate Authority","settings.ca.provider.errmsg.empty":"Please select a Certificate Authority","settings.ca.eab_kid.errmsg.empty":"Please enter EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"Please enter EAB_HMAC_KEY.","settings.ca.eab_kid_hmac_key.errmsg.empty":"Please enter EAB_KID and EAB_HMAC_KEY"},UH={"domain.page.title":"Domain List","domain.nodata":"Please add a domain to start deploying the certificate.","domain.add":"Add Domain","domain.edit":"Edit Domain","domain.delete":"Delete Domain","domain.delete.confirm":"Are you sure you want to delete this domain?","domain.history":"Deployment History","domain.deploy":"Deploy Now","domain.deploy.started.message":"Deploy Started","domain.deploy.started.tips":"Deployment initiated, please check the deployment log later.","domain.deploy.failed.message":"Execution Failed","domain.deploy.failed.tips":"Execution failed, please check the details in <1>Deployment History</1>.","domain.deploy_forced":"Force Deployment","domain.props.expiry":"Validity Period","domain.props.expiry.date1":"Valid for {{date}} days","domain.props.expiry.date2":"Expiry on {{date}}","domain.props.last_execution_status":"Last Execution Status","domain.props.last_execution_stage":"Last Execution Stage","domain.props.last_execution_time":"Last Execution Time","domain.props.enable":"Enable","domain.props.enable.enabled":"Enable","domain.props.enable.disabled":"Disable","domain.application.tab":"Apply Settings","domain.application.form.domain.added.message":"Domain added successfully","domain.application.form.domain.changed.message":"Domain updated successfully","domain.application.form.email.label":"Email","domain.application.form.email.tips":"(A email is required to apply for a certificate)","domain.application.form.email.placeholder":"Please select email","domain.application.form.email.add":"Add Email","domain.application.form.email.list":"Email List","domain.application.form.access.label":"DNS Provider Authorization Configuration","domain.application.form.access.placeholder":"Please select DNS provider authorization configuration","domain.application.form.access.list":"Provider Authorization Configurations","domain.application.form.advanced_settings.label":"Advanced Settings","domain.application.form.key_algorithm.label":"Certificate Key Algorithm","domain.application.form.key_algorithm.placeholder":"Please select certificate key algorithm","domain.application.form.timeout.label":"DNS Propagation Timeout (seconds)","domain.application.form.timeoue.placeholder":"Please enter maximum waiting time for DNS propagation","domain.application.unsaved.message":"Please save applyment configuration first","domain.deployment.tab":"Deploy Settings","domain.deployment.nodata":"Deployment not added yet","domain.deployment.form.type.label":"Deploy Method","domain.deployment.form.type.placeholder":"Please select deploy method","domain.deployment.form.type.list":"Deploy Method List","domain.deployment.form.access.label":"Access Configuration","domain.deployment.form.access.placeholder":"Please select provider authorization configuration","domain.deployment.form.access.list":"Provider Authorization Configurations","domain.deployment.form.cdn_domain.label":"Deploy to domain","domain.deployment.form.cdn_domain.placeholder":"Please enter CDN domain","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_bucket":"Bucket","domain.deployment.form.oss_bucket.placeholder":"Please enter Bucket","domain.deployment.form.variables.label":"Variable","domain.deployment.form.variables.key":"Name","domain.deployment.form.variables.value":"Value","domain.deployment.form.variables.empty":"Variable not added yet","domain.deployment.form.variables.key.required":"Variable name cannot be empty","domain.deployment.form.variables.value.required":"Variable value cannot be empty","domain.deployment.form.variables.key.placeholder":"Variable name","domain.deployment.form.variables.value.placeholder":"Variable value"},VH={"access.page.title":"Authorization Management","access.authorization.tab":"Authorization","access.authorization.nodata":"Please add authorization to start deploying certificate.","access.authorization.add":"Add Authorization","access.authorization.edit":"Edit Authorization","access.authorization.copy":"Copy Authorization","access.authorization.delete":"Delete Authorization","access.authorization.delete.confirm":"Are you sure you want to delete the deployment authorization?","access.authorization.form.type.label":"Provider","access.authorization.form.type.placeholder":"Please select a provider","access.authorization.form.type.list":"Authorization List","access.authorization.form.name.label":"Name","access.authorization.form.name.placeholder":"Please enter authorization name","access.authorization.form.config.label":"Configuration Type","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"Please enter Region","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"Please enter AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"Please enter AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"Please enter AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"Please enter SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"Please enter SecretKey","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"Please enter CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"Please enter GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"Please enter GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"Please enter NAMESILO_API_KEY","access.authorization.form.username.label":"Username","access.authorization.form.username.placeholder":"Please enter username","access.authorization.form.password.label":"Password","access.authorization.form.password.placeholder":"Please enter password","access.authorization.form.access_group.placeholder":"Please select a group","access.authorization.form.ssh_group.label":"Authorization Configuration Group (used to deploy a single domain certificate to multiple SSH hosts)","access.authorization.form.ssh_host.label":"Server Host","access.authorization.form.ssh_host.placeholder":"Please enter Host","access.authorization.form.ssh_port.label":"SSH Port","access.authorization.form.ssh_port.placeholder":"Please enter Port","access.authorization.form.ssh_username.label":"Username","access.authorization.form.ssh_username.placeholder":"Please enter username","access.authorization.form.ssh_password.label":"Password (Log-in using password)","access.authorization.form.ssh_password.placeholder":"Please enter password","access.authorization.form.ssh_key.label":"Key (Log-in using private key)","access.authorization.form.ssh_key.placeholder":"Please enter Key","access.authorization.form.ssh_key_file.placeholder":"Please select file","access.authorization.form.ssh_key_passphrase.label":"Key Passphrase (Log-in using private key)","access.authorization.form.ssh_key_passphrase.placeholder":"Please enter Key Passphrase","access.authorization.form.ssh_key_path.label":"Private Key Save Path","access.authorization.form.ssh_key_path.placeholder":"Please enter private key save path","access.authorization.form.ssh_cert_path.label":"Certificate Save Path","access.authorization.form.ssh_cert_path.placeholder":"Please enter certificate save path","access.authorization.form.ssh_pre_command.label":"Pre-deployment Command","access.authorization.form.ssh_pre_command.placeholder":"Command to be executed before deploying the certificate","access.authorization.form.ssh_command.label":"Command","access.authorization.form.ssh_command.placeholder":"Please enter command","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"Please enter Webhook URL","access.group.tab":"Authorization Group","access.group.nodata":"No deployment authorization configuration yet, please add after starting use.","access.group.total":"Totally {{total}} deployment authorization configuration","access.group.add":"Add Group","access.group.delete":"Delete Group","access.group.delete.confirm":"Are you sure you want to delete the deployment authorization group?","access.group.form.name.label":"Group Name","access.group.form.name.errmsg.empty":"Please enter group name","access.group.domains":"All Authorizations","access.group.domains.nodata":"Please add a domain to start deploying the certificate."},BH={"history.page.title":"Deployment","history.nodata":"You have not created any deployments yet, please add a domain to start deployment!","history.props.domain":"Domain","history.props.status":"Status","history.props.stage":"Stage","history.props.stage.progress.check":"Check","history.props.stage.progress.apply":"Apply","history.props.stage.progress.deploy":"Deploy","history.props.last_execution_time":"Last Execution Time","history.log":"Log"},WH=Object.freeze({...LH,...zH,...FH,...$H,...UH,...VH,...BH}),HH={zh:{name:"简体中文",translation:MH},en:{name:"English",translation:WH}};vn.use(dP).use(WO).init({resources:HH,fallbackLng:"zh",debug:!0,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}.json"}});vp.createRoot(document.getElementById("root")).render(l.jsx(We.StrictMode,{children:l.jsx(WF,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(xO,{router:YW})})}))});export default YH(); diff --git a/ui/dist/assets/index-O2FfQ9M8.js b/ui/dist/assets/index-O2FfQ9M8.js new file mode 100644 index 00000000..3c3b1069 --- /dev/null +++ b/ui/dist/assets/index-O2FfQ9M8.js @@ -0,0 +1,329 @@ +var jP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var f9=jP((E9,Nd)=>{function __(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S_={exports:{}},Bf={},k_={exports:{}},nt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gc=Symbol.for("react.element"),EP=Symbol.for("react.portal"),NP=Symbol.for("react.fragment"),TP=Symbol.for("react.strict_mode"),PP=Symbol.for("react.profiler"),RP=Symbol.for("react.provider"),AP=Symbol.for("react.context"),OP=Symbol.for("react.forward_ref"),DP=Symbol.for("react.suspense"),IP=Symbol.for("react.memo"),MP=Symbol.for("react.lazy"),m0=Symbol.iterator;function LP(e){return e===null||typeof e!="object"?null:(e=m0&&e[m0]||e["@@iterator"],typeof e=="function"?e:null)}var C_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j_=Object.assign,E_={};function Ka(e,t,n){this.props=e,this.context=t,this.refs=E_,this.updater=n||C_}Ka.prototype.isReactComponent={};Ka.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ka.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function N_(){}N_.prototype=Ka.prototype;function sy(e,t,n){this.props=e,this.context=t,this.refs=E_,this.updater=n||C_}var oy=sy.prototype=new N_;oy.constructor=sy;j_(oy,Ka.prototype);oy.isPureReactComponent=!0;var p0=Array.isArray,T_=Object.prototype.hasOwnProperty,iy={current:null},P_={key:!0,ref:!0,__self:!0,__source:!0};function R_(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)T_.call(t,r)&&!P_.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Gc,type:e,key:o,ref:i,props:s,_owner:iy.current}}function zP(e,t){return{$$typeof:Gc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ay(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gc}function FP(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var g0=/\/+/g;function hm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?FP(""+e.key):t.toString(36)}function od(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Gc:case EP:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+hm(i,0):r,p0(s)?(n="",e!=null&&(n=e.replace(g0,"$&/")+"/"),od(s,t,n,"",function(u){return u})):s!=null&&(ay(s)&&(s=zP(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(g0,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",p0(e))for(var a=0;a<e.length;a++){o=e[a];var c=r+hm(o,a);i+=od(o,t,n,c,s)}else if(c=LP(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=r+hm(o,a++),i+=od(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ju(e,t,n){if(e==null)return e;var r=[],s=0;return od(e,r,"","",function(o){return t.call(n,o,s++)}),r}function $P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Cn={current:null},id={transition:null},UP={ReactCurrentDispatcher:Cn,ReactCurrentBatchConfig:id,ReactCurrentOwner:iy};function A_(){throw Error("act(...) is not supported in production builds of React.")}nt.Children={map:ju,forEach:function(e,t,n){ju(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ju(e,function(){t++}),t},toArray:function(e){return ju(e,function(t){return t})||[]},only:function(e){if(!ay(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};nt.Component=Ka;nt.Fragment=NP;nt.Profiler=PP;nt.PureComponent=sy;nt.StrictMode=TP;nt.Suspense=DP;nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=UP;nt.act=A_;nt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=j_({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=iy.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)T_.call(t,c)&&!P_.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Gc,type:e.type,key:s,ref:o,props:r,_owner:i}};nt.createContext=function(e){return e={$$typeof:AP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:RP,_context:e},e.Consumer=e};nt.createElement=R_;nt.createFactory=function(e){var t=R_.bind(null,e);return t.type=e,t};nt.createRef=function(){return{current:null}};nt.forwardRef=function(e){return{$$typeof:OP,render:e}};nt.isValidElement=ay;nt.lazy=function(e){return{$$typeof:MP,_payload:{_status:-1,_result:e},_init:$P}};nt.memo=function(e,t){return{$$typeof:IP,type:e,compare:t===void 0?null:t}};nt.startTransition=function(e){var t=id.transition;id.transition={};try{e()}finally{id.transition=t}};nt.unstable_act=A_;nt.useCallback=function(e,t){return Cn.current.useCallback(e,t)};nt.useContext=function(e){return Cn.current.useContext(e)};nt.useDebugValue=function(){};nt.useDeferredValue=function(e){return Cn.current.useDeferredValue(e)};nt.useEffect=function(e,t){return Cn.current.useEffect(e,t)};nt.useId=function(){return Cn.current.useId()};nt.useImperativeHandle=function(e,t,n){return Cn.current.useImperativeHandle(e,t,n)};nt.useInsertionEffect=function(e,t){return Cn.current.useInsertionEffect(e,t)};nt.useLayoutEffect=function(e,t){return Cn.current.useLayoutEffect(e,t)};nt.useMemo=function(e,t){return Cn.current.useMemo(e,t)};nt.useReducer=function(e,t,n){return Cn.current.useReducer(e,t,n)};nt.useRef=function(e){return Cn.current.useRef(e)};nt.useState=function(e){return Cn.current.useState(e)};nt.useSyncExternalStore=function(e,t,n){return Cn.current.useSyncExternalStore(e,t,n)};nt.useTransition=function(){return Cn.current.useTransition()};nt.version="18.3.1";k_.exports=nt;var g=k_.exports;const We=Vf(g),O_=__({__proto__:null,default:We},[g]);/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var VP=g,BP=Symbol.for("react.element"),WP=Symbol.for("react.fragment"),HP=Object.prototype.hasOwnProperty,YP=VP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KP={key:!0,ref:!0,__self:!0,__source:!0};function D_(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)HP.call(t,r)&&!KP.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:BP,type:e,key:o,ref:i,props:s,_owner:YP.current}}Bf.Fragment=WP;Bf.jsx=D_;Bf.jsxs=D_;S_.exports=Bf;var l=S_.exports,vp={},I_={exports:{}},Qn={},M_={exports:{}},L_={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(W,I){var X=W.length;W.push(I);e:for(;0<X;){var $=X-1>>>1,B=W[$];if(0<s(B,I))W[$]=I,W[X]=B,X=$;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var I=W[0],X=W.pop();if(X!==I){W[0]=X;e:for(var $=0,B=W.length,pe=B>>>1;$<pe;){var se=2*($+1)-1,oe=W[se],Ie=se+1,ge=W[Ie];if(0>s(oe,X))Ie<B&&0>s(ge,oe)?(W[$]=ge,W[Ie]=X,$=Ie):(W[$]=oe,W[se]=X,$=se);else if(Ie<B&&0>s(ge,X))W[$]=ge,W[Ie]=X,$=Ie;else break e}}return I}function s(W,I){var X=W.sortIndex-I.sortIndex;return X!==0?X:W.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var c=[],u=[],d=1,f=null,h=3,m=!1,x=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=W)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(W){if(p=!1,b(W),!x)if(n(c)!==null)x=!0,J(C);else{var I=n(u);I!==null&&F(_,I.startTime-W)}}function C(W,I){x=!1,p&&(p=!1,y(R),R=-1),m=!0;var X=h;try{for(b(I),f=n(c);f!==null&&(!(f.expirationTime>I)||W&&!G());){var $=f.callback;if(typeof $=="function"){f.callback=null,h=f.priorityLevel;var B=$(f.expirationTime<=I);I=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(I)}else r(c);f=n(c)}if(f!==null)var pe=!0;else{var se=n(u);se!==null&&F(_,se.startTime-I),pe=!1}return pe}finally{f=null,h=X,m=!1}}var j=!1,T=null,R=-1,A=5,D=-1;function G(){return!(e.unstable_now()-D<A)}function N(){if(T!==null){var W=e.unstable_now();D=W;var I=!0;try{I=T(!0,W)}finally{I?z():(j=!1,T=null)}}else j=!1}var z;if(typeof v=="function")z=function(){v(N)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,U=S.port2;S.port1.onmessage=N,z=function(){U.postMessage(null)}}else z=function(){w(N,0)};function J(W){T=W,j||(j=!0,z())}function F(W,I){R=w(function(){W(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){x||m||(x=!0,J(C))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(W){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var X=h;h=I;try{return W()}finally{h=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,I){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=h;h=W;try{return I()}finally{h=X}},e.unstable_scheduleCallback=function(W,I,X){var $=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?$+X:$):X=$,W){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=X+B,W={id:d++,callback:I,priorityLevel:W,startTime:X,expirationTime:B,sortIndex:-1},X>$?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(p?(y(R),R=-1):p=!0,F(_,X-$))):(W.sortIndex=B,t(c,W),x||m||(x=!0,J(C))),W},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(W){var I=h;return function(){var X=h;h=I;try{return W.apply(this,arguments)}finally{h=X}}}})(L_);M_.exports=L_;var GP=M_.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ZP=g,Zn=GP;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var z_=new Set,rc={};function Si(e,t){Ta(e,t),Ta(e+"Capture",t)}function Ta(e,t){for(rc[e]=t,e=0;e<t.length;e++)z_.add(t[e])}var Os=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xp=Object.prototype.hasOwnProperty,qP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y0={},v0={};function XP(e){return xp.call(v0,e)?!0:xp.call(y0,e)?!1:qP.test(e)?v0[e]=!0:(y0[e]=!0,!1)}function QP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function JP(e,t,n,r){if(t===null||typeof t>"u"||QP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new jn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cn[e]=new jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var ly=/[\-:]([a-z])/g;function cy(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ly,cy);cn[t]=new jn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ly,cy);cn[t]=new jn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ly,cy);cn[t]=new jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new jn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function uy(e,t,n,r){var s=cn.hasOwnProperty(t)?cn[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(JP(t,n,s,r)&&(n=null),r||s===null?XP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Vs=ZP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Eu=Symbol.for("react.element"),Zi=Symbol.for("react.portal"),qi=Symbol.for("react.fragment"),dy=Symbol.for("react.strict_mode"),wp=Symbol.for("react.profiler"),F_=Symbol.for("react.provider"),$_=Symbol.for("react.context"),fy=Symbol.for("react.forward_ref"),bp=Symbol.for("react.suspense"),_p=Symbol.for("react.suspense_list"),hy=Symbol.for("react.memo"),so=Symbol.for("react.lazy"),U_=Symbol.for("react.offscreen"),x0=Symbol.iterator;function fl(e){return e===null||typeof e!="object"?null:(e=x0&&e[x0]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,mm;function Rl(e){if(mm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);mm=t&&t[1]||""}return` +`+mm+e}var pm=!1;function gm(e,t){if(!e||pm)return"";pm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` +`),o=r.stack.split(` +`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var c=` +`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=a);break}}}finally{pm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rl(e):""}function eR(e){switch(e.tag){case 5:return Rl(e.type);case 16:return Rl("Lazy");case 13:return Rl("Suspense");case 19:return Rl("SuspenseList");case 0:case 2:case 15:return e=gm(e.type,!1),e;case 11:return e=gm(e.type.render,!1),e;case 1:return e=gm(e.type,!0),e;default:return""}}function Sp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case qi:return"Fragment";case Zi:return"Portal";case wp:return"Profiler";case dy:return"StrictMode";case bp:return"Suspense";case _p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $_:return(e.displayName||"Context")+".Consumer";case F_:return(e._context.displayName||"Context")+".Provider";case fy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hy:return t=e.displayName||null,t!==null?t:Sp(e.type)||"Memo";case so:t=e._payload,e=e._init;try{return Sp(e(t))}catch{}}return null}function tR(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sp(t);case 8:return t===dy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function V_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nR(e){var t=V_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){e._valueTracker||(e._valueTracker=nR(e))}function B_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Td(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kp(e,t){var n=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function w0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function W_(e,t){t=t.checked,t!=null&&uy(e,"checked",t,!1)}function Cp(e,t){W_(e,t);var n=jo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jp(e,t.type,n):t.hasOwnProperty("defaultValue")&&jp(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function b0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jp(e,t,n){(t!=="number"||Td(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Al=Array.isArray;function ma(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+jo(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ep(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ae(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ae(92));if(Al(n)){if(1<n.length)throw Error(ae(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:jo(n)}}function H_(e,t){var n=jo(t.value),r=jo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function S0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Y_(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Np(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Y_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tu,K_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tu=Tu||document.createElement("div"),Tu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rR=["Webkit","ms","Moz","O"];Object.keys(Bl).forEach(function(e){rR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bl[t]=Bl[e]})});function G_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bl.hasOwnProperty(e)&&Bl[e]?(""+t).trim():t+"px"}function Z_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=G_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var sR=Mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Tp(e,t){if(t){if(sR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function Pp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rp=null;function my(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ap=null,pa=null,ga=null;function k0(e){if(e=Xc(e)){if(typeof Ap!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Gf(t),Ap(e.stateNode,e.type,t))}}function q_(e){pa?ga?ga.push(e):ga=[e]:pa=e}function X_(){if(pa){var e=pa,t=ga;if(ga=pa=null,k0(e),t)for(e=0;e<t.length;e++)k0(t[e])}}function Q_(e,t){return e(t)}function J_(){}var ym=!1;function e1(e,t,n){if(ym)return e(t,n);ym=!0;try{return Q_(e,t,n)}finally{ym=!1,(pa!==null||ga!==null)&&(J_(),X_())}}function oc(e,t){var n=e.stateNode;if(n===null)return null;var r=Gf(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ae(231,t,typeof n));return n}var Op=!1;if(Os)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){Op=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{Op=!1}function oR(e,t,n,r,s,o,i,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Wl=!1,Pd=null,Rd=!1,Dp=null,iR={onError:function(e){Wl=!0,Pd=e}};function aR(e,t,n,r,s,o,i,a,c){Wl=!1,Pd=null,oR.apply(iR,arguments)}function lR(e,t,n,r,s,o,i,a,c){if(aR.apply(this,arguments),Wl){if(Wl){var u=Pd;Wl=!1,Pd=null}else throw Error(ae(198));Rd||(Rd=!0,Dp=u)}}function ki(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function t1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function C0(e){if(ki(e)!==e)throw Error(ae(188))}function cR(e){var t=e.alternate;if(!t){if(t=ki(e),t===null)throw Error(ae(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return C0(s),e;if(o===r)return C0(s),t;o=o.sibling}throw Error(ae(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(ae(189))}}if(n.alternate!==r)throw Error(ae(190))}if(n.tag!==3)throw Error(ae(188));return n.stateNode.current===n?e:t}function n1(e){return e=cR(e),e!==null?r1(e):null}function r1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=r1(e);if(t!==null)return t;e=e.sibling}return null}var s1=Zn.unstable_scheduleCallback,j0=Zn.unstable_cancelCallback,uR=Zn.unstable_shouldYield,dR=Zn.unstable_requestPaint,Ut=Zn.unstable_now,fR=Zn.unstable_getCurrentPriorityLevel,py=Zn.unstable_ImmediatePriority,o1=Zn.unstable_UserBlockingPriority,Ad=Zn.unstable_NormalPriority,hR=Zn.unstable_LowPriority,i1=Zn.unstable_IdlePriority,Wf=null,ts=null;function mR(e){if(ts&&typeof ts.onCommitFiberRoot=="function")try{ts.onCommitFiberRoot(Wf,e,void 0,(e.current.flags&128)===128)}catch{}}var Er=Math.clz32?Math.clz32:yR,pR=Math.log,gR=Math.LN2;function yR(e){return e>>>=0,e===0?32:31-(pR(e)/gR|0)|0}var Pu=64,Ru=4194304;function Ol(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Od(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Ol(a):(o&=i,o!==0&&(r=Ol(o)))}else i=n&~s,i!==0?r=Ol(i):o!==0&&(r=Ol(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Er(t),s=1<<n,r|=e[n],t&=~s;return r}function vR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Er(o),a=1<<i,c=s[i];c===-1?(!(a&n)||a&r)&&(s[i]=vR(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function Ip(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function a1(){var e=Pu;return Pu<<=1,!(Pu&4194240)&&(Pu=64),e}function vm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Er(t),e[t]=n}function wR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Er(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function gy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Er(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var gt=0;function l1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var c1,yy,u1,d1,f1,Mp=!1,Au=[],po=null,go=null,yo=null,ic=new Map,ac=new Map,io=[],bR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function E0(e,t){switch(e){case"focusin":case"focusout":po=null;break;case"dragenter":case"dragleave":go=null;break;case"mouseover":case"mouseout":yo=null;break;case"pointerover":case"pointerout":ic.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ac.delete(t.pointerId)}}function ml(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Xc(t),t!==null&&yy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function _R(e,t,n,r,s){switch(t){case"focusin":return po=ml(po,e,t,n,r,s),!0;case"dragenter":return go=ml(go,e,t,n,r,s),!0;case"mouseover":return yo=ml(yo,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return ic.set(o,ml(ic.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,ac.set(o,ml(ac.get(o)||null,e,t,n,r,s)),!0}return!1}function h1(e){var t=Yo(e.target);if(t!==null){var n=ki(t);if(n!==null){if(t=n.tag,t===13){if(t=t1(n),t!==null){e.blockedOn=t,f1(e.priority,function(){u1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ad(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Rp=r,n.target.dispatchEvent(r),Rp=null}else return t=Xc(n),t!==null&&yy(t),e.blockedOn=n,!1;t.shift()}return!0}function N0(e,t,n){ad(e)&&n.delete(t)}function SR(){Mp=!1,po!==null&&ad(po)&&(po=null),go!==null&&ad(go)&&(go=null),yo!==null&&ad(yo)&&(yo=null),ic.forEach(N0),ac.forEach(N0)}function pl(e,t){e.blockedOn===t&&(e.blockedOn=null,Mp||(Mp=!0,Zn.unstable_scheduleCallback(Zn.unstable_NormalPriority,SR)))}function lc(e){function t(s){return pl(s,e)}if(0<Au.length){pl(Au[0],e);for(var n=1;n<Au.length;n++){var r=Au[n];r.blockedOn===e&&(r.blockedOn=null)}}for(po!==null&&pl(po,e),go!==null&&pl(go,e),yo!==null&&pl(yo,e),ic.forEach(t),ac.forEach(t),n=0;n<io.length;n++)r=io[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<io.length&&(n=io[0],n.blockedOn===null);)h1(n),n.blockedOn===null&&io.shift()}var ya=Vs.ReactCurrentBatchConfig,Dd=!0;function kR(e,t,n,r){var s=gt,o=ya.transition;ya.transition=null;try{gt=1,vy(e,t,n,r)}finally{gt=s,ya.transition=o}}function CR(e,t,n,r){var s=gt,o=ya.transition;ya.transition=null;try{gt=4,vy(e,t,n,r)}finally{gt=s,ya.transition=o}}function vy(e,t,n,r){if(Dd){var s=Lp(e,t,n,r);if(s===null)Nm(e,t,r,Id,n),E0(e,r);else if(_R(s,e,t,n,r))r.stopPropagation();else if(E0(e,r),t&4&&-1<bR.indexOf(e)){for(;s!==null;){var o=Xc(s);if(o!==null&&c1(o),o=Lp(e,t,n,r),o===null&&Nm(e,t,r,Id,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Nm(e,t,r,null,n)}}var Id=null;function Lp(e,t,n,r){if(Id=null,e=my(r),e=Yo(e),e!==null)if(t=ki(e),t===null)e=null;else if(n=t.tag,n===13){if(e=t1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Id=e,null}function m1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fR()){case py:return 1;case o1:return 4;case Ad:case hR:return 16;case i1:return 536870912;default:return 16}default:return 16}}var co=null,xy=null,ld=null;function p1(){if(ld)return ld;var e,t=xy,n=t.length,r,s="value"in co?co.value:co.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return ld=s.slice(e,1<r?1-r:void 0)}function cd(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ou(){return!0}function T0(){return!1}function Jn(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ou:T0,this.isPropagationStopped=T0,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ou)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ou)},persist:function(){},isPersistent:Ou}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wy=Jn(Ga),qc=Mt({},Ga,{view:0,detail:0}),jR=Jn(qc),xm,wm,gl,Hf=Mt({},qc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:by,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==gl&&(gl&&e.type==="mousemove"?(xm=e.screenX-gl.screenX,wm=e.screenY-gl.screenY):wm=xm=0,gl=e),xm)},movementY:function(e){return"movementY"in e?e.movementY:wm}}),P0=Jn(Hf),ER=Mt({},Hf,{dataTransfer:0}),NR=Jn(ER),TR=Mt({},qc,{relatedTarget:0}),bm=Jn(TR),PR=Mt({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),RR=Jn(PR),AR=Mt({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),OR=Jn(AR),DR=Mt({},Ga,{data:0}),R0=Jn(DR),IR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},LR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=LR[e])?!!t[e]:!1}function by(){return zR}var FR=Mt({},qc,{key:function(e){if(e.key){var t=IR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?MR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:by,charCode:function(e){return e.type==="keypress"?cd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$R=Jn(FR),UR=Mt({},Hf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A0=Jn(UR),VR=Mt({},qc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:by}),BR=Jn(VR),WR=Mt({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),HR=Jn(WR),YR=Mt({},Hf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),KR=Jn(YR),GR=[9,13,27,32],_y=Os&&"CompositionEvent"in window,Hl=null;Os&&"documentMode"in document&&(Hl=document.documentMode);var ZR=Os&&"TextEvent"in window&&!Hl,g1=Os&&(!_y||Hl&&8<Hl&&11>=Hl),O0=" ",D0=!1;function y1(e,t){switch(e){case"keyup":return GR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function qR(e,t){switch(e){case"compositionend":return v1(t);case"keypress":return t.which!==32?null:(D0=!0,O0);case"textInput":return e=t.data,e===O0&&D0?null:e;default:return null}}function XR(e,t){if(Xi)return e==="compositionend"||!_y&&y1(e,t)?(e=p1(),ld=xy=co=null,Xi=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return g1&&t.locale!=="ko"?null:t.data;default:return null}}var QR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function I0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!QR[e.type]:t==="textarea"}function x1(e,t,n,r){q_(r),t=Md(t,"onChange"),0<t.length&&(n=new wy("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yl=null,cc=null;function JR(e){P1(e,0)}function Yf(e){var t=ea(e);if(B_(t))return e}function eA(e,t){if(e==="change")return t}var w1=!1;if(Os){var _m;if(Os){var Sm="oninput"in document;if(!Sm){var M0=document.createElement("div");M0.setAttribute("oninput","return;"),Sm=typeof M0.oninput=="function"}_m=Sm}else _m=!1;w1=_m&&(!document.documentMode||9<document.documentMode)}function L0(){Yl&&(Yl.detachEvent("onpropertychange",b1),cc=Yl=null)}function b1(e){if(e.propertyName==="value"&&Yf(cc)){var t=[];x1(t,cc,e,my(e)),e1(JR,t)}}function tA(e,t,n){e==="focusin"?(L0(),Yl=t,cc=n,Yl.attachEvent("onpropertychange",b1)):e==="focusout"&&L0()}function nA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yf(cc)}function rA(e,t){if(e==="click")return Yf(t)}function sA(e,t){if(e==="input"||e==="change")return Yf(t)}function oA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pr=typeof Object.is=="function"?Object.is:oA;function uc(e,t){if(Pr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!xp.call(t,s)||!Pr(e[s],t[s]))return!1}return!0}function z0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function F0(e,t){var n=z0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=z0(n)}}function _1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S1(){for(var e=window,t=Td();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Td(e.document)}return t}function Sy(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")}function iA(e){var t=S1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_1(n.ownerDocument.documentElement,n)){if(r!==null&&Sy(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=F0(n,o);var i=F0(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var aA=Os&&"documentMode"in document&&11>=document.documentMode,Qi=null,zp=null,Kl=null,Fp=!1;function $0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fp||Qi==null||Qi!==Td(r)||(r=Qi,"selectionStart"in r&&Sy(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kl&&uc(Kl,r)||(Kl=r,r=Md(zp,"onSelect"),0<r.length&&(t=new wy("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qi)))}function Du(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ji={animationend:Du("Animation","AnimationEnd"),animationiteration:Du("Animation","AnimationIteration"),animationstart:Du("Animation","AnimationStart"),transitionend:Du("Transition","TransitionEnd")},km={},k1={};Os&&(k1=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function Kf(e){if(km[e])return km[e];if(!Ji[e])return e;var t=Ji[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in k1)return km[e]=t[n];return e}var C1=Kf("animationend"),j1=Kf("animationiteration"),E1=Kf("animationstart"),N1=Kf("transitionend"),T1=new Map,U0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Io(e,t){T1.set(e,t),Si(t,[e])}for(var Cm=0;Cm<U0.length;Cm++){var jm=U0[Cm],lA=jm.toLowerCase(),cA=jm[0].toUpperCase()+jm.slice(1);Io(lA,"on"+cA)}Io(C1,"onAnimationEnd");Io(j1,"onAnimationIteration");Io(E1,"onAnimationStart");Io("dblclick","onDoubleClick");Io("focusin","onFocus");Io("focusout","onBlur");Io(N1,"onTransitionEnd");Ta("onMouseEnter",["mouseout","mouseover"]);Ta("onMouseLeave",["mouseout","mouseover"]);Ta("onPointerEnter",["pointerout","pointerover"]);Ta("onPointerLeave",["pointerout","pointerover"]);Si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Si("onBeforeInput",["compositionend","keypress","textInput","paste"]);Si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),uA=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dl));function V0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,lR(r,t,void 0,e),e.currentTarget=null}function P1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&s.isPropagationStopped())break e;V0(s,a,u),o=c}else for(i=0;i<r.length;i++){if(a=r[i],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&s.isPropagationStopped())break e;V0(s,a,u),o=c}}}if(Rd)throw e=Dp,Rd=!1,Dp=null,e}function St(e,t){var n=t[Wp];n===void 0&&(n=t[Wp]=new Set);var r=e+"__bubble";n.has(r)||(R1(t,e,2,!1),n.add(r))}function Em(e,t,n){var r=0;t&&(r|=4),R1(n,e,r,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function dc(e){if(!e[Iu]){e[Iu]=!0,z_.forEach(function(n){n!=="selectionchange"&&(uA.has(n)||Em(n,!1,e),Em(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Iu]||(t[Iu]=!0,Em("selectionchange",!1,t))}}function R1(e,t,n,r){switch(m1(t)){case 1:var s=kR;break;case 4:s=CR;break;default:s=vy}n=s.bind(null,t,n,e),s=void 0,!Op||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Nm(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Yo(a),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}a=a.parentNode}}r=r.return}e1(function(){var u=o,d=my(n),f=[];e:{var h=T1.get(e);if(h!==void 0){var m=wy,x=e;switch(e){case"keypress":if(cd(n)===0)break e;case"keydown":case"keyup":m=$R;break;case"focusin":x="focus",m=bm;break;case"focusout":x="blur",m=bm;break;case"beforeblur":case"afterblur":m=bm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=P0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=NR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=BR;break;case C1:case j1:case E1:m=RR;break;case N1:m=HR;break;case"scroll":m=jR;break;case"wheel":m=KR;break;case"copy":case"cut":case"paste":m=OR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=A0}var p=(t&4)!==0,w=!p&&e==="scroll",y=p?h!==null?h+"Capture":null:h;p=[];for(var v=u,b;v!==null;){b=v;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,y!==null&&(_=oc(v,y),_!=null&&p.push(fc(v,_,b)))),w)break;v=v.return}0<p.length&&(h=new m(h,x,null,n,d),f.push({event:h,listeners:p}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==Rp&&(x=n.relatedTarget||n.fromElement)&&(Yo(x)||x[Ds]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(x=n.relatedTarget||n.toElement,m=u,x=x?Yo(x):null,x!==null&&(w=ki(x),x!==w||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=u),m!==x)){if(p=P0,_="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(p=A0,_="onPointerLeave",y="onPointerEnter",v="pointer"),w=m==null?h:ea(m),b=x==null?h:ea(x),h=new p(_,v+"leave",m,n,d),h.target=w,h.relatedTarget=b,_=null,Yo(d)===u&&(p=new p(y,v+"enter",x,n,d),p.target=b,p.relatedTarget=w,_=p),w=_,m&&x)t:{for(p=m,y=x,v=0,b=p;b;b=zi(b))v++;for(b=0,_=y;_;_=zi(_))b++;for(;0<v-b;)p=zi(p),v--;for(;0<b-v;)y=zi(y),b--;for(;v--;){if(p===y||y!==null&&p===y.alternate)break t;p=zi(p),y=zi(y)}p=null}else p=null;m!==null&&B0(f,h,m,p,!1),x!==null&&w!==null&&B0(f,w,x,p,!0)}}e:{if(h=u?ea(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var C=eA;else if(I0(h))if(w1)C=sA;else{C=nA;var j=tA}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=rA);if(C&&(C=C(e,u))){x1(f,C,n,d);break e}j&&j(e,h,u),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&jp(h,"number",h.value)}switch(j=u?ea(u):window,e){case"focusin":(I0(j)||j.contentEditable==="true")&&(Qi=j,zp=u,Kl=null);break;case"focusout":Kl=zp=Qi=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,$0(f,n,d);break;case"selectionchange":if(aA)break;case"keydown":case"keyup":$0(f,n,d)}var T;if(_y)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Xi?y1(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(g1&&n.locale!=="ko"&&(Xi||R!=="onCompositionStart"?R==="onCompositionEnd"&&Xi&&(T=p1()):(co=d,xy="value"in co?co.value:co.textContent,Xi=!0)),j=Md(u,R),0<j.length&&(R=new R0(R,e,null,n,d),f.push({event:R,listeners:j}),T?R.data=T:(T=v1(n),T!==null&&(R.data=T)))),(T=ZR?qR(e,n):XR(e,n))&&(u=Md(u,"onBeforeInput"),0<u.length&&(d=new R0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=T))}P1(f,t)})}function fc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Md(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=oc(e,n),o!=null&&r.unshift(fc(e,o,s)),o=oc(e,t),o!=null&&r.push(fc(e,o,s))),e=e.return}return r}function zi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function B0(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,s?(c=oc(n,o),c!=null&&i.unshift(fc(n,c,a))):s||(c=oc(n,o),c!=null&&i.push(fc(n,c,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var dA=/\r\n?/g,fA=/\u0000|\uFFFD/g;function W0(e){return(typeof e=="string"?e:""+e).replace(dA,` +`).replace(fA,"")}function Mu(e,t,n){if(t=W0(t),W0(e)!==t&&n)throw Error(ae(425))}function Ld(){}var $p=null,Up=null;function Vp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bp=typeof setTimeout=="function"?setTimeout:void 0,hA=typeof clearTimeout=="function"?clearTimeout:void 0,H0=typeof Promise=="function"?Promise:void 0,mA=typeof queueMicrotask=="function"?queueMicrotask:typeof H0<"u"?function(e){return H0.resolve(null).then(e).catch(pA)}:Bp;function pA(e){setTimeout(function(){throw e})}function Tm(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),lc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);lc(t)}function vo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Y0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Za=Math.random().toString(36).slice(2),Kr="__reactFiber$"+Za,hc="__reactProps$"+Za,Ds="__reactContainer$"+Za,Wp="__reactEvents$"+Za,gA="__reactListeners$"+Za,yA="__reactHandles$"+Za;function Yo(e){var t=e[Kr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ds]||n[Kr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Y0(e);e!==null;){if(n=e[Kr])return n;e=Y0(e)}return t}e=n,n=e.parentNode}return null}function Xc(e){return e=e[Kr]||e[Ds],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ea(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ae(33))}function Gf(e){return e[hc]||null}var Hp=[],ta=-1;function Mo(e){return{current:e}}function kt(e){0>ta||(e.current=Hp[ta],Hp[ta]=null,ta--)}function bt(e,t){ta++,Hp[ta]=e.current,e.current=t}var Eo={},gn=Mo(Eo),On=Mo(!1),li=Eo;function Pa(e,t){var n=e.type.contextTypes;if(!n)return Eo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Dn(e){return e=e.childContextTypes,e!=null}function zd(){kt(On),kt(gn)}function K0(e,t,n){if(gn.current!==Eo)throw Error(ae(168));bt(gn,t),bt(On,n)}function A1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ae(108,tR(e)||"Unknown",s));return Mt({},n,r)}function Fd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,li=gn.current,bt(gn,e),bt(On,On.current),!0}function G0(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=A1(e,t,li),r.__reactInternalMemoizedMergedChildContext=e,kt(On),kt(gn),bt(gn,e)):kt(On),bt(On,n)}var Ss=null,Zf=!1,Pm=!1;function O1(e){Ss===null?Ss=[e]:Ss.push(e)}function vA(e){Zf=!0,O1(e)}function Lo(){if(!Pm&&Ss!==null){Pm=!0;var e=0,t=gt;try{var n=Ss;for(gt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ss=null,Zf=!1}catch(s){throw Ss!==null&&(Ss=Ss.slice(e+1)),s1(py,Lo),s}finally{gt=t,Pm=!1}}return null}var na=[],ra=0,$d=null,Ud=0,sr=[],or=0,ci=null,ks=1,Cs="";function Vo(e,t){na[ra++]=Ud,na[ra++]=$d,$d=e,Ud=t}function D1(e,t,n){sr[or++]=ks,sr[or++]=Cs,sr[or++]=ci,ci=e;var r=ks;e=Cs;var s=32-Er(r)-1;r&=~(1<<s),n+=1;var o=32-Er(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,ks=1<<32-Er(t)+s|n<<s|r,Cs=o+e}else ks=1<<o|n<<s|r,Cs=e}function ky(e){e.return!==null&&(Vo(e,1),D1(e,1,0))}function Cy(e){for(;e===$d;)$d=na[--ra],na[ra]=null,Ud=na[--ra],na[ra]=null;for(;e===ci;)ci=sr[--or],sr[or]=null,Cs=sr[--or],sr[or]=null,ks=sr[--or],sr[or]=null}var Hn=null,Wn=null,Pt=!1,br=null;function I1(e,t){var n=ar(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Z0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Hn=e,Wn=vo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Hn=e,Wn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ci!==null?{id:ks,overflow:Cs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ar(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Hn=e,Wn=null,!0):!1;default:return!1}}function Yp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Kp(e){if(Pt){var t=Wn;if(t){var n=t;if(!Z0(e,t)){if(Yp(e))throw Error(ae(418));t=vo(n.nextSibling);var r=Hn;t&&Z0(e,t)?I1(r,n):(e.flags=e.flags&-4097|2,Pt=!1,Hn=e)}}else{if(Yp(e))throw Error(ae(418));e.flags=e.flags&-4097|2,Pt=!1,Hn=e}}}function q0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Hn=e}function Lu(e){if(e!==Hn)return!1;if(!Pt)return q0(e),Pt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vp(e.type,e.memoizedProps)),t&&(t=Wn)){if(Yp(e))throw M1(),Error(ae(418));for(;t;)I1(e,t),t=vo(t.nextSibling)}if(q0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ae(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Wn=vo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Wn=null}}else Wn=Hn?vo(e.stateNode.nextSibling):null;return!0}function M1(){for(var e=Wn;e;)e=vo(e.nextSibling)}function Ra(){Wn=Hn=null,Pt=!1}function jy(e){br===null?br=[e]:br.push(e)}var xA=Vs.ReactCurrentBatchConfig;function yl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ae(309));var r=n.stateNode}if(!r)throw Error(ae(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(ae(284));if(!n._owner)throw Error(ae(290,e))}return e}function zu(e,t){throw e=Object.prototype.toString.call(t),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function X0(e){var t=e._init;return t(e._payload)}function L1(e){function t(y,v){if(e){var b=y.deletions;b===null?(y.deletions=[v],y.flags|=16):b.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function s(y,v){return y=_o(y,v),y.index=0,y.sibling=null,y}function o(y,v,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<v?(y.flags|=2,v):b):(y.flags|=2,v)):(y.flags|=1048576,v)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,b,_){return v===null||v.tag!==6?(v=Lm(b,y.mode,_),v.return=y,v):(v=s(v,b),v.return=y,v)}function c(y,v,b,_){var C=b.type;return C===qi?d(y,v,b.props.children,_,b.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===so&&X0(C)===v.type)?(_=s(v,b.props),_.ref=yl(y,v,b),_.return=y,_):(_=gd(b.type,b.key,b.props,null,y.mode,_),_.ref=yl(y,v,b),_.return=y,_)}function u(y,v,b,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=zm(b,y.mode,_),v.return=y,v):(v=s(v,b.children||[]),v.return=y,v)}function d(y,v,b,_,C){return v===null||v.tag!==7?(v=ni(b,y.mode,_,C),v.return=y,v):(v=s(v,b),v.return=y,v)}function f(y,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Lm(""+v,y.mode,b),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Eu:return b=gd(v.type,v.key,v.props,null,y.mode,b),b.ref=yl(y,null,v),b.return=y,b;case Zi:return v=zm(v,y.mode,b),v.return=y,v;case so:var _=v._init;return f(y,_(v._payload),b)}if(Al(v)||fl(v))return v=ni(v,y.mode,b,null),v.return=y,v;zu(y,v)}return null}function h(y,v,b,_){var C=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:a(y,v,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:return b.key===C?c(y,v,b,_):null;case Zi:return b.key===C?u(y,v,b,_):null;case so:return C=b._init,h(y,v,C(b._payload),_)}if(Al(b)||fl(b))return C!==null?null:d(y,v,b,_,null);zu(y,b)}return null}function m(y,v,b,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(b)||null,a(v,y,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Eu:return y=y.get(_.key===null?b:_.key)||null,c(v,y,_,C);case Zi:return y=y.get(_.key===null?b:_.key)||null,u(v,y,_,C);case so:var j=_._init;return m(y,v,b,j(_._payload),C)}if(Al(_)||fl(_))return y=y.get(b)||null,d(v,y,_,C,null);zu(v,_)}return null}function x(y,v,b,_){for(var C=null,j=null,T=v,R=v=0,A=null;T!==null&&R<b.length;R++){T.index>R?(A=T,T=null):A=T.sibling;var D=h(y,T,b[R],_);if(D===null){T===null&&(T=A);break}e&&T&&D.alternate===null&&t(y,T),v=o(D,v,R),j===null?C=D:j.sibling=D,j=D,T=A}if(R===b.length)return n(y,T),Pt&&Vo(y,R),C;if(T===null){for(;R<b.length;R++)T=f(y,b[R],_),T!==null&&(v=o(T,v,R),j===null?C=T:j.sibling=T,j=T);return Pt&&Vo(y,R),C}for(T=r(y,T);R<b.length;R++)A=m(T,y,R,b[R],_),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?R:A.key),v=o(A,v,R),j===null?C=A:j.sibling=A,j=A);return e&&T.forEach(function(G){return t(y,G)}),Pt&&Vo(y,R),C}function p(y,v,b,_){var C=fl(b);if(typeof C!="function")throw Error(ae(150));if(b=C.call(b),b==null)throw Error(ae(151));for(var j=C=null,T=v,R=v=0,A=null,D=b.next();T!==null&&!D.done;R++,D=b.next()){T.index>R?(A=T,T=null):A=T.sibling;var G=h(y,T,D.value,_);if(G===null){T===null&&(T=A);break}e&&T&&G.alternate===null&&t(y,T),v=o(G,v,R),j===null?C=G:j.sibling=G,j=G,T=A}if(D.done)return n(y,T),Pt&&Vo(y,R),C;if(T===null){for(;!D.done;R++,D=b.next())D=f(y,D.value,_),D!==null&&(v=o(D,v,R),j===null?C=D:j.sibling=D,j=D);return Pt&&Vo(y,R),C}for(T=r(y,T);!D.done;R++,D=b.next())D=m(T,y,R,D.value,_),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?R:D.key),v=o(D,v,R),j===null?C=D:j.sibling=D,j=D);return e&&T.forEach(function(N){return t(y,N)}),Pt&&Vo(y,R),C}function w(y,v,b,_){if(typeof b=="object"&&b!==null&&b.type===qi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:e:{for(var C=b.key,j=v;j!==null;){if(j.key===C){if(C=b.type,C===qi){if(j.tag===7){n(y,j.sibling),v=s(j,b.props.children),v.return=y,y=v;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===so&&X0(C)===j.type){n(y,j.sibling),v=s(j,b.props),v.ref=yl(y,j,b),v.return=y,y=v;break e}n(y,j);break}else t(y,j);j=j.sibling}b.type===qi?(v=ni(b.props.children,y.mode,_,b.key),v.return=y,y=v):(_=gd(b.type,b.key,b.props,null,y.mode,_),_.ref=yl(y,v,b),_.return=y,y=_)}return i(y);case Zi:e:{for(j=b.key;v!==null;){if(v.key===j)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(y,v.sibling),v=s(v,b.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=zm(b,y.mode,_),v.return=y,y=v}return i(y);case so:return j=b._init,w(y,v,j(b._payload),_)}if(Al(b))return x(y,v,b,_);if(fl(b))return p(y,v,b,_);zu(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(y,v.sibling),v=s(v,b),v.return=y,y=v):(n(y,v),v=Lm(b,y.mode,_),v.return=y,y=v),i(y)):n(y,v)}return w}var Aa=L1(!0),z1=L1(!1),Vd=Mo(null),Bd=null,sa=null,Ey=null;function Ny(){Ey=sa=Bd=null}function Ty(e){var t=Vd.current;kt(Vd),e._currentValue=t}function Gp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function va(e,t){Bd=e,Ey=sa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(An=!0),e.firstContext=null)}function fr(e){var t=e._currentValue;if(Ey!==e)if(e={context:e,memoizedValue:t,next:null},sa===null){if(Bd===null)throw Error(ae(308));sa=e,Bd.dependencies={lanes:0,firstContext:e}}else sa=sa.next=e;return t}var Ko=null;function Py(e){Ko===null?Ko=[e]:Ko.push(e)}function F1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Py(t)):(n.next=s.next,s.next=n),t.interleaved=n,Is(e,r)}function Is(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oo=!1;function Ry(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ns(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Is(e,n)}return s=r.interleaved,s===null?(t.next=t,Py(r)):(t.next=s.next,s.next=t),r.interleaved=t,Is(e,n)}function ud(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gy(e,n)}}function Q0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wd(e,t,n,r){var s=e.updateQueue;oo=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,a=o;do{var h=a.lane,m=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,p=a;switch(h=t,m=n,p.tag){case 1:if(x=p.payload,typeof x=="function"){f=x.call(m,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=p.payload,h=typeof x=="function"?x.call(m,f,h):x,h==null)break e;f=Mt({},f,h);break e;case 2:oo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,i|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);di|=i,e.lanes=i,e.memoizedState=f}}function J0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(ae(191,s));s.call(r)}}}var Qc={},ns=Mo(Qc),mc=Mo(Qc),pc=Mo(Qc);function Go(e){if(e===Qc)throw Error(ae(174));return e}function Ay(e,t){switch(bt(pc,t),bt(mc,e),bt(ns,Qc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Np(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Np(t,e)}kt(ns),bt(ns,t)}function Oa(){kt(ns),kt(mc),kt(pc)}function U1(e){Go(pc.current);var t=Go(ns.current),n=Np(t,e.type);t!==n&&(bt(mc,e),bt(ns,n))}function Oy(e){mc.current===e&&(kt(ns),kt(mc))}var Ot=Mo(0);function Hd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rm=[];function Dy(){for(var e=0;e<Rm.length;e++)Rm[e]._workInProgressVersionPrimary=null;Rm.length=0}var dd=Vs.ReactCurrentDispatcher,Am=Vs.ReactCurrentBatchConfig,ui=0,It=null,Zt=null,Jt=null,Yd=!1,Gl=!1,gc=0,wA=0;function fn(){throw Error(ae(321))}function Iy(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pr(e[n],t[n]))return!1;return!0}function My(e,t,n,r,s,o){if(ui=o,It=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dd.current=e===null||e.memoizedState===null?kA:CA,e=n(r,s),Gl){o=0;do{if(Gl=!1,gc=0,25<=o)throw Error(ae(301));o+=1,Jt=Zt=null,t.updateQueue=null,dd.current=jA,e=n(r,s)}while(Gl)}if(dd.current=Kd,t=Zt!==null&&Zt.next!==null,ui=0,Jt=Zt=It=null,Yd=!1,t)throw Error(ae(300));return e}function Ly(){var e=gc!==0;return gc=0,e}function Yr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?It.memoizedState=Jt=e:Jt=Jt.next=e,Jt}function hr(){if(Zt===null){var e=It.alternate;e=e!==null?e.memoizedState:null}else e=Zt.next;var t=Jt===null?It.memoizedState:Jt.next;if(t!==null)Jt=t,Zt=e;else{if(e===null)throw Error(ae(310));Zt=e,e={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},Jt===null?It.memoizedState=Jt=e:Jt=Jt.next=e}return Jt}function yc(e,t){return typeof t=="function"?t(e):t}function Om(e){var t=hr(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=Zt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,c=null,u=o;do{var d=u.lane;if((ui&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,i=r):c=c.next=f,It.lanes|=d,di|=d}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=a,Pr(r,t.memoizedState)||(An=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,It.lanes|=o,di|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Dm(e){var t=hr(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Pr(o,t.memoizedState)||(An=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function V1(){}function B1(e,t){var n=It,r=hr(),s=t(),o=!Pr(r.memoizedState,s);if(o&&(r.memoizedState=s,An=!0),r=r.queue,zy(Y1.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Jt!==null&&Jt.memoizedState.tag&1){if(n.flags|=2048,vc(9,H1.bind(null,n,r,s,t),void 0,null),en===null)throw Error(ae(349));ui&30||W1(n,t,s)}return s}function W1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=It.updateQueue,t===null?(t={lastEffect:null,stores:null},It.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function H1(e,t,n,r){t.value=n,t.getSnapshot=r,K1(t)&&G1(e)}function Y1(e,t,n){return n(function(){K1(t)&&G1(e)})}function K1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pr(e,n)}catch{return!0}}function G1(e){var t=Is(e,1);t!==null&&Nr(t,e,1,-1)}function ew(e){var t=Yr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yc,lastRenderedState:e},t.queue=e,e=e.dispatch=SA.bind(null,It,e),[t.memoizedState,e]}function vc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=It.updateQueue,t===null?(t={lastEffect:null,stores:null},It.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Z1(){return hr().memoizedState}function fd(e,t,n,r){var s=Yr();It.flags|=e,s.memoizedState=vc(1|t,n,void 0,r===void 0?null:r)}function qf(e,t,n,r){var s=hr();r=r===void 0?null:r;var o=void 0;if(Zt!==null){var i=Zt.memoizedState;if(o=i.destroy,r!==null&&Iy(r,i.deps)){s.memoizedState=vc(t,n,o,r);return}}It.flags|=e,s.memoizedState=vc(1|t,n,o,r)}function tw(e,t){return fd(8390656,8,e,t)}function zy(e,t){return qf(2048,8,e,t)}function q1(e,t){return qf(4,2,e,t)}function X1(e,t){return qf(4,4,e,t)}function Q1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function J1(e,t,n){return n=n!=null?n.concat([e]):null,qf(4,4,Q1.bind(null,t,e),n)}function Fy(){}function eS(e,t){var n=hr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Iy(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tS(e,t){var n=hr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Iy(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function nS(e,t,n){return ui&21?(Pr(n,t)||(n=a1(),It.lanes|=n,di|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,An=!0),e.memoizedState=n)}function bA(e,t){var n=gt;gt=n!==0&&4>n?n:4,e(!0);var r=Am.transition;Am.transition={};try{e(!1),t()}finally{gt=n,Am.transition=r}}function rS(){return hr().memoizedState}function _A(e,t,n){var r=bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sS(e))oS(t,n);else if(n=F1(e,t,n,r),n!==null){var s=Sn();Nr(n,e,r,s),iS(n,t,r)}}function SA(e,t,n){var r=bo(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sS(e))oS(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,Pr(a,i)){var c=t.interleaved;c===null?(s.next=s,Py(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=F1(e,t,s,r),n!==null&&(s=Sn(),Nr(n,e,r,s),iS(n,t,r))}}function sS(e){var t=e.alternate;return e===It||t!==null&&t===It}function oS(e,t){Gl=Yd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function iS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gy(e,n)}}var Kd={readContext:fr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},kA={readContext:fr,useCallback:function(e,t){return Yr().memoizedState=[e,t===void 0?null:t],e},useContext:fr,useEffect:tw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fd(4194308,4,Q1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fd(4194308,4,e,t)},useInsertionEffect:function(e,t){return fd(4,2,e,t)},useMemo:function(e,t){var n=Yr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=_A.bind(null,It,e),[r.memoizedState,e]},useRef:function(e){var t=Yr();return e={current:e},t.memoizedState=e},useState:ew,useDebugValue:Fy,useDeferredValue:function(e){return Yr().memoizedState=e},useTransition:function(){var e=ew(!1),t=e[0];return e=bA.bind(null,e[1]),Yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=It,s=Yr();if(Pt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),en===null)throw Error(ae(349));ui&30||W1(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,tw(Y1.bind(null,r,o,e),[e]),r.flags|=2048,vc(9,H1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Yr(),t=en.identifierPrefix;if(Pt){var n=Cs,r=ks;n=(r&~(1<<32-Er(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=wA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},CA={readContext:fr,useCallback:eS,useContext:fr,useEffect:zy,useImperativeHandle:J1,useInsertionEffect:q1,useLayoutEffect:X1,useMemo:tS,useReducer:Om,useRef:Z1,useState:function(){return Om(yc)},useDebugValue:Fy,useDeferredValue:function(e){var t=hr();return nS(t,Zt.memoizedState,e)},useTransition:function(){var e=Om(yc)[0],t=hr().memoizedState;return[e,t]},useMutableSource:V1,useSyncExternalStore:B1,useId:rS,unstable_isNewReconciler:!1},jA={readContext:fr,useCallback:eS,useContext:fr,useEffect:zy,useImperativeHandle:J1,useInsertionEffect:q1,useLayoutEffect:X1,useMemo:tS,useReducer:Dm,useRef:Z1,useState:function(){return Dm(yc)},useDebugValue:Fy,useDeferredValue:function(e){var t=hr();return Zt===null?t.memoizedState=e:nS(t,Zt.memoizedState,e)},useTransition:function(){var e=Dm(yc)[0],t=hr().memoizedState;return[e,t]},useMutableSource:V1,useSyncExternalStore:B1,useId:rS,unstable_isNewReconciler:!1};function vr(e,t){if(e&&e.defaultProps){t=Mt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Zp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Mt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xf={isMounted:function(e){return(e=e._reactInternals)?ki(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=bo(e),o=Ns(r,s);o.payload=t,n!=null&&(o.callback=n),t=xo(e,o,s),t!==null&&(Nr(t,e,s,r),ud(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=bo(e),o=Ns(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=xo(e,o,s),t!==null&&(Nr(t,e,s,r),ud(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),r=bo(e),s=Ns(n,r);s.tag=2,t!=null&&(s.callback=t),t=xo(e,s,r),t!==null&&(Nr(t,e,r,n),ud(t,e,r))}};function nw(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!uc(n,r)||!uc(s,o):!0}function aS(e,t,n){var r=!1,s=Eo,o=t.contextType;return typeof o=="object"&&o!==null?o=fr(o):(s=Dn(t)?li:gn.current,r=t.contextTypes,o=(r=r!=null)?Pa(e,s):Eo),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Xf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function rw(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Xf.enqueueReplaceState(t,t.state,null)}function qp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Ry(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=fr(o):(o=Dn(t)?li:gn.current,s.context=Pa(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Zp(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Xf.enqueueReplaceState(s,s.state,null),Wd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Da(e,t){try{var n="",r=t;do n+=eR(r),r=r.return;while(r);var s=n}catch(o){s=` +Error generating stack: `+o.message+` +`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Im(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var EA=typeof WeakMap=="function"?WeakMap:Map;function lS(e,t,n){n=Ns(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zd||(Zd=!0,ag=r),Xp(e,t)},n}function cS(e,t,n){n=Ns(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Xp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Xp(e,t),typeof r!="function"&&(wo===null?wo=new Set([this]):wo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function sw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new EA;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=UA.bind(null,e,t,n),t.then(e,e))}function ow(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function iw(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ns(-1,1),t.tag=2,xo(n,t,1))),n.lanes|=1),e)}var NA=Vs.ReactCurrentOwner,An=!1;function bn(e,t,n,r){t.child=e===null?z1(t,null,n,r):Aa(t,e.child,n,r)}function aw(e,t,n,r,s){n=n.render;var o=t.ref;return va(t,s),r=My(e,t,n,r,o,s),n=Ly(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ms(e,t,s)):(Pt&&n&&ky(t),t.flags|=1,bn(e,t,r,s),t.child)}function lw(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Ky(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,uS(e,t,o,r,s)):(e=gd(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:uc,n(i,r)&&e.ref===t.ref)return Ms(e,t,s)}return t.flags|=1,e=_o(o,r),e.ref=t.ref,e.return=t,t.child=e}function uS(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(uc(o,r)&&e.ref===t.ref)if(An=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(An=!0);else return t.lanes=e.lanes,Ms(e,t,s)}return Qp(e,t,n,r,s)}function dS(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(ia,Un),Un|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bt(ia,Un),Un|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bt(ia,Un),Un|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,bt(ia,Un),Un|=r;return bn(e,t,s,n),t.child}function fS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qp(e,t,n,r,s){var o=Dn(n)?li:gn.current;return o=Pa(t,o),va(t,s),n=My(e,t,n,r,o,s),r=Ly(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ms(e,t,s)):(Pt&&r&&ky(t),t.flags|=1,bn(e,t,n,s),t.child)}function cw(e,t,n,r,s){if(Dn(n)){var o=!0;Fd(t)}else o=!1;if(va(t,s),t.stateNode===null)hd(e,t),aS(t,n,r),qp(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=fr(u):(u=Dn(n)?li:gn.current,u=Pa(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||c!==u)&&rw(t,i,r,u),oo=!1;var h=t.memoizedState;i.state=h,Wd(t,r,i,s),c=t.memoizedState,a!==r||h!==c||On.current||oo?(typeof d=="function"&&(Zp(t,n,d,r),c=t.memoizedState),(a=oo||nw(t,n,a,r,h,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,$1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:vr(t.type,a),i.props=u,f=t.pendingProps,h=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=fr(c):(c=Dn(n)?li:gn.current,c=Pa(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||h!==c)&&rw(t,i,r,c),oo=!1,h=t.memoizedState,i.state=h,Wd(t,r,i,s);var x=t.memoizedState;a!==f||h!==x||On.current||oo?(typeof m=="function"&&(Zp(t,n,m,r),x=t.memoizedState),(u=oo||nw(t,n,u,r,h,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Jp(e,t,n,r,o,s)}function Jp(e,t,n,r,s,o){fS(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&G0(t,n,!1),Ms(e,t,o);r=t.stateNode,NA.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Aa(t,e.child,null,o),t.child=Aa(t,null,a,o)):bn(e,t,a,o),t.memoizedState=r.state,s&&G0(t,n,!0),t.child}function hS(e){var t=e.stateNode;t.pendingContext?K0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&K0(e,t.context,!1),Ay(e,t.containerInfo)}function uw(e,t,n,r,s){return Ra(),jy(s),t.flags|=256,bn(e,t,n,r),t.child}var eg={dehydrated:null,treeContext:null,retryLane:0};function tg(e){return{baseLanes:e,cachePool:null,transitions:null}}function mS(e,t,n){var r=t.pendingProps,s=Ot.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),bt(Ot,s&1),e===null)return Kp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=eh(i,r,0,null),e=ni(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=tg(n),t.memoizedState=eg,e):$y(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return TA(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=_o(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=_o(a,o):(o=ni(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?tg(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=eg,r}return o=e.child,e=o.sibling,r=_o(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $y(e,t){return t=eh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fu(e,t,n,r){return r!==null&&jy(r),Aa(t,e.child,null,n),e=$y(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function TA(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Im(Error(ae(422))),Fu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=eh({mode:"visible",children:r.children},s,0,null),o=ni(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Aa(t,e.child,null,i),t.child.memoizedState=tg(i),t.memoizedState=eg,o);if(!(t.mode&1))return Fu(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ae(419)),r=Im(o,r,void 0),Fu(e,t,i,r)}if(a=(i&e.childLanes)!==0,An||a){if(r=en,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Is(e,s),Nr(r,e,s,-1))}return Yy(),r=Im(Error(ae(421))),Fu(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=VA.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Wn=vo(s.nextSibling),Hn=t,Pt=!0,br=null,e!==null&&(sr[or++]=ks,sr[or++]=Cs,sr[or++]=ci,ks=e.id,Cs=e.overflow,ci=t),t=$y(t,r.children),t.flags|=4096,t)}function dw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gp(e.return,t,n)}function Mm(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function pS(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(bn(e,t,r.children,n),r=Ot.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dw(e,n,t);else if(e.tag===19)dw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(bt(Ot,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Hd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Mm(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Hd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Mm(t,!0,n,null,o);break;case"together":Mm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ms(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),di|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=_o(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_o(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function PA(e,t,n){switch(t.tag){case 3:hS(t),Ra();break;case 5:U1(t);break;case 1:Dn(t.type)&&Fd(t);break;case 4:Ay(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;bt(Vd,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(bt(Ot,Ot.current&1),t.flags|=128,null):n&t.child.childLanes?mS(e,t,n):(bt(Ot,Ot.current&1),e=Ms(e,t,n),e!==null?e.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return pS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(Ot,Ot.current),r)break;return null;case 22:case 23:return t.lanes=0,dS(e,t,n)}return Ms(e,t,n)}var gS,ng,yS,vS;gS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ng=function(){};yS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Go(ns.current);var o=null;switch(n){case"input":s=kp(e,s),r=kp(e,r),o=[];break;case"select":s=Mt({},s,{value:void 0}),r=Mt({},r,{value:void 0}),o=[];break;case"textarea":s=Ep(e,s),r=Ep(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ld)}Tp(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(rc.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&a[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(rc.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&St("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};vS=function(e,t,n,r){n!==r&&(t.flags|=4)};function vl(e,t){if(!Pt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function RA(e,t,n){var r=t.pendingProps;switch(Cy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(t),null;case 1:return Dn(t.type)&&zd(),hn(t),null;case 3:return r=t.stateNode,Oa(),kt(On),kt(gn),Dy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Lu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,br!==null&&(ug(br),br=null))),ng(e,t),hn(t),null;case 5:Oy(t);var s=Go(pc.current);if(n=t.type,e!==null&&t.stateNode!=null)yS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return hn(t),null}if(e=Go(ns.current),Lu(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Kr]=t,r[hc]=o,e=(t.mode&1)!==0,n){case"dialog":St("cancel",r),St("close",r);break;case"iframe":case"object":case"embed":St("load",r);break;case"video":case"audio":for(s=0;s<Dl.length;s++)St(Dl[s],r);break;case"source":St("error",r);break;case"img":case"image":case"link":St("error",r),St("load",r);break;case"details":St("toggle",r);break;case"input":w0(r,o),St("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},St("invalid",r);break;case"textarea":_0(r,o),St("invalid",r)}Tp(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,a,e),s=["children",""+a]):rc.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&St("scroll",r)}switch(n){case"input":Nu(r),b0(r,o,!0);break;case"textarea":Nu(r),S0(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ld)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Y_(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Kr]=t,e[hc]=r,gS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Pp(n,r),n){case"dialog":St("cancel",e),St("close",e),s=r;break;case"iframe":case"object":case"embed":St("load",e),s=r;break;case"video":case"audio":for(s=0;s<Dl.length;s++)St(Dl[s],e);s=r;break;case"source":St("error",e),s=r;break;case"img":case"image":case"link":St("error",e),St("load",e),s=r;break;case"details":St("toggle",e),s=r;break;case"input":w0(e,r),s=kp(e,r),St("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Mt({},r,{value:void 0}),St("invalid",e);break;case"textarea":_0(e,r),s=Ep(e,r),St("invalid",e);break;default:s=r}Tp(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?Z_(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&K_(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&sc(e,c):typeof c=="number"&&sc(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(rc.hasOwnProperty(o)?c!=null&&o==="onScroll"&&St("scroll",e):c!=null&&uy(e,o,c,i))}switch(n){case"input":Nu(e),b0(e,r,!1);break;case"textarea":Nu(e),S0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+jo(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ma(e,!!r.multiple,o,!1):r.defaultValue!=null&&ma(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ld)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return hn(t),null;case 6:if(e&&t.stateNode!=null)vS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ae(166));if(n=Go(pc.current),Go(ns.current),Lu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Kr]=t,(o=r.nodeValue!==n)&&(e=Hn,e!==null))switch(e.tag){case 3:Mu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mu(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Kr]=t,t.stateNode=r}return hn(t),null;case 13:if(kt(Ot),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pt&&Wn!==null&&t.mode&1&&!(t.flags&128))M1(),Ra(),t.flags|=98560,o=!1;else if(o=Lu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ae(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ae(317));o[Kr]=t}else Ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hn(t),o=!1}else br!==null&&(ug(br),br=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ot.current&1?qt===0&&(qt=3):Yy())),t.updateQueue!==null&&(t.flags|=4),hn(t),null);case 4:return Oa(),ng(e,t),e===null&&dc(t.stateNode.containerInfo),hn(t),null;case 10:return Ty(t.type._context),hn(t),null;case 17:return Dn(t.type)&&zd(),hn(t),null;case 19:if(kt(Ot),o=t.memoizedState,o===null)return hn(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)vl(o,!1);else{if(qt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Hd(e),i!==null){for(t.flags|=128,vl(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return bt(Ot,Ot.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ut()>Ia&&(t.flags|=128,r=!0,vl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Hd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Pt)return hn(t),null}else 2*Ut()-o.renderingStartTime>Ia&&n!==1073741824&&(t.flags|=128,r=!0,vl(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ut(),t.sibling=null,n=Ot.current,bt(Ot,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return Hy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Un&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function AA(e,t){switch(Cy(t),t.tag){case 1:return Dn(t.type)&&zd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oa(),kt(On),kt(gn),Dy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oy(t),null;case 13:if(kt(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kt(Ot),null;case 4:return Oa(),null;case 10:return Ty(t.type._context),null;case 22:case 23:return Hy(),null;case 24:return null;default:return null}}var $u=!1,mn=!1,OA=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function oa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){zt(e,t,r)}else n.current=null}function rg(e,t,n){try{n()}catch(r){zt(e,t,r)}}var fw=!1;function DA(e,t){if($p=Dd,e=S1(),Sy(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=i),h===o&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Up={focusedElem:e,selectionRange:n},Dd=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var p=x.memoizedProps,w=x.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?p:vr(t.type,p),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(_){zt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return x=fw,fw=!1,x}function Zl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&rg(t,n,o)}s=s.next}while(s!==r)}}function Qf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xS(e){var t=e.alternate;t!==null&&(e.alternate=null,xS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kr],delete t[hc],delete t[Wp],delete t[gA],delete t[yA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wS(e){return e.tag===5||e.tag===3||e.tag===4}function hw(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.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 og(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ld));else if(r!==4&&(e=e.child,e!==null))for(og(e,t,n),e=e.sibling;e!==null;)og(e,t,n),e=e.sibling}function ig(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ig(e,t,n),e=e.sibling;e!==null;)ig(e,t,n),e=e.sibling}var an=null,xr=!1;function Js(e,t,n){for(n=n.child;n!==null;)bS(e,t,n),n=n.sibling}function bS(e,t,n){if(ts&&typeof ts.onCommitFiberUnmount=="function")try{ts.onCommitFiberUnmount(Wf,n)}catch{}switch(n.tag){case 5:mn||oa(n,t);case 6:var r=an,s=xr;an=null,Js(e,t,n),an=r,xr=s,an!==null&&(xr?(e=an,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):an.removeChild(n.stateNode));break;case 18:an!==null&&(xr?(e=an,n=n.stateNode,e.nodeType===8?Tm(e.parentNode,n):e.nodeType===1&&Tm(e,n),lc(e)):Tm(an,n.stateNode));break;case 4:r=an,s=xr,an=n.stateNode.containerInfo,xr=!0,Js(e,t,n),an=r,xr=s;break;case 0:case 11:case 14:case 15:if(!mn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&rg(n,t,i),s=s.next}while(s!==r)}Js(e,t,n);break;case 1:if(!mn&&(oa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){zt(n,t,a)}Js(e,t,n);break;case 21:Js(e,t,n);break;case 22:n.mode&1?(mn=(r=mn)||n.memoizedState!==null,Js(e,t,n),mn=r):Js(e,t,n);break;default:Js(e,t,n)}}function mw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new OA),t.forEach(function(r){var s=BA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function yr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:an=a.stateNode,xr=!1;break e;case 3:an=a.stateNode.containerInfo,xr=!0;break e;case 4:an=a.stateNode.containerInfo,xr=!0;break e}a=a.return}if(an===null)throw Error(ae(160));bS(o,i,s),an=null,xr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){zt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_S(t,e),t=t.sibling}function _S(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yr(t,e),Hr(e),r&4){try{Zl(3,e,e.return),Qf(3,e)}catch(p){zt(e,e.return,p)}try{Zl(5,e,e.return)}catch(p){zt(e,e.return,p)}}break;case 1:yr(t,e),Hr(e),r&512&&n!==null&&oa(n,n.return);break;case 5:if(yr(t,e),Hr(e),r&512&&n!==null&&oa(n,n.return),e.flags&32){var s=e.stateNode;try{sc(s,"")}catch(p){zt(e,e.return,p)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&W_(s,o),Pp(a,i);var u=Pp(a,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?Z_(s,f):d==="dangerouslySetInnerHTML"?K_(s,f):d==="children"?sc(s,f):uy(s,d,f,u)}switch(a){case"input":Cp(s,o);break;case"textarea":H_(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?ma(s,!!o.multiple,m,!1):h!==!!o.multiple&&(o.defaultValue!=null?ma(s,!!o.multiple,o.defaultValue,!0):ma(s,!!o.multiple,o.multiple?[]:"",!1))}s[hc]=o}catch(p){zt(e,e.return,p)}}break;case 6:if(yr(t,e),Hr(e),r&4){if(e.stateNode===null)throw Error(ae(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(p){zt(e,e.return,p)}}break;case 3:if(yr(t,e),Hr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{lc(t.containerInfo)}catch(p){zt(e,e.return,p)}break;case 4:yr(t,e),Hr(e);break;case 13:yr(t,e),Hr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(By=Ut())),r&4&&mw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(mn=(u=mn)||d,yr(t,e),mn=u):yr(t,e),Hr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ne=e,d=e.child;d!==null;){for(f=Ne=d;Ne!==null;){switch(h=Ne,m=h.child,h.tag){case 0:case 11:case 14:case 15:Zl(4,h,h.return);break;case 1:oa(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(p){zt(r,n,p)}}break;case 5:oa(h,h.return);break;case 22:if(h.memoizedState!==null){gw(f);continue}}m!==null?(m.return=h,Ne=m):gw(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=G_("display",i))}catch(p){zt(e,e.return,p)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){zt(e,e.return,p)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:yr(t,e),Hr(e),r&4&&mw(e);break;case 21:break;default:yr(t,e),Hr(e)}}function Hr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(wS(n)){var r=n;break e}n=n.return}throw Error(ae(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(sc(s,""),r.flags&=-33);var o=hw(e);ig(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=hw(e);og(e,a,i);break;default:throw Error(ae(161))}}catch(c){zt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function IA(e,t,n){Ne=e,SS(e)}function SS(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var s=Ne,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||$u;if(!i){var a=s.alternate,c=a!==null&&a.memoizedState!==null||mn;a=$u;var u=mn;if($u=i,(mn=c)&&!u)for(Ne=s;Ne!==null;)i=Ne,c=i.child,i.tag===22&&i.memoizedState!==null?yw(s):c!==null?(c.return=i,Ne=c):yw(s);for(;o!==null;)Ne=o,SS(o),o=o.sibling;Ne=s,$u=a,mn=u}pw(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Ne=o):pw(e)}}function pw(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mn||Qf(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mn)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:vr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&J0(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}J0(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&lc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ae(163))}mn||t.flags&512&&sg(t)}catch(h){zt(t,t.return,h)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function gw(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function yw(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qf(4,t)}catch(c){zt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){zt(t,s,c)}}var o=t.return;try{sg(t)}catch(c){zt(t,o,c)}break;case 5:var i=t.return;try{sg(t)}catch(c){zt(t,i,c)}}}catch(c){zt(t,t.return,c)}if(t===e){Ne=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Ne=a;break}Ne=t.return}}var MA=Math.ceil,Gd=Vs.ReactCurrentDispatcher,Uy=Vs.ReactCurrentOwner,lr=Vs.ReactCurrentBatchConfig,ut=0,en=null,Yt=null,ln=0,Un=0,ia=Mo(0),qt=0,xc=null,di=0,Jf=0,Vy=0,ql=null,Rn=null,By=0,Ia=1/0,ws=null,Zd=!1,ag=null,wo=null,Uu=!1,uo=null,qd=0,Xl=0,lg=null,md=-1,pd=0;function Sn(){return ut&6?Ut():md!==-1?md:md=Ut()}function bo(e){return e.mode&1?ut&2&&ln!==0?ln&-ln:xA.transition!==null?(pd===0&&(pd=a1()),pd):(e=gt,e!==0||(e=window.event,e=e===void 0?16:m1(e.type)),e):1}function Nr(e,t,n,r){if(50<Xl)throw Xl=0,lg=null,Error(ae(185));Zc(e,n,r),(!(ut&2)||e!==en)&&(e===en&&(!(ut&2)&&(Jf|=n),qt===4&&ao(e,ln)),In(e,r),n===1&&ut===0&&!(t.mode&1)&&(Ia=Ut()+500,Zf&&Lo()))}function In(e,t){var n=e.callbackNode;xR(e,t);var r=Od(e,e===en?ln:0);if(r===0)n!==null&&j0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&j0(n),t===1)e.tag===0?vA(vw.bind(null,e)):O1(vw.bind(null,e)),mA(function(){!(ut&6)&&Lo()}),n=null;else{switch(l1(r)){case 1:n=py;break;case 4:n=o1;break;case 16:n=Ad;break;case 536870912:n=i1;break;default:n=Ad}n=RS(n,kS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function kS(e,t){if(md=-1,pd=0,ut&6)throw Error(ae(327));var n=e.callbackNode;if(xa()&&e.callbackNode!==n)return null;var r=Od(e,e===en?ln:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Xd(e,r);else{t=r;var s=ut;ut|=2;var o=jS();(en!==e||ln!==t)&&(ws=null,Ia=Ut()+500,ti(e,t));do try{FA();break}catch(a){CS(e,a)}while(!0);Ny(),Gd.current=o,ut=s,Yt!==null?t=0:(en=null,ln=0,t=qt)}if(t!==0){if(t===2&&(s=Ip(e),s!==0&&(r=s,t=cg(e,s))),t===1)throw n=xc,ti(e,0),ao(e,r),In(e,Ut()),n;if(t===6)ao(e,r);else{if(s=e.current.alternate,!(r&30)&&!LA(s)&&(t=Xd(e,r),t===2&&(o=Ip(e),o!==0&&(r=o,t=cg(e,o))),t===1))throw n=xc,ti(e,0),ao(e,r),In(e,Ut()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(ae(345));case 2:Bo(e,Rn,ws);break;case 3:if(ao(e,r),(r&130023424)===r&&(t=By+500-Ut(),10<t)){if(Od(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Sn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Bp(Bo.bind(null,e,Rn,ws),t);break}Bo(e,Rn,ws);break;case 4:if(ao(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Er(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MA(r/1960))-r,10<r){e.timeoutHandle=Bp(Bo.bind(null,e,Rn,ws),r);break}Bo(e,Rn,ws);break;case 5:Bo(e,Rn,ws);break;default:throw Error(ae(329))}}}return In(e,Ut()),e.callbackNode===n?kS.bind(null,e):null}function cg(e,t){var n=ql;return e.current.memoizedState.isDehydrated&&(ti(e,t).flags|=256),e=Xd(e,t),e!==2&&(t=Rn,Rn=n,t!==null&&ug(t)),e}function ug(e){Rn===null?Rn=e:Rn.push.apply(Rn,e)}function LA(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Pr(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ao(e,t){for(t&=~Vy,t&=~Jf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Er(t),r=1<<n;e[n]=-1,t&=~r}}function vw(e){if(ut&6)throw Error(ae(327));xa();var t=Od(e,0);if(!(t&1))return In(e,Ut()),null;var n=Xd(e,t);if(e.tag!==0&&n===2){var r=Ip(e);r!==0&&(t=r,n=cg(e,r))}if(n===1)throw n=xc,ti(e,0),ao(e,t),In(e,Ut()),n;if(n===6)throw Error(ae(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bo(e,Rn,ws),In(e,Ut()),null}function Wy(e,t){var n=ut;ut|=1;try{return e(t)}finally{ut=n,ut===0&&(Ia=Ut()+500,Zf&&Lo())}}function fi(e){uo!==null&&uo.tag===0&&!(ut&6)&&xa();var t=ut;ut|=1;var n=lr.transition,r=gt;try{if(lr.transition=null,gt=1,e)return e()}finally{gt=r,lr.transition=n,ut=t,!(ut&6)&&Lo()}}function Hy(){Un=ia.current,kt(ia)}function ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,hA(n)),Yt!==null)for(n=Yt.return;n!==null;){var r=n;switch(Cy(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zd();break;case 3:Oa(),kt(On),kt(gn),Dy();break;case 5:Oy(r);break;case 4:Oa();break;case 13:kt(Ot);break;case 19:kt(Ot);break;case 10:Ty(r.type._context);break;case 22:case 23:Hy()}n=n.return}if(en=e,Yt=e=_o(e.current,null),ln=Un=t,qt=0,xc=null,Vy=Jf=di=0,Rn=ql=null,Ko!==null){for(t=0;t<Ko.length;t++)if(n=Ko[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}Ko=null}return e}function CS(e,t){do{var n=Yt;try{if(Ny(),dd.current=Kd,Yd){for(var r=It.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Yd=!1}if(ui=0,Jt=Zt=It=null,Gl=!1,gc=0,Uy.current=null,n===null||n.return===null){qt=1,xc=t,Yt=null;break}e:{var o=e,i=n.return,a=n,c=t;if(t=ln,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=ow(i);if(m!==null){m.flags&=-257,iw(m,i,a,o,t),m.mode&1&&sw(o,u,t),t=m,c=u;var x=t.updateQueue;if(x===null){var p=new Set;p.add(c),t.updateQueue=p}else x.add(c);break e}else{if(!(t&1)){sw(o,u,t),Yy();break e}c=Error(ae(426))}}else if(Pt&&a.mode&1){var w=ow(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),iw(w,i,a,o,t),jy(Da(c,a));break e}}o=c=Da(c,a),qt!==4&&(qt=2),ql===null?ql=[o]:ql.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=lS(o,c,t);Q0(o,y);break e;case 1:a=c;var v=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(wo===null||!wo.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=cS(o,a,t);Q0(o,_);break e}}o=o.return}while(o!==null)}NS(n)}catch(C){t=C,Yt===n&&n!==null&&(Yt=n=n.return);continue}break}while(!0)}function jS(){var e=Gd.current;return Gd.current=Kd,e===null?Kd:e}function Yy(){(qt===0||qt===3||qt===2)&&(qt=4),en===null||!(di&268435455)&&!(Jf&268435455)||ao(en,ln)}function Xd(e,t){var n=ut;ut|=2;var r=jS();(en!==e||ln!==t)&&(ws=null,ti(e,t));do try{zA();break}catch(s){CS(e,s)}while(!0);if(Ny(),ut=n,Gd.current=r,Yt!==null)throw Error(ae(261));return en=null,ln=0,qt}function zA(){for(;Yt!==null;)ES(Yt)}function FA(){for(;Yt!==null&&!uR();)ES(Yt)}function ES(e){var t=PS(e.alternate,e,Un);e.memoizedProps=e.pendingProps,t===null?NS(e):Yt=t,Uy.current=null}function NS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=AA(n,t),n!==null){n.flags&=32767,Yt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qt=6,Yt=null;return}}else if(n=RA(n,t,Un),n!==null){Yt=n;return}if(t=t.sibling,t!==null){Yt=t;return}Yt=t=e}while(t!==null);qt===0&&(qt=5)}function Bo(e,t,n){var r=gt,s=lr.transition;try{lr.transition=null,gt=1,$A(e,t,n,r)}finally{lr.transition=s,gt=r}return null}function $A(e,t,n,r){do xa();while(uo!==null);if(ut&6)throw Error(ae(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ae(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(wR(e,o),e===en&&(Yt=en=null,ln=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Uu||(Uu=!0,RS(Ad,function(){return xa(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=lr.transition,lr.transition=null;var i=gt;gt=1;var a=ut;ut|=4,Uy.current=null,DA(e,n),_S(n,e),iA(Up),Dd=!!$p,Up=$p=null,e.current=n,IA(n),dR(),ut=a,gt=i,lr.transition=o}else e.current=n;if(Uu&&(Uu=!1,uo=e,qd=s),o=e.pendingLanes,o===0&&(wo=null),mR(n.stateNode),In(e,Ut()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Zd)throw Zd=!1,e=ag,ag=null,e;return qd&1&&e.tag!==0&&xa(),o=e.pendingLanes,o&1?e===lg?Xl++:(Xl=0,lg=e):Xl=0,Lo(),null}function xa(){if(uo!==null){var e=l1(qd),t=lr.transition,n=gt;try{if(lr.transition=null,gt=16>e?16:e,uo===null)var r=!1;else{if(e=uo,uo=null,qd=0,ut&6)throw Error(ae(331));var s=ut;for(ut|=4,Ne=e.current;Ne!==null;){var o=Ne,i=o.child;if(Ne.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(Ne=u;Ne!==null;){var d=Ne;switch(d.tag){case 0:case 11:case 15:Zl(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ne=f;else for(;Ne!==null;){d=Ne;var h=d.sibling,m=d.return;if(xS(d),d===u){Ne=null;break}if(h!==null){h.return=m,Ne=h;break}Ne=m}}}var x=o.alternate;if(x!==null){var p=x.child;if(p!==null){x.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}Ne=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,Ne=i;else e:for(;Ne!==null;){if(o=Ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Zl(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,Ne=y;break e}Ne=o.return}}var v=e.current;for(Ne=v;Ne!==null;){i=Ne;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,Ne=b;else e:for(i=v;Ne!==null;){if(a=Ne,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Qf(9,a)}}catch(C){zt(a,a.return,C)}if(a===i){Ne=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,Ne=_;break e}Ne=a.return}}if(ut=s,Lo(),ts&&typeof ts.onPostCommitFiberRoot=="function")try{ts.onPostCommitFiberRoot(Wf,e)}catch{}r=!0}return r}finally{gt=n,lr.transition=t}}return!1}function xw(e,t,n){t=Da(n,t),t=lS(e,t,1),e=xo(e,t,1),t=Sn(),e!==null&&(Zc(e,1,t),In(e,t))}function zt(e,t,n){if(e.tag===3)xw(e,e,n);else for(;t!==null;){if(t.tag===3){xw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(wo===null||!wo.has(r))){e=Da(n,e),e=cS(t,e,1),t=xo(t,e,1),e=Sn(),t!==null&&(Zc(t,1,e),In(t,e));break}}t=t.return}}function UA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Sn(),e.pingedLanes|=e.suspendedLanes&n,en===e&&(ln&n)===n&&(qt===4||qt===3&&(ln&130023424)===ln&&500>Ut()-By?ti(e,0):Vy|=n),In(e,t)}function TS(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=Sn();e=Is(e,t),e!==null&&(Zc(e,t,n),In(e,n))}function VA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),TS(e,n)}function BA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),TS(e,n)}var PS;PS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||On.current)An=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return An=!1,PA(e,t,n);An=!!(e.flags&131072)}else An=!1,Pt&&t.flags&1048576&&D1(t,Ud,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hd(e,t),e=t.pendingProps;var s=Pa(t,gn.current);va(t,n),s=My(null,t,r,e,s,n);var o=Ly();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dn(r)?(o=!0,Fd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ry(t),s.updater=Xf,t.stateNode=s,s._reactInternals=t,qp(t,r,e,n),t=Jp(null,t,r,!0,o,n)):(t.tag=0,Pt&&o&&ky(t),bn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=HA(r),e=vr(r,e),s){case 0:t=Qp(null,t,r,e,n);break e;case 1:t=cw(null,t,r,e,n);break e;case 11:t=aw(null,t,r,e,n);break e;case 14:t=lw(null,t,r,vr(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),Qp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),cw(e,t,r,s,n);case 3:e:{if(hS(t),e===null)throw Error(ae(387));r=t.pendingProps,o=t.memoizedState,s=o.element,$1(e,t),Wd(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Da(Error(ae(423)),t),t=uw(e,t,r,n,s);break e}else if(r!==s){s=Da(Error(ae(424)),t),t=uw(e,t,r,n,s);break e}else for(Wn=vo(t.stateNode.containerInfo.firstChild),Hn=t,Pt=!0,br=null,n=z1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ra(),r===s){t=Ms(e,t,n);break e}bn(e,t,r,n)}t=t.child}return t;case 5:return U1(t),e===null&&Kp(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Vp(r,s)?i=null:o!==null&&Vp(r,o)&&(t.flags|=32),fS(e,t),bn(e,t,i,n),t.child;case 6:return e===null&&Kp(t),null;case 13:return mS(e,t,n);case 4:return Ay(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):bn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),aw(e,t,r,s,n);case 7:return bn(e,t,t.pendingProps,n),t.child;case 8:return bn(e,t,t.pendingProps.children,n),t.child;case 12:return bn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,bt(Vd,r._currentValue),r._currentValue=i,o!==null)if(Pr(o.value,i)){if(o.children===s.children&&!On.current){t=Ms(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ns(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Gp(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(ae(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Gp(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}bn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,va(t,n),s=fr(s),r=r(s),t.flags|=1,bn(e,t,r,n),t.child;case 14:return r=t.type,s=vr(r,t.pendingProps),s=vr(r.type,s),lw(e,t,r,s,n);case 15:return uS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:vr(r,s),hd(e,t),t.tag=1,Dn(r)?(e=!0,Fd(t)):e=!1,va(t,n),aS(t,r,s),qp(t,r,s,n),Jp(null,t,r,!0,e,n);case 19:return pS(e,t,n);case 22:return dS(e,t,n)}throw Error(ae(156,t.tag))};function RS(e,t){return s1(e,t)}function WA(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(e,t,n,r){return new WA(e,t,n,r)}function Ky(e){return e=e.prototype,!(!e||!e.isReactComponent)}function HA(e){if(typeof e=="function")return Ky(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fy)return 11;if(e===hy)return 14}return 2}function _o(e,t){var n=e.alternate;return n===null?(n=ar(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function gd(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Ky(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case qi:return ni(n.children,s,o,t);case dy:i=8,s|=8;break;case wp:return e=ar(12,n,t,s|2),e.elementType=wp,e.lanes=o,e;case bp:return e=ar(13,n,t,s),e.elementType=bp,e.lanes=o,e;case _p:return e=ar(19,n,t,s),e.elementType=_p,e.lanes=o,e;case U_:return eh(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case F_:i=10;break e;case $_:i=9;break e;case fy:i=11;break e;case hy:i=14;break e;case so:i=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=ar(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ni(e,t,n,r){return e=ar(7,e,r,t),e.lanes=n,e}function eh(e,t,n,r){return e=ar(22,e,r,t),e.elementType=U_,e.lanes=n,e.stateNode={isHidden:!1},e}function Lm(e,t,n){return e=ar(6,e,null,t),e.lanes=n,e}function zm(e,t,n){return t=ar(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function YA(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vm(0),this.expirationTimes=vm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Gy(e,t,n,r,s,o,i,a,c){return e=new YA(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ar(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ry(o),e}function KA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Zi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function AS(e){if(!e)return Eo;e=e._reactInternals;e:{if(ki(e)!==e||e.tag!==1)throw Error(ae(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ae(171))}if(e.tag===1){var n=e.type;if(Dn(n))return A1(e,n,t)}return t}function OS(e,t,n,r,s,o,i,a,c){return e=Gy(n,r,!0,e,s,o,i,a,c),e.context=AS(null),n=e.current,r=Sn(),s=bo(n),o=Ns(r,s),o.callback=t??null,xo(n,o,s),e.current.lanes=s,Zc(e,s,r),In(e,r),e}function th(e,t,n,r){var s=t.current,o=Sn(),i=bo(s);return n=AS(n),t.context===null?t.context=n:t.pendingContext=n,t=Ns(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xo(s,t,i),e!==null&&(Nr(e,s,i,o),ud(e,s,i)),i}function Qd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ww(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zy(e,t){ww(e,t),(e=e.alternate)&&ww(e,t)}function GA(){return null}var DS=typeof reportError=="function"?reportError:function(e){console.error(e)};function qy(e){this._internalRoot=e}nh.prototype.render=qy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ae(409));th(e,t,null,null)};nh.prototype.unmount=qy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fi(function(){th(null,e,null,null)}),t[Ds]=null}};function nh(e){this._internalRoot=e}nh.prototype.unstable_scheduleHydration=function(e){if(e){var t=d1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<io.length&&t!==0&&t<io[n].priority;n++);io.splice(n,0,e),n===0&&h1(e)}};function Xy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function bw(){}function ZA(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Qd(i);o.call(u)}}var i=OS(t,r,e,0,null,!1,!1,"",bw);return e._reactRootContainer=i,e[Ds]=i.current,dc(e.nodeType===8?e.parentNode:e),fi(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Qd(c);a.call(u)}}var c=Gy(e,0,!1,null,null,!1,!1,"",bw);return e._reactRootContainer=c,e[Ds]=c.current,dc(e.nodeType===8?e.parentNode:e),fi(function(){th(t,c,n,r)}),c}function sh(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var c=Qd(i);a.call(c)}}th(t,i,e,s)}else i=ZA(n,t,e,s,r);return Qd(i)}c1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ol(t.pendingLanes);n!==0&&(gy(t,n|1),In(t,Ut()),!(ut&6)&&(Ia=Ut()+500,Lo()))}break;case 13:fi(function(){var r=Is(e,1);if(r!==null){var s=Sn();Nr(r,e,1,s)}}),Zy(e,1)}};yy=function(e){if(e.tag===13){var t=Is(e,134217728);if(t!==null){var n=Sn();Nr(t,e,134217728,n)}Zy(e,134217728)}};u1=function(e){if(e.tag===13){var t=bo(e),n=Is(e,t);if(n!==null){var r=Sn();Nr(n,e,t,r)}Zy(e,t)}};d1=function(){return gt};f1=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}};Ap=function(e,t,n){switch(t){case"input":if(Cp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Gf(r);if(!s)throw Error(ae(90));B_(r),Cp(r,s)}}}break;case"textarea":H_(e,n);break;case"select":t=n.value,t!=null&&ma(e,!!n.multiple,t,!1)}};Q_=Wy;J_=fi;var qA={usingClientEntryPoint:!1,Events:[Xc,ea,Gf,q_,X_,Wy]},xl={findFiberByHostInstance:Yo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},XA={bundleType:xl.bundleType,version:xl.version,rendererPackageName:xl.rendererPackageName,rendererConfig:xl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=n1(e),e===null?null:e.stateNode},findFiberByHostInstance:xl.findFiberByHostInstance||GA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Wf=Vu.inject(XA),ts=Vu}catch{}}Qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qA;Qn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xy(t))throw Error(ae(200));return KA(e,t,null,n)};Qn.createRoot=function(e,t){if(!Xy(e))throw Error(ae(299));var n=!1,r="",s=DS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Gy(e,1,!1,null,null,n,!1,r,s),e[Ds]=t.current,dc(e.nodeType===8?e.parentNode:e),new qy(t)};Qn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ae(188)):(e=Object.keys(e).join(","),Error(ae(268,e)));return e=n1(t),e=e===null?null:e.stateNode,e};Qn.flushSync=function(e){return fi(e)};Qn.hydrate=function(e,t,n){if(!rh(t))throw Error(ae(200));return sh(null,e,t,!0,n)};Qn.hydrateRoot=function(e,t,n){if(!Xy(e))throw Error(ae(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=DS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=OS(t,null,e,1,n??null,s,!1,o,i),e[Ds]=t.current,dc(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new nh(t)};Qn.render=function(e,t,n){if(!rh(t))throw Error(ae(200));return sh(null,e,t,!1,n)};Qn.unmountComponentAtNode=function(e){if(!rh(e))throw Error(ae(40));return e._reactRootContainer?(fi(function(){sh(null,null,e,!1,function(){e._reactRootContainer=null,e[Ds]=null})}),!0):!1};Qn.unstable_batchedUpdates=Wy;Qn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rh(n))throw Error(ae(200));if(e==null||e._reactInternals===void 0)throw Error(ae(38));return sh(e,t,n,!1,r)};Qn.version="18.3.1-next-f1338f8080-20240426";function IS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(IS)}catch(e){console.error(e)}}IS(),I_.exports=Qn;var Bs=I_.exports;const MS=Vf(Bs),QA=__({__proto__:null,default:MS},[Bs]);var _w=Bs;vp.createRoot=_w.createRoot,vp.hydrateRoot=_w.hydrateRoot;/** + * @remix-run/router v1.18.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}var Ht;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ht||(Ht={}));const Sw="popstate";function JA(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:c=""}=Ws(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),wc("",{pathname:i,search:a,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){let i=s.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let c=s.location.href,u=c.indexOf("#");a=u===-1?c:c.slice(0,u)}return a+"#"+(typeof o=="string"?o:mi(o))}function r(s,o){hi(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return tO(t,n,r,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function eO(){return Math.random().toString(36).substr(2,8)}function kw(e,t){return{usr:e.state,key:e.key,idx:t}}function wc(e,t,n,r){return n===void 0&&(n=null),At({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ws(t):t,{state:n,key:t&&t.key||r||eO()})}function mi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ws(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function tO(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Ht.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(At({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Ht.Pop;let w=d(),y=w==null?null:w-u;u=w,c&&c({action:a,location:p.location,delta:y})}function h(w,y){a=Ht.Push;let v=wc(p.location,w,y);n&&n(v,w),u=d()+1;let b=kw(v,u),_=p.createHref(v);try{i.pushState(b,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(_)}o&&c&&c({action:a,location:p.location,delta:1})}function m(w,y){a=Ht.Replace;let v=wc(p.location,w,y);n&&n(v,w),u=d();let b=kw(v,u),_=p.createHref(v);i.replaceState(b,"",_),o&&c&&c({action:a,location:p.location,delta:0})}function x(w){let y=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:mi(w);return v=v.replace(/ $/,"%20"),tt(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let p={get action(){return a},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Sw,f),c=w,()=>{s.removeEventListener(Sw,f),c=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let y=x(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(w){return i.go(w)}};return p}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const nO=new Set(["lazy","caseSensitive","path","id","index","children"]);function rO(e){return e.index===!0}function bc(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(tt(s.index!==!0||!s.children,"Cannot specify children on an index route"),tt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),rO(s)){let c=At({},s,t(s),{id:a});return r[a]=c,c}else{let c=At({},s,t(s),{id:a,children:void 0});return r[a]=c,s.children&&(c.children=bc(s.children,t,i,r)),c}})}function Ho(e,t,n){return n===void 0&&(n="/"),yd(e,t,n,!1)}function yd(e,t,n,r){let s=typeof t=="string"?Ws(t):t,o=qa(s.pathname||"/",n);if(o==null)return null;let i=LS(e);oO(i);let a=null;for(let c=0;a==null&&c<i.length;++c){let u=gO(o);a=mO(i[c],u,r)}return a}function sO(e,t){let{route:n,pathname:r,params:s}=e;return{id:n.id,pathname:r,params:s,data:t[n.id],handle:n.handle}}function LS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(tt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ts([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),LS(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:fO(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let c of zS(o.path))s(o,i,c)}),t}function zS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=zS(r.join("/")),a=[];return a.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&a.push(...i),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function oO(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hO(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const iO=/^:[\w-]+$/,aO=3,lO=2,cO=1,uO=10,dO=-2,Cw=e=>e==="*";function fO(e,t){let n=e.split("/"),r=n.length;return n.some(Cw)&&(r+=dO),t&&(r+=lO),n.filter(s=>!Cw(s)).reduce((s,o)=>s+(iO.test(o)?aO:o===""?cO:uO),r)}function hO(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function mO(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=jw({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=jw({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:Ts([o,f.pathname]),pathnameBase:xO(Ts([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=Ts([o,f.pathnameBase]))}return i}function jw(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pO(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=a[f]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const x=a[f];return m&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function pO(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),hi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function gO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function qa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function yO(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ws(e):e;return{pathname:n?n.startsWith("/")?n:vO(n,t):t,search:wO(r),hash:bO(s)}}function vO(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Fm(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function FS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function oh(e,t){let n=FS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ih(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ws(e):(s=At({},e),tt(!s.pathname||!s.pathname.includes("?"),Fm("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),Fm("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),Fm("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let c=yO(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ts=e=>e.join("/").replace(/\/\/+/g,"/"),xO=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Qy{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ah(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $S=["post","put","patch","delete"],_O=new Set($S),SO=["get",...$S],kO=new Set(SO),CO=new Set([301,302,303,307,308]),jO=new Set([307,308]),$m={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},EO={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,NO=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),US="remix-router-transitions";function TO(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;tt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let V=e.detectErrorBoundary;s=H=>({hasErrorBoundary:V(H)})}else s=NO;let o={},i=bc(e.routes,s,void 0,o),a,c=e.basename||"/",u=e.unstable_dataStrategy||DO,d=e.unstable_patchRoutesOnMiss,f=At({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,x=null,p=null,w=null,y=e.hydrationData!=null,v=Ho(i,e.history.location,c),b=null;if(v==null&&!d){let V=xn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=Mw(i);v=H,b={[q.id]:V}}v&&d&&!e.hydrationData&&fm(v,i,e.history.location.pathname).active&&(v=null);let _;if(!v)_=!1,v=[];else if(v.some(V=>V.route.lazy))_=!1;else if(!v.some(V=>V.route.loader))_=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,q=ne=>ne.route.loader?typeof ne.route.loader=="function"&&ne.route.loader.hydrate===!0?!1:V&&V[ne.route.id]!==void 0||H&&H[ne.route.id]!==void 0:!0;if(H){let ne=v.findIndex(Ce=>H[Ce.route.id]!==void 0);_=v.slice(0,ne+1).every(q)}else _=v.every(q)}else _=e.hydrationData!=null;let C,j={historyAction:e.history.action,location:e.history.location,matches:v,initialized:_,navigation:$m,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=Ht.Pop,R=!1,A,D=!1,G=new Map,N=null,z=!1,S=!1,U=[],J=[],F=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,pe=new Map,se=new Set,oe=new Map,Ie=new Map,ge=new Map,ke=!1;function Pe(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:ne}=V;if(ke){ke=!1;return}hi(Ie.size===0||ne!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ce=wu({currentLocation:j.location,nextLocation:q,historyAction:H});if(Ce&&ne!=null){ke=!0,e.history.go(ne*-1),Oi(Ce,{state:"blocked",location:q,proceed(){Oi(Ce,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(ne)},reset(){let Ae=new Map(j.blockers);Ae.set(Ce,wl),Re({blockers:Ae})}});return}return Z(H,q)}),n){KO(t,G);let V=()=>GO(t,G);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return j.initialized||Z(Ht.Pop,j.location,{initialHydration:!0}),C}function Fe(){h&&h(),N&&N(),m.clear(),A&&A.abort(),j.fetchers.forEach((V,H)=>Kt(H)),j.blockers.forEach((V,H)=>xu(H))}function Me(V){return m.add(V),()=>m.delete(V)}function Re(V,H){H===void 0&&(H={}),j=At({},j,V);let q=[],ne=[];f.v7_fetcherPersist&&j.fetchers.forEach((Ce,Ae)=>{Ce.state==="idle"&&(se.has(Ae)?ne.push(Ae):q.push(Ae))}),[...m].forEach(Ce=>Ce(j,{deletedFetchers:ne,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(Ce=>j.fetchers.delete(Ce)),ne.forEach(Ce=>Kt(Ce)))}function st(V,H,q){var ne,Ce;let{flushSync:Ae}=q===void 0?{}:q,Be=j.actionData!=null&&j.navigation.formMethod!=null&&wr(j.navigation.formMethod)&&j.navigation.state==="loading"&&((ne=V.state)==null?void 0:ne._isRedirect)!==!0,me;H.actionData?Object.keys(H.actionData).length>0?me=H.actionData:me=null:Be?me=j.actionData:me=null;let qe=H.loaderData?Dw(j.loaderData,H.loaderData,H.matches||[],H.errors):j.loaderData,ze=j.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((pt,xt)=>ze.set(xt,wl)));let $e=R===!0||j.navigation.formMethod!=null&&wr(j.navigation.formMethod)&&((Ce=V.state)==null?void 0:Ce._isRedirect)!==!0;a&&(i=a,a=void 0),z||T===Ht.Pop||(T===Ht.Push?e.history.push(V,V.state):T===Ht.Replace&&e.history.replace(V,V.state));let yt;if(T===Ht.Pop){let pt=G.get(j.location.pathname);pt&&pt.has(V.pathname)?yt={currentLocation:j.location,nextLocation:V}:G.has(V.pathname)&&(yt={currentLocation:V,nextLocation:j.location})}else if(D){let pt=G.get(j.location.pathname);pt?pt.add(V.pathname):(pt=new Set([V.pathname]),G.set(j.location.pathname,pt)),yt={currentLocation:j.location,nextLocation:V}}Re(At({},H,{actionData:me,loaderData:qe,historyAction:T,location:V,initialized:!0,navigation:$m,revalidation:"idle",restoreScrollPosition:f0(V,H.matches||j.matches),preventScrollReset:$e,blockers:ze}),{viewTransitionOpts:yt,flushSync:Ae===!0}),T=Ht.Pop,R=!1,D=!1,z=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=dg(j.location,j.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ne,submission:Ce,error:Ae}=Ew(f.v7_normalizeFormMethod,!1,q,H),Be=j.location,me=wc(j.location,ne,H&&H.state);me=At({},me,e.history.encodeLocation(me));let qe=H&&H.replace!=null?H.replace:void 0,ze=Ht.Push;qe===!0?ze=Ht.Replace:qe===!1||Ce!=null&&wr(Ce.formMethod)&&Ce.formAction===j.location.pathname+j.location.search&&(ze=Ht.Replace);let $e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,pt=wu({currentLocation:Be,nextLocation:me,historyAction:ze});if(pt){Oi(pt,{state:"blocked",location:me,proceed(){Oi(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),E(V,H)},reset(){let xt=new Map(j.blockers);xt.set(pt,wl),Re({blockers:xt})}});return}return await Z(ze,me,{submission:Ce,pendingError:Ae,preventScrollReset:$e,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ge(),Re({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){Z(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}Z(T||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function Z(V,H,q){A&&A.abort(),A=null,T=V,z=(q&&q.startUninterruptedRevalidation)===!0,_P(j.location,j.matches),R=(q&&q.preventScrollReset)===!0,D=(q&&q.enableViewTransition)===!0;let ne=a||i,Ce=q&&q.overrideNavigation,Ae=Ho(ne,H,c),Be=(q&&q.flushSync)===!0,me=fm(Ae,ne,H.pathname);if(me.active&&me.matches&&(Ae=me.matches),!Ae){let{error:ht,notFoundMatches:on,route:Wt}=Di(H.pathname);st(H,{matches:on,loaderData:{},errors:{[Wt.id]:ht}},{flushSync:Be});return}if(j.initialized&&!S&&$O(j.location,H)&&!(q&&q.submission&&wr(q.submission.formMethod))){st(H,{matches:Ae},{flushSync:Be});return}A=new AbortController;let qe=Fi(e.history,H,A.signal,q&&q.submission),ze;if(q&&q.pendingError)ze=[aa(Ae).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&wr(q.submission.formMethod)){let ht=await O(qe,H,q.submission,Ae,me.active,{replace:q.replace,flushSync:Be});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[on,Wt]=ht.pendingActionResult;if(Vn(Wt)&&ah(Wt.error)&&Wt.error.status===404){A=null,st(H,{matches:ht.matches,loaderData:{},errors:{[on]:Wt.error}});return}}Ae=ht.matches||Ae,ze=ht.pendingActionResult,Ce=Um(H,q.submission),Be=!1,me.active=!1,qe=Fi(e.history,qe.url,qe.signal)}let{shortCircuited:$e,matches:yt,loaderData:pt,errors:xt}=await k(qe,H,Ae,me.active,Ce,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,Be,ze);$e||(A=null,st(H,At({matches:yt||Ae},Iw(ze),{loaderData:pt,errors:xt})))}async function O(V,H,q,ne,Ce,Ae){Ae===void 0&&(Ae={}),Ge();let Be=HO(H,q);if(Re({navigation:Be},{flushSync:Ae.flushSync===!0}),Ce){let ze=await bu(ne,H.pathname,V.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){let{boundaryId:$e,error:yt}=Br(H.pathname,ze);return{matches:ze.partialMatches,pendingActionResult:[$e,{type:wt.error,error:yt}]}}else if(ze.matches)ne=ze.matches;else{let{notFoundMatches:$e,error:yt,route:pt}=Di(H.pathname);return{matches:$e,pendingActionResult:[pt.id,{type:wt.error,error:yt}]}}}let me,qe=Il(ne,H);if(!qe.route.action&&!qe.route.lazy)me={type:wt.error,error:xn(405,{method:V.method,pathname:H.pathname,routeId:qe.route.id})};else if(me=(await te("action",V,[qe],ne))[0],V.signal.aborted)return{shortCircuited:!0};if(qo(me)){let ze;return Ae&&Ae.replace!=null?ze=Ae.replace:ze=Rw(me.response.headers.get("Location"),new URL(V.url),c)===j.location.pathname+j.location.search,await Q(V,me,{submission:q,replace:ze}),{shortCircuited:!0}}if(Zo(me))throw xn(400,{type:"defer-action"});if(Vn(me)){let ze=aa(ne,qe.route.id);return(Ae&&Ae.replace)!==!0&&(T=Ht.Push),{matches:ne,pendingActionResult:[ze.route.id,me]}}return{matches:ne,pendingActionResult:[qe.route.id,me]}}async function k(V,H,q,ne,Ce,Ae,Be,me,qe,ze,$e){let yt=Ce||Um(H,Ae),pt=Ae||Be||Fw(yt),xt=!z&&(!f.v7_partialHydration||!qe);if(ne){if(xt){let Lt=P($e);Re(At({navigation:yt},Lt!==void 0?{actionData:Lt}:{}),{flushSync:ze})}let Je=await bu(q,H.pathname,V.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let{boundaryId:Lt,error:zn}=Br(H.pathname,Je);return{matches:Je.partialMatches,loaderData:{},errors:{[Lt]:zn}}}else if(Je.matches)q=Je.matches;else{let{error:Lt,notFoundMatches:zn,route:Nt}=Di(H.pathname);return{matches:zn,loaderData:{},errors:{[Nt.id]:Lt}}}}let ht=a||i,[on,Wt]=Nw(e.history,j,q,pt,H,f.v7_partialHydration&&qe===!0,f.v7_skipActionErrorRevalidation,S,U,J,se,B,$,ht,c,$e);if(Xs(Je=>!(q&&q.some(Lt=>Lt.route.id===Je))||on&&on.some(Lt=>Lt.route.id===Je)),I=++W,on.length===0&&Wt.length===0){let Je=ms();return st(H,At({matches:q,loaderData:{},errors:$e&&Vn($e[1])?{[$e[0]]:$e[1].error}:null},Iw($e),Je?{fetchers:new Map(j.fetchers)}:{}),{flushSync:ze}),{shortCircuited:!0}}if(xt){let Je={};if(!ne){Je.navigation=yt;let Lt=P($e);Lt!==void 0&&(Je.actionData=Lt)}Wt.length>0&&(Je.fetchers=M(Wt)),Re(Je,{flushSync:ze})}Wt.forEach(Je=>{F.has(Je.key)&&ct(Je.key),Je.controller&&F.set(Je.key,Je.controller)});let dl=()=>Wt.forEach(Je=>ct(Je.key));A&&A.signal.addEventListener("abort",dl);let{loaderResults:Qs,fetcherResults:Ii}=await ve(j.matches,q,on,Wt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",dl),Wt.forEach(Je=>F.delete(Je.key));let Mi=Lw([...Qs,...Ii]);if(Mi){if(Mi.idx>=on.length){let Je=Wt[Mi.idx-on.length].key;$.add(Je)}return await Q(V,Mi.result,{replace:me}),{shortCircuited:!0}}let{loaderData:Li,errors:Wr}=Ow(j,q,on,Qs,$e,Wt,Ii,oe);oe.forEach((Je,Lt)=>{Je.subscribe(zn=>{(zn||Je.done)&&oe.delete(Lt)})}),f.v7_partialHydration&&qe&&j.errors&&Object.entries(j.errors).filter(Je=>{let[Lt]=Je;return!on.some(zn=>zn.route.id===Lt)}).forEach(Je=>{let[Lt,zn]=Je;Wr=Object.assign(Wr||{},{[Lt]:zn})});let _u=ms(),Su=rr(I),ku=_u||Su||Wt.length>0;return At({matches:q,loaderData:Li,errors:Wr},ku?{fetchers:new Map(j.fetchers)}:{})}function P(V){if(V&&!Vn(V[1]))return{[V[0]]:V[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(V){return V.forEach(H=>{let q=j.fetchers.get(H.key),ne=bl(void 0,q?q.data:void 0);j.fetchers.set(H.key,ne)}),new Map(j.fetchers)}function K(V,H,q,ne){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");F.has(V)&&ct(V);let Ce=(ne&&ne.unstable_flushSync)===!0,Ae=a||i,Be=dg(j.location,j.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,ne==null?void 0:ne.relative),me=Ho(Ae,Be,c),qe=fm(me,Ae,Be);if(qe.active&&qe.matches&&(me=qe.matches),!me){Et(V,H,xn(404,{pathname:Be}),{flushSync:Ce});return}let{path:ze,submission:$e,error:yt}=Ew(f.v7_normalizeFormMethod,!0,Be,ne);if(yt){Et(V,H,yt,{flushSync:Ce});return}let pt=Il(me,ze);if(R=(ne&&ne.preventScrollReset)===!0,$e&&wr($e.formMethod)){L(V,H,ze,pt,me,qe.active,Ce,$e);return}B.set(V,{routeId:H,path:ze}),Y(V,H,ze,pt,me,qe.active,Ce,$e)}async function L(V,H,q,ne,Ce,Ae,Be,me){Ge(),B.delete(V);function qe(Nt){if(!Nt.route.action&&!Nt.route.lazy){let ps=xn(405,{method:me.formMethod,pathname:q,routeId:H});return Et(V,H,ps,{flushSync:Be}),!0}return!1}if(!Ae&&qe(ne))return;let ze=j.fetchers.get(V);Ue(V,YO(me,ze),{flushSync:Be});let $e=new AbortController,yt=Fi(e.history,q,$e.signal,me);if(Ae){let Nt=await bu(Ce,q,yt.signal);if(Nt.type==="aborted")return;if(Nt.type==="error"){let{error:ps}=Br(q,Nt);Et(V,H,ps,{flushSync:Be});return}else if(Nt.matches){if(Ce=Nt.matches,ne=Il(Ce,q),qe(ne))return}else{Et(V,H,xn(404,{pathname:q}),{flushSync:Be});return}}F.set(V,$e);let pt=W,ht=(await te("action",yt,[ne],Ce))[0];if(yt.signal.aborted){F.get(V)===$e&&F.delete(V);return}if(f.v7_fetcherPersist&&se.has(V)){if(qo(ht)||Vn(ht)){Ue(V,no(void 0));return}}else{if(qo(ht))if(F.delete(V),I>pt){Ue(V,no(void 0));return}else return $.add(V),Ue(V,bl(me)),Q(yt,ht,{fetcherSubmission:me});if(Vn(ht)){Et(V,H,ht.error);return}}if(Zo(ht))throw xn(400,{type:"defer-action"});let on=j.navigation.location||j.location,Wt=Fi(e.history,on,$e.signal),dl=a||i,Qs=j.navigation.state!=="idle"?Ho(dl,j.navigation.location,c):j.matches;tt(Qs,"Didn't find any matches after fetcher action");let Ii=++W;X.set(V,Ii);let Mi=bl(me,ht.data);j.fetchers.set(V,Mi);let[Li,Wr]=Nw(e.history,j,Qs,me,on,!1,f.v7_skipActionErrorRevalidation,S,U,J,se,B,$,dl,c,[ne.route.id,ht]);Wr.filter(Nt=>Nt.key!==V).forEach(Nt=>{let ps=Nt.key,h0=j.fetchers.get(ps),CP=bl(void 0,h0?h0.data:void 0);j.fetchers.set(ps,CP),F.has(ps)&&ct(ps),Nt.controller&&F.set(ps,Nt.controller)}),Re({fetchers:new Map(j.fetchers)});let _u=()=>Wr.forEach(Nt=>ct(Nt.key));$e.signal.addEventListener("abort",_u);let{loaderResults:Su,fetcherResults:ku}=await ve(j.matches,Qs,Li,Wr,Wt);if($e.signal.aborted)return;$e.signal.removeEventListener("abort",_u),X.delete(V),F.delete(V),Wr.forEach(Nt=>F.delete(Nt.key));let Je=Lw([...Su,...ku]);if(Je){if(Je.idx>=Li.length){let Nt=Wr[Je.idx-Li.length].key;$.add(Nt)}return Q(Wt,Je.result)}let{loaderData:Lt,errors:zn}=Ow(j,j.matches,Li,Su,void 0,Wr,ku,oe);if(j.fetchers.has(V)){let Nt=no(ht.data);j.fetchers.set(V,Nt)}rr(Ii),j.navigation.state==="loading"&&Ii>I?(tt(T,"Expected pending action"),A&&A.abort(),st(j.navigation.location,{matches:Qs,loaderData:Lt,errors:zn,fetchers:new Map(j.fetchers)})):(Re({errors:zn,loaderData:Dw(j.loaderData,Lt,Qs,zn),fetchers:new Map(j.fetchers)}),S=!1)}async function Y(V,H,q,ne,Ce,Ae,Be,me){let qe=j.fetchers.get(V);Ue(V,bl(me,qe?qe.data:void 0),{flushSync:Be});let ze=new AbortController,$e=Fi(e.history,q,ze.signal);if(Ae){let ht=await bu(Ce,q,$e.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:on}=Br(q,ht);Et(V,H,on,{flushSync:Be});return}else if(ht.matches)Ce=ht.matches,ne=Il(Ce,q);else{Et(V,H,xn(404,{pathname:q}),{flushSync:Be});return}}F.set(V,ze);let yt=W,xt=(await te("loader",$e,[ne],Ce))[0];if(Zo(xt)&&(xt=await YS(xt,$e.signal,!0)||xt),F.get(V)===ze&&F.delete(V),!$e.signal.aborted){if(se.has(V)){Ue(V,no(void 0));return}if(qo(xt))if(I>yt){Ue(V,no(void 0));return}else{$.add(V),await Q($e,xt);return}if(Vn(xt)){Et(V,H,xt.error);return}tt(!Zo(xt),"Unhandled fetcher deferred data"),Ue(V,no(xt.data))}}async function Q(V,H,q){let{submission:ne,fetcherSubmission:Ce,replace:Ae}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let Be=H.response.headers.get("Location");tt(Be,"Expected a Location header on the redirect Response"),Be=Rw(Be,new URL(V.url),c);let me=wc(j.location,Be,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(Jy.test(Be)){const ht=e.history.createURL(Be);xt=ht.origin!==t.location.origin||qa(ht.pathname,c)==null}if(xt){Ae?t.location.replace(Be):t.location.assign(Be);return}}A=null;let qe=Ae===!0?Ht.Replace:Ht.Push,{formMethod:ze,formAction:$e,formEncType:yt}=j.navigation;!ne&&!Ce&&ze&&$e&&yt&&(ne=Fw(j.navigation));let pt=ne||Ce;if(jO.has(H.response.status)&&pt&&wr(pt.formMethod))await Z(qe,me,{submission:At({},pt,{formAction:Be}),preventScrollReset:R});else{let xt=Um(me,ne);await Z(qe,me,{overrideNavigation:xt,fetcherSubmission:Ce,preventScrollReset:R})}}async function te(V,H,q,ne){try{let Ce=await IO(u,V,H,q,ne,o,s);return await Promise.all(Ce.map((Ae,Be)=>{if(VO(Ae)){let me=Ae.result;return{type:wt.redirect,response:zO(me,H,q[Be].route.id,ne,c,f.v7_relativeSplatPath)}}return LO(Ae)}))}catch(Ce){return q.map(()=>({type:wt.error,error:Ce}))}}async function ve(V,H,q,ne,Ce){let[Ae,...Be]=await Promise.all([q.length?te("loader",Ce,q,H):[],...ne.map(me=>{if(me.matches&&me.match&&me.controller){let qe=Fi(e.history,me.path,me.controller.signal);return te("loader",qe,[me.match],me.matches).then(ze=>ze[0])}else return Promise.resolve({type:wt.error,error:xn(404,{pathname:me.path})})})]);return await Promise.all([zw(V,q,Ae,Ae.map(()=>Ce.signal),!1,j.loaderData),zw(V,ne.map(me=>me.match),Be,ne.map(me=>me.controller?me.controller.signal:null),!0)]),{loaderResults:Ae,fetcherResults:Be}}function Ge(){S=!0,U.push(...Xs()),B.forEach((V,H)=>{F.has(H)&&(J.push(H),ct(H))})}function Ue(V,H,q){q===void 0&&(q={}),j.fetchers.set(V,H),Re({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Et(V,H,q,ne){ne===void 0&&(ne={});let Ce=aa(j.matches,H);Kt(V),Re({errors:{[Ce.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(ne&&ne.flushSync)===!0})}function nr(V){return f.v7_fetcherPersist&&(pe.set(V,(pe.get(V)||0)+1),se.has(V)&&se.delete(V)),j.fetchers.get(V)||EO}function Kt(V){let H=j.fetchers.get(V);F.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&ct(V),B.delete(V),X.delete(V),$.delete(V),se.delete(V),j.fetchers.delete(V)}function fs(V){if(f.v7_fetcherPersist){let H=(pe.get(V)||0)-1;H<=0?(pe.delete(V),se.add(V)):pe.set(V,H)}else Kt(V);Re({fetchers:new Map(j.fetchers)})}function ct(V){let H=F.get(V);tt(H,"Expected fetch controller: "+V),H.abort(),F.delete(V)}function hs(V){for(let H of V){let q=nr(H),ne=no(q.data);j.fetchers.set(H,ne)}}function ms(){let V=[],H=!1;for(let q of $){let ne=j.fetchers.get(q);tt(ne,"Expected fetcher: "+q),ne.state==="loading"&&($.delete(q),V.push(q),H=!0)}return hs(V),H}function rr(V){let H=[];for(let[q,ne]of X)if(ne<V){let Ce=j.fetchers.get(q);tt(Ce,"Expected fetcher: "+q),Ce.state==="loading"&&(ct(q),X.delete(q),H.push(q))}return hs(H),H.length>0}function vu(V,H){let q=j.blockers.get(V)||wl;return Ie.get(V)!==H&&Ie.set(V,H),q}function xu(V){j.blockers.delete(V),Ie.delete(V)}function Oi(V,H){let q=j.blockers.get(V)||wl;tt(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let ne=new Map(j.blockers);ne.set(V,H),Re({blockers:ne})}function wu(V){let{currentLocation:H,nextLocation:q,historyAction:ne}=V;if(Ie.size===0)return;Ie.size>1&&hi(!1,"A router only supports one blocker at a time");let Ce=Array.from(Ie.entries()),[Ae,Be]=Ce[Ce.length-1],me=j.blockers.get(Ae);if(!(me&&me.state==="proceeding")&&Be({currentLocation:H,nextLocation:q,historyAction:ne}))return Ae}function Di(V){let H=xn(404,{pathname:V}),q=a||i,{matches:ne,route:Ce}=Mw(q);return Xs(),{notFoundMatches:ne,route:Ce,error:H}}function Br(V,H){return{boundaryId:aa(H.partialMatches).route.id,error:xn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function Xs(V){let H=[];return oe.forEach((q,ne)=>{(!V||V(ne))&&(q.cancel(),H.push(ne),oe.delete(ne))}),H}function bP(V,H,q){if(x=V,w=H,p=q||null,!y&&j.navigation===$m){y=!0;let ne=f0(j.location,j.matches);ne!=null&&Re({restoreScrollPosition:ne})}return()=>{x=null,w=null,p=null}}function d0(V,H){return p&&p(V,H.map(ne=>sO(ne,j.loaderData)))||V.key}function _P(V,H){if(x&&w){let q=d0(V,H);x[q]=w()}}function f0(V,H){if(x){let q=d0(V,H),ne=x[q];if(typeof ne=="number")return ne}return null}function fm(V,H,q){if(d)if(V){let ne=V[V.length-1].route;if(ne.path&&(ne.path==="*"||ne.path.endsWith("/*")))return{active:!0,matches:yd(H,q,c,!0)}}else return{active:!0,matches:yd(H,q,c,!0)||[]};return{active:!1,matches:null}}async function bu(V,H,q){let ne=V,Ce=ne.length>0?ne[ne.length-1].route:null;for(;;){let Ae=a==null,Be=a||i;try{await OO(d,H,ne,Be,o,s,ge,q)}catch($e){return{type:"error",error:$e,partialMatches:ne}}finally{Ae&&(i=[...i])}if(q.aborted)return{type:"aborted"};let me=Ho(Be,H,c),qe=!1;if(me){let $e=me[me.length-1].route;if($e.index)return{type:"success",matches:me};if($e.path&&$e.path.length>0)if($e.path==="*")qe=!0;else return{type:"success",matches:me}}let ze=yd(Be,H,c,!0);if(!ze||ne.map($e=>$e.route.id).join("-")===ze.map($e=>$e.route.id).join("-"))return{type:"success",matches:qe?me:null};if(ne=ze,Ce=ne[ne.length-1].route,Ce.path==="*")return{type:"success",matches:ne}}}function SP(V){o={},a=bc(V,s,void 0,o)}function kP(V,H){let q=a==null;BS(V,H,a||i,o,s),q&&(i=[...i],Re({}))}return C={get basename(){return c},get future(){return f},get state(){return j},get routes(){return i},get window(){return t},initialize:Pe,subscribe:Me,enableScrollRestoration:bP,navigate:E,fetch:K,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:nr,deleteFetcher:fs,dispose:Fe,getBlocker:vu,deleteBlocker:xu,patchRoutes:kP,_internalFetchControllers:F,_internalActiveDeferreds:oe,_internalSetRoutes:SP},C}function PO(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function dg(e,t,n,r,s,o,i,a){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=ih(s||".",oh(c,o),qa(e.pathname,n)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!ev(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Ts([n,d.pathname])),mi(d)}function Ew(e,t,n,r){if(!r||!PO(r))return{path:n};if(r.formMethod&&!WO(r.formMethod))return{path:n,error:xn(405,{method:r.formMethod})};let s=()=>({path:n,error:xn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=WS(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!wr(i))return s();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,x)=>{let[p,w]=x;return""+m+p+"="+w+` +`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!wr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}tt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=fg(r.formData),u=r.formData;else if(r.body instanceof FormData)c=fg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Aw(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Aw(c)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(wr(d.formMethod))return{path:n,submission:d};let f=Ws(n);return t&&f.search&&ev(f.search)&&c.append("index",""),f.search="?"+c,{path:mi(f),submission:d}}function RO(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Nw(e,t,n,r,s,o,i,a,c,u,d,f,h,m,x,p){let w=p?Vn(p[1])?p[1].error:p[1].data:void 0,y=e.createURL(t.location),v=e.createURL(s),b=p&&Vn(p[1])?p[0]:void 0,_=b?RO(n,b):n,C=p?p[1].statusCode:void 0,j=i&&C&&C>=400,T=_.filter((A,D)=>{let{route:G}=A;if(G.lazy)return!0;if(G.loader==null)return!1;if(o)return typeof G.loader!="function"||G.loader.hydrate?!0:t.loaderData[G.id]===void 0&&(!t.errors||t.errors[G.id]===void 0);if(AO(t.loaderData,t.matches[D],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[D],z=A;return Tw(A,At({currentUrl:y,currentParams:N.params,nextUrl:v,nextParams:z.params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a||y.pathname+y.search===v.pathname+v.search||y.search!==v.search||VS(N,z)}))}),R=[];return f.forEach((A,D)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(D))return;let G=Ho(m,A.path,x);if(!G){R.push({key:D,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(D),z=Il(G,A.path),S=!1;h.has(D)?S=!1:u.includes(D)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=a:S=Tw(z,At({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a})),S&&R.push({key:D,routeId:A.routeId,path:A.path,matches:G,match:z,controller:new AbortController})}),[T,R]}function AO(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function VS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Tw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function OO(e,t,n,r,s,o,i,a){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:n,patch:(d,f)=>{a.aborted||BS(d,f,r,s,o)}}),i.set(c,u)),u&&UO(u)&&await u}finally{i.delete(c)}}function BS(e,t,n,r,s){if(e){var o;let i=r[e];tt(i,"No route found to patch children into: routeId = "+e);let a=bc(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=bc(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function Pw(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];tt(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";hi(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!nO.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,At({},t(s),{lazy:void 0}))}function DO(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function IO(e,t,n,r,s,o,i,a){let c=r.reduce((f,h)=>f.add(h.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let h=c.has(f.route.id);return At({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?MO(t,n,f,o,i,x,a):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(f=>tt(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>c.has(s[h].route.id))}async function MO(e,t,n,r,s,o,i){let a,c,u=d=>{let f,h=new Promise((p,w)=>f=w);c=()=>f(),t.signal.addEventListener("abort",c);let m=p=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...p!==void 0?[p]:[]),x;return o?x=o(p=>m(p)):x=(async()=>{try{return{type:"data",result:await m()}}catch(p){return{type:"error",result:p}}})(),Promise.race([x,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([u(d).catch(m=>{f=m}),Pw(n.route,s,r)]);if(f!==void 0)throw f;a=h}else if(await Pw(n.route,s,r),d=n.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw xn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw xn(404,{pathname:h})}tt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:wt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return a}async function LO(e){let{result:t,type:n,status:r}=e;if(HS(t)){let i;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(a){return{type:wt.error,error:a}}return n===wt.error?{type:wt.error,error:new Qy(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:wt.data,data:i,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:ah(t)?t.status:r};if(BO(t)){var s,o;return{type:wt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:wt.data,data:t,statusCode:r}}function zO(e,t,n,r,s,o){let i=e.headers.get("Location");if(tt(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Jy.test(i)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=dg(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function Rw(e,t,n){if(Jy.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=qa(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Fi(e,t,n,r){let s=e.createURL(WS(t)).toString(),o={signal:n};if(r&&wr(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=fg(r.formData):o.body=r.formData}return new Request(s,o)}function fg(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Aw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function FO(e,t,n,r,s,o){let i={},a=null,c,u=!1,d={},f=r&&Vn(r[1])?r[1].error:void 0;return n.forEach((h,m)=>{let x=t[m].route.id;if(tt(!qo(h),"Cannot handle redirect results in processLoaderData"),Vn(h)){let p=h.error;f!==void 0&&(p=f,f=void 0),a=a||{};{let w=aa(e,x);a[w.route.id]==null&&(a[w.route.id]=p)}i[x]=void 0,u||(u=!0,c=ah(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else Zo(h)?(s.set(x,h.deferredData),i[x]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers)):(i[x]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers))}),f!==void 0&&r&&(a={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:c||200,loaderHeaders:d}}function Ow(e,t,n,r,s,o,i,a){let{loaderData:c,errors:u}=FO(t,n,r,s,a);for(let d=0;d<o.length;d++){let{key:f,match:h,controller:m}=o[d];tt(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(m&&m.signal.aborted))if(Vn(x)){let p=aa(e.matches,h==null?void 0:h.route.id);u&&u[p.route.id]||(u=At({},u,{[p.route.id]:x.error})),e.fetchers.delete(f)}else if(qo(x))tt(!1,"Unhandled fetcher revalidation redirect");else if(Zo(x))tt(!1,"Unhandled fetcher deferred data");else{let p=no(x.data);e.fetchers.set(f,p)}}return{loaderData:c,errors:u}}function Dw(e,t,n,r){let s=At({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),r&&r.hasOwnProperty(i))break}return s}function Iw(e){return e?Vn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function aa(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Mw(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: +`+i):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",c='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new Qy(e||500,a,new Error(c),!0)}function Lw(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(qo(n))return{result:n,idx:t}}}function WS(e){let t=typeof e=="string"?Ws(e):e;return mi(At({},t,{hash:""}))}function $O(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function UO(e){return typeof e=="object"&&e!=null&&"then"in e}function VO(e){return HS(e.result)&&CO.has(e.result.status)}function Zo(e){return e.type===wt.deferred}function Vn(e){return e.type===wt.error}function qo(e){return(e&&e.type)===wt.redirect}function BO(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function HS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function WO(e){return kO.has(e.toLowerCase())}function wr(e){return _O.has(e.toLowerCase())}async function zw(e,t,n,r,s,o){for(let i=0;i<n.length;i++){let a=n[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!VS(u,c)&&(o&&o[c.route.id])!==void 0;if(Zo(a)&&(s||d)){let f=r[i];tt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await YS(a,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function YS(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:wt.error,error:s}}return{type:wt.data,data:e.deferredData.data}}}function ev(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Il(e,t){let n=typeof t=="string"?Ws(t).search:t.search;if(e[e.length-1].route.index&&ev(n||""))return e[e.length-1];let r=FS(e);return r[r.length-1]}function Fw(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Um(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function HO(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function bl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function YO(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function no(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function KO(e,t){try{let n=e.sessionStorage.getItem(US);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function GO(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(US,JSON.stringify(n))}catch(r){hi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.25.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jd.apply(this,arguments)}const lh=g.createContext(null),KS=g.createContext(null),zo=g.createContext(null),tv=g.createContext(null),Hs=g.createContext({outlet:null,matches:[],isDataRoute:!1}),GS=g.createContext(null);function ZO(e,t){let{relative:n}=t===void 0?{}:t;Xa()||tt(!1);let{basename:r,navigator:s}=g.useContext(zo),{hash:o,pathname:i,search:a}=qS(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:Ts([r,i])),s.createHref({pathname:c,search:a,hash:o})}function Xa(){return g.useContext(tv)!=null}function Mr(){return Xa()||tt(!1),g.useContext(tv).location}function ZS(e){g.useContext(zo).static||g.useLayoutEffect(e)}function er(){let{isDataRoute:e}=g.useContext(Hs);return e?cD():qO()}function qO(){Xa()||tt(!1);let e=g.useContext(lh),{basename:t,future:n,navigator:r}=g.useContext(zo),{matches:s}=g.useContext(Hs),{pathname:o}=Mr(),i=JSON.stringify(oh(s,n.v7_relativeSplatPath)),a=g.useRef(!1);return ZS(()=>{a.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=ih(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ts([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const XO=g.createContext(null);function QO(e){let t=g.useContext(Hs).outlet;return t&&g.createElement(XO.Provider,{value:e},t)}function qS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(zo),{matches:s}=g.useContext(Hs),{pathname:o}=Mr(),i=JSON.stringify(oh(s,r.v7_relativeSplatPath));return g.useMemo(()=>ih(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function JO(e,t,n,r){Xa()||tt(!1);let{navigator:s}=g.useContext(zo),{matches:o}=g.useContext(Hs),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Mr(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let p=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=Ho(e,{pathname:h});return sD(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},a,p.params),pathname:Ts([c,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?c:Ts([c,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,n,r)}function eD(){let e=lD(),t=ah(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:s},n):null,null)}const tD=g.createElement(eD,null);class nD extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(Hs.Provider,{value:this.props.routeContext},g.createElement(GS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rD(e){let{routeContext:t,match:n,children:r}=e,s=g.useContext(lh);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Hs.Provider,{value:t},r)}function sD(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||tt(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:m}=n,x=f.route.loader&&h[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,h)=>{let m,x=!1,p=null,w=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,p=f.route.errorElement||tD,c&&(u<0&&h===0?(uD("route-fallback"),x=!0,w=null):u===h&&(x=!0,w=f.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,h+1)),v=()=>{let b;return m?b=p:x?b=w:f.route.Component?b=g.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,g.createElement(rD,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(nD,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var XS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(XS||{}),ef=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ef||{});function oD(e){let t=g.useContext(lh);return t||tt(!1),t}function iD(e){let t=g.useContext(KS);return t||tt(!1),t}function aD(e){let t=g.useContext(Hs);return t||tt(!1),t}function QS(e){let t=aD(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function lD(){var e;let t=g.useContext(GS),n=iD(ef.UseRouteError),r=QS(ef.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function cD(){let{router:e}=oD(XS.UseNavigateStable),t=QS(ef.UseNavigateStable),n=g.useRef(!1);return ZS(()=>{n.current=!0}),g.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Jd({fromRouteId:t},o)))},[e,t])}const $w={};function uD(e,t,n){$w[e]||($w[e]=!0)}function JS(e){let{to:t,replace:n,state:r,relative:s}=e;Xa()||tt(!1);let{future:o,static:i}=g.useContext(zo),{matches:a}=g.useContext(Hs),{pathname:c}=Mr(),u=er(),d=ih(t,oh(a,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function nv(e){return QO(e.context)}function dD(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ht.Pop,navigator:o,static:i=!1,future:a}=e;Xa()&&tt(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:o,static:i,future:Jd({v7_relativeSplatPath:!1},a)}),[c,a,o,i]);typeof r=="string"&&(r=Ws(r));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:x="default"}=r,p=g.useMemo(()=>{let w=qa(d,c);return w==null?null:{location:{pathname:w,search:f,hash:h,state:m,key:x},navigationType:s}},[c,d,f,h,m,x,s]);return p==null?null:g.createElement(zo.Provider,{value:u},g.createElement(tv.Provider,{children:n,value:p}))}new Promise(()=>{});function fD(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.25.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function _c(){return _c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_c.apply(this,arguments)}function hD(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function mD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pD(e,t){return e.button===0&&(!t||t==="_self")&&!mD(e)}function hg(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function gD(e,t){let n=hg(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const yD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],vD="6";try{window.__reactRouterVersion=vD}catch{}function xD(e,t){return TO({basename:void 0,future:_c({},void 0,{v7_prependBasename:!0}),history:JA({window:void 0}),hydrationData:wD(),routes:e,mapRouteProperties:fD,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function wD(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=_c({},t,{errors:bD(t.errors)})),t}function bD(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new Qy(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const _D=g.createContext({isTransitioning:!1}),SD=g.createContext(new Map),kD="startTransition",Uw=O_[kD],CD="flushSync",Vw=QA[CD];function jD(e){Uw?Uw(e):e()}function _l(e){Vw?Vw(e):e()}class ED{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function ND(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=g.useState(n.state),[i,a]=g.useState(),[c,u]=g.useState({isTransitioning:!1}),[d,f]=g.useState(),[h,m]=g.useState(),[x,p]=g.useState(),w=g.useRef(new Map),{v7_startTransition:y}=r||{},v=g.useCallback(R=>{y?jD(R):R()},[y]),b=g.useCallback((R,A)=>{let{deletedFetchers:D,unstable_flushSync:G,unstable_viewTransitionOpts:N}=A;D.forEach(S=>w.current.delete(S)),R.fetchers.forEach((S,U)=>{S.data!==void 0&&w.current.set(U,S.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||z){G?_l(()=>o(R)):v(()=>o(R));return}if(G){_l(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let S=n.window.document.startViewTransition(()=>{_l(()=>o(R))});S.finished.finally(()=>{_l(()=>{f(void 0),m(void 0),a(void 0),u({isTransitioning:!1})})}),_l(()=>m(S));return}h?(d&&d.resolve(),h.skipTransition(),p({state:R,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(R),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,w,v]);g.useLayoutEffect(()=>n.subscribe(b),[n,b]),g.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new ED)},[c]),g.useEffect(()=>{if(d&&i&&n.window){let R=i,A=d.promise,D=n.window.document.startViewTransition(async()=>{v(()=>o(R)),await A});D.finished.finally(()=>{f(void 0),m(void 0),a(void 0),u({isTransitioning:!1})}),m(D)}},[v,i,d,n.window]),g.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,h,s.location,i]),g.useEffect(()=>{!c.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),p(void 0))},[c.isTransitioning,x]),g.useEffect(()=>{},[]);let _=g.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,A,D)=>n.navigate(R,{state:A,preventScrollReset:D==null?void 0:D.preventScrollReset}),replace:(R,A,D)=>n.navigate(R,{replace:!0,state:A,preventScrollReset:D==null?void 0:D.preventScrollReset})}),[n]),C=n.basename||"/",j=g.useMemo(()=>({router:n,navigator:_,static:!1,basename:C}),[n,_,C]),T=g.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return g.createElement(g.Fragment,null,g.createElement(lh.Provider,{value:j},g.createElement(KS.Provider,{value:s},g.createElement(SD.Provider,{value:w.current},g.createElement(_D.Provider,{value:c},g.createElement(dD,{basename:C,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?g.createElement(TD,{routes:n.routes,future:n.future,state:s}):t))))),null)}const TD=g.memo(PD);function PD(e){let{routes:t,future:n,state:r}=e;return JO(t,void 0,r,n)}const RD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wn=g.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,h=hD(t,yD),{basename:m}=g.useContext(zo),x,p=!1;if(typeof u=="string"&&AD.test(u)&&(x=u,RD))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=qa(_.pathname,m);_.origin===b.origin&&C!=null?u=C+_.search+_.hash:p=!0}catch{}let w=ZO(u,{relative:s}),y=OD(u,{replace:i,state:a,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function v(b){r&&r(b),b.defaultPrevented||y(b)}return g.createElement("a",_c({},h,{href:x||w,onClick:p||o?r:v,ref:n,target:c}))});var Bw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Bw||(Bw={}));var Ww;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ww||(Ww={}));function OD(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,c=er(),u=Mr(),d=qS(e,{relative:i});return g.useCallback(f=>{if(pD(f,n)){f.preventDefault();let h=r!==void 0?r:mi(u)===mi(d);c(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[u,c,d,r,s,n,e,o,i,a])}function DD(e){let t=g.useRef(hg(e)),n=g.useRef(!1),r=Mr(),s=g.useMemo(()=>gD(r.search,n.current?null:t.current),[r.search]),o=er(),i=g.useCallback((a,c)=>{const u=hg(typeof a=="function"?a(s):a);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var ID={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const MD=Vf(ID);var LD=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Hw(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(MD[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(LD),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),a=[i,""];i.indexOf("=")>-1&&(a=i.split("=")),t.attrs[a[0]]=a[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var zD=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,FD=/^\s*$/,$D=Object.create(null);function ek(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(ek,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var UD={parse:function(e,t){t||(t={}),t.components||(t.components=$D);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var a=e.indexOf("<");r.push({type:"text",content:a===-1?e:e.substring(0,a)})}return e.replace(zD,function(c,u){if(i){if(c!=="</"+n.name+">")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("<!--"),m=u+c.length,x=e.charAt(m);if(h){var p=Hw(c);return o<0?(r.push(p),r):((d=s[o]).children.push(p),r)}if(f&&(o++,(n=Hw(c)).type==="tag"&&t.components[n.name]&&(n.type="component",i=!0),n.voidElement||i||!x||x==="<"||n.children.push({type:"text",content:e.slice(m,e.indexOf("<",m))}),o===0&&r.push(n),(d=s[o-1])&&d.children.push(n),s[o]=n),(!f||n.voidElement)&&(o>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(o--,n=o===-1?r:s[o]),!i&&x!=="<"&&x)){d=o===-1?r:s[o].children;var w=e.indexOf("<",m),y=e.slice(m,w===-1?void 0:w);FD.test(y)&&(y=" "),(w>-1&&o+d.length>=0||y!==" ")&&d.push({type:"text",content:y})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+ek("",n)},"")}};const vd=(...e)=>{console!=null&&console.warn&&(cr(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},Yw={},tf=(...e)=>{cr(e[0])&&Yw[e[0]]||(cr(e[0])&&(Yw[e[0]]=new Date),vd(...e))},tk=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Kw=(e,t,n)=>{e.loadNamespaces(t,tk(e,n))},Gw=(e,t,n,r)=>{cr(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,tk(e,r))},VD=(e,t,n={})=>!t.languages||!t.languages.length?(tf("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{var o;if(((o=n.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),cr=e=>typeof e=="string",la=e=>typeof e=="object"&&e!==null,BD=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,WD={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},HD=e=>WD[e],YD=e=>e.replace(BD,HD);let mg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:YD};const KD=(e={})=>{mg={...mg,...e}},nk=()=>mg;let rk;const GD=e=>{rk=e},rv=()=>rk,Vm=(e,t)=>{var r;if(!e)return!1;const n=((r=e.props)==null?void 0:r.children)??e.children;return t?n.length>0:!!n},Bm=e=>{var n,r;if(!e)return[];const t=((n=e.props)==null?void 0:n.children)??e.children;return(r=e.props)!=null&&r.i18nIsDynamicList?ca(t):t},ZD=e=>Array.isArray(e)&&e.every(g.isValidElement),ca=e=>Array.isArray(e)?e:[e],qD=(e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n},sk=(e,t)=>{if(!e)return"";let n="";const r=ca(e),s=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,i)=>{if(cr(o))n+=`${o}`;else if(g.isValidElement(o)){const{props:a,type:c}=o,u=Object.keys(a).length,d=s.indexOf(c)>-1,f=a.children;if(!f&&d&&!u)n+=`<${c}/>`;else if(!f&&(!d||u)||a.i18nIsDynamicList)n+=`<${i}></${i}>`;else if(d&&u===1&&cr(f))n+=`<${c}>${f}</${c}>`;else{const h=sk(f,t);n+=`<${i}>${h}</${i}>`}}else if(o===null)vd("Trans: the passed in value is invalid - seems you passed in a null child.");else if(la(o)){const{format:a,...c}=o,u=Object.keys(c);if(u.length===1){const d=a?`${u[0]}, ${a}`:u[0];n+=`{{${d}}}`}else vd("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else vd("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),n},XD=(e,t,n,r,s,o)=>{if(t==="")return[];const i=r.transKeepBasicHtmlNodesFor||[],a=t&&new RegExp(i.map(w=>`<${w}`).join("|")).test(t);if(!e&&!a&&!o)return[t];const c={},u=w=>{ca(w).forEach(v=>{cr(v)||(Vm(v)?u(Bm(v)):la(v)&&!g.isValidElement(v)&&Object.assign(c,v))})};u(e);const d=UD.parse(`<0>${t}</0>`),f={...c,...s},h=(w,y,v)=>{var C;const b=Bm(w),_=x(b,y.children,v);return ZD(b)&&_.length===0||(C=w.props)!=null&&C.i18nIsDynamicList?b:_},m=(w,y,v,b,_)=>{w.dummy?(w.children=y,v.push(g.cloneElement(w,{key:b},_?void 0:y))):v.push(...g.Children.map([w],C=>{const j={...C.props};return delete j.i18nIsDynamicList,g.createElement(C.type,{...j,key:b,ref:C.ref},_?null:y)}))},x=(w,y,v)=>{const b=ca(w);return ca(y).reduce((C,j,T)=>{var A,D;const R=((D=(A=j.children)==null?void 0:A[0])==null?void 0:D.content)&&n.services.interpolator.interpolate(j.children[0].content,f,n.language);if(j.type==="tag"){let G=b[parseInt(j.name,10)];v.length===1&&!G&&(G=v[0][j.name]),G||(G={});const N=Object.keys(j.attrs).length!==0?qD({props:j.attrs},G):G,z=g.isValidElement(N),S=z&&Vm(j,!0)&&!j.voidElement,U=a&&la(N)&&N.dummy&&!z,J=la(e)&&Object.hasOwnProperty.call(e,j.name);if(cr(N)){const F=n.services.interpolator.interpolate(N,f,n.language);C.push(F)}else if(Vm(N)||S){const F=h(N,j,v);m(N,F,C,T)}else if(U){const F=x(b,j.children,v);m(N,F,C,T)}else if(Number.isNaN(parseFloat(j.name)))if(J){const F=h(N,j,v);m(N,F,C,T,j.voidElement)}else if(r.transSupportBasicHtmlNodes&&i.indexOf(j.name)>-1)if(j.voidElement)C.push(g.createElement(j.name,{key:`${j.name}-${T}`}));else{const F=x(b,j.children,v);C.push(g.createElement(j.name,{key:`${j.name}-${T}`},F))}else if(j.voidElement)C.push(`<${j.name} />`);else{const F=x(b,j.children,v);C.push(`<${j.name}>${F}</${j.name}>`)}else if(la(N)&&!z){const F=j.children[0]?R:null;F&&C.push(F)}else m(N,R,C,T,j.children.length!==1||!R)}else if(j.type==="text"){const G=r.transWrapTextNodes,N=o?r.unescape(n.services.interpolator.interpolate(j.content,f,n.language)):n.services.interpolator.interpolate(j.content,f,n.language);G?C.push(g.createElement(G,{key:`${j.name}-${T}`},N)):C.push(N)}return C},[])},p=x([{dummy:!0,children:e||[]}],d,ca(e||[]));return Bm(p[0])};function QD({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var G,N,z,S,U,J;const x=d||rv();if(!x)return tf("You will need to pass in an i18next instance by using i18nextReactModule"),e;const p=f||x.t.bind(x)||(F=>F),w={...nk(),...(G=x.options)==null?void 0:G.react};let y=u||p.ns||((N=x.options)==null?void 0:N.defaultNS);y=cr(y)?[y]:y||["translation"];const v=sk(e,w),b=a||v||w.transEmptyNodeValue||r,{hashTransKey:_}=w,C=r||(_?_(v||b):v||b);(S=(z=x.options)==null?void 0:z.interpolation)!=null&&S.defaultVariables&&(i=i&&Object.keys(i).length>0?{...i,...x.options.interpolation.defaultVariables}:{...x.options.interpolation.defaultVariables});const j=i||t!==void 0&&!((J=(U=x.options)==null?void 0:U.interpolation)!=null&&J.alwaysFormat)||!e?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},T={...o,context:s||o.context,count:t,...i,...j,defaultValue:b,ns:y},R=C?p(C,T):b;c&&Object.keys(c).forEach(F=>{const W=c[F];if(typeof W.type=="function"||!W.props||!W.props.children||R.indexOf(`${F}/>`)<0&&R.indexOf(`${F} />`)<0)return;function I(){return g.createElement(g.Fragment,null,W)}c[F]=g.createElement(I)});const A=XD(c||e,R,x,w,T,h),D=n??w.defaultTransParent;return D?g.createElement(D,m,A):A}const JD={type:"3rdParty",init(e){KD(e.options.react),GD(e)}},ok=g.createContext();class eI{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{var r;(r=this.usedNamespaces)[n]??(r[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function tI({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var v;const{i18n:x,defaultNS:p}=g.useContext(ok)||{},w=d||x||rv(),y=f||(w==null?void 0:w.t.bind(w));return QD({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o,values:i,defaults:a,components:c,ns:u||(y==null?void 0:y.ns)||p||((v=w==null?void 0:w.options)==null?void 0:v.defaultNS),i18n:w,t:f,shouldUnescape:h,...m})}const nI=(e,t)=>{const n=g.useRef();return g.useEffect(()=>{n.current=e},[e,t]),n.current},ik=(e,t,n,r)=>e.getFixedT(t,n,r),rI=(e,t,n,r)=>g.useCallback(ik(e,t,n,r),[e,t,n,r]),Ye=(e,t={})=>{var _,C,j,T;const{i18n:n}=t,{i18n:r,defaultNS:s}=g.useContext(ok)||{},o=n||r||rv();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new eI),!o){tf("You will need to pass in an i18next instance by using initReactI18next");const R=(D,G)=>cr(G)?G:la(G)&&cr(G.defaultValue)?G.defaultValue:Array.isArray(D)?D[D.length-1]:D,A=[R,{},!1];return A.t=R,A.i18n={},A.ready=!1,A}(_=o.options.react)!=null&&_.wait&&tf("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...nk(),...o.options.react,...t},{useSuspense:a,keyPrefix:c}=i;let u=s||((C=o.options)==null?void 0:C.defaultNS);u=cr(u)?[u]:u||["translation"],(T=(j=o.reportNamespaces).addUsedNamespaces)==null||T.call(j,u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(R=>VD(R,o,i)),f=rI(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),h=()=>f,m=()=>ik(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),[x,p]=g.useState(h);let w=u.join();t.lng&&(w=`${t.lng}${w}`);const y=nI(w),v=g.useRef(!0);g.useEffect(()=>{const{bindI18n:R,bindI18nStore:A}=i;v.current=!0,!d&&!a&&(t.lng?Gw(o,t.lng,u,()=>{v.current&&p(m)}):Kw(o,u,()=>{v.current&&p(m)})),d&&y&&y!==w&&v.current&&p(m);const D=()=>{v.current&&p(m)};return R&&(o==null||o.on(R,D)),A&&(o==null||o.store.on(A,D)),()=>{v.current=!1,o&&(R==null||R.split(" ").forEach(G=>o.off(G,D))),A&&o&&A.split(" ").forEach(G=>o.store.off(G,D))}},[o,w]),g.useEffect(()=>{v.current&&d&&p(h)},[o,c,d]);const b=[x,o,d];if(b.t=x,b.i18n=o,b.ready=d,d||!d&&!a)return b;throw new Promise(R=>{t.lng?Gw(o,t.lng,u,()=>R()):Kw(o,u,()=>R())})};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ak=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var oI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iI=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>g.createElement("svg",{ref:c,...oI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ak("lucide",s),...a},[...i.map(([u,d])=>g.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const at=(e,t)=>{const n=g.forwardRef(({className:r,...s},o)=>g.createElement(iI,{ref:o,iconNode:t,className:ak(`lucide-${sI(e)}`,r),...s}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aI=at("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lI=at("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cI=at("CalendarX2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lk=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sv=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ck=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uI=at("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dI=at("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fI=at("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hI=at("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zw=at("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uk=at("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pg=at("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mI=at("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qw=at("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xw=at("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qw=at("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pI=at("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gI=at("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yI=at("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vI=at("LoaderPinwheel",[["path",{d:"M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5",key:"1cg5zf"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xI=at("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wI=at("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bI=at("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pi=at("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jw=at("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _I=at("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dk=at("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ov=at("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SI=at("SquareSigma",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kI=at("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iv=at("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CI=at("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const av=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function jI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ch(...e){return t=>e.forEach(n=>jI(n,t))}function Ke(...e){return g.useCallback(ch(...e),e)}var ss=g.forwardRef((e,t)=>{const{children:n,...r}=e,s=g.Children.toArray(n),o=s.find(EI);if(o){const i=o.props.children,a=s.map(c=>c===o?g.Children.count(i)>1?g.Children.only(null):g.isValidElement(i)?i.props.children:null:c);return l.jsx(gg,{...r,ref:t,children:g.isValidElement(i)?g.cloneElement(i,void 0,a):null})}return l.jsx(gg,{...r,ref:t,children:n})});ss.displayName="Slot";var gg=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const s=TI(n);return g.cloneElement(n,{...NI(r,n.props),ref:t?ch(t,s):s})}return g.Children.count(n)>1?g.Children.only(null):null});gg.displayName="SlotClone";var lv=({children:e})=>l.jsx(l.Fragment,{children:e});function EI(e){return g.isValidElement(e)&&e.type===lv}function NI(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function TI(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function fk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fk(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function PI(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fk(e))&&(r&&(r+=" "),r+=t);return r}const eb=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,tb=PI,Jc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tb(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],f=o==null?void 0:o[u];if(d===null)return null;const h=eb(d)||eb(f);return s[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(x=>{let[p,w]=x;return Array.isArray(w)?w.includes({...o,...a}[p]):{...o,...a}[p]===w})?[...u,f,h]:u},[]);return tb(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};function hk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=hk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function RI(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=hk(e))&&(r&&(r+=" "),r+=t);return r}const cv="-";function AI(e){const t=DI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const a=i.split(cv);return a[0]===""&&a.length!==1&&a.shift(),mk(a,t)||OI(i)}function o(i,a){const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function mk(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?mk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(cv);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const nb=/^\[(.+)\]$/;function OI(e){if(nb.test(e)){const t=nb.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function DI(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return MI(Object.entries(e.classGroups),n).forEach(([o,i])=>{yg(i,r,o,t)}),r}function yg(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:rb(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(II(s)){yg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{yg(i,rb(t,o),n,r)})})}function rb(e,t){let n=e;return t.split(cv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function II(e){return e.isThemeGetter}function MI(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e}function LI(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const pk="!";function zI(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(a){const c=[];let u=0,d=0,f;for(let w=0;w<a.length;w++){let y=a[w];if(u===0){if(y===s&&(r||a.slice(w,w+o)===t)){c.push(a.slice(d,w)),d=w+o;continue}if(y==="/"){f=w;continue}}y==="["?u++:y==="]"&&u--}const h=c.length===0?a:a.substring(d),m=h.startsWith(pk),x=m?h.substring(1):h,p=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:p}}return n?function(c){return n({className:c,parseClassName:i})}:i}function FI(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function $I(e){return{cache:LI(e.cacheSize),parseClassName:zI(e),...AI(e)}}const UI=/\s+/;function VI(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(UI).map(i=>{const{modifiers:a,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(i);let f=!!d,h=r(f?u.substring(0,d):u);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(u),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const m=FI(a).join(":");return{isTailwindClass:!0,modifierId:c?m+pk:m,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:u}=i,d=a+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function BI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gk(t))&&(r&&(r+=" "),r+=n);return r}function gk(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gk(e[r]))&&(n&&(n+=" "),n+=t);return n}function WI(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return n=$I(u),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=VI(c,n);return s(c,d),d}return function(){return o(BI.apply(null,arguments))}}function _t(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const yk=/^\[(?:([a-z-]+):)?(.+)\]$/i,HI=/^\d+\/\d+$/,YI=new Set(["px","full","screen"]),KI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ZI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function gs(e){return Xo(e)||YI.has(e)||HI.test(e)}function eo(e){return Qa(e,"length",oM)}function Xo(e){return!!e&&!Number.isNaN(Number(e))}function Bu(e){return Qa(e,"number",Xo)}function Sl(e){return!!e&&Number.isInteger(Number(e))}function QI(e){return e.endsWith("%")&&Xo(e.slice(0,-1))}function Xe(e){return yk.test(e)}function to(e){return KI.test(e)}const JI=new Set(["length","size","percentage"]);function eM(e){return Qa(e,JI,vk)}function tM(e){return Qa(e,"position",vk)}const nM=new Set(["image","url"]);function rM(e){return Qa(e,nM,aM)}function sM(e){return Qa(e,"",iM)}function kl(){return!0}function Qa(e,t,n){const r=yk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function oM(e){return GI.test(e)&&!ZI.test(e)}function vk(){return!1}function iM(e){return qI.test(e)}function aM(e){return XI.test(e)}function lM(){const e=_t("colors"),t=_t("spacing"),n=_t("blur"),r=_t("brightness"),s=_t("borderColor"),o=_t("borderRadius"),i=_t("borderSpacing"),a=_t("borderWidth"),c=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),h=_t("gap"),m=_t("gradientColorStops"),x=_t("gradientColorStopPositions"),p=_t("inset"),w=_t("margin"),y=_t("opacity"),v=_t("padding"),b=_t("saturate"),_=_t("scale"),C=_t("sepia"),j=_t("skew"),T=_t("space"),R=_t("translate"),A=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",Xe,t],N=()=>[Xe,t],z=()=>["",gs,eo],S=()=>["auto",Xo,Xe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Xe],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Xo,Bu],B=()=>[Xo,Xe];return{cacheSize:500,separator:":",theme:{colors:[kl],spacing:[gs,eo],blur:["none","",to,Xe],brightness:$(),borderColor:[e],borderRadius:["none","","full",to,Xe],borderSpacing:N(),borderWidth:z(),contrast:$(),grayscale:I(),hueRotate:B(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[QI,eo],inset:G(),margin:G(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:I(),skew:B(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Xe]}],container:["container"],columns:[{columns:[to]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Xe]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sl,Xe]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Sl,Xe]}],"grid-cols":[{"grid-cols":[kl]}],"col-start-end":[{col:["auto",{span:["full",Sl,Xe]},Xe]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[kl]}],"row-start-end":[{row:["auto",{span:[Sl,Xe]},Xe]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xe,t]}],"min-w":[{"min-w":[Xe,t,"min","max","fit"]}],"max-w":[{"max-w":[Xe,t,"none","full","min","max","fit","prose",{screen:[to]},to]}],h:[{h:[Xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",to,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bu]}],"font-family":[{font:[kl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Xe]}],"line-clamp":[{"line-clamp":["none",Xo,Bu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gs,Xe]}],"list-image":[{"list-image":["none",Xe]}],"list-style-type":[{list:["none","disc","decimal",Xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gs,eo]}],"underline-offset":[{"underline-offset":["auto",gs,Xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),tM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",eM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:J()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[gs,Xe]}],"outline-w":[{outline:[gs,eo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[gs,eo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",to,sM]}],"shadow-color":[{shadow:[kl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",to,Xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Xe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Sl,Xe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gs,eo,Bu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const cM=WI(lM);function re(...e){return cM(RI(e))}const uh=Jc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),De=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?ss:"button";return l.jsx(i,{className:re(uh({variant:t,size:n,className:e})),ref:o,...s})});De.displayName="Button";function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function uM(e,t){const n=g.createContext(t);function r(o){const{children:i,...a}=o,c=g.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})}function s(o){const i=g.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function un(e,t=[]){let n=[];function r(o,i){const a=g.createContext(i),c=n.length;n=[...n,i];function u(f){const{scope:h,children:m,...x}=f,p=(h==null?void 0:h[e][c])||a,w=g.useMemo(()=>x,Object.values(x));return l.jsx(p.Provider,{value:w,children:m})}function d(f,h){const m=(h==null?void 0:h[e][c])||a,x=g.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(i=>g.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,dM(s,...t)]}function dM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Dt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ln({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=fM({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=Dt(n),c=g.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,c]}function fM({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,s=g.useRef(r),o=Dt(t);return g.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var hM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Te=hM.reduce((e,t)=>{const n=g.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?ss:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function uv(e,t){e&&Bs.flushSync(()=>e.dispatchEvent(t))}function eu(e){const t=e+"CollectionProvider",[n,r]=un(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:x,children:p}=m,w=We.useRef(null),y=We.useRef(new Map).current;return l.jsx(s,{scope:x,itemMap:y,collectionRef:w,children:p})};i.displayName=t;const a=e+"CollectionSlot",c=We.forwardRef((m,x)=>{const{scope:p,children:w}=m,y=o(a,p),v=Ke(x,y.collectionRef);return l.jsx(ss,{ref:v,children:w})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=We.forwardRef((m,x)=>{const{scope:p,children:w,...y}=m,v=We.useRef(null),b=Ke(x,v),_=o(u,p);return We.useEffect(()=>(_.itemMap.set(v,{ref:v,...y}),()=>void _.itemMap.delete(v))),l.jsx(ss,{[d]:"",ref:b,children:w})});f.displayName=u;function h(m){const x=o(e+"CollectionConsumer",m);return We.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,C)=>y.indexOf(_.ref.current)-y.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},h,r]}var mM=g.createContext(void 0);function Ci(e){const t=g.useContext(mM);return e||t||"ltr"}function pM(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var gM="DismissableLayer",vg="dismissableLayer.update",yM="dismissableLayer.pointerDownOutside",vM="dismissableLayer.focusOutside",sb,xk=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ja=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,u=g.useContext(xk),[d,f]=g.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),x=Ke(t,T=>f(T)),p=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(w),v=d?p.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=y,C=wM(T=>{const R=T.target,A=[...u.branches].some(D=>D.contains(R));!_||A||(s==null||s(T),i==null||i(T),T.defaultPrevented||a==null||a())},h),j=bM(T=>{const R=T.target;[...u.branches].some(D=>D.contains(R))||(o==null||o(T),i==null||i(T),T.defaultPrevented||a==null||a())},h);return pM(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sb=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ob(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=sb)}},[d,h,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ob())},[d,u]),g.useEffect(()=>{const T=()=>m({});return document.addEventListener(vg,T),()=>document.removeEventListener(vg,T)},[]),l.jsx(Te.div,{...c,ref:x,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,C.onPointerDownCapture)})});Ja.displayName=gM;var xM="DismissableLayerBranch",wk=g.forwardRef((e,t)=>{const n=g.useContext(xk),r=g.useRef(null),s=Ke(t,r);return g.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),l.jsx(Te.div,{...e,ref:s})});wk.displayName=xM;function wM(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),s=g.useRef(()=>{});return g.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){bk(yM,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function bM(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const s=o=>{o.target&&!r.current&&bk(vM,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ob(){const e=new CustomEvent(vg);document.dispatchEvent(e)}function bk(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?uv(s,o):s.dispatchEvent(o)}var _M=Ja,SM=wk,Wm=0;function dv(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ib()),document.body.insertAdjacentElement("beforeend",e[1]??ib()),Wm++,()=>{Wm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Wm--}},[])}function ib(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Hm="focusScope.autoFocusOnMount",Ym="focusScope.autoFocusOnUnmount",ab={bubbles:!1,cancelable:!0},kM="FocusScope",dh=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=g.useState(null),u=Dt(s),d=Dt(o),f=g.useRef(null),h=Ke(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(b){if(m.paused||!a)return;const _=b.target;a.contains(_)?f.current=_:ro(f.current,{select:!0})},w=function(b){if(m.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||ro(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&ro(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),v.disconnect()}}},[r,a,m.paused]),g.useEffect(()=>{if(a){cb.add(m);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent(Hm,ab);a.addEventListener(Hm,u),a.dispatchEvent(y),y.defaultPrevented||(CM(PM(_k(a)),{select:!0}),document.activeElement===p&&ro(a))}return()=>{a.removeEventListener(Hm,u),setTimeout(()=>{const y=new CustomEvent(Ym,ab);a.addEventListener(Ym,d),a.dispatchEvent(y),y.defaultPrevented||ro(p??document.body,{select:!0}),a.removeEventListener(Ym,d),cb.remove(m)},0)}}},[a,u,d,m]);const x=g.useCallback(p=>{if(!n&&!r||m.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(w&&y){const v=p.currentTarget,[b,_]=jM(v);b&&_?!p.shiftKey&&y===_?(p.preventDefault(),n&&ro(b,{select:!0})):p.shiftKey&&y===b&&(p.preventDefault(),n&&ro(_,{select:!0})):y===v&&p.preventDefault()}},[n,r,m.paused]);return l.jsx(Te.div,{tabIndex:-1,...i,ref:h,onKeyDown:x})});dh.displayName=kM;function CM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ro(r,{select:t}),document.activeElement!==n)return}function jM(e){const t=_k(e),n=lb(t,e),r=lb(t.reverse(),e);return[n,r]}function _k(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lb(e,t){for(const n of e)if(!EM(n,{upTo:t}))return n}function EM(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function NM(e){return e instanceof HTMLInputElement&&"select"in e}function ro(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&NM(e)&&t&&e.select()}}var cb=TM();function TM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ub(e,t),e.unshift(t)},remove(t){var n;e=ub(e,t),(n=e[0])==null||n.resume()}}}function ub(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function PM(e){return e.filter(t=>t.tagName!=="A")}var Bt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},RM=O_.useId||(()=>{}),AM=0;function Mn(e){const[t,n]=g.useState(RM());return Bt(()=>{e||n(r=>r??String(AM++))},[e]),e||(t?`radix-${t}`:"")}const OM=["top","right","bottom","left"],Xr=Math.min,Bn=Math.max,nf=Math.round,Wu=Math.floor,No=e=>({x:e,y:e}),DM={left:"right",right:"left",bottom:"top",top:"bottom"},IM={start:"end",end:"start"};function xg(e,t,n){return Bn(e,Xr(t,n))}function Ls(e,t){return typeof e=="function"?e(t):e}function zs(e){return e.split("-")[0]}function el(e){return e.split("-")[1]}function fv(e){return e==="x"?"y":"x"}function hv(e){return e==="y"?"height":"width"}function To(e){return["top","bottom"].includes(zs(e))?"y":"x"}function mv(e){return fv(To(e))}function MM(e,t,n){n===void 0&&(n=!1);const r=el(e),s=mv(e),o=hv(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=rf(i)),[i,rf(i)]}function LM(e){const t=rf(e);return[wg(e),t,wg(t)]}function wg(e){return e.replace(/start|end/g,t=>IM[t])}function zM(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function FM(e,t,n,r){const s=el(e);let o=zM(zs(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(wg)))),o}function rf(e){return e.replace(/left|right|bottom|top/g,t=>DM[t])}function $M(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sk(e){return typeof e!="number"?$M(e):{top:e,right:e,bottom:e,left:e}}function sf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function db(e,t,n){let{reference:r,floating:s}=e;const o=To(t),i=mv(t),a=hv(i),c=zs(t),u=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-s.width,y:f};break;default:m={x:r.x,y:r.y}}switch(el(t)){case"start":m[i]-=h*(n&&u?-1:1);break;case"end":m[i]+=h*(n&&u?-1:1);break}return m}const UM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=db(u,r,c),h=r,m={},x=0;for(let p=0;p<a.length;p++){const{name:w,fn:y}=a[p],{x:v,y:b,data:_,reset:C}=await y({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});d=v??d,f=b??f,m={...m,[w]:{...m[w],..._}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:f}=db(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:m}};async function Sc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Ls(t,e),x=Sk(m),w=a[h?f==="floating"?"reference":"floating":f],y=sf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},C=sf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:c}):v);return{top:(y.top-C.top+x.top)/_.y,bottom:(C.bottom-y.bottom+x.bottom)/_.y,left:(y.left-C.left+x.left)/_.x,right:(C.right-y.right+x.right)/_.x}}const VM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Ls(e,t)||{};if(u==null)return{};const f=Sk(d),h={x:n,y:r},m=mv(s),x=hv(m),p=await i.getDimensions(u),w=m==="y",y=w?"top":"left",v=w?"bottom":"right",b=w?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[m]-h[m]-o.floating[x],C=h[m]-o.reference[m],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=j?j[b]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=a.floating[b]||o.floating[x]);const R=_/2-C/2,A=T/2-p[x]/2-1,D=Xr(f[y],A),G=Xr(f[v],A),N=D,z=T-p[x]-G,S=T/2-p[x]/2+R,U=xg(N,S,z),J=!c.arrow&&el(s)!=null&&S!==U&&o.reference[x]/2-(S<N?D:G)-p[x]/2<0,F=J?S<N?S-N:S-z:0;return{[m]:h[m]+F,data:{[m]:U,centerOffset:S-U-F,...J&&{alignmentOffset:F}},reset:J}}}),BM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...w}=Ls(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=zs(s),v=To(a),b=zs(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(b||!p?[rf(a)]:LM(a)),j=x!=="none";!h&&j&&C.push(...FM(a,p,x,_));const T=[a,...C],R=await Sc(t,w),A=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&A.push(R[y]),f){const S=MM(s,i,_);A.push(R[S[0]],R[S[1]])}if(D=[...D,{placement:s,overflows:A}],!A.every(S=>S<=0)){var G,N;const S=(((G=o.flip)==null?void 0:G.index)||0)+1,U=T[S];if(U)return{data:{index:S,overflows:D},reset:{placement:U}};let J=(N=D.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!J)switch(m){case"bestFit":{var z;const F=(z=D.filter(W=>{if(j){const I=To(W.placement);return I===v||I==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(I=>I>0).reduce((I,X)=>I+X,0)]).sort((W,I)=>W[1]-I[1])[0])==null?void 0:z[0];F&&(J=F);break}case"initialPlacement":J=a;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function fb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hb(e){return OM.some(t=>e[t]>=0)}const WM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ls(e,t);switch(r){case"referenceHidden":{const o=await Sc(t,{...s,elementContext:"reference"}),i=fb(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:hb(i)}}}case"escaped":{const o=await Sc(t,{...s,altBoundary:!0}),i=fb(o,n.floating);return{data:{escapedOffsets:i,escaped:hb(i)}}}default:return{}}}}};async function HM(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=zs(n),a=el(n),c=To(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=Ls(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(m=a==="end"?x*-1:x),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const YM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,c=await HM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},KM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...c}=Ls(e,t),u={x:n,y:r},d=await Sc(t,c),f=To(zs(s)),h=fv(f);let m=u[h],x=u[f];if(o){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=m+d[w],b=m-d[y];m=xg(v,m,b)}if(i){const w=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=x+d[w],b=x-d[y];x=xg(v,x,b)}const p=a.fn({...t,[h]:m,[f]:x});return{...p,data:{x:p.x-n,y:p.y-r}}}}},GM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Ls(e,t),d={x:n,y:r},f=To(s),h=fv(f);let m=d[h],x=d[f];const p=Ls(a,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=h==="y"?"height":"width",_=o.reference[h]-o.floating[b]+w.mainAxis,C=o.reference[h]+o.reference[b]-w.mainAxis;m<_?m=_:m>C&&(m=C)}if(u){var y,v;const b=h==="y"?"width":"height",_=["top","left"].includes(zs(s)),C=o.reference[f]-o.floating[b]+(_&&((y=i.offset)==null?void 0:y[f])||0)+(_?0:w.crossAxis),j=o.reference[f]+o.reference[b]+(_?0:((v=i.offset)==null?void 0:v[f])||0)-(_?w.crossAxis:0);x<C?x=C:x>j&&(x=j)}return{[h]:m,[f]:x}}}},ZM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...a}=Ls(e,t),c=await Sc(t,a),u=zs(n),d=el(n),f=To(n)==="y",{width:h,height:m}=r.floating;let x,p;u==="top"||u==="bottom"?(x=u,p=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(p=u,x=d==="end"?"top":"bottom");const w=m-c.top-c.bottom,y=h-c.left-c.right,v=Xr(m-c[x],w),b=Xr(h-c[p],y),_=!t.middlewareData.shift;let C=v,j=b;if(f?j=d||_?Xr(b,y):y:C=d||_?Xr(v,w):w,_&&!d){const R=Bn(c.left,0),A=Bn(c.right,0),D=Bn(c.top,0),G=Bn(c.bottom,0);f?j=h-2*(R!==0||A!==0?R+A:Bn(c.left,c.right)):C=m-2*(D!==0||G!==0?D+G:Bn(c.top,c.bottom))}await i({...t,availableWidth:j,availableHeight:C});const T=await s.getDimensions(o.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function tl(e){return kk(e)?(e.nodeName||"").toLowerCase():"#document"}function Yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ys(e){var t;return(t=(kk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kk(e){return e instanceof Node||e instanceof Yn(e).Node}function Rr(e){return e instanceof Element||e instanceof Yn(e).Element}function os(e){return e instanceof HTMLElement||e instanceof Yn(e).HTMLElement}function mb(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yn(e).ShadowRoot}function tu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function qM(e){return["table","td","th"].includes(tl(e))}function fh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function pv(e){const t=gv(),n=Rr(e)?Ar(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function XM(e){let t=Po(e);for(;os(t)&&!Ma(t);){if(pv(t))return t;if(fh(t))return null;t=Po(t)}return null}function gv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ma(e){return["html","body","#document"].includes(tl(e))}function Ar(e){return Yn(e).getComputedStyle(e)}function hh(e){return Rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Po(e){if(tl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mb(e)&&e.host||Ys(e);return mb(t)?t.host:t}function Ck(e){const t=Po(e);return Ma(t)?e.ownerDocument?e.ownerDocument.body:e.body:os(t)&&tu(t)?t:Ck(t)}function kc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Ck(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Yn(s);return o?t.concat(i,i.visualViewport||[],tu(s)?s:[],i.frameElement&&n?kc(i.frameElement):[]):t.concat(s,kc(s,[],n))}function jk(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=os(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=nf(n)!==o||nf(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function yv(e){return Rr(e)?e:e.contextElement}function wa(e){const t=yv(e);if(!os(t))return No(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=jk(t);let i=(o?nf(n.width):n.width)/r,a=(o?nf(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const QM=No(0);function Ek(e){const t=Yn(e);return!gv()||!t.visualViewport?QM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yn(e)?!1:t}function gi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=yv(e);let i=No(1);t&&(r?Rr(r)&&(i=wa(r)):i=wa(e));const a=JM(o,n,r)?Ek(o):No(0);let c=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const h=Yn(o),m=r&&Rr(r)?Yn(r):r;let x=h,p=x.frameElement;for(;p&&r&&m!==x;){const w=wa(p),y=p.getBoundingClientRect(),v=Ar(p),b=y.left+(p.clientLeft+parseFloat(v.paddingLeft))*w.x,_=y.top+(p.clientTop+parseFloat(v.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,f*=w.y,c+=b,u+=_,x=Yn(p),p=x.frameElement}}return sf({width:d,height:f,x:c,y:u})}function eL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ys(r),a=t?fh(t.floating):!1;if(r===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=No(1);const d=No(0),f=os(r);if((f||!f&&!o)&&((tl(r)!=="body"||tu(i))&&(c=hh(r)),os(r))){const h=gi(r);u=wa(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function tL(e){return Array.from(e.getClientRects())}function Nk(e){return gi(Ys(e)).left+hh(e).scrollLeft}function nL(e){const t=Ys(e),n=hh(e),r=e.ownerDocument.body,s=Bn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Bn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Nk(e);const a=-n.scrollTop;return Ar(r).direction==="rtl"&&(i+=Bn(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function rL(e,t){const n=Yn(e),r=Ys(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const u=gv();(!u||u&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}function sL(e,t){const n=gi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=os(e)?wa(e):No(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:i,height:a,x:c,y:u}}function pb(e,t,n){let r;if(t==="viewport")r=rL(e,n);else if(t==="document")r=nL(Ys(e));else if(Rr(t))r=sL(t,n);else{const s=Ek(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return sf(r)}function Tk(e,t){const n=Po(e);return n===t||!Rr(n)||Ma(n)?!1:Ar(n).position==="fixed"||Tk(n,t)}function oL(e,t){const n=t.get(e);if(n)return n;let r=kc(e,[],!1).filter(a=>Rr(a)&&tl(a)!=="body"),s=null;const o=Ar(e).position==="fixed";let i=o?Po(e):e;for(;Rr(i)&&!Ma(i);){const a=Ar(i),c=pv(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||tu(i)&&!c&&Tk(e,i))?r=r.filter(d=>d!==i):s=a,i=Po(i)}return t.set(e,r),r}function iL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?fh(t)?[]:oL(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,d)=>{const f=pb(t,d,s);return u.top=Bn(f.top,u.top),u.right=Xr(f.right,u.right),u.bottom=Xr(f.bottom,u.bottom),u.left=Bn(f.left,u.left),u},pb(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function aL(e){const{width:t,height:n}=jk(e);return{width:t,height:n}}function lL(e,t,n){const r=os(t),s=Ys(t),o=n==="fixed",i=gi(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=No(0);if(r||!r&&!o)if((tl(t)!=="body"||tu(s))&&(a=hh(t)),r){const f=gi(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=Nk(s));const u=i.left+a.scrollLeft-c.x,d=i.top+a.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Km(e){return Ar(e).position==="static"}function gb(e,t){return!os(e)||Ar(e).position==="fixed"?null:t?t(e):e.offsetParent}function Pk(e,t){const n=Yn(e);if(fh(e))return n;if(!os(e)){let s=Po(e);for(;s&&!Ma(s);){if(Rr(s)&&!Km(s))return s;s=Po(s)}return n}let r=gb(e,t);for(;r&&qM(r)&&Km(r);)r=gb(r,t);return r&&Ma(r)&&Km(r)&&!pv(r)?n:r||XM(e)||n}const cL=async function(e){const t=this.getOffsetParent||Pk,n=this.getDimensions,r=await n(e.floating);return{reference:lL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uL(e){return Ar(e).direction==="rtl"}const dL={convertOffsetParentRelativeRectToViewportRelativeRect:eL,getDocumentElement:Ys,getClippingRect:iL,getOffsetParent:Pk,getElementRects:cL,getClientRects:tL,getDimensions:aL,getScale:wa,isElement:Rr,isRTL:uL};function fL(e,t){let n=null,r;const s=Ys(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const m=Wu(d),x=Wu(s.clientWidth-(u+f)),p=Wu(s.clientHeight-(d+h)),w=Wu(u),v={rootMargin:-m+"px "+-x+"px "+-p+"px "+-w+"px",threshold:Bn(0,Xr(1,c))||1};let b=!0;function _(C){const j=C[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return i(!0),o}function hL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=yv(e),d=s||o?[...u?kc(u):[],...kc(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&a?fL(u,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let x,p=c?gi(e):null;c&&w();function w(){const y=gi(e);p&&(y.x!==p.x||y.y!==p.y||y.width!==p.width||y.height!==p.height)&&n(),p=y,x=requestAnimationFrame(w)}return n(),()=>{var y;d.forEach(v=>{s&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(x)}}const mL=YM,pL=KM,gL=BM,yL=ZM,vL=WM,yb=VM,xL=GM,wL=(e,t,n)=>{const r=new Map,s={platform:dL,...n},o={...s.platform,_c:r};return UM(e,t,{...s,platform:o})};var xd=typeof document<"u"?g.useLayoutEffect:g.useEffect;function of(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!of(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!of(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Rk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vb(e,t){const n=Rk(e);return Math.round(t*n)/n}function xb(e){const t=g.useRef(e);return xd(()=>{t.current=e}),t}function bL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=g.useState(r);of(h,r)||m(r);const[x,p]=g.useState(null),[w,y]=g.useState(null),v=g.useCallback(F=>{F!==j.current&&(j.current=F,p(F))},[]),b=g.useCallback(F=>{F!==T.current&&(T.current=F,y(F))},[]),_=o||x,C=i||w,j=g.useRef(null),T=g.useRef(null),R=g.useRef(d),A=c!=null,D=xb(c),G=xb(s),N=g.useCallback(()=>{if(!j.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};G.current&&(F.platform=G.current),wL(j.current,T.current,F).then(W=>{const I={...W,isPositioned:!0};z.current&&!of(R.current,I)&&(R.current=I,Bs.flushSync(()=>{f(I)}))})},[h,t,n,G]);xd(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const z=g.useRef(!1);xd(()=>(z.current=!0,()=>{z.current=!1}),[]),xd(()=>{if(_&&(j.current=_),C&&(T.current=C),_&&C){if(D.current)return D.current(_,C,N);N()}},[_,C,N,D,A]);const S=g.useMemo(()=>({reference:j,floating:T,setReference:v,setFloating:b}),[v,b]),U=g.useMemo(()=>({reference:_,floating:C}),[_,C]),J=g.useMemo(()=>{const F={position:n,left:0,top:0};if(!U.floating)return F;const W=vb(U.floating,d.x),I=vb(U.floating,d.y);return a?{...F,transform:"translate("+W+"px, "+I+"px)",...Rk(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,a,U.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:N,refs:S,elements:U,floatingStyles:J}),[d,N,S,U,J])}const _L=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?yb({element:r.current,padding:s}).fn(n):{}:r?yb({element:r,padding:s}).fn(n):{}}}},SL=(e,t)=>({...mL(e),options:[e,t]}),kL=(e,t)=>({...pL(e),options:[e,t]}),CL=(e,t)=>({...xL(e),options:[e,t]}),jL=(e,t)=>({...gL(e),options:[e,t]}),EL=(e,t)=>({...yL(e),options:[e,t]}),NL=(e,t)=>({...vL(e),options:[e,t]}),TL=(e,t)=>({..._L(e),options:[e,t]});var PL="Arrow",Ak=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return l.jsx(Te.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ak.displayName=PL;var RL=Ak;function vv(e){const[t,n]=g.useState(void 0);return Bt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xv="Popper",[Ok,nl]=un(xv),[AL,Dk]=Ok(xv),Ik=e=>{const{__scopePopper:t,children:n}=e,[r,s]=g.useState(null);return l.jsx(AL,{scope:t,anchor:r,onAnchorChange:s,children:n})};Ik.displayName=xv;var Mk="PopperAnchor",Lk=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Dk(Mk,n),i=g.useRef(null),a=Ke(t,i);return g.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:l.jsx(Te.div,{...s,ref:a})});Lk.displayName=Mk;var wv="PopperContent",[OL,DL]=Ok(wv),zk=g.forwardRef((e,t)=>{var ge,ke,Pe,Fe,Me,Re;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:x,...p}=e,w=Dk(wv,n),[y,v]=g.useState(null),b=Ke(t,st=>v(st)),[_,C]=g.useState(null),j=vv(_),T=(j==null?void 0:j.width)??0,R=(j==null?void 0:j.height)??0,A=r+(o!=="center"?"-"+o:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(u)?u:[u],N=G.length>0,z={padding:D,boundary:G.filter(ML),altBoundary:N},{refs:S,floatingStyles:U,placement:J,isPositioned:F,middlewareData:W}=bL({strategy:"fixed",placement:A,whileElementsMounted:(...st)=>hL(...st,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[SL({mainAxis:s+R,alignmentAxis:i}),c&&kL({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?CL():void 0,...z}),c&&jL({...z}),EL({...z,apply:({elements:st,rects:E,availableWidth:ee,availableHeight:Z})=>{const{width:O,height:k}=E.reference,P=st.floating.style;P.setProperty("--radix-popper-available-width",`${ee}px`),P.setProperty("--radix-popper-available-height",`${Z}px`),P.setProperty("--radix-popper-anchor-width",`${O}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),_&&TL({element:_,padding:a}),LL({arrowWidth:T,arrowHeight:R}),h&&NL({strategy:"referenceHidden",...z})]}),[I,X]=Uk(J),$=Dt(x);Bt(()=>{F&&($==null||$())},[F,$]);const B=(ge=W.arrow)==null?void 0:ge.x,pe=(ke=W.arrow)==null?void 0:ke.y,se=((Pe=W.arrow)==null?void 0:Pe.centerOffset)!==0,[oe,Ie]=g.useState();return Bt(()=>{y&&Ie(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:F?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Fe=W.transformOrigin)==null?void 0:Fe.x,(Me=W.transformOrigin)==null?void 0:Me.y].join(" "),...((Re=W.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(OL,{scope:n,placedSide:I,onArrowChange:C,arrowX:B,arrowY:pe,shouldHideArrow:se,children:l.jsx(Te.div,{"data-side":I,"data-align":X,...p,ref:b,style:{...p.style,animation:F?void 0:"none"}})})})});zk.displayName=wv;var Fk="PopperArrow",IL={top:"bottom",right:"left",bottom:"top",left:"right"},$k=g.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=DL(Fk,r),i=IL[o.placedSide];return l.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:l.jsx(RL,{...s,ref:n,style:{...s.style,display:"block"}})})});$k.displayName=Fk;function ML(e){return e!==null}var LL=e=>({name:"transformOrigin",options:e,fn(t){var w,y,v;const{placement:n,rects:r,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Uk(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let x="",p="";return u==="bottom"?(x=i?f:`${h}px`,p=`${-c}px`):u==="top"?(x=i?f:`${h}px`,p=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,p=i?f:`${m}px`):u==="left"&&(x=`${r.floating.width+c}px`,p=i?f:`${m}px`),{data:{x,y:p}}}});function Uk(e){const[t,n="center"]=e.split("-");return[t,n]}var bv=Ik,_v=Lk,Sv=zk,kv=$k,zL="Portal",nu=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=g.useState(!1);Bt(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?MS.createPortal(l.jsx(Te.div,{...r,ref:t}),i):null});nu.displayName=zL;function FL(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var dn=e=>{const{present:t,children:n}=e,r=$L(t),s=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=Ke(r.ref,UL(s));return typeof n=="function"||r.isPresent?g.cloneElement(s,{ref:o}):null};dn.displayName="Presence";function $L(e){const[t,n]=g.useState(),r=g.useRef({}),s=g.useRef(e),o=g.useRef("none"),i=e?"mounted":"unmounted",[a,c]=FL(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Hu(r.current);o.current=a==="mounted"?u:"none"},[a]),Bt(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,m=Hu(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Bt(()=>{if(t){const u=f=>{const m=Hu(r.current).includes(f.animationName);f.target===t&&m&&Bs.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Hu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Hu(e){return(e==null?void 0:e.animationName)||"none"}function UL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gm="rovingFocusGroup.onEntryFocus",VL={bubbles:!1,cancelable:!0},mh="RovingFocusGroup",[bg,Vk,BL]=eu(mh),[WL,rl]=un(mh,[BL]),[HL,YL]=WL(mh),Bk=g.forwardRef((e,t)=>l.jsx(bg.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(bg.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(KL,{...e,ref:t})})}));Bk.displayName=mh;var KL=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=g.useRef(null),m=Ke(t,h),x=Ci(o),[p=null,w]=Ln({prop:i,defaultProp:a,onChange:c}),[y,v]=g.useState(!1),b=Dt(u),_=Vk(n),C=g.useRef(!1),[j,T]=g.useState(0);return g.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(Gm,b),()=>R.removeEventListener(Gm,b)},[b]),l.jsx(HL,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:p,onItemFocus:g.useCallback(R=>w(R),[w]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:g.useCallback(()=>T(R=>R-1),[]),children:l.jsx(Te.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{C.current=!0}),onFocus:ue(e.onFocus,R=>{const A=!C.current;if(R.target===R.currentTarget&&A&&!y){const D=new CustomEvent(Gm,VL);if(R.currentTarget.dispatchEvent(D),!D.defaultPrevented){const G=_().filter(J=>J.focusable),N=G.find(J=>J.active),z=G.find(J=>J.id===p),U=[N,z,...G].filter(Boolean).map(J=>J.ref.current);Yk(U,d)}}C.current=!1}),onBlur:ue(e.onBlur,()=>v(!1))})})}),Wk="RovingFocusGroupItem",Hk=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=Mn(),c=o||a,u=YL(Wk,n),d=u.currentTabStopId===c,f=Vk(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=u;return g.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),l.jsx(bg.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:l.jsx(Te.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:ue(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ue(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const p=qL(x,u.orientation,u.dir);if(p!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=f().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")y.reverse();else if(p==="prev"||p==="next"){p==="prev"&&y.reverse();const v=y.indexOf(x.currentTarget);y=u.loop?XL(y,v+1):y.slice(v+1)}setTimeout(()=>Yk(y))}})})})});Hk.displayName=Wk;var GL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function qL(e,t,n){const r=ZL(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return GL[r]}function Yk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function XL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Cv=Bk,jv=Hk,QL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$i=new WeakMap,Yu=new WeakMap,Ku={},Zm=0,Kk=function(e){return e&&(e.host||Kk(e.parentNode))},JL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Kk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ez=function(e,t,n,r){var s=JL(t,Array.isArray(e)?e:[e]);Ku[n]||(Ku[n]=new WeakMap);var o=Ku[n],i=[],a=new Set,c=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var m=h.getAttribute(r),x=m!==null&&m!=="false",p=($i.get(h)||0)+1,w=(o.get(h)||0)+1;$i.set(h,p),o.set(h,w),i.push(h),p===1&&x&&Yu.set(h,!0),w===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),a.clear(),Zm++,function(){i.forEach(function(f){var h=$i.get(f)-1,m=o.get(f)-1;$i.set(f,h),o.set(f,m),h||(Yu.has(f)||f.removeAttribute(r),Yu.delete(f)),m||f.removeAttribute(n)}),Zm--,Zm||($i=new WeakMap,$i=new WeakMap,Yu=new WeakMap,Ku={})}},Ev=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=QL(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),ez(r,s,n,"aria-hidden")):function(){return null}},Gr=function(){return Gr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Gr.apply(this,arguments)};function Gk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function tz(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var wd="right-scroll-bar-position",bd="width-before-scroll-bar",nz="with-scroll-bars-hidden",rz="--removed-body-scroll-bar-size";function qm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sz(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var oz=typeof window<"u"?g.useLayoutEffect:g.useEffect,wb=new WeakMap;function iz(e,t){var n=sz(null,function(r){return e.forEach(function(s){return qm(s,r)})});return oz(function(){var r=wb.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||qm(a,null)}),o.forEach(function(a){s.has(a)||qm(a,i)})}wb.set(n,e)},[e]),n}function az(e){return e}function lz(e,t){t===void 0&&(t=az);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return s}function cz(e){e===void 0&&(e={});var t=lz(null);return t.options=Gr({async:!0,ssr:!1},e),t}var Zk=function(e){var t=e.sideCar,n=Gk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,Gr({},n))};Zk.isSideCarExport=!0;function uz(e,t){return e.useMedium(t),Zk}var qk=cz(),Xm=function(){},ph=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Xm,onWheelCapture:Xm,onTouchMoveCapture:Xm}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noIsolation,x=e.inert,p=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,v=e.gapMode,b=Gk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,C=iz([n,t]),j=Gr(Gr({},b),s);return g.createElement(g.Fragment,null,d&&g.createElement(_,{sideCar:qk,removeScrollBar:u,shards:f,noIsolation:m,inert:x,setCallbacks:o,allowPinchZoom:!!p,lockRef:n,gapMode:v}),i?g.cloneElement(g.Children.only(a),Gr(Gr({},j),{ref:C})):g.createElement(y,Gr({},j,{className:c,ref:C}),a))});ph.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ph.classNames={fullWidth:bd,zeroRight:wd};var dz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dz();return t&&e.setAttribute("nonce",t),e}function hz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fz())&&(hz(t,n),mz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gz=function(){var e=pz();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xk=function(){var e=gz(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},yz={left:0,top:0,right:0,gap:0},Qm=function(e){return parseInt(e||"",10)||0},vz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Qm(n),Qm(r),Qm(s)]},xz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yz;var t=vz(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},wz=Xk(),ba="data-scroll-locked",bz=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(nz,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body[`).concat(ba,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(s,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(i,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(wd,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(bd,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(wd," .").concat(wd,` { + right: 0 `).concat(r,`; + } + + .`).concat(bd," .").concat(bd,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(ba,`] { + `).concat(rz,": ").concat(a,`px; + } +`)},bb=function(){var e=parseInt(document.body.getAttribute(ba)||"0",10);return isFinite(e)?e:0},_z=function(){g.useEffect(function(){return document.body.setAttribute(ba,(bb()+1).toString()),function(){var e=bb()-1;e<=0?document.body.removeAttribute(ba):document.body.setAttribute(ba,e.toString())}},[])},Sz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;_z();var o=g.useMemo(function(){return xz(s)},[s]);return g.createElement(wz,{styles:bz(o,!t,s,n?"":"!important")})},_g=!1;if(typeof window<"u")try{var Gu=Object.defineProperty({},"passive",{get:function(){return _g=!0,!0}});window.addEventListener("test",Gu,Gu),window.removeEventListener("test",Gu,Gu)}catch{_g=!1}var Ui=_g?{passive:!1}:!1,kz=function(e){return e.tagName==="TEXTAREA"},Qk=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!kz(e)&&n[t]==="visible")},Cz=function(e){return Qk(e,"overflowY")},jz=function(e){return Qk(e,"overflowX")},_b=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Jk(e,r);if(s){var o=eC(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ez=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Nz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jk=function(e,t){return e==="v"?Cz(t):jz(t)},eC=function(e,t){return e==="v"?Ez(t):Nz(t)},Tz=function(e,t){return e==="h"&&t==="rtl"?-1:1},Pz=function(e,t,n,r,s){var o=Tz(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),u=!1,d=i>0,f=0,h=0;do{var m=eC(e,a),x=m[0],p=m[1],w=m[2],y=p-w-o*x;(x||y)&&Jk(e,a)&&(f+=y,h+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},Zu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sb=function(e){return[e.deltaX,e.deltaY]},kb=function(e){return e&&"current"in e?e.current:e},Rz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Az=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Oz=0,Vi=[];function Dz(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),s=g.useState(Oz++)[0],o=g.useState(Xk)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=tz([e.lockRef.current],(e.shards||[]).map(kb),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(p,w){if("touches"in p&&p.touches.length===2)return!i.current.allowPinchZoom;var y=Zu(p),v=n.current,b="deltaX"in p?p.deltaX:v[0]-y[0],_="deltaY"in p?p.deltaY:v[1]-y[1],C,j=p.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in p&&T==="h"&&j.type==="range")return!1;var R=_b(T,j);if(!R)return!0;if(R?C=T:(C=T==="v"?"h":"v",R=_b(T,j)),!R)return!1;if(!r.current&&"changedTouches"in p&&(b||_)&&(r.current=C),!C)return!0;var A=r.current||C;return Pz(A,w,p,A==="h"?b:_,!0)},[]),c=g.useCallback(function(p){var w=p;if(!(!Vi.length||Vi[Vi.length-1]!==o)){var y="deltaY"in w?Sb(w):Zu(w),v=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&Rz(C.delta,y)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(kb).filter(Boolean).filter(function(C){return C.contains(w.target)}),_=b.length>0?a(w,b[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),u=g.useCallback(function(p,w,y,v){var b={name:p,delta:w,target:y,should:v,shadowParent:Iz(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),d=g.useCallback(function(p){n.current=Zu(p),r.current=void 0},[]),f=g.useCallback(function(p){u(p.type,Sb(p),p.target,a(p,e.lockRef.current))},[]),h=g.useCallback(function(p){u(p.type,Zu(p),p.target,a(p,e.lockRef.current))},[]);g.useEffect(function(){return Vi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Ui),document.addEventListener("touchmove",c,Ui),document.addEventListener("touchstart",d,Ui),function(){Vi=Vi.filter(function(p){return p!==o}),document.removeEventListener("wheel",c,Ui),document.removeEventListener("touchmove",c,Ui),document.removeEventListener("touchstart",d,Ui)}},[]);var m=e.removeScrollBar,x=e.inert;return g.createElement(g.Fragment,null,x?g.createElement(o,{styles:Az(s)}):null,m?g.createElement(Sz,{gapMode:e.gapMode}):null)}function Iz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Mz=uz(qk,Dz);var gh=g.forwardRef(function(e,t){return g.createElement(ph,Gr({},e,{ref:t,sideCar:Mz}))});gh.classNames=ph.classNames;var Sg=["Enter"," "],Lz=["ArrowDown","PageUp","Home"],tC=["ArrowUp","PageDown","End"],zz=[...Lz,...tC],Fz={ltr:[...Sg,"ArrowRight"],rtl:[...Sg,"ArrowLeft"]},$z={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ru="Menu",[Cc,Uz,Vz]=eu(ru),[ji,nC]=un(ru,[Vz,nl,rl]),yh=nl(),rC=rl(),[Bz,Ei]=ji(ru),[Wz,su]=ji(ru),sC=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=yh(t),[c,u]=g.useState(null),d=g.useRef(!1),f=Dt(o),h=Ci(s);return g.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),l.jsx(bv,{...a,children:l.jsx(Bz,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(Wz,{scope:t,onClose:g.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})};sC.displayName=ru;var Hz="MenuAnchor",Nv=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=yh(n);return l.jsx(_v,{...s,...r,ref:t})});Nv.displayName=Hz;var Tv="MenuPortal",[Yz,oC]=ji(Tv,{forceMount:void 0}),iC=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Ei(Tv,t);return l.jsx(Yz,{scope:t,forceMount:n,children:l.jsx(dn,{present:n||o.open,children:l.jsx(nu,{asChild:!0,container:s,children:r})})})};iC.displayName=Tv;var ur="MenuContent",[Kz,Pv]=ji(ur),aC=g.forwardRef((e,t)=>{const n=oC(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ei(ur,e.__scopeMenu),i=su(ur,e.__scopeMenu);return l.jsx(Cc.Provider,{scope:e.__scopeMenu,children:l.jsx(dn,{present:r||o.open,children:l.jsx(Cc.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(Gz,{...s,ref:t}):l.jsx(Zz,{...s,ref:t})})})})}),Gz=g.forwardRef((e,t)=>{const n=Ei(ur,e.__scopeMenu),r=g.useRef(null),s=Ke(t,r);return g.useEffect(()=>{const o=r.current;if(o)return Ev(o)},[]),l.jsx(Rv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zz=g.forwardRef((e,t)=>{const n=Ei(ur,e.__scopeMenu);return l.jsx(Rv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Rv=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:x,...p}=e,w=Ei(ur,n),y=su(ur,n),v=yh(n),b=rC(n),_=Uz(n),[C,j]=g.useState(null),T=g.useRef(null),R=Ke(t,T,w.onContentChange),A=g.useRef(0),D=g.useRef(""),G=g.useRef(0),N=g.useRef(null),z=g.useRef("right"),S=g.useRef(0),U=x?gh:g.Fragment,J=x?{as:ss,allowPinchZoom:!0}:void 0,F=I=>{var ge,ke;const X=D.current+I,$=_().filter(Pe=>!Pe.disabled),B=document.activeElement,pe=(ge=$.find(Pe=>Pe.ref.current===B))==null?void 0:ge.textValue,se=$.map(Pe=>Pe.textValue),oe=aF(se,X,pe),Ie=(ke=$.find(Pe=>Pe.textValue===oe))==null?void 0:ke.ref.current;(function Pe(Fe){D.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>Pe(""),1e3))})(X),Ie&&setTimeout(()=>Ie.focus())};g.useEffect(()=>()=>window.clearTimeout(A.current),[]),dv();const W=g.useCallback(I=>{var $,B;return z.current===(($=N.current)==null?void 0:$.side)&&cF(I,(B=N.current)==null?void 0:B.area)},[]);return l.jsx(Kz,{scope:n,searchRef:D,onItemEnter:g.useCallback(I=>{W(I)&&I.preventDefault()},[W]),onItemLeave:g.useCallback(I=>{var X;W(I)||((X=T.current)==null||X.focus(),j(null))},[W]),onTriggerLeave:g.useCallback(I=>{W(I)&&I.preventDefault()},[W]),pointerGraceTimerRef:G,onPointerGraceIntentChange:g.useCallback(I=>{N.current=I},[]),children:l.jsx(U,{...J,children:l.jsx(dh,{asChild:!0,trapped:s,onMountAutoFocus:ue(o,I=>{var X;I.preventDefault(),(X=T.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:l.jsx(Cv,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:j,onEntryFocus:ue(c,I=>{y.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Sv,{role:"menu","aria-orientation":"vertical","data-state":SC(w.open),"data-radix-menu-content":"",dir:y.dir,...v,...p,ref:R,style:{outline:"none",...p.style},onKeyDown:ue(p.onKeyDown,I=>{const $=I.target.closest("[data-radix-menu-content]")===I.currentTarget,B=I.ctrlKey||I.altKey||I.metaKey,pe=I.key.length===1;$&&(I.key==="Tab"&&I.preventDefault(),!B&&pe&&F(I.key));const se=T.current;if(I.target!==se||!zz.includes(I.key))return;I.preventDefault();const Ie=_().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);tC.includes(I.key)&&Ie.reverse(),oF(Ie)}),onBlur:ue(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),D.current="")}),onPointerMove:ue(e.onPointerMove,jc(I=>{const X=I.target,$=S.current!==I.clientX;if(I.currentTarget.contains(X)&&$){const B=I.clientX>S.current?"right":"left";z.current=B,S.current=I.clientX}}))})})})})})})});aC.displayName=ur;var qz="MenuGroup",Av=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Te.div,{role:"group",...r,ref:t})});Av.displayName=qz;var Xz="MenuLabel",lC=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Te.div,{...r,ref:t})});lC.displayName=Xz;var af="MenuItem",Cb="menu.itemSelect",vh=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=g.useRef(null),i=su(af,e.__scopeMenu),a=Pv(af,e.__scopeMenu),c=Ke(t,o),u=g.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(Cb,{bubbles:!0,cancelable:!0});f.addEventListener(Cb,m=>r==null?void 0:r(m),{once:!0}),uv(f,h),h.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(cC,{...s,ref:c,disabled:n,onClick:ue(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ue(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ue(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||Sg.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});vh.displayName=af;var cC=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=Pv(af,n),a=rC(n),c=g.useRef(null),u=Ke(t,c),[d,f]=g.useState(!1),[h,m]=g.useState("");return g.useEffect(()=>{const x=c.current;x&&m((x.textContent??"").trim())},[o.children]),l.jsx(Cc.ItemSlot,{scope:n,disabled:r,textValue:s??h,children:l.jsx(jv,{asChild:!0,...a,focusable:!r,children:l.jsx(Te.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:ue(e.onPointerMove,jc(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(e.onPointerLeave,jc(x=>i.onItemLeave(x))),onFocus:ue(e.onFocus,()=>f(!0)),onBlur:ue(e.onBlur,()=>f(!1))})})})}),Qz="MenuCheckboxItem",uC=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return l.jsx(pC,{scope:e.__scopeMenu,checked:n,children:l.jsx(vh,{role:"menuitemcheckbox","aria-checked":lf(n)?"mixed":n,...s,ref:t,"data-state":Dv(n),onSelect:ue(s.onSelect,()=>r==null?void 0:r(lf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});uC.displayName=Qz;var dC="MenuRadioGroup",[Jz,eF]=ji(dC,{value:void 0,onValueChange:()=>{}}),fC=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Dt(r);return l.jsx(Jz,{scope:e.__scopeMenu,value:n,onValueChange:o,children:l.jsx(Av,{...s,ref:t})})});fC.displayName=dC;var hC="MenuRadioItem",mC=g.forwardRef((e,t)=>{const{value:n,...r}=e,s=eF(hC,e.__scopeMenu),o=n===s.value;return l.jsx(pC,{scope:e.__scopeMenu,checked:o,children:l.jsx(vh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Dv(o),onSelect:ue(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});mC.displayName=hC;var Ov="MenuItemIndicator",[pC,tF]=ji(Ov,{checked:!1}),gC=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=tF(Ov,n);return l.jsx(dn,{present:r||lf(o.checked)||o.checked===!0,children:l.jsx(Te.span,{...s,ref:t,"data-state":Dv(o.checked)})})});gC.displayName=Ov;var nF="MenuSeparator",yC=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});yC.displayName=nF;var rF="MenuArrow",vC=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=yh(n);return l.jsx(kv,{...s,...r,ref:t})});vC.displayName=rF;var sF="MenuSub",[m9,xC]=ji(sF),Ml="MenuSubTrigger",wC=g.forwardRef((e,t)=>{const n=Ei(Ml,e.__scopeMenu),r=su(Ml,e.__scopeMenu),s=xC(Ml,e.__scopeMenu),o=Pv(Ml,e.__scopeMenu),i=g.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),l.jsx(Nv,{asChild:!0,...u,children:l.jsx(cC,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":SC(n.open),...e,ref:ch(t,s.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(e.onPointerMove,jc(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ue(e.onPointerLeave,jc(f=>{var m,x;d();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const p=(x=n.content)==null?void 0:x.dataset.side,w=p==="right",y=w?-5:5,v=h[w?"left":"right"],b=h[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:v,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:v,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ue(e.onKeyDown,f=>{var m;const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Fz[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});wC.displayName=Ml;var bC="MenuSubContent",_C=g.forwardRef((e,t)=>{const n=oC(ur,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ei(ur,e.__scopeMenu),i=su(ur,e.__scopeMenu),a=xC(bC,e.__scopeMenu),c=g.useRef(null),u=Ke(t,c);return l.jsx(Cc.Provider,{scope:e.__scopeMenu,children:l.jsx(dn,{present:r||o.open,children:l.jsx(Cc.Slot,{scope:e.__scopeMenu,children:l.jsx(Rv,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ue(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ue(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ue(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),h=$z[i.dir].includes(d.key);f&&h&&(o.onOpenChange(!1),(m=a.trigger)==null||m.focus(),d.preventDefault())})})})})})});_C.displayName=bC;function SC(e){return e?"open":"closed"}function lf(e){return e==="indeterminate"}function Dv(e){return lf(e)?"indeterminate":e?"checked":"unchecked"}function oF(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function iF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function aF(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=iF(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function lF(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function cF(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lF(n,t)}function jc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var uF=sC,dF=Nv,fF=iC,hF=aC,mF=Av,pF=lC,gF=vh,yF=uC,vF=fC,xF=mC,wF=gC,bF=yC,_F=vC,SF=wC,kF=_C,Iv="DropdownMenu",[CF,p9]=un(Iv,[nC]),En=nC(),[jF,kC]=CF(Iv),CC=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=En(t),u=g.useRef(null),[d=!1,f]=Ln({prop:s,defaultProp:o,onChange:i});return l.jsx(jF,{scope:t,triggerId:Mn(),triggerRef:u,contentId:Mn(),open:d,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(h=>!h),[f]),modal:a,children:l.jsx(uF,{...c,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};CC.displayName=Iv;var jC="DropdownMenuTrigger",EC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=kC(jC,n),i=En(n);return l.jsx(dF,{asChild:!0,...i,children:l.jsx(Te.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:ch(t,o.triggerRef),onPointerDown:ue(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ue(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});EC.displayName=jC;var EF="DropdownMenuPortal",NC=e=>{const{__scopeDropdownMenu:t,...n}=e,r=En(t);return l.jsx(fF,{...r,...n})};NC.displayName=EF;var TC="DropdownMenuContent",PC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=kC(TC,n),o=En(n),i=g.useRef(!1);return l.jsx(hF,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ue(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});PC.displayName=TC;var NF="DropdownMenuGroup",TF=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(mF,{...s,...r,ref:t})});TF.displayName=NF;var PF="DropdownMenuLabel",RC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(pF,{...s,...r,ref:t})});RC.displayName=PF;var RF="DropdownMenuItem",AC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(gF,{...s,...r,ref:t})});AC.displayName=RF;var AF="DropdownMenuCheckboxItem",OC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(yF,{...s,...r,ref:t})});OC.displayName=AF;var OF="DropdownMenuRadioGroup",DF=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(vF,{...s,...r,ref:t})});DF.displayName=OF;var IF="DropdownMenuRadioItem",DC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(xF,{...s,...r,ref:t})});DC.displayName=IF;var MF="DropdownMenuItemIndicator",IC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(wF,{...s,...r,ref:t})});IC.displayName=MF;var LF="DropdownMenuSeparator",MC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(bF,{...s,...r,ref:t})});MC.displayName=LF;var zF="DropdownMenuArrow",FF=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(_F,{...s,...r,ref:t})});FF.displayName=zF;var $F="DropdownMenuSubTrigger",LC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(SF,{...s,...r,ref:t})});LC.displayName=$F;var UF="DropdownMenuSubContent",zC=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(kF,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zC.displayName=UF;var VF=CC,BF=EC,WF=NC,FC=PC,$C=RC,UC=AC,VC=OC,BC=DC,WC=IC,HC=MC,YC=LC,KC=zC;const Mv=VF,Lv=BF,HF=g.forwardRef(({className:e,inset:t,children:n,...r},s)=>l.jsxs(YC,{ref:s,className:re("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,l.jsx(ck,{className:"ml-auto h-4 w-4"})]}));HF.displayName=YC.displayName;const YF=g.forwardRef(({className:e,...t},n)=>l.jsx(KC,{ref:n,className:re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));YF.displayName=KC.displayName;const xh=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(WF,{children:l.jsx(FC,{ref:r,sideOffset:t,className:re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));xh.displayName=FC.displayName;const ri=g.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(UC,{ref:r,className:re("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));ri.displayName=UC.displayName;const KF=g.forwardRef(({className:e,children:t,checked:n,...r},s)=>l.jsxs(VC,{ref:s,className:re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(WC,{children:l.jsx(lk,{className:"h-4 w-4"})})}),t]}));KF.displayName=VC.displayName;const GF=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(BC,{ref:r,className:re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(WC,{children:l.jsx(uk,{className:"h-2 w-2 fill-current"})})}),t]}));GF.displayName=BC.displayName;const ZF=g.forwardRef(({className:e,inset:t,...n},r)=>l.jsx($C,{ref:r,className:re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));ZF.displayName=$C.displayName;const qF=g.forwardRef(({className:e,...t},n)=>l.jsx(HC,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));qF.displayName=HC.displayName;function XF(){const{i18n:e}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(De,{variant:"outline",size:"icon",children:[l.jsx(yI,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(xh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(ri,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}const QF={theme:"system",setTheme:()=>null},GC=g.createContext(QF);function JF({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=g.useState(()=>localStorage.getItem(n)||t);g.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return l.jsx(GC.Provider,{...r,value:i,children:e})}const e4=()=>{const e=g.useContext(GC);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function t4(){const{setTheme:e}=e4(),{t}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(De,{variant:"outline",size:"icon",children:[l.jsx(kI,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(bI,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(xh,{align:"end",children:[l.jsx(ri,{onClick:()=>e("light"),children:t("common.theme.light")}),l.jsx(ri,{onClick:()=>e("dark"),children:t("common.theme.dark")}),l.jsx(ri,{onClick:()=>e("system"),children:t("common.theme.system")})]})]})}var zv="Dialog",[ZC,qC]=un(zv),[n4,Lr]=ZC(zv),XC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=g.useRef(null),c=g.useRef(null),[u=!1,d]=Ln({prop:r,defaultProp:s,onChange:o});return l.jsx(n4,{scope:t,triggerRef:a,contentRef:c,contentId:Mn(),titleId:Mn(),descriptionId:Mn(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};XC.displayName=zv;var QC="DialogTrigger",JC=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(QC,n),o=Ke(t,s.triggerRef);return l.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Uv(s.open),...r,ref:o,onClick:ue(e.onClick,s.onOpenToggle)})});JC.displayName=QC;var Fv="DialogPortal",[r4,ej]=ZC(Fv,{forceMount:void 0}),tj=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Lr(Fv,t);return l.jsx(r4,{scope:t,forceMount:n,children:g.Children.map(r,i=>l.jsx(dn,{present:n||o.open,children:l.jsx(nu,{asChild:!0,container:s,children:i})}))})};tj.displayName=Fv;var cf="DialogOverlay",nj=g.forwardRef((e,t)=>{const n=ej(cf,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Lr(cf,e.__scopeDialog);return o.modal?l.jsx(dn,{present:r||o.open,children:l.jsx(s4,{...s,ref:t})}):null});nj.displayName=cf;var s4=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(cf,n);return l.jsx(gh,{as:ss,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Te.div,{"data-state":Uv(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),yi="DialogContent",rj=g.forwardRef((e,t)=>{const n=ej(yi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Lr(yi,e.__scopeDialog);return l.jsx(dn,{present:r||o.open,children:o.modal?l.jsx(o4,{...s,ref:t}):l.jsx(i4,{...s,ref:t})})});rj.displayName=yi;var o4=g.forwardRef((e,t)=>{const n=Lr(yi,e.__scopeDialog),r=g.useRef(null),s=Ke(t,n.contentRef,r);return g.useEffect(()=>{const o=r.current;if(o)return Ev(o)},[]),l.jsx(sj,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault())})}),i4=g.forwardRef((e,t)=>{const n=Lr(yi,e.__scopeDialog),r=g.useRef(!1),s=g.useRef(!1);return l.jsx(sj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),sj=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Lr(yi,n),c=g.useRef(null),u=Ke(t,c);return dv(),l.jsxs(l.Fragment,{children:[l.jsx(dh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:l.jsx(Ja,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Uv(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(l4,{titleId:a.titleId}),l.jsx(u4,{contentRef:c,descriptionId:a.descriptionId})]})]})}),$v="DialogTitle",oj=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr($v,n);return l.jsx(Te.h2,{id:s.titleId,...r,ref:t})});oj.displayName=$v;var ij="DialogDescription",aj=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(ij,n);return l.jsx(Te.p,{id:s.descriptionId,...r,ref:t})});aj.displayName=ij;var lj="DialogClose",cj=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Lr(lj,n);return l.jsx(Te.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>s.onOpenChange(!1))})});cj.displayName=lj;function Uv(e){return e?"open":"closed"}var uj="DialogTitleWarning",[a4,dj]=uM(uj,{contentName:yi,titleName:$v,docsSlug:"dialog"}),l4=({titleId:e})=>{const t=dj(uj),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},c4="DialogDescriptionWarning",u4=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dj(c4).contentName}}.`;return g.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vv=XC,Bv=JC,Wv=tj,ou=nj,iu=rj,au=oj,lu=aj,wh=cj;const Hv=Vv,Yv=Bv,d4=Wv,fj=g.forwardRef(({className:e,...t},n)=>l.jsx(ou,{className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));fj.displayName=ou.displayName;const f4=Jc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),bh=g.forwardRef(({side:e="right",className:t,children:n,...r},s)=>l.jsxs(d4,{children:[l.jsx(fj,{}),l.jsxs(iu,{ref:s,className:re(f4({side:e}),t),...r,children:[n,l.jsxs(wh,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[l.jsx(av,{className:"h-4 w-4 dark:text-stone-200"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bh.displayName=iu.displayName;const Kv=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Kv.displayName="SheetHeader";const Gv=g.forwardRef(({className:e,...t},n)=>l.jsx(au,{ref:n,className:re("text-lg font-semibold text-foreground",e),...t}));Gv.displayName=au.displayName;const h4=g.forwardRef(({className:e,...t},n)=>l.jsx(lu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));h4.displayName=lu.displayName;class Kn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Kn.prototype),t!==null&&typeof t=="object"&&(this.url=typeof t.url=="string"?t.url:"",this.status=typeof t.status=="number"?t.status:0,this.isAbort=!!t.isAbort,this.originalError=t.originalError,t.response!==null&&typeof t.response=="object"?this.response=t.response:t.data!==null&&typeof t.data=="object"?this.response=t.data:this.response={}),this.originalError||t instanceof Kn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(r=this.originalError)==null?void 0:r.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const qu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function m4(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||p4;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const a=e.slice(s,o).trim();if(n[a]===void 0){let c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{n[a]=r(c)}catch{n[a]=c}}s=i+1}return n}function jb(e,t,n){const r=Object.assign({},n||{}),s=r.encode||g4;if(!qu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!qu.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(r.maxAge!=null){const a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(a)}if(r.domain){if(!qu.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!qu.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){if(!function(c){return Object.prototype.toString.call(c)==="[object Date]"||c instanceof Date}(r.expires)||isNaN(r.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function p4(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function g4(e){return encodeURIComponent(e)}const y4=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let hj;function _a(e){if(e)try{const t=decodeURIComponent(hj(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function mj(e,t=0){let n=_a(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}hj=typeof atob!="function"||y4?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const Eb="pb_auth";class v4{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!mj(this.token)}get isAdmin(){return _a(this.token).type==="admin"}get isAuthRecord(){return _a(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=Eb){const r=m4(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=Eb){var c,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=_a(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=jb(n,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(c=o==null?void 0:o.model)==null?void 0:c.id,email:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=jb(n,JSON.stringify(o),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class x4 extends v4{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(t,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.removeItem(t)),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",t=>{if(t.key!=this.storageKey)return;const n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class Ni{constructor(t){this.client=t}}class w4 extends Ni{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Zv extends Ni{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Kn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Kn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(s=>this.decode(s))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],s=async o=>this.getList(o,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?s(o+1):r});return s(1)}}function Fn(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function Jm(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class b4 extends Zv{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o;return r&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};o=Fn("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||Jm(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(u,d,f,h){Jm(u);const m=u.beforeSend,x=u.authStore.model,p=u.authStore.onChange((w,y)=>{(!w||(y==null?void 0:y.id)!=(x==null?void 0:x.id)||(y!=null&&y.collectionId||x!=null&&x.collectionId)&&(y==null?void 0:y.collectionId)!=(x==null?void 0:x.collectionId))&&Jm(u)});u._resetAutoRefresh=function(){p(),u.beforeSend=m,delete u._resetAutoRefresh},u.beforeSend=async(w,y)=>{var C;const v=u.authStore.token;if((C=y.query)!=null&&C.autoRefresh)return m?m(w,y):{url:w,sendOptions:y};let b=u.authStore.isValid;if(b&&mj(u.authStore.token,d))try{await f()}catch{b=!1}b||await h();const _=y.headers||{};for(let j in _)if(j.toLowerCase()=="authorization"&&v==_[j]&&u.authStore.token){_[j]=u.authStore.token;break}return y.headers=_,m?m(w,y):{url:w,sendOptions:y}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,n){let r={method:"POST"};return r=Fn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Fn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Fn("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const _4=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function pj(e){if(e){e.query=e.query||{};for(let t in e)_4.includes(t)||(e.query[t]=e[t],delete e[t])}}class gj extends Ni{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,n,r){var i;if(!t)throw new Error("topic must be set.");let s=t;if(r){pj(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const c=a;let u;try{u=JSON.parse(c==null?void 0:c.data)}catch{}n(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let a=!1;for(let c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===n&&(a=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,1),(o=this.eventSource)==null||o.removeEventListener(i,n));a&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let s in this.subscriptions)if((r=this.subscriptions[s])!=null&&r.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Kn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class S4 extends Zv{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i,a;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((a=this.client.authStore.model)==null?void 0:a.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};return o=Fn("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,a){let c={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return c=Fn("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",c,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",c).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=Nb(void 0));const s=new gj(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(c=>{var h;const u=c.authProviders.find(m=>m.name===n.provider);if(!u)throw new Kn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(h=this.client.cancelControllers)==null?void 0:h[a]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(m,x)=>{var p;try{await s.subscribe("@oauth2",async b=>{var C;const _=s.clientId;try{if(!b.state||_!==b.state)throw new Error("State parameters don't match.");if(b.error||!b.code)throw new Error("OAuth2 redirect error or missing code: "+b.error);const j=Object.assign({},n);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const T=await this.authWithOAuth2Code(u.name,b.code,u.codeVerifier,d,n.createData,j);m(T)}catch(j){x(new Kn(j))}o()});const w={state:s.clientId};(p=n.scopes)!=null&&p.length&&(w.scope=n.scopes.join(" "));const y=this._replaceQueryParams(u.authUrl+d,w);await(n.urlCallback||function(b){r?r.location.href=b:r=Nb(b)})(y)}catch(w){o(),x(new Kn(w))}})}).catch(c=>{throw o(),c})}async authRefresh(t,n){let r={method:"POST"};return r=Fn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Fn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Fn("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,n,r){let s={method:"POST",body:{email:t}};return s=Fn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=Fn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=_a(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,n,r){let s={method:"POST",body:{newEmail:t}};return s=Fn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=Fn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=_a(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,s="";t.indexOf("?")>=0&&(r=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const a of i){if(a=="")continue;const c=a.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[1]||"").replace(/\+/g," "))}for(let a in n)n.hasOwnProperty(a)&&(n[a]==null?delete o[a]:o[a]=n[a]);s="";for(let a in o)o.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return s!=""?r+"?"+s:r}}function Nb(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Kn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class k4 extends Zv{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class C4 extends Ni{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Kn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class j4 extends Ni{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class E4 extends Ni{getUrl(t,n,r={}){if(!n||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class N4 extends Ni{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class T4{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new x4,this.admins=new b4(this),this.collections=new k4(this),this.files=new E4(this),this.logs=new C4(this),this.settings=new w4(this),this.realtime=new gj(this),this.health=new j4(this),this.backups=new N4(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new S4(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,n){if(!n)return t;for(let r in n){let s=n[r];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+r+"}",s)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Kn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Kn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),pj(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const s=new AbortController;this.cancelControllers[r]=s,n.signal=s.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}const P4=void 0;console.log(P4);let Xu;const ot=()=>Xu||(Xu=new T4("/"),Xu);//! moment.js +//! version : 2.30.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var yj;function Se(){return yj.apply(null,arguments)}function R4(e){yj=e}function Or(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function si(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function dt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(dt(e,t))return!1;return!0}function Nn(e){return e===void 0}function Fs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function cu(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function vj(e,t){var n=[],r,s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function fo(e,t){for(var n in t)dt(t,n)&&(e[n]=t[n]);return dt(t,"toString")&&(e.toString=t.toString),dt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function cs(e,t,n,r){return Uj(e,t,n,r,!0).utc()}function A4(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Qe(e){return e._pf==null&&(e._pf=A4()),e._pf}var kg;Array.prototype.some?kg=Array.prototype.some:kg=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Xv(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Qe(e),n=kg.call(t.parsedDateParts,function(s){return s!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function _h(e){var t=cs(NaN);return e!=null?fo(Qe(t),e):Qe(t).userInvalidated=!0,t}var Tb=Se.momentProperties=[],ep=!1;function Qv(e,t){var n,r,s,o=Tb.length;if(Nn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Nn(t._i)||(e._i=t._i),Nn(t._f)||(e._f=t._f),Nn(t._l)||(e._l=t._l),Nn(t._strict)||(e._strict=t._strict),Nn(t._tzm)||(e._tzm=t._tzm),Nn(t._isUTC)||(e._isUTC=t._isUTC),Nn(t._offset)||(e._offset=t._offset),Nn(t._pf)||(e._pf=Qe(t)),Nn(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=Tb[n],s=t[r],Nn(s)||(e[r]=s);return e}function uu(e){Qv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),ep===!1&&(ep=!0,Se.updateOffset(this),ep=!1)}function Dr(e){return e instanceof uu||e!=null&&e._isAMomentObject!=null}function xj(e){Se.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function mr(e,t){var n=!0;return fo(function(){if(Se.deprecationHandler!=null&&Se.deprecationHandler(null,e),n){var r=[],s,o,i,a=arguments.length;for(o=0;o<a;o++){if(s="",typeof arguments[o]=="object"){s+=` +[`+o+"] ";for(i in arguments[0])dt(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}xj(e+` +Arguments: `+Array.prototype.slice.call(r).join("")+` +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Pb={};function wj(e,t){Se.deprecationHandler!=null&&Se.deprecationHandler(e,t),Pb[e]||(xj(t),Pb[e]=!0)}Se.suppressDeprecationWarnings=!1;Se.deprecationHandler=null;function us(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function O4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],us(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Cg(e,t){var n=fo({},e),r;for(r in t)dt(t,r)&&(si(e[r])&&si(t[r])?(n[r]={},fo(n[r],e[r]),fo(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&si(e[r])&&(n[r]=fo({},n[r]));return n}function Jv(e){e!=null&&this.set(e)}var jg;Object.keys?jg=Object.keys:jg=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var D4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return us(r)?r.call(t,n):r}function is(e,t,n){var r=""+Math.abs(e),s=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var ex=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Qu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tp={},Sa={};function Le(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Sa[e]=s),t&&(Sa[t[0]]=function(){return is(s.apply(this,arguments),t[1],t[2])}),n&&(Sa[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function M4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L4(e){var t=e.match(ex),n,r;for(n=0,r=t.length;n<r;n++)Sa[t[n]]?t[n]=Sa[t[n]]:t[n]=M4(t[n]);return function(s){var o="",i;for(i=0;i<r;i++)o+=us(t[i])?t[i].call(s,e):t[i];return o}}function _d(e,t){return e.isValid()?(t=bj(t,e.localeData()),tp[t]=tp[t]||L4(t),tp[t](e)):e.localeData().invalidDate()}function bj(e,t){var n=5;function r(s){return t.longDateFormat(s)||s}for(Qu.lastIndex=0;n>=0&&Qu.test(e);)e=e.replace(Qu,r),Qu.lastIndex=0,n-=1;return e}var z4={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function F4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ex).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var $4="Invalid date";function U4(){return this._invalidDate}var V4="%d",B4=/\d{1,2}/;function W4(e){return this._ordinal.replace("%d",e)}var H4={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Y4(e,t,n,r){var s=this._relativeTime[n];return us(s)?s(e,t,n,r):s.replace(/%d/i,e)}function K4(e,t){var n=this._relativeTime[e>0?"future":"past"];return us(n)?n(t):n.replace(/%s/i,t)}var Rb={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function pr(e){return typeof e=="string"?Rb[e]||Rb[e.toLowerCase()]:void 0}function tx(e){var t={},n,r;for(r in e)dt(e,r)&&(n=pr(r),n&&(t[n]=e[r]));return t}var G4={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Z4(e){var t=[],n;for(n in e)dt(e,n)&&t.push({unit:n,priority:G4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var _j=/\d/,tr=/\d\d/,Sj=/\d{3}/,nx=/\d{4}/,Sh=/[+-]?\d{6}/,jt=/\d\d?/,kj=/\d\d\d\d?/,Cj=/\d\d\d\d\d\d?/,kh=/\d{1,3}/,rx=/\d{1,4}/,Ch=/[+-]?\d{1,6}/,sl=/\d+/,jh=/[+-]?\d+/,q4=/Z|[+-]\d\d:?\d\d/gi,Eh=/Z|[+-]\d\d(?::?\d\d)?/gi,X4=/[+-]?\d+(\.\d{1,3})?/,du=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ol=/^[1-9]\d?/,sx=/^([1-9]\d|\d)/,uf;uf={};function Ee(e,t,n){uf[e]=us(t)?t:function(r,s){return r&&n?n:t}}function Q4(e,t){return dt(uf,e)?uf[e](t._strict,t._locale):new RegExp(J4(e))}function J4(e){return Ps(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function Ps(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ir(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=ir(t)),n}var Eg={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),Fs(t)&&(r=function(o,i){i[t]=rt(o)}),s=e.length,n=0;n<s;n++)Eg[e[n]]=r}function fu(e,t){vt(e,function(n,r,s,o){s._w=s._w||{},t(n,s._w,s,o)})}function e3(e,t,n){t!=null&&dt(Eg,e)&&Eg[e](t,n._a,n,e)}function Nh(e){return e%4===0&&e%100!==0||e%400===0}var pn=0,js=1,Zr=2,Xt=3,Cr=4,Es=5,Qo=6,t3=7,n3=8;Le("Y",0,0,function(){var e=this.year();return e<=9999?is(e,4):"+"+e});Le(0,["YY",2],0,function(){return this.year()%100});Le(0,["YYYY",4],0,"year");Le(0,["YYYYY",5],0,"year");Le(0,["YYYYYY",6,!0],0,"year");Ee("Y",jh);Ee("YY",jt,tr);Ee("YYYY",rx,nx);Ee("YYYYY",Ch,Sh);Ee("YYYYYY",Ch,Sh);vt(["YYYYY","YYYYYY"],pn);vt("YYYY",function(e,t){t[pn]=e.length===2?Se.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[pn]=Se.parseTwoDigitYear(e)});vt("Y",function(e,t){t[pn]=parseInt(e,10)});function Ql(e){return Nh(e)?366:365}Se.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var jj=il("FullYear",!0);function r3(){return Nh(this.year())}function il(e,t){return function(n){return n!=null?(Ej(this,e,n),Se.updateOffset(this,t),this):Ec(this,e)}}function Ec(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ej(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Nh(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function s3(e){return e=pr(e),us(this[e])?this[e]():this}function o3(e,t){if(typeof e=="object"){e=tx(e);var n=Z4(e),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(e=pr(e),us(this[e]))return this[e](t);return this}function i3(e,t){return(e%t+t)%t}var $t;Array.prototype.indexOf?$t=Array.prototype.indexOf:$t=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function ox(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=i3(t,12);return e+=(t-n)/12,n===1?Nh(e)?29:28:31-n%7%2}Le("M",["MM",2],"Mo",function(){return this.month()+1});Le("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Le("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ee("M",jt,ol);Ee("MM",jt,tr);Ee("MMM",function(e,t){return t.monthsShortRegex(e)});Ee("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[js]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);s!=null?t[js]=s:Qe(n).invalidMonth=e});var a3="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Nj="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Tj=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,l3=du,c3=du;function u3(e,t){return e?Or(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Tj).test(t)?"format":"standalone"][e.month()]:Or(this._months)?this._months:this._months.standalone}function d3(e,t){return e?Or(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Tj.test(t)?"format":"standalone"][e.month()]:Or(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function f3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=cs([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(s=$t.call(this._shortMonthsParse,i),s!==-1?s:null):(s=$t.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=$t.call(this._shortMonthsParse,i),s!==-1?s:(s=$t.call(this._longMonthsParse,i),s!==-1?s:null)):(s=$t.call(this._longMonthsParse,i),s!==-1?s:(s=$t.call(this._shortMonthsParse,i),s!==-1?s:null))}function h3(e,t,n){var r,s,o;if(this._monthsParseExact)return f3.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=cs([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function Pj(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=rt(t);else if(t=e.localeData().monthsParse(t),!Fs(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,ox(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Rj(e){return e!=null?(Pj(this,e),Se.updateOffset(this,!0),this):Ec(this,"Month")}function m3(){return ox(this.year(),this.month())}function p3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||Aj.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(dt(this,"_monthsShortRegex")||(this._monthsShortRegex=l3),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function g3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||Aj.call(this),e?this._monthsStrictRegex:this._monthsRegex):(dt(this,"_monthsRegex")||(this._monthsRegex=c3),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Aj(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],s,o,i,a;for(s=0;s<12;s++)o=cs([2e3,s]),i=Ps(this.monthsShort(o,"")),a=Ps(this.months(o,"")),t.push(i),n.push(a),r.push(a),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function y3(e,t,n,r,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function Nc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function df(e,t,n){var r=7+t-n,s=(7+Nc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function Oj(e,t,n,r,s){var o=(7+n-r)%7,i=df(e,r,s),a=1+7*(t-1)+o+i,c,u;return a<=0?(c=e-1,u=Ql(c)+a):a>Ql(e)?(c=e+1,u=a-Ql(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Tc(e,t,n){var r=df(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+Rs(i,t,n)):s>Rs(e.year(),t,n)?(o=s-Rs(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function Rs(e,t,n){var r=df(e,t,n),s=df(e+1,t,n);return(Ql(e)-r+s)/7}Le("w",["ww",2],"wo","week");Le("W",["WW",2],"Wo","isoWeek");Ee("w",jt,ol);Ee("ww",jt,tr);Ee("W",jt,ol);Ee("WW",jt,tr);fu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=rt(e)});function v3(e){return Tc(e,this._week.dow,this._week.doy).week}var x3={dow:0,doy:6};function w3(){return this._week.dow}function b3(){return this._week.doy}function _3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function S3(e){var t=Tc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Le("d",0,"do","day");Le("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Le("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Le("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Le("e",0,0,"weekday");Le("E",0,0,"isoWeekday");Ee("d",jt);Ee("e",jt);Ee("E",jt);Ee("dd",function(e,t){return t.weekdaysMinRegex(e)});Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ee("dddd",function(e,t){return t.weekdaysRegex(e)});fu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Qe(n).invalidWeekday=e});fu(["d","e","E"],function(e,t,n,r){t[r]=rt(e)});function k3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function C3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ix(e,t){return e.slice(t,7).concat(e.slice(0,t))}var j3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Dj="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),E3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),N3=du,T3=du,P3=du;function R3(e,t){var n=Or(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ix(n,this._week.dow):e?n[e.day()]:n}function A3(e){return e===!0?ix(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function O3(e){return e===!0?ix(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function D3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=cs([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1||(s=$t.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=$t.call(this._minWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function I3(e,t,n){var r,s,o;if(this._weekdaysParseExact)return D3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=cs([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function M3(e){if(!this.isValid())return e!=null?this:NaN;var t=Ec(this,"Day");return e!=null?(e=k3(e,this.localeData()),this.add(e-t,"d")):t}function L3(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function z3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=C3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function F3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=N3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function $3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=T3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function U3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=P3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ax(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,c,u;for(o=0;o<7;o++)i=cs([2e3,1]).day(o),a=Ps(this.weekdaysMin(i,"")),c=Ps(this.weekdaysShort(i,"")),u=Ps(this.weekdays(i,"")),t.push(a),n.push(c),r.push(u),s.push(a),s.push(c),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function lx(){return this.hours()%12||12}function V3(){return this.hours()||24}Le("H",["HH",2],0,"hour");Le("h",["hh",2],0,lx);Le("k",["kk",2],0,V3);Le("hmm",0,0,function(){return""+lx.apply(this)+is(this.minutes(),2)});Le("hmmss",0,0,function(){return""+lx.apply(this)+is(this.minutes(),2)+is(this.seconds(),2)});Le("Hmm",0,0,function(){return""+this.hours()+is(this.minutes(),2)});Le("Hmmss",0,0,function(){return""+this.hours()+is(this.minutes(),2)+is(this.seconds(),2)});function Ij(e,t){Le(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ij("a",!0);Ij("A",!1);function Mj(e,t){return t._meridiemParse}Ee("a",Mj);Ee("A",Mj);Ee("H",jt,sx);Ee("h",jt,ol);Ee("k",jt,ol);Ee("HH",jt,tr);Ee("hh",jt,tr);Ee("kk",jt,tr);Ee("hmm",kj);Ee("hmmss",Cj);Ee("Hmm",kj);Ee("Hmmss",Cj);vt(["H","HH"],Xt);vt(["k","kk"],function(e,t,n){var r=rt(e);t[Xt]=r===24?0:r});vt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vt(["h","hh"],function(e,t,n){t[Xt]=rt(e),Qe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r)),Qe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r,2)),t[Es]=rt(e.substr(s)),Qe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r,2)),t[Es]=rt(e.substr(s))});function B3(e){return(e+"").toLowerCase().charAt(0)==="p"}var W3=/[ap]\.?m?\.?/i,H3=il("Hours",!0);function Y3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Lj={calendar:D4,longDateFormat:z4,invalidDate:$4,ordinal:V4,dayOfMonthOrdinalParse:B4,relativeTime:H4,months:a3,monthsShort:Nj,week:x3,weekdays:j3,weekdaysMin:E3,weekdaysShort:Dj,meridiemParse:W3},Tt={},Cl={},Pc;function K3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Ab(e){return e&&e.toLowerCase().replace("_","-")}function G3(e){for(var t=0,n,r,s,o;t<e.length;){for(o=Ab(e[t]).split("-"),n=o.length,r=Ab(e[t+1]),r=r?r.split("-"):null;n>0;){if(s=Th(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&K3(o,r)>=n-1)break;n--}t++}return Pc}function Z3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Th(e){var t=null,n;if(Tt[e]===void 0&&typeof Nd<"u"&&Nd&&Nd.exports&&Z3(e))try{t=Pc._abbr,n=require,n("./locale/"+e),So(t)}catch{Tt[e]=null}return Tt[e]}function So(e,t){var n;return e&&(Nn(t)?n=Ks(e):n=cx(e,t),n?Pc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Pc._abbr}function cx(e,t){if(t!==null){var n,r=Lj;if(t.abbr=e,Tt[e]!=null)wj("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)r=Tt[t.parentLocale]._config;else if(n=Th(t.parentLocale),n!=null)r=n._config;else return Cl[t.parentLocale]||(Cl[t.parentLocale]=[]),Cl[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new Jv(Cg(r,t)),Cl[e]&&Cl[e].forEach(function(s){cx(s.name,s.config)}),So(e),Tt[e]}else return delete Tt[e],null}function q3(e,t){if(t!=null){var n,r,s=Lj;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Cg(Tt[e]._config,t)):(r=Th(e),r!=null&&(s=r._config),t=Cg(s,t),r==null&&(t.abbr=e),n=new Jv(t),n.parentLocale=Tt[e],Tt[e]=n),So(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===So()&&So(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Ks(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Pc;if(!Or(e)){if(t=Th(e),t)return t;e=[e]}return G3(e)}function X3(){return jg(Tt)}function ux(e){var t,n=e._a;return n&&Qe(e).overflow===-2&&(t=n[js]<0||n[js]>11?js:n[Zr]<1||n[Zr]>ox(n[pn],n[js])?Zr:n[Xt]<0||n[Xt]>24||n[Xt]===24&&(n[Cr]!==0||n[Es]!==0||n[Qo]!==0)?Xt:n[Cr]<0||n[Cr]>59?Cr:n[Es]<0||n[Es]>59?Es:n[Qo]<0||n[Qo]>999?Qo:-1,Qe(e)._overflowDayOfYear&&(t<pn||t>Zr)&&(t=Zr),Qe(e)._overflowWeeks&&t===-1&&(t=t3),Qe(e)._overflowWeekday&&t===-1&&(t=n3),Qe(e).overflow=t),e}var Q3=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,J3=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e5=/Z|[+-]\d\d(?::?\d\d)?/,Ju=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],np=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],t5=/^\/?Date\((-?\d+)/i,n5=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,r5={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zj(e){var t,n,r=e._i,s=Q3.exec(r)||J3.exec(r),o,i,a,c,u=Ju.length,d=np.length;if(s){for(Qe(e).iso=!0,t=0,n=u;t<n;t++)if(Ju[t][1].exec(s[1])){i=Ju[t][0],o=Ju[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,n=d;t<n;t++)if(np[t][1].exec(s[3])){a=(s[2]||" ")+np[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(e5.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),fx(e)}else e._isValid=!1}function s5(e,t,n,r,s,o){var i=[o5(e),Nj.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function o5(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function i5(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function a5(e,t,n){if(e){var r=Dj.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(r!==s)return Qe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function l5(e,t,n){if(e)return r5[e];if(t)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function Fj(e){var t=n5.exec(i5(e._i)),n;if(t){if(n=s5(t[4],t[3],t[2],t[5],t[6],t[7]),!a5(t[1],n,e))return;e._a=n,e._tzm=l5(t[8],t[9],t[10]),e._d=Nc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Qe(e).rfc2822=!0}else e._isValid=!1}function c5(e){var t=t5.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(zj(e),e._isValid===!1)delete e._isValid;else return;if(Fj(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Se.createFromInputFallback(e)}Se.createFromInputFallback=mr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ki(e,t,n){return e??t??n}function u5(e){var t=new Date(Se.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function dx(e){var t,n,r=[],s,o,i;if(!e._d){for(s=u5(e),e._w&&e._a[Zr]==null&&e._a[js]==null&&d5(e),e._dayOfYear!=null&&(i=Ki(e._a[pn],s[pn]),(e._dayOfYear>Ql(i)||e._dayOfYear===0)&&(Qe(e)._overflowDayOfYear=!0),n=Nc(i,0,e._dayOfYear),e._a[js]=n.getUTCMonth(),e._a[Zr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Xt]===24&&e._a[Cr]===0&&e._a[Es]===0&&e._a[Qo]===0&&(e._nextDay=!0,e._a[Xt]=0),e._d=(e._useUTC?Nc:y3).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Xt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Qe(e).weekdayMismatch=!0)}}function d5(e){var t,n,r,s,o,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Ki(t.GG,e._a[pn],Tc(Ct(),1,4).year),r=Ki(t.W,1),s=Ki(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Tc(Ct(),o,i),n=Ki(t.gg,e._a[pn],u.year),r=Ki(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),r<1||r>Rs(n,o,i)?Qe(e)._overflowWeeks=!0:c!=null?Qe(e)._overflowWeekday=!0:(a=Oj(n,r,s,o,i),e._a[pn]=a.year,e._dayOfYear=a.dayOfYear)}Se.ISO_8601=function(){};Se.RFC_2822=function(){};function fx(e){if(e._f===Se.ISO_8601){zj(e);return}if(e._f===Se.RFC_2822){Fj(e);return}e._a=[],Qe(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,c=0,u,d;for(s=bj(e._f,e._locale).match(ex)||[],d=s.length,n=0;n<d;n++)o=s[n],r=(t.match(Q4(o,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Qe(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),Sa[o]?(r?Qe(e).empty=!1:Qe(e).unusedTokens.push(o),e3(o,r,e)):e._strict&&!r&&Qe(e).unusedTokens.push(o);Qe(e).charsLeftOver=a-c,t.length>0&&Qe(e).unusedInput.push(t),e._a[Xt]<=12&&Qe(e).bigHour===!0&&e._a[Xt]>0&&(Qe(e).bigHour=void 0),Qe(e).parsedDateParts=e._a.slice(0),Qe(e).meridiem=e._meridiem,e._a[Xt]=f5(e._locale,e._a[Xt],e._meridiem),u=Qe(e).era,u!==null&&(e._a[pn]=e._locale.erasConvertYear(u,e._a[pn])),dx(e),ux(e)}function f5(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function h5(e){var t,n,r,s,o,i,a=!1,c=e._f.length;if(c===0){Qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=Qv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],fx(t),Xv(t)&&(i=!0),o+=Qe(t).charsLeftOver,o+=Qe(t).unusedTokens.length*10,Qe(t).score=o,a?o<r&&(r=o,n=t):(r==null||o<r||i)&&(r=o,n=t,i&&(a=!0));fo(e,n||t)}function m5(e){if(!e._d){var t=tx(e._i),n=t.day===void 0?t.date:t.day;e._a=vj([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),dx(e)}}function p5(e){var t=new uu(ux($j(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function $j(e){var t=e._i,n=e._f;return e._locale=e._locale||Ks(e._l),t===null||n===void 0&&t===""?_h({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Dr(t)?new uu(ux(t)):(cu(t)?e._d=t:Or(n)?h5(e):n?fx(e):g5(e),Xv(e)||(e._d=null),e))}function g5(e){var t=e._i;Nn(t)?e._d=new Date(Se.now()):cu(t)?e._d=new Date(t.valueOf()):typeof t=="string"?c5(e):Or(t)?(e._a=vj(t.slice(0),function(n){return parseInt(n,10)}),dx(e)):si(t)?m5(e):Fs(t)?e._d=new Date(t):Se.createFromInputFallback(e)}function Uj(e,t,n,r,s){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(si(e)&&qv(e)||Or(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=n,o._i=e,o._f=t,o._strict=r,p5(o)}function Ct(e,t,n,r){return Uj(e,t,n,r,!1)}var y5=mr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_h()}),v5=mr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_h()});function Vj(e,t){var n,r;if(t.length===1&&Or(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function x5(){var e=[].slice.call(arguments,0);return Vj("isBefore",e)}function w5(){var e=[].slice.call(arguments,0);return Vj("isAfter",e)}var b5=function(){return Date.now?Date.now():+new Date},jl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function _5(e){var t,n=!1,r,s=jl.length;for(t in e)if(dt(e,t)&&!($t.call(jl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<s;++r)if(e[jl[r]]){if(n)return!1;parseFloat(e[jl[r]])!==rt(e[jl[r]])&&(n=!0)}return!0}function S5(){return this._isValid}function k5(){return zr(NaN)}function Ph(e){var t=tx(e),n=t.year||0,r=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=_5(t),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=Ks(),this._bubble()}function Sd(e){return e instanceof Ph}function Ng(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function C5(e,t,n){var r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<r;i++)rt(e[i])!==rt(t[i])&&o++;return o+s}function Bj(e,t){Le(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+is(~~(n/60),2)+t+is(~~n%60,2)})}Bj("Z",":");Bj("ZZ","");Ee("Z",Eh);Ee("ZZ",Eh);vt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=hx(Eh,e)});var j5=/([\+\-]|\d\d)/gi;function hx(e,t){var n=(t||"").match(e),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(j5)||["-",0,0],o=+(s[1]*60)+rt(s[2]),o===0?0:s[0]==="+"?o:-o)}function mx(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Dr(e)||cu(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Se.updateOffset(n,!1),n):Ct(e).local()}function Tg(e){return-Math.round(e._d.getTimezoneOffset())}Se.updateOffset=function(){};function E5(e,t,n){var r=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=hx(Eh,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=Tg(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==e&&(!t||this._changeInProgress?Yj(this,zr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Se.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Tg(this)}function N5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function T5(e){return this.utcOffset(0,e)}function P5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Tg(this),"m")),this}function R5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=hx(q4,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function A5(e){return this.isValid()?(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function O5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function D5(){if(!Nn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Qv(e,this),e=$j(e),e._a?(t=e._isUTC?cs(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&C5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function I5(){return this.isValid()?!this._isUTC:!1}function M5(){return this.isValid()?this._isUTC:!1}function Wj(){return this.isValid()?this._isUTC&&this._offset===0:!1}var L5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,z5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zr(e,t){var n=e,r=null,s,o,i;return Sd(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Fs(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=L5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:rt(r[Zr])*s,h:rt(r[Xt])*s,m:rt(r[Cr])*s,s:rt(r[Es])*s,ms:rt(Ng(r[Qo]*1e3))*s}):(r=z5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Uo(r[2],s),M:Uo(r[3],s),w:Uo(r[4],s),d:Uo(r[5],s),h:Uo(r[6],s),m:Uo(r[7],s),s:Uo(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=F5(Ct(n.from),Ct(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Ph(n),Sd(e)&&dt(e,"_locale")&&(o._locale=e._locale),Sd(e)&&dt(e,"_isValid")&&(o._isValid=e._isValid),o}zr.fn=Ph.prototype;zr.invalid=k5;function Uo(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ob(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function F5(e,t){var n;return e.isValid()&&t.isValid()?(t=mx(t,e),e.isBefore(t)?n=Ob(e,t):(n=Ob(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Hj(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(wj(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),s=zr(n,r),Yj(this,s,e),this}}function Yj(e,t,n,r){var s=t._milliseconds,o=Ng(t._days),i=Ng(t._months);e.isValid()&&(r=r??!0,i&&Pj(e,Ec(e,"Month")+i*n),o&&Ej(e,"Date",Ec(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&Se.updateOffset(e,o||i))}var $5=Hj(1,"add"),U5=Hj(-1,"subtract");function Kj(e){return typeof e=="string"||e instanceof String}function V5(e){return Dr(e)||cu(e)||Kj(e)||Fs(e)||W5(e)||B5(e)||e===null||e===void 0}function B5(e){var t=si(e)&&!qv(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=r.length;for(s=0;s<i;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function W5(e){var t=Or(e),n=!1;return t&&(n=e.filter(function(r){return!Fs(r)&&Kj(e)}).length===0),t&&n}function H5(e){var t=si(e)&&!qv(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<r.length;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function Y5(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function K5(e,t){arguments.length===1&&(arguments[0]?V5(arguments[0])?(e=arguments[0],t=void 0):H5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ct(),r=mx(n,this).startOf("day"),s=Se.calendarFormat(this,r)||"sameElse",o=t&&(us(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,Ct(n)))}function G5(){return new uu(this)}function Z5(e,t){var n=Dr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=pr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function q5(e,t){var n=Dr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=pr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function X5(e,t,n,r){var s=Dr(e)?e:Ct(e),o=Dr(t)?t:Ct(t);return this.isValid()&&s.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function Q5(e,t){var n=Dr(e)?e:Ct(e),r;return this.isValid()&&n.isValid()?(t=pr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function J5(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function e6(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function t6(e,t,n){var r,s,o;if(!this.isValid())return NaN;if(r=mx(e,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,t=pr(t),t){case"year":o=kd(this,r)/12;break;case"month":o=kd(this,r);break;case"quarter":o=kd(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-s)/864e5;break;case"week":o=(this-r-s)/6048e5;break;default:o=this-r}return n?o:ir(o)}function kd(e,t){if(e.date()<t.date())return-kd(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),s,o;return t-r<0?(s=e.clone().add(n-1,"months"),o=(t-r)/(r-s)):(s=e.clone().add(n+1,"months"),o=(t-r)/(s-r)),-(n+o)||0}Se.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Se.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function n6(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function r6(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?_d(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):us(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_d(n,"Z")):_d(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function s6(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function o6(e){e||(e=this.isUtc()?Se.defaultFormatUtc:Se.defaultFormat);var t=_d(this,e);return this.localeData().postformat(t)}function i6(e,t){return this.isValid()&&(Dr(e)&&e.isValid()||Ct(e).isValid())?zr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function a6(e){return this.from(Ct(),e)}function l6(e,t){return this.isValid()&&(Dr(e)&&e.isValid()||Ct(e).isValid())?zr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function c6(e){return this.to(Ct(),e)}function Gj(e){var t;return e===void 0?this._locale._abbr:(t=Ks(e),t!=null&&(this._locale=t),this)}var Zj=mr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function qj(){return this._locale}var ff=1e3,ka=60*ff,hf=60*ka,Xj=(365*400+97)*24*hf;function Ca(e,t){return(e%t+t)%t}function Qj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Xj:new Date(e,t,n).valueOf()}function Jj(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Xj:Date.UTC(e,t,n)}function u6(e){var t,n;if(e=pr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Jj:Qj,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ca(t+(this._isUTC?0:this.utcOffset()*ka),hf);break;case"minute":t=this._d.valueOf(),t-=Ca(t,ka);break;case"second":t=this._d.valueOf(),t-=Ca(t,ff);break}return this._d.setTime(t),Se.updateOffset(this,!0),this}function d6(e){var t,n;if(e=pr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Jj:Qj,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=hf-Ca(t+(this._isUTC?0:this.utcOffset()*ka),hf)-1;break;case"minute":t=this._d.valueOf(),t+=ka-Ca(t,ka)-1;break;case"second":t=this._d.valueOf(),t+=ff-Ca(t,ff)-1;break}return this._d.setTime(t),Se.updateOffset(this,!0),this}function f6(){return this._d.valueOf()-(this._offset||0)*6e4}function h6(){return Math.floor(this.valueOf()/1e3)}function m6(){return new Date(this.valueOf())}function p6(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function g6(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function y6(){return this.isValid()?this.toISOString():null}function v6(){return Xv(this)}function x6(){return fo({},Qe(this))}function w6(){return Qe(this).overflow}function b6(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Le("N",0,0,"eraAbbr");Le("NN",0,0,"eraAbbr");Le("NNN",0,0,"eraAbbr");Le("NNNN",0,0,"eraName");Le("NNNNN",0,0,"eraNarrow");Le("y",["y",1],"yo","eraYear");Le("y",["yy",2],0,"eraYear");Le("y",["yyy",3],0,"eraYear");Le("y",["yyyy",4],0,"eraYear");Ee("N",px);Ee("NN",px);Ee("NNN",px);Ee("NNNN",A6);Ee("NNNNN",O6);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Qe(n).era=s:Qe(n).invalidEra=e});Ee("y",sl);Ee("yy",sl);Ee("yyy",sl);Ee("yyyy",sl);Ee("yo",D6);vt(["y","yy","yyy","yyyy"],pn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pn]=n._locale.eraYearOrdinalParse(e,s):t[pn]=parseInt(e,10)});function _6(e,t){var n,r,s,o=this._eras||Ks("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=Se(o[n].since).startOf("day"),o[n].since=s.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=Se(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function S6(e,t,n){var r,s,o=this.eras(),i,a,c;for(e=e.toUpperCase(),r=0,s=o.length;r<s;++r)if(i=o[r].name.toUpperCase(),a=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[r];break;case"NNNN":if(i===e)return o[r];break;case"NNNNN":if(c===e)return o[r];break}else if([i,a,c].indexOf(e)>=0)return o[r]}function k6(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Se(e.since).year():Se(e.since).year()+(t-e.offset)*n}function C6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function j6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function E6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function N6(){var e,t,n,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-Se(s[e].since).year())*n+s[e].offset;return this.year()}function T6(e){return dt(this,"_erasNameRegex")||gx.call(this),e?this._erasNameRegex:this._erasRegex}function P6(e){return dt(this,"_erasAbbrRegex")||gx.call(this),e?this._erasAbbrRegex:this._erasRegex}function R6(e){return dt(this,"_erasNarrowRegex")||gx.call(this),e?this._erasNarrowRegex:this._erasRegex}function px(e,t){return t.erasAbbrRegex(e)}function A6(e,t){return t.erasNameRegex(e)}function O6(e,t){return t.erasNarrowRegex(e)}function D6(e,t){return t._eraYearOrdinalRegex||sl}function gx(){var e=[],t=[],n=[],r=[],s,o,i,a,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=Ps(u[s].name),a=Ps(u[s].abbr),c=Ps(u[s].narrow),t.push(i),e.push(a),n.push(c),r.push(i),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Le(0,["gg",2],0,function(){return this.weekYear()%100});Le(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Rh(e,t){Le(0,[e,e.length],0,t)}Rh("gggg","weekYear");Rh("ggggg","weekYear");Rh("GGGG","isoWeekYear");Rh("GGGGG","isoWeekYear");Ee("G",jh);Ee("g",jh);Ee("GG",jt,tr);Ee("gg",jt,tr);Ee("GGGG",rx,nx);Ee("gggg",rx,nx);Ee("GGGGG",Ch,Sh);Ee("ggggg",Ch,Sh);fu(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=rt(e)});fu(["gg","GG"],function(e,t,n,r){t[r]=Se.parseTwoDigitYear(e)});function I6(e){return eE.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function M6(e){return eE.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function L6(){return Rs(this.year(),1,4)}function z6(){return Rs(this.isoWeekYear(),1,4)}function F6(){var e=this.localeData()._week;return Rs(this.year(),e.dow,e.doy)}function $6(){var e=this.localeData()._week;return Rs(this.weekYear(),e.dow,e.doy)}function eE(e,t,n,r,s){var o;return e==null?Tc(this,r,s).year:(o=Rs(e,r,s),t>o&&(t=o),U6.call(this,e,t,n,r,s))}function U6(e,t,n,r,s){var o=Oj(e,t,n,r,s),i=Nc(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Le("Q",0,"Qo","quarter");Ee("Q",_j);vt("Q",function(e,t){t[js]=(rt(e)-1)*3});function V6(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Le("D",["DD",2],"Do","date");Ee("D",jt,ol);Ee("DD",jt,tr);Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Zr);vt("Do",function(e,t){t[Zr]=rt(e.match(jt)[0])});var tE=il("Date",!0);Le("DDD",["DDDD",3],"DDDo","dayOfYear");Ee("DDD",kh);Ee("DDDD",Sj);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=rt(e)});function B6(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Le("m",["mm",2],0,"minute");Ee("m",jt,sx);Ee("mm",jt,tr);vt(["m","mm"],Cr);var W6=il("Minutes",!1);Le("s",["ss",2],0,"second");Ee("s",jt,sx);Ee("ss",jt,tr);vt(["s","ss"],Es);var H6=il("Seconds",!1);Le("S",0,0,function(){return~~(this.millisecond()/100)});Le(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Le(0,["SSS",3],0,"millisecond");Le(0,["SSSS",4],0,function(){return this.millisecond()*10});Le(0,["SSSSS",5],0,function(){return this.millisecond()*100});Le(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Le(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Le(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Le(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ee("S",kh,_j);Ee("SS",kh,tr);Ee("SSS",kh,Sj);var ho,nE;for(ho="SSSS";ho.length<=9;ho+="S")Ee(ho,sl);function Y6(e,t){t[Qo]=rt(("0."+e)*1e3)}for(ho="S";ho.length<=9;ho+="S")vt(ho,Y6);nE=il("Milliseconds",!1);Le("z",0,0,"zoneAbbr");Le("zz",0,0,"zoneName");function K6(){return this._isUTC?"UTC":""}function G6(){return this._isUTC?"Coordinated Universal Time":""}var ce=uu.prototype;ce.add=$5;ce.calendar=K5;ce.clone=G5;ce.diff=t6;ce.endOf=d6;ce.format=o6;ce.from=i6;ce.fromNow=a6;ce.to=l6;ce.toNow=c6;ce.get=s3;ce.invalidAt=w6;ce.isAfter=Z5;ce.isBefore=q5;ce.isBetween=X5;ce.isSame=Q5;ce.isSameOrAfter=J5;ce.isSameOrBefore=e6;ce.isValid=v6;ce.lang=Zj;ce.locale=Gj;ce.localeData=qj;ce.max=v5;ce.min=y5;ce.parsingFlags=x6;ce.set=o3;ce.startOf=u6;ce.subtract=U5;ce.toArray=p6;ce.toObject=g6;ce.toDate=m6;ce.toISOString=r6;ce.inspect=s6;typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ce.toJSON=y6;ce.toString=n6;ce.unix=h6;ce.valueOf=f6;ce.creationData=b6;ce.eraName=C6;ce.eraNarrow=j6;ce.eraAbbr=E6;ce.eraYear=N6;ce.year=jj;ce.isLeapYear=r3;ce.weekYear=I6;ce.isoWeekYear=M6;ce.quarter=ce.quarters=V6;ce.month=Rj;ce.daysInMonth=m3;ce.week=ce.weeks=_3;ce.isoWeek=ce.isoWeeks=S3;ce.weeksInYear=F6;ce.weeksInWeekYear=$6;ce.isoWeeksInYear=L6;ce.isoWeeksInISOWeekYear=z6;ce.date=tE;ce.day=ce.days=M3;ce.weekday=L3;ce.isoWeekday=z3;ce.dayOfYear=B6;ce.hour=ce.hours=H3;ce.minute=ce.minutes=W6;ce.second=ce.seconds=H6;ce.millisecond=ce.milliseconds=nE;ce.utcOffset=E5;ce.utc=T5;ce.local=P5;ce.parseZone=R5;ce.hasAlignedHourOffset=A5;ce.isDST=O5;ce.isLocal=I5;ce.isUtcOffset=M5;ce.isUtc=Wj;ce.isUTC=Wj;ce.zoneAbbr=K6;ce.zoneName=G6;ce.dates=mr("dates accessor is deprecated. Use date instead.",tE);ce.months=mr("months accessor is deprecated. Use month instead",Rj);ce.years=mr("years accessor is deprecated. Use year instead",jj);ce.zone=mr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",N5);ce.isDSTShifted=mr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",D5);function Z6(e){return Ct(e*1e3)}function q6(){return Ct.apply(null,arguments).parseZone()}function rE(e){return e}var ft=Jv.prototype;ft.calendar=I4;ft.longDateFormat=F4;ft.invalidDate=U4;ft.ordinal=W4;ft.preparse=rE;ft.postformat=rE;ft.relativeTime=Y4;ft.pastFuture=K4;ft.set=O4;ft.eras=_6;ft.erasParse=S6;ft.erasConvertYear=k6;ft.erasAbbrRegex=P6;ft.erasNameRegex=T6;ft.erasNarrowRegex=R6;ft.months=u3;ft.monthsShort=d3;ft.monthsParse=h3;ft.monthsRegex=g3;ft.monthsShortRegex=p3;ft.week=v3;ft.firstDayOfYear=b3;ft.firstDayOfWeek=w3;ft.weekdays=R3;ft.weekdaysMin=O3;ft.weekdaysShort=A3;ft.weekdaysParse=I3;ft.weekdaysRegex=F3;ft.weekdaysShortRegex=$3;ft.weekdaysMinRegex=U3;ft.isPM=B3;ft.meridiem=Y3;function mf(e,t,n,r){var s=Ks(),o=cs().set(r,t);return s[n](o,e)}function sE(e,t,n){if(Fs(e)&&(t=e,e=void 0),e=e||"",t!=null)return mf(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=mf(e,r,n,"month");return s}function yx(e,t,n,r){typeof e=="boolean"?(Fs(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Fs(t)&&(n=t,t=void 0),t=t||"");var s=Ks(),o=e?s._week.dow:0,i,a=[];if(n!=null)return mf(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=mf(t,(i+o)%7,r,"day");return a}function X6(e,t){return sE(e,t,"months")}function Q6(e,t){return sE(e,t,"monthsShort")}function J6(e,t,n){return yx(e,t,n,"weekdays")}function e$(e,t,n){return yx(e,t,n,"weekdaysShort")}function t$(e,t,n){return yx(e,t,n,"weekdaysMin")}So("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Se.lang=mr("moment.lang is deprecated. Use moment.locale instead.",So);Se.langData=mr("moment.langData is deprecated. Use moment.localeData instead.",Ks);var ys=Math.abs;function n$(){var e=this._data;return this._milliseconds=ys(this._milliseconds),this._days=ys(this._days),this._months=ys(this._months),e.milliseconds=ys(e.milliseconds),e.seconds=ys(e.seconds),e.minutes=ys(e.minutes),e.hours=ys(e.hours),e.months=ys(e.months),e.years=ys(e.years),this}function oE(e,t,n,r){var s=zr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function r$(e,t){return oE(this,e,t,1)}function s$(e,t){return oE(this,e,t,-1)}function Db(e){return e<0?Math.floor(e):Math.ceil(e)}function o$(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Db(Pg(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=ir(e/1e3),r.seconds=s%60,o=ir(s/60),r.minutes=o%60,i=ir(o/60),r.hours=i%24,t+=ir(i/24),c=ir(iE(t)),n+=c,t-=Db(Pg(c)),a=ir(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function iE(e){return e*4800/146097}function Pg(e){return e*146097/4800}function i$(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=pr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+iE(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Pg(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Gs(e){return function(){return this.as(e)}}var aE=Gs("ms"),a$=Gs("s"),l$=Gs("m"),c$=Gs("h"),u$=Gs("d"),d$=Gs("w"),f$=Gs("M"),h$=Gs("Q"),m$=Gs("y"),p$=aE;function g$(){return zr(this)}function y$(e){return e=pr(e),this.isValid()?this[e+"s"]():NaN}function Ti(e){return function(){return this.isValid()?this._data[e]:NaN}}var v$=Ti("milliseconds"),x$=Ti("seconds"),w$=Ti("minutes"),b$=Ti("hours"),_$=Ti("days"),S$=Ti("months"),k$=Ti("years");function C$(){return ir(this.days()/7)}var bs=Math.round,ua={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function j$(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function E$(e,t,n,r){var s=zr(e).abs(),o=bs(s.as("s")),i=bs(s.as("m")),a=bs(s.as("h")),c=bs(s.as("d")),u=bs(s.as("M")),d=bs(s.as("w")),f=bs(s.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||i<=1&&["m"]||i<n.m&&["mm",i]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=r,j$.apply(null,h)}function N$(e){return e===void 0?bs:typeof e=="function"?(bs=e,!0):!1}function T$(e,t){return ua[e]===void 0?!1:t===void 0?ua[e]:(ua[e]=t,e==="s"&&(ua.ss=t-1),!0)}function P$(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ua,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ua,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=E$(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var rp=Math.abs;function Bi(e){return(e>0)-(e<0)||+e}function Ah(){if(!this.isValid())return this.localeData().invalidDate();var e=rp(this._milliseconds)/1e3,t=rp(this._days),n=rp(this._months),r,s,o,i,a=this.asSeconds(),c,u,d,f;return a?(r=ir(e/60),s=ir(r/60),e%=60,r%=60,o=ir(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Bi(this._months)!==Bi(a)?"-":"",d=Bi(this._days)!==Bi(a)?"-":"",f=Bi(this._milliseconds)!==Bi(a)?"-":"",c+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var lt=Ph.prototype;lt.isValid=S5;lt.abs=n$;lt.add=r$;lt.subtract=s$;lt.as=i$;lt.asMilliseconds=aE;lt.asSeconds=a$;lt.asMinutes=l$;lt.asHours=c$;lt.asDays=u$;lt.asWeeks=d$;lt.asMonths=f$;lt.asQuarters=h$;lt.asYears=m$;lt.valueOf=p$;lt._bubble=o$;lt.clone=g$;lt.get=y$;lt.milliseconds=v$;lt.seconds=x$;lt.minutes=w$;lt.hours=b$;lt.days=_$;lt.weeks=C$;lt.months=S$;lt.years=k$;lt.humanize=P$;lt.toISOString=Ah;lt.toString=Ah;lt.toJSON=Ah;lt.locale=Gj;lt.localeData=qj;lt.toIsoString=mr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ah);lt.lang=Zj;Le("X",0,0,"unix");Le("x",0,0,"valueOf");Ee("x",jh);Ee("X",X4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(rt(e))});//! moment.js +Se.version="2.30.1";R4(Ct);Se.fn=ce;Se.min=x5;Se.max=w5;Se.now=b5;Se.utc=cs;Se.unix=Z6;Se.months=X6;Se.isDate=cu;Se.locale=So;Se.invalid=_h;Se.duration=zr;Se.isMoment=Dr;Se.weekdays=J6;Se.parseZone=q6;Se.localeData=Ks;Se.isDuration=Sd;Se.monthsShort=Q6;Se.weekdaysMin=t$;Se.defineLocale=cx;Se.updateLocale=q3;Se.locales=X3;Se.weekdaysShort=e$;Se.normalizeUnits=pr;Se.relativeTimeRounding=N$;Se.relativeTimeThreshold=T$;Se.calendarFormat=Y5;Se.prototype=ce;Se.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const R$=async()=>await ot().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Fr=async e=>e.id?await ot().collection("access").update(e.id,e):await ot().collection("access").create(e),A$=async e=>(e.deleted=Se.utc().format("YYYY-MM-DD HH:mm:ss"),await ot().collection("access").update(e.id,e)),Ib=async()=>await ot().collection("access_groups").getFullList({sort:"-created",expand:"access"}),O$=async e=>{const t=ot();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},D$=async e=>{const t=ot();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Mb=async e=>await ot().collection("access_groups").update(e.id,e),I$=async()=>{try{return await ot().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},vx=async e=>{try{return await ot().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},al=async e=>{const t=ot();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},M$=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},lE=g.createContext({}),tn=()=>g.useContext(lE),L$=({children:e})=>{const[t,n]=g.useReducer(M$,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});g.useEffect(()=>{(async()=>{const d=await R$();n({type:"SET_ACCESSES",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await I$();n({type:"SET_EMAILS",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await Ib();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=g.useCallback(async()=>{const u=await Ib();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=g.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=g.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=g.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=g.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=g.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(lE.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})};var z$="Separator",Lb="horizontal",F$=["horizontal","vertical"],cE=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=Lb,...s}=e,o=$$(r)?r:Lb,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(Te.div,{"data-orientation":o,...a,...s,ref:t})});cE.displayName=z$;function $$(e){return F$.includes(e)}var uE=cE;const _r=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(uE,{ref:s,decorative:n,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));_r.displayName=uE.displayName;const U$="Certimate v0.2.2",dE=()=>{const{t:e}=Ye();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(lI,{size:16}),l.jsx("div",{className:"ml-1",children:e("common.menu.document")})]}),l.jsx(_r,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:U$})]})]})};function V$(){const e=er(),t=Mr(),{t:n}=Ye();if(!ot().authStore.isValid||!ot().authStore.isAdmin)return l.jsx(JS,{to:"/login"});const r=t.pathname,s=a=>a==r?"bg-muted text-primary":"text-muted-foreground",o=()=>{ot().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(L$,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(wn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(wn,{to:"/",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(Qw,{className:"h-4 w-4"}),n("dashboard.page.title")]}),l.jsxs(wn,{to:"/domains",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx(pg,{className:"h-4 w-4"}),n("domain.page.title")]}),l.jsxs(wn,{to:"/access",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(Jw,{className:"h-4 w-4"}),n("access.page.title")]}),l.jsxs(wn,{to:"/history",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(Xw,{className:"h-4 w-4"}),n("history.page.title")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsxs(De,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(wI,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(bh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(wn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(wn,{to:"/",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(Qw,{className:"h-5 w-5"}),n("dashboard.page.title")]}),l.jsxs(wn,{to:"/domains",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx(pg,{className:"h-5 w-5"}),n("domain.page.title")]}),l.jsxs(wn,{to:"/access",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(Jw,{className:"h-5 w-5"}),n("access.page.title")]}),l.jsxs(wn,{to:"/history",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(Xw,{className:"h-5 w-5"}),n("history.page.title")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(t4,{}),l.jsx(XF,{}),l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(De,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(hI,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(xh,{align:"end",children:[l.jsx(ri,{onClick:i,children:n("common.menu.settings")}),l.jsx(ri,{onClick:o,children:n("common.menu.logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(nv,{}),l.jsx(dE,{})]})]})]})})})}var B$="VisuallyHidden",hu=g.forwardRef((e,t)=>l.jsx(Te.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));hu.displayName=B$;var W$=hu,[Oh,g9]=un("Tooltip",[nl]),Dh=nl(),fE="TooltipProvider",H$=700,Rg="tooltip.open",[Y$,xx]=Oh(fE),wx=e=>{const{__scopeTooltip:t,delayDuration:n=H$,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(Y$,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};wx.displayName=fE;var Ih="Tooltip",[K$,Mh]=Oh(Ih),hE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=xx(Ih,e.__scopeTooltip),u=Dh(t),[d,f]=g.useState(null),h=Mn(),m=g.useRef(0),x=i??c.disableHoverableContent,p=a??c.delayDuration,w=g.useRef(!1),[y=!1,v]=Ln({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Rg))):c.onClose(),o==null||o(T)}}),b=g.useMemo(()=>y?w.current?"delayed-open":"instant-open":"closed",[y]),_=g.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,v(!0)},[v]),C=g.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),j=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,v(!0)},p)},[p,v]);return g.useEffect(()=>()=>window.clearTimeout(m.current),[]),l.jsx(bv,{...u,children:l.jsx(K$,{scope:t,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:g.useCallback(()=>{x?C():window.clearTimeout(m.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};hE.displayName=Ih;var Ag="TooltipTrigger",mE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Mh(Ag,n),o=xx(Ag,n),i=Dh(n),a=g.useRef(null),c=Ke(t,a,s.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(_v,{asChild:!0,...i,children:l.jsx(Te.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});mE.displayName=Ag;var G$="TooltipPortal",[y9,Z$]=Oh(G$,{forceMount:void 0}),La="TooltipContent",bx=g.forwardRef((e,t)=>{const n=Z$(La,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Mh(La,e.__scopeTooltip);return l.jsx(dn,{present:r||i.open,children:i.disableHoverableContent?l.jsx(pE,{side:s,...o,ref:t}):l.jsx(q$,{side:s,...o,ref:t})})}),q$=g.forwardRef((e,t)=>{const n=Mh(La,e.__scopeTooltip),r=xx(La,e.__scopeTooltip),s=g.useRef(null),o=Ke(t,s),[i,a]=g.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=g.useCallback(()=>{a(null),f(!1)},[f]),m=g.useCallback((x,p)=>{const w=x.currentTarget,y={x:x.clientX,y:x.clientY},v=eU(y,w.getBoundingClientRect()),b=tU(y,v),_=nU(p.getBoundingClientRect()),C=sU([...b,..._]);a(C),f(!0)},[f]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const x=w=>m(w,d),p=w=>m(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),g.useEffect(()=>{if(i){const x=p=>{const w=p.target,y={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!rU(y,i);v?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),l.jsx(pE,{...e,ref:o})}),[X$,Q$]=Oh(Ih,{isInside:!1}),pE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=Mh(La,n),u=Dh(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(Rg,d),()=>document.removeEventListener(Rg,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Sv,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(lv,{children:r}),l.jsx(X$,{scope:n,isInside:!0,children:l.jsx(W$,{id:c.contentId,role:"tooltip",children:s||r})})]})})});bx.displayName=La;var gE="TooltipArrow",J$=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Dh(n);return Q$(gE,n).isInside?null:l.jsx(kv,{...s,...r,ref:t})});J$.displayName=gE;function eU(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function tU(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function nU(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function rU(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function sU(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),oU(t)}function oU(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var iU=wx,aU=hE,lU=mE,yE=bx;const dr=({when:e,children:t,fallback:n})=>e?t:n,_x=({phase:e,phaseSuccess:t})=>{const{t:n}=Ye();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:re("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("history.props.stage.progress.check")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("history.props.stage.progress.apply")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("history.props.stage.progress.deploy")})]})},cU=iU,vE=aU,xE=lU,wE=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(yE,{ref:r,sideOffset:t,className:re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));wE.displayName=yE.displayName;const Sx=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(fI,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(cU,{children:l.jsxs(vE,{children:[l.jsx(xE,{asChild:!0,className:"cursor-pointer",children:l.jsx(Zw,{size:16,className:"text-red-700"})}),l.jsx(wE,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(Zw,{size:16,className:"text-red-700"})})})},bE=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:re("mx-auto flex w-full justify-center",e),...t});bE.displayName="Pagination";const _E=g.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:re("flex flex-row items-center gap-1",e),...t}));_E.displayName="PaginationContent";const Og=g.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("",e),...t}));Og.displayName="PaginationItem";const SE=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:re(uh({variant:t?"outline":"ghost",size:n}),e),...r});SE.displayName="PaginationLink";const kE=({className:e,...t})=>{const{t:n}=Ye();return l.jsxs("span",{"aria-hidden":!0,className:re("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(mI,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:n("common.pagination.more")})]})};kE.displayName="PaginationEllipsis";const CE=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=o(d,f),t>3&&u.unshift("..."),t<h-1&&u.push("..."),u.unshift(1),u.push(e),u}return o(1,e)},o=(a,c,u=1)=>{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return l.jsx(l.Fragment,{children:l.jsx(bE,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(_E,{children:i.map((a,c)=>a==="..."?l.jsx(Og,{children:l.jsx(kE,{})},c):l.jsx(Og,{children:l.jsx(SE,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})};var jE="AlertDialog",[uU,v9]=un(jE,[qC]),Zs=qC(),EE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Vv,{...r,...n,modal:!0})};EE.displayName=jE;var dU="AlertDialogTrigger",NE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(Bv,{...s,...r,ref:t})});NE.displayName=dU;var fU="AlertDialogPortal",TE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Wv,{...r,...n})};TE.displayName=fU;var hU="AlertDialogOverlay",PE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(ou,{...s,...r,ref:t})});PE.displayName=hU;var ja="AlertDialogContent",[mU,pU]=uU(ja),RE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=Zs(n),i=g.useRef(null),a=Ke(t,i),c=g.useRef(null);return l.jsx(a4,{contentName:ja,titleName:AE,docsSlug:"alert-dialog",children:l.jsx(mU,{scope:n,cancelRef:c,children:l.jsxs(iu,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(lv,{children:r}),l.jsx(yU,{contentRef:i})]})})})});RE.displayName=ja;var AE="AlertDialogTitle",OE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(au,{...s,...r,ref:t})});OE.displayName=AE;var DE="AlertDialogDescription",IE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(lu,{...s,...r,ref:t})});IE.displayName=DE;var gU="AlertDialogAction",ME=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(wh,{...s,...r,ref:t})});ME.displayName=gU;var LE="AlertDialogCancel",zE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=pU(LE,n),o=Zs(n),i=Ke(t,s);return l.jsx(wh,{...o,...r,ref:i})});zE.displayName=LE;var yU=({contentRef:e})=>{const t=`\`${ja}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${ja}\` by passing a \`${DE}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ja}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},vU=EE,xU=NE,wU=TE,FE=PE,$E=RE,UE=ME,VE=zE,BE=OE,WE=IE;const kx=vU,Cx=xU,bU=wU,HE=g.forwardRef(({className:e,...t},n)=>l.jsx(FE,{className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));HE.displayName=FE.displayName;const Lh=g.forwardRef(({className:e,...t},n)=>l.jsxs(bU,{children:[l.jsx(HE,{}),l.jsx($E,{ref:n,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Lh.displayName=$E.displayName;const zh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});zh.displayName="AlertDialogHeader";const Fh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fh.displayName="AlertDialogFooter";const $h=g.forwardRef(({className:e,...t},n)=>l.jsx(BE,{ref:n,className:re("text-lg font-semibold",e),...t}));$h.displayName=BE.displayName;const Uh=g.forwardRef(({className:e,...t},n)=>l.jsx(WE,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));Uh.displayName=WE.displayName;const Vh=g.forwardRef(({className:e,...t},n)=>l.jsx(UE,{ref:n,className:re(uh(),e),...t}));Vh.displayName=UE.displayName;const Bh=g.forwardRef(({className:e,...t},n)=>l.jsx(VE,{ref:n,className:re(uh({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Bh.displayName=VE.displayName;function jx(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ex="Switch",[_U,x9]=un(Ex),[SU,kU]=_U(Ex),YE=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:c="on",onCheckedChange:u,...d}=e,[f,h]=g.useState(null),m=Ke(t,v=>h(v)),x=g.useRef(!1),p=f?!!f.closest("form"):!0,[w=!1,y]=Ln({prop:s,defaultProp:o,onChange:u});return l.jsxs(SU,{scope:n,checked:w,disabled:a,children:[l.jsx(Te.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":ZE(w),"data-disabled":a?"":void 0,disabled:a,value:c,...d,ref:m,onClick:ue(e.onClick,v=>{y(b=>!b),p&&(x.current=v.isPropagationStopped(),x.current||v.stopPropagation())})}),p&&l.jsx(CU,{control:f,bubbles:!x.current,name:r,value:c,checked:w,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});YE.displayName=Ex;var KE="SwitchThumb",GE=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=kU(KE,n);return l.jsx(Te.span,{"data-state":ZE(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});GE.displayName=KE;var CU=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=g.useRef(null),i=jx(n),a=vv(t);return g.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ZE(e){return e?"checked":"unchecked"}var qE=YE,jU=GE;const mu=g.forwardRef(({className:e,...t},n)=>l.jsx(qE,{className:re("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(jU,{className:re("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));mu.displayName=qE.displayName;var Nx="ToastProvider",[Tx,EU,NU]=eu("Toast"),[XE,w9]=un("Toast",[NU]),[TU,Wh]=XE(Nx),QE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,c]=g.useState(null),[u,d]=g.useState(0),f=g.useRef(!1),h=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nx}\`. Expected non-empty \`string\`.`),l.jsx(Tx.Provider,{scope:t,children:l.jsx(TU,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:g.useCallback(()=>d(m=>m+1),[]),onToastRemove:g.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};QE.displayName=Nx;var JE="ToastViewport",PU=["F8"],Dg="toast.viewportPause",Ig="toast.viewportResume",eN=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=PU,label:s="Notifications ({hotkey})",...o}=e,i=Wh(JE,n),a=EU(n),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),f=g.useRef(null),h=Ke(t,f,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;g.useEffect(()=>{const w=y=>{var b;r.every(_=>y[_]||y.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),g.useEffect(()=>{const w=c.current,y=f.current;if(x&&w&&y){const v=()=>{if(!i.isClosePausedRef.current){const j=new CustomEvent(Dg);y.dispatchEvent(j),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const j=new CustomEvent(Ig);y.dispatchEvent(j),i.isClosePausedRef.current=!1}},_=j=>{!w.contains(j.relatedTarget)&&b()},C=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",v),w.addEventListener("focusout",_),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",C),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[x,i.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:w})=>{const v=a().map(b=>{const _=b.ref.current,C=[_,...BU(_)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const w=f.current;if(w){const y=v=>{var C,j,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const R=document.activeElement,A=v.shiftKey;if(v.target===w&&A){(C=u.current)==null||C.focus();return}const N=p({tabbingDirection:A?"backwards":"forwards"}),z=N.findIndex(S=>S===R);sp(N.slice(z+1))?v.preventDefault():A?(j=u.current)==null||j.focus():(T=d.current)==null||T.focus()}};return w.addEventListener("keydown",y),()=>w.removeEventListener("keydown",y)}},[a,p]),l.jsxs(SM,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&l.jsx(Mg,{ref:u,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"forwards"});sp(w)}}),l.jsx(Tx.Slot,{scope:n,children:l.jsx(Te.ol,{tabIndex:-1,...o,ref:h})}),x&&l.jsx(Mg,{ref:d,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"backwards"});sp(w)}})]})});eN.displayName=JE;var tN="ToastFocusProxy",Mg=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Wh(tN,n);return l.jsx(hu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});Mg.displayName=tN;var Hh="Toast",RU="toast.swipeStart",AU="toast.swipeMove",OU="toast.swipeCancel",DU="toast.swipeEnd",nN=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,c]=Ln({prop:r,defaultProp:s,onChange:o});return l.jsx(dn,{present:n||a,children:l.jsx(LU,{open:a,...i,ref:t,onClose:()=>c(!1),onPause:Dt(e.onPause),onResume:Dt(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});nN.displayName=Hh;var[IU,MU]=XE(Hh,{onClose(){}}),LU=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...x}=e,p=Wh(Hh,n),[w,y]=g.useState(null),v=Ke(t,S=>y(S)),b=g.useRef(null),_=g.useRef(null),C=s||p.duration,j=g.useRef(0),T=g.useRef(C),R=g.useRef(0),{onToastAdd:A,onToastRemove:D}=p,G=Dt(()=>{var U;(w==null?void 0:w.contains(document.activeElement))&&((U=p.viewport)==null||U.focus()),i()}),N=g.useCallback(S=>{!S||S===1/0||(window.clearTimeout(R.current),j.current=new Date().getTime(),R.current=window.setTimeout(G,S))},[G]);g.useEffect(()=>{const S=p.viewport;if(S){const U=()=>{N(T.current),u==null||u()},J=()=>{const F=new Date().getTime()-j.current;T.current=T.current-F,window.clearTimeout(R.current),c==null||c()};return S.addEventListener(Dg,J),S.addEventListener(Ig,U),()=>{S.removeEventListener(Dg,J),S.removeEventListener(Ig,U)}}},[p.viewport,C,c,u,N]),g.useEffect(()=>{o&&!p.isClosePausedRef.current&&N(C)},[o,C,p.isClosePausedRef,N]),g.useEffect(()=>(A(),()=>D()),[A,D]);const z=g.useMemo(()=>w?cN(w):null,[w]);return p.viewport?l.jsxs(l.Fragment,{children:[z&&l.jsx(zU,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),l.jsx(IU,{scope:n,onClose:G,children:Bs.createPortal(l.jsx(Tx.ItemSlot,{scope:n,children:l.jsx(_M,{asChild:!0,onEscapeKeyDown:ue(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||G(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Te.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,S=>{S.key==="Escape"&&(a==null||a(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:ue(e.onPointerDown,S=>{S.button===0&&(b.current={x:S.clientX,y:S.clientY})}),onPointerMove:ue(e.onPointerMove,S=>{if(!b.current)return;const U=S.clientX-b.current.x,J=S.clientY-b.current.y,F=!!_.current,W=["left","right"].includes(p.swipeDirection),I=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,X=W?I(0,U):0,$=W?0:I(0,J),B=S.pointerType==="touch"?10:2,pe={x:X,y:$},se={originalEvent:S,delta:pe};F?(_.current=pe,ed(AU,f,se,{discrete:!1})):zb(pe,p.swipeDirection,B)?(_.current=pe,ed(RU,d,se,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs(U)>B||Math.abs(J)>B)&&(b.current=null)}),onPointerUp:ue(e.onPointerUp,S=>{const U=_.current,J=S.target;if(J.hasPointerCapture(S.pointerId)&&J.releasePointerCapture(S.pointerId),_.current=null,b.current=null,U){const F=S.currentTarget,W={originalEvent:S,delta:U};zb(U,p.swipeDirection,p.swipeThreshold)?ed(DU,m,W,{discrete:!0}):ed(OU,h,W,{discrete:!0}),F.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),zU=e=>{const{__scopeToast:t,children:n,...r}=e,s=Wh(Hh,t),[o,i]=g.useState(!1),[a,c]=g.useState(!1);return UU(()=>i(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx(nu,{asChild:!0,children:l.jsx(hu,{...r,children:o&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},FU="ToastTitle",rN=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Te.div,{...r,ref:t})});rN.displayName=FU;var $U="ToastDescription",sN=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Te.div,{...r,ref:t})});sN.displayName=$U;var oN="ToastAction",iN=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(lN,{altText:n,asChild:!0,children:l.jsx(Px,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${oN}\`. Expected non-empty \`string\`.`),null)});iN.displayName=oN;var aN="ToastClose",Px=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=MU(aN,n);return l.jsx(lN,{asChild:!0,children:l.jsx(Te.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,s.onClose)})})});Px.displayName=aN;var lN=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return l.jsx(Te.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function cN(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),VU(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...cN(r))}}),t}function ed(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?uv(s,o):s.dispatchEvent(o)}var zb=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function UU(e=()=>{}){const t=Dt(e);Bt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function VU(e){return e.nodeType===e.ELEMENT_NODE}function BU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function sp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var WU=QE,uN=eN,dN=nN,fN=rN,hN=sN,mN=iN,pN=Px;const HU=WU,gN=g.forwardRef(({className:e,...t},n)=>l.jsx(uN,{ref:n,className:re("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));gN.displayName=uN.displayName;const YU=Jc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),yN=g.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(dN,{ref:r,className:re(YU({variant:t}),e),...n}));yN.displayName=dN.displayName;const KU=g.forwardRef(({className:e,...t},n)=>l.jsx(mN,{ref:n,className:re("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));KU.displayName=mN.displayName;const vN=g.forwardRef(({className:e,...t},n)=>l.jsx(pN,{ref:n,className:re("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx(av,{className:"h-4 w-4"})}));vN.displayName=pN.displayName;const xN=g.forwardRef(({className:e,...t},n)=>l.jsx(fN,{ref:n,className:re("text-sm font-semibold",e),...t}));xN.displayName=fN.displayName;const wN=g.forwardRef(({className:e,...t},n)=>l.jsx(hN,{ref:n,className:re("text-sm opacity-90",e),...t}));wN.displayName=hN.displayName;const GU=1,ZU=1e6;let op=0;function qU(){return op=(op+1)%Number.MAX_SAFE_INTEGER,op.toString()}const ip=new Map,Fb=e=>{if(ip.has(e))return;const t=setTimeout(()=>{ip.delete(e),Jl({type:"REMOVE_TOAST",toastId:e})},ZU);ip.set(e,t)},XU=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,GU)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Fb(n):e.toasts.forEach(r=>{Fb(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Cd=[];let jd={toasts:[]};function Jl(e){jd=XU(jd,e),Cd.forEach(t=>{t(jd)})}function QU({...e}){const t=qU(),n=s=>Jl({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Jl({type:"DISMISS_TOAST",toastId:t});return Jl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function $r(){const[e,t]=g.useState(jd);return g.useEffect(()=>(Cd.push(t),()=>{const n=Cd.indexOf(t);n>-1&&Cd.splice(n,1)}),[e]),{...e,toast:QU,dismiss:n=>Jl({type:"DISMISS_TOAST",toastId:n})}}function Rx(){const{toasts:e}=$r();return l.jsxs(HU,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return l.jsxs(yN,{...o,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(xN,{children:n}),r&&l.jsx(wN,{children:r})]}),s,l.jsx(vN,{})]},t)}),l.jsx(gN,{})]})}function td(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bN={exports:{}};/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files +<http://stuartk.com/jszip> + +(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/(function(e,t){(function(n){e.exports=n()})(function(){return function n(r,s,o){function i(u,d){if(!s[u]){if(!r[u]){var f=typeof td=="function"&&td;if(!d&&f)return f(u,!0);if(a)return a(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var m=s[u]={exports:{}};r[u][0].call(m.exports,function(x){var p=r[u][1][x];return i(p||x)},m,m.exports,n,r,s,o)}return s[u].exports}for(var a=typeof td=="function"&&td,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(n,r,s){var o=n("./utils"),i=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,h,m,x,p,w=[],y=0,v=c.length,b=v,_=o.getTypeOf(c)!=="string";y<c.length;)b=v-y,f=_?(u=c[y++],d=y<v?c[y++]:0,y<v?c[y++]:0):(u=c.charCodeAt(y++),d=y<v?c.charCodeAt(y++):0,y<v?c.charCodeAt(y++):0),h=u>>2,m=(3&u)<<4|d>>4,x=1<b?(15&d)<<2|f>>6:64,p=2<b?63&f:64,w.push(a.charAt(h)+a.charAt(m)+a.charAt(x)+a.charAt(p));return w.join("")},s.decode=function(c){var u,d,f,h,m,x,p=0,w=0,y="data:";if(c.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var v,b=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&b--,c.charAt(c.length-2)===a.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|b):new Array(0|b);p<c.length;)u=a.indexOf(c.charAt(p++))<<2|(h=a.indexOf(c.charAt(p++)))>>4,d=(15&h)<<4|(m=a.indexOf(c.charAt(p++)))>>2,f=(3&m)<<6|(x=a.indexOf(c.charAt(p++))),v[w++]=u,m!==64&&(v[w++]=d),x!==64&&(v[w++]=f);return v}},{"./support":30,"./utils":32}],2:[function(n,r,s){var o=n("./external"),i=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,m,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=m,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,h){return d.pipe(new a).pipe(new c("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,s){var o=n("./utils"),i=function(){for(var a,c=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c}();r.exports=function(a,c){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d[p])];return-1^u}(0|c,a,a.length,0):function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d.charCodeAt(p))];return-1^u}(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,r,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:o}},{lie:37}],7:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,h){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,s){function o(m,x){var p,w="";for(p=0;p<x;p++)w+=String.fromCharCode(255&m),m>>>=8;return w}function i(m,x,p,w,y,v){var b,_,C=m.file,j=m.compression,T=v!==u.utf8encode,R=a.transformTo("string",v(C.name)),A=a.transformTo("string",u.utf8encode(C.name)),D=C.comment,G=a.transformTo("string",v(D)),N=a.transformTo("string",u.utf8encode(D)),z=A.length!==C.name.length,S=N.length!==D.length,U="",J="",F="",W=C.dir,I=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};x&&!p||(X.crc32=m.crc32,X.compressedSize=m.compressedSize,X.uncompressedSize=m.uncompressedSize);var $=0;x&&($|=8),T||!z&&!S||($|=2048);var B=0,pe=0;W&&(B|=16),y==="UNIX"?(pe=798,B|=function(oe,Ie){var ge=oe;return oe||(ge=Ie?16893:33204),(65535&ge)<<16}(C.unixPermissions,W)):(pe=20,B|=function(oe){return 63&(oe||0)}(C.dosPermissions)),b=I.getUTCHours(),b<<=6,b|=I.getUTCMinutes(),b<<=5,b|=I.getUTCSeconds()/2,_=I.getUTCFullYear()-1980,_<<=4,_|=I.getUTCMonth()+1,_<<=5,_|=I.getUTCDate(),z&&(J=o(1,1)+o(d(R),4)+A,U+="up"+o(J.length,2)+J),S&&(F=o(1,1)+o(d(G),4)+N,U+="uc"+o(F.length,2)+F);var se="";return se+=` +\0`,se+=o($,2),se+=j.magic,se+=o(b,2),se+=o(_,2),se+=o(X.crc32,4),se+=o(X.compressedSize,4),se+=o(X.uncompressedSize,4),se+=o(R.length,2),se+=o(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+se+R+U,dirRecord:f.CENTRAL_FILE_HEADER+o(pe,2)+se+o(G.length,2)+"\0\0\0\0"+o(B,4)+o(w,4)+R+U+G}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(m,x,p,w){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=p,this.encodeFileName=w,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,c),h.prototype.push=function(m){var x=m.meta.percent||0,p=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,c.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:p?(x+100*(p-w-1))/p:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var x=this.streamFiles&&!m.file.dir;if(x){var p=i(m,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var x=this.streamFiles&&!m.file.dir,p=i(m,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+o(w.crc32,4)+o(w.compressedSize,4)+o(w.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var p=this.bytesWritten-m,w=function(y,v,b,_,C){var j=a.transformTo("string",C(_));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(y,2)+o(y,2)+o(v,4)+o(b,4)+o(j.length,2)+j}(this.dirRecords.length,p,m,this.zipComment,this.encodeFileName);this.push({data:w,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(m){this._sources.push(m);var x=this;return m.on("data",function(p){x.processChunk(p)}),m.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),m.on("error",function(p){x.error(p)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(m){var x=this._sources;if(!c.prototype.error.call(this,m))return!1;for(var p=0;p<x.length;p++)try{x[p].error(m)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var m=this._sources,x=0;x<m.length;x++)m[x].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,s){var o=n("../compressions"),i=n("./ZipFileWorker");s.generateWorker=function(a,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{a.forEach(function(h,m){f++;var x=function(v,b){var _=v||b,C=o[_];if(!C)throw new Error(_+" is not a valid compression method !");return C}(m.options.compression,c.compression),p=m.options.compressionOptions||c.compressionOptions||{},w=m.dir,y=m.date;m._compressWorker(x,p).withStreamInfo("file",{name:h,dir:w,date:y,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,s){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new o;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(o.prototype=n("./object")).loadAsync=n("./load"),o.support=n("./support"),o.defaults=n("./defaults"),o.version="3.10.1",o.loadAsync=function(i,a){return new o().loadAsync(i,a)},o.external=n("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,s){var o=n("./utils"),i=n("./external"),a=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(m,x){var p=h.decompressed.getContentWorker().pipe(new u);p.on("error",function(w){x(w)}).on("end",function(){p.streamInfo.crc32!==h.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}r.exports=function(h,m){var x=this;return m=o.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(h)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",h,!0,m.optimizedBinaryString,m.base64).then(function(p){var w=new c(m);return w.load(p),w}).then(function(p){var w=[i.Promise.resolve(p)],y=p.files;if(m.checkCRC32)for(var v=0;v<y.length;v++)w.push(f(y[v]));return i.Promise.all(w)}).then(function(p){for(var w=p.shift(),y=w.files,v=0;v<y.length;v++){var b=y[v],_=b.fileNameStr,C=o.resolve(b.fileNameStr);x.file(C,b.decompressed,{binary:!0,optimizedBinaryString:!0,date:b.date,dir:b.dir,comment:b.fileCommentStr.length?b.fileCommentStr:null,unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions,createFolders:m.createFolders}),b.dir||(x.file(C).unsafeOriginalName=_)}return w.zipComment.length&&(x.comment=w.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,s){var o=n("../utils"),i=n("../stream/GenericWorker");function a(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(a,i),a.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,s){var o=n("readable-stream").Readable;function i(a,c,u){o.call(this,c),this._helper=a;var d=this;a.on("data",function(f,h){d.push(f)||d._helper.pause(),u&&u(h)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,s){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,i);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,i)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var i=new Buffer(o);return i.fill(0),i},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(n,r,s){function o(C,j,T){var R,A=a.getTypeOf(j),D=a.extend(T||{},d);D.date=D.date||new Date,D.compression!==null&&(D.compression=D.compression.toUpperCase()),typeof D.unixPermissions=="string"&&(D.unixPermissions=parseInt(D.unixPermissions,8)),D.unixPermissions&&16384&D.unixPermissions&&(D.dir=!0),D.dosPermissions&&16&D.dosPermissions&&(D.dir=!0),D.dir&&(C=y(C)),D.createFolders&&(R=w(C))&&v.call(this,R,!0);var G=A==="string"&&D.binary===!1&&D.base64===!1;T&&T.binary!==void 0||(D.binary=!G),(j instanceof f&&j.uncompressedSize===0||D.dir||!j||j.length===0)&&(D.base64=!1,D.binary=!0,j="",D.compression="STORE",A="string");var N=null;N=j instanceof f||j instanceof c?j:x.isNode&&x.isStream(j)?new p(C,j):a.prepareContent(C,j,D.binary,D.optimizedBinaryString,D.base64);var z=new h(C,N,D);this.files[C]=z}var i=n("./utf8"),a=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),m=n("./generate"),x=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),w=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var j=C.lastIndexOf("/");return 0<j?C.substring(0,j):""},y=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},v=function(C,j){return j=j!==void 0?j:d.createFolders,C=y(C),this.files[C]||o.call(this,C,null,{dir:!0,createFolders:j}),this.files[C]};function b(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var j,T,R;for(j in this.files)R=this.files[j],(T=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&C(T,R)},filter:function(C){var j=[];return this.forEach(function(T,R){C(T,R)&&j.push(R)}),j},file:function(C,j,T){if(arguments.length!==1)return C=this.root+C,o.call(this,C,j,T),this;if(b(C)){var R=C;return this.filter(function(D,G){return!G.dir&&R.test(D)})}var A=this.files[this.root+C];return A&&!A.dir?A:null},folder:function(C){if(!C)return this;if(b(C))return this.filter(function(A,D){return D.dir&&C.test(A)});var j=this.root+C,T=v.call(this,j),R=this.clone();return R.root=T.name,R},remove:function(C){C=this.root+C;var j=this.files[C];if(j||(C.slice(-1)!=="/"&&(C+="/"),j=this.files[C]),j&&!j.dir)delete this.files[C];else for(var T=this.filter(function(A,D){return D.name.slice(0,C.length)===C}),R=0;R<T.length;R++)delete this.files[T[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var j,T={};try{if((T=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");a.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var R=T.comment||this.comment||"";j=m.generateWorker(this,T,R)}catch(A){(j=new c("error")).error(A)}return new u(j,T.type||"string",T.mimeType)},generateAsync:function(C,j){return this.generateInternalStream(C).accumulate(j)},generateNodeStream:function(C,j){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(j)}};r.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,s){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}n("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===u&&this.data[h+2]===d&&this.data[h+3]===f)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,s){var o=n("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var c,u=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,s){var o=n("./Uint8ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var o=n("./ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var o=n("../utils"),i=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=o.getTypeOf(f);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new u(f):i.uint8array?new d(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,s){var o=n("./GenericWorker"),i=n("../utils");function a(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,o),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var o=n("./GenericWorker"),i=n("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,o),a.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(a,i),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=o.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=o},{}],29:[function(n,r,s){var o=n("../utils"),i=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(x,p){return new d.Promise(function(w,y){var v=[],b=x._internalType,_=x._outputType,C=x._mimeType;x.on("data",function(j,T){v.push(j),p&&p(T)}).on("error",function(j){v=[],y(j)}).on("end",function(){try{var j=function(T,R,A){switch(T){case"blob":return o.newBlob(o.transformTo("arraybuffer",R),A);case"base64":return c.encode(R);default:return o.transformTo(T,R)}}(_,function(T,R){var A,D=0,G=null,N=0;for(A=0;A<R.length;A++)N+=R[A].length;switch(T){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(G=new Uint8Array(N),A=0;A<R.length;A++)G.set(R[A],D),D+=R[A].length;return G;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+T+"'")}}(b,v),C);w(j)}catch(T){y(T)}v=[]}).resume()})}function m(x,p,w){var y=p;switch(p){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=p,this._mimeType=w,o.checkSupport(y),this._worker=x.pipe(new i(y)),x.lock()}catch(v){this._worker=new a("error"),this._worker.error(v)}}m.prototype={accumulate:function(x){return h(this,x)},on:function(x,p){var w=this;return x==="data"?this._worker.on(x,function(y){p.call(w,y.data,y.meta)}):this._worker.on(x,function(){o.delay(p,arguments,w)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},r.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var o=n("./utils"),i=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}s.utf8encode=function(m){return i.nodebuffer?a.newBufferFrom(m,"utf-8"):function(x){var p,w,y,v,b,_=x.length,C=0;for(v=0;v<_;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(y=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(y-56320),v++),C+=w<128?1:w<2048?2:w<65536?3:4;for(p=i.uint8array?new Uint8Array(C):new Array(C),v=b=0;b<C;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(y=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(y-56320),v++),w<128?p[b++]=w:(w<2048?p[b++]=192|w>>>6:(w<65536?p[b++]=224|w>>>12:(p[b++]=240|w>>>18,p[b++]=128|w>>>12&63),p[b++]=128|w>>>6&63),p[b++]=128|63&w);return p}(m)},s.utf8decode=function(m){return i.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(x){var p,w,y,v,b=x.length,_=new Array(2*b);for(p=w=0;p<b;)if((y=x[p++])<128)_[w++]=y;else if(4<(v=u[y]))_[w++]=65533,p+=v-1;else{for(y&=v===2?31:v===3?15:7;1<v&&p<b;)y=y<<6|63&x[p++],v--;1<v?_[w++]=65533:y<65536?_[w++]=y:(y-=65536,_[w++]=55296|y>>10&1023,_[w++]=56320|1023&y)}return _.length!==w&&(_.subarray?_=_.subarray(0,w):_.length=w),o.applyFromCharCode(_)}(m=o.transformTo(i.uint8array?"uint8array":"array",m))},o.inherits(f,c),f.prototype.processChunk=function(m){var x=o.transformTo(i.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var p=x;(x=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),x.set(p,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(v,b){var _;for((b=b||v.length)>v.length&&(b=v.length),_=b-1;0<=_&&(192&v[_])==128;)_--;return _<0||_===0?b:_+u[v[_]]>b?_:b}(x),y=x;w!==x.length&&(i.uint8array?(y=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(y=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(y),meta:m.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,o.inherits(h,c),h.prototype.processChunk=function(m){this.push({data:s.utf8encode(m.data),meta:m.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var o=n("./support"),i=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(p){return p}function d(p,w){for(var y=0;y<p.length;++y)w[y]=255&p.charCodeAt(y);return w}n("setimmediate"),s.newBlob=function(p,w){s.checkSupport("blob");try{return new Blob([p],{type:w})}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(p),y.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,w,y){var v=[],b=0,_=p.length;if(_<=y)return String.fromCharCode.apply(null,p);for(;b<_;)w==="array"||w==="nodebuffer"?v.push(String.fromCharCode.apply(null,p.slice(b,Math.min(b+y,_)))):v.push(String.fromCharCode.apply(null,p.subarray(b,Math.min(b+y,_)))),b+=y;return v.join("")},stringifyByChar:function(p){for(var w="",y=0;y<p.length;y++)w+=String.fromCharCode(p[y]);return w},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function h(p){var w=65536,y=s.getTypeOf(p),v=!0;if(y==="uint8array"?v=f.applyCanBeUsed.uint8array:y==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<w;)try{return f.stringifyByChunk(p,y,w)}catch{w=Math.floor(w/2)}return f.stringifyByChar(p)}function m(p,w){for(var y=0;y<p.length;y++)w[y]=p[y];return w}s.applyFromCharCode=h;var x={};x.string={string:u,array:function(p){return d(p,new Array(p.length))},arraybuffer:function(p){return x.string.uint8array(p).buffer},uint8array:function(p){return d(p,new Uint8Array(p.length))},nodebuffer:function(p){return d(p,a.allocBuffer(p.length))}},x.array={string:h,array:u,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},x.arraybuffer={string:function(p){return h(new Uint8Array(p))},array:function(p){return m(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:u,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},x.uint8array={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:u,nodebuffer:function(p){return a.newBufferFrom(p)}},x.nodebuffer={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return x.nodebuffer.uint8array(p).buffer},uint8array:function(p){return m(p,new Uint8Array(p.length))},nodebuffer:u},s.transformTo=function(p,w){if(w=w||"",!p)return w;s.checkSupport(p);var y=s.getTypeOf(w);return x[y][p](w)},s.resolve=function(p){for(var w=p.split("/"),y=[],v=0;v<w.length;v++){var b=w[v];b==="."||b===""&&v!==0&&v!==w.length-1||(b===".."?y.pop():y.push(b))}return y.join("/")},s.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(p)?"nodebuffer":o.uint8array&&p instanceof Uint8Array?"uint8array":o.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(p){if(!o[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(p){var w,y,v="";for(y=0;y<(p||"").length;y++)v+="\\x"+((w=p.charCodeAt(y))<16?"0":"")+w.toString(16).toUpperCase();return v},s.delay=function(p,w,y){setImmediate(function(){p.apply(y||null,w||[])})},s.inherits=function(p,w){function y(){}y.prototype=w.prototype,p.prototype=new y},s.extend=function(){var p,w,y={};for(p=0;p<arguments.length;p++)for(w in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],w)&&y[w]===void 0&&(y[w]=arguments[p][w]);return y},s.prepareContent=function(p,w,y,v,b){return c.Promise.resolve(w).then(function(_){return o.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,j){var T=new FileReader;T.onload=function(R){C(R.target.result)},T.onerror=function(R){j(R.target.error)},T.readAsArrayBuffer(_)}):_}).then(function(_){var C=s.getTypeOf(_);return C?(C==="arraybuffer"?_=s.transformTo("uint8array",_):C==="string"&&(b?_=i.decode(_):y&&v!==!0&&(_=function(j){return d(j,o.uint8array?new Uint8Array(j.length):new Array(j.length))}(_))),_):c.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(h)+", expected "+i.pretty(f)+")")}},isSignature:function(f,h){var m=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===h;return this.reader.setIndex(m),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=u.uint8array?"uint8array":"array",m=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(m)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,h,m,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:m}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var h=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var x=h-m;if(0<x)this.isSignature(h,a.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(m,x){this.options=m,this.loadOptions=x}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var x,p;if(m.skip(22),this.fileNameLength=m.readInt(2),p=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=function(w){for(var y in d)if(Object.prototype.hasOwnProperty.call(d,y)&&d[y].magic===w)return d[y];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,x,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var x=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(x),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var x,p,w,y=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<y;)x=m.readInt(2),p=m.readInt(2),w=m.readData(p),this.extraFields[x]={id:x,length:p,value:w};m.setIndex(y)},handleUTF8:function(){var m=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var p=i.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var y=i.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(m.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,s){function o(x,p,w){this.name=x,this.dir=w.dir,this.date=w.date,this.comment=w.comment,this.unixPermissions=w.unixPermissions,this.dosPermissions=w.dosPermissions,this._data=p,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var i=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");o.prototype={internalStream:function(x){var p=null,w="string";try{if(!x)throw new Error("No output type specified.");var y=(w=x.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),p=this._decompressWorker();var v=!this._dataBinary;v&&!y&&(p=p.pipe(new c.Utf8EncodeWorker)),!v&&y&&(p=p.pipe(new c.Utf8DecodeWorker))}catch(b){(p=new d("error")).error(b)}return new i(p,w,"")},async:function(x,p){return this.internalStream(x).accumulate(p)},nodeStream:function(x,p){return this.internalStream(x||"nodebuffer").toNodejsStream(p)},_compressWorker:function(x,p){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var w=this._decompressWorker();return this._dataBinary||(w=w.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(w,x,p)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},m=0;m<f.length;m++)o.prototype[f[m]]=h;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,s){(function(o){var i,a,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var u=0,d=new c(x),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var p=o.document.createElement("script");p.onreadystatechange=function(){x(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},o.document.documentElement.appendChild(p)}:function(){setTimeout(x,0)};else{var h=new o.MessageChannel;h.port1.onmessage=x,i=function(){h.port2.postMessage(0)}}var m=[];function x(){var p,w;a=!0;for(var y=m.length;y;){for(w=m,m=[],p=-1;++p<y;)w[p]();y=m.length}a=!1}r.exports=function(p){m.push(p)!==1||a||i()}}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,s){var o=n("immediate");function i(){}var a={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,y!==i&&p(this,y)}function h(y,v,b){this.promise=y,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof b=="function"&&(this.onRejected=b,this.callRejected=this.otherCallRejected)}function m(y,v,b){o(function(){var _;try{_=v(b)}catch(C){return a.reject(y,C)}_===y?a.reject(y,new TypeError("Cannot resolve promise with itself")):a.resolve(y,_)})}function x(y){var v=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof v=="function")return function(){v.apply(y,arguments)}}function p(y,v){var b=!1;function _(T){b||(b=!0,a.reject(y,T))}function C(T){b||(b=!0,a.resolve(y,T))}var j=w(function(){v(C,_)});j.status==="error"&&_(j.value)}function w(y,v){var b={};try{b.value=y(v),b.status="success"}catch(_){b.status="error",b.value=_}return b}(r.exports=f).prototype.finally=function(y){if(typeof y!="function")return this;var v=this.constructor;return this.then(function(b){return v.resolve(y()).then(function(){return b})},function(b){return v.resolve(y()).then(function(){throw b})})},f.prototype.catch=function(y){return this.then(null,y)},f.prototype.then=function(y,v){if(typeof y!="function"&&this.state===u||typeof v!="function"&&this.state===c)return this;var b=new this.constructor(i);return this.state!==d?m(b,this.state===u?y:v,this.outcome):this.queue.push(new h(b,y,v)),b},h.prototype.callFulfilled=function(y){a.resolve(this.promise,y)},h.prototype.otherCallFulfilled=function(y){m(this.promise,this.onFulfilled,y)},h.prototype.callRejected=function(y){a.reject(this.promise,y)},h.prototype.otherCallRejected=function(y){m(this.promise,this.onRejected,y)},a.resolve=function(y,v){var b=w(x,v);if(b.status==="error")return a.reject(y,b.value);var _=b.value;if(_)p(y,_);else{y.state=u,y.outcome=v;for(var C=-1,j=y.queue.length;++C<j;)y.queue[C].callFulfilled(v)}return y},a.reject=function(y,v){y.state=c,y.outcome=v;for(var b=-1,_=y.queue.length;++b<_;)y.queue[b].callRejected(v);return y},f.resolve=function(y){return y instanceof this?y:a.resolve(new this(i),y)},f.reject=function(y){var v=new this(i);return a.reject(v,y)},f.all=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=y.length,_=!1;if(!b)return this.resolve([]);for(var C=new Array(b),j=0,T=-1,R=new this(i);++T<b;)A(y[T],T);return R;function A(D,G){v.resolve(D).then(function(N){C[G]=N,++j!==b||_||(_=!0,a.resolve(R,C))},function(N){_||(_=!0,a.reject(R,N))})}},f.race=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=y.length,_=!1;if(!b)return this.resolve([]);for(var C=-1,j=new this(i);++C<b;)T=y[C],v.resolve(T).then(function(R){_||(_=!0,a.resolve(j,R))},function(R){_||(_=!0,a.reject(j,R))});var T;return j}},{immediate:36}],38:[function(n,r,s){var o={};(0,n("./lib/utils/common").assign)(o,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,s){var o=n("./zlib/deflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,m=0,x=8;function p(y){if(!(this instanceof p))return new p(y);this.options=i.assign({level:h,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},y||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var b=o.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(b!==f)throw new Error(c[b]);if(v.header&&o.deflateSetHeader(this.strm,v.header),v.dictionary){var _;if(_=typeof v.dictionary=="string"?a.string2buf(v.dictionary):d.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(b=o.deflateSetDictionary(this.strm,_))!==f)throw new Error(c[b]);this._dict_set=!0}}function w(y,v){var b=new p(v);if(b.push(y,!0),b.err)throw b.msg||c[b.err];return b.result}p.prototype.push=function(y,v){var b,_,C=this.strm,j=this.options.chunkSize;if(this.ended)return!1;_=v===~~v?v:v===!0?4:0,typeof y=="string"?C.input=a.string2buf(y):d.call(y)==="[object ArrayBuffer]"?C.input=new Uint8Array(y):C.input=y,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(j),C.next_out=0,C.avail_out=j),(b=o.deflate(C,_))!==1&&b!==f)return this.onEnd(b),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&b!==1);return _===4?(b=o.deflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===f):_!==2||(this.onEnd(f),!(C.avail_out=0))},p.prototype.onData=function(y){this.chunks.push(y)},p.prototype.onEnd=function(y){y===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},s.Deflate=p,s.deflate=w,s.deflateRaw=function(y,v){return(v=v||{}).raw=!0,w(y,v)},s.gzip=function(y,v){return(v=v||{}).gzip=!0,w(y,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,s){var o=n("./zlib/inflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function m(p){if(!(this instanceof m))return new m(p);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},p||{});var w=this.options;w.raw&&0<=w.windowBits&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),!(0<=w.windowBits&&w.windowBits<16)||p&&p.windowBits||(w.windowBits+=32),15<w.windowBits&&w.windowBits<48&&!(15&w.windowBits)&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var y=o.inflateInit2(this.strm,w.windowBits);if(y!==c.Z_OK)throw new Error(u[y]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(p,w){var y=new m(w);if(y.push(p,!0),y.err)throw y.msg||u[y.err];return y.result}m.prototype.push=function(p,w){var y,v,b,_,C,j,T=this.strm,R=this.options.chunkSize,A=this.options.dictionary,D=!1;if(this.ended)return!1;v=w===~~w?w:w===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof p=="string"?T.input=a.binstring2buf(p):h.call(p)==="[object ArrayBuffer]"?T.input=new Uint8Array(p):T.input=p,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(R),T.next_out=0,T.avail_out=R),(y=o.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(j=typeof A=="string"?a.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,y=o.inflateSetDictionary(this.strm,j)),y===c.Z_BUF_ERROR&&D===!0&&(y=c.Z_OK,D=!1),y!==c.Z_STREAM_END&&y!==c.Z_OK)return this.onEnd(y),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&y!==c.Z_STREAM_END&&(T.avail_in!==0||v!==c.Z_FINISH&&v!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(b=a.utf8border(T.output,T.next_out),_=T.next_out-b,C=a.buf2string(T.output,b),T.next_out=_,T.avail_out=R-_,_&&i.arraySet(T.output,T.output,b,_,0),this.onData(C)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(D=!0)}while((0<T.avail_in||T.avail_out===0)&&y!==c.Z_STREAM_END);return y===c.Z_STREAM_END&&(v=c.Z_FINISH),v===c.Z_FINISH?(y=o.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===c.Z_OK):v!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},m.prototype.onData=function(p){this.chunks.push(p)},m.prototype.onEnd=function(p){p===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Inflate=m,s.inflate=x,s.inflateRaw=function(p,w){return(w=w||{}).raw=!0,x(p,w)},s.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){var u,d,f,h,m,x;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(x=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)m=c[u],x.set(m,h),h+=m.length;return x}},a={arraySet:function(c,u,d,f,h){for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(o)},{}],42:[function(n,r,s){var o=n("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var c=new o.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,h){if(h<65537&&(f.subarray&&a||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,h));for(var m="",x=0;x<h;x++)m+=String.fromCharCode(f[x]);return m}c[254]=c[254]=1,s.string2buf=function(f){var h,m,x,p,w,y=f.length,v=0;for(p=0;p<y;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<y&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),v+=m<128?1:m<2048?2:m<65536?3:4;for(h=new o.Buf8(v),p=w=0;w<v;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<y&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),m<128?h[w++]=m:(m<2048?h[w++]=192|m>>>6:(m<65536?h[w++]=224|m>>>12:(h[w++]=240|m>>>18,h[w++]=128|m>>>12&63),h[w++]=128|m>>>6&63),h[w++]=128|63&m);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new o.Buf8(f.length),m=0,x=h.length;m<x;m++)h[m]=f.charCodeAt(m);return h},s.buf2string=function(f,h){var m,x,p,w,y=h||f.length,v=new Array(2*y);for(m=x=0;m<y;)if((p=f[m++])<128)v[x++]=p;else if(4<(w=c[p]))v[x++]=65533,m+=w-1;else{for(p&=w===2?31:w===3?15:7;1<w&&m<y;)p=p<<6|63&f[m++],w--;1<w?v[x++]=65533:p<65536?v[x++]=p:(p-=65536,v[x++]=55296|p>>10&1023,v[x++]=56320|1023&p)}return d(v,x)},s.utf8border=function(f,h){var m;for((h=h||f.length)>f.length&&(h=f.length),m=h-1;0<=m&&(192&f[m])==128;)m--;return m<0||m===0?h:m+c[f[m]]>h?m:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(o,i,a,c){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,s){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,s){var o=function(){for(var i,a=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a}();r.exports=function(i,a,c,u){var d=o,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^a[h])];return-1^i}},{}],46:[function(n,r,s){var o,i=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,m=0,x=-2,p=-1,w=4,y=2,v=8,b=9,_=286,C=30,j=19,T=2*_+1,R=15,A=3,D=258,G=D+A+1,N=42,z=113,S=1,U=2,J=3,F=4;function W(E,ee){return E.msg=d[ee],ee}function I(E){return(E<<1)-(4<E?9:0)}function X(E){for(var ee=E.length;0<=--ee;)E[ee]=0}function $(E){var ee=E.state,Z=ee.pending;Z>E.avail_out&&(Z=E.avail_out),Z!==0&&(i.arraySet(E.output,ee.pending_buf,ee.pending_out,Z,E.next_out),E.next_out+=Z,ee.pending_out+=Z,E.total_out+=Z,E.avail_out-=Z,ee.pending-=Z,ee.pending===0&&(ee.pending_out=0))}function B(E,ee){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,ee),E.block_start=E.strstart,$(E.strm)}function pe(E,ee){E.pending_buf[E.pending++]=ee}function se(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function oe(E,ee){var Z,O,k=E.max_chain_length,P=E.strstart,M=E.prev_length,K=E.nice_match,L=E.strstart>E.w_size-G?E.strstart-(E.w_size-G):0,Y=E.window,Q=E.w_mask,te=E.prev,ve=E.strstart+D,Ge=Y[P+M-1],Ue=Y[P+M];E.prev_length>=E.good_match&&(k>>=2),K>E.lookahead&&(K=E.lookahead);do if(Y[(Z=ee)+M]===Ue&&Y[Z+M-1]===Ge&&Y[Z]===Y[P]&&Y[++Z]===Y[P+1]){P+=2,Z++;do;while(Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&P<ve);if(O=D-(ve-P),P=ve-D,M<O){if(E.match_start=ee,K<=(M=O))break;Ge=Y[P+M-1],Ue=Y[P+M]}}while((ee=te[ee&Q])>L&&--k!=0);return M<=E.lookahead?M:E.lookahead}function Ie(E){var ee,Z,O,k,P,M,K,L,Y,Q,te=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=te+(te-G)){for(i.arraySet(E.window,E.window,te,te,0),E.match_start-=te,E.strstart-=te,E.block_start-=te,ee=Z=E.hash_size;O=E.head[--ee],E.head[ee]=te<=O?O-te:0,--Z;);for(ee=Z=te;O=E.prev[--ee],E.prev[ee]=te<=O?O-te:0,--Z;);k+=te}if(E.strm.avail_in===0)break;if(M=E.strm,K=E.window,L=E.strstart+E.lookahead,Y=k,Q=void 0,Q=M.avail_in,Y<Q&&(Q=Y),Z=Q===0?0:(M.avail_in-=Q,i.arraySet(K,M.input,M.next_in,Q,L),M.state.wrap===1?M.adler=c(M.adler,K,Q,L):M.state.wrap===2&&(M.adler=u(M.adler,K,Q,L)),M.next_in+=Q,M.total_in+=Q,Q),E.lookahead+=Z,E.lookahead+E.insert>=A)for(P=E.strstart-E.insert,E.ins_h=E.window[P],E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+A-1])&E.hash_mask,E.prev[P&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=P,P++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<G&&E.strm.avail_in!==0)}function ge(E,ee){for(var Z,O;;){if(E.lookahead<G){if(Ie(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),Z!==0&&E.strstart-Z<=E.w_size-G&&(E.match_length=oe(E,Z)),E.match_length>=A)if(O=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else O=a._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(O&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function ke(E,ee){for(var Z,O,k;;){if(E.lookahead<G){if(Ie(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=A-1,Z!==0&&E.prev_length<E.max_lazy_match&&E.strstart-Z<=E.w_size-G&&(E.match_length=oe(E,Z),E.match_length<=5&&(E.strategy===1||E.match_length===A&&4096<E.strstart-E.match_start)&&(E.match_length=A-1)),E.prev_length>=A&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-A,O=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=A-1,E.strstart++,O&&(B(E,!1),E.strm.avail_out===0))return S}else if(E.match_available){if((O=a._tr_tally(E,0,E.window[E.strstart-1]))&&B(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return S}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(O=a._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function Pe(E,ee,Z,O,k){this.good_length=E,this.max_lazy=ee,this.nice_length=Z,this.max_chain=O,this.func=k}function Fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*T),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*j+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(R+1),this.heap=new i.Buf16(2*_+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*_+1),X(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Me(E){var ee;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=y,(ee=E.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?N:z,E.adler=ee.wrap===2?0:1,ee.last_flush=f,a._tr_init(ee),m):W(E,x)}function Re(E){var ee=Me(E);return ee===m&&function(Z){Z.window_size=2*Z.w_size,X(Z.head),Z.max_lazy_match=o[Z.level].max_lazy,Z.good_match=o[Z.level].good_length,Z.nice_match=o[Z.level].nice_length,Z.max_chain_length=o[Z.level].max_chain,Z.strstart=0,Z.block_start=0,Z.lookahead=0,Z.insert=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,Z.ins_h=0}(E.state),ee}function st(E,ee,Z,O,k,P){if(!E)return x;var M=1;if(ee===p&&(ee=6),O<0?(M=0,O=-O):15<O&&(M=2,O-=16),k<1||b<k||Z!==v||O<8||15<O||ee<0||9<ee||P<0||w<P)return W(E,x);O===8&&(O=9);var K=new Fe;return(E.state=K).strm=E,K.wrap=M,K.gzhead=null,K.w_bits=O,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=k+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+A-1)/A),K.window=new i.Buf8(2*K.w_size),K.head=new i.Buf16(K.hash_size),K.prev=new i.Buf16(K.w_size),K.lit_bufsize=1<<k+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new i.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=ee,K.strategy=P,K.method=Z,Re(E)}o=[new Pe(0,0,0,0,function(E,ee){var Z=65535;for(Z>E.pending_buf_size-5&&(Z=E.pending_buf_size-5);;){if(E.lookahead<=1){if(Ie(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var O=E.block_start+Z;if((E.strstart===0||E.strstart>=O)&&(E.lookahead=E.strstart-O,E.strstart=O,B(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-G&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=0,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Pe(4,4,8,4,ge),new Pe(4,5,16,8,ge),new Pe(4,6,32,32,ge),new Pe(4,4,16,16,ke),new Pe(8,16,32,32,ke),new Pe(8,16,128,128,ke),new Pe(8,32,128,256,ke),new Pe(32,128,258,1024,ke),new Pe(32,258,258,4096,ke)],s.deflateInit=function(E,ee){return st(E,ee,v,15,8,0)},s.deflateInit2=st,s.deflateReset=Re,s.deflateResetKeep=Me,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,m):x},s.deflate=function(E,ee){var Z,O,k,P;if(!E||!E.state||5<ee||ee<0)return E?W(E,x):x;if(O=E.state,!E.output||!E.input&&E.avail_in!==0||O.status===666&&ee!==h)return W(E,E.avail_out===0?-5:x);if(O.strm=E,Z=O.last_flush,O.last_flush=ee,O.status===N)if(O.wrap===2)E.adler=0,pe(O,31),pe(O,139),pe(O,8),O.gzhead?(pe(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),pe(O,255&O.gzhead.time),pe(O,O.gzhead.time>>8&255),pe(O,O.gzhead.time>>16&255),pe(O,O.gzhead.time>>24&255),pe(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),pe(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(pe(O,255&O.gzhead.extra.length),pe(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(E.adler=u(E.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69):(pe(O,0),pe(O,0),pe(O,0),pe(O,0),pe(O,0),pe(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),pe(O,3),O.status=z);else{var M=v+(O.w_bits-8<<4)<<8;M|=(2<=O.strategy||O.level<2?0:O.level<6?1:O.level===6?2:3)<<6,O.strstart!==0&&(M|=32),M+=31-M%31,O.status=z,se(O,M),O.strstart!==0&&(se(O,E.adler>>>16),se(O,65535&E.adler)),E.adler=1}if(O.status===69)if(O.gzhead.extra){for(k=O.pending;O.gzindex<(65535&O.gzhead.extra.length)&&(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending!==O.pending_buf_size));)pe(O,255&O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),O.gzindex===O.gzhead.extra.length&&(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){P=1;break}P=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,pe(O,P)}while(P!==0);O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),P===0&&(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){P=1;break}P=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,pe(O,P)}while(P!==0);O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),P===0&&(O.status=103)}else O.status=103;if(O.status===103&&(O.gzhead.hcrc?(O.pending+2>O.pending_buf_size&&$(E),O.pending+2<=O.pending_buf_size&&(pe(O,255&E.adler),pe(O,E.adler>>8&255),E.adler=0,O.status=z)):O.status=z),O.pending!==0){if($(E),E.avail_out===0)return O.last_flush=-1,m}else if(E.avail_in===0&&I(ee)<=I(Z)&&ee!==h)return W(E,-5);if(O.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||O.lookahead!==0||ee!==f&&O.status!==666){var K=O.strategy===2?function(L,Y){for(var Q;;){if(L.lookahead===0&&(Ie(L),L.lookahead===0)){if(Y===f)return S;break}if(L.match_length=0,Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):O.strategy===3?function(L,Y){for(var Q,te,ve,Ge,Ue=L.window;;){if(L.lookahead<=D){if(Ie(L),L.lookahead<=D&&Y===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0<L.strstart&&(te=Ue[ve=L.strstart-1])===Ue[++ve]&&te===Ue[++ve]&&te===Ue[++ve]){Ge=L.strstart+D;do;while(te===Ue[++ve]&&te===Ue[++ve]&&te===Ue[++ve]&&te===Ue[++ve]&&te===Ue[++ve]&&te===Ue[++ve]&&te===Ue[++ve]&&te===Ue[++ve]&&ve<Ge);L.match_length=D-(Ge-ve),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=a._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):o[O.level].func(O,ee);if(K!==J&&K!==F||(O.status=666),K===S||K===J)return E.avail_out===0&&(O.last_flush=-1),m;if(K===U&&(ee===1?a._tr_align(O):ee!==5&&(a._tr_stored_block(O,0,0,!1),ee===3&&(X(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),$(E),E.avail_out===0))return O.last_flush=-1,m}return ee!==h?m:O.wrap<=0?1:(O.wrap===2?(pe(O,255&E.adler),pe(O,E.adler>>8&255),pe(O,E.adler>>16&255),pe(O,E.adler>>24&255),pe(O,255&E.total_in),pe(O,E.total_in>>8&255),pe(O,E.total_in>>16&255),pe(O,E.total_in>>24&255)):(se(O,E.adler>>>16),se(O,65535&E.adler)),$(E),0<O.wrap&&(O.wrap=-O.wrap),O.pending!==0?m:1)},s.deflateEnd=function(E){var ee;return E&&E.state?(ee=E.state.status)!==N&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==z&&ee!==666?W(E,x):(E.state=null,ee===z?W(E,-3):m):x},s.deflateSetDictionary=function(E,ee){var Z,O,k,P,M,K,L,Y,Q=ee.length;if(!E||!E.state||(P=(Z=E.state).wrap)===2||P===1&&Z.status!==N||Z.lookahead)return x;for(P===1&&(E.adler=c(E.adler,ee,Q,0)),Z.wrap=0,Q>=Z.w_size&&(P===0&&(X(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),Y=new i.Buf8(Z.w_size),i.arraySet(Y,ee,Q-Z.w_size,Z.w_size,0),ee=Y,Q=Z.w_size),M=E.avail_in,K=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,Ie(Z);Z.lookahead>=A;){for(O=Z.strstart,k=Z.lookahead-(A-1);Z.ins_h=(Z.ins_h<<Z.hash_shift^Z.window[O+A-1])&Z.hash_mask,Z.prev[O&Z.w_mask]=Z.head[Z.ins_h],Z.head[Z.ins_h]=O,O++,--k;);Z.strstart=O,Z.lookahead=A-1,Ie(Z)}return Z.strstart+=Z.lookahead,Z.block_start=Z.strstart,Z.insert=Z.lookahead,Z.lookahead=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,E.next_in=K,E.input=L,E.avail_in=M,Z.wrap=P,m},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,s){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,s){r.exports=function(o,i){var a,c,u,d,f,h,m,x,p,w,y,v,b,_,C,j,T,R,A,D,G,N,z,S,U;a=o.state,c=o.next_in,S=o.input,u=c+(o.avail_in-5),d=o.next_out,U=o.output,f=d-(i-o.avail_out),h=d+(o.avail_out-257),m=a.dmax,x=a.wsize,p=a.whave,w=a.wnext,y=a.window,v=a.hold,b=a.bits,_=a.lencode,C=a.distcode,j=(1<<a.lenbits)-1,T=(1<<a.distbits)-1;e:do{b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=_[v&j];t:for(;;){if(v>>>=A=R>>>24,b-=A,(A=R>>>16&255)===0)U[d++]=65535&R;else{if(!(16&A)){if(!(64&A)){R=_[(65535&R)+(v&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}D=65535&R,(A&=15)&&(b<A&&(v+=S[c++]<<b,b+=8),D+=v&(1<<A)-1,v>>>=A,b-=A),b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=C[v&T];n:for(;;){if(v>>>=A=R>>>24,b-=A,!(16&(A=R>>>16&255))){if(!(64&A)){R=C[(65535&R)+(v&(1<<A)-1)];continue n}o.msg="invalid distance code",a.mode=30;break e}if(G=65535&R,b<(A&=15)&&(v+=S[c++]<<b,(b+=8)<A&&(v+=S[c++]<<b,b+=8)),m<(G+=v&(1<<A)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(v>>>=A,b-=A,(A=d-f)<G){if(p<(A=G-A)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(z=y,(N=0)===w){if(N+=x-A,A<D){for(D-=A;U[d++]=y[N++],--A;);N=d-G,z=U}}else if(w<A){if(N+=x+w-A,(A-=w)<D){for(D-=A;U[d++]=y[N++],--A;);if(N=0,w<D){for(D-=A=w;U[d++]=y[N++],--A;);N=d-G,z=U}}}else if(N+=w-A,A<D){for(D-=A;U[d++]=y[N++],--A;);N=d-G,z=U}for(;2<D;)U[d++]=z[N++],U[d++]=z[N++],U[d++]=z[N++],D-=3;D&&(U[d++]=z[N++],1<D&&(U[d++]=z[N++]))}else{for(N=d-G;U[d++]=U[N++],U[d++]=U[N++],U[d++]=U[N++],2<(D-=3););D&&(U[d++]=U[N++],1<D&&(U[d++]=U[N++]))}break}}break}}while(c<u&&d<h);c-=D=b>>3,v&=(1<<(b-=D<<3))-1,o.next_in=c,o.next_out=d,o.avail_in=c<u?u-c+5:5-(c-u),o.avail_out=d<h?h-d+257:257-(d-h),a.hold=v,a.bits=b}},{}],49:[function(n,r,s){var o=n("../utils/common"),i=n("./adler32"),a=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,m=-2,x=1,p=852,w=592;function y(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(N){var z;return N&&N.state?(z=N.state,N.total_in=N.total_out=z.total=0,N.msg="",z.wrap&&(N.adler=1&z.wrap),z.mode=x,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new o.Buf32(p),z.distcode=z.distdyn=new o.Buf32(w),z.sane=1,z.back=-1,h):m}function _(N){var z;return N&&N.state?((z=N.state).wsize=0,z.whave=0,z.wnext=0,b(N)):m}function C(N,z){var S,U;return N&&N.state?(U=N.state,z<0?(S=0,z=-z):(S=1+(z>>4),z<48&&(z&=15)),z&&(z<8||15<z)?m:(U.window!==null&&U.wbits!==z&&(U.window=null),U.wrap=S,U.wbits=z,_(N))):m}function j(N,z){var S,U;return N?(U=new v,(N.state=U).window=null,(S=C(N,z))!==h&&(N.state=null),S):m}var T,R,A=!0;function D(N){if(A){var z;for(T=new o.Buf32(512),R=new o.Buf32(32),z=0;z<144;)N.lens[z++]=8;for(;z<256;)N.lens[z++]=9;for(;z<280;)N.lens[z++]=7;for(;z<288;)N.lens[z++]=8;for(u(d,N.lens,0,288,T,0,N.work,{bits:9}),z=0;z<32;)N.lens[z++]=5;u(f,N.lens,0,32,R,0,N.work,{bits:5}),A=!1}N.lencode=T,N.lenbits=9,N.distcode=R,N.distbits=5}function G(N,z,S,U){var J,F=N.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new o.Buf8(F.wsize)),U>=F.wsize?(o.arraySet(F.window,z,S-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(U<(J=F.wsize-F.wnext)&&(J=U),o.arraySet(F.window,z,S-U,J,F.wnext),(U-=J)?(o.arraySet(F.window,z,S-U,U,0),F.wnext=U,F.whave=F.wsize):(F.wnext+=J,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=J))),0}s.inflateReset=_,s.inflateReset2=C,s.inflateResetKeep=b,s.inflateInit=function(N){return j(N,15)},s.inflateInit2=j,s.inflate=function(N,z){var S,U,J,F,W,I,X,$,B,pe,se,oe,Ie,ge,ke,Pe,Fe,Me,Re,st,E,ee,Z,O,k=0,P=new o.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return m;(S=N.state).mode===12&&(S.mode=13),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,pe=I,se=X,ee=h;e:for(;;)switch(S.mode){case x:if(S.wrap===0){S.mode=13;break}for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(2&S.wrap&&$===35615){P[S.check=0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0),B=$=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&$)<<8)+($>>8))%31){N.msg="incorrect header check",S.mode=30;break}if((15&$)!=8){N.msg="unknown compression method",S.mode=30;break}if(B-=4,E=8+(15&($>>>=4)),S.wbits===0)S.wbits=E;else if(E>S.wbits){N.msg="invalid window size",S.mode=30;break}S.dmax=1<<E,N.adler=S.check=1,S.mode=512&$?10:12,B=$=0;break;case 2:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.flags=$,(255&S.flags)!=8){N.msg="unknown compression method",S.mode=30;break}if(57344&S.flags){N.msg="unknown header flags set",S.mode=30;break}S.head&&(S.head.text=$>>8&1),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.time=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,P[2]=$>>>16&255,P[3]=$>>>24&255,S.check=a(S.check,P,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.xflags=255&$,S.head.os=$>>8),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length=$,S.head&&(S.head.extra_len=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(oe=S.length)&&(oe=I),oe&&(S.head&&(E=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),o.arraySet(S.head.extra,U,F,oe,E)),512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,S.length-=oe),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(oe=0;E=U[F+oe++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&oe<I;);if(512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,E)break e}else S.head&&(S.head.name=null);S.length=0,S.mode=8;case 8:if(4096&S.flags){if(I===0)break e;for(oe=0;E=U[F+oe++],S.head&&E&&S.length<65536&&(S.head.comment+=String.fromCharCode(E)),E&&oe<I;);if(512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,E)break e}else S.head&&(S.head.comment=null);S.mode=9;case 9:if(512&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(65535&S.check)){N.msg="header crc mismatch",S.mode=30;break}B=$=0}S.head&&(S.head.hcrc=S.flags>>9&1,S.head.done=!0),N.adler=S.check=0,S.mode=12;break;case 10:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}N.adler=S.check=y($),B=$=0,S.mode=11;case 11:if(S.havedict===0)return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,2;N.adler=S.check=1,S.mode=12;case 12:if(z===5||z===6)break e;case 13:if(S.last){$>>>=7&B,B-=7&B,S.mode=27;break}for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}switch(S.last=1&$,B-=1,3&($>>>=1)){case 0:S.mode=14;break;case 1:if(D(S),S.mode=20,z!==6)break;$>>>=2,B-=2;break e;case 2:S.mode=17;break;case 3:N.msg="invalid block type",S.mode=30}$>>>=2,B-=2;break;case 14:for($>>>=7&B,B-=7&B;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if((65535&$)!=($>>>16^65535)){N.msg="invalid stored block lengths",S.mode=30;break}if(S.length=65535&$,B=$=0,S.mode=15,z===6)break e;case 15:S.mode=16;case 16:if(oe=S.length){if(I<oe&&(oe=I),X<oe&&(oe=X),oe===0)break e;o.arraySet(J,U,F,oe,W),I-=oe,F+=oe,X-=oe,W+=oe,S.length-=oe;break}S.mode=12;break;case 17:for(;B<14;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.nlen=257+(31&$),$>>>=5,B-=5,S.ndist=1+(31&$),$>>>=5,B-=5,S.ncode=4+(15&$),$>>>=4,B-=4,286<S.nlen||30<S.ndist){N.msg="too many length or distance symbols",S.mode=30;break}S.have=0,S.mode=18;case 18:for(;S.have<S.ncode;){for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.lens[M[S.have++]]=7&$,$>>>=3,B-=3}for(;S.have<19;)S.lens[M[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,Z={bits:S.lenbits},ee=u(0,S.lens,0,19,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid code lengths set",S.mode=30;break}S.have=0,S.mode=19;case 19:for(;S.have<S.nlen+S.ndist;){for(;Pe=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Fe<16)$>>>=ke,B-=ke,S.lens[S.have++]=Fe;else{if(Fe===16){for(O=ke+2;B<O;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($>>>=ke,B-=ke,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],oe=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(O=ke+3;B<O;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=ke,E=0,oe=3+(7&($>>>=ke)),$>>>=3,B-=3}else{for(O=ke+7;B<O;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=ke,E=0,oe=11+(127&($>>>=ke)),$>>>=7,B-=7}if(S.have+oe>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;oe--;)S.lens[S.have++]=E}}if(S.mode===30)break;if(S.lens[256]===0){N.msg="invalid code -- missing end-of-block",S.mode=30;break}if(S.lenbits=9,Z={bits:S.lenbits},ee=u(d,S.lens,0,S.nlen,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid literal/lengths set",S.mode=30;break}if(S.distbits=6,S.distcode=S.distdyn,Z={bits:S.distbits},ee=u(f,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,Z),S.distbits=Z.bits,ee){N.msg="invalid distances set",S.mode=30;break}if(S.mode=20,z===6)break e;case 20:S.mode=21;case 21:if(6<=I&&258<=X){N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,c(N,se),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,S.mode===12&&(S.back=-1);break}for(S.back=0;Pe=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Pe&&!(240&Pe)){for(Me=ke,Re=Pe,st=Fe;Pe=(k=S.lencode[st+(($&(1<<Me+Re)-1)>>Me)])>>>16&255,Fe=65535&k,!(Me+(ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Me,B-=Me,S.back+=Me}if($>>>=ke,B-=ke,S.back+=ke,S.length=Fe,Pe===0){S.mode=26;break}if(32&Pe){S.back=-1,S.mode=12;break}if(64&Pe){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Pe,S.mode=22;case 22:if(S.extra){for(O=S.extra;B<O;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;Pe=(k=S.distcode[$&(1<<S.distbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(!(240&Pe)){for(Me=ke,Re=Pe,st=Fe;Pe=(k=S.distcode[st+(($&(1<<Me+Re)-1)>>Me)])>>>16&255,Fe=65535&k,!(Me+(ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Me,B-=Me,S.back+=Me}if($>>>=ke,B-=ke,S.back+=ke,64&Pe){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Pe,S.mode=24;case 24:if(S.extra){for(O=S.extra;B<O;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.offset+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){N.msg="invalid distance too far back",S.mode=30;break}S.mode=25;case 25:if(X===0)break e;if(oe=se-X,S.offset>oe){if((oe=S.offset-oe)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}Ie=oe>S.wnext?(oe-=S.wnext,S.wsize-oe):S.wnext-oe,oe>S.length&&(oe=S.length),ge=S.window}else ge=J,Ie=W-S.offset,oe=S.length;for(X<oe&&(oe=X),X-=oe,S.length-=oe;J[W++]=ge[Ie++],--oe;);S.length===0&&(S.mode=21);break;case 26:if(X===0)break e;J[W++]=S.length,X--,S.mode=21;break;case 27:if(S.wrap){for(;B<32;){if(I===0)break e;I--,$|=U[F++]<<B,B+=8}if(se-=X,N.total_out+=se,S.total+=se,se&&(N.adler=S.check=S.flags?a(S.check,J,se,W-se):i(S.check,J,se,W-se)),se=X,(S.flags?$:y($))!==S.check){N.msg="incorrect data check",S.mode=30;break}B=$=0}S.mode=28;case 28:if(S.wrap&&S.flags){for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(4294967295&S.total)){N.msg="incorrect length check",S.mode=30;break}B=$=0}S.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;case 32:default:return m}return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,(S.wsize||se!==N.avail_out&&S.mode<30&&(S.mode<27||z!==4))&&G(N,N.output,N.next_out,se-N.avail_out)?(S.mode=31,-4):(pe-=N.avail_in,se-=N.avail_out,N.total_in+=pe,N.total_out+=se,S.total+=se,S.wrap&&se&&(N.adler=S.check=S.flags?a(S.check,J,se,N.next_out-se):i(S.check,J,se,N.next_out-se)),N.data_type=S.bits+(S.last?64:0)+(S.mode===12?128:0)+(S.mode===20||S.mode===15?256:0),(pe==0&&se===0||z===4)&&ee===h&&(ee=-5),ee)},s.inflateEnd=function(N){if(!N||!N.state)return m;var z=N.state;return z.window&&(z.window=null),N.state=null,h},s.inflateGetHeader=function(N,z){var S;return N&&N.state&&2&(S=N.state).wrap?((S.head=z).done=!1,h):m},s.inflateSetDictionary=function(N,z){var S,U=z.length;return N&&N.state?(S=N.state).wrap!==0&&S.mode!==11?m:S.mode===11&&i(1,z,U,0)!==S.check?-3:G(N,z,U,U)?(S.mode=31,-4):(S.havedict=1,h):m},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,s){var o=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,h,m,x,p,w,y){var v,b,_,C,j,T,R,A,D,G=y.bits,N=0,z=0,S=0,U=0,J=0,F=0,W=0,I=0,X=0,$=0,B=null,pe=0,se=new o.Buf16(16),oe=new o.Buf16(16),Ie=null,ge=0;for(N=0;N<=15;N++)se[N]=0;for(z=0;z<m;z++)se[f[h+z]]++;for(J=G,U=15;1<=U&&se[U]===0;U--);if(U<J&&(J=U),U===0)return x[p++]=20971520,x[p++]=20971520,y.bits=1,0;for(S=1;S<U&&se[S]===0;S++);for(J<S&&(J=S),N=I=1;N<=15;N++)if(I<<=1,(I-=se[N])<0)return-1;if(0<I&&(d===0||U!==1))return-1;for(oe[1]=0,N=1;N<15;N++)oe[N+1]=oe[N]+se[N];for(z=0;z<m;z++)f[h+z]!==0&&(w[oe[f[h+z]]++]=z);if(T=d===0?(B=Ie=w,19):d===1?(B=i,pe-=257,Ie=a,ge-=257,256):(B=c,Ie=u,-1),N=S,j=p,W=z=$=0,_=-1,C=(X=1<<(F=J))-1,d===1&&852<X||d===2&&592<X)return 1;for(;;){for(R=N-W,D=w[z]<T?(A=0,w[z]):w[z]>T?(A=Ie[ge+w[z]],B[pe+w[z]]):(A=96,0),v=1<<N-W,S=b=1<<F;x[j+($>>W)+(b-=v)]=R<<24|A<<16|D|0,b!==0;);for(v=1<<N-1;$&v;)v>>=1;if(v!==0?($&=v-1,$+=v):$=0,z++,--se[N]==0){if(N===U)break;N=f[h+w[z]]}if(J<N&&($&C)!==_){for(W===0&&(W=J),j+=S,I=1<<(F=N-W);F+W<U&&!((I-=se[F+W])<=0);)F++,I<<=1;if(X+=1<<F,d===1&&852<X||d===2&&592<X)return 1;x[_=$&C]=J<<24|F<<16|j-p|0}}return $!==0&&(x[j+$]=N-W<<24|64<<16|0),y.bits=J,0}},{"../utils/common":41}],51:[function(n,r,s){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,s){var o=n("../utils/common"),i=0,a=1;function c(k){for(var P=k.length;0<=--P;)k[P]=0}var u=0,d=29,f=256,h=f+1+d,m=30,x=19,p=2*h+1,w=15,y=16,v=7,b=256,_=16,C=17,j=18,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(h+2));c(G);var N=new Array(2*m);c(N);var z=new Array(512);c(z);var S=new Array(256);c(S);var U=new Array(d);c(U);var J,F,W,I=new Array(m);function X(k,P,M,K,L){this.static_tree=k,this.extra_bits=P,this.extra_base=M,this.elems=K,this.max_length=L,this.has_stree=k&&k.length}function $(k,P){this.dyn_tree=k,this.max_code=0,this.stat_desc=P}function B(k){return k<256?z[k]:z[256+(k>>>7)]}function pe(k,P){k.pending_buf[k.pending++]=255&P,k.pending_buf[k.pending++]=P>>>8&255}function se(k,P,M){k.bi_valid>y-M?(k.bi_buf|=P<<k.bi_valid&65535,pe(k,k.bi_buf),k.bi_buf=P>>y-k.bi_valid,k.bi_valid+=M-y):(k.bi_buf|=P<<k.bi_valid&65535,k.bi_valid+=M)}function oe(k,P,M){se(k,M[2*P],M[2*P+1])}function Ie(k,P){for(var M=0;M|=1&k,k>>>=1,M<<=1,0<--P;);return M>>>1}function ge(k,P,M){var K,L,Y=new Array(w+1),Q=0;for(K=1;K<=w;K++)Y[K]=Q=Q+M[K-1]<<1;for(L=0;L<=P;L++){var te=k[2*L+1];te!==0&&(k[2*L]=Ie(Y[te]++,te))}}function ke(k){var P;for(P=0;P<h;P++)k.dyn_ltree[2*P]=0;for(P=0;P<m;P++)k.dyn_dtree[2*P]=0;for(P=0;P<x;P++)k.bl_tree[2*P]=0;k.dyn_ltree[2*b]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function Pe(k){8<k.bi_valid?pe(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function Fe(k,P,M,K){var L=2*P,Y=2*M;return k[L]<k[Y]||k[L]===k[Y]&&K[P]<=K[M]}function Me(k,P,M){for(var K=k.heap[M],L=M<<1;L<=k.heap_len&&(L<k.heap_len&&Fe(P,k.heap[L+1],k.heap[L],k.depth)&&L++,!Fe(P,K,k.heap[L],k.depth));)k.heap[M]=k.heap[L],M=L,L<<=1;k.heap[M]=K}function Re(k,P,M){var K,L,Y,Q,te=0;if(k.last_lit!==0)for(;K=k.pending_buf[k.d_buf+2*te]<<8|k.pending_buf[k.d_buf+2*te+1],L=k.pending_buf[k.l_buf+te],te++,K===0?oe(k,L,P):(oe(k,(Y=S[L])+f+1,P),(Q=T[Y])!==0&&se(k,L-=U[Y],Q),oe(k,Y=B(--K),M),(Q=R[Y])!==0&&se(k,K-=I[Y],Q)),te<k.last_lit;);oe(k,b,P)}function st(k,P){var M,K,L,Y=P.dyn_tree,Q=P.stat_desc.static_tree,te=P.stat_desc.has_stree,ve=P.stat_desc.elems,Ge=-1;for(k.heap_len=0,k.heap_max=p,M=0;M<ve;M++)Y[2*M]!==0?(k.heap[++k.heap_len]=Ge=M,k.depth[M]=0):Y[2*M+1]=0;for(;k.heap_len<2;)Y[2*(L=k.heap[++k.heap_len]=Ge<2?++Ge:0)]=1,k.depth[L]=0,k.opt_len--,te&&(k.static_len-=Q[2*L+1]);for(P.max_code=Ge,M=k.heap_len>>1;1<=M;M--)Me(k,Y,M);for(L=ve;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Me(k,Y,1),K=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=K,Y[2*L]=Y[2*M]+Y[2*K],k.depth[L]=(k.depth[M]>=k.depth[K]?k.depth[M]:k.depth[K])+1,Y[2*M+1]=Y[2*K+1]=L,k.heap[1]=L++,Me(k,Y,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function(Ue,Et){var nr,Kt,fs,ct,hs,ms,rr=Et.dyn_tree,vu=Et.max_code,xu=Et.stat_desc.static_tree,Oi=Et.stat_desc.has_stree,wu=Et.stat_desc.extra_bits,Di=Et.stat_desc.extra_base,Br=Et.stat_desc.max_length,Xs=0;for(ct=0;ct<=w;ct++)Ue.bl_count[ct]=0;for(rr[2*Ue.heap[Ue.heap_max]+1]=0,nr=Ue.heap_max+1;nr<p;nr++)Br<(ct=rr[2*rr[2*(Kt=Ue.heap[nr])+1]+1]+1)&&(ct=Br,Xs++),rr[2*Kt+1]=ct,vu<Kt||(Ue.bl_count[ct]++,hs=0,Di<=Kt&&(hs=wu[Kt-Di]),ms=rr[2*Kt],Ue.opt_len+=ms*(ct+hs),Oi&&(Ue.static_len+=ms*(xu[2*Kt+1]+hs)));if(Xs!==0){do{for(ct=Br-1;Ue.bl_count[ct]===0;)ct--;Ue.bl_count[ct]--,Ue.bl_count[ct+1]+=2,Ue.bl_count[Br]--,Xs-=2}while(0<Xs);for(ct=Br;ct!==0;ct--)for(Kt=Ue.bl_count[ct];Kt!==0;)vu<(fs=Ue.heap[--nr])||(rr[2*fs+1]!==ct&&(Ue.opt_len+=(ct-rr[2*fs+1])*rr[2*fs],rr[2*fs+1]=ct),Kt--)}}(k,P),ge(Y,Ge,k.bl_count)}function E(k,P,M){var K,L,Y=-1,Q=P[1],te=0,ve=7,Ge=4;for(Q===0&&(ve=138,Ge=3),P[2*(M+1)+1]=65535,K=0;K<=M;K++)L=Q,Q=P[2*(K+1)+1],++te<ve&&L===Q||(te<Ge?k.bl_tree[2*L]+=te:L!==0?(L!==Y&&k.bl_tree[2*L]++,k.bl_tree[2*_]++):te<=10?k.bl_tree[2*C]++:k.bl_tree[2*j]++,Y=L,Ge=(te=0)===Q?(ve=138,3):L===Q?(ve=6,3):(ve=7,4))}function ee(k,P,M){var K,L,Y=-1,Q=P[1],te=0,ve=7,Ge=4;for(Q===0&&(ve=138,Ge=3),K=0;K<=M;K++)if(L=Q,Q=P[2*(K+1)+1],!(++te<ve&&L===Q)){if(te<Ge)for(;oe(k,L,k.bl_tree),--te!=0;);else L!==0?(L!==Y&&(oe(k,L,k.bl_tree),te--),oe(k,_,k.bl_tree),se(k,te-3,2)):te<=10?(oe(k,C,k.bl_tree),se(k,te-3,3)):(oe(k,j,k.bl_tree),se(k,te-11,7));Y=L,Ge=(te=0)===Q?(ve=138,3):L===Q?(ve=6,3):(ve=7,4)}}c(I);var Z=!1;function O(k,P,M,K){se(k,(u<<1)+(K?1:0),3),function(L,Y,Q,te){Pe(L),pe(L,Q),pe(L,~Q),o.arraySet(L.pending_buf,L.window,Y,Q,L.pending),L.pending+=Q}(k,P,M)}s._tr_init=function(k){Z||(function(){var P,M,K,L,Y,Q=new Array(w+1);for(L=K=0;L<d-1;L++)for(U[L]=K,P=0;P<1<<T[L];P++)S[K++]=L;for(S[K-1]=L,L=Y=0;L<16;L++)for(I[L]=Y,P=0;P<1<<R[L];P++)z[Y++]=L;for(Y>>=7;L<m;L++)for(I[L]=Y<<7,P=0;P<1<<R[L]-7;P++)z[256+Y++]=L;for(M=0;M<=w;M++)Q[M]=0;for(P=0;P<=143;)G[2*P+1]=8,P++,Q[8]++;for(;P<=255;)G[2*P+1]=9,P++,Q[9]++;for(;P<=279;)G[2*P+1]=7,P++,Q[7]++;for(;P<=287;)G[2*P+1]=8,P++,Q[8]++;for(ge(G,h+1,Q),P=0;P<m;P++)N[2*P+1]=5,N[2*P]=Ie(P,5);J=new X(G,T,f+1,h,w),F=new X(N,R,0,m,w),W=new X(new Array(0),A,0,x,v)}(),Z=!0),k.l_desc=new $(k.dyn_ltree,J),k.d_desc=new $(k.dyn_dtree,F),k.bl_desc=new $(k.bl_tree,W),k.bi_buf=0,k.bi_valid=0,ke(k)},s._tr_stored_block=O,s._tr_flush_block=function(k,P,M,K){var L,Y,Q=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=function(te){var ve,Ge=4093624447;for(ve=0;ve<=31;ve++,Ge>>>=1)if(1&Ge&&te.dyn_ltree[2*ve]!==0)return i;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return a;for(ve=32;ve<f;ve++)if(te.dyn_ltree[2*ve]!==0)return a;return i}(k)),st(k,k.l_desc),st(k,k.d_desc),Q=function(te){var ve;for(E(te,te.dyn_ltree,te.l_desc.max_code),E(te,te.dyn_dtree,te.d_desc.max_code),st(te,te.bl_desc),ve=x-1;3<=ve&&te.bl_tree[2*D[ve]+1]===0;ve--);return te.opt_len+=3*(ve+1)+5+5+4,ve}(k),L=k.opt_len+3+7>>>3,(Y=k.static_len+3+7>>>3)<=L&&(L=Y)):L=Y=M+5,M+4<=L&&P!==-1?O(k,P,M,K):k.strategy===4||Y===L?(se(k,2+(K?1:0),3),Re(k,G,N)):(se(k,4+(K?1:0),3),function(te,ve,Ge,Ue){var Et;for(se(te,ve-257,5),se(te,Ge-1,5),se(te,Ue-4,4),Et=0;Et<Ue;Et++)se(te,te.bl_tree[2*D[Et]+1],3);ee(te,te.dyn_ltree,ve-1),ee(te,te.dyn_dtree,Ge-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Re(k,k.dyn_ltree,k.dyn_dtree)),ke(k),K&&Pe(k)},s._tr_tally=function(k,P,M){return k.pending_buf[k.d_buf+2*k.last_lit]=P>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&P,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,P===0?k.dyn_ltree[2*M]++:(k.matches++,P--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(P)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){se(k,2,3),oe(k,b,G),function(P){P.bi_valid===16?(pe(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):8<=P.bi_valid&&(P.pending_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=8,P.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(n,r,s){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,s){(function(o){(function(i,a){if(!i.setImmediate){var c,u,d,f,h=1,m={},x=!1,p=i.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(i);w=w&&w.setTimeout?w:i,c={}.toString.call(i.process)==="[object process]"?function(_){process.nextTick(function(){v(_)})}:function(){if(i.postMessage&&!i.importScripts){var _=!0,C=i.onmessage;return i.onmessage=function(){_=!1},i.postMessage("","*"),i.onmessage=C,_}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",b,!1):i.attachEvent("onmessage",b),function(_){i.postMessage(f+_,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){v(_.data)},function(_){d.port2.postMessage(_)}):p&&"onreadystatechange"in p.createElement("script")?(u=p.documentElement,function(_){var C=p.createElement("script");C.onreadystatechange=function(){v(_),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(_){setTimeout(v,0,_)},w.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),j=0;j<C.length;j++)C[j]=arguments[j+1];var T={callback:_,args:C};return m[h]=T,c(h),h++},w.clearImmediate=y}function y(_){delete m[_]}function v(_){if(x)setTimeout(v,0,_);else{var C=m[_];if(C){x=!0;try{(function(j){var T=j.callback,R=j.args;switch(R.length){case 0:T();break;case 1:T(R[0]);break;case 2:T(R[0],R[1]);break;case 3:T(R[0],R[1],R[2]);break;default:T.apply(a,R)}})(C)}finally{y(_),x=!1}}}}function b(_){_.source===i&&typeof _.data=="string"&&_.data.indexOf(f)===0&&v(+_.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(bN);var JU=bN.exports;const e8=Vf(JU);function t8(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const n8=async(e,t)=>{const n=new e8;t.forEach(o=>{n.file(o.name,o.content)});const r=await n.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,s.click()},za=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},r8=e=>za(e).split(" ")[0];function _N(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${o}:${i}:${a}`}const s8=async e=>{const t=ot();let n=1;e.page&&(n=e.page);let r=2;e.perPage&&(r=e.perPage);let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=t.filter("expiredAt<{:expiredAt}",{expiredAt:_N(15)})),t.collection("domains").getList(n,r,{sort:"-created",expand:"lastDeployment",filter:s})},o8=async()=>{const e=ot(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:_N(15)})}),r=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:n.totalItems,enabled:r.totalItems,disabled:s.totalItems}},i8=async e=>await ot().collection("domains").getOne(e),pf=async e=>e.id?await ot().collection("domains").update(e.id,e):await ot().collection("domains").create(e),a8=async e=>await ot().collection("domains").delete(e),l8=(e,t)=>ot().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),c8=e=>{ot().collection("domains").unsubscribe(e)},u8=()=>{const e=$r(),t=er(),{t:n}=Ye(),r=Mr(),s=new URLSearchParams(r.search),o=s.get("page"),i=s.get("state"),[a,c]=g.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},m=async _=>{try{await a8(_),p(x.filter(C=>C.id!==_))}catch(C){console.error("Error deleting domain:",C)}},[x,p]=g.useState([]);g.useEffect(()=>{(async()=>{const C=await s8({page:o?Number(o):1,perPage:10,state:i||""});p(C.items),c(C.totalPages)})()},[o,i]);const w=async _=>{const C=x.filter(A=>A.id===_),j=C[0].enabled,T=C[0];T.enabled=!j,await pf(T);const R=x.map(A=>A.id===_?{...A,checked:!j}:A);p(R)},y=async _=>{try{c8(_.id??""),l8(_.id??"",C=>{const j=x.map(T=>T.id===C.id?{...C}:T);p(j)}),_.rightnow=!0,await pf(_),e.toast({title:n("domain.deploy.started.message"),description:n("domain.deploy.started.tips")})}catch{e.toast({title:n("domain.deploy.failed.message"),description:l.jsxs(tI,{i18nKey:"domain.deploy.failed.tips",children:["text1",l.jsx(wn,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},v=async _=>{await y({..._,deployed:!1})},b=async _=>{const C=`${_.id}-${_.domain}.zip`,j=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await n8(C,j)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Rx,{}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:n("domain.page.title")}),l.jsx(De,{onClick:u,children:n("domain.add")})]}),x.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-36",children:n("common.text.domain")}),l.jsx("div",{className:"w-40",children:n("domain.props.expiry")}),l.jsx("div",{className:"w-32",children:n("domain.props.last_execution_status")}),l.jsx("div",{className:"w-64",children:n("domain.props.last_execution_stage")}),l.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.props.last_execution_time")}),l.jsx("div",{className:"w-24",children:n("domain.props.enable")}),l.jsx("div",{className:"grow",children:n("common.text.operations")})]}),x.map(_=>{var C,j,T,R;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate",children:_.domain.split(";").map(A=>l.jsxs(l.Fragment,{children:[A,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx("div",{children:_.expiredAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:n("domain.props.expiry.date1",{date:90})}),l.jsx("div",{children:n("domain.props.expiry.date2",{date:r8(_.expiredAt)})})]}):"---"})}),l.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?l.jsx(l.Fragment,{children:l.jsx(Sx,{deployment:_.expand.lastDeployment})}):"---"}),l.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?l.jsx(_x,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(R=_.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),l.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?za(_.lastDeployedAt):"---"}),l.jsx("div",{className:"sm:w-24 flex items-center",children:l.jsx(wx,{children:l.jsxs(vE,{children:[l.jsx(xE,{children:l.jsx(mu,{checked:_.enabled,onCheckedChange:()=>{w(_.id??"")}})}),l.jsx(bx,{children:l.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("domain.props.enable.disabled"):n("domain.props.enable.enabled")})})]})})}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(De,{variant:"link",className:"p-0",onClick:()=>h(_.id??""),children:n("domain.history")}),l.jsxs(dr,{when:!!_.enabled,children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(De,{variant:"link",className:"p-0",onClick:()=>y(_),children:n("domain.deploy")})]}),l.jsxs(dr,{when:!!(_.enabled&&_.deployed),children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(De,{variant:"link",className:"p-0",onClick:()=>v(_),children:n("domain.deploy_forced")})]}),l.jsxs(dr,{when:!!_.expiredAt,children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(De,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("common.download")})]}),!_.enabled&&l.jsxs(l.Fragment,{children:[l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(kx,{children:[l.jsx(Cx,{asChild:!0,children:l.jsx(De,{variant:"link",className:"p-0",children:n("common.delete")})}),l.jsxs(Lh,{children:[l.jsxs(zh,{children:[l.jsx($h,{children:n("domain.delete")}),l.jsx(Uh,{children:n("domain.delete.confirm")})]}),l.jsxs(Fh,{children:[l.jsx(Bh,{children:n("common.cancel")}),l.jsx(Vh,{onClick:()=>{m(_.id??"")},children:n("common.confirm")})]})]})]}),l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(De,{variant:"link",className:"p-0",onClick:()=>f(_.id??""),children:n("common.edit")})]})]})]},_.id)}),l.jsx(CE,{totalPages:a,currentPage:o?Number(o):1,onPageChange:_=>{d(_)}})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(pg,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.nodata")}),l.jsx(De,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})};var pu=e=>e.type==="checkbox",da=e=>e instanceof Date,_n=e=>e==null;const SN=e=>typeof e=="object";var Qt=e=>!_n(e)&&!Array.isArray(e)&&SN(e)&&!da(e),kN=e=>Qt(e)&&e.target?pu(e.target)?e.target.checked:e.target.value:e,d8=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,CN=(e,t)=>e.has(d8(t)),f8=e=>{const t=e.constructor&&e.constructor.prototype;return Qt(t)&&t.hasOwnProperty("isPrototypeOf")},Ax=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Tn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ax&&(e instanceof Blob||e instanceof FileList))&&(n||Qt(e)))if(t=n?[]:{},!n&&!f8(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Tn(e[r]));else return e;return t}var Yh=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,he=(e,t,n)=>{if(!t||!Qt(e))return n;const r=Yh(t.split(/[,[\].]+?/)).reduce((s,o)=>_n(s)?s:s[o],e);return Ft(r)||r===e?Ft(e[t])?n:e[t]:r},qr=e=>typeof e=="boolean",Ox=e=>/^\w*$/.test(e),jN=e=>Yh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{let r=-1;const s=Ox(t)?[t]:jN(t),o=s.length,i=o-1;for(;++r<o;){const a=s[r];let c=n;if(r!==i){const u=e[a];c=Qt(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;e[a]=c,e=e[a]}return e};const gf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Sr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},vs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},EN=We.createContext(null),Kh=()=>We.useContext(EN),h8=e=>{const{children:t,...n}=e;return We.createElement(EN.Provider,{value:n},t)};var NN=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Sr.all&&(t._proxyFormState[i]=!r||Sr.all),n&&(n[i]=!0),e[i]}});return s},$n=e=>Qt(e)&&!Object.keys(e).length,TN=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return $n(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Sr.all))},ec=e=>Array.isArray(e)?e:[e],PN=(e,t,n)=>!e||!t||e===t||ec(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Dx(e){const t=We.useRef(e);t.current=e,We.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function m8(e){const t=Kh(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=We.useState(n._formState),c=We.useRef(!0),u=We.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=We.useRef(s);return d.current=s,Dx({disabled:r,next:f=>c.current&&PN(d.current,f.name,o)&&TN(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),We.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),NN(i,n,u.current,!1)}var Qr=e=>typeof e=="string",RN=(e,t,n,r,s)=>Qr(e)?(r&&t.watch.add(e),he(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),he(n,o))):(r&&(t.watchAll=!0),n);function p8(e){const t=Kh(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=We.useRef(r);a.current=r,Dx({disabled:o,subject:n._subjects.values,next:d=>{PN(a.current,d.name,i)&&u(Tn(RN(a.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=We.useState(n._getWatch(r,s));return We.useEffect(()=>n._removeUnmounted()),c}function g8(e){const t=Kh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=CN(s._names.array,n),a=p8({control:s,name:n,defaultValue:he(s._formValues,n,he(s._defaultValues,n,e.defaultValue)),exact:!0}),c=m8({control:s,name:n}),u=We.useRef(s.register(n,{...e.rules,value:a,...qr(e.disabled)?{disabled:e.disabled}:{}}));return We.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(h,m)=>{const x=he(s._fields,h);x&&x._f&&(x._f.mount=m)};if(f(n,!0),d){const h=Tn(he(s._options.defaultValues,n));mt(s._defaultValues,n,h),Ft(he(s._formValues,n))&&mt(s._formValues,n,h)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),We.useEffect(()=>{he(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:he(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...qr(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:We.useCallback(d=>u.current.onChange({target:{value:kN(d),name:n},type:gf.CHANGE}),[n]),onBlur:We.useCallback(()=>u.current.onBlur({target:{value:he(s._formValues,n),name:n},type:gf.BLUR}),[n,s]),ref:d=>{const f=he(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!he(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!he(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!he(c.validatingFields,n)},error:{enumerable:!0,get:()=>he(c.errors,n)}})}}const y8=e=>e.render(g8(e));var AN=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},$b=e=>({isOnSubmit:!e||e===Sr.onSubmit,isOnBlur:e===Sr.onBlur,isOnChange:e===Sr.onChange,isOnAll:e===Sr.all,isOnTouch:e===Sr.onTouched}),Ub=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const tc=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=he(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;tc(a,t)}else Qt(a)&&tc(a,t)}}};var v8=(e,t,n)=>{const r=ec(he(e,n));return mt(r,"root",t[n]),mt(e,n,r),e},Ix=e=>e.type==="file",mo=e=>typeof e=="function",yf=e=>{if(!Ax)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ed=e=>Qr(e),Mx=e=>e.type==="radio",vf=e=>e instanceof RegExp;const Vb={value:!1,isValid:!1},Bb={value:!0,isValid:!0};var ON=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?Bb:{value:e[0].value,isValid:!0}:Bb:Vb}return Vb};const Wb={isValid:!1,value:null};var DN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Wb):Wb;function Hb(e,t,n="validate"){if(Ed(e)||Array.isArray(e)&&e.every(Ed)||qr(e)&&!e)return{type:n,message:Ed(e)?e:"",ref:t}}var Wi=e=>Qt(e)&&!vf(e)?e:{value:e,message:""},Yb=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:m,name:x,valueAsNumber:p,mount:w,disabled:y}=e._f,v=he(t,x);if(!w||y)return{};const b=i?i[0]:o,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(qr(N)?"":N||""),b.reportValidity())},C={},j=Mx(o),T=pu(o),R=j||T,A=(p||Ix(o))&&Ft(o.value)&&Ft(v)||yf(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,D=AN.bind(null,x,n,C),G=(N,z,S,U=vs.maxLength,J=vs.minLength)=>{const F=N?z:S;C[x]={type:N?U:J,message:F,ref:o,...D(N?U:J,F)}};if(s?!Array.isArray(v)||!v.length:a&&(!R&&(A||_n(v))||qr(v)&&!v||T&&!ON(i).isValid||j&&!DN(i).isValid)){const{value:N,message:z}=Ed(a)?{value:!!a,message:a}:Wi(a);if(N&&(C[x]={type:vs.required,message:z,ref:b,...D(vs.required,z)},!n))return _(z),C}if(!A&&(!_n(d)||!_n(f))){let N,z;const S=Wi(f),U=Wi(d);if(!_n(v)&&!isNaN(v)){const J=o.valueAsNumber||v&&+v;_n(S.value)||(N=J>S.value),_n(U.value)||(z=J<U.value)}else{const J=o.valueAsDate||new Date(v),F=X=>new Date(new Date().toDateString()+" "+X),W=o.type=="time",I=o.type=="week";Qr(S.value)&&v&&(N=W?F(v)>F(S.value):I?v>S.value:J>new Date(S.value)),Qr(U.value)&&v&&(z=W?F(v)<F(U.value):I?v<U.value:J<new Date(U.value))}if((N||z)&&(G(!!N,S.message,U.message,vs.max,vs.min),!n))return _(C[x].message),C}if((c||u)&&!A&&(Qr(v)||s&&Array.isArray(v))){const N=Wi(c),z=Wi(u),S=!_n(N.value)&&v.length>+N.value,U=!_n(z.value)&&v.length<+z.value;if((S||U)&&(G(S,N.message,z.message),!n))return _(C[x].message),C}if(h&&!A&&Qr(v)){const{value:N,message:z}=Wi(h);if(vf(N)&&!v.match(N)&&(C[x]={type:vs.pattern,message:z,ref:o,...D(vs.pattern,z)},!n))return _(z),C}if(m){if(mo(m)){const N=await m(v,t),z=Hb(N,b);if(z&&(C[x]={...z,...D(vs.validate,z.message)},!n))return _(z.message),C}else if(Qt(m)){let N={};for(const z in m){if(!$n(N)&&!n)break;const S=Hb(await m[z](v,t),b,z);S&&(N={...S,...D(z,S.message)},_(S.message),n&&(C[x]=N))}if(!$n(N)&&(C[x]={ref:b,...N},!n))return C}}return _(!0),C};function x8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ft(e)?r++:e[t[r++]];return e}function w8(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function Gt(e,t){const n=Array.isArray(t)?t:Ox(t)?[t]:jN(t),r=n.length===1?e:x8(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(Qt(r)&&$n(r)||Array.isArray(r)&&w8(r))&&Gt(e,n.slice(0,-1)),e}var ap=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},xf=e=>_n(e)||!SN(e);function Jo(e,t){if(xf(e)||xf(t))return e===t;if(da(e)&&da(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(da(o)&&da(i)||Qt(o)&&Qt(i)||Array.isArray(o)&&Array.isArray(i)?!Jo(o,i):o!==i)return!1}}return!0}var IN=e=>e.type==="select-multiple",b8=e=>Mx(e)||pu(e),lp=e=>yf(e)&&e.isConnected,MN=e=>{for(const t in e)if(mo(e[t]))return!0;return!1};function wf(e,t={}){const n=Array.isArray(e);if(Qt(e)||n)for(const r in e)Array.isArray(e[r])||Qt(e[r])&&!MN(e[r])?(t[r]=Array.isArray(e[r])?[]:{},wf(e[r],t[r])):_n(e[r])||(t[r]=!0);return t}function LN(e,t,n){const r=Array.isArray(e);if(Qt(e)||r)for(const s in e)Array.isArray(e[s])||Qt(e[s])&&!MN(e[s])?Ft(t)||xf(n[s])?n[s]=Array.isArray(e[s])?wf(e[s],[]):{...wf(e[s])}:LN(e[s],_n(t)?{}:t[s],n[s]):n[s]=!Jo(e[s],t[s]);return n}var nd=(e,t)=>LN(e,t,wf(t)),zN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ft(e)?e:t?e===""?NaN:e&&+e:n&&Qr(e)?new Date(e):r?r(e):e;function cp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ix(t)?t.files:Mx(t)?DN(e.refs).value:IN(t)?[...t.selectedOptions].map(({value:n})=>n):pu(t)?ON(e.refs).value:zN(Ft(t.value)?e.ref.value:t.value,e)}var _8=(e,t,n,r)=>{const s={};for(const o of e){const i=he(t,o);i&&mt(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},El=e=>Ft(e)?e:vf(e)?e.source:Qt(e)?vf(e.value)?e.value.source:e.value:e,S8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Kb(e,t,n){const r=he(e,n);if(r||Ox(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=he(t,o),a=he(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var k8=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,C8=(e,t)=>!Yh(he(e,t)).length&&Gt(e,t);const j8={mode:Sr.onSubmit,reValidateMode:Sr.onChange,shouldFocusError:!0};function E8(e={}){let t={...j8,...e},n={submitCount:0,isDirty:!1,isLoading:mo(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Qt(t.defaultValues)||Qt(t.values)?Tn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Tn(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:ap(),array:ap(),state:ap()},h=$b(t.mode),m=$b(t.reValidateMode),x=t.criteriaMode===Sr.all,p=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},w=async k=>{if(d.isValid||k){const P=t.resolver?$n((await R()).errors):await D(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},y=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(M=>{M&&(P?mt(n.validatingFields,M,P):Gt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!$n(n.validatingFields)}))},v=(k,P=[],M,K,L=!0,Y=!0)=>{if(K&&M){if(i.action=!0,Y&&Array.isArray(he(r,k))){const Q=M(he(r,k),K.argA,K.argB);L&&mt(r,k,Q)}if(Y&&Array.isArray(he(n.errors,k))){const Q=M(he(n.errors,k),K.argA,K.argB);L&&mt(n.errors,k,Q),C8(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(he(n.touchedFields,k))){const Q=M(he(n.touchedFields,k),K.argA,K.argB);L&&mt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=nd(s,o)),f.state.next({name:k,isDirty:N(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else mt(o,k,P)},b=(k,P)=>{mt(n.errors,k,P),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,P,M,K)=>{const L=he(r,k);if(L){const Y=he(o,k,Ft(M)?he(s,k):M);Ft(Y)||K&&K.defaultChecked||P?mt(o,k,P?Y:cp(L._f)):U(k,Y),i.mount&&w()}},j=(k,P,M,K,L)=>{let Y=!1,Q=!1;const te={name:k},ve=!!(he(r,k)&&he(r,k)._f&&he(r,k)._f.disabled);if(!M||K){d.isDirty&&(Q=n.isDirty,n.isDirty=te.isDirty=N(),Y=Q!==te.isDirty);const Ge=ve||Jo(he(s,k),P);Q=!!(!ve&&he(n.dirtyFields,k)),Ge||ve?Gt(n.dirtyFields,k):mt(n.dirtyFields,k,!0),te.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&Q!==!Ge}if(M){const Ge=he(n.touchedFields,k);Ge||(mt(n.touchedFields,k,M),te.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&Ge!==M)}return Y&&L&&f.state.next(te),Y?te:{}},T=(k,P,M,K)=>{const L=he(n.errors,k),Y=d.isValid&&qr(P)&&n.isValid!==P;if(e.delayError&&M?(c=p(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?mt(n.errors,k,M):Gt(n.errors,k)),(M?!Jo(L,M):L)||!$n(K)||Y){const Q={...K,...Y&&qr(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},R=async k=>{y(k,!0);const P=await t.resolver(o,t.context,_8(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y(k),P},A=async k=>{const{errors:P}=await R(k);if(k)for(const M of k){const K=he(P,M);K?mt(n.errors,M,K):Gt(n.errors,M)}else n.errors=P;return P},D=async(k,P,M={valid:!0})=>{for(const K in k){const L=k[K];if(L){const{_f:Y,...Q}=L;if(Y){const te=a.array.has(Y.name);y([K],!0);const ve=await Yb(L,o,x,t.shouldUseNativeValidation&&!P,te);if(y([K]),ve[Y.name]&&(M.valid=!1,P))break;!P&&(he(ve,Y.name)?te?v8(n.errors,ve,Y.name):mt(n.errors,Y.name,ve[Y.name]):Gt(n.errors,Y.name))}Q&&await D(Q,P,M)}}return M.valid},G=()=>{for(const k of a.unMount){const P=he(r,k);P&&(P._f.refs?P._f.refs.every(M=>!lp(M)):!lp(P._f.ref))&&Ie(k)}a.unMount=new Set},N=(k,P)=>(k&&P&&mt(o,k,P),!Jo($(),s)),z=(k,P,M)=>RN(k,a,{...i.mount?o:Ft(P)?s:Qr(k)?{[k]:P}:P},M,P),S=k=>Yh(he(i.mount?o:s,k,e.shouldUnregister?he(s,k,[]):[])),U=(k,P,M={})=>{const K=he(r,k);let L=P;if(K){const Y=K._f;Y&&(!Y.disabled&&mt(o,k,zN(P,Y)),L=yf(Y.ref)&&_n(P)?"":P,IN(Y.ref)?[...Y.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):Y.refs?pu(Y.ref)?Y.refs.length>1?Y.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(te=>te===Q.value):L===Q.value)):Y.refs[0]&&(Y.refs[0].checked=!!L):Y.refs.forEach(Q=>Q.checked=Q.value===L):Ix(Y.ref)?Y.ref.value="":(Y.ref.value=L,Y.ref.type||f.values.next({name:k,values:{...o}})))}(M.shouldDirty||M.shouldTouch)&&j(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,P,M)=>{for(const K in P){const L=P[K],Y=`${k}.${K}`,Q=he(r,Y);(a.array.has(k)||!xf(L)||Q&&!Q._f)&&!da(L)?J(Y,L,M):U(Y,L,M)}},F=(k,P,M={})=>{const K=he(r,k),L=a.array.has(k),Y=Tn(P);mt(o,k,Y),L?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:nd(s,o),isDirty:N(k,Y)})):K&&!K._f&&!_n(Y)?J(k,Y,M):U(k,Y,M),Ub(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},W=async k=>{i.mount=!0;const P=k.target;let M=P.name,K=!0;const L=he(r,M),Y=()=>P.type?cp(L._f):kN(k),Q=te=>{K=Number.isNaN(te)||te===he(o,M,te)};if(L){let te,ve;const Ge=Y(),Ue=k.type===gf.BLUR||k.type===gf.FOCUS_OUT,Et=!S8(L._f)&&!t.resolver&&!he(n.errors,M)&&!L._f.deps||k8(Ue,he(n.touchedFields,M),n.isSubmitted,m,h),nr=Ub(M,a,Ue);mt(o,M,Ge),Ue?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Kt=j(M,Ge,Ue,!1),fs=!$n(Kt)||nr;if(!Ue&&f.values.next({name:M,type:k.type,values:{...o}}),Et)return d.isValid&&w(),fs&&f.state.next({name:M,...nr?{}:Kt});if(!Ue&&nr&&f.state.next({...n}),t.resolver){const{errors:ct}=await R([M]);if(Q(Ge),K){const hs=Kb(n.errors,r,M),ms=Kb(ct,r,hs.name||M);te=ms.error,M=ms.name,ve=$n(ct)}}else y([M],!0),te=(await Yb(L,o,x,t.shouldUseNativeValidation))[M],y([M]),Q(Ge),K&&(te?ve=!1:d.isValid&&(ve=await D(r,!0)));K&&(L._f.deps&&X(L._f.deps),T(M,ve,te,Kt))}},I=(k,P)=>{if(he(n.errors,P)&&k.focus)return k.focus(),1},X=async(k,P={})=>{let M,K;const L=ec(k);if(t.resolver){const Y=await A(Ft(k)?k:L);M=$n(Y),K=k?!L.some(Q=>he(Y,Q)):M}else k?(K=(await Promise.all(L.map(async Y=>{const Q=he(r,Y);return await D(Q&&Q._f?{[Y]:Q}:Q)}))).every(Boolean),!(!K&&!n.isValid)&&w()):K=M=await D(r);return f.state.next({...!Qr(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),P.shouldFocus&&!K&&tc(r,I,k?L:a.mount),K},$=k=>{const P={...i.mount?o:s};return Ft(k)?P:Qr(k)?he(P,k):k.map(M=>he(P,M))},B=(k,P)=>({invalid:!!he((P||n).errors,k),isDirty:!!he((P||n).dirtyFields,k),error:he((P||n).errors,k),isValidating:!!he(n.validatingFields,k),isTouched:!!he((P||n).touchedFields,k)}),pe=k=>{k&&ec(k).forEach(P=>Gt(n.errors,P)),f.state.next({errors:k?n.errors:{}})},se=(k,P,M)=>{const K=(he(r,k,{_f:{}})._f||{}).ref,L=he(n.errors,k)||{},{ref:Y,message:Q,type:te,...ve}=L;mt(n.errors,k,{...ve,...P,ref:K}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&K&&K.focus&&K.focus()},oe=(k,P)=>mo(k)?f.values.subscribe({next:M=>k(z(void 0,P),M)}):z(k,P,!0),Ie=(k,P={})=>{for(const M of k?ec(k):a.mount)a.mount.delete(M),a.array.delete(M),P.keepValue||(Gt(r,M),Gt(o,M)),!P.keepError&&Gt(n.errors,M),!P.keepDirty&&Gt(n.dirtyFields,M),!P.keepTouched&&Gt(n.touchedFields,M),!P.keepIsValidating&&Gt(n.validatingFields,M),!t.shouldUnregister&&!P.keepDefaultValue&&Gt(s,M);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:N()}:{}}),!P.keepIsValid&&w()},ge=({disabled:k,name:P,field:M,fields:K,value:L})=>{if(qr(k)&&i.mount||k){const Y=k?void 0:Ft(L)?cp(M?M._f:he(K,P)._f):L;mt(o,P,Y),j(P,Y,!1,!1,!0)}},ke=(k,P={})=>{let M=he(r,k);const K=qr(P.disabled);return mt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),M?ge({field:M,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...K?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:El(P.min),max:El(P.max),minLength:El(P.minLength),maxLength:El(P.maxLength),pattern:El(P.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){ke(k,P),M=he(r,k);const Y=Ft(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=b8(Y),te=M._f.refs||[];if(Q?te.find(ve=>ve===Y):Y===M._f.ref)return;mt(r,k,{_f:{...M._f,...Q?{refs:[...te.filter(lp),Y,...Array.isArray(he(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else M=he(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(CN(a.array,k)&&i.action)&&a.unMount.add(k)}}},Pe=()=>t.shouldFocusError&&tc(r,I,a.mount),Fe=k=>{qr(k)&&(f.state.next({disabled:k}),tc(r,(P,M)=>{const K=he(r,M);K&&(P.disabled=K._f.disabled||k,Array.isArray(K._f.refs)&&K._f.refs.forEach(L=>{L.disabled=K._f.disabled||k}))},0,!1))},Me=(k,P)=>async M=>{let K;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Tn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:Q}=await R();n.errors=Y,L=Q}else await D(r);if(Gt(n.errors,"root"),$n(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(Y){K=Y}}else P&&await P({...n.errors},M),Pe(),setTimeout(Pe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$n(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},Re=(k,P={})=>{he(r,k)&&(Ft(P.defaultValue)?F(k,Tn(he(s,k))):(F(k,P.defaultValue),mt(s,k,Tn(P.defaultValue))),P.keepTouched||Gt(n.touchedFields,k),P.keepDirty||(Gt(n.dirtyFields,k),n.isDirty=P.defaultValue?N(k,Tn(he(s,k))):N()),P.keepError||(Gt(n.errors,k),d.isValid&&w()),f.state.next({...n}))},st=(k,P={})=>{const M=k?Tn(k):s,K=Tn(M),L=$n(k),Y=L?s:K;if(P.keepDefaultValues||(s=M),!P.keepValues){if(P.keepDirtyValues)for(const Q of a.mount)he(n.dirtyFields,Q)?mt(Y,Q,he(o,Q)):F(Q,he(Y,Q));else{if(Ax&&Ft(k))for(const Q of a.mount){const te=he(r,Q);if(te&&te._f){const ve=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(yf(ve)){const Ge=ve.closest("form");if(Ge){Ge.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?Tn(s):{}:Tn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:L?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!Jo(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:P.keepDirtyValues?P.keepDefaultValues&&o?nd(s,o):n.dirtyFields:P.keepDefaultValues&&k?nd(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,P)=>st(mo(k)?k(o):k,P);return{control:{register:ke,unregister:Ie,getFieldState:B,handleSubmit:Me,setError:se,_executeSchema:R,_getWatch:z,_getDirty:N,_updateValid:w,_removeUnmounted:G,_updateFieldArray:v,_updateDisabledField:ge,_getFieldArray:S,_reset:st,_resetDefaultValues:()=>mo(t.defaultValues)&&t.defaultValues().then(k=>{E(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:ke,handleSubmit:Me,watch:oe,setValue:F,getValues:$,reset:E,resetField:Re,clearErrors:pe,unregister:Ie,setError:se,setFocus:(k,P={})=>{const M=he(r,k),K=M&&M._f;if(K){const L=K.refs?K.refs[0]:K.ref;L.focus&&(L.focus(),P.shouldSelect&&L.select())}},getFieldState:B}}function nn(e={}){const t=We.useRef(),n=We.useRef(),[r,s]=We.useState({isDirty:!1,isValidating:!1,isLoading:mo(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:mo(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...E8(e),formState:r});const o=t.current.control;return o._options=e,Dx({subject:o._subjects.state,next:i=>{TN(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),We.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),We.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),We.useEffect(()=>{e.values&&!Jo(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),We.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),We.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),We.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=NN(r,o),t.current}var it;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(it||(it={}));var Lg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Lg||(Lg={}));const je=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lo=e=>{switch(typeof e){case"undefined":return je.undefined;case"string":return je.string;case"number":return isNaN(e)?je.nan:je.number;case"boolean":return je.boolean;case"function":return je.function;case"bigint":return je.bigint;case"symbol":return je.symbol;case"object":return Array.isArray(e)?je.array:e===null?je.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?je.promise:typeof Map<"u"&&e instanceof Map?je.map:typeof Set<"u"&&e instanceof Set?je.set:typeof Date<"u"&&e instanceof Date?je.date:je.object;default:return je.unknown}},le=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),N8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Gn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof Gn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Gn.create=e=>new Gn(e);const Fa=(e,t)=>{let n;switch(e.code){case le.invalid_type:e.received===je.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case le.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case le.invalid_union:n="Invalid input";break;case le.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case le.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case le.invalid_arguments:n="Invalid function arguments";break;case le.invalid_return_type:n="Invalid function return type";break;case le.invalid_date:n="Invalid date";break;case le.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case le.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case le.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case le.custom:n="Invalid input";break;case le.invalid_intersection_types:n="Intersection results could not be merged";break;case le.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case le.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let FN=Fa;function T8(e){FN=e}function bf(){return FN}const _f=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},P8=[];function _e(e,t){const n=bf(),r=_f({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Fa?void 0:Fa].filter(s=>!!s)});e.common.issues.push(r)}class yn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return He;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return He;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),fa=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),zg=e=>e.status==="aborted",Fg=e=>e.status==="dirty",Rc=e=>e.status==="valid",Ac=e=>typeof Promise<"u"&&e instanceof Promise;function Sf(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function $N(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));var Ll,zl;class as{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Gb=(e,t)=>{if(Rc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Gn(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class et{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return lo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ac(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lo(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Gb(s,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lo(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(Ac(s)?s:Promise.resolve(s));return Gb(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:le.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Ir({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return rs.create(this,this._def)}nullable(){return Do.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Tr.create(this,this._def)}promise(){return Ua.create(this,this._def)}or(t){return Mc.create([this,t],this._def)}and(t){return Lc.create(this,t,this._def)}transform(t){return new Ir({...Ze(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Vc({...Ze(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new Lx({typeName:Ve.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Bc({...Ze(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return gu.create(this,t)}readonly(){return Wc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R8=/^c[^\s-]{8,}$/i,A8=/^[0-9a-z]+$/,O8=/^[0-9A-HJKMNP-TV-Z]{26}$/,D8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,I8=/^[a-z0-9_-]{21}$/i,M8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,L8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,z8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let up;const F8=/^(?:(?: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])$/,$8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,U8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,UN="((\\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])))",V8=new RegExp(`^${UN}$`);function VN(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function B8(e){return new RegExp(`^${VN(e)}$`)}function BN(e){let t=`${UN}T${VN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function W8(e,t){return!!((t==="v4"||!t)&&F8.test(e)||(t==="v6"||!t)&&$8.test(e))}class jr extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==je.string){const o=this._getOrReturnCtx(t);return _e(o,{code:le.invalid_type,expected:je.string,received:o.parsedType}),He}const r=new yn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?_e(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&_e(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")L8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"email",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")up||(up=new RegExp(z8,"u")),up.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"emoji",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")D8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"uuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")I8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"nanoid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")R8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"cuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")A8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"cuid2",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")O8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"ulid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),_e(s,{validation:"url",code:le.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"regex",code:le.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),_e(s,{code:le.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),_e(s,{code:le.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),_e(s,{code:le.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?BN(o).test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:le.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?V8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:le.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?B8(o).test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:le.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?M8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"duration",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?W8(t.data,o.version)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"ip",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?U8.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"base64",code:le.invalid_string,message:o.message}),r.dirty()):it.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:le.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new jr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new jr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new jr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new jr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}jr.create=e=>{var t;return new jr({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};function H8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class Ro extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==je.number){const o=this._getOrReturnCtx(t);return _e(o,{code:le.invalid_type,expected:je.number,received:o.parsedType}),He}let r;const s=new yn;for(const o of this._def.checks)o.kind==="int"?it.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:le.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:le.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:le.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?H8(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:le.not_finite,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ro.create=e=>new Ro({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Ao extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==je.bigint){const o=this._getOrReturnCtx(t);return _e(o,{code:le.invalid_type,expected:je.bigint,received:o.parsedType}),He}let r;const s=new yn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:le.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:le.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new Ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Ao({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ao.create=e=>{var t;return new Ao({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};class Oc extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==je.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:le.invalid_type,expected:je.boolean,received:r.parsedType}),He}return kn(t.data)}}Oc.create=e=>new Oc({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class vi extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==je.date){const o=this._getOrReturnCtx(t);return _e(o,{code:le.invalid_type,expected:je.date,received:o.parsedType}),He}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return _e(o,{code:le.invalid_date}),He}const r=new yn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:le.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:le.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):it.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}vi.create=e=>new vi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ze(e)});class kf extends et{_parse(t){if(this._getType(t)!==je.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:le.invalid_type,expected:je.symbol,received:r.parsedType}),He}return kn(t.data)}}kf.create=e=>new kf({typeName:Ve.ZodSymbol,...Ze(e)});class Dc extends et{_parse(t){if(this._getType(t)!==je.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:le.invalid_type,expected:je.undefined,received:r.parsedType}),He}return kn(t.data)}}Dc.create=e=>new Dc({typeName:Ve.ZodUndefined,...Ze(e)});class Ic extends et{_parse(t){if(this._getType(t)!==je.null){const r=this._getOrReturnCtx(t);return _e(r,{code:le.invalid_type,expected:je.null,received:r.parsedType}),He}return kn(t.data)}}Ic.create=e=>new Ic({typeName:Ve.ZodNull,...Ze(e)});class $a extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}$a.create=e=>new $a({typeName:Ve.ZodAny,...Ze(e)});class oi extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}oi.create=e=>new oi({typeName:Ve.ZodUnknown,...Ze(e)});class $s extends et{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:le.invalid_type,expected:je.never,received:n.parsedType}),He}}$s.create=e=>new $s({typeName:Ve.ZodNever,...Ze(e)});class Cf extends et{_parse(t){if(this._getType(t)!==je.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:le.invalid_type,expected:je.void,received:r.parsedType}),He}return kn(t.data)}}Cf.create=e=>new Cf({typeName:Ve.ZodVoid,...Ze(e)});class Tr extends et{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==je.array)return _e(n,{code:le.invalid_type,expected:je.array,received:n.parsedType}),He;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(_e(n,{code:i?le.too_big:le.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(_e(n,{code:le.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(_e(n,{code:le.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new as(n,i,n.path,a)))).then(i=>yn.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new as(n,i,n.path,a)));return yn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Tr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Tr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Tr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Tr.create=(e,t)=>new Tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ze(t)});function Gi(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=rs.create(Gi(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof Tr?new Tr({...e._def,type:Gi(e.element)}):e instanceof rs?rs.create(Gi(e.unwrap())):e instanceof Do?Do.create(Gi(e.unwrap())):e instanceof ls?ls.create(e.items.map(t=>Gi(t))):e}class Rt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=it.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==je.object){const u=this._getOrReturnCtx(t);return _e(u,{code:le.invalid_type,expected:je.object,received:u.parsedType}),He}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof $s&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const c=[];for(const u of i){const d=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new as(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof $s){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(_e(s,{code:le.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new as(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>yn.mergeObjectSync(r,u)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Oe.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};return it.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}omit(t){const n={};return it.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}deepPartial(){return Gi(this)}partial(t){const n={};return it.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Rt({...this._def,shape:()=>n})}required(t){const n={};return it.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof rs;)o=o._def.innerType;n[r]=o}}),new Rt({...this._def,shape:()=>n})}keyof(){return WN(it.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:$s.create(),typeName:Ve.ZodObject,...Ze(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:$s.create(),typeName:Ve.ZodObject,...Ze(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:$s.create(),typeName:Ve.ZodObject,...Ze(t)});class Mc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Gn(a.ctx.common.issues));return _e(n,{code:le.invalid_union,unionErrors:i}),He}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(c=>new Gn(c));return _e(n,{code:le.invalid_union,unionErrors:a}),He}}get options(){return this._def.options}}Mc.create=(e,t)=>new Mc({options:e,typeName:Ve.ZodUnion,...Ze(t)});const xs=e=>e instanceof Fc?xs(e.schema):e instanceof Ir?xs(e.innerType()):e instanceof $c?[e.value]:e instanceof Oo?e.options:e instanceof Uc?it.objectValues(e.enum):e instanceof Vc?xs(e._def.innerType):e instanceof Dc?[void 0]:e instanceof Ic?[null]:e instanceof rs?[void 0,...xs(e.unwrap())]:e instanceof Do?[null,...xs(e.unwrap())]:e instanceof Lx||e instanceof Wc?xs(e.unwrap()):e instanceof Bc?xs(e._def.innerType):[];class Gh extends et{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.object)return _e(n,{code:le.invalid_type,expected:je.object,received:n.parsedType}),He;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:le.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=xs(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new Gh({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ze(r)})}}function $g(e,t){const n=lo(e),r=lo(t);if(e===t)return{valid:!0,data:e};if(n===je.object&&r===je.object){const s=it.objectKeys(t),o=it.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const c=$g(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(n===je.array&&r===je.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],a=t[o],c=$g(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===je.date&&r===je.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Lc extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,i)=>{if(zg(o)||zg(i))return He;const a=$g(o.value,i.value);return a.valid?((Fg(o)||Fg(i))&&n.dirty(),{status:n.value,value:a.data}):(_e(r,{code:le.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Lc.create=(e,t,n)=>new Lc({left:e,right:t,typeName:Ve.ZodIntersection,...Ze(n)});class ls extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.array)return _e(r,{code:le.invalid_type,expected:je.array,received:r.parsedType}),He;if(r.data.length<this._def.items.length)return _e(r,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new as(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>yn.mergeArray(n,i)):yn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ls({...this._def,rest:t})}}ls.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ls({items:e,typeName:Ve.ZodTuple,rest:null,...Ze(t)})};class zc extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.object)return _e(r,{code:le.invalid_type,expected:je.object,received:r.parsedType}),He;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new as(r,a,r.path,a)),value:i._parse(new as(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?yn.mergeObjectAsync(n,s):yn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof et?new zc({keyType:t,valueType:n,typeName:Ve.ZodRecord,...Ze(r)}):new zc({keyType:jr.create(),valueType:t,typeName:Ve.ZodRecord,...Ze(n)})}}class jf extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.map)return _e(r,{code:le.invalid_type,expected:je.map,received:r.parsedType}),He;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,c],u)=>({key:s._parse(new as(r,a,r.path,[u,"key"])),value:o._parse(new as(r,c,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}jf.create=(e,t,n)=>new jf({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ze(n)});class xi extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.set)return _e(r,{code:le.invalid_type,expected:je.set,received:r.parsedType}),He;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(_e(r,{code:le.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(_e(r,{code:le.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(c){const u=new Set;for(const d of c){if(d.status==="aborted")return He;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((c,u)=>o._parse(new as(r,c,r.path,u)));return r.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,n){return new xi({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new xi({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}xi.create=(e,t)=>new xi({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ze(t)});class Ea extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.function)return _e(n,{code:le.invalid_type,expected:je.function,received:n.parsedType}),He;function r(a,c){return _f({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,bf(),Fa].filter(u=>!!u),issueData:{code:le.invalid_arguments,argumentsError:c}})}function s(a,c){return _f({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,bf(),Fa].filter(u=>!!u),issueData:{code:le.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ua){const a=this;return kn(async function(...c){const u=new Gn([]),d=await a._def.args.parseAsync(c,o).catch(m=>{throw u.addIssue(r(c,m)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(m=>{throw u.addIssue(s(f,m)),u})})}else{const a=this;return kn(function(...c){const u=a._def.args.safeParse(c,o);if(!u.success)throw new Gn([r(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Gn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ea({...this._def,args:ls.create(t).rest(oi.create())})}returns(t){return new Ea({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ea({args:t||ls.create([]).rest(oi.create()),returns:n||oi.create(),typeName:Ve.ZodFunction,...Ze(r)})}}class Fc extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Fc.create=(e,t)=>new Fc({getter:e,typeName:Ve.ZodLazy,...Ze(t)});class $c extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:le.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}$c.create=(e,t)=>new $c({value:e,typeName:Ve.ZodLiteral,...Ze(t)});function WN(e,t){return new Oo({values:e,typeName:Ve.ZodEnum,...Ze(t)})}class Oo extends et{constructor(){super(...arguments),Ll.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:it.joinValues(r),received:n.parsedType,code:le.invalid_type}),He}if(Sf(this,Ll)||$N(this,Ll,new Set(this._def.values)),!Sf(this,Ll).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:le.invalid_enum_value,options:r}),He}return kn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Oo.create(t,{...this._def,...n})}exclude(t,n=this._def){return Oo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ll=new WeakMap;Oo.create=WN;class Uc extends et{constructor(){super(...arguments),zl.set(this,void 0)}_parse(t){const n=it.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==je.string&&r.parsedType!==je.number){const s=it.objectValues(n);return _e(r,{expected:it.joinValues(s),received:r.parsedType,code:le.invalid_type}),He}if(Sf(this,zl)||$N(this,zl,new Set(it.getValidEnumValues(this._def.values))),!Sf(this,zl).has(t.data)){const s=it.objectValues(n);return _e(r,{received:r.data,code:le.invalid_enum_value,options:s}),He}return kn(t.data)}get enum(){return this._def.values}}zl=new WeakMap;Uc.create=(e,t)=>new Uc({values:e,typeName:Ve.ZodNativeEnum,...Ze(t)});class Ua extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.promise&&n.common.async===!1)return _e(n,{code:le.invalid_type,expected:je.promise,received:n.parsedType}),He;const r=n.parsedType===je.promise?n.data:Promise.resolve(n.data);return kn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ua.create=(e,t)=>new Ua({type:e,typeName:Ve.ZodPromise,...Ze(t)});class Ir extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{_e(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return He;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?He:c.status==="dirty"||n.value==="dirty"?fa(c.value):c});{if(n.value==="aborted")return He;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?He:a.status==="dirty"||n.value==="dirty"?fa(a.value):a}}if(s.type==="refinement"){const i=a=>{const c=s.refinement(a,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Rc(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Rc(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);it.assertNever(s)}}Ir.create=(e,t,n)=>new Ir({schema:e,typeName:Ve.ZodEffects,effect:t,...Ze(n)});Ir.createWithPreprocess=(e,t,n)=>new Ir({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ze(n)});class rs extends et{_parse(t){return this._getType(t)===je.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:Ve.ZodOptional,...Ze(t)});class Do extends et{_parse(t){return this._getType(t)===je.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Do.create=(e,t)=>new Do({innerType:e,typeName:Ve.ZodNullable,...Ze(t)});class Vc extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===je.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Vc.create=(e,t)=>new Vc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class Bc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ac(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Gn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Bc.create=(e,t)=>new Bc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class Ef extends et{_parse(t){if(this._getType(t)!==je.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:le.invalid_type,expected:je.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}Ef.create=e=>new Ef({typeName:Ve.ZodNaN,...Ze(e)});const Y8=Symbol("zod_brand");class Lx extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class gu extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?He:o.status==="dirty"?(n.dirty(),fa(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new gu({in:t,out:n,typeName:Ve.ZodPipeline})}}class Wc extends et{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Rc(s)&&(s.value=Object.freeze(s.value)),s);return Ac(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Wc.create=(e,t)=>new Wc({innerType:e,typeName:Ve.ZodReadonly,...Ze(t)});function HN(e,t={},n){return e?$a.create().superRefine((r,s)=>{var o,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:c})}}):$a.create()}const K8={object:Rt.lazycreate};var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const G8=(e,t={message:`Input not instance of ${e.name}`})=>HN(n=>n instanceof e,t),YN=jr.create,KN=Ro.create,Z8=Ef.create,q8=Ao.create,GN=Oc.create,X8=vi.create,Q8=kf.create,J8=Dc.create,eV=Ic.create,tV=$a.create,nV=oi.create,rV=$s.create,sV=Cf.create,oV=Tr.create,iV=Rt.create,aV=Rt.strictCreate,lV=Mc.create,cV=Gh.create,uV=Lc.create,dV=ls.create,fV=zc.create,hV=jf.create,mV=xi.create,pV=Ea.create,gV=Fc.create,yV=$c.create,vV=Oo.create,xV=Uc.create,wV=Ua.create,Zb=Ir.create,bV=rs.create,_V=Do.create,SV=Ir.createWithPreprocess,kV=gu.create,CV=()=>YN().optional(),jV=()=>KN().optional(),EV=()=>GN().optional(),NV={string:e=>jr.create({...e,coerce:!0}),number:e=>Ro.create({...e,coerce:!0}),boolean:e=>Oc.create({...e,coerce:!0}),bigint:e=>Ao.create({...e,coerce:!0}),date:e=>vi.create({...e,coerce:!0})},TV=He;var ie=Object.freeze({__proto__:null,defaultErrorMap:Fa,setErrorMap:T8,getErrorMap:bf,makeIssue:_f,EMPTY_PATH:P8,addIssueToContext:_e,ParseStatus:yn,INVALID:He,DIRTY:fa,OK:kn,isAborted:zg,isDirty:Fg,isValid:Rc,isAsync:Ac,get util(){return it},get objectUtil(){return Lg},ZodParsedType:je,getParsedType:lo,ZodType:et,datetimeRegex:BN,ZodString:jr,ZodNumber:Ro,ZodBigInt:Ao,ZodBoolean:Oc,ZodDate:vi,ZodSymbol:kf,ZodUndefined:Dc,ZodNull:Ic,ZodAny:$a,ZodUnknown:oi,ZodNever:$s,ZodVoid:Cf,ZodArray:Tr,ZodObject:Rt,ZodUnion:Mc,ZodDiscriminatedUnion:Gh,ZodIntersection:Lc,ZodTuple:ls,ZodRecord:zc,ZodMap:jf,ZodSet:xi,ZodFunction:Ea,ZodLazy:Fc,ZodLiteral:$c,ZodEnum:Oo,ZodNativeEnum:Uc,ZodPromise:Ua,ZodEffects:Ir,ZodTransformer:Ir,ZodOptional:rs,ZodNullable:Do,ZodDefault:Vc,ZodCatch:Bc,ZodNaN:Ef,BRAND:Y8,ZodBranded:Lx,ZodPipeline:gu,ZodReadonly:Wc,custom:HN,Schema:et,ZodSchema:et,late:K8,get ZodFirstPartyTypeKind(){return Ve},coerce:NV,any:tV,array:oV,bigint:q8,boolean:GN,date:X8,discriminatedUnion:cV,effect:Zb,enum:vV,function:pV,instanceof:G8,intersection:uV,lazy:gV,literal:yV,map:hV,nan:Z8,nativeEnum:xV,never:rV,null:eV,nullable:_V,number:KN,object:iV,oboolean:EV,onumber:jV,optional:bV,ostring:CV,pipeline:kV,preprocess:SV,promise:wV,record:fV,set:mV,strictObject:aV,string:YN,symbol:Q8,transformer:Zb,tuple:dV,undefined:J8,union:lV,unknown:nV,void:sV,NEVER:TV,ZodIssueCode:le,quotelessJson:N8,ZodError:Gn});const qb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=he(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ZN=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?qb(r.ref,n,e):r.refs&&r.refs.forEach(s=>qb(s,n,e))}},PV=(e,t)=>{t.shouldUseNativeValidation&&ZN(e,t);const n={};for(const r in e){const s=he(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(RV(t.names||Object.keys(e),r)){const i=Object.assign({},he(n,r));mt(i,"root",o),mt(n,r,i)}else mt(n,r,o)}return n},RV=(e,t)=>e.some(n=>n.startsWith(t+"."));var AV=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=AN(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},rn=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&ZN({},o),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:PV(AV(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}};const qN=g.forwardRef(({...e},t)=>l.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));qN.displayName="Breadcrumb";const XN=g.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:re("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));XN.displayName="BreadcrumbList";const Ug=g.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("inline-flex items-center gap-1.5",e),...t}));Ug.displayName="BreadcrumbItem";const QN=g.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?ss:"a";return l.jsx(s,{ref:r,className:re("transition-colors hover:text-foreground",t),...n})});QN.displayName="BreadcrumbLink";const JN=g.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:re("font-normal text-foreground",e),...t}));JN.displayName="BreadcrumbPage";const eT=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:re("[&>svg]:size-3.5",t),...n,children:e??l.jsx(ck,{})});eT.displayName="BreadcrumbSeparator";function OV(e,t=[]){let n=[];function r(o,i){const a=g.createContext(i),c=n.length;n=[...n,i];const u=f=>{var y;const{scope:h,children:m,...x}=f,p=((y=h==null?void 0:h[e])==null?void 0:y[c])||a,w=g.useMemo(()=>x,Object.values(x));return l.jsx(p.Provider,{value:w,children:m})};u.displayName=o+"Provider";function d(f,h){var p;const m=((p=h==null?void 0:h[e])==null?void 0:p[c])||a,x=g.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=n.map(i=>g.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,DV(s,...t)]}function DV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function IV(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var tT=e=>{const{present:t,children:n}=e,r=MV(t),s=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=Ke(r.ref,LV(s));return typeof n=="function"||r.isPresent?g.cloneElement(s,{ref:o}):null};tT.displayName="Presence";function MV(e){const[t,n]=g.useState(),r=g.useRef({}),s=g.useRef(e),o=g.useRef("none"),i=e?"mounted":"unmounted",[a,c]=IV(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=rd(r.current);o.current=a==="mounted"?u:"none"},[a]),Bt(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,m=rd(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Bt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const p=rd(r.current).includes(m.animationName);if(m.target===t&&p&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=m=>{m.target===t&&(o.current=rd(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function rd(e){return(e==null?void 0:e.animationName)||"none"}function LV(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zx="Collapsible",[zV,b9]=OV(zx),[FV,Fx]=zV(zx),nT=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[c=!1,u]=Ln({prop:r,defaultProp:s,onChange:i});return l.jsx(FV,{scope:n,disabled:o,contentId:Mn(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Te.div,{"data-state":Vx(c),"data-disabled":o?"":void 0,...a,ref:t})})});nT.displayName=zx;var rT="CollapsibleTrigger",sT=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=Fx(rT,n);return l.jsx(Te.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Vx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});sT.displayName=rT;var $x="CollapsibleContent",Ux=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Fx($x,e.__scopeCollapsible);return l.jsx(tT,{present:n||s.open,children:({present:o})=>l.jsx($V,{...r,ref:t,present:o})})});Ux.displayName=$x;var $V=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=Fx($x,n),[a,c]=g.useState(r),u=g.useRef(null),d=Ke(t,u),f=g.useRef(0),h=f.current,m=g.useRef(0),x=m.current,p=i.open||a,w=g.useRef(p),y=g.useRef();return g.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),Bt(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();f.current=b.height,m.current=b.width,w.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),c(r)}},[i.open,r]),l.jsx(Te.div,{"data-state":Vx(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...o,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:p&&s})});function Vx(e){return e?"open":"closed"}var UV=nT;const VV=UV,BV=sT,oT=g.forwardRef(({className:e,...t},n)=>l.jsx(Ux,{ref:n,className:re("overflow-y-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...t}));oT.displayName=Ux.displayName;var WV="Label",iT=g.forwardRef((e,t)=>l.jsx(Te.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));iT.displayName=WV;var aT=iT;const HV=Jc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Vt=g.forwardRef(({className:e,...t},n)=>l.jsx(aT,{ref:n,className:re(HV(),e),...t}));Vt.displayName=aT.displayName;const sn=h8,lT=g.createContext({}),xe=({...e})=>l.jsx(lT.Provider,{value:{name:e.name},children:l.jsx(y8,{...e})}),Zh=()=>{const e=g.useContext(lT),t=g.useContext(cT),{getFieldState:n,formState:r}=Kh(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},cT=g.createContext({}),ye=g.forwardRef(({className:e,...t},n)=>{const r=g.useId();return l.jsx(cT.Provider,{value:{id:r},children:l.jsx("div",{ref:n,className:re("space-y-2",e),...t})})});ye.displayName="FormItem";const we=g.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Zh();return l.jsx(Vt,{ref:n,className:re(r&&"text-destructive",e),htmlFor:s,...t})});we.displayName="FormLabel";const be=g.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Zh();return l.jsx(ss,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});be.displayName="FormControl";const YV=g.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Zh();return l.jsx("p",{ref:n,id:r,className:re("text-sm text-muted-foreground",e),...t})});YV.displayName="FormDescription";const fe=g.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=Zh(),{t:i}=Ye(),a=s?i(String(s==null?void 0:s.message)):t;return a?l.jsx("p",{ref:r,id:o,className:re("text-sm font-medium text-destructive",e),...n,children:a}):null});fe.displayName="FormMessage";const de=g.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:re("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));de.displayName="Input";function Vg(e,[t,n]){return Math.min(n,Math.max(t,e))}var KV=[" ","Enter","ArrowUp","ArrowDown"],GV=[" ","Enter"],yu="Select",[qh,Xh,ZV]=eu(yu),[ll,_9]=un(yu,[ZV,nl]),Qh=nl(),[qV,Fo]=ll(yu),[XV,QV]=ll(yu),uT=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:m}=e,x=Qh(t),[p,w]=g.useState(null),[y,v]=g.useState(null),[b,_]=g.useState(!1),C=Ci(u),[j=!1,T]=Ln({prop:r,defaultProp:s,onChange:o}),[R,A]=Ln({prop:i,defaultProp:a,onChange:c}),D=g.useRef(null),G=p?!!p.closest("form"):!0,[N,z]=g.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return l.jsx(bv,{...x,children:l.jsxs(qV,{required:m,scope:t,trigger:p,onTriggerChange:w,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Mn(),value:R,onValueChange:A,open:j,onOpenChange:T,dir:C,triggerPointerDownPosRef:D,disabled:h,children:[l.jsx(qh.Provider,{scope:t,children:l.jsx(XV,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(U=>{z(J=>new Set(J).add(U))},[]),onNativeOptionRemove:g.useCallback(U=>{z(J=>{const F=new Set(J);return F.delete(U),F})},[]),children:n})}),G?l.jsxs(MT,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:U=>A(U.target.value),disabled:h,children:[R===void 0?l.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};uT.displayName=yu;var dT="SelectTrigger",fT=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Qh(n),i=Fo(dT,n),a=i.disabled||r,c=Ke(t,i.onTriggerChange),u=Xh(n),[d,f,h]=LT(x=>{const p=u().filter(v=>!v.disabled),w=p.find(v=>v.value===i.value),y=zT(p,x,w);y!==void 0&&i.onValueChange(y.value)}),m=()=>{a||(i.onOpenChange(!0),h())};return l.jsx(_v,{asChild:!0,...o,children:l.jsx(Te.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":IT(i.value)?"":void 0,...s,ref:c,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const p=x.target;p.hasPointerCapture(x.pointerId)&&p.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const p=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(p&&x.key===" ")&&KV.includes(x.key)&&(m(),x.preventDefault())})})})});fT.displayName=dT;var hT="SelectValue",mT=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,c=Fo(hT,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ke(t,c.onValueNodeChange);return Bt(()=>{u(d)},[u,d]),l.jsx(Te.span,{...a,ref:f,style:{pointerEvents:"none"},children:IT(c.value)?l.jsx(l.Fragment,{children:i}):o})});mT.displayName=hT;var JV="SelectIcon",pT=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return l.jsx(Te.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});pT.displayName=JV;var eB="SelectPortal",gT=e=>l.jsx(nu,{asChild:!0,...e});gT.displayName=eB;var wi="SelectContent",yT=g.forwardRef((e,t)=>{const n=Fo(wi,e.__scopeSelect),[r,s]=g.useState();if(Bt(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Bs.createPortal(l.jsx(vT,{scope:e.__scopeSelect,children:l.jsx(qh.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),o):null}return l.jsx(xT,{...e,ref:t})});yT.displayName=wi;var _s=10,[vT,$o]=ll(wi),tB="SelectContentImpl",xT=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w,...y}=e,v=Fo(wi,n),[b,_]=g.useState(null),[C,j]=g.useState(null),T=Ke(t,ge=>_(ge)),[R,A]=g.useState(null),[D,G]=g.useState(null),N=Xh(n),[z,S]=g.useState(!1),U=g.useRef(!1);g.useEffect(()=>{if(b)return Ev(b)},[b]),dv();const J=g.useCallback(ge=>{const[ke,...Pe]=N().map(Re=>Re.ref.current),[Fe]=Pe.slice(-1),Me=document.activeElement;for(const Re of ge)if(Re===Me||(Re==null||Re.scrollIntoView({block:"nearest"}),Re===ke&&C&&(C.scrollTop=0),Re===Fe&&C&&(C.scrollTop=C.scrollHeight),Re==null||Re.focus(),document.activeElement!==Me))return},[N,C]),F=g.useCallback(()=>J([R,b]),[J,R,b]);g.useEffect(()=>{z&&F()},[z,F]);const{onOpenChange:W,triggerPointerDownPosRef:I}=v;g.useEffect(()=>{if(b){let ge={x:0,y:0};const ke=Fe=>{var Me,Re;ge={x:Math.abs(Math.round(Fe.pageX)-(((Me=I.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Re=I.current)==null?void 0:Re.y)??0))}},Pe=Fe=>{ge.x<=10&&ge.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",ke),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ke),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ke),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[b,W,I]),g.useEffect(()=>{const ge=()=>W(!1);return window.addEventListener("blur",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("blur",ge),window.removeEventListener("resize",ge)}},[W]);const[X,$]=LT(ge=>{const ke=N().filter(Me=>!Me.disabled),Pe=ke.find(Me=>Me.ref.current===document.activeElement),Fe=zT(ke,ge,Pe);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=g.useCallback((ge,ke,Pe)=>{const Fe=!U.current&&!Pe;(v.value!==void 0&&v.value===ke||Fe)&&(A(ge),Fe&&(U.current=!0))},[v.value]),pe=g.useCallback(()=>b==null?void 0:b.focus(),[b]),se=g.useCallback((ge,ke,Pe)=>{const Fe=!U.current&&!Pe;(v.value!==void 0&&v.value===ke||Fe)&&G(ge)},[v.value]),oe=r==="popper"?Bg:wT,Ie=oe===Bg?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w}:{};return l.jsx(vT,{scope:n,content:b,viewport:C,onViewportChange:j,itemRefCallback:B,selectedItem:R,onItemLeave:pe,itemTextRefCallback:se,focusSelectedItem:F,selectedItemText:D,position:r,isPositioned:z,searchRef:X,children:l.jsx(gh,{as:ss,allowPinchZoom:!0,children:l.jsx(dh,{asChild:!0,trapped:v.open,onMountAutoFocus:ge=>{ge.preventDefault()},onUnmountAutoFocus:ue(s,ge=>{var ke;(ke=v.trigger)==null||ke.focus({preventScroll:!0}),ge.preventDefault()}),children:l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:ge=>ge.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:l.jsx(oe,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:ge=>ge.preventDefault(),...y,...Ie,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ue(y.onKeyDown,ge=>{const ke=ge.ctrlKey||ge.altKey||ge.metaKey;if(ge.key==="Tab"&&ge.preventDefault(),!ke&&ge.key.length===1&&$(ge.key),["ArrowUp","ArrowDown","Home","End"].includes(ge.key)){let Fe=N().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(ge.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ge.key)){const Me=ge.target,Re=Fe.indexOf(Me);Fe=Fe.slice(Re+1)}setTimeout(()=>J(Fe)),ge.preventDefault()}})})})})})})});xT.displayName=tB;var nB="SelectItemAlignedPosition",wT=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Fo(wi,n),i=$o(wi,n),[a,c]=g.useState(null),[u,d]=g.useState(null),f=Ke(t,T=>d(T)),h=Xh(n),m=g.useRef(!1),x=g.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:y,focusSelectedItem:v}=i,b=g.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&p&&w&&y){const T=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(o.dir!=="rtl"){const Me=D.left-R.left,Re=A.left-Me,st=T.left-Re,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-_s,O=Vg(Re,[_s,Z-ee]);a.style.minWidth=E+"px",a.style.left=O+"px"}else{const Me=R.right-D.right,Re=window.innerWidth-A.right-Me,st=window.innerWidth-T.right-Re,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-_s,O=Vg(Re,[_s,Z-ee]);a.style.minWidth=E+"px",a.style.right=O+"px"}const G=h(),N=window.innerHeight-_s*2,z=p.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),F=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+z+W+F,X=Math.min(w.offsetHeight*5,I),$=window.getComputedStyle(p),B=parseInt($.paddingTop,10),pe=parseInt($.paddingBottom,10),se=T.top+T.height/2-_s,oe=N-se,Ie=w.offsetHeight/2,ge=w.offsetTop+Ie,ke=U+J+ge,Pe=I-ke;if(ke<=se){const Me=w===G[G.length-1].ref.current;a.style.bottom="0px";const Re=u.clientHeight-p.offsetTop-p.offsetHeight,st=Math.max(oe,Ie+(Me?pe:0)+Re+F),E=ke+st;a.style.height=E+"px"}else{const Me=w===G[0].ref.current;a.style.top="0px";const st=Math.max(se,U+p.offsetTop+(Me?B:0)+Ie)+Pe;a.style.height=st+"px",p.scrollTop=ke-se+p.offsetTop}a.style.margin=`${_s}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,a,u,p,w,y,o.dir,r]);Bt(()=>b(),[b]);const[_,C]=g.useState();Bt(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=g.useCallback(T=>{T&&x.current===!0&&(b(),v==null||v(),x.current=!1)},[b,v]);return l.jsx(sB,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:l.jsx(Te.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});wT.displayName=nB;var rB="SelectPopperPosition",Bg=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=_s,...o}=e,i=Qh(n);return l.jsx(Sv,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Bg.displayName=rB;var[sB,Bx]=ll(wi,{}),Wg="SelectViewport",bT=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=$o(Wg,n),i=Bx(Wg,n),a=Ke(t,o.onViewportChange),c=g.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(qh.Slot,{scope:n,children:l.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const x=window.innerHeight-_s*2,p=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),y=Math.max(p,w);if(y<x){const v=y+m,b=Math.min(x,v),_=v-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});bT.displayName=Wg;var _T="SelectGroup",[oB,iB]=ll(_T),ST=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Mn();return l.jsx(oB,{scope:n,id:s,children:l.jsx(Te.div,{role:"group","aria-labelledby":s,...r,ref:t})})});ST.displayName=_T;var kT="SelectLabel",CT=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=iB(kT,n);return l.jsx(Te.div,{id:s.id,...r,ref:t})});CT.displayName=kT;var Nf="SelectItem",[aB,jT]=ll(Nf),ET=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=Fo(Nf,n),c=$o(Nf,n),u=a.value===r,[d,f]=g.useState(o??""),[h,m]=g.useState(!1),x=Ke(t,y=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,y,r,s)}),p=Mn(),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(aB,{scope:n,value:r,disabled:s,textId:p,isSelected:u,onItemTextChange:g.useCallback(y=>{f(v=>v||((y==null?void 0:y.textContent)??"").trim())},[]),children:l.jsx(qh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:l.jsx(Te.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:ue(i.onFocus,()=>m(!0)),onBlur:ue(i.onBlur,()=>m(!1)),onPointerUp:ue(i.onPointerUp,w),onPointerMove:ue(i.onPointerMove,y=>{var v;s?(v=c.onItemLeave)==null||v.call(c):y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,y=>{var v;y.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ue(i.onKeyDown,y=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&y.key===" "||(GV.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});ET.displayName=Nf;var Fl="SelectItemText",NT=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Fo(Fl,n),a=$o(Fl,n),c=jT(Fl,n),u=QV(Fl,n),[d,f]=g.useState(null),h=Ke(t,y=>f(y),c.onItemTextChange,y=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,y,c.value,c.disabled)}),m=d==null?void 0:d.textContent,x=g.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return Bt(()=>(p(x),()=>w(x)),[p,w,x]),l.jsxs(l.Fragment,{children:[l.jsx(Te.span,{id:c.textId,...o,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Bs.createPortal(o.children,i.valueNode):null]})});NT.displayName=Fl;var TT="SelectItemIndicator",PT=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return jT(TT,n).isSelected?l.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});PT.displayName=TT;var Hg="SelectScrollUpButton",RT=g.forwardRef((e,t)=>{const n=$o(Hg,e.__scopeSelect),r=Bx(Hg,e.__scopeSelect),[s,o]=g.useState(!1),i=Ke(t,r.onScrollButtonChange);return Bt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(OT,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});RT.displayName=Hg;var Yg="SelectScrollDownButton",AT=g.forwardRef((e,t)=>{const n=$o(Yg,e.__scopeSelect),r=Bx(Yg,e.__scopeSelect),[s,o]=g.useState(!1),i=Ke(t,r.onScrollButtonChange);return Bt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(OT,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});AT.displayName=Yg;var OT=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=$o("SelectScrollButton",n),i=g.useRef(null),a=Xh(n),c=g.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),Bt(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),l.jsx(Te.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{c()})})}),lB="SelectSeparator",DT=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});DT.displayName=lB;var Kg="SelectArrow",cB=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Qh(n),o=Fo(Kg,n),i=$o(Kg,n);return o.open&&i.position==="popper"?l.jsx(kv,{...s,...r,ref:t}):null});cB.displayName=Kg;function IT(e){return e===""||e===void 0}var MT=g.forwardRef((e,t)=>{const{value:n,...r}=e,s=g.useRef(null),o=Ke(t,s),i=jx(n);return g.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),l.jsx(hu,{asChild:!0,children:l.jsx("select",{...r,ref:o,defaultValue:n})})});MT.displayName="BubbleSelect";function LT(e){const t=Dt(e),n=g.useRef(""),r=g.useRef(0),s=g.useCallback(i=>{const a=n.current+i;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function zT(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=uB(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function uB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dB=uT,FT=fT,fB=mT,hB=pT,mB=gT,$T=yT,pB=bT,gB=ST,UT=CT,VT=ET,yB=NT,vB=PT,BT=RT,WT=AT,HT=DT;const ii=dB,Na=gB,ai=fB,ko=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(FT,{ref:r,className:re("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(hB,{asChild:!0,children:l.jsx(sv,{className:"h-4 w-4 opacity-50"})})]}));ko.displayName=FT.displayName;const YT=g.forwardRef(({className:e,...t},n)=>l.jsx(BT,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(uI,{className:"h-4 w-4"})}));YT.displayName=BT.displayName;const KT=g.forwardRef(({className:e,...t},n)=>l.jsx(WT,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(sv,{className:"h-4 w-4"})}));KT.displayName=WT.displayName;const Co=g.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>l.jsx(mB,{children:l.jsxs($T,{ref:s,className:re("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(YT,{}),l.jsx(pB,{className:re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(KT,{})]})}));Co.displayName=$T.displayName;const Va=g.forwardRef(({className:e,...t},n)=>l.jsx(UT,{ref:n,className:re("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Va.displayName=UT.displayName;const Pn=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(VT,{ref:r,className:re("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(vB,{children:l.jsx(lk,{className:"h-4 w-4"})})}),l.jsx(yB,{children:t})]}));Pn.displayName=VT.displayName;const xB=g.forwardRef(({className:e,...t},n)=>l.jsx(HT,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));xB.displayName=HT.displayName;const cl=Vv,ul=Bv,wB=Wv,GT=g.forwardRef(({className:e,...t},n)=>l.jsx(ou,{ref:n,className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));GT.displayName=ou.displayName;const Pi=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(wB,{children:[l.jsx(GT,{}),l.jsxs(iu,{ref:r,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(wh,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(av,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pi.displayName=iu.displayName;const Ri=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ri.displayName="DialogHeader";const Jh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jh.displayName="DialogFooter";const Ai=g.forwardRef(({className:e,...t},n)=>l.jsx(au,{ref:n,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));Ai.displayName=au.displayName;const ZT=g.forwardRef(({className:e,...t},n)=>l.jsx(lu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));ZT.displayName=lu.displayName;function bB(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Wx="ScrollArea",[qT,S9]=un(Wx),[_B,gr]=qT(Wx),XT=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(null),[m,x]=g.useState(null),[p,w]=g.useState(null),[y,v]=g.useState(0),[b,_]=g.useState(0),[C,j]=g.useState(!1),[T,R]=g.useState(!1),A=Ke(t,G=>c(G)),D=Ci(s);return l.jsx(_B,{scope:n,type:r,dir:D,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:p,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:v,onCornerHeightChange:_,children:l.jsx(Te.div,{dir:D,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});XT.displayName=Wx;var QT="ScrollAreaViewport",JT=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,i=gr(QT,n),a=g.useRef(null),c=Ke(t,a,i.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),l.jsx(Te.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});JT.displayName=QT;var ds="ScrollAreaScrollbar",Hx=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gr(ds,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return g.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?l.jsx(SB,{...r,ref:t,forceMount:n}):s.type==="scroll"?l.jsx(kB,{...r,ref:t,forceMount:n}):s.type==="auto"?l.jsx(e2,{...r,ref:t,forceMount:n}):s.type==="always"?l.jsx(Yx,{...r,ref:t}):null});Hx.displayName=ds;var SB=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gr(ds,e.__scopeScrollArea),[o,i]=g.useState(!1);return g.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),l.jsx(dn,{present:n||o,children:l.jsx(e2,{"data-state":o?"visible":"hidden",...r,ref:t})})}),kB=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gr(ds,e.__scopeScrollArea),o=e.orientation==="horizontal",i=tm(()=>c("SCROLL_END"),100),[a,c]=bB("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),g.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(c("SCROLL"),i()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,o,c,i]),l.jsx(dn,{present:n||a!=="hidden",children:l.jsx(Yx,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),e2=g.forwardRef((e,t)=>{const n=gr(ds,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,i]=g.useState(!1),a=e.orientation==="horizontal",c=tm(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?u:d)}},10);return Ba(n.viewport,c),Ba(n.content,c),l.jsx(dn,{present:r||o,children:l.jsx(Yx,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Yx=g.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=gr(ds,e.__scopeScrollArea),o=g.useRef(null),i=g.useRef(0),[a,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=o2(a.viewport,a.content),d={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,m){return PB(h,i.current,a,m)}return n==="horizontal"?l.jsx(CB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,m=Xb(h,a,s.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?l.jsx(jB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,m=Xb(h,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),CB=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=gr(ds,e.__scopeScrollArea),[i,a]=g.useState(),c=g.useRef(null),u=Ke(t,c,o.onScrollbarXChange);return g.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(n2,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":em(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),a2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Pf(i.paddingLeft),paddingEnd:Pf(i.paddingRight)}})}})}),jB=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=gr(ds,e.__scopeScrollArea),[i,a]=g.useState(),c=g.useRef(null),u=Ke(t,c,o.onScrollbarYChange);return g.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(n2,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":em(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),a2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Pf(i.paddingTop),paddingEnd:Pf(i.paddingBottom)}})}})}),[EB,t2]=qT(ds),n2=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=gr(ds,n),[x,p]=g.useState(null),w=Ke(t,A=>p(A)),y=g.useRef(null),v=g.useRef(""),b=m.viewport,_=r.content-r.viewport,C=Dt(d),j=Dt(c),T=tm(f,10);function R(A){if(y.current){const D=A.clientX-y.current.left,G=A.clientY-y.current.top;u({x:D,y:G})}}return g.useEffect(()=>{const A=D=>{const G=D.target;(x==null?void 0:x.contains(G))&&C(D,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,C]),g.useEffect(j,[r,j]),Ba(x,T),Ba(m.content,T),l.jsx(EB,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:Dt(o),onThumbPointerUp:Dt(i),onThumbPositionChange:j,onThumbPointerDown:Dt(a),children:l.jsx(Te.div,{...h,ref:w,style:{position:"absolute",...h.style},onPointerDown:ue(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=x.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),R(A))}),onPointerMove:ue(e.onPointerMove,R),onPointerUp:ue(e.onPointerUp,A=>{const D=A.target;D.hasPointerCapture(A.pointerId)&&D.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Tf="ScrollAreaThumb",r2=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=t2(Tf,e.__scopeScrollArea);return l.jsx(dn,{present:n||s.hasThumb,children:l.jsx(NB,{ref:t,...r})})}),NB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=gr(Tf,n),i=t2(Tf,n),{onThumbPositionChange:a}=i,c=Ke(t,f=>i.onThumbChange(f)),u=g.useRef(),d=tm(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(d(),!u.current){const m=RB(f,a);u.current=m,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,d,a]),l.jsx(Te.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),x=f.clientX-m.left,p=f.clientY-m.top;i.onThumbPointerDown({x,y:p})}),onPointerUp:ue(e.onPointerUp,i.onThumbPointerUp)})});r2.displayName=Tf;var Kx="ScrollAreaCorner",s2=g.forwardRef((e,t)=>{const n=gr(Kx,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(TB,{...e,ref:t}):null});s2.displayName=Kx;var TB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=gr(Kx,n),[o,i]=g.useState(0),[a,c]=g.useState(0),u=!!(o&&a);return Ba(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Ba(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?l.jsx(Te.div,{...r,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Pf(e){return e?parseInt(e,10):0}function o2(e,t){const n=e/t;return isNaN(n)?0:n}function em(e){const t=o2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function PB(e,t,n,r="ltr"){const s=em(n),o=s/2,i=t||o,a=s-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return i2([c,u],f)(e)}function Xb(e,t,n="ltr"){const r=em(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Vg(e,c);return i2([0,i],[0,a])(u)}function i2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function a2(e,t){return e>0&&e<t}var RB=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,a=n.top!==o.top;(i||a)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function tm(e,t){const n=Dt(e),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ba(e,t){const n=Dt(t);Bt(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var l2=XT,AB=JT,OB=s2;const nm=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(l2,{ref:r,className:re("relative overflow-hidden",e),...n,children:[l.jsx(AB,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(c2,{}),l.jsx(OB,{})]}));nm.displayName=l2.displayName;const c2=g.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(Hx,{ref:r,orientation:t,className:re("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:l.jsx(r2,{className:"relative flex-1 rounded-full bg-border"})}));c2.displayName=Hx.displayName;const As=new Map([["aliyun",["common.provider.aliyun","/imgs/providers/aliyun.svg"]],["tencent",["common.provider.tencent","/imgs/providers/tencent.svg"]],["huaweicloud",["common.provider.huaweicloud","/imgs/providers/huaweicloud.svg"]],["qiniu",["common.provider.qiniu","/imgs/providers/qiniu.svg"]],["aws",["common.provider.aws","/imgs/providers/aws.svg"]],["cloudflare",["common.provider.cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["common.provider.namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["common.provider.godaddy","/imgs/providers/godaddy.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]]]),Qb=e=>As.get(e),Ur=ie.union([ie.literal("aliyun"),ie.literal("tencent"),ie.literal("huaweicloud"),ie.literal("qiniu"),ie.literal("aws"),ie.literal("cloudflare"),ie.literal("namesilo"),ie.literal("godaddy"),ie.literal("local"),ie.literal("ssh"),ie.literal("webhook")],{message:"access.authorization.form.type.placeholder"}),Vr=e=>{switch(e){case"aliyun":case"tencent":case"huaweicloud":return"all";case"qiniu":case"local":case"ssh":case"webhook":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},DB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,accessKeyId:ie.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessSecretId:ie.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={accessKeyId:"",accessKeySecret:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:a.accessKeyId,accessSecretId:a.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.access_key_id.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"accessSecretId",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.access_key_secret.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.access_key_secret.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(fe,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},IB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,secretId:ie.string().min(1,"access.authorization.form.secret_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretKey:ie.string().min(1,"access.authorization.form.secret_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={secretId:"",secretKey:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:a.secretId,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"secretId",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.secret_id.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.secret_id.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.secret_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},MB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,region:ie.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:ie.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:ie.string().min(1,"access.authorization.form.secret_access_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={region:"cn-north-1",accessKeyId:"",secretAccessKey:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"huaweicloud",region:a.region,accessKeyId:a.accessKeyId,secretAccessKey:a.secretAccessKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"region",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.region.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.access_key_id.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"secretAccessKey",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.secret_access_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.secret_access_key.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(fe,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},LB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,accessKey:ie.string().min(1,"access.authorization.form.access_key.placeholder").max(64),secretKey:ie.string().min(1,"access.authorization.form.secret_key.placeholder").max(64)});let a={accessKey:"",secretKey:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:a.accessKey,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"accessKey",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.access_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.access_key.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.secret_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(fe,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},zB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,region:ie.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:ie.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:ie.string().min(1,"access.authorization.form.secret_access_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),hostedZoneId:ie.string().min(0,"access.authorization.form.aws_hosted_zone_id.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={region:"cn-north-1",accessKeyId:"",secretAccessKey:"",hostedZoneId:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aws",region:a.region,accessKeyId:a.accessKeyId,secretAccessKey:a.secretAccessKey,hostedZoneId:a.hostedZoneId}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey,hostedZoneId:d.hostedZoneId}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"region",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.region.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.access_key_id.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"secretAccessKey",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.secret_access_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.secret_access_key.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"hostedZoneId",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.aws_hosted_zone_id.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.aws_hosted_zone_id.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(fe,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},FB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,dnsApiToken:ie.string().min(1,"access.authorization.form.cloud_dns_api_token.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={dnsApiToken:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:a.dnsApiToken}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"dnsApiToken",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.cloud_dns_api_token.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.cloud_dns_api_token.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},$B=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,apiKey:ie.string().min(1,"access.authorization.form.namesilo_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={apiKey:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:a.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.namesilo_api_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.namesilo_api_key.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},UB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,apiKey:ie.string().min(1,"access.authorization.form.godaddy_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),apiSecret:ie.string().min(1,"access.authorization.form.godaddy_api_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={apiKey:"",apiSecret:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:a.apiKey,apiSecret:a.apiSecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.godaddy_api_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.godaddy_api_key.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"apiSecret",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.godaddy_api_secret.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.godaddy_api_secret.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},VB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o}=tn(),{t:i}=Ye(),a=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,i("common.errmsg.string_max",{max:64})),configType:Ur}),c=nn({resolver:rn(a),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local"}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"?s(f):r(f),o()}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-3",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:i("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:i("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:i("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:i("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(fe,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:i("common.save")})})]})})})})},Gx=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=tn(),[r,s]=g.useState(!1),{t:o}=Ye(),i=ie.object({name:ie.string().min(1,"access.group.form.name.errmsg.empty").max(64,o("common.errmsg.string_max",{max:64}))}),a=nn({resolver:rn(i),defaultValues:{name:""}}),c=async u=>{try{await D$({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,m])=>{a.setError(h,{type:"manual",message:m.message})})}};return l.jsxs(cl,{onOpenChange:s,open:r,children:[l.jsx(ul,{asChild:!0,className:re(e),children:t}),l.jsxs(Pi,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ri,{children:l.jsx(Ai,{children:o("access.group.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(sn,{...a,children:l.jsxs("form",{onSubmit:u=>{u.stopPropagation(),a.handleSubmit(c)(u)},className:"space-y-8",children:[l.jsx(xe,{control:a.control,name:"name",render:({field:u})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.group.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.group.form.name.errmsg.empty"),...u,type:"text"})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})]})]})},BB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o,config:{accessGroups:i}}=tn(),a=g.useRef(null),[c,u]=g.useState(""),{t:d}=Ye(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,m=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,x=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,d("common.errmsg.string_max",{max:64})),configType:Ur,host:ie.string().refine(_=>m.test(_)||h.test(_),{message:"common.errmsg.host_invalid"}),group:ie.string().optional(),port:ie.string().min(1,"access.authorization.form.ssh_port.placeholder").max(5,d("common.errmsg.string_max",{max:5})),username:ie.string().min(1,"access.authorization.form.ssh_username.placeholder").max(64,d("common.errmsg.string_max",{max:64})),password:ie.string().min(0,"access.authorization.form.ssh_password.placeholder").max(64,d("common.errmsg.string_max",{max:64})),key:ie.string().min(0,"access.authorization.form.ssh_key.placeholder").max(20480,d("common.errmsg.string_max",{max:20480})),keyFile:ie.any().optional(),keyPassphrase:ie.string().min(0,"access.authorization.form.ssh_key_passphrase.placeholder").max(2048,d("common.errmsg.string_max",{max:2048}))});let p={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",keyPassphrase:""};e&&(p=e.config);const w=nn({resolver:rn(x),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"ssh",group:e==null?void 0:e.group,host:p.host,port:p.port,username:p.username,password:p.password,key:p.key,keyFile:p.keyFile,keyPassphrase:p.keyPassphrase}}),y=async _=>{let C=_.group;C=="emptyId"&&(C="");const j={id:_.id,name:_.name,configType:_.configType,usage:Vr(_.configType),group:C,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key,keyPassphrase:_.keyPassphrase}};try{j.id=t=="copy"?"":j.id;const T=await Fr(j);n(),j.id=T.id,j.created=T.created,j.updated=T.updated,_.id&&t=="edit"?s(j):r(j),C!=f&&(f&&await Mb({id:f,"access-":j.id}),C&&await Mb({id:C,"access+":j.id})),o()}catch(T){Object.entries(T.response.data).forEach(([A,D])=>{w.setError(A,{type:"manual",message:D.message})});return}},v=async _=>{var R;const C=(R=_.target.files)==null?void 0:R[0];if(!C)return;const j=C;u(j.name);const T=await t8(j);w.setValue("key",T)},b=()=>{var _;(_=a.current)==null||_.click()};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...w,children:l.jsxs("form",{onSubmit:_=>{_.stopPropagation(),w.handleSubmit(y)(_)},className:"space-y-3",children:[l.jsx(xe,{control:w.control,name:"name",render:({field:_})=>l.jsxs(ye,{children:[l.jsx(we,{children:d("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:d("access.authorization.form.name.placeholder"),..._})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"group",render:({field:_})=>l.jsxs(ye,{children:[l.jsxs(we,{className:"w-full flex justify-between",children:[l.jsx("div",{children:d("access.authorization.form.ssh_group.label")}),l.jsx(Gx,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),d("common.add")]})})]}),l.jsx(be,{children:l.jsxs(ii,{..._,value:_.value,defaultValue:"emptyId",onValueChange:C=>{w.setValue("group",C)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:d("access.authorization.form.access_group.placeholder")})}),l.jsxs(Co,{children:[l.jsx(Pn,{value:"emptyId",children:l.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(C=>l.jsx(Pn,{value:C.id?C.id:"",children:l.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:C.name})},C.id))]})]})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"id",render:({field:_})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:d("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{..._})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"configType",render:({field:_})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:d("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{..._})}),l.jsx(fe,{})]})}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(xe,{control:w.control,name:"host",render:({field:_})=>l.jsxs(ye,{className:"grow",children:[l.jsx(we,{children:d("access.authorization.form.ssh_host.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:d("access.authorization.form.ssh_host.placeholder"),..._})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"port",render:({field:_})=>l.jsxs(ye,{children:[l.jsx(we,{children:d("access.authorization.form.ssh_port.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:d("access.authorization.form.ssh_port.placeholder"),..._,type:"number"})}),l.jsx(fe,{})]})})]}),l.jsx(xe,{control:w.control,name:"username",render:({field:_})=>l.jsxs(ye,{children:[l.jsx(we,{children:d("access.authorization.form.ssh_username.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:d("access.authorization.form.ssh_username.placeholder"),..._})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"password",render:({field:_})=>l.jsxs(ye,{children:[l.jsx(we,{children:d("access.authorization.form.ssh_password.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:d("access.authorization.form.ssh_password.placeholder"),..._,type:"password"})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"key",render:({field:_})=>l.jsxs(ye,{hidden:!0,children:[l.jsx(we,{children:d("access.authorization.form.ssh_key.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"keyFile",render:({field:_})=>l.jsxs(ye,{children:[l.jsx(we,{children:d("access.authorization.form.ssh_key.label")}),l.jsx(be,{children:l.jsxs("div",{children:[l.jsx(De,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.authorization.form.ssh_key_file.placeholder")}),l.jsx(de,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._,ref:a,className:"hidden",hidden:!0,type:"file",onChange:v})]})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:w.control,name:"keyPassphrase",render:({field:_})=>l.jsxs(ye,{children:[l.jsx(we,{children:d("access.authorization.form.ssh_key_passphrase.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:d("access.authorization.form.ssh_key_passphrase.placeholder"),..._,type:"password"})}),l.jsx(fe,{})]})}),l.jsx(fe,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:d("common.save")})})]})})})})},WB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=tn(),{t:o}=Ye(),i=ie.object({id:ie.string().optional(),name:ie.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:Ur,url:ie.string().url("common.errmsg.url_invalid")});let a={url:""};e&&(a=e.config);const c=nn({resolver:rn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:a.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Vr(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await Fr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.name.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ye,{className:"hidden",children:[l.jsx(we,{children:o("access.authorization.form.config.label")}),l.jsx(be,{children:l.jsx(de,{...d})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:c.control,name:"url",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("access.authorization.form.webhook_url.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:o("access.authorization.form.webhook_url.placeholder"),...d})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:o("common.save")})})]})})})})},ha=({trigger:e,op:t,data:n,className:r})=>{const[s,o]=g.useState(!1),{t:i}=Ye(),a=Array.from(As.keys()),[c,u]=g.useState((n==null?void 0:n.configType)||"");let d=l.jsx(l.Fragment,{children:" "});switch(c){case"aliyun":d=l.jsx(DB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"tencent":d=l.jsx(IB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"huaweicloud":d=l.jsx(MB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"qiniu":d=l.jsx(LB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"aws":d=l.jsx(zB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"cloudflare":d=l.jsx(FB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"namesilo":d=l.jsx($B,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"godaddy":d=l.jsx(UB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"local":d=l.jsx(VB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"ssh":d=l.jsx(BB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"webhook":d=l.jsx(WB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break}const f=h=>h==c?"border-primary":"";return l.jsxs(cl,{onOpenChange:o,open:s,children:[l.jsx(ul,{asChild:!0,className:re(r),children:e}),l.jsxs(Pi,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ri,{children:l.jsx(Ai,{children:t=="add"?i("access.authorization.add"):t=="edit"?i("access.authorization.edit"):i("access.authorization.copy")})}),l.jsx(nm,{className:"max-h-[80vh]",children:l.jsxs("div",{className:"container py-3",children:[l.jsx(Vt,{children:i("access.authorization.form.type.label")}),l.jsxs(ii,{onValueChange:h=>{u(h)},defaultValue:c,children:[l.jsx(ko,{className:"mt-3",children:l.jsx(ai,{placeholder:i("access.authorization.form.type.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:i("access.authorization.form.type.list")}),a.map(h=>{var m,x;return l.jsx(Pn,{value:h,children:l.jsxs("div",{className:re("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[l.jsx("img",{src:(m=As.get(h))==null?void 0:m[1],className:"h-6 w-6"}),l.jsx("div",{children:i(((x=As.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})};var u2=Symbol.for("immer-nothing"),Jb=Symbol.for("immer-draftable"),qn=Symbol.for("immer-state");function kr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Wa=Object.getPrototypeOf;function Ha(e){return!!e&&!!e[qn]}function bi(e){var t;return e?d2(e)||Array.isArray(e)||!!e[Jb]||!!((t=e.constructor)!=null&&t[Jb])||sm(e)||om(e):!1}var HB=Object.prototype.constructor.toString();function d2(e){if(!e||typeof e!="object")return!1;const t=Wa(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===HB}function Rf(e,t){rm(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function rm(e){const t=e[qn];return t?t.type_:Array.isArray(e)?1:sm(e)?2:om(e)?3:0}function Gg(e,t){return rm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function f2(e,t,n){const r=rm(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function YB(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sm(e){return e instanceof Map}function om(e){return e instanceof Set}function Wo(e){return e.copy_||e.base_}function Zg(e,t){if(sm(e))return new Map(e);if(om(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=d2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[qn];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Wa(e),r)}else{const r=Wa(e);if(r!==null&&n)return{...e};const s=Object.create(r);return Object.assign(s,e)}}function Zx(e,t=!1){return im(e)||Ha(e)||!bi(e)||(rm(e)>1&&(e.set=e.add=e.clear=e.delete=KB),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Zx(r,!0))),e}function KB(){kr(2)}function im(e){return Object.isFrozen(e)}var GB={};function _i(e){const t=GB[e];return t||kr(0,e),t}var Hc;function h2(){return Hc}function ZB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function e_(e,t){t&&(_i("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qg(e){Xg(e),e.drafts_.forEach(qB),e.drafts_=null}function Xg(e){e===Hc&&(Hc=e.parent_)}function t_(e){return Hc=ZB(Hc,e)}function qB(e){const t=e[qn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function n_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[qn].modified_&&(qg(t),kr(4)),bi(e)&&(e=Af(t,e),t.parent_||Of(t,e)),t.patches_&&_i("Patches").generateReplacementPatches_(n[qn].base_,e,t.patches_,t.inversePatches_)):e=Af(t,n,[]),qg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==u2?e:void 0}function Af(e,t,n){if(im(t))return t;const r=t[qn];if(!r)return Rf(t,(s,o)=>r_(e,r,t,s,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Of(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let o=s,i=!1;r.type_===3&&(o=new Set(s),s.clear(),i=!0),Rf(o,(a,c)=>r_(e,r,s,a,c,n,i)),Of(e,s,!1),n&&e.patches_&&_i("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function r_(e,t,n,r,s,o,i){if(Ha(s)){const a=o&&t&&t.type_!==3&&!Gg(t.assigned_,r)?o.concat(r):void 0,c=Af(e,s,a);if(f2(n,r,c),Ha(c))e.canAutoFreeze_=!1;else return}else i&&n.add(s);if(bi(s)&&!im(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Af(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Of(e,s)}}function Of(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zx(t,n)}function XB(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:h2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=qx;n&&(s=[r],o=Yc);const{revoke:i,proxy:a}=Proxy.revocable(s,o);return r.draft_=a,r.revoke_=i,a}var qx={get(e,t){if(t===qn)return e;const n=Wo(e);if(!Gg(n,t))return QB(e,n,t);const r=n[t];return e.finalized_||!bi(r)?r:r===dp(e.base_,t)?(fp(e),e.copy_[t]=Jg(r,e)):r},has(e,t){return t in Wo(e)},ownKeys(e){return Reflect.ownKeys(Wo(e))},set(e,t,n){const r=m2(Wo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=dp(Wo(e),t),o=s==null?void 0:s[qn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(YB(n,s)&&(n!==void 0||Gg(e.base_,t)))return!0;fp(e),Qg(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return dp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fp(e),Qg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){kr(11)},getPrototypeOf(e){return Wa(e.base_)},setPrototypeOf(){kr(12)}},Yc={};Rf(qx,(e,t)=>{Yc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Yc.deleteProperty=function(e,t){return Yc.set.call(this,e,t,void 0)};Yc.set=function(e,t,n){return qx.set.call(this,e[0],t,n,e[0])};function dp(e,t){const n=e[qn];return(n?Wo(n):e)[t]}function QB(e,t,n){var s;const r=m2(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function m2(e,t){if(!(t in e))return;let n=Wa(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Wa(n)}}function Qg(e){e.modified_||(e.modified_=!0,e.parent_&&Qg(e.parent_))}function fp(e){e.copy_||(e.copy_=Zg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var JB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const i=this;return function(c=o,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&kr(6),r!==void 0&&typeof r!="function"&&kr(7);let s;if(bi(t)){const o=t_(this),i=Jg(t,void 0);let a=!0;try{s=n(i),a=!1}finally{a?qg(o):Xg(o)}return e_(o,r),n_(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===u2&&(s=void 0),this.autoFreeze_&&Zx(s,!0),r){const o=[],i=[];_i("Patches").generateReplacementPatches_(t,s,o,i),r(o,i)}return s}else kr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,c=>t(c,...a));let r,s;return[this.produce(t,n,(i,a)=>{r=i,s=a}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){bi(e)||kr(8),Ha(e)&&(e=eW(e));const t=t_(this),n=Jg(e,void 0);return n[qn].isManual_=!0,Xg(t),n}finishDraft(e,t){const n=e&&e[qn];(!n||!n.isManual_)&&kr(9);const{scope_:r}=n;return e_(r,t),n_(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=_i("Patches").applyPatches_;return Ha(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Jg(e,t){const n=sm(e)?_i("MapSet").proxyMap_(e,t):om(e)?_i("MapSet").proxySet_(e,t):XB(e,t);return(t?t.scope_:h2()).drafts_.push(n),n}function eW(e){return Ha(e)||kr(10,e),p2(e)}function p2(e){if(!bi(e)||im(e))return e;const t=e[qn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zg(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Zg(e,!0);return Rf(n,(r,s)=>{f2(n,r,p2(s))}),t&&(t.finalized_=!1),n}var Xn=new JB,Jr=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseStrictShallowCopy.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);const tW="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nW=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=tW[n[e]&63];return t};const rW=Jc("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),am=g.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:re(rW({variant:t}),e),...n}));am.displayName="Alert";const Xx=g.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:re("mb-1 font-medium leading-none tracking-tight",e),...t}));Xx.displayName="AlertTitle";const lm=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("text-sm [&_p]:leading-relaxed",e),...t}));lm.displayName="AlertDescription";const Df=g.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:re("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Df.displayName="Textarea";const sW=({variables:e,onValueChange:t})=>{const[n,r]=g.useState([]),{t:s}=Ye();g.useEffect(()=>{e&&r(e)},[e]);const o=c=>{const u=n.findIndex(f=>f.key===c.key),d=Jr(n,f=>{u===-1?f.push(c):f[u]=c});r(d),t==null||t(d)},i=c=>{const u=[...n];u.splice(c,1),r(u),t==null||t(u)},a=(c,u)=>{const d=[...n];d[c]=u,r(d),t==null||t(d)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex justify-between dark:text-stone-200",children:[l.jsx(Vt,{children:s("domain.deployment.form.variables.label")}),l.jsx(dr,{when:!!(n!=null&&n.length),children:l.jsx(hp,{variable:{key:"",value:""},trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(pi,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:s("common.add")})]}),onSave:c=>{o(c)}})})]}),l.jsx(dr,{when:!!(n!=null&&n.length),fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:s("domain.deployment.form.variables.empty")}),l.jsx(hp,{trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(pi,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:s("common.add")})]}),variable:{key:"",value:""},onSave:c=>{o(c)}})]}),children:l.jsx("div",{className:"border p-3 rounded-md text-stone-700 text-sm dark:text-stone-200",children:n==null?void 0:n.map((c,u)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[c.key,"=",c.value]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(hp,{trigger:l.jsx(ov,{size:16,className:"cursor-pointer"}),variable:c,onSave:d=>{a(u,d)}}),l.jsx(iv,{size:16,className:"cursor-pointer",onClick:()=>{i(u)}})]})]},u))})})]})},hp=({variable:e,trigger:t,onSave:n})=>{const[r,s]=g.useState({key:"",value:""});g.useEffect(()=>{e&&s(e)},[e]);const{t:o}=Ye(),[i,a]=g.useState(!1),[c,u]=g.useState({}),d=()=>{if(!r.key){u({key:o("domain.deployment.form.variables.key.required")});return}if(!r.value){u({value:o("domain.deployment.form.variables.value.required")});return}n==null||n(r),a(!1),u({})};return l.jsxs(cl,{open:i,onOpenChange:()=>{a(!i)},children:[l.jsx(ul,{children:t}),l.jsxs(Pi,{className:"dark:text-stone-200",children:[l.jsxs(Ri,{className:"flex flex-col",children:[l.jsx(Ai,{children:o("domain.deployment.form.variables.label")}),l.jsxs("div",{className:"pt-5 flex flex-col items-start",children:[l.jsx(Vt,{children:o("domain.deployment.form.variables.key")}),l.jsx(de,{placeholder:o("domain.deployment.form.variables.key.placeholder"),value:r==null?void 0:r.key,onChange:f=>{s({...r,key:f.target.value})},className:"w-full mt-1"}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.key})]}),l.jsxs("div",{className:"pt-2 flex flex-col items-start",children:[l.jsx(Vt,{children:o("domain.deployment.form.variables.value")}),l.jsx(de,{placeholder:o("domain.deployment.form.variables.value.placeholder"),value:r==null?void 0:r.value,onChange:f=>{s({...r,value:f.target.value})},className:"w-full mt-1"}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.value})]})]}),l.jsx(Jh,{children:l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{onClick:()=>{d()},children:o("common.save")})})})]})]})},If=new Map([["aliyun-oss",["common.provider.aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-cdn",["common.provider.aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["common.provider.aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["common.provider.tencent.cdn","/imgs/providers/tencent.svg"]],["qiniu-cdn",["common.provider.qiniu.cdn","/imgs/providers/qiniu.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]]]),oW=Array.from(If.keys()),g2=g.createContext({}),Ya=()=>g.useContext(g2),iW=({deploys:e,onChange:t})=>{const[n,r]=g.useState([]),{t:s}=Ye();g.useEffect(()=>{r(e)},[e]);const o=c=>{c.id=nW();const u=[...n,c];r(u),t(u)},i=c=>{const u=n.filter(d=>d.id!==c);r(u),t(u)},a=c=>{const u=n.map(d=>d.id===c.id?{...c}:d);r(u),t(u)};return l.jsx(l.Fragment,{children:l.jsxs(dr,{when:n.length>0,fallback:l.jsx(am,{className:"w-full border dark:border-stone-400",children:l.jsxs(lm,{className:"flex flex-col items-center",children:[l.jsx("div",{children:s("domain.deployment.nodata")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(ey,{onSave:c=>{o(c)},trigger:l.jsx(De,{size:"sm",children:s("common.add")})})})]})}),children:[l.jsx("div",{className:"flex justify-end py-2 border-b dark:border-stone-400",children:l.jsx(ey,{trigger:l.jsx(De,{size:"sm",children:s("common.add")}),onSave:c=>{o(c)}})}),l.jsx("div",{className:"w-full md:w-[35em] rounded mt-5 border dark:border-stone-400 dark:text-stone-200",children:l.jsx("div",{className:"",children:n.map(c=>l.jsx(aW,{item:c,onDelete:()=>{i(c.id??"")},onSave:u=>{a(u)}},c.id))})})]})})},aW=({item:e,onDelete:t,onSave:n})=>{const{config:{accesses:r}}=tn(),{t:s}=Ye(),o=r.find(c=>c.id===e.access),i=()=>{if(!o)return"";const c=As.get(o.configType);return c?c[1]:""},a=()=>{if(!o)return"";const c=If.get(e.type);return c?s(c[0]):""};return l.jsxs("div",{className:"flex justify-between text-sm p-3 items-center text-stone-700 dark:text-stone-200",children:[l.jsxs("div",{className:"flex space-x-2 items-center",children:[l.jsx("div",{children:l.jsx("img",{src:i(),className:"w-9"})}),l.jsxs("div",{className:"text-stone-600 flex-col flex space-y-0 dark:text-stone-200",children:[l.jsx("div",{children:a()}),l.jsx("div",{children:o==null?void 0:o.name})]})]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(ey,{trigger:l.jsx(ov,{size:16,className:"cursor-pointer"}),deployConfig:e,onSave:c=>{n(c)}}),l.jsx(iv,{size:16,className:"cursor-pointer",onClick:()=>{t()}})]})]})},ey=({trigger:e,deployConfig:t,onSave:n})=>{const{config:{accesses:r}}=tn(),[s,o]=g.useState(),[i,a]=g.useState({access:"",type:""}),[c,u]=g.useState({}),[d,f]=g.useState(!1);g.useEffect(()=>{a(t?{...t}:{access:"",type:""})},[t]),g.useEffect(()=>{const w=i.type.split("-");let y;w&&w.length>1?y=w[1]:y=i.type,o(y),u({})},[i.type]);const h=g.useCallback(w=>{w.type!==i.type?a({...w,access:"",config:{}}):a({...w})},[i.type]),{t:m}=Ye(),x=r.filter(w=>{if(w.usage=="apply")return!1;if(i.type=="")return!0;const y=i.type.split("-");return w.configType===y[0]}),p=()=>{const w={...c};i.type===""?w.type=m("domain.deployment.form.access.placeholder"):w.type="",i.access===""?w.access=m("domain.deployment.form.access.placeholder"):w.access="",u(w);for(const y in w)if(w[y]!=="")return;n(i),a({access:"",type:""}),u({}),f(!1)};return l.jsx(g2.Provider,{value:{deploy:i,setDeploy:h,error:c,setError:u},children:l.jsxs(cl,{open:d,onOpenChange:f,children:[l.jsx(ul,{children:e}),l.jsxs(Pi,{className:"dark:text-stone-200",children:[l.jsxs(Ri,{children:[l.jsx(Ai,{children:m("history.page.title")}),l.jsx(ZT,{})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:m("domain.deployment.form.type.label")}),l.jsxs(ii,{value:i.type,onValueChange:w=>{h({...i,type:w})},children:[l.jsx(ko,{className:"mt-2",children:l.jsx(ai,{placeholder:m("domain.deployment.form.type.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:m("domain.deployment.form.type.list")}),oW.map(w=>{var y,v;return l.jsx(Pn,{value:w,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(y=If.get(w))==null?void 0:y[1]}),l.jsx("div",{children:m(((v=If.get(w))==null?void 0:v[0])??"")})]})},w)})]})})]}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.type})]}),l.jsxs("div",{children:[l.jsxs(Vt,{className:"flex justify-between",children:[l.jsx("div",{children:m("domain.deployment.form.access.label")}),l.jsx(ha,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),m("common.add")]}),op:"add"})]}),l.jsxs(ii,{value:i.access,onValueChange:w=>{h({...i,access:w})},children:[l.jsx(ko,{className:"mt-2",children:l.jsx(ai,{placeholder:m("domain.deployment.form.access.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:m("domain.deployment.form.access.list")}),x.map(w=>{var y;return l.jsx(Pn,{value:w.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(y=As.get(w.configType))==null?void 0:y[1]}),l.jsx("div",{children:w.name})]})},w.id)})]})})]}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.access})]}),l.jsx(lW,{type:s}),l.jsx(Jh,{children:l.jsx(De,{onClick:w=>{w.stopPropagation(),p()},children:m("common.save")})})]})]})})},lW=({type:e})=>(()=>{switch(e){case"ssh":return l.jsx(s_,{});case"local":return l.jsx(s_,{});case"cdn":return l.jsx(mp,{});case"dcdn":return l.jsx(mp,{});case"oss":return l.jsx(cW,{});case"webhook":return l.jsx(uW,{});default:return l.jsx(mp,{})}})(),s_=()=>{var s,o,i,a;const{t:e}=Ye(),{setError:t}=Ya();g.useEffect(()=>{t({})},[]);const{deploy:n,setDeploy:r}=Ya();return g.useEffect(()=>{n.id||r({...n,config:{certPath:"/etc/nginx/ssl/nginx.crt",keyPath:"/etc/nginx/ssl/nginx.key",preCommand:"",command:"sudo service nginx reload"}})},[]),l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col space-y-2",children:[l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_cert_path.label")}),l.jsx(de,{placeholder:e("access.authorization.form.ssh_cert_path.label"),className:"w-full mt-1",value:(s=n==null?void 0:n.config)==null?void 0:s.certPath,onChange:c=>{const u=Jr(n,d=>{d.config||(d.config={}),d.config.certPath=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_key_path.label")}),l.jsx(de,{placeholder:e("access.authorization.form.ssh_key_path.placeholder"),className:"w-full mt-1",value:(o=n==null?void 0:n.config)==null?void 0:o.keyPath,onChange:c=>{const u=Jr(n,d=>{d.config||(d.config={}),d.config.keyPath=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_pre_command.label")}),l.jsx(Df,{className:"mt-1",value:(i=n==null?void 0:n.config)==null?void 0:i.preCommand,placeholder:e("access.authorization.form.ssh_pre_command.placeholder"),onChange:c=>{const u=Jr(n,d=>{d.config||(d.config={}),d.config.preCommand=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_command.label")}),l.jsx(Df,{className:"mt-1",value:(a=n==null?void 0:n.config)==null?void 0:a.command,placeholder:e("access.authorization.form.ssh_command.placeholder"),onChange:c=>{const u=Jr(n,d=>{d.config||(d.config={}),d.config.command=c.target.value});r(u)}})]})]})})},mp=()=>{var i;const{deploy:e,setDeploy:t,error:n,setError:r}=Ya(),{t:s}=Ye();g.useEffect(()=>{r({})},[]),g.useEffect(()=>{var c;const a=o.safeParse((c=e.config)==null?void 0:c.domain);a.success?r({...n,domain:""}):r({...n,domain:JSON.parse(a.error.message)[0].message})},[e]);const o=ie.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")});return l.jsx("div",{className:"flex flex-col space-y-2",children:l.jsxs("div",{children:[l.jsx(Vt,{children:s("domain.deployment.form.cdn_domain.label")}),l.jsx(de,{placeholder:s("domain.deployment.form.cdn_domain.placeholder"),className:"w-full mt-1",value:(i=e==null?void 0:e.config)==null?void 0:i.domain,onChange:a=>{const c=a.target.value,u=o.safeParse(c);u.success?r({...n,domain:""}):r({...n,domain:JSON.parse(u.error.message)[0].message});const d=Jr(e,f=>{f.config||(f.config={}),f.config.domain=c});t(d)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},cW=()=>{var a,c,u;const{deploy:e,setDeploy:t,error:n,setError:r}=Ya(),{t:s}=Ye();g.useEffect(()=>{r({})},[]),g.useEffect(()=>{var f;const d=o.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,domain:""}):r({...n,domain:JSON.parse(d.error.message)[0].message})},[e]),g.useEffect(()=>{var f;const d=i.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(d.error.message)[0].message})},[]),g.useEffect(()=>{e.id||t({...e,config:{endpoint:"oss-cn-hangzhou.aliyuncs.com",bucket:"",domain:""}})},[]);const o=ie.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")}),i=ie.string().min(1,{message:s("domain.deployment.form.oss_bucket.placeholder")});return l.jsx("div",{className:"flex flex-col space-y-2",children:l.jsxs("div",{children:[l.jsx(Vt,{children:s("domain.deployment.form.oss_endpoint.label")}),l.jsx(de,{className:"w-full mt-1",value:(a=e==null?void 0:e.config)==null?void 0:a.endpoint,onChange:d=>{const f=d.target.value,h=Jr(e,m=>{m.config||(m.config={}),m.config.endpoint=f});t(h)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.endpoint}),l.jsx(Vt,{children:s("domain.deployment.form.oss_bucket")}),l.jsx(de,{placeholder:s("domain.deployment.form.oss_bucket.placeholder"),className:"w-full mt-1",value:(c=e==null?void 0:e.config)==null?void 0:c.bucket,onChange:d=>{const f=d.target.value,h=i.safeParse(f);h.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(h.error.message)[0].message});const m=Jr(e,x=>{x.config||(x.config={}),x.config.bucket=f});t(m)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.bucket}),l.jsx(Vt,{children:s("domain.deployment.form.cdn_domain.label")}),l.jsx(de,{placeholder:s("domain.deployment.form.cdn_domain.label"),className:"w-full mt-1",value:(u=e==null?void 0:e.config)==null?void 0:u.domain,onChange:d=>{const f=d.target.value,h=o.safeParse(f);h.success?r({...n,domain:""}):r({...n,domain:JSON.parse(h.error.message)[0].message});const m=Jr(e,x=>{x.config||(x.config={}),x.config.domain=f});t(m)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},uW=()=>{var r;const{deploy:e,setDeploy:t}=Ya(),{setError:n}=Ya();return g.useEffect(()=>{n({})},[]),l.jsx(l.Fragment,{children:l.jsx(sW,{variables:(r=e==null?void 0:e.config)==null?void 0:r.variables,onValueChange:s=>{const o=Jr(e,i=>{i.config||(i.config={}),i.config.variables=s});t(o)}})})},dW=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=tn(),[s,o]=g.useState(!1),{t:i}=Ye(),a=ie.object({email:ie.string().email("common.errmsg.email_invalid")}),c=nn({resolver:rn(a),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"common.errmsg.email_duplicate"});return}const f=[...n.content.emails,d.email];try{const h=await al({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),o(!1)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsxs(cl,{onOpenChange:o,open:s,children:[l.jsx(ul,{asChild:!0,className:re(e),children:t}),l.jsxs(Pi,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ri,{children:l.jsx(Ai,{children:i("domain.application.form.email.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(sn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(xe,{control:c.control,name:"email",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:i("domain.application.form.email.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:i("common.errmsg.email_empty"),...d,type:"email"})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:i("common.save")})})]})})})]})]})},y2={domain:"common.text.domain",ip:"common.text.ip",dns:"common.text.dns"},o_=({value:e,className:t,onValueChange:n,valueType:r="domain"})=>{const[s,o]=g.useState([]),{t:i}=Ye();g.useMemo(()=>{e&&o(e.split(";"))},[e]),g.useEffect(()=>{(()=>{n(s.join(";"))})()},[s]);const a=d=>{s.includes(d)||o([...s,d])},c=(d,f)=>{const h=[...s];h[d]=f,o(h)},u=d=>{const f=[...s];f.splice(d,1),o(f)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:re(t),children:[l.jsxs(we,{className:"flex justify-between items-center",children:[l.jsx("div",{children:i(y2[r])}),l.jsx(dr,{when:s.length>0,children:l.jsx(pp,{op:"add",onValueChange:d=>{a(d)},valueType:r,value:"",trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(pi,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:i("common.add")})]})})})]}),l.jsx(be,{children:l.jsx(dr,{when:s.length>0,fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:i("common.text."+r+".empty")}),l.jsx(pp,{value:"",trigger:i("common.add"),onValueChange:a,valueType:r})]}),children:l.jsx("div",{className:"border rounded-md p-3 text-sm mt-2 text-gray-700 space-y-2 dark:text-white dark:border-stone-700 dark:bg-stone-950",children:s.map((d,f)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{children:d}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(pp,{op:"edit",valueType:r,trigger:l.jsx(ov,{size:16,className:"cursor-pointer text-gray-600 dark:text-white"}),value:d,onValueChange:h=>{c(f,h)}}),l.jsx(iv,{size:16,className:"cursor-pointer",onClick:()=>{u(f)}})]})]},f))})})})]})})},pp=({trigger:e,value:t,onValueChange:n,op:r="add",valueType:s})=>{const[o,i]=g.useState(""),[a,c]=g.useState(!1),[u,d]=g.useState(""),{t:f}=Ye();g.useEffect(()=>{i(t)},[t]);const h=ie.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:f("common.errmsg.domain_invalid")}),m=ie.string().ip({message:f("common.errmsg.ip_invalid")}),x={domain:h,dns:m,host:m},p=g.useCallback(()=>{const y=x[s].safeParse(o);if(!y.success){d(JSON.parse(y.error.message)[0].message);return}i(""),c(!1),d(""),n(o)},[o]);return l.jsxs(cl,{open:a,onOpenChange:w=>{c(w)},children:[l.jsx(ul,{className:"text-primary",children:e}),l.jsxs(Pi,{className:"dark:text-white",children:[l.jsx(Ri,{children:l.jsx(Ai,{className:"dark:text-white",children:f(y2[s])})}),l.jsx(de,{value:o,className:"dark:text-white",onChange:w=>{i(w.target.value)}}),l.jsx(dr,{when:u.length>0,children:l.jsx("div",{className:"text-red-500 text-sm",children:u})}),l.jsx(Jh,{children:l.jsx(De,{onClick:()=>{p()},children:f(r==="add"?"common.add":"common.confirm")})})]})]})},fW=()=>{const{config:{accesses:e,emails:t}}=tn(),[n,r]=g.useState({}),s=Mr(),{t:o}=Ye(),[i,a]=g.useState("apply");g.useEffect(()=>{const x=new URLSearchParams(s.search).get("id");x&&(async()=>{const w=await i8(x);r(w)})()},[s.search]);const c=ie.object({id:ie.string().optional(),domain:ie.string().min(1,{message:"common.errmsg.domain_invalid"}),email:ie.string().email("common.errmsg.email_invalid").optional(),access:ie.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.application.form.access.placeholder"}),keyAlgorithm:ie.string().optional(),nameservers:ie.string().optional(),timeout:ie.number().optional()}),u=nn({resolver:rn(c),defaultValues:{id:"",domain:"",email:"",access:"",keyAlgorithm:"RSA2048",nameservers:"",timeout:60}});g.useEffect(()=>{var m,x,p,w,y;n&&u.reset({id:n.id,domain:n.domain,email:(m=n.applyConfig)==null?void 0:m.email,access:(x=n.applyConfig)==null?void 0:x.access,keyAlgorithm:(p=n.applyConfig)==null?void 0:p.keyAlgorithm,nameservers:(w=n.applyConfig)==null?void 0:w.nameservers,timeout:(y=n.applyConfig)==null?void 0:y.timeout})},[n,u]);const{toast:d}=$r(),f=async m=>{const x={id:m.id,crontab:"0 0 * * *",domain:m.domain,email:m.email,access:m.access,applyConfig:{email:m.email??"",access:m.access,keyAlgorithm:m.keyAlgorithm,nameservers:m.nameservers,timeout:m.timeout}};try{const p=await pf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||a("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([y,v])=>{u.setError(y,{type:"manual",message:v.message})});return}},h=async m=>{const x={...n,deployConfig:m};try{const p=await pf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||a("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([y,v])=>{u.setError(y,{type:"manual",message:v.message})});return}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Rx,{}),l.jsx("div",{className:" h-5 text-muted-foreground",children:l.jsx(qN,{children:l.jsxs(XN,{children:[l.jsx(Ug,{children:l.jsx(QN,{href:"#/domains",children:o("domain.page.title")})}),l.jsx(eT,{}),l.jsx(Ug,{children:l.jsx(JN,{children:n!=null&&n.id?o("domain.edit"):o("domain.add")})})]})})}),l.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex md:mt-5",children:[l.jsx("div",{className:re("cursor-pointer text-right",i==="apply"?"text-primary":""),onClick:()=>{a("apply")},children:o("domain.application.tab")}),l.jsx("div",{className:re("cursor-pointer text-right",i==="deploy"?"text-primary":""),onClick:()=>{if(!(n!=null&&n.id)){d({title:o("domain.application.unsaved.message"),description:o("domain.application.unsaved.message"),variant:"destructive"});return}a("deploy")},children:o("domain.deployment.tab")})]}),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:re("w-full md:w-[35em] p-5 rounded mt-3 md:mt-0",i=="deploy"&&"hidden"),children:l.jsx(sn,{...u,children:l.jsxs("form",{onSubmit:u.handleSubmit(f),className:"space-y-8 dark:text-stone-200",children:[l.jsx(xe,{control:u.control,name:"domain",render:({field:m})=>l.jsxs(ye,{children:[l.jsx(l.Fragment,{children:l.jsx(o_,{value:m.value,valueType:"domain",onValueChange:x=>{u.setValue("domain",x)}})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:u.control,name:"email",render:({field:m})=>l.jsxs(ye,{children:[l.jsxs(we,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.application.form.email.label")+" "+o("domain.application.form.email.tips")}),l.jsx(dW,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),o("common.add")]})})]}),l.jsx(be,{children:l.jsxs(ii,{...m,value:m.value,onValueChange:x=>{u.setValue("email",x)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:o("domain.application.form.email.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:o("domain.application.form.email.list")}),t.content.emails.map(x=>l.jsx(Pn,{value:x,children:l.jsx("div",{children:x})},x))]})})]})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:u.control,name:"access",render:({field:m})=>l.jsxs(ye,{children:[l.jsxs(we,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.application.form.access.label")}),l.jsx(ha,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(pi,{size:14}),o("common.add")]}),op:"add"})]}),l.jsx(be,{children:l.jsxs(ii,{...m,value:m.value,onValueChange:x=>{u.setValue("access",x)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:o("domain.application.form.access.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Va,{children:o("domain.application.form.access.list")}),e.filter(x=>x.usage!="deploy").map(x=>{var p;return l.jsx(Pn,{value:x.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(p=As.get(x.configType))==null?void 0:p[1]}),l.jsx("div",{children:x.name})]})},x.id)})]})})]})}),l.jsx(fe,{})]})}),l.jsxs("div",{children:[l.jsx("hr",{}),l.jsxs(VV,{children:[l.jsx(BV,{className:"w-full my-4",children:l.jsxs("div",{className:"flex items-center justify-between space-x-4",children:[l.jsx("span",{className:"flex-1 text-sm text-gray-600 text-left",children:o("domain.application.form.advanced_settings.label")}),l.jsx(dI,{className:"h-4 w-4"})]})}),l.jsx(oT,{children:l.jsxs("div",{className:"flex flex-col space-y-8",children:[l.jsx(xe,{control:u.control,name:"keyAlgorithm",render:({field:m})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("domain.application.form.key_algorithm.label")}),l.jsxs(ii,{...m,value:m.value,onValueChange:x=>{u.setValue("keyAlgorithm",x)},children:[l.jsx(ko,{children:l.jsx(ai,{placeholder:o("domain.application.form.key_algorithm.placeholder")})}),l.jsx(Co,{children:l.jsxs(Na,{children:[l.jsx(Pn,{value:"RSA2048",children:"RSA2048"}),l.jsx(Pn,{value:"RSA3072",children:"RSA3072"}),l.jsx(Pn,{value:"RSA4096",children:"RSA4096"}),l.jsx(Pn,{value:"RSA8192",children:"RSA8192"}),l.jsx(Pn,{value:"EC256",children:"EC256"}),l.jsx(Pn,{value:"EC384",children:"EC384"})]})})]})]})}),l.jsx(xe,{control:u.control,name:"nameservers",render:({field:m})=>l.jsxs(ye,{children:[l.jsx(o_,{value:m.value??"",onValueChange:x=>{u.setValue("nameservers",x)},valueType:"dns"}),l.jsx(fe,{})]})}),l.jsx(xe,{control:u.control,name:"timeout",render:({field:m})=>l.jsxs(ye,{children:[l.jsx(we,{children:o("domain.application.form.timeout.label")}),l.jsx(be,{children:l.jsx(de,{type:"number",placeholder:o("domain.application.form.timeout.placeholder"),...m,value:m.value,onChange:x=>{u.setValue("timeout",parseInt(x.target.value))}})}),l.jsx(fe,{})]})})]})})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:n!=null&&n.id?o("common.save"):o("common.next")})})]})})}),l.jsx("div",{className:re("flex flex-col space-y-5 w-full md:w-[35em]",i=="apply"&&"hidden"),children:l.jsx(iW,{deploys:(n==null?void 0:n.deployConfig)??[],onChange:m=>{h(m)}})})]})]})]})})};var Qx="Tabs",[hW,k9]=un(Qx,[rl]),v2=rl(),[mW,Jx]=hW(Qx),x2=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=Ci(a),[f,h]=Ln({prop:r,onChange:s,defaultProp:o});return l.jsx(mW,{scope:n,baseId:Mn(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:l.jsx(Te.div,{dir:d,"data-orientation":i,...u,ref:t})})});x2.displayName=Qx;var w2="TabsList",b2=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=Jx(w2,n),i=v2(n);return l.jsx(Cv,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:l.jsx(Te.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});b2.displayName=w2;var _2="TabsTrigger",S2=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,i=Jx(_2,n),a=v2(n),c=j2(i.baseId,r),u=E2(i.baseId,r),d=r===i.value;return l.jsx(jv,{asChild:!0,...a,focusable:!s,active:d,children:l.jsx(Te.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})});S2.displayName=_2;var k2="TabsContent",C2=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=e,a=Jx(k2,n),c=j2(a.baseId,r),u=E2(a.baseId,r),d=r===a.value,f=g.useRef(d);return g.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(dn,{present:s||d,children:({present:h})=>l.jsx(Te.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});C2.displayName=k2;function j2(e,t){return`${e}-trigger-${t}`}function E2(e,t){return`${e}-content-${t}`}var pW=x2,N2=b2,T2=S2,P2=C2;const R2=pW,e0=g.forwardRef(({className:e,...t},n)=>l.jsx(N2,{ref:n,className:re("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));e0.displayName=N2.displayName;const ei=g.forwardRef(({className:e,...t},n)=>l.jsx(T2,{ref:n,className:re("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));ei.displayName=T2.displayName;const Mf=g.forwardRef(({className:e,...t},n)=>l.jsx(P2,{ref:n,className:re("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Mf.displayName=P2.displayName;const A2=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));A2.displayName="Card";const O2=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex flex-col space-y-1.5 p-6",e),...t}));O2.displayName="CardHeader";const D2=g.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:re("text-2xl font-semibold leading-none tracking-tight",e),...t}));D2.displayName="CardTitle";const I2=g.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:re("text-sm text-muted-foreground",e),...t}));I2.displayName="CardDescription";const M2=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("p-6 pt-0",e),...t}));M2.displayName="CardContent";const L2=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex items-center p-6 pt-0",e),...t}));L2.displayName="CardFooter";const Us=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",gW=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=tn(),{toast:n}=$r(),r=er(),{t:s}=Ye(),o=async a=>{try{await O$(a),t()}catch(c){n({title:s("common.delete.failed.message"),description:Us(c),variant:"destructive"});return}},i=()=>{r("/access")};return l.jsxs("div",{className:"mt-10",children:[l.jsx(dr,{when:e.length==0,children:l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(qw,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domains.nodata")}),l.jsx(Gx,{trigger:l.jsx(De,{children:s("access.group.add")}),className:"mt-3"})]})})}),l.jsx(nm,{className:"h-[75vh] overflow-hidden",children:l.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(a=>l.jsxs(A2,{className:"w-full md:w-[350px]",children:[l.jsxs(O2,{children:[l.jsx(D2,{children:a.name}),l.jsx(I2,{children:s("access.group.total",{total:a.expand?a.expand.access.length:0})})]}),l.jsx(M2,{className:"min-h-[180px]",children:a.expand?l.jsx(l.Fragment,{children:a.expand.access.slice(0,3).map(c=>l.jsx("div",{className:"flex flex-col mb-3",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"",children:l.jsx("img",{src:Qb(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),l.jsxs("div",{className:"ml-3",children:[l.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:Qb(c.configType)[0]})]})]})},c.id))}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[l.jsx("div",{children:l.jsx(qw,{size:40})}),l.jsx("div",{className:"ml-2",children:s("access.group.nodata")})]})})}),l.jsx(L2,{children:l.jsxs("div",{className:"flex justify-end w-full",children:[l.jsx(dr,{when:!!(a.expand&&a.expand.access.length>0),children:l.jsx("div",{children:l.jsx(De,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${a.id}&tab=access`,{replace:!0})},children:s("access.group.domains")})})}),l.jsx(dr,{when:!a.expand||a.expand.access.length==0,children:l.jsx("div",{children:l.jsx(De,{size:"sm",onClick:i,children:s("access.authorization.add")})})}),l.jsx("div",{className:"ml-3",children:l.jsxs(kx,{children:[l.jsx(Cx,{asChild:!0,children:l.jsx(De,{variant:"destructive",size:"sm",children:s("common.delete")})}),l.jsxs(Lh,{children:[l.jsxs(zh,{children:[l.jsx($h,{className:"dark:text-gray-200",children:s("access.group.delete")}),l.jsx(Uh,{children:s("access.group.delete.confirm")})]}),l.jsxs(Fh,{children:[l.jsx(Bh,{className:"dark:text-gray-200",children:s("common.cancel")}),l.jsx(Vh,{onClick:()=>{o(a.id?a.id:"")},children:s("common.confirm")})]})]})]})})]})})]}))})})]})},yW=()=>{const{t:e}=Ye(),{config:t,deleteAccess:n}=tn(),{accesses:r}=t,s=10,o=Math.ceil(r.length/s),i=er(),a=Mr(),c=new URLSearchParams(a.search),u=c.get("page"),d=u?Number(u):1,f=c.get("tab"),h=c.get("accessGroupId"),m=(d-1)*s,x=m+s,p=async y=>{const v=await A$(y);n(v.id)},w=y=>{c.set("tab",y),i({search:c.toString()})};return l.jsxs("div",{className:"",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:e("access.page.title")}),f!="access_group"?l.jsx(ha,{trigger:l.jsx(De,{children:e("access.authorization.add")}),op:"add"}):l.jsx(Gx,{trigger:l.jsx(De,{children:e("access.group.add")})})]}),l.jsxs(R2,{defaultValue:f||"access",value:f||"access",className:"w-full mt-5",children:[l.jsxs(e0,{className:"space-x-5 px-3",children:[l.jsx(ei,{value:"access",onClick:()=>{w("access")},children:e("access.authorization.tab")}),l.jsx(ei,{value:"access_group",onClick:()=>{w("access_group")},children:e("access.group.tab")})]}),l.jsx(Mf,{value:"access",children:r.length===0?l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(gI,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:e("access.authorization.nodata")}),l.jsx(ha,{trigger:l.jsx(De,{children:e("access.authorization.add")}),op:"add",className:"mt-3"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:e("common.text.name")}),l.jsx("div",{className:"w-48",children:e("common.text.provider")}),l.jsx("div",{className:"w-60",children:e("common.text.created_at")}),l.jsx("div",{className:"w-60",children:e("common.text.updated_at")}),l.jsx("div",{className:"grow",children:e("common.text.operations")})]}),r.filter(y=>h?y.group==h:!0).slice(m,x).map(y=>{var v,b;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:y.name}),l.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[l.jsx("img",{src:(v=As.get(y.configType))==null?void 0:v[1],className:"w-6"}),l.jsx("div",{children:e(((b=As.get(y.configType))==null?void 0:b[0])||"")})]}),l.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:y.created&&za(y.created)}),l.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:y.updated&&za(y.updated)}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(ha,{trigger:l.jsx(De,{variant:"link",className:"p-0",children:e("common.edit")}),op:"edit",data:y}),l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(ha,{trigger:l.jsx(De,{variant:"link",className:"p-0",children:e("common.copy")}),op:"copy",data:y}),l.jsx(_r,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(kx,{children:[l.jsx(Cx,{asChild:!0,children:l.jsx(De,{variant:"link",className:"p-0",children:e("common.delete")})}),l.jsxs(Lh,{children:[l.jsxs(zh,{children:[l.jsx($h,{className:"dark:text-gray-200",children:e("access.authorization.delete")}),l.jsx(Uh,{children:e("access.authorization.delete.confirm")})]}),l.jsxs(Fh,{children:[l.jsx(Bh,{className:"dark:text-gray-200",children:e("common.cancel")}),l.jsx(Vh,{onClick:()=>{p(y)},children:e("common.confirm")})]})]})]})]})]},y.id)}),l.jsx(CE,{totalPages:o,currentPage:d,onPageChange:y=>{c.set("page",y.toString()),i({search:c.toString()})}})]})}),l.jsx(Mf,{value:"access_group",children:l.jsx(gW,{})})]})]})},z2=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await ot().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},vW=()=>{const e=er(),[t,n]=g.useState(),[r]=DD(),{t:s}=Ye(),o=r.get("domain");return g.useEffect(()=>{(async()=>{const a={};o&&(a.domain=o);const c=await z2(a);n(c.items)})()},[o]),l.jsxs(nm,{className:"h-[80vh] overflow-hidden",children:[l.jsx("div",{className:"text-muted-foreground",children:s("history.page.title")}),t!=null&&t.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:s("history.props.domain")}),l.jsx("div",{className:"w-24",children:s("history.props.status")}),l.jsx("div",{className:"w-56",children:s("history.props.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("history.props.last_execution_time")}),l.jsx("div",{className:"grow",children:s("common.text.operations")})]}),t==null?void 0:t.map(i=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Sx,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(_x,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:za(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsx(De,{variant:"link",className:"p-0",children:s("history.log")})}),l.jsxs(bh,{className:"sm:max-w-5xl",children:[l.jsx(Kv,{children:l.jsxs(Gv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,s("history.log")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]}):l.jsx(l.Fragment,{children:l.jsxs(am,{className:"max-w-[40em] mx-auto mt-20",children:[l.jsx(Xx,{children:s("common.text.nodata")}),l.jsxs(lm,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(dk,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",s("history.nodata")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(De,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},xW=ie.object({username:ie.string().email({message:"login.username.errmsg.invalid"}),password:ie.string().min(10,{message:"login.password.errmsg.invalid"})}),wW=()=>{const{t:e}=Ye(),t=nn({resolver:rn(xW),defaultValues:{username:"",password:""}}),n=async s=>{try{await ot().admins.authWithPassword(s.username,s.password),r("/")}catch(o){const i=Us(o);t.setError("username",{message:i}),t.setError("password",{message:i})}},r=er();return l.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[l.jsx("div",{className:"flex justify-center mb-10",children:l.jsx("img",{src:"/vite.svg",className:"w-16"})}),l.jsx(sn,{...t,children:l.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[l.jsx(xe,{control:t.control,name:"username",render:({field:s})=>l.jsxs(ye,{children:[l.jsx(we,{children:e("login.username.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:e("login.username.placeholder"),...s})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:t.control,name:"password",render:({field:s})=>l.jsxs(ye,{children:[l.jsx(we,{children:e("login.password.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:e("login.password.placeholder"),...s,type:"password"})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:e("login.submit")})})]})})]})},bW=()=>ot().authStore.isValid&&ot().authStore.isAdmin?l.jsx(JS,{to:"/"}):l.jsxs("div",{className:"container",children:[l.jsx(nv,{}),l.jsx(dE,{})]}),_W=ie.object({oldPassword:ie.string().min(10,{message:"settings.password.password.errmsg.length"}),newPassword:ie.string().min(10,{message:"settings.password.password.errmsg.length"}),confirmPassword:ie.string().min(10,{message:"settings.password.password.errmsg.length"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"settings.password.password.errmsg.not_matched",path:["confirmPassword"]}),SW=()=>{const{toast:e}=$r(),t=er(),{t:n}=Ye(),r=nn({resolver:rn(_W),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async o=>{var i,a;try{await ot().admins.authWithPassword((i=ot().authStore.model)==null?void 0:i.email,o.oldPassword)}catch(c){const u=Us(c);r.setError("oldPassword",{message:u})}try{await ot().admins.update((a=ot().authStore.model)==null?void 0:a.id,{password:o.newPassword,passwordConfirm:o.confirmPassword}),ot().authStore.clear(),e({title:n("settings.password.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=Us(c);e({title:n("settings.password.failed.message"),description:u,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(sn,{...r,children:l.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[l.jsx(xe,{control:r.control,name:"oldPassword",render:({field:o})=>l.jsxs(ye,{children:[l.jsx(we,{children:n("settings.password.current_password.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:n("settings.password.current_password.placeholder"),...o,type:"password"})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:r.control,name:"newPassword",render:({field:o})=>l.jsxs(ye,{children:[l.jsx(we,{children:n("settings.password.new_password.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:n("settings.password.new_password.placeholder"),...o,type:"password"})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:r.control,name:"confirmPassword",render:({field:o})=>l.jsxs(ye,{children:[l.jsx(we,{children:n("settings.password.confirm_password.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:n("settings.password.confirm_password.placeholder"),...o,type:"password"})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:n("common.update")})})]})})})})},kW=()=>{const e=Mr(),[t,n]=g.useState("account"),r=er(),{t:s}=Ye();return g.useEffect(()=>{const i=e.pathname.split("/")[2];n(i)},[e]),l.jsxs("div",{children:[l.jsx(Rx,{}),l.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("settings.page.title")}),l.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:l.jsxs(R2,{defaultValue:"account",className:"w-full",value:t,children:[l.jsxs(e0,{className:"mx-auto",children:[l.jsxs(ei,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[l.jsx(CI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.account.tab")})]}),l.jsxs(ei,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[l.jsx(pI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.password.tab")})]}),l.jsxs(ei,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[l.jsx(xI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.notification.tab")})]}),l.jsxs(ei,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[l.jsx(_I,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.ca.tab")})]})]}),l.jsx(Mf,{value:t,children:l.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:l.jsx(nv,{})})})]})})]})},CW=()=>{const[e,t]=g.useState(),[n,r]=g.useState(),s=er(),{t:o}=Ye();return g.useEffect(()=>{(async()=>{const a=await o8();t(a)})()},[]),g.useEffect(()=>{(async()=>{const c=await z2({perPage:8});r(c.items)})()},[]),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("div",{className:"text-muted-foreground",children:o("dashboard.page.title")})}),l.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(SI,{size:48,strokeWidth:1,className:"text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.all")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?l.jsx(wn,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(cI,{size:48,strokeWidth:1,className:"text-red-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.near_expired")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?l.jsx(wn,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(vI,{size:48,strokeWidth:1,className:"text-green-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?l.jsx(wn,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(aI,{size:48,strokeWidth:1,className:"text-gray-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.disabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?l.jsx(wn,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]})]}),l.jsx("div",{className:"my-4",children:l.jsx("hr",{})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:o("dashboard.history")}),(n==null?void 0:n.length)==0?l.jsx(l.Fragment,{children:l.jsxs(am,{className:"max-w-[40em] mt-10",children:[l.jsx(Xx,{children:o("common.text.nodata")}),l.jsxs(lm,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(dk,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",o("history.nodata")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(De,{onClick:()=>{s("/edit")},children:o("domain.add")})})]})]})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:o("history.props.domain")}),l.jsx("div",{className:"w-24",children:o("history.props.status")}),l.jsx("div",{className:"w-56",children:o("history.props.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:o("history.props.last_execution_time")}),l.jsx("div",{className:"grow",children:o("common.text.operations")})]}),n==null?void 0:n.map(i=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Sx,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(_x,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:za(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsx(De,{variant:"link",className:"p-0",children:o("history.log")})}),l.jsxs(bh,{className:"sm:max-w-5xl",children:[l.jsx(Kv,{children:l.jsxs(Gv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,o("history.log")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]})]})]})},jW=ie.object({email:ie.string().email("settings.account.email.errmsg.invalid")}),EW=()=>{var a;const{toast:e}=$r(),t=er(),{t:n}=Ye(),[r,s]=g.useState(!1),o=nn({resolver:rn(jW),defaultValues:{email:(a=ot().authStore.model)==null?void 0:a.email}}),i=async c=>{var u;try{await ot().admins.update((u=ot().authStore.model)==null?void 0:u.id,{email:c.email}),ot().authStore.clear(),e({title:n("settings.account.email.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=Us(d);e({title:n("settings.account.email.failed.message"),description:f,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(sn,{...o,children:l.jsxs("form",{onSubmit:o.handleSubmit(i),className:"space-y-8 dark:text-stone-200",children:[l.jsx(xe,{control:o.control,name:"email",render:({field:c})=>l.jsxs(ye,{children:[l.jsx(we,{children:n("settings.account.email.label")}),l.jsx(be,{children:l.jsx(de,{placeholder:n("settings.account.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),o.setValue("email",u.target.value)}})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:r?l.jsx(De,{type:"submit",children:n("common.update")}):l.jsx(De,{type:"submit",disabled:!0,variant:"secondary",children:n("common.update")})})]})})})})};var t0="Collapsible",[NW,F2]=un(t0),[TW,n0]=NW(t0),$2=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[c=!1,u]=Ln({prop:r,defaultProp:s,onChange:i});return l.jsx(TW,{scope:n,disabled:o,contentId:Mn(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Te.div,{"data-state":s0(c),"data-disabled":o?"":void 0,...a,ref:t})})});$2.displayName=t0;var U2="CollapsibleTrigger",V2=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=n0(U2,n);return l.jsx(Te.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":s0(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});V2.displayName=U2;var r0="CollapsibleContent",B2=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=n0(r0,e.__scopeCollapsible);return l.jsx(dn,{present:n||s.open,children:({present:o})=>l.jsx(PW,{...r,ref:t,present:o})})});B2.displayName=r0;var PW=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=n0(r0,n),[a,c]=g.useState(r),u=g.useRef(null),d=Ke(t,u),f=g.useRef(0),h=f.current,m=g.useRef(0),x=m.current,p=i.open||a,w=g.useRef(p),y=g.useRef();return g.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),Bt(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();f.current=b.height,m.current=b.width,w.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),c(r)}},[i.open,r]),l.jsx(Te.div,{"data-state":s0(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...o,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:p&&s})});function s0(e){return e?"open":"closed"}var RW=$2,AW=V2,OW=B2,qs="Accordion",DW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[o0,IW,MW]=eu(qs),[cm,C9]=un(qs,[MW,F2]),i0=F2(),W2=We.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,o=r;return l.jsx(o0.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx($W,{...o,ref:t}):l.jsx(FW,{...s,ref:t})})});W2.displayName=qs;var[H2,LW]=cm(qs),[Y2,zW]=cm(qs,{collapsible:!1}),FW=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,c]=Ln({prop:n,defaultProp:r,onChange:s});return l.jsx(H2,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:We.useCallback(()=>o&&c(""),[o,c]),children:l.jsx(Y2,{scope:e.__scopeAccordion,collapsible:o,children:l.jsx(K2,{...i,ref:t})})})}),$W=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[i=[],a]=Ln({prop:n,defaultProp:r,onChange:s}),c=We.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=We.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return l.jsx(H2,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:l.jsx(Y2,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(K2,{...o,ref:t})})})}),[UW,um]=cm(qs),K2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=e,a=We.useRef(null),c=Ke(a,t),u=IW(n),f=Ci(s)==="ltr",h=ue(e.onKeyDown,m=>{var R;if(!DW.includes(m.key))return;const x=m.target,p=u().filter(A=>{var D;return!((D=A.ref.current)!=null&&D.disabled)}),w=p.findIndex(A=>A.ref.current===x),y=p.length;if(w===-1)return;m.preventDefault();let v=w;const b=0,_=y-1,C=()=>{v=w+1,v>_&&(v=b)},j=()=>{v=w-1,v<b&&(v=_)};switch(m.key){case"Home":v=b;break;case"End":v=_;break;case"ArrowRight":o==="horizontal"&&(f?C():j());break;case"ArrowDown":o==="vertical"&&C();break;case"ArrowLeft":o==="horizontal"&&(f?j():C());break;case"ArrowUp":o==="vertical"&&j();break}const T=v%y;(R=p[T].ref.current)==null||R.focus()});return l.jsx(UW,{scope:n,disabled:r,direction:s,orientation:o,children:l.jsx(o0.Slot,{scope:n,children:l.jsx(Te.div,{...i,"data-orientation":o,ref:c,onKeyDown:r?void 0:h})})})}),Lf="AccordionItem",[VW,a0]=cm(Lf),G2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=um(Lf,n),i=LW(Lf,n),a=i0(n),c=Mn(),u=r&&i.value.includes(r)||!1,d=o.disabled||e.disabled;return l.jsx(VW,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(RW,{"data-orientation":o.orientation,"data-state":eP(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});G2.displayName=Lf;var Z2="AccordionHeader",q2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=a0(Z2,n);return l.jsx(Te.h3,{"data-orientation":s.orientation,"data-state":eP(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});q2.displayName=Z2;var ty="AccordionTrigger",X2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=a0(ty,n),i=zW(ty,n),a=i0(n);return l.jsx(o0.ItemSlot,{scope:n,children:l.jsx(AW,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...r,ref:t})})});X2.displayName=ty;var Q2="AccordionContent",J2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=a0(Q2,n),i=i0(n);return l.jsx(OW,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});J2.displayName=Q2;function eP(e){return e?"open":"closed"}var BW=W2,WW=G2,HW=q2,tP=X2,nP=J2;const i_=BW,$l=g.forwardRef(({className:e,...t},n)=>l.jsx(WW,{ref:n,className:re("border-b",e),...t}));$l.displayName="AccordionItem";const Ul=g.forwardRef(({className:e,children:t,...n},r)=>l.jsx(HW,{className:"flex",children:l.jsxs(tP,{ref:r,className:re("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(sv,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Ul.displayName=tP.displayName;const Vl=g.forwardRef(({className:e,children:t,...n},r)=>l.jsx(nP,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:re("pb-4 pt-0",e),children:t})}));Vl.displayName=nP.displayName;const YW=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const n=t.payload.channel;return{...e,content:{...e.content,[n]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},rP=g.createContext({}),l0=()=>g.useContext(rP),KW=({children:e})=>{const[t,n]=g.useReducer(YW,{});g.useEffect(()=>{(async()=>{const i=await vx("notifyChannels");n({type:"SET_CHANNELS",payload:i})})()},[]);const r=g.useCallback(o=>{n({type:"SET_CHANNEL",payload:o})},[]),s=g.useCallback(o=>{n({type:"SET_CHANNELS",payload:o})},[]);return l.jsx(rP.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},GW=()=>{const{config:e,setChannels:t}=l0(),{t:n}=Ye(),[r,s]=g.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});g.useEffect(()=>{const c=(()=>{const u={accessToken:"",secret:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.dingtalk?d.dingtalk:u})();s({id:e.id??"",name:"dingtalk",data:c})},[e]);const{toast:o}=$r(),i=async()=>{try{const a=await al({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=Us(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(de,{placeholder:"AccessToken",value:r.data.accessToken,onChange:a=>{s({...r,data:{...r.data,accessToken:a.target.value}})}}),l.jsx(de,{placeholder:n("settings.notification.dingtalk.secret.placeholder"),className:"mt-2",value:r.data.secret,onChange:a=>{s({...r,data:{...r.data,secret:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(De,{onClick:()=>{i()},children:n("common.save")})})]})},ZW={title:"您有 {COUNT} 张证书即将过期",content:"有 {COUNT} 张证书即将过期,域名分别为 {DOMAINS},请保持关注!"},qW=()=>{const[e,t]=g.useState(""),[n,r]=g.useState([ZW]),{toast:s}=$r(),{t:o}=Ye();g.useEffect(()=>{(async()=>{const d=await vx("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const i=u=>{const d=n[0];r([{...d,title:u}])},a=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await al({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:o("common.save.succeeded.message"),description:o("settings.notification.template.saved.message")})};return l.jsxs("div",{children:[l.jsx(de,{value:n[0].title,onChange:u=>{i(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.title")}),l.jsx(Df,{className:"mt-2",value:n[0].content,onChange:u=>{a(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.content")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(De,{onClick:c,children:o("common.save")})})]})},XW=()=>{const{config:e,setChannels:t}=l0(),{t:n}=Ye(),[r,s]=g.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});g.useEffect(()=>{const c=(()=>{const u={apiToken:"",chatId:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.telegram?d.telegram:u})();s({id:e.id??"",name:"common.provider.telegram",data:c})},[e]);const{toast:o}=$r(),i=async()=>{try{const a=await al({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=Us(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(de,{placeholder:"ApiToken",value:r.data.apiToken,onChange:a=>{s({...r,data:{...r.data,apiToken:a.target.value}})}}),l.jsx(de,{placeholder:"ChatId",value:r.data.chatId,onChange:a=>{s({...r,data:{...r.data,chatId:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(De,{onClick:()=>{i()},children:n("common.save")})})]})};function QW(e){try{return new URL(e),!0}catch{return!1}}const JW=()=>{const{config:e,setChannels:t}=l0(),{t:n}=Ye(),[r,s]=g.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});g.useEffect(()=>{const c=(()=>{const u={url:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.webhook?d.webhook:u})();s({id:e.id??"",name:"webhook",data:c})},[e]);const{toast:o}=$r(),i=async()=>{try{if(r.data.url=r.data.url.trim(),!QW(r.data.url)){o({title:n("common.save.failed.message"),description:n("settings.notification.url.errmsg.invalid"),variant:"destructive"});return}const a=await al({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=Us(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(de,{placeholder:"Url",value:r.data.url,onChange:a=>{s({...r,data:{...r.data,url:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(De,{onClick:()=>{i()},children:n("common.save")})})]})},eH=()=>{const{t:e}=Ye();return l.jsx(l.Fragment,{children:l.jsxs(KW,{children:[l.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:l.jsx(i_,{type:"multiple",className:"dark:text-stone-200",children:l.jsxs($l,{value:"item-1",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("settings.notification.template.label")}),l.jsx(Vl,{children:l.jsx(qW,{})})]})})}),l.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:l.jsxs(i_,{type:"single",className:"dark:text-stone-200",children:[l.jsxs($l,{value:"item-2",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("common.provider.dingtalk")}),l.jsx(Vl,{children:l.jsx(GW,{})})]}),l.jsxs($l,{value:"item-4",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("common.provider.telegram")}),l.jsx(Vl,{children:l.jsx(XW,{})})]}),l.jsxs($l,{value:"item-5",className:"dark:border-stone-200",children:[l.jsx(Ul,{children:e("common.provider.webhook")}),l.jsx(Vl,{children:l.jsx(JW,{})})]})]})})]})})};var c0="Radio",[tH,sP]=un(c0),[nH,rH]=tH(c0),oP=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:c,...u}=e,[d,f]=g.useState(null),h=Ke(t,p=>f(p)),m=g.useRef(!1),x=d?!!d.closest("form"):!0;return l.jsxs(nH,{scope:n,checked:s,disabled:i,children:[l.jsx(Te.button,{type:"button",role:"radio","aria-checked":s,"data-state":lP(s),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:h,onClick:ue(e.onClick,p=>{s||c==null||c(),x&&(m.current=p.isPropagationStopped(),m.current||p.stopPropagation())})}),x&&l.jsx(sH,{control:d,bubbles:!m.current,name:r,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});oP.displayName=c0;var iP="RadioIndicator",aP=g.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=rH(iP,n);return l.jsx(dn,{present:r||o.checked,children:l.jsx(Te.span,{"data-state":lP(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});aP.displayName=iP;var sH=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=g.useRef(null),i=jx(n),a=vv(t);return g.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function lP(e){return e?"checked":"unchecked"}var oH=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],u0="RadioGroup",[iH,j9]=un(u0,[rl,sP]),cP=rl(),uP=sP(),[aH,lH]=iH(u0),dP=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,m=cP(n),x=Ci(u),[p,w]=Ln({prop:o,defaultProp:s,onChange:f});return l.jsx(aH,{scope:n,name:r,required:i,disabled:a,value:p,onValueChange:w,children:l.jsx(Cv,{asChild:!0,...m,orientation:c,dir:x,loop:d,children:l.jsx(Te.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x,...h,ref:t})})})});dP.displayName=u0;var fP="RadioGroupItem",hP=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=lH(fP,n),i=o.disabled||r,a=cP(n),c=uP(n),u=g.useRef(null),d=Ke(t,u),f=o.value===s.value,h=g.useRef(!1);return g.useEffect(()=>{const m=p=>{oH.includes(p.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",x)}},[]),l.jsx(jv,{asChild:!0,...a,focusable:!i,active:f,children:l.jsx(oP,{disabled:i,required:o.required,checked:f,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:ue(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ue(s.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});hP.displayName=fP;var cH="RadioGroupIndicator",mP=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=uP(n);return l.jsx(aP,{...s,...r,ref:t})});mP.displayName=cH;var pP=dP,gP=hP,uH=mP;const yP=g.forwardRef(({className:e,...t},n)=>l.jsx(pP,{className:re("grid gap-2",e),...t,ref:n}));yP.displayName=pP.displayName;const ny=g.forwardRef(({className:e,...t},n)=>l.jsx(gP,{ref:n,className:re("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(uH,{className:"flex items-center justify-center",children:l.jsx(uk,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ny.displayName=gP.displayName;const dH=()=>{const{t:e}=Ye(),t=ie.object({provider:ie.enum(["letsencrypt","zerossl"],{message:e("settings.ca.provider.errmsg.empty")}),eabKid:ie.string().optional(),eabHmacKey:ie.string().optional()}),n=nn({resolver:rn(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=g.useState("letsencrypt"),[o,i]=g.useState(),{toast:a}=$r();g.useEffect(()=>{(async()=>{const f=await vx("ssl-provider");if(f){i(f);const h=f.content;n.setValue("provider",h.provider),n.setValue("eabKid",h.config[h.provider].eabKid),n.setValue("eabHmacKey",h.config[h.provider].eabHmacKey),s(h.provider)}else n.setValue("provider","letsencrypt"),s("letsencrypt")})()},[]);const c=d=>r===d?"border-primary":"",u=async d=>{if(d.provider==="zerossl"&&(d.eabKid||n.setError("eabKid",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),!d.eabKid||!d.eabHmacKey))return;const f={id:o==null?void 0:o.id,name:"ssl-provider",content:{provider:d.provider,config:{letsencrypt:{},zerossl:{eabKid:d.eabKid??"",eabHmacKey:d.eabHmacKey??""}}}};try{await al(f),a({title:e("common.update.succeeded.message"),description:e("common.update.succeeded.message")})}catch(h){const m=Us(h);a({title:e("common.update.failed.message"),description:m,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(sn,{...n,children:l.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[l.jsx(xe,{control:n.control,name:"provider",render:({field:d})=>l.jsxs(ye,{children:[l.jsx(we,{children:e("common.text.ca")}),l.jsx(be,{children:l.jsxs(yP,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(ny,{value:"letsencrypt",id:"letsencrypt"}),l.jsx(Vt,{htmlFor:"letsencrypt",children:l.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[l.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),l.jsx("div",{children:"Let's Encrypt"})]})})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(ny,{value:"zerossl",id:"zerossl"}),l.jsx(Vt,{htmlFor:"zerossl",children:l.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[l.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),l.jsx("div",{children:"ZeroSSL"})]})})]})]})}),l.jsx(xe,{control:n.control,name:"eabKid",render:({field:f})=>l.jsxs(ye,{hidden:r!=="zerossl",children:[l.jsx(we,{children:"EAB_KID"}),l.jsx(be,{children:l.jsx(de,{placeholder:e("settings.ca.eab_kid.errmsg.empty"),...f,type:"text"})}),l.jsx(fe,{})]})}),l.jsx(xe,{control:n.control,name:"eabHmacKey",render:({field:f})=>l.jsxs(ye,{hidden:r!=="zerossl",children:[l.jsx(we,{children:"EAB_HMAC_KEY"}),l.jsx(be,{children:l.jsx(de,{placeholder:e("settings.ca.eab_hmac_key.errmsg.empty"),...f,type:"text"})}),l.jsx(fe,{})]})}),l.jsx(fe,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(De,{type:"submit",children:e("common.update")})})]})})})})},fH=xD([{path:"/",element:l.jsx(V$,{}),children:[{path:"/",element:l.jsx(CW,{})},{path:"/domains",element:l.jsx(u8,{})},{path:"/edit",element:l.jsx(fW,{})},{path:"/access",element:l.jsx(yW,{})},{path:"/history",element:l.jsx(vW,{})},{path:"/setting",element:l.jsx(kW,{}),children:[{path:"/setting/password",element:l.jsx(SW,{})},{path:"/setting/account",element:l.jsx(EW,{})},{path:"/setting/notify",element:l.jsx(eH,{})},{path:"/setting/ssl-provider",element:l.jsx(dH,{})}]}]},{path:"/login",element:l.jsx(bW,{}),children:[{path:"/login",element:l.jsx(wW,{})}]},{path:"/about",element:l.jsx("div",{children:"About"})}]),hH={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class zf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||hH,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new zf(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new zf(this.logger,t)}}var es=new zf;class dm{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a.apply(a,[t,...r])})}}const Nl=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},a_=e=>e==null?"":""+e,mH=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},pH=/###/g,l_=e=>e&&e.indexOf("###")>-1?e.replace(pH,"."):e,c_=e=>!e||typeof e=="string",nc=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s<r.length-1;){if(c_(e))return{};const o=l_(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return c_(e)?{}:{obj:e,k:l_(r[s])}},u_=(e,t,n)=>{const{obj:r,k:s}=nc(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),a=nc(e,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=nc(e,i,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},gH=(e,t,n,r)=>{const{obj:s,k:o}=nc(e,t,Object);s[o]=s[o]||[],s[o].push(n)},Ff=(e,t)=>{const{obj:n,k:r}=nc(e,t);if(n)return n[r]},yH=(e,t,n)=>{const r=Ff(e,n);return r!==void 0?r:Ff(t,n)},vP=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):vP(e[r],t[r],n):e[r]=t[r]);return e},Hi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vH={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const xH=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>vH[t]):e;class wH{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const bH=[" ",",","?","!",";"],_H=new wH(20),SH=(e,t,n)=>{t=t||"",n=n||"";const r=bH.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=_H.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},ry=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,a="";for(let c=o;c<r.length;++c)if(c!==o&&(a+=n),a+=r[c],i=s[a],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=i}return s},$f=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class d_ extends dm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const c=Ff(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!i||typeof r!="string"?c:ry(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),u_(this.data,a,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=Ff(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?vP(c,r,o):c={...c,...r},u_(this.data,a,c),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var xP={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const f_={};class Uf extends dm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),mH(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=es.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!SH(t,r,s);if(i&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let h=f&&f.res;const m=f&&f.usedKey||i,x=f&&f.exactUsedKey||i,p=Object.prototype.toString.apply(h),w=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&w.indexOf(p)<0&&!(typeof y=="string"&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,{...n,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(f.res=_,f.usedParams=this.getUsedParamsDetails(n),f):_}if(o){const _=Array.isArray(h),C=_?[]:{},j=_?x:m;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const R=`${j}${o}${T}`;C[T]=this.translate(R,{...n,joinArrays:!1,ns:a}),C[T]===R&&(C[T]=h[T])}h=C}}else if(v&&typeof y=="string"&&Array.isArray(h))h=h.join(y),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,C=!1;const j=n.count!==void 0&&typeof n.count!="string",T=Uf.hasDefaultValue(n),R=j?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",D=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=G),this.isValidLookup(h)||(C=!0,h=i);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,S=T&&G!==h&&this.options.updateMissing;if(C||_||S){if(this.logger.log(S?"updateKey":"missingKey",u,c,i,S?G:h),o){const W=this.resolve(i,{...n,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let W=0;W<J.length;W++)U.push(J[W]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(n.lng||this.language):U.push(n.lng||this.language);const F=(W,I,X)=>{const $=T&&X!==h?X:z;this.options.missingKeyHandler?this.options.missingKeyHandler(W,c,I,$,S,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,c,I,$,S,n),this.emit("missingKey",W,c,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{F([W],i+X,n[`defaultValue${X}`]||G)})}):F(U,i,G))}h=this.extendTranslation(h,t,n,f,r),C&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${i}`),(C||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${i}`:i,_?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),u){const h=t.match(this.interpolator.nestingRegexp),m=h&&h.length;d<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var h=arguments.length,m=new Array(h),x=0;x<h;x++)m[x]=arguments[x];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=typeof a=="string"?[a]:a;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=xP.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,a;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;s=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",m=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",p=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{this.isValidLookup(r)||(a=w,!f_[`${p[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(f_[`${p[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(y=>{if(this.isValidLookup(r))return;i=y;const v=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,d,y,w,n);else{let _;h&&(_=this.pluralResolver.getSuffix(y,n.count,n));const C=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(v.push(d+_),n.ordinal&&_.indexOf(j)===0&&v.push(d+_.replace(j,this.options.pluralSeparator)),m&&v.push(d+C)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;v.push(T),h&&(v.push(T+_),n.ordinal&&_.indexOf(j)===0&&v.push(T+_.replace(j,this.options.pluralSeparator)),m&&v.push(T+C))}}let b;for(;b=v.pop();)this.isValidLookup(r)||(o=b,r=this.getResource(y,w,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const gp=e=>e.charAt(0).toUpperCase()+e.slice(1);class h_{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=es.create("languageUtils")}getScriptPartFromCode(t){if(t=$f(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=$f(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=gp(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=gp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=gp(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let kH=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],CH={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const jH=["v1","v2","v3"],EH=["v4"],m_={zero:0,one:1,two:2,few:3,many:4,other:5},NH=()=>{const e={};return kH.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:CH[t.fc]}})}),e};class TH{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=es.create("pluralResolver"),(!this.options.compatibilityJSON||EH.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=NH(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=$f(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[o]=i,i}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>m_[s]-m_[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!jH.includes(this.options.compatibilityJSON)}}const p_=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=yH(e,t,n);return!o&&s&&typeof n=="string"&&(o=ry(e,n,r),o===void 0&&(o=ry(t,n,r))),o},yp=e=>e.replace(/\$/g,"$$$$");class PH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:x,nestingSuffixEscaped:p,nestingOptionsSeparator:w,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:xH,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Hi(o):i||"{{",this.suffix=a?Hi(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Hi(h):m||Hi("$t("),this.nestingSuffix=x?Hi(x):p||Hi(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const y=p_(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...s,...n,interpolationkey:m}):y}const x=m.split(this.formatSeparator),p=x.shift().trim(),w=x.join(this.formatSeparator).trim();return this.format(p_(n,c,p,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:p})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>yp(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?yp(this.escape(m)):yp(m)}].forEach(m=>{for(a=0;o=m.regex.exec(t);){const x=o[1].trim();if(i=u(x),i===void 0)if(typeof d=="function"){const w=d(t,o,s);i=typeof w=="string"?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=a_(i));const p=m.safeValue(i);if(t=t.replace(o[0],p),f?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const a=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,i);const m=h.match(/'/g),x=h.match(/"/g);(m&&m.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),u&&(i={...u,...i})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,p),`${c}${d}${h}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),c=d,u=!0}if(o=n(a.call(this,s[1].trim(),i),i),o&&s[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=a_(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const RH=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...c]=i.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Yi=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=t[i];return a||(a=e($f(r),s),t[i]=a),a(n)}};class AH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.create("formatter"),this.options=t,this.formats={number:Yi((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Yi((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Yi((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Yi((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Yi((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Yi(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,c)=>{const{formatName:u,formatOptions:d}=RH(c);if(this.formats[u]){let f=a;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](a,m,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const OH=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class DH extends dm{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=es.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},a={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?i[h]===void 0&&(i[h]=!0):(this.state[h]=1,d=!1,i[h]===void 0&&(i[h]=!0),o[h]===void 0&&(o[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{gH(c.loaded,[o],i),OH(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,a),this.loaded(t,i,a)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,c):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,s,a,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const g_=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),y_=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),sd=()=>{},IH=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Kc extends dm{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=y_(t),this.services={},this.logger=es,this.modules={external:[]},IH(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=g_();this.options={...s,...this.options,...y_(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?es.init(o(this.modules.logger),this.options):es.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=AH);const f=new h_(this.options);this.store=new d_(this.options.resources,this.options);const h=this.services;h.logger=es,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new TH(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new PH(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new DH(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Uf(this.services,this.options),this.translator.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=sd),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=Nl(),u=()=>{const d=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sd;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>i(c)),this.options.preload&&this.options.preload.forEach(a=>i(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const s=Nl();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=sd),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&xP.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Nl();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},i=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const o=function(i,a){let c;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];c=s.options.overloadTranslationOptionHandler([i,a].concat(d))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const h=s.options.keySeparator||".";let m;return c.keyPrefix&&Array.isArray(i)?m=i.map(x=>`${c.keyPrefix}${h}${x}`):m=c.keyPrefix?`${c.keyPrefix}${h}${i}`:i,s.t(m,c)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Nl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Nl();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new h_(g_());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Kc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sd;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Kc(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new d_(this.store.data,s),o.services.resourceStore=o.store),o.translator=new Uf(o.services,s),o.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];o.emit(a,...u)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vn=Kc.createInstance();vn.createInstance=Kc.createInstance;vn.createInstance;vn.dir;vn.init;vn.loadResources;vn.reloadResources;vn.use;vn.changeLanguage;vn.getFixedT;vn.t;vn.exists;vn.setDefaultNamespace;vn.hasLoadedNamespace;vn.loadNamespaces;vn.loadLanguages;const{slice:MH,forEach:LH}=[];function zH(e){return LH.call(MH.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const v_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,FH=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!v_.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!v_.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},x_={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=FH(e,encodeURIComponent(t),s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e){this.create(e,"",-1)}};var $H={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return x_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&x_.create(n,e,r,s,o)}},UH={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const i=s.substring(1).split("&");for(let a=0;a<i.length;a++){const c=i[a].indexOf("=");c>0&&i[a].substring(0,c)===t&&(n=i[a].substring(c+1))}}return n}};let Tl=null;const w_=()=>{if(Tl!==null)return Tl;try{Tl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Tl=!1}return Tl};var VH={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&w_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&w_()&&window.localStorage.setItem(n,e)}};let Pl=null;const b_=()=>{if(Pl!==null)return Pl;try{Pl=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Pl=!1}return Pl};var BH={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&b_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&b_()&&window.sessionStorage.setItem(n,e)}},WH={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},HH={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},YH={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},KH={name:"subdomain",lookup(e){var s,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(s=window.location)==null?void 0:s.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function GH(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class wP{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=zH(n,this.options||{},GH()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector($H),this.addDetector(UH),this.addDetector(VH),this.addDetector(BH),this.addDetector(WH),this.addDetector(HH),this.addDetector(YH),this.addDetector(KH)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}wP.type="languageDetector";const ZH={"common.add":"新增","common.save":"保存","common.save.succeeded.message":"保存成功","common.save.failed.message":"保存失败","common.edit":"编辑","common.copy":"复制","common.download":"下载","common.delete":"刪除","common.delete.succeeded.message":"删除成功","common.delete.failed.message":"删除失败","common.next":"下一步","common.confirm":"确认","common.cancel":"取消","common.submit":"提交","common.update":"更新","common.update.succeeded.message":"修改成功","common.update.failed.message":"修改失败","common.text.domain":"域名","common.text.domain.empty":"无域名","common.text.ip":"IP 地址","common.text.ip.empty":"无 IP 地址","common.text.dns":"DNS(域名服务器)","common.text.dns.empty":"无 DNS 地址","common.text.ca":"CA(证书颁发机构)","common.text.name":"名称","common.text.provider":"服务商","common.text.created_at":"创建时间","common.text.updated_at":"更新时间","common.text.operations":"操作","common.text.nodata":"暂无数据","common.menu.settings":"系统设置","common.menu.logout":"退出登录","common.menu.document":"文档","common.pagination.next":"下一页","common.pagination.prev":"上一页","common.pagination.more":"更多","common.theme.light":"浅色","common.theme.dark":"暗黑","common.theme.system":"跟随系统","common.errmsg.string_max":"请输入不超过 {{max}} 个字符","common.errmsg.email_empty":"请输入邮箱","common.errmsg.email_invalid":"请输入正确的邮箱","common.errmsg.email_duplicate":"邮箱已存在","common.errmsg.domain_invalid":"请输入正确的域名","common.errmsg.host_invalid":"请输入正确的域名或 IP 地址","common.errmsg.ip_invalid":"请输入正确的 IP 地址","common.errmsg.url_invalid":"请输入正确的 URL","common.provider.tencent":"腾讯云","common.provider.tencent.cdn":"腾讯云 - CDN","common.provider.aliyun":"阿里云","common.provider.aliyun.oss":"阿里云 - OSS","common.provider.aliyun.cdn":"阿里云 - CDN","common.provider.aliyun.dcdn":"阿里云 - DCDN","common.provider.huaweicloud":"华为云","common.provider.qiniu":"七牛云","common.provider.qiniu.cdn":"七牛云 - CDN","common.provider.aws":"AWS","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"本地部署","common.provider.ssh":"SSH 部署","common.provider.webhook":"Webhook","common.provider.dingtalk":"钉钉","common.provider.telegram":"Telegram"},qH={"login.username.label":"用户名","login.username.placeholder":"请输入用户名/邮箱","login.username.errmsg.invalid":"请输入正确的用户名/邮箱","login.password.label":"密码","login.password.placeholder":"请输入密码","login.password.errmsg.invalid":"密码至少 10 个字符","login.submit":"登录"},XH={"dashboard.page.title":"仪表盘","dashboard.statistics.all":"所有","dashboard.statistics.near_expired":"即将过期","dashboard.statistics.enabled":"启用中","dashboard.statistics.disabled":"未启用","dashboard.statistics.unit":"个","dashboard.history":"部署历史"},QH={"settings.page.title":"系统设置","settings.account.relogin.message":"请重新登录","settings.account.tab":"账号","settings.account.email.label":"登录邮箱","settings.account.email.errmsg.invalid":"请输入正确的邮箱地址","settings.account.email.placeholder":"请输入邮箱","settings.account.email.changed.message":"修改账户邮箱成功","settings.account.email.failed.message":"修改账户邮箱失败","settings.password.tab":"密码","settings.password.password.errmsg.length":"密码至少10个字符","settings.password.password.errmsg.not_matched":"两次密码不一致","settings.password.current_password.label":"当前密码","settings.password.current_password.placeholder":"请输入旧密码","settings.password.new_password.label":"新密码","settings.password.new_password.placeholder":"请输入新密码","settings.password.confirm_password.label":"确认密码","settings.password.confirm_password.placeholder":"请再次输入新密码","settings.password.changed.message":"修改密码成功","settings.password.failed.message":"修改密码失败","settings.notification.tab":"消息推送","settings.notification.template.label":"内容模板","settings.notification.template.saved.message":"通知模板保存成功","settings.notification.template.variables.tips.title":"可选的变量({COUNT}: 即将过期张数)","settings.notification.template.variables.tips.content":"可选的变量({COUNT}: 即将过期张数;{DOMAINS}: 域名列表)","settings.notification.config.enable":"是否启用","settings.notification.config.saved.message":"配置保存成功","settings.notification.config.failed.message":"配置保存失败","settings.notification.dingtalk.secret.placeholder":"加签的签名","settings.notification.url.errmsg.invalid":"URL 格式不正确","settings.ca.tab":"证书颁发机构(CA)","settings.ca.provider.errmsg.empty":"请选择证书分发机构","settings.ca.eab_kid.errmsg.empty":"请输入EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"请输入EAB_HMAC_KEY","settings.ca.eab_kid_hmac_key.errmsg.empty":"请输入EAB_KID和EAB_HMAC_KEY"},JH={"domain.page.title":"域名列表","domain.nodata":"请添加域名开始部署证书吧。","domain.add":"新增域名","domain.edit":"编辑域名","domain.delete":"删除域名","domain.delete.confirm":"确定要删除域名吗?","domain.history":"部署历史","domain.deploy":"立即部署","domain.deploy.started.message":"开始部署","domain.deploy.started.tips":"已发起部署,请稍后查看部署日志。","domain.deploy.failed.message":"执行失败","domain.deploy.failed.tips":"执行失败,请在 <1>部署历史</1> 查看详情。","domain.deploy_forced":"强行部署","domain.props.expiry":"有效期限","domain.props.expiry.date1":"有效期 {{date}} 天","domain.props.expiry.date2":"{{date}} 到期","domain.props.last_execution_status":"最近执行状态","domain.props.last_execution_stage":"最近执行阶段","domain.props.last_execution_time":"最近执行时间","domain.props.enable":"是否启用","domain.props.enable.enabled":"启用","domain.props.enable.disabled":"禁用","domain.application.tab":"申请配置","domain.application.form.domain.added.message":"域名添加成功","domain.application.form.domain.changed.message":"域名编辑成功","domain.application.form.email.label":"邮箱","domain.application.form.email.tips":"(申请证书需要提供邮箱)","domain.application.form.email.placeholder":"请选择邮箱","domain.application.form.email.add":"添加邮箱","domain.application.form.email.list":"邮箱列表","domain.application.form.access.label":"DNS 服务商授权配置","domain.application.form.access.placeholder":"请选择 DNS 服务商授权配置","domain.application.form.access.list":"已有的 DNS 服务商授权配置","domain.application.form.advanced_settings.label":"高级设置","domain.application.form.key_algorithm.label":"数字证书算法","domain.application.form.key_algorithm.placeholder":"请选择数字证书算法","domain.application.form.timeout.label":"DNS 传播检查超时时间(单位:秒)","domain.application.form.timeoue.placeholder":"请输入 DNS 传播检查超时时间","domain.application.unsaved.message":"请先保存申请配置","domain.deployment.tab":"部署配置","domain.deployment.nodata":"暂无部署配置,请添加后开始部署证书吧","domain.deployment.form.type.label":"部署方式","domain.deployment.form.type.placeholder":"请选择部署方式","domain.deployment.form.type.list":"支持的部署方式","domain.deployment.form.access.label":"授权配置","domain.deployment.form.access.placeholder":"请选择授权配置","domain.deployment.form.access.list":"已有的服务商授权配置","domain.deployment.form.cdn_domain.label":"部署到域名","domain.deployment.form.cdn_domain.placeholder":"请输入 CDN 域名","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_bucket":"存储桶","domain.deployment.form.oss_bucket.placeholder":"请输入存储桶名","domain.deployment.form.variables.label":"变量","domain.deployment.form.variables.key":"变量名","domain.deployment.form.variables.value":"值","domain.deployment.form.variables.empty":"尚未添加变量","domain.deployment.form.variables.key.required":"变量名不能为空","domain.deployment.form.variables.value.required":"变量值不能为空","domain.deployment.form.variables.key.placeholder":"请输入变量名","domain.deployment.form.variables.value.placeholder":"请输入变量值"},e9={"access.page.title":"授权管理","access.authorization.tab":"授权","access.authorization.nodata":"请添加授权开始部署证书吧。","access.authorization.add":"新增授权","access.authorization.edit":"编辑授权","access.authorization.copy":"复制授权","access.authorization.delete":"删除授权","access.authorization.delete.confirm":"确定要删除授权吗?","access.authorization.form.type.label":"服务商","access.authorization.form.type.placeholder":"请选择服务商","access.authorization.form.type.list":"服务商列表","access.authorization.form.name.label":"名称","access.authorization.form.name.placeholder":"请输入授权名称","access.authorization.form.config.label":"配置类型","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"请输入区域","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"请输入 AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"请输入 AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"请输入 AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"请输入 SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"请输入 SecretKey","access.authorization.form.secret_access_key.label":"SecretAccessKey","access.authorization.form.secret_access_key.placeholder":"请输入 SecretAccessKey","access.authorization.form.aws_hosted_zone_id.label":"AWS 托管区域 ID","access.authorization.form.aws_hosted_zone_id.placeholder":"请输入 AWS Hosted Zone ID","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"请输入 CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"请输入 GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"请输入 GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"请输入 NAMESILO_API_KEY","access.authorization.form.username.label":"用户名","access.authorization.form.username.placeholder":"请输入用户名","access.authorization.form.password.label":"密码","access.authorization.form.password.placeholder":"请输入密码","access.authorization.form.access_group.placeholder":"请选择分组","access.authorization.form.ssh_group.label":"授权配置组(用于将一个域名证书部署到多个 SSH 主机)","access.authorization.form.ssh_host.label":"服务器 Host","access.authorization.form.ssh_host.placeholder":"请输入 Host","access.authorization.form.ssh_port.label":"SSH 端口","access.authorization.form.ssh_port.placeholder":"请输入 Port","access.authorization.form.ssh_username.label":"用户名","access.authorization.form.ssh_username.placeholder":"请输入用户名","access.authorization.form.ssh_password.label":"密码(使用密码登录)","access.authorization.form.ssh_password.placeholder":"请输入密码","access.authorization.form.ssh_key.label":"Key(使用私钥登录)","access.authorization.form.ssh_key.placeholder":"请输入 Key","access.authorization.form.ssh_key_file.placeholder":"请选择文件","access.authorization.form.ssh_key_passphrase.label":"Key 口令(使用私钥登录)","access.authorization.form.ssh_key_passphrase.placeholder":"请输入 Key 口令","access.authorization.form.ssh_key_path.label":"私钥保存路径","access.authorization.form.ssh_key_path.placeholder":"请输入私钥保存路径","access.authorization.form.ssh_cert_path.label":"证书保存路径","access.authorization.form.ssh_cert_path.placeholder":"请输入证书保存路径","access.authorization.form.ssh_pre_command.label":"前置 Command","access.authorization.form.ssh_pre_command.placeholder":"在部署证书前执行的前置命令","access.authorization.form.ssh_command.label":"Command","access.authorization.form.ssh_command.placeholder":"请输入要执行的命令","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"请输入 Webhook URL","access.group.tab":"授权组","access.group.nodata":"暂无部署授权配置,请添加后开始使用吧","access.group.total":"共有 {{total}} 个部署授权配置","access.group.add":"添加授权组","access.group.delete":"删除组","access.group.delete.confirm":"确定要删除部署授权组吗?","access.group.form.name.label":"组名","access.group.form.name.errmsg.empty":"请输入组名","access.group.domains":"所有授权","access.group.domains.nodata":"请添加域名开始部署证书吧。"},t9={"history.page.title":"部署","history.nodata":"你暂未创建任何部署,请先添加域名进行部署吧!","history.props.domain":"域名","history.props.status":"状态","history.props.stage":"阶段","history.props.stage.progress.check":"检查","history.props.stage.progress.apply":"获取","history.props.stage.progress.deploy":"部署","history.props.last_execution_time":"最近执行时间","history.log":"日志"},n9=Object.freeze({...ZH,...qH,...XH,...QH,...JH,...e9,...t9}),r9={"common.save":"Save","common.save.succeeded.message":"Save Successful","common.save.failed.message":"Save Failed","common.add":"Add","common.edit":"Edit","common.copy":"Copy","common.download":"Download","common.delete":"Delete","common.delete.succeeded.message":"Delete Successful","common.delete.failed.message":"Delete Failed","common.next":"Next","common.confirm":"Confirm","common.cancel":"Cancel","common.submit":"Submit","common.update":"Update","common.update.succeeded.message":"Update Successful","common.update.failed.message":"Update Failed","common.text.domain":"Domain","common.text.domain.empty":"No Domain","common.text.ip":"IP Address","common.text.ip.empty":"No IP address","common.text.dns":"Domain Name Server","common.text.dns.empty":"No DNS","common.text.ca":"Certificate Authority","common.text.provider":"Provider","common.text.name":"Name","common.text.created_at":"Created At","common.text.updated_at":"Updated At","common.text.operations":"Operations","common.text.nodata":"No data available","common.menu.settings":"Settings","common.menu.logout":"Logout","common.menu.document":"Document","common.pagination.next":"Next","common.pagination.prev":"Previous","common.pagination.more":"More pages","common.theme.light":"Light","common.theme.dark":"Dark","common.theme.system":"System","common.errmsg.string_max":"Please enter no more than {{max}} characters","common.errmsg.email_invalid":"Please enter a valid email address","common.errmsg.email_empty":"Please enter email","common.errmsg.email_duplicate":"Email already exists","common.errmsg.domain_invalid":"Please enter domain","common.errmsg.host_invalid":"Please enter the correct domain name or IP","common.errmsg.ip_invalid":"Please enter IP","common.errmsg.url_invalid":"Please enter a valid URL","common.provider.aliyun":"Alibaba Cloud","common.provider.aliyun.oss":"Alibaba Cloud - OSS","common.provider.aliyun.cdn":"Alibaba Cloud - CDN","common.provider.aliyun.dcdn":"Alibaba Cloud - DCDN","common.provider.tencent":"Tencent","common.provider.tencent.cdn":"Tencent - CDN","common.provider.huaweicloud":"Huawei Cloud","common.provider.qiniu":"Qiniu","common.provider.qiniu.cdn":"Qiniu - CDN","common.provider.aws":"AWS","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"Local Deployment","common.provider.ssh":"SSH Deployment","common.provider.webhook":"Webhook","common.provider.dingtalk":"DingTalk","common.provider.telegram":"Telegram"},s9={"login.username.label":"Username","login.username.placeholder":"Username/Email","login.username.errmsg.invalid":"Please enter a valid email address","login.password.label":"Password","login.password.placeholder":"Password","login.password.errmsg.invalid":"Password should be at least 10 characters","login.submit":"Log In"},o9={"dashboard.page.title":"Dashboard","dashboard.statistics.all":"All","dashboard.statistics.near_expired":"About to Expire","dashboard.statistics.enabled":"Enabled","dashboard.statistics.disabled":"Not Enabled","dashboard.statistics.unit":"","dashboard.history":"Deployment History"},i9={"settings.page.title":"Settings","settings.account.relogin.message":"Please login again","settings.account.tab":"Account","settings.account.email.label":"Email","settings.account.email.placeholder":"Please enter email","settings.account.email.errmsg.invalid":"Please enter a valid email address","settings.account.email.changed.message":"Account email altered successfully","settings.account.email.failed.message":"Account email alteration failed","settings.password.tab":"Password","settings.password.current_password.label":"Current Password","settings.password.current_password.placeholder":"Please enter the current password","settings.password.new_password.label":"New Password","settings.password.new_password.placeholder":"Please enter the new password","settings.password.confirm_password.label":"Confirm Password","settings.password.confirm_password.placeholder":"Please enter the new password again","settings.password.password.errmsg.length":"Password should be at least 10 characters","settings.password.password.errmsg.not_matched":"Passwords do not match","settings.password.changed.message":"Password changed successfully","settings.password.failed.message":"Password change failed","settings.notification.tab":"Notification","settings.notification.template.label":"Template","settings.notification.template.saved.message":"Notification template saved successfully","settings.notification.template.variables.tips.title":"Optional variables ({COUNT}: number of expiring soon)","settings.notification.template.variables.tips.content":"Optional variables ({COUNT}: number of expiring soon. {DOMAINS}: Domain list)","settings.notification.config.enable":"Enable","settings.notification.config.saved.message":"Configuration saved successfully","settings.notification.config.failed.message":"Configuration save failed","settings.notification.dingtalk.secret.placeholder":"Signature for signed addition","settings.notification.url.errmsg.invalid":"Invalid Url format","settings.ca.tab":"Certificate Authority","settings.ca.provider.errmsg.empty":"Please select a Certificate Authority","settings.ca.eab_kid.errmsg.empty":"Please enter EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"Please enter EAB_HMAC_KEY.","settings.ca.eab_kid_hmac_key.errmsg.empty":"Please enter EAB_KID and EAB_HMAC_KEY"},a9={"domain.page.title":"Domain List","domain.nodata":"Please add a domain to start deploying the certificate.","domain.add":"Add Domain","domain.edit":"Edit Domain","domain.delete":"Delete Domain","domain.delete.confirm":"Are you sure you want to delete this domain?","domain.history":"Deployment History","domain.deploy":"Deploy Now","domain.deploy.started.message":"Deploy Started","domain.deploy.started.tips":"Deployment initiated, please check the deployment log later.","domain.deploy.failed.message":"Execution Failed","domain.deploy.failed.tips":"Execution failed, please check the details in <1>Deployment History</1>.","domain.deploy_forced":"Force Deployment","domain.props.expiry":"Validity Period","domain.props.expiry.date1":"Valid for {{date}} days","domain.props.expiry.date2":"Expiry on {{date}}","domain.props.last_execution_status":"Last Execution Status","domain.props.last_execution_stage":"Last Execution Stage","domain.props.last_execution_time":"Last Execution Time","domain.props.enable":"Enable","domain.props.enable.enabled":"Enable","domain.props.enable.disabled":"Disable","domain.application.tab":"Apply Settings","domain.application.form.domain.added.message":"Domain added successfully","domain.application.form.domain.changed.message":"Domain updated successfully","domain.application.form.email.label":"Email","domain.application.form.email.tips":"(A email is required to apply for a certificate)","domain.application.form.email.placeholder":"Please select email","domain.application.form.email.add":"Add Email","domain.application.form.email.list":"Email List","domain.application.form.access.label":"DNS Provider Authorization Configuration","domain.application.form.access.placeholder":"Please select DNS provider authorization configuration","domain.application.form.access.list":"Provider Authorization Configurations","domain.application.form.advanced_settings.label":"Advanced Settings","domain.application.form.key_algorithm.label":"Certificate Key Algorithm","domain.application.form.key_algorithm.placeholder":"Please select certificate key algorithm","domain.application.form.timeout.label":"DNS Propagation Timeout (seconds)","domain.application.form.timeoue.placeholder":"Please enter maximum waiting time for DNS propagation","domain.application.unsaved.message":"Please save applyment configuration first","domain.deployment.tab":"Deploy Settings","domain.deployment.nodata":"Deployment not added yet","domain.deployment.form.type.label":"Deploy Method","domain.deployment.form.type.placeholder":"Please select deploy method","domain.deployment.form.type.list":"Deploy Method List","domain.deployment.form.access.label":"Access Configuration","domain.deployment.form.access.placeholder":"Please select provider authorization configuration","domain.deployment.form.access.list":"Provider Authorization Configurations","domain.deployment.form.cdn_domain.label":"Deploy to domain","domain.deployment.form.cdn_domain.placeholder":"Please enter CDN domain","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_bucket":"Bucket","domain.deployment.form.oss_bucket.placeholder":"Please enter Bucket","domain.deployment.form.variables.label":"Variable","domain.deployment.form.variables.key":"Name","domain.deployment.form.variables.value":"Value","domain.deployment.form.variables.empty":"Variable not added yet","domain.deployment.form.variables.key.required":"Variable name cannot be empty","domain.deployment.form.variables.value.required":"Variable value cannot be empty","domain.deployment.form.variables.key.placeholder":"Variable name","domain.deployment.form.variables.value.placeholder":"Variable value"},l9={"access.page.title":"Authorization Management","access.authorization.tab":"Authorization","access.authorization.nodata":"Please add authorization to start deploying certificate.","access.authorization.add":"Add Authorization","access.authorization.edit":"Edit Authorization","access.authorization.copy":"Copy Authorization","access.authorization.delete":"Delete Authorization","access.authorization.delete.confirm":"Are you sure you want to delete the deployment authorization?","access.authorization.form.type.label":"Provider","access.authorization.form.type.placeholder":"Please select a provider","access.authorization.form.type.list":"Authorization List","access.authorization.form.name.label":"Name","access.authorization.form.name.placeholder":"Please enter authorization name","access.authorization.form.config.label":"Configuration Type","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"Please enter Region","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"Please enter AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"Please enter AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"Please enter AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"Please enter SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"Please enter SecretKey","access.authorization.form.secret_access_key.label":"SecretAccessKey","access.authorization.form.secret_access_key.placeholder":"Please enter SecretAccessKey","access.authorization.form.aws_hosted_zone_id.label":"AWS Hosted Zone ID","access.authorization.form.aws_hosted_zone_id.placeholder":"Please enter AWS Hosted Zone ID","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"Please enter CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"Please enter GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"Please enter GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"Please enter NAMESILO_API_KEY","access.authorization.form.username.label":"Username","access.authorization.form.username.placeholder":"Please enter username","access.authorization.form.password.label":"Password","access.authorization.form.password.placeholder":"Please enter password","access.authorization.form.access_group.placeholder":"Please select a group","access.authorization.form.ssh_group.label":"Authorization Configuration Group (used to deploy a single domain certificate to multiple SSH hosts)","access.authorization.form.ssh_host.label":"Server Host","access.authorization.form.ssh_host.placeholder":"Please enter Host","access.authorization.form.ssh_port.label":"SSH Port","access.authorization.form.ssh_port.placeholder":"Please enter Port","access.authorization.form.ssh_username.label":"Username","access.authorization.form.ssh_username.placeholder":"Please enter username","access.authorization.form.ssh_password.label":"Password (Log-in using password)","access.authorization.form.ssh_password.placeholder":"Please enter password","access.authorization.form.ssh_key.label":"Key (Log-in using private key)","access.authorization.form.ssh_key.placeholder":"Please enter Key","access.authorization.form.ssh_key_file.placeholder":"Please select file","access.authorization.form.ssh_key_passphrase.label":"Key Passphrase (Log-in using private key)","access.authorization.form.ssh_key_passphrase.placeholder":"Please enter Key Passphrase","access.authorization.form.ssh_key_path.label":"Private Key Save Path","access.authorization.form.ssh_key_path.placeholder":"Please enter private key save path","access.authorization.form.ssh_cert_path.label":"Certificate Save Path","access.authorization.form.ssh_cert_path.placeholder":"Please enter certificate save path","access.authorization.form.ssh_pre_command.label":"Pre-deployment Command","access.authorization.form.ssh_pre_command.placeholder":"Command to be executed before deploying the certificate","access.authorization.form.ssh_command.label":"Command","access.authorization.form.ssh_command.placeholder":"Please enter command","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"Please enter Webhook URL","access.group.tab":"Authorization Group","access.group.nodata":"No deployment authorization configuration yet, please add after starting use.","access.group.total":"Totally {{total}} deployment authorization configuration","access.group.add":"Add Group","access.group.delete":"Delete Group","access.group.delete.confirm":"Are you sure you want to delete the deployment authorization group?","access.group.form.name.label":"Group Name","access.group.form.name.errmsg.empty":"Please enter group name","access.group.domains":"All Authorizations","access.group.domains.nodata":"Please add a domain to start deploying the certificate."},c9={"history.page.title":"Deployment","history.nodata":"You have not created any deployments yet, please add a domain to start deployment!","history.props.domain":"Domain","history.props.status":"Status","history.props.stage":"Stage","history.props.stage.progress.check":"Check","history.props.stage.progress.apply":"Apply","history.props.stage.progress.deploy":"Deploy","history.props.last_execution_time":"Last Execution Time","history.log":"Log"},u9=Object.freeze({...r9,...s9,...o9,...i9,...a9,...l9,...c9}),d9={zh:{name:"简体中文",translation:n9},en:{name:"English",translation:u9}};vn.use(wP).use(JD).init({resources:d9,fallbackLng:"zh",debug:!0,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}.json"}});vp.createRoot(document.getElementById("root")).render(l.jsx(We.StrictMode,{children:l.jsx(JF,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(ND,{router:fH})})}))});export default f9(); diff --git a/ui/dist/imgs/providers/aliyun.svg b/ui/dist/imgs/providers/aliyun.svg index b4f740ee..7d0b70e0 100644 --- a/ui/dist/imgs/providers/aliyun.svg +++ b/ui/dist/imgs/providers/aliyun.svg @@ -1 +1 @@ -<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9731" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M1020.586667 361.813333c0-92.16-75.093333-167.253333-167.253334-167.253333h-266.24l23.893334 95.573333 228.693333 51.2c20.48 3.413333 37.546667 23.893333 37.546667 44.373334v245.76c0 20.48-17.066667 40.96-37.546667 44.373333l-228.693333 51.2-27.306667 92.16h266.24c92.16 0 167.253333-75.093333 167.253333-167.253333 3.413333 0 3.413333-290.133333 3.413334-290.133334zM187.733333 672.426667c-20.48-3.413333-37.546667-23.893333-37.546666-44.373334v-245.76c0-20.48 17.066667-40.96 37.546666-44.373333l228.693334-51.2 23.893333-95.573333H174.08C81.92 191.146667 6.826667 266.24 6.826667 358.4V648.533333c0 92.16 75.093333 167.253333 167.253333 167.253334h266.24l-23.893333-95.573334c0 3.413333-228.693333-47.786667-228.693334-47.786666z m215.04-211.626667h218.453334v88.746667h-218.453334v-88.746667z" fill="#ff6b01" p-id="9732"></path></svg> +<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5262" width="200" height="200"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z" fill="#FF6A00" p-id="5263"></path><path d="M324.8 602.624a26.752 26.752 0 0 1-21.312-25.92v-142.72a27.712 27.712 0 0 1 21.376-25.984l132.416-28.672 13.952-56.896H317.312a97.6 97.6 0 0 0-98.24 96.96v169.344c0.384 54.08 44.16 97.856 98.24 98.176h153.92l-13.888-56.512-132.544-27.776zM710.4 322.432c54.016 0.128 97.92 43.584 98.56 97.6v170.176a98.368 98.368 0 0 1-98.56 98.048H555.328l14.08-56.832 132.608-28.736a27.84 27.84 0 0 0 21.376-25.92v-142.72a26.88 26.88 0 0 0-21.376-25.984l-132.544-28.8-14.08-56.832zM570.368 497.92v13.952H457.28v-13.952h113.088z" fill="#FFFFFF" p-id="5264"></path></svg> diff --git a/ui/dist/imgs/providers/aws.svg b/ui/dist/imgs/providers/aws.svg new file mode 100644 index 00000000..9f211f19 --- /dev/null +++ b/ui/dist/imgs/providers/aws.svg @@ -0,0 +1 @@ +<svg class="icon" viewBox="0 0 1710 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4277" width="200" height="200"><path d="M486.118681 373.591209c0 20.817582 2.250549 37.696703 6.189011 50.074725 4.501099 12.378022 10.127473 25.881319 18.004396 40.50989 2.813187 4.501099 3.938462 9.002198 3.938461 12.94066 0 5.626374-3.375824 11.252747-10.690109 16.87912L468.114286 517.626374c-5.063736 3.375824-10.127473 5.063736-14.628572 5.063736-5.626374 0-11.252747-2.813187-16.879121-7.876923-7.876923-8.43956-14.628571-17.441758-20.254945-26.443956-5.626374-9.564835-11.252747-20.254945-17.441758-33.195605-43.885714 51.762637-99.024176 77.643956-165.415385 77.643956-47.261538 0-84.958242-13.503297-112.527472-40.50989-27.569231-27.006593-41.635165-63.015385-41.635165-108.026373 0-47.824176 16.879121-86.646154 51.2-115.903297 34.320879-29.257143 79.894505-43.885714 137.846154-43.885714 19.12967 0 38.821978 1.687912 59.63956 4.501099 20.817582 2.813187 42.197802 7.314286 64.703297 12.378022v-41.072528c0-42.76044-9.002198-72.58022-26.443956-90.021978-18.004396-17.441758-48.386813-25.881319-91.70989-25.881319-19.692308 0-39.947253 2.250549-60.764835 7.314286-20.817582 5.063736-41.072527 11.252747-60.764835 19.12967-9.002198 3.938462-15.753846 6.189011-19.692308 7.314286-3.938462 1.125275-6.751648 1.687912-9.002198 1.687912-7.876923 0-11.815385-5.626374-11.815384-17.441758v-27.569231c0-9.002198 1.125275-15.753846 3.938461-19.692307 2.813187-3.938462 7.876923-7.876923 15.753846-11.815385 19.692308-10.127473 43.323077-18.567033 70.892308-25.318681C230.681319 10.69011 259.938462 7.314286 290.883516 7.314286c66.953846 0 115.903297 15.191209 147.410989 45.573626 30.945055 30.382418 46.698901 76.518681 46.698902 138.408791v182.294506zM257.687912 459.112088c18.567033 0 37.696703-3.375824 57.951648-10.127473 20.254945-6.751648 38.259341-19.12967 53.45055-36.008791 9.002198-10.69011 15.753846-22.505495 19.12967-36.008791 3.375824-13.503297 5.626374-29.81978 5.626374-48.949451v-23.630769c-16.316484-3.938462-33.758242-7.314286-51.762638-9.564835-18.004396-2.250549-35.446154-3.375824-52.887912-3.375824-37.696703 0-65.265934 7.314286-83.832967 22.505494-18.567033 15.191209-27.569231 36.571429-27.56923 64.703297 0 26.443956 6.751648 46.136264 20.817582 59.63956 13.503297 14.065934 33.195604 20.817582 59.076923 20.817583z m451.797802 60.764835c-10.127473 0-16.879121-1.687912-21.380219-5.626374-4.501099-3.375824-8.43956-11.252747-11.815385-21.942857L544.07033 57.389011c-3.375824-11.252747-5.063736-18.567033-5.063737-22.505495 0-9.002198 4.501099-14.065934 13.503297-14.065934h55.138462c10.69011 0 18.004396 1.687912 21.942857 5.626374 4.501099 3.375824 7.876923 11.252747 11.252747 21.942857l94.523077 372.465934 87.771429-372.465934c2.813187-11.252747 6.189011-18.567033 10.690109-21.942857 4.501099-3.375824 12.378022-5.626374 22.505495-5.626374h45.010989c10.69011 0 18.004396 1.687912 22.505494 5.626374 4.501099 3.375824 8.43956 11.252747 10.69011 21.942857l88.896704 376.967033 97.336263-376.967033c3.375824-11.252747 7.314286-18.567033 11.252748-21.942857 4.501099-3.375824 11.815385-5.626374 21.942857-5.626374h52.325274c9.002198 0 14.065934 4.501099 14.065935 14.065934 0 2.813187-0.562637 5.626374-1.125275 9.002198-0.562637 3.375824-1.687912 7.876923-3.938462 14.065934l-135.595604 434.918682c-3.375824 11.252747-7.314286 18.567033-11.815385 21.942857-4.501099 3.375824-11.815385 5.626374-21.380219 5.626373h-48.386814c-10.69011 0-18.004396-1.687912-22.505494-5.626373-4.501099-3.938462-8.43956-11.252747-10.69011-22.505495L877.714286 129.406593l-86.646154 362.338462c-2.813187 11.252747-6.189011 18.567033-10.69011 22.505494-4.501099 3.938462-12.378022 5.626374-22.505495 5.626374h-48.386813z m722.989011 15.191209c-29.257143 0-58.514286-3.375824-86.646154-10.127473-28.131868-6.751648-50.074725-14.065934-64.703296-22.505494-9.002198-5.063736-15.191209-10.69011-17.441759-15.753846-2.250549-5.063736-3.375824-10.69011-3.375824-15.753846v-28.694506c0-11.815385 4.501099-17.441758 12.94066-17.441758 3.375824 0 6.751648 0.562637 10.127472 1.687912 3.375824 1.125275 8.43956 3.375824 14.065934 5.626374 19.12967 8.43956 39.947253 15.191209 61.89011 19.692307 22.505495 4.501099 44.448352 6.751648 66.953846 6.751649 35.446154 0 63.015385-6.189011 82.145055-18.567033 19.12967-12.378022 29.257143-30.382418 29.257143-53.45055 0-15.753846-5.063736-28.694505-15.191209-39.384615-10.127473-10.69011-29.257143-20.254945-56.826373-29.257143L1384.087912 292.571429c-41.072527-12.940659-71.454945-32.07033-90.021978-57.389011-18.567033-24.756044-28.131868-52.325275-28.131868-81.582418 0-23.630769 5.063736-44.448352 15.191209-62.452747 10.127473-18.004396 23.630769-33.758242 40.50989-46.136264 16.879121-12.940659 36.008791-22.505495 58.514286-29.257143 22.505495-6.751648 46.136264-9.564835 70.892307-9.564835 12.378022 0 25.318681 0.562637 37.696704 2.250549 12.940659 1.687912 24.756044 3.938462 36.571428 6.189011 11.252747 2.813187 21.942857 5.626374 32.07033 9.002198 10.127473 3.375824 18.004396 6.751648 23.630769 10.127473 7.876923 4.501099 13.503297 9.002198 16.879121 14.065934 3.375824 4.501099 5.063736 10.69011 5.063736 18.567033v26.443956c0 11.815385-4.501099 18.004396-12.940659 18.004395-4.501099 0-11.815385-2.250549-21.38022-6.751648-32.07033-14.628571-68.079121-21.942857-108.026374-21.942857-32.07033 0-57.389011 5.063736-74.830769 15.753846-17.441758 10.69011-26.443956 27.006593-26.443956 50.074725 0 15.753846 5.626374 29.257143 16.879121 39.947253 11.252747 10.69011 32.07033 21.38022 61.89011 30.945055l79.894505 25.318681c40.50989 12.940659 69.767033 30.945055 87.208792 54.013187 17.441758 23.068132 25.881319 49.512088 25.881318 78.769231 0 24.193407-5.063736 46.136264-14.628571 65.265934-10.127473 19.12967-23.630769 36.008791-41.072528 49.512088-17.441758 14.065934-38.259341 24.193407-62.452747 31.507692-25.318681 7.876923-51.762637 11.815385-80.457143 11.815385z" fill="#252F3E" p-id="4278"></path><path d="M1538.813187 808.50989c-185.107692 136.720879-454.048352 209.301099-685.292308 209.301099-324.079121 0-616.087912-119.841758-836.641758-319.015385-17.441758-15.753846-1.687912-37.134066 19.12967-24.756044 238.558242 138.408791 532.817582 222.241758 837.204396 222.241759 205.362637 0 430.98022-42.76044 638.593406-130.531868 30.945055-14.065934 57.389011 20.254945 27.006594 42.760439z" fill="#FF9900" p-id="4279"></path><path d="M1615.894505 720.738462c-23.630769-30.382418-156.413187-14.628571-216.615384-7.314286-18.004396 2.250549-20.817582-13.503297-4.501099-25.318681 105.775824-74.268132 279.630769-52.887912 299.885714-28.131869 20.254945 25.318681-5.626374 199.173626-104.650549 282.443956-15.191209 12.940659-29.81978 6.189011-23.068132-10.690109 22.505495-55.701099 72.58022-181.169231 48.94945-210.989011z" fill="#FF9900" p-id="4280"></path></svg> diff --git a/ui/dist/index.html b/ui/dist/index.html index ccb062ae..385a8134 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -1,14 +1,14 @@ -<!doctype html> -<html lang="en"> - <head> - <meta charset="UTF-8" /> - <link rel="icon" type="image/svg+xml" href="/vite.svg" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>Certimate - Your Trusted SSL Automation Partner</title> - <script type="module" crossorigin src="/assets/index-BTjl7ZFn.js"></script> +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <link rel="icon" type="image/svg+xml" href="/vite.svg" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Certimate - Your Trusted SSL Automation Partner</title> + <script type="module" crossorigin src="/assets/index-O2FfQ9M8.js"></script> <link rel="stylesheet" crossorigin href="/assets/index-YqBWA4KK.css"> - </head> - <body class="bg-background"> - <div id="root"></div> - </body> -</html> + </head> + <body class="bg-background"> + <div id="root"></div> + </body> +</html> diff --git a/ui/public/imgs/providers/aliyun.svg b/ui/public/imgs/providers/aliyun.svg index b4f740ee..7d0b70e0 100644 --- a/ui/public/imgs/providers/aliyun.svg +++ b/ui/public/imgs/providers/aliyun.svg @@ -1 +1 @@ -<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9731" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M1020.586667 361.813333c0-92.16-75.093333-167.253333-167.253334-167.253333h-266.24l23.893334 95.573333 228.693333 51.2c20.48 3.413333 37.546667 23.893333 37.546667 44.373334v245.76c0 20.48-17.066667 40.96-37.546667 44.373333l-228.693333 51.2-27.306667 92.16h266.24c92.16 0 167.253333-75.093333 167.253333-167.253333 3.413333 0 3.413333-290.133333 3.413334-290.133334zM187.733333 672.426667c-20.48-3.413333-37.546667-23.893333-37.546666-44.373334v-245.76c0-20.48 17.066667-40.96 37.546666-44.373333l228.693334-51.2 23.893333-95.573333H174.08C81.92 191.146667 6.826667 266.24 6.826667 358.4V648.533333c0 92.16 75.093333 167.253333 167.253333 167.253334h266.24l-23.893333-95.573334c0 3.413333-228.693333-47.786667-228.693334-47.786666z m215.04-211.626667h218.453334v88.746667h-218.453334v-88.746667z" fill="#ff6b01" p-id="9732"></path></svg> +<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5262" width="200" height="200"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z" fill="#FF6A00" p-id="5263"></path><path d="M324.8 602.624a26.752 26.752 0 0 1-21.312-25.92v-142.72a27.712 27.712 0 0 1 21.376-25.984l132.416-28.672 13.952-56.896H317.312a97.6 97.6 0 0 0-98.24 96.96v169.344c0.384 54.08 44.16 97.856 98.24 98.176h153.92l-13.888-56.512-132.544-27.776zM710.4 322.432c54.016 0.128 97.92 43.584 98.56 97.6v170.176a98.368 98.368 0 0 1-98.56 98.048H555.328l14.08-56.832 132.608-28.736a27.84 27.84 0 0 0 21.376-25.92v-142.72a26.88 26.88 0 0 0-21.376-25.984l-132.544-28.8-14.08-56.832zM570.368 497.92v13.952H457.28v-13.952h113.088z" fill="#FFFFFF" p-id="5264"></path></svg> diff --git a/ui/public/imgs/providers/aws.svg b/ui/public/imgs/providers/aws.svg new file mode 100644 index 00000000..9f211f19 --- /dev/null +++ b/ui/public/imgs/providers/aws.svg @@ -0,0 +1 @@ +<svg class="icon" viewBox="0 0 1710 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4277" width="200" height="200"><path d="M486.118681 373.591209c0 20.817582 2.250549 37.696703 6.189011 50.074725 4.501099 12.378022 10.127473 25.881319 18.004396 40.50989 2.813187 4.501099 3.938462 9.002198 3.938461 12.94066 0 5.626374-3.375824 11.252747-10.690109 16.87912L468.114286 517.626374c-5.063736 3.375824-10.127473 5.063736-14.628572 5.063736-5.626374 0-11.252747-2.813187-16.879121-7.876923-7.876923-8.43956-14.628571-17.441758-20.254945-26.443956-5.626374-9.564835-11.252747-20.254945-17.441758-33.195605-43.885714 51.762637-99.024176 77.643956-165.415385 77.643956-47.261538 0-84.958242-13.503297-112.527472-40.50989-27.569231-27.006593-41.635165-63.015385-41.635165-108.026373 0-47.824176 16.879121-86.646154 51.2-115.903297 34.320879-29.257143 79.894505-43.885714 137.846154-43.885714 19.12967 0 38.821978 1.687912 59.63956 4.501099 20.817582 2.813187 42.197802 7.314286 64.703297 12.378022v-41.072528c0-42.76044-9.002198-72.58022-26.443956-90.021978-18.004396-17.441758-48.386813-25.881319-91.70989-25.881319-19.692308 0-39.947253 2.250549-60.764835 7.314286-20.817582 5.063736-41.072527 11.252747-60.764835 19.12967-9.002198 3.938462-15.753846 6.189011-19.692308 7.314286-3.938462 1.125275-6.751648 1.687912-9.002198 1.687912-7.876923 0-11.815385-5.626374-11.815384-17.441758v-27.569231c0-9.002198 1.125275-15.753846 3.938461-19.692307 2.813187-3.938462 7.876923-7.876923 15.753846-11.815385 19.692308-10.127473 43.323077-18.567033 70.892308-25.318681C230.681319 10.69011 259.938462 7.314286 290.883516 7.314286c66.953846 0 115.903297 15.191209 147.410989 45.573626 30.945055 30.382418 46.698901 76.518681 46.698902 138.408791v182.294506zM257.687912 459.112088c18.567033 0 37.696703-3.375824 57.951648-10.127473 20.254945-6.751648 38.259341-19.12967 53.45055-36.008791 9.002198-10.69011 15.753846-22.505495 19.12967-36.008791 3.375824-13.503297 5.626374-29.81978 5.626374-48.949451v-23.630769c-16.316484-3.938462-33.758242-7.314286-51.762638-9.564835-18.004396-2.250549-35.446154-3.375824-52.887912-3.375824-37.696703 0-65.265934 7.314286-83.832967 22.505494-18.567033 15.191209-27.569231 36.571429-27.56923 64.703297 0 26.443956 6.751648 46.136264 20.817582 59.63956 13.503297 14.065934 33.195604 20.817582 59.076923 20.817583z m451.797802 60.764835c-10.127473 0-16.879121-1.687912-21.380219-5.626374-4.501099-3.375824-8.43956-11.252747-11.815385-21.942857L544.07033 57.389011c-3.375824-11.252747-5.063736-18.567033-5.063737-22.505495 0-9.002198 4.501099-14.065934 13.503297-14.065934h55.138462c10.69011 0 18.004396 1.687912 21.942857 5.626374 4.501099 3.375824 7.876923 11.252747 11.252747 21.942857l94.523077 372.465934 87.771429-372.465934c2.813187-11.252747 6.189011-18.567033 10.690109-21.942857 4.501099-3.375824 12.378022-5.626374 22.505495-5.626374h45.010989c10.69011 0 18.004396 1.687912 22.505494 5.626374 4.501099 3.375824 8.43956 11.252747 10.69011 21.942857l88.896704 376.967033 97.336263-376.967033c3.375824-11.252747 7.314286-18.567033 11.252748-21.942857 4.501099-3.375824 11.815385-5.626374 21.942857-5.626374h52.325274c9.002198 0 14.065934 4.501099 14.065935 14.065934 0 2.813187-0.562637 5.626374-1.125275 9.002198-0.562637 3.375824-1.687912 7.876923-3.938462 14.065934l-135.595604 434.918682c-3.375824 11.252747-7.314286 18.567033-11.815385 21.942857-4.501099 3.375824-11.815385 5.626374-21.380219 5.626373h-48.386814c-10.69011 0-18.004396-1.687912-22.505494-5.626373-4.501099-3.938462-8.43956-11.252747-10.69011-22.505495L877.714286 129.406593l-86.646154 362.338462c-2.813187 11.252747-6.189011 18.567033-10.69011 22.505494-4.501099 3.938462-12.378022 5.626374-22.505495 5.626374h-48.386813z m722.989011 15.191209c-29.257143 0-58.514286-3.375824-86.646154-10.127473-28.131868-6.751648-50.074725-14.065934-64.703296-22.505494-9.002198-5.063736-15.191209-10.69011-17.441759-15.753846-2.250549-5.063736-3.375824-10.69011-3.375824-15.753846v-28.694506c0-11.815385 4.501099-17.441758 12.94066-17.441758 3.375824 0 6.751648 0.562637 10.127472 1.687912 3.375824 1.125275 8.43956 3.375824 14.065934 5.626374 19.12967 8.43956 39.947253 15.191209 61.89011 19.692307 22.505495 4.501099 44.448352 6.751648 66.953846 6.751649 35.446154 0 63.015385-6.189011 82.145055-18.567033 19.12967-12.378022 29.257143-30.382418 29.257143-53.45055 0-15.753846-5.063736-28.694505-15.191209-39.384615-10.127473-10.69011-29.257143-20.254945-56.826373-29.257143L1384.087912 292.571429c-41.072527-12.940659-71.454945-32.07033-90.021978-57.389011-18.567033-24.756044-28.131868-52.325275-28.131868-81.582418 0-23.630769 5.063736-44.448352 15.191209-62.452747 10.127473-18.004396 23.630769-33.758242 40.50989-46.136264 16.879121-12.940659 36.008791-22.505495 58.514286-29.257143 22.505495-6.751648 46.136264-9.564835 70.892307-9.564835 12.378022 0 25.318681 0.562637 37.696704 2.250549 12.940659 1.687912 24.756044 3.938462 36.571428 6.189011 11.252747 2.813187 21.942857 5.626374 32.07033 9.002198 10.127473 3.375824 18.004396 6.751648 23.630769 10.127473 7.876923 4.501099 13.503297 9.002198 16.879121 14.065934 3.375824 4.501099 5.063736 10.69011 5.063736 18.567033v26.443956c0 11.815385-4.501099 18.004396-12.940659 18.004395-4.501099 0-11.815385-2.250549-21.38022-6.751648-32.07033-14.628571-68.079121-21.942857-108.026374-21.942857-32.07033 0-57.389011 5.063736-74.830769 15.753846-17.441758 10.69011-26.443956 27.006593-26.443956 50.074725 0 15.753846 5.626374 29.257143 16.879121 39.947253 11.252747 10.69011 32.07033 21.38022 61.89011 30.945055l79.894505 25.318681c40.50989 12.940659 69.767033 30.945055 87.208792 54.013187 17.441758 23.068132 25.881319 49.512088 25.881318 78.769231 0 24.193407-5.063736 46.136264-14.628571 65.265934-10.127473 19.12967-23.630769 36.008791-41.072528 49.512088-17.441758 14.065934-38.259341 24.193407-62.452747 31.507692-25.318681 7.876923-51.762637 11.815385-80.457143 11.815385z" fill="#252F3E" p-id="4278"></path><path d="M1538.813187 808.50989c-185.107692 136.720879-454.048352 209.301099-685.292308 209.301099-324.079121 0-616.087912-119.841758-836.641758-319.015385-17.441758-15.753846-1.687912-37.134066 19.12967-24.756044 238.558242 138.408791 532.817582 222.241758 837.204396 222.241759 205.362637 0 430.98022-42.76044 638.593406-130.531868 30.945055-14.065934 57.389011 20.254945 27.006594 42.760439z" fill="#FF9900" p-id="4279"></path><path d="M1615.894505 720.738462c-23.630769-30.382418-156.413187-14.628571-216.615384-7.314286-18.004396 2.250549-20.817582-13.503297-4.501099-25.318681 105.775824-74.268132 279.630769-52.887912 299.885714-28.131869 20.254945 25.318681-5.626374 199.173626-104.650549 282.443956-15.191209 12.940659-29.81978 6.189011-23.068132-10.690109 22.505495-55.701099 72.58022-181.169231 48.94945-210.989011z" fill="#FF9900" p-id="4280"></path></svg> diff --git a/ui/src/components/certimate/AccessAwsForm.tsx b/ui/src/components/certimate/AccessAwsForm.tsx new file mode 100644 index 00000000..a688dd8e --- /dev/null +++ b/ui/src/components/certimate/AccessAwsForm.tsx @@ -0,0 +1,240 @@ +import { useForm } from "react-hook-form"; +import { useTranslation } from "react-i18next"; +import z from "zod"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { ClientResponseError } from "pocketbase"; + +import { Input } from "@/components/ui/input"; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; +import { Button } from "@/components/ui/button"; +import { PbErrorData } from "@/domain/base"; +import { Access, accessFormType, AwsConfig, getUsageByConfigType } from "@/domain/access"; +import { save } from "@/repository/access"; +import { useConfig } from "@/providers/config"; + +type AccessAwsFormProps = { + op: "add" | "edit" | "copy"; + data?: Access; + onAfterReq: () => void; +}; + +const AccessAwsForm = ({ data, op, onAfterReq }: AccessAwsFormProps) => { + const { addAccess, updateAccess } = useConfig(); + const { t } = useTranslation(); + const formSchema = z.object({ + id: z.string().optional(), + name: z + .string() + .min(1, "access.authorization.form.name.placeholder") + .max(64, t("common.errmsg.string_max", { max: 64 })), + configType: accessFormType, + region: z + .string() + .min(1, "access.authorization.form.region.placeholder") + .max(64, t("common.errmsg.string_max", { max: 64 })), + accessKeyId: z + .string() + .min(1, "access.authorization.form.access_key_id.placeholder") + .max(64, t("common.errmsg.string_max", { max: 64 })), + secretAccessKey: z + .string() + .min(1, "access.authorization.form.secret_access_key.placeholder") + .max(64, t("common.errmsg.string_max", { max: 64 })), + hostedZoneId: z + .string() + .min(0, "access.authorization.form.aws_hosted_zone_id.placeholder") + .max(64, t("common.errmsg.string_max", { max: 64 })), + }); + + let config: AwsConfig = { + region: "cn-north-1", + accessKeyId: "", + secretAccessKey: "", + hostedZoneId: "", + }; + if (data) config = data.config as AwsConfig; + + const form = useForm<z.infer<typeof formSchema>>({ + resolver: zodResolver(formSchema), + defaultValues: { + id: data?.id, + name: data?.name || "", + configType: "aws", + region: config.region, + accessKeyId: config.accessKeyId, + secretAccessKey: config.secretAccessKey, + hostedZoneId: config.hostedZoneId, + }, + }); + + const onSubmit = async (data: z.infer<typeof formSchema>) => { + const req: Access = { + id: data.id as string, + name: data.name, + configType: data.configType, + usage: getUsageByConfigType(data.configType), + config: { + region: data.region, + accessKeyId: data.accessKeyId, + secretAccessKey: data.secretAccessKey, + hostedZoneId: data.hostedZoneId, + }, + }; + + try { + req.id = op == "copy" ? "" : req.id; + const rs = await save(req); + + onAfterReq(); + + req.id = rs.id; + req.created = rs.created; + req.updated = rs.updated; + if (data.id && op == "edit") { + updateAccess(req); + return; + } + addAccess(req); + } catch (e) { + const err = e as ClientResponseError; + + Object.entries(err.response.data as PbErrorData).forEach(([key, value]) => { + form.setError(key as keyof z.infer<typeof formSchema>, { + type: "manual", + message: value.message, + }); + }); + + return; + } + }; + + return ( + <> + <div className="max-w-[35em] mx-auto mt-10"> + <Form {...form}> + <form + onSubmit={(e) => { + e.stopPropagation(); + form.handleSubmit(onSubmit)(e); + }} + className="space-y-8" + > + <FormField + control={form.control} + name="name" + render={({ field }) => ( + <FormItem> + <FormLabel>{t("access.authorization.form.name.label")}</FormLabel> + <FormControl> + <Input placeholder={t("access.authorization.form.name.placeholder")} {...field} /> + </FormControl> + + <FormMessage /> + </FormItem> + )} + /> + + <FormField + control={form.control} + name="id" + render={({ field }) => ( + <FormItem className="hidden"> + <FormLabel>{t("access.authorization.form.config.label")}</FormLabel> + <FormControl> + <Input {...field} /> + </FormControl> + + <FormMessage /> + </FormItem> + )} + /> + + <FormField + control={form.control} + name="configType" + render={({ field }) => ( + <FormItem className="hidden"> + <FormLabel>{t("access.authorization.form.config.label")}</FormLabel> + <FormControl> + <Input {...field} /> + </FormControl> + + <FormMessage /> + </FormItem> + )} + /> + + <FormField + control={form.control} + name="region" + render={({ field }) => ( + <FormItem> + <FormLabel>{t("access.authorization.form.region.label")}</FormLabel> + <FormControl> + <Input placeholder={t("access.authorization.form.region.placeholder")} {...field} /> + </FormControl> + + <FormMessage /> + </FormItem> + )} + /> + + <FormField + control={form.control} + name="accessKeyId" + render={({ field }) => ( + <FormItem> + <FormLabel>{t("access.authorization.form.access_key_id.label")}</FormLabel> + <FormControl> + <Input placeholder={t("access.authorization.form.access_key_id.placeholder")} {...field} /> + </FormControl> + + <FormMessage /> + </FormItem> + )} + /> + + <FormField + control={form.control} + name="secretAccessKey" + render={({ field }) => ( + <FormItem> + <FormLabel>{t("access.authorization.form.secret_access_key.label")}</FormLabel> + <FormControl> + <Input placeholder={t("access.authorization.form.secret_access_key.placeholder")} {...field} /> + </FormControl> + + <FormMessage /> + </FormItem> + )} + /> + + <FormField + control={form.control} + name="hostedZoneId" + render={({ field }) => ( + <FormItem> + <FormLabel>{t("access.authorization.form.aws_hosted_zone_id.label")}</FormLabel> + <FormControl> + <Input placeholder={t("access.authorization.form.aws_hosted_zone_id.placeholder")} {...field} /> + </FormControl> + + <FormMessage /> + </FormItem> + )} + /> + + <FormMessage /> + + <div className="flex justify-end"> + <Button type="submit">{t("common.save")}</Button> + </div> + </form> + </Form> + </div> + </> + ); +}; + +export default AccessAwsForm; diff --git a/ui/src/components/certimate/AccessEdit.tsx b/ui/src/components/certimate/AccessEdit.tsx index 387d55e7..42017606 100644 --- a/ui/src/components/certimate/AccessEdit.tsx +++ b/ui/src/components/certimate/AccessEdit.tsx @@ -10,6 +10,7 @@ import AccessAliyunForm from "./AccessAliyunForm"; import AccessTencentForm from "./AccessTencentForm"; import AccessHuaweicloudForm from "./AccessHuaweicloudForm"; import AccessQiniuForm from "./AccessQiniuForm"; +import AccessAwsForm from "./AccessAwsForm"; import AccessCloudflareForm from "./AccessCloudflareForm"; import AccessNamesiloForm from "./AccessNamesiloForm"; import AccessGodaddyForm from "./AccessGodaddyForm"; @@ -79,6 +80,17 @@ const AccessEdit = ({ trigger, op, data, className }: AccessEditProps) => { /> ); break; + case "aws": + form = ( + <AccessAwsForm + data={data} + op={op} + onAfterReq={() => { + setOpen(false); + }} + /> + ); + break; case "cloudflare": form = ( <AccessCloudflareForm diff --git a/ui/src/components/certimate/AccessHuaweicloudForm.tsx b/ui/src/components/certimate/AccessHuaweicloudForm.tsx index a4de750a..2295beb8 100644 --- a/ui/src/components/certimate/AccessHuaweicloudForm.tsx +++ b/ui/src/components/certimate/AccessHuaweicloudForm.tsx @@ -38,7 +38,7 @@ const AccessHuaweicloudForm = ({ data, op, onAfterReq }: AccessHuaweicloudFormPr .max(64, t("common.errmsg.string_max", { max: 64 })), secretAccessKey: z .string() - .min(1, "access.authorization.form.access_key_secret.placeholder") + .min(1, "access.authorization.form.secret_access_key.placeholder") .max(64, t("common.errmsg.string_max", { max: 64 })), }); @@ -193,9 +193,9 @@ const AccessHuaweicloudForm = ({ data, op, onAfterReq }: AccessHuaweicloudFormPr name="secretAccessKey" render={({ field }) => ( <FormItem> - <FormLabel>{t("access.authorization.form.access_key_secret.label")}</FormLabel> + <FormLabel>{t("access.authorization.form.secret_access_key.label")}</FormLabel> <FormControl> - <Input placeholder={t("access.authorization.form.access_key_secret.placeholder")} {...field} /> + <Input placeholder={t("access.authorization.form.secret_access_key.placeholder")} {...field} /> </FormControl> <FormMessage /> diff --git a/ui/src/domain/access.ts b/ui/src/domain/access.ts index 3626151a..99fbe9f4 100644 --- a/ui/src/domain/access.ts +++ b/ui/src/domain/access.ts @@ -5,6 +5,7 @@ export const accessTypeMap: Map<string, [string, string]> = new Map([ ["tencent", ["common.provider.tencent", "/imgs/providers/tencent.svg"]], ["huaweicloud", ["common.provider.huaweicloud", "/imgs/providers/huaweicloud.svg"]], ["qiniu", ["common.provider.qiniu", "/imgs/providers/qiniu.svg"]], + ["aws", ["common.provider.aws", "/imgs/providers/aws.svg"]], ["cloudflare", ["common.provider.cloudflare", "/imgs/providers/cloudflare.svg"]], ["namesilo", ["common.provider.namesilo", "/imgs/providers/namesilo.svg"]], ["godaddy", ["common.provider.godaddy", "/imgs/providers/godaddy.svg"]], @@ -23,6 +24,7 @@ export const accessFormType = z.union( z.literal("tencent"), z.literal("huaweicloud"), z.literal("qiniu"), + z.literal("aws"), z.literal("cloudflare"), z.literal("namesilo"), z.literal("godaddy"), @@ -46,6 +48,7 @@ export type Access = { | TencentConfig | HuaweicloudConfig | QiniuConfig + | AwsConfig | CloudflareConfig | NamesiloConfig | GodaddyConfig @@ -78,6 +81,13 @@ export type QiniuConfig = { secretKey: string; }; +export type AwsConfig = { + region: string; + accessKeyId: string; + secretAccessKey: string; + hostedZoneId?: string; +}; + export type CloudflareConfig = { dnsApiToken: string; }; diff --git a/ui/src/i18n/locales/en/nls.access.json b/ui/src/i18n/locales/en/nls.access.json index e0c4858d..ee96c626 100644 --- a/ui/src/i18n/locales/en/nls.access.json +++ b/ui/src/i18n/locales/en/nls.access.json @@ -28,6 +28,10 @@ "access.authorization.form.secret_id.placeholder": "Please enter SecretId", "access.authorization.form.secret_key.label": "SecretKey", "access.authorization.form.secret_key.placeholder": "Please enter SecretKey", + "access.authorization.form.secret_access_key.label": "SecretAccessKey", + "access.authorization.form.secret_access_key.placeholder": "Please enter SecretAccessKey", + "access.authorization.form.aws_hosted_zone_id.label": "AWS Hosted Zone ID", + "access.authorization.form.aws_hosted_zone_id.placeholder": "Please enter AWS Hosted Zone ID", "access.authorization.form.cloud_dns_api_token.label": "CLOUD_DNS_API_TOKEN", "access.authorization.form.cloud_dns_api_token.placeholder": "Please enter CLOUD_DNS_API_TOKEN", "access.authorization.form.godaddy_api_key.label": "GO_DADDY_API_KEY", diff --git a/ui/src/i18n/locales/en/nls.common.json b/ui/src/i18n/locales/en/nls.common.json index bbab0011..94d29247 100644 --- a/ui/src/i18n/locales/en/nls.common.json +++ b/ui/src/i18n/locales/en/nls.common.json @@ -61,6 +61,7 @@ "common.provider.huaweicloud": "Huawei Cloud", "common.provider.qiniu": "Qiniu", "common.provider.qiniu.cdn": "Qiniu - CDN", + "common.provider.aws": "AWS", "common.provider.cloudflare": "Cloudflare", "common.provider.namesilo": "Namesilo", "common.provider.godaddy": "GoDaddy", diff --git a/ui/src/i18n/locales/zh/nls.access.json b/ui/src/i18n/locales/zh/nls.access.json index 0dfbab15..9531385d 100644 --- a/ui/src/i18n/locales/zh/nls.access.json +++ b/ui/src/i18n/locales/zh/nls.access.json @@ -28,6 +28,10 @@ "access.authorization.form.secret_id.placeholder": "请输入 SecretId", "access.authorization.form.secret_key.label": "SecretKey", "access.authorization.form.secret_key.placeholder": "请输入 SecretKey", + "access.authorization.form.secret_access_key.label": "SecretAccessKey", + "access.authorization.form.secret_access_key.placeholder": "请输入 SecretAccessKey", + "access.authorization.form.aws_hosted_zone_id.label": "AWS 托管区域 ID", + "access.authorization.form.aws_hosted_zone_id.placeholder": "请输入 AWS Hosted Zone ID", "access.authorization.form.cloud_dns_api_token.label": "CLOUD_DNS_API_TOKEN", "access.authorization.form.cloud_dns_api_token.placeholder": "请输入 CLOUD_DNS_API_TOKEN", "access.authorization.form.godaddy_api_key.label": "GO_DADDY_API_KEY", diff --git a/ui/src/i18n/locales/zh/nls.common.json b/ui/src/i18n/locales/zh/nls.common.json index a2d52844..03007a53 100644 --- a/ui/src/i18n/locales/zh/nls.common.json +++ b/ui/src/i18n/locales/zh/nls.common.json @@ -61,6 +61,7 @@ "common.provider.huaweicloud": "华为云", "common.provider.qiniu": "七牛云", "common.provider.qiniu.cdn": "七牛云 - CDN", + "common.provider.aws": "AWS", "common.provider.cloudflare": "Cloudflare", "common.provider.namesilo": "Namesilo", "common.provider.godaddy": "GoDaddy",