gitroll 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web/app.js CHANGED
@@ -1,118 +1,395 @@
1
- /*! GitRoll 0.1.2 · MIT License · Includes third-party software; see THIRD_PARTY_NOTICES.txt */
2
- var xe=class extends Error{};var ce=t=>String(Math.abs(t)).padStart(2,"0");function yt(t=new Date){let e=-t.getTimezoneOffset(),n=e>=0?"+":"-";return`${t.getFullYear()}-${ce(t.getMonth()+1)}-${ce(t.getDate())}T${ce(t.getHours())}:${ce(t.getMinutes())}:${ce(t.getSeconds())}${n}${ce(Math.floor(Math.abs(e)/60))}:${ce(Math.abs(e)%60)}`}function Yt(t){return t.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64).replace(/-+$/,"")}var Hn={$:"USD","€":"EUR","£":"GBP","¥":"JPY"};function Vt(t){let e=/^\s*([$€£¥])?\s*(-?[\d,]*\.?\d+)\s*([a-z]{3})?\s*$/i.exec(t);if(!e)return null;let n=Number(e[2].replace(/,/g,""));return Number.isFinite(n)?{value:n,currency:(e[3]??(e[1]?Hn[e[1]]:"USD")).toUpperCase()}:null}function Jt(t){let e="";for(let n=0;n<t.length;n+=32768)e+=String.fromCharCode(...t.subarray(n,n+32768));return btoa(e)}var Z=class extends Error{},ee=class extends Error{};async function fe(t,e,n){let s;try{s=await fetch(`api/${e}`,{method:t,headers:{"Content-Type":"application/json"},body:n===void 0?void 0:JSON.stringify(n),cache:"no-store"})}catch{throw new Z("GitRoll has stopped. Start it again from your terminal with: gitroll")}let i=await s.json().catch(()=>null);if(s.status===401)throw new ee(i?.error??"Open GitRoll from the link shown in your terminal.");if(!s.ok||i===null)throw new xe(i?.error??`Something went wrong (${s.status}).`);return i}var Ue=class t{#e;#t="";static async connect(){let e=new t;try{return await e.refresh(),{store:e}}catch(n){return{error:n instanceof ee?"signed-out":"stopped"}}}info=()=>this.#e.info;version=()=>this.#t;entries=()=>this.#e.entries;projects=()=>this.#e.projects;types=()=>this.#e.types;async refresh(){let e;try{e=await fetch("api/state",{cache:"no-store"})}catch{throw new Z("GitRoll has stopped.")}if(e.status===401)throw new ee("Open GitRoll from the link shown in your terminal.");if(!e.ok||!(e.headers.get("content-type")??"").includes("application/json"))throw new Z("GitRoll has stopped.");let n=await e.text();n!==this.#t&&(this.#e=JSON.parse(n),this.#t=n)}async#n(e){let n=this.#e.info.maxAttachmentBytes,s=e.find(i=>i.size>n);if(s)throw new xe(`${s.name} is too large. Files can be up to ${Math.round(n/1048576)} MB.`);return Promise.all(e.map(async i=>({name:i.name,type:i.type,data:Jt(new Uint8Array(await i.arrayBuffer()))})))}async addEntry(e,n){let s=await fe("POST","entries",{...e,files:await this.#n(n)});return await this.refresh(),s}async updateEntry(e,n,s){let i=await fe("PATCH",`entries/${encodeURIComponent(e)}`,{...n,files:await this.#n(s)});return await this.refresh(),i}async deleteEntry(e){await fe("DELETE",`entries/${encodeURIComponent(e)}`),await this.refresh()}async createProject(e){let{project:n}=await fe("POST","projects",{name:e});return await this.refresh(),n}async history(e){return(await fe("GET",`entries/${encodeURIComponent(e)}/history`)).history}attachmentUrl(e){return`attachments/${encodeURIComponent(e.hash)}`}async sync(){let e=await fe("POST","sync",{});return await this.refresh(),e}ask(e){return fe("POST","ask",{question:e})}};var qe=Symbol.for("yaml.alias"),Gt=Symbol.for("yaml.document"),H=Symbol.for("yaml.map"),bt=Symbol.for("yaml.pair"),ke=Symbol.for("yaml.scalar"),te=Symbol.for("yaml.seq"),_=Symbol.for("yaml.node.type"),K=t=>!!t&&typeof t=="object"&&t[_]===qe,Y=t=>!!t&&typeof t=="object"&&t[_]===Gt,W=t=>!!t&&typeof t=="object"&&t[_]===H,k=t=>!!t&&typeof t=="object"&&t[_]===bt,S=t=>!!t&&typeof t=="object"&&t[_]===ke,V=t=>!!t&&typeof t=="object"&&t[_]===te;function L(t){if(t&&typeof t=="object")switch(t[_]){case H:case te:return!0}return!1}function v(t){if(t&&typeof t=="object")switch(t[_]){case qe:case H:case ke:case te:return!0}return!1}var He=t=>(S(t)||L(t))&&!!t.anchor;var D=Symbol("break visit"),Wt=Symbol("skip children"),J=Symbol("remove node");function z(t,e){let n=zt(e);Y(t)?ve(null,t.contents,n,Object.freeze([t]))===J&&(t.contents=null):ve(null,t,n,Object.freeze([]))}z.BREAK=D;z.SKIP=Wt;z.REMOVE=J;function ve(t,e,n,s){let i=Qt(t,e,n,s);if(v(i)||k(i))return Xt(t,s,i),ve(t,i,n,s);if(typeof i!="symbol"){if(L(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){let o=ve(r,e.items[r],n,s);if(typeof o=="number")r=o-1;else{if(o===D)return D;o===J&&(e.items.splice(r,1),r-=1)}}}else if(k(e)){s=Object.freeze(s.concat(e));let r=ve("key",e.key,n,s);if(r===D)return D;r===J&&(e.key=null);let o=ve("value",e.value,n,s);if(o===D)return D;o===J&&(e.value=null)}}return i}async function Ye(t,e){let n=zt(e);Y(t)?await Te(null,t.contents,n,Object.freeze([t]))===J&&(t.contents=null):await Te(null,t,n,Object.freeze([]))}Ye.BREAK=D;Ye.SKIP=Wt;Ye.REMOVE=J;async function Te(t,e,n,s){let i=await Qt(t,e,n,s);if(v(i)||k(i))return Xt(t,s,i),Te(t,i,n,s);if(typeof i!="symbol"){if(L(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){let o=await Te(r,e.items[r],n,s);if(typeof o=="number")r=o-1;else{if(o===D)return D;o===J&&(e.items.splice(r,1),r-=1)}}}else if(k(e)){s=Object.freeze(s.concat(e));let r=await Te("key",e.key,n,s);if(r===D)return D;r===J&&(e.key=null);let o=await Te("value",e.value,n,s);if(o===D)return D;o===J&&(e.value=null)}}return i}function zt(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Qt(t,e,n,s){if(typeof n=="function")return n(t,e,s);if(W(e))return n.Map?.(t,e,s);if(V(e))return n.Seq?.(t,e,s);if(k(e))return n.Pair?.(t,e,s);if(S(e))return n.Scalar?.(t,e,s);if(K(e))return n.Alias?.(t,e,s)}function Xt(t,e,n){let s=e[e.length-1];if(L(s))s.items[t]=n;else if(k(s))t==="key"?s.key=n:s.value=n;else if(Y(s))s.contents=n;else{let i=K(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}var Yn={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Vn=t=>t.replace(/[!,[\]{}]/g,e=>Yn[e]),$e=class t{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let s=e.trim().split(/[ \t]+/),i=s.shift();switch(i){case"%TAG":{if(s.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[r,o]=s;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[r]=s;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return n(6,`Unsupported YAML version ${r}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}let[,s,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);let r=this.tags[s];if(r)try{return r+decodeURIComponent(i)}catch(o){return n(String(o)),null}return s==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,s]of Object.entries(this.tags))if(e.startsWith(s))return n+Vn(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),i;if(e&&s.length>0&&v(e.contents)){let r={};z(e.contents,(o,c)=>{v(c)&&c.tag&&(r[c.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of s)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(c=>c.startsWith(o)))&&n.push(`%TAG ${r} ${o}`);return n.join(`
3
- `)}};$e.defaultYaml={explicit:!1,version:"1.2"};$e.defaultTags={"!!":"tag:yaml.org,2002:"};function Ve(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function ue(t,e,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let i=0,r=s.length;i<r;++i){let o=s[i],c=ue(t,s,String(i),o);c===void 0?delete s[i]:c!==o&&(s[i]=c)}else if(s instanceof Map)for(let i of Array.from(s.keys())){let r=s.get(i),o=ue(t,s,i,r);o===void 0?s.delete(i):o!==r&&s.set(i,o)}else if(s instanceof Set)for(let i of Array.from(s)){let r=ue(t,s,i,i);r===void 0?s.delete(i):r!==i&&(s.delete(i),s.add(r))}else for(let[i,r]of Object.entries(s)){let o=ue(t,s,i,r);o===void 0?delete s[i]:o!==r&&(s[i]=o)}return t.call(e,n,s)}function C(t,e,n){if(Array.isArray(t))return t.map((s,i)=>C(s,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!He(t))return t.toJSON(e,n);let s={aliasCount:0,count:1,res:void 0};n.anchors.set(t,s),n.onCreate=r=>{s.res=r,delete n.onCreate};let i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}var ne=class{constructor(e){Object.defineProperty(this,_,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:r}={}){if(!Y(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},c=C(this,"",o);if(typeof i=="function")for(let{count:a,res:l}of o.anchors.values())i(l,a);return typeof r=="function"?ue(r,{"":c},"",c):c}};var pe=class extends ne{constructor(e){super(qe),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let s;n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],z(e,{Node:(r,o)=>{(K(o)||He(o))&&s.push(o)}}),n&&(n.aliasResolveCache=s));let i;for(let r of s){if(r===this)break;r.anchor===this.source&&(i=r)}if(i&&n){let{anchors:r,doc:o,maxAliasCount:c}=n,a=r.get(i);if(a||(C(i,null,n),a=r.get(i)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(c>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Je(o,i,r)),a.count*a.aliasCount>c)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return i}toJSON(e,n){if(!n)return{source:this.source};let s=this.resolve(n.doc,n);if(!s){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(i)}return n.anchors.get(s).res}toString(e,n,s){let i=`*${this.source}`;if(e){if(Ve(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function Je(t,e,n){if(K(e)){let s=e.resolve(t),i=n&&s&&n.get(s);return i?i.count*i.aliasCount:0}else if(L(e)){let s=0;for(let i of e.items){let r=Je(t,i,n);r>s&&(s=r)}return s}else if(k(e)){let s=Je(t,e.key,n),i=Je(t,e.value,n);return Math.max(s,i)}return 1}var Ge=t=>!t||typeof t!="function"&&typeof t!="object",w=class extends ne{constructor(e){super(ke),this.value=e}toJSON(e,n){return n?.keep?this.value:C(this.value,e,n)}toString(){return String(this.value)}};w.BLOCK_FOLDED="BLOCK_FOLDED";w.BLOCK_LITERAL="BLOCK_LITERAL";w.PLAIN="PLAIN";w.QUOTE_DOUBLE="QUOTE_DOUBLE";w.QUOTE_SINGLE="QUOTE_SINGLE";var Jn="tag:yaml.org,2002:";function Gn(t,e,n){if(e){let s=n.filter(r=>r.tag===e),i=s.find(r=>!r.format)??s[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(s=>s.identify?.(t)&&!s.format)}function se(t,e,n){if(Y(t)&&(t=t.contents),v(t))return t;if(k(t)){let f=n.schema[H].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:s,onAnchor:i,onTagObj:r,schema:o,sourceObjects:c}=n,a;if(s&&t&&typeof t=="object"){if(a=c.get(t),a)return a.anchor??(a.anchor=i(t)),new pe(a.anchor);a={anchor:null,node:null},c.set(t,a)}e?.startsWith("!!")&&(e=Jn+e.slice(2));let l=Gn(t,e,o.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new w(t);return a&&(a.node=f),f}l=t instanceof Map?o[H]:Symbol.iterator in Object(t)?o[te]:o[H]}r&&(r(l),delete n.onTagObj);let m=l?.createNode?l.createNode(n.schema,t,n):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(n.schema,t,n):new w(t);return e?m.tag=e:l.default||(m.tag=l.tag),a&&(a.node=m),m}function wt(t,e,n){let s=n;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=s,s=o}else s=new Map([[r,s]])}return se(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var Zt=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,Ee=class extends ne{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(s=>v(s)||k(s)?s.clone(e):s),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Zt(e))this.add(n);else{let[s,...i]=e,r=this.get(s,!0);if(L(r))r.addIn(i,n);else if(r===void 0&&this.schema)this.set(s,wt(this.schema,i,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}deleteIn(e){let[n,...s]=e;if(s.length===0)return this.delete(n);let i=this.get(n,!0);if(L(i))return i.deleteIn(s);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}getIn(e,n){let[s,...i]=e,r=this.get(s,!0);return i.length===0?!n&&S(r)?r.value:r:L(r)?r.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!k(n))return!1;let s=n.value;return s==null||e&&S(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[n,...s]=e;if(s.length===0)return this.has(n);let i=this.get(n,!0);return L(i)?i.hasIn(s):!1}setIn(e,n){let[s,...i]=e;if(i.length===0)this.set(s,n);else{let r=this.get(s,!0);if(L(r))r.setIn(i,n);else if(r===void 0&&this.schema)this.set(s,wt(this.schema,i,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}};var en=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function ie(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Q=(t,e,n)=>t.endsWith(`
4
- `)?ie(n,e):n.includes(`
1
+ /*! GitRoll 0.3.0 · MIT License · Includes third-party software; see THIRD_PARTY_NOTICES.txt */
2
+ var gO=Object.create;var tS=Object.defineProperty;var yO=Object.getOwnPropertyDescriptor;var xO=Object.getOwnPropertyNames;var bO=Object.getPrototypeOf,vO=Object.prototype.hasOwnProperty;var Wo=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(a){throw t=0,a}};var SO=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of xO(t))!vO.call(e,n)&&n!==a&&tS(e,n,{get:()=>t[n],enumerable:!(o=yO(t,n))||o.enumerable});return e};var k=(e,t,a)=>(a=e!=null?gO(bO(e)):{},SO(t||!e||!e.__esModule?tS(a,"default",{value:e,enumerable:!0}):a,e));var mS=Wo(le=>{"use strict";var rh=Symbol.for("react.transitional.element"),LO=Symbol.for("react.portal"),CO=Symbol.for("react.fragment"),wO=Symbol.for("react.strict_mode"),IO=Symbol.for("react.profiler"),TO=Symbol.for("react.consumer"),AO=Symbol.for("react.context"),kO=Symbol.for("react.forward_ref"),RO=Symbol.for("react.suspense"),EO=Symbol.for("react.memo"),lS=Symbol.for("react.lazy"),OO=Symbol.for("react.activity"),DO=Symbol.for("react.view_transition"),aS=Symbol.iterator;function MO(e){return e===null||typeof e!="object"?null:(e=aS&&e[aS]||e["@@iterator"],typeof e=="function"?e:null)}var sS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iS=Object.assign,uS={};function _s(e,t,a){this.props=e,this.context=t,this.refs=uS,this.updater=a||sS}_s.prototype.isReactComponent={};_s.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_s.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cS(){}cS.prototype=_s.prototype;function lh(e,t,a){this.props=e,this.context=t,this.refs=uS,this.updater=a||sS}var sh=lh.prototype=new cS;sh.constructor=lh;iS(sh,_s.prototype);sh.isPureReactComponent=!0;var oS=Array.isArray;function nh(){}var Ge={H:null,A:null,T:null,S:null},fS=Object.prototype.hasOwnProperty;function ih(e,t,a){var o=a.ref;return{$$typeof:rh,type:e,key:t,ref:o!==void 0?o:null,props:a}}function NO(e,t){return ih(e.type,t,e.props)}function uh(e){return typeof e=="object"&&e!==null&&e.$$typeof===rh}function PO(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var nS=/\/+/g;function oh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?PO(""+e.key):t.toString(36)}function _O(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(nh,nh):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ps(e,t,a,o,n){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(r){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case rh:case LO:l=!0;break;case lS:return l=e._init,Ps(l(e._payload),t,a,o,n)}}if(l)return n=n(e),l=o===""?"."+oh(e,0):o,oS(n)?(a="",l!=null&&(a=l.replace(nS,"$&/")+"/"),Ps(n,t,a,"",function(u){return u})):n!=null&&(uh(n)&&(n=NO(n,a+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(nS,"$&/")+"/")+l)),t.push(n)),1;l=0;var s=o===""?".":o+":";if(oS(e))for(var i=0;i<e.length;i++)o=e[i],r=s+oh(o,i),l+=Ps(o,t,a,r,n);else if(i=MO(e),typeof i=="function")for(e=i.call(e),i=0;!(o=e.next()).done;)o=o.value,r=s+oh(o,i++),l+=Ps(o,t,a,r,n);else if(r==="object"){if(typeof e.then=="function")return Ps(_O(e),t,a,o,n);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 l}function Nf(e,t,a){if(e==null)return e;var o=[],n=0;return Ps(e,o,"","",function(r){return t.call(a,r,n++)}),o}function BO(e){if(e._status===-1){var t=e._result,a=t();a.then(function(o){(e._status===0||e._status===-1)&&(e._status=1,e._result=o,a.status===void 0&&(a.status="fulfilled",a.value=o))},function(o){(e._status===0||e._status===-1)&&(e._status=2,e._result=o,a.status===void 0&&(a.status="rejected",a.reason=o))}),e._status===-1&&(e._status=0,e._result=a)}if(e._status===1)return e._result.default;throw e._result}var rS=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function dS(e){var t=Ge.T,a={};a.types=t!==null?t.types:null,Ge.T=a;try{var o=e(),n=Ge.S;n!==null&&n(a,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(nh,rS)}catch(r){rS(r)}finally{t!==null&&a.types!==null&&(t.types=a.types),Ge.T=t}}function pS(e){var t=Ge.T;if(t!==null){var a=t.types;a===null?t.types=[e]:a.indexOf(e)===-1&&a.push(e)}else dS(pS.bind(null,e))}var zO={map:Nf,forEach:function(e,t,a){Nf(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return Nf(e,function(){t++}),t},toArray:function(e){return Nf(e,function(t){return t})||[]},only:function(e){if(!uh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Activity=OO;le.Children=zO;le.Component=_s;le.Fragment=CO;le.Profiler=IO;le.PureComponent=lh;le.StrictMode=wO;le.Suspense=RO;le.ViewTransition=DO;le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ge;le.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ge.H.useMemoCache(e)}};le.addTransitionType=pS;le.cache=function(e){return function(){return e.apply(null,arguments)}};le.cacheSignal=function(){return null};le.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=iS({},e.props),n=e.key;if(t!=null)for(r in t.key!==void 0&&(n=""+t.key),t)!fS.call(t,r)||r==="key"||r==="__self"||r==="__source"||r==="ref"&&t.ref===void 0||(o[r]=t[r]);var r=arguments.length-2;if(r===1)o.children=a;else if(1<r){for(var l=Array(r),s=0;s<r;s++)l[s]=arguments[s+2];o.children=l}return ih(e.type,n,o)};le.createContext=function(e){return e={$$typeof:AO,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:TO,_context:e},e};le.createElement=function(e,t,a){var o,n={},r=null;if(t!=null)for(o in t.key!==void 0&&(r=""+t.key),t)fS.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(n[o]=t[o]);var l=arguments.length-2;if(l===1)n.children=a;else if(1<l){for(var s=Array(l),i=0;i<l;i++)s[i]=arguments[i+2];n.children=s}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)n[o]===void 0&&(n[o]=l[o]);return ih(e,r,n)};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:kO,render:e}};le.isValidElement=uh;le.lazy=function(e){return{$$typeof:lS,_payload:{_status:-1,_result:e},_init:BO}};le.memo=function(e,t){return{$$typeof:EO,type:e,compare:t===void 0?null:t}};le.startTransition=dS;le.unstable_useCacheRefresh=function(){return Ge.H.useCacheRefresh()};le.use=function(e){return Ge.H.use(e)};le.useActionState=function(e,t,a){return Ge.H.useActionState(e,t,a)};le.useCallback=function(e,t){return Ge.H.useCallback(e,t)};le.useContext=function(e){return Ge.H.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e,t){return Ge.H.useDeferredValue(e,t)};le.useEffect=function(e,t){return Ge.H.useEffect(e,t)};le.useEffectEvent=function(e){return Ge.H.useEffectEvent(e)};le.useId=function(){return Ge.H.useId()};le.useImperativeHandle=function(e,t,a){return Ge.H.useImperativeHandle(e,t,a)};le.useInsertionEffect=function(e,t){return Ge.H.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return Ge.H.useLayoutEffect(e,t)};le.useMemo=function(e,t){return Ge.H.useMemo(e,t)};le.useOptimistic=function(e,t){return Ge.H.useOptimistic(e,t)};le.useReducer=function(e,t,a){return Ge.H.useReducer(e,t,a)};le.useRef=function(e){return Ge.H.useRef(e)};le.useState=function(e){return Ge.H.useState(e)};le.useSyncExternalStore=function(e,t,a){return Ge.H.useSyncExternalStore(e,t,a)};le.useTransition=function(){return Ge.H.useTransition()};le.version="19.3.0"});var X=Wo((SF,hS)=>{"use strict";hS.exports=mS()});var IS=Wo(Ze=>{"use strict";function ph(e,t){var a=e.length;e.push(t);e:for(;0<a;){var o=a-1>>>1,n=e[o];if(0<Pf(n,t))e[o]=t,e[a]=n,a=o;else break e}}function Jo(e){return e.length===0?null:e[0]}function Bf(e){if(e.length===0)return null;var t=e[0],a=e.pop();if(a!==t){e[0]=a;e:for(var o=0,n=e.length,r=n>>>1;o<r;){var l=2*(o+1)-1,s=e[l],i=l+1,u=e[i];if(0>Pf(s,a))i<n&&0>Pf(u,s)?(e[o]=u,e[i]=a,o=i):(e[o]=s,e[l]=a,o=l);else if(i<n&&0>Pf(u,a))e[o]=u,e[i]=a,o=i;else break e}}return t}function Pf(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}Ze.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(gS=performance,Ze.unstable_now=function(){return gS.now()}):(ch=Date,yS=ch.now(),Ze.unstable_now=function(){return ch.now()-yS});var gS,ch,yS,Pn=[],vr=[],UO=1,Ja=null,Xt=3,mh=!1,bu=!1,vu=!1,hh=!1,vS=typeof setTimeout=="function"?setTimeout:null,SS=typeof clearTimeout=="function"?clearTimeout:null,xS=typeof setImmediate<"u"?setImmediate:null;function _f(e){for(var t=Jo(vr);t!==null;){if(t.callback===null)Bf(vr);else if(t.startTime<=e)Bf(vr),t.sortIndex=t.expirationTime,ph(Pn,t);else break;t=Jo(vr)}}function gh(e){if(vu=!1,_f(e),!bu)if(Jo(Pn)!==null)bu=!0,zs||(zs=!0,Bs());else{var t=Jo(vr);t!==null&&yh(gh,t.startTime-e)}}var zs=!1,Su=-1,LS=5,CS=-1;function wS(){return hh?!0:!(Ze.unstable_now()-CS<LS)}function fh(){if(hh=!1,zs){var e=Ze.unstable_now();CS=e;var t=!0;try{e:{bu=!1,vu&&(vu=!1,SS(Su),Su=-1),mh=!0;var a=Xt;try{t:{for(_f(e),Ja=Jo(Pn);Ja!==null&&!(Ja.expirationTime>e&&wS());){var o=Ja.callback;if(typeof o=="function"){Ja.callback=null,Xt=Ja.priorityLevel;var n=o(Ja.expirationTime<=e);if(e=Ze.unstable_now(),typeof n=="function"){Ja.callback=n,_f(e),t=!0;break t}Ja===Jo(Pn)&&Bf(Pn),_f(e)}else Bf(Pn);Ja=Jo(Pn)}if(Ja!==null)t=!0;else{var r=Jo(vr);r!==null&&yh(gh,r.startTime-e),t=!1}}break e}finally{Ja=null,Xt=a,mh=!1}t=void 0}}finally{t?Bs():zs=!1}}}var Bs;typeof xS=="function"?Bs=function(){xS(fh)}:typeof MessageChannel<"u"?(dh=new MessageChannel,bS=dh.port2,dh.port1.onmessage=fh,Bs=function(){bS.postMessage(null)}):Bs=function(){vS(fh,0)};var dh,bS;function yh(e,t){Su=vS(function(){e(Ze.unstable_now())},t)}Ze.unstable_IdlePriority=5;Ze.unstable_ImmediatePriority=1;Ze.unstable_LowPriority=4;Ze.unstable_NormalPriority=3;Ze.unstable_Profiling=null;Ze.unstable_UserBlockingPriority=2;Ze.unstable_cancelCallback=function(e){e.callback=null};Ze.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):LS=0<e?Math.floor(1e3/e):5};Ze.unstable_getCurrentPriorityLevel=function(){return Xt};Ze.unstable_next=function(e){switch(Xt){case 1:case 2:case 3:var t=3;break;default:t=Xt}var a=Xt;Xt=t;try{return e()}finally{Xt=a}};Ze.unstable_requestPaint=function(){hh=!0};Ze.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=Xt;Xt=e;try{return t()}finally{Xt=a}};Ze.unstable_scheduleCallback=function(e,t,a){var o=Ze.unstable_now();switch(typeof a=="object"&&a!==null?(a=a.delay,a=typeof a=="number"&&0<a?o+a:o):a=o,e){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5e3}return n=a+n,e={id:UO++,callback:t,priorityLevel:e,startTime:a,expirationTime:n,sortIndex:-1},a>o?(e.sortIndex=a,ph(vr,e),Jo(Pn)===null&&e===Jo(vr)&&(vu?(SS(Su),Su=-1):vu=!0,yh(gh,a-o))):(e.sortIndex=n,ph(Pn,e),bu||mh||(bu=!0,zs||(zs=!0,Bs()))),e};Ze.unstable_shouldYield=wS;Ze.unstable_wrapCallback=function(e){var t=Xt;return function(){var a=Xt;Xt=t;try{return e.apply(this,arguments)}finally{Xt=a}}}});var AS=Wo((CF,TS)=>{"use strict";TS.exports=IS()});var ES=Wo(Kt=>{"use strict";var FO=X();function RS(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function Sr(){}var la={d:{f:Sr,r:function(){throw Error(RS(522))},D:Sr,C:Sr,L:Sr,m:Sr,X:Sr,S:Sr,M:Sr},p:0,findDOMNode:null},HO=Symbol.for("react.portal"),qO=Symbol.for("react.recoverable"),kS=Symbol.for("react.optimistic_key");function GO(e,t,a){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:HO,key:o==null?null:o===kS?kS:""+o,children:e,containerInfo:t,implementation:a}}var Lu=FO.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function zf(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=la;Kt.browser=function(e){return{$$typeof:qO,_reason:e}};Kt.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(RS(299));return GO(e,t,null,a)};Kt.flushSync=function(e){var t=Lu.T,a=la.p;try{if(Lu.T=null,la.p=2,e)return e()}finally{Lu.T=t,la.p=a,la.d.f()}};Kt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,la.d.C(e,t))};Kt.prefetchDNS=function(e){typeof e=="string"&&la.d.D(e)};Kt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var a=t.as,o=zf(a,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,r=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;a==="style"?la.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:n,fetchPriority:r}):a==="script"&&la.d.X(e,{crossOrigin:o,integrity:n,fetchPriority:r,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Kt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var a=zf(t.as,t.crossOrigin);la.d.M(e,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&la.d.M(e)};Kt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var a=t.as,o=zf(a,t.crossOrigin);la.d.L(e,a,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Kt.preloadModule=function(e,t){if(typeof e=="string")if(t){var a=zf(t.as,t.crossOrigin);la.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else la.d.m(e)};Kt.requestFormReset=function(e){la.d.r(e)};Kt.unstable_batchedUpdates=function(e,t){return e(t)};Kt.useFormState=function(e,t,a){return Lu.H.useFormState(e,t,a)};Kt.useFormStatus=function(){return Lu.H.useHostTransitionStatus()};Kt.version="19.3.0"});var Cu=Wo((IF,DS)=>{"use strict";function OS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OS)}catch(e){console.error(e)}}OS(),DS.exports=ES()});var xI=Wo(bp=>{"use strict";var bt=AS(),yC=X(),jO=Cu();function R(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function xC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cc(e){for(var t=e,a=t;a&&!a.alternate;)t=a,(t.flags&4098)!==0&&(e=t.return),a=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function bC(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 vC(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function MS(e){if(cc(e)!==e)throw Error(R(188))}function VO(e){var t=e.alternate;if(!t){if(t=cc(e),t===null)throw Error(R(188));return t!==e?null:e}for(var a=e,o=t;;){var n=a.return;if(n===null)break;var r=n.alternate;if(r===null){if(o=n.return,o!==null){a=o;continue}break}if(n.child===r.child){for(r=n.child;r;){if(r===a)return MS(n),e;if(r===o)return MS(n),t;r=r.sibling}throw Error(R(188))}if(a.return!==o.return)a=n,o=r;else{for(var l=!1,s=n.child;s;){if(s===a){l=!0,a=n,o=r;break}if(s===o){l=!0,o=n,a=r;break}s=s.sibling}if(!l){for(s=r.child;s;){if(s===a){l=!0,a=r,o=n;break}if(s===o){l=!0,o=r,a=n;break}s=s.sibling}if(!l)throw Error(R(189))}}if(a.alternate!==o)throw Error(R(190))}if(a.tag!==3)throw Error(R(188));return a.stateNode.current===a?e:t}function SC(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=SC(e),t!==null)return t;e=e.sibling}return null}function Ca(e,t,a,o,n,r){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&a(e,o,n,r)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Ca(e.child,t,a,o,n,r))return!0;e=e.sibling}return!1}function $l(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function NS(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function LC(e){var t=[null,null],a=$l(e);return a===null||CC(t,e,a.child,{foundSelf:!1}),t}function CC(e,t,a,o){for(;a!==null;){if(a===t)o.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(o.foundSelf)return e[1]=a,!0;e[0]=a}else if((a.tag!==22||a.memoizedState===null)&&CC(e,t,a.child,o))return!0;a=a.sibling}return!1}function xt(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(R(559))}}var Vs=null,Yh=null;function $O(e,t,a){return e===a?!0:e===t?(Vs=e,!0):!1}function XO(e,t,a){return e===a?(Yh=e,!1):e===t?(Yh!==null&&(Vs=e),!0):!1}function PS(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Qh(e,t,a){for(var o=0,n=e;n;n=a(n))o++;n=0;for(var r=t;r;r=a(r))n++;for(;0<o-n;)e=a(e),o--;for(;0<n-o;)t=a(t),n--;for(;o--;){if(e===t||t!==null&&e===t.alternate)return e;e=a(e),t=a(t)}return null}var Fe=Object.assign,KO=Symbol.for("react.element"),Uf=Symbol.for("react.transitional.element"),Eu=Symbol.for("react.portal"),$s=Symbol.for("react.fragment"),wC=Symbol.for("react.strict_mode"),Zh=Symbol.for("react.profiler"),IC=Symbol.for("react.consumer"),rn=Symbol.for("react.context"),ly=Symbol.for("react.forward_ref"),Wh=Symbol.for("react.suspense"),Jh=Symbol.for("react.suspense_list"),sy=Symbol.for("react.memo"),Ir=Symbol.for("react.lazy"),eg=Symbol.for("react.activity"),YO=Symbol.for("react.legacy_hidden"),QO=Symbol.for("react.memo_cache_sentinel"),tg=Symbol.for("react.view_transition"),ZO=Symbol.for("react.recoverable"),_S=Symbol.iterator;function wu(e){return e===null||typeof e!="object"?null:(e=_S&&e[_S]||e["@@iterator"],typeof e=="function"?e:null)}var WO=Symbol.for("react.client.reference");function ag(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===WO?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $s:return"Fragment";case Zh:return"Profiler";case wC:return"StrictMode";case Wh:return"Suspense";case Jh:return"SuspenseList";case eg:return"Activity";case tg:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case Eu:return"Portal";case rn:return e.displayName||"Context";case IC:return(e._context.displayName||"Context")+".Consumer";case ly:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sy:return t=e.displayName||null,t!==null?t:ag(e.type)||"Memo";case Ir:t=e._payload,e=e._init;try{return ag(e(t))}catch{}}return null}var Ou=Array.isArray,ee=yC.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ke=jO.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ml={pending:!1,data:null,method:null,action:null},og=[],Xs=-1;function pn(e){return{current:e}}function Ut(e){0>Xs||(e.current=og[Xs],og[Xs]=null,Xs--)}function $e(e,t){Xs++,og[Xs]=e.current,e.current=t}var cn=pn(null),Ku=pn(null),Nr=pn(null),Id=pn(null);function Td(e,t){switch($e(Nr,t),$e(Ku,e),$e(cn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?QL(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=QL(t),e=Xw(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ut(cn),$e(cn,e)}function pi(){Ut(cn),Ut(Ku),Ut(Nr)}function ng(e){var t=e.memoizedState;t!==null&&(Ci._currentValue=t.memoizedState,$e(Id,e)),t=cn.current;var a=Xw(t,e.type);t!==a&&($e(Ku,e),$e(cn,a))}function Ad(e){Ku.current===e&&(Ut(cn),Ut(Ku)),Id.current===e&&(Ut(Id),Ci._currentValue=Ml)}var xh,BS;function Cr(e){if(xh===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);xh=t&&t[1]||"",BS=-1<a.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+xh+e+BS}var bh=!1;function vh(e,t){if(!e||bh)return"";bh=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(x){var f=x}Reflect.construct(e,[],c)}else{try{c.call()}catch(x){f=x}c=!1;try{var p=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),c=!0,new e}finally{c&&(p!==void 0?Object.defineProperty(e.prototype,"props",p):delete e.prototype.props)}}}else{try{throw Error()}catch(x){f=x}(c=e())&&typeof c.catch=="function"&&c.catch(function(){})}}catch(x){if(x&&f&&typeof x.stack=="string")return[x.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=o.DetermineComponentFrameRoot(),l=r[0],s=r[1];if(l&&s){var i=l.split(`
5
+ `),u=s.split(`
6
+ `);for(n=o=0;o<i.length&&!i[o].includes("DetermineComponentFrameRoot");)o++;for(;n<u.length&&!u[n].includes("DetermineComponentFrameRoot");)n++;if(o===i.length||n===u.length)for(o=i.length-1,n=u.length-1;1<=o&&0<=n&&i[o]!==u[n];)n--;for(;1<=o&&0<=n;o--,n--)if(i[o]!==u[n]){if(o!==1||n!==1)do if(o--,n--,0>n||i[o]!==u[n]){var d=`
7
+ `+i[o].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=o&&0<=n);break}}}finally{bh=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Cr(a):""}function JO(e,t){switch(e.tag){case 26:case 27:case 5:return Cr(e.type);case 16:return Cr("Lazy");case 13:return e.child!==t&&t!==null?Cr("Suspense Fallback"):Cr("Suspense");case 19:return Cr("SuspenseList");case 0:case 15:return vh(e.type,!1);case 11:return vh(e.type.render,!1);case 1:return vh(e.type,!0);case 31:return Cr("Activity");case 30:return Cr("ViewTransition");default:return""}}function zS(e){try{var t="",a=null;do t+=JO(e,a),a=e,e=e.return;while(e);return t}catch(o){return`
8
+ Error generating stack: `+o.message+`
9
+ `+o.stack}}var rg=Object.prototype.hasOwnProperty,iy=bt.unstable_scheduleCallback,Sh=bt.unstable_cancelCallback,eD=bt.unstable_shouldYield,tD=bt.unstable_requestPaint,Ba=bt.unstable_now,aD=bt.unstable_getCurrentPriorityLevel,TC=bt.unstable_ImmediatePriority,AC=bt.unstable_UserBlockingPriority,kd=bt.unstable_NormalPriority,oD=bt.unstable_LowPriority,kC=bt.unstable_IdlePriority,nD=bt.log,rD=bt.unstable_setDisableYieldValue,fc=null,za=null;function kr(e){if(typeof nD=="function"&&rD(e),za&&typeof za.setStrictMode=="function")try{za.setStrictMode(fc,e)}catch{}}var Ua=Math.clz32?Math.clz32:iD,lD=Math.log,sD=Math.LN2;function iD(e){return e>>>=0,e===0?32:31-(lD(e)/sD|0)|0}var Ff=256,Hf=262144,qf=4194304;function kl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ep(e,t,a){var o=e.pendingLanes;if(o===0)return 0;var n=0,r=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var s=o&134217727;return s!==0?(o=s&~r,o!==0?n=kl(o):(l&=s,l!==0?n=kl(l):a||(a=s&~e,a!==0&&(n=kl(a))))):(s=o&~r,s!==0?n=kl(s):l!==0?n=kl(l):a||(a=o&~e,a!==0&&(n=kl(a)))),n===0?0:t!==0&&t!==n&&(t&r)===0&&(r=n&-n,a=t&-t,r>=a||r===32&&(a&4194048)!==0)?t:n}function dc(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function RC(e,t){(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var o=31-Ua(a),n=1<<o;t|=e[o],a&=~n}return t}function uD(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function EC(){var e=qf;return qf<<=1,(qf&62914560)===0&&(qf=4194304),e}function Lh(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function pc(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function cD(e,t,a,o,n,r){var l=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var s=e.entanglements,i=e.expirationTimes,u=e.hiddenUpdates;for(a=l&~a;0<a;){var d=31-Ua(a),c=1<<d;s[d]=0,i[d]=-1;var f=u[d];if(f!==null)for(u[d]=null,d=0;d<f.length;d++){var p=f[d];p!==null&&(p.lane&=-536870913)}a&=~c}o!==0&&OC(e,o,0),r!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=r&~(l&~t))}function OC(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Ua(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function DC(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var o=31-Ua(a),n=1<<o;n&t|e[o]&t&&(e[o]|=t),a&=~n}}function MC(e,t){var a=t&-t;return a=(a&42)!==0?1:uy(a),(a&(e.suspendedLanes|t))!==0?0:a}function uy(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cy(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function NC(){var e=ke.p;return e!==0?e:(e=window.event,e===void 0?32:hI(e.type))}function US(e,t){var a=ke.p;try{return ke.p=e,t()}finally{ke.p=a}}var Kn=Math.random().toString(36).slice(2),Bt="__reactFiber$"+Kn,wa="__reactProps$"+Kn,Ti="__reactContainer$"+Kn,FS="__reactEvents$"+Kn,fD="__reactListeners$"+Kn,dD="__reactHandles$"+Kn,HS="__reactResources$"+Kn,mc="__reactMarker$"+Kn,Rd="__reactLoad$"+Kn;function tp(e){delete e[Bt],delete e[wa],delete e[fD],delete e[dD]}function Ol(e){var t;if(t=e[Bt])return t;for(var a=e.parentNode;a;){if(t=a[Ti]||a[Bt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=nC(e);e!==null;){if(a=e[Bt])return a;e=nC(e)}return t}e=a,a=e.parentNode}return null}function Ai(e){if(e=e[Bt]||e[Ti]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Du(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(R(33))}function oi(e){var t=e[HS];return t||(t=e[HS]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function It(e){e[mc]=!0}function PC(e){e[Rd]=void 0}var _C=new Set,BC={};function Xl(e,t){mi(e,t),mi(e+"Capture",t)}function mi(e,t){for(BC[e]=t,e=0;e<t.length;e++)_C.add(t[e])}var pD=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),qS={},GS={};function mD(e){return rg.call(GS,e)?!0:rg.call(qS,e)?!1:pD.test(e)?GS[e]=!0:(qS[e]=!0,!1)}var Le=!1;function jS(){var e=Le;return Le=!1,e}function ld(e,t,a){if(mD(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,a)}}function Gf(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,a)}}function _n(e,t,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,o)}}function Ma(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hD(e,t,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var n=o.get,r=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(l){a=""+l,r.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(l){a=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lg(e){if(!e._valueTracker){var t=zC(e)?"checked":"value";e._valueTracker=hD(e,t,""+e[t])}}function UC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),o="";return e&&(o=zC(e)?e.checked?"true":"false":e.value),e=o,e!==a?(t.setValue(e),!0):!1}var gD=/[\n"\\]/g;function no(e){return e.replace(gD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sg(e,t,a,o,n,r,l,s){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ma(t)):e.value!==""+Ma(t)&&(e.value=""+Ma(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?l==="number"&&e.value==t?Ch(e,Ma(e.value)):Ch(e,Ma(t)):a!=null?Ch(e,Ma(a)):o!=null&&e.removeAttribute("value"),n==null&&r!=null&&(e.defaultChecked=!!r),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Ma(s):e.removeAttribute("name")}function FC(e,t,a,o,n,r,l,s){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||a!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){lg(e);return}a=a!=null?""+Ma(a):"",t=t!=null?""+Ma(t):a,s||t===e.value||(e.value=t),e.defaultValue=t}o=o??n,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=s?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),lg(e)}function Ch(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ni(e,t,a,o){if(e=e.options,t){t={};for(var n=0;n<a.length;n++)t["$"+a[n]]=!0;for(a=0;a<e.length;a++)n=t.hasOwnProperty("$"+e[a].value),e[a].selected!==n&&(e[a].selected=n),n&&o&&(e[a].defaultSelected=!0)}else{for(a=""+Ma(a),t=null,n=0;n<e.length;n++){if(e[n].value===a){e[n].selected=!0,o&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function HC(e,t,a){if(t!=null&&(t=""+Ma(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ma(a):""}function qC(e,t,a,o){if(t==null){if(o!=null){if(a!=null)throw Error(R(92));if(Ou(o)){if(1<o.length)throw Error(R(93));o=o[0]}a=o}a==null&&(a=""),t=a}a=Ma(t),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),lg(e)}function hi(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var yD=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function VS(e,t,a){var o=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,a):typeof a!="number"||a===0||yD.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function GC(e,t,a){if(t!=null&&typeof t!="object")throw Error(R(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="",Le=!0);for(var n in t)o=t[n],t.hasOwnProperty(n)&&a[n]!==o&&(VS(e,n,o),Le=!0)}else for(var r in t)t.hasOwnProperty(r)&&VS(e,r,t[r])}function fy(e){if(e.indexOf("-")===-1)return!1;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 xD=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),bD=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sd(e){return bD.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ln(){}var ig=null;function dy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ks=null,ri=null;function $S(e){var t=Ai(e);if(t&&(e=t.stateNode)){var a=e[wa]||null;e:switch(e=t.stateNode,t.type){case"input":if(sg(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+no(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var o=a[t];if(o!==e&&o.form===e.form){var n=o[wa]||null;if(!n)throw Error(R(90));sg(o,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<a.length;t++)o=a[t],o.form===e.form&&UC(o)}break e;case"textarea":HC(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ni(e,!!a.multiple,t,!1)}}}var wh=!1;function jC(e,t,a){if(wh)return e(t,a);wh=!0;try{var o=e(t);return o}finally{if(wh=!1,(Ks!==null||ri!==null)&&(hp(),Ks&&(t=Ks,e=ri,ri=Ks=null,$S(t),e)))for(t=0;t<e.length;t++)$S(e[t])}}function Yu(e,t){var a=e.stateNode;if(a===null)return null;var o=a[wa]||null;if(o===null)return null;a=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(R(231,t,typeof a));return a}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ug=!1;if(qn)try{Us={},Object.defineProperty(Us,"passive",{get:function(){ug=!0}}),window.addEventListener("test",Us,Us),window.removeEventListener("test",Us,Us)}catch{ug=!1}var Us,Rr=null,py=null,id=null;function VC(){if(id)return id;var e,t=py,a=t.length,o,n="value"in Rr?Rr.value:Rr.textContent,r=n.length;for(e=0;e<a&&t[e]===n[e];e++);var l=a-e;for(o=1;o<=l&&t[a-o]===n[r-o];o++);return id=n.slice(e,1<o?1-o:void 0)}function ud(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 jf(){return!0}function XS(){return!1}function ca(e){function t(a,o,n,r,l){this._reactName=a,this._targetInst=n,this.type=o,this.nativeEvent=r,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(a=e[s],this[s]=a?a(r):r[s]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?jf:XS,this.isPropagationStopped=XS,this}return Fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=jf)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=jf)},persist:function(){},isPersistent:jf}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ap=ca(Yr),hc=Fe({},Yr,{view:0,detail:0}),vD=ca(hc),Ih,Th,Iu,op=Fe({},hc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:my,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!==Iu&&(Iu&&e.type==="mousemove"?(Ih=e.screenX-Iu.screenX,Th=e.screenY-Iu.screenY):Th=Ih=0,Iu=e),Ih)},movementY:function(e){return"movementY"in e?e.movementY:Th}}),KS=ca(op),SD=Fe({},op,{dataTransfer:0}),LD=ca(SD),CD=Fe({},hc,{relatedTarget:0}),Ah=ca(CD),wD=Fe({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),ID=ca(wD),TD=Fe({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),AD=ca(TD),kD=Fe({},Yr,{data:0}),YS=ca(kD),RD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ED={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"},OD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=OD[e])?!!t[e]:!1}function my(){return DD}var MD=Fe({},hc,{key:function(e){if(e.key){var t=RD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ud(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ED[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:my,charCode:function(e){return e.type==="keypress"?ud(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ud(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ND=ca(MD),PD=Fe({},op,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),QS=ca(PD),_D=Fe({},Yr,{submitter:0}),BD=ca(_D),zD=Fe({},hc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:my}),UD=ca(zD),FD=Fe({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),HD=ca(FD),qD=Fe({},op,{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}),GD=ca(qD),jD=Fe({},Yr,{newState:0,oldState:0,source:0}),VD=ca(jD),$D=[9,13,27,32],hy=qn&&"CompositionEvent"in window,Pu=null;qn&&"documentMode"in document&&(Pu=document.documentMode);var XD=qn&&"TextEvent"in window&&!Pu,$C=qn&&(!hy||Pu&&8<Pu&&11>=Pu),ZS=" ",WS=!1;function XC(e,t){switch(e){case"keyup":return $D.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ys=!1;function KD(e,t){switch(e){case"compositionend":return KC(t);case"keypress":return t.which!==32?null:(WS=!0,ZS);case"textInput":return e=t.data,e===ZS&&WS?null:e;default:return null}}function YD(e,t){if(Ys)return e==="compositionend"||!hy&&XC(e,t)?(e=VC(),id=py=Rr=null,Ys=!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 $C&&t.locale!=="ko"?null:t.data;default:return null}}var QD={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 JS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!QD[e.type]:t==="textarea"}function YC(e,t,a,o){Ks?ri?ri.push(o):ri=[o]:Ks=o,t=Zd(t,"onChange"),0<t.length&&(a=new ap("onChange","change",null,a,o),e.push({event:a,listeners:t}))}var _u=null,Qu=null;function ZD(e){jw(e,0)}function np(e){var t=Du(e);if(UC(t))return e}function eL(e,t){if(e==="change")return t}var QC=!1;qn&&(qn?($f="oninput"in document,$f||(kh=document.createElement("div"),kh.setAttribute("oninput","return;"),$f=typeof kh.oninput=="function"),Vf=$f):Vf=!1,QC=Vf&&(!document.documentMode||9<document.documentMode));var Vf,$f,kh;function tL(){_u&&(_u.detachEvent("onpropertychange",ZC),Qu=_u=null)}function ZC(e){if(e.propertyName==="value"&&np(Qu)){var t=[];YC(t,Qu,e,dy(e)),jC(ZD,t)}}function WD(e,t,a){e==="focusin"?(tL(),_u=t,Qu=a,_u.attachEvent("onpropertychange",ZC)):e==="focusout"&&tL()}function JD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return np(Qu)}function e2(e,t){if(e==="click")return np(t)}function t2(e,t){if(e==="input"||e==="change")return np(t)}function a2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ha=typeof Object.is=="function"?Object.is:a2;function Zu(e,t){if(Ha(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var n=a[o];if(!rg.call(t,n)||!Ha(e[n],t[n]))return!1}return!0}function cg(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 aL(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function oL(e,t){var a=aL(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=t&&o>=t)return{node:a,offset:t-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=aL(a)}}function WC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JC(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=cg(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=cg(e.document)}return t}function gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var o2=qn&&"documentMode"in document&&11>=document.documentMode,Qs=null,fg=null,Bu=null,dg=!1;function nL(e,t,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;dg||Qs==null||Qs!==cg(o)||(o=Qs,"selectionStart"in o&&gy(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Bu&&Zu(Bu,o)||(Bu=o,o=Zd(fg,"onSelect"),0<o.length&&(t=new ap("onSelect","select",null,t,a),e.push({event:t,listeners:o}),t.target=Qs)))}function Tl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Zs={animationend:Tl("Animation","AnimationEnd"),animationiteration:Tl("Animation","AnimationIteration"),animationstart:Tl("Animation","AnimationStart"),transitionrun:Tl("Transition","TransitionRun"),transitionstart:Tl("Transition","TransitionStart"),transitioncancel:Tl("Transition","TransitionCancel"),transitionend:Tl("Transition","TransitionEnd")},Rh={},e0={};qn&&(e0=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function Kl(e){if(Rh[e])return Rh[e];if(!Zs[e])return e;var t=Zs[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in e0)return Rh[e]=t[a];return e}var t0=Kl("animationend"),a0=Kl("animationiteration"),o0=Kl("animationstart"),n2=Kl("transitionrun"),r2=Kl("transitionstart"),l2=Kl("transitioncancel"),n0=Kl("transitionend"),r0=new Map,pg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");pg.push("scrollEnd");function To(e,t){r0.set(e,t),Xl(t,[e])}var s2=0;function Gn(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Io.identifierPrefix;var a=s2++;return e="_"+e+"t_"+a.toString(32)+"_",t.autoName=e}function rL(e){if(e==null||typeof e=="string")return e;var t=null,a=di;if(a!==null)for(var o=0;o<a.length;o++){var n=e[a[o]];if(n!=null){if(n==="none")return"none";t=t==null?n:t+(" "+n)}}return t??e.default}function Yn(e,t){return e=rL(e),t=rL(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Ed=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},to=[],Ws=0,yy=0;function rp(){for(var e=Ws,t=yy=Ws=0;t<e;){var a=to[t];to[t++]=null;var o=to[t];to[t++]=null;var n=to[t];to[t++]=null;var r=to[t];if(to[t++]=null,o!==null&&n!==null){var l=o.pending;l===null?n.next=n:(n.next=l.next,l.next=n),o.pending=n}r!==0&&l0(a,n,r)}}function lp(e,t,a,o){to[Ws++]=e,to[Ws++]=t,to[Ws++]=a,to[Ws++]=o,yy|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function xy(e,t,a,o){return lp(e,t,a,o),Od(e)}function Yl(e,t){return lp(e,null,null,t),Od(e)}function l0(e,t,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var n=!1,r=e.return;r!==null;)r.childLanes|=a,o=r.alternate,o!==null&&(o.childLanes|=a),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(n=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,n&&t!==null&&(n=31-Ua(a),e=r.hiddenUpdates,o=e[n],o===null?e[n]=[t]:o.push(t),t.lane=a|536870912),r):null}function Od(e){if(50<Xu)throw Xu=0,bd=null,Error(R(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Js={};function i2(e,t,a,o){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sa(e,t,a,o){return new i2(e,t,a,o)}function by(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fn(e,t){var a=e.alternate;return a===null?(a=Sa(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&1206910976,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function s0(e,t){e.flags&=1206910978;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function cd(e,t,a,o,n,r){var l=0;if(o=e,typeof o=="function")by(o)&&(l=1);else if(typeof o=="string")l=NM(e,a,cn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(o){case eg:return e=Sa(31,a,t,n),e.elementType=eg,e.lanes=r,e;case $s:return Nl(a.children,n,r,t);case wC:l=8,n|=24;break;case Zh:return e=Sa(12,a,t,n|2),e.elementType=Zh,e.lanes=r,e;case Wh:return e=Sa(13,a,t,n),e.elementType=Wh,e.lanes=r,e;case Jh:return e=Sa(19,a,t,n),e.elementType=Jh,e.lanes=r,e;case YO:case tg:return e=n|32,e=Sa(30,a,t,e),e.elementType=tg,e.lanes=r,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case rn:l=10;break e;case IC:l=9;break e;case ly:l=11;break e;case sy:l=14;break e;case Ir:l=16,o=null;break e}l=29,a=Error(R(130,e===null?"null":typeof e,"")),o=null}return t=Sa(l,a,t,n),t.elementType=e,t.type=o,t.lanes=r,t}function Nl(e,t,a,o){return e=Sa(7,e,o,t),e.lanes=a,e}function Eh(e,t,a){return e=Sa(6,e,null,t),e.lanes=a,e}function i0(e){var t=Sa(18,null,null,0);return t.stateNode=e,t}function Oh(e,t,a){return t=Sa(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var lL=new WeakMap;function ro(e,t){if(typeof e=="object"&&e!==null){var a=lL.get(e);return a!==void 0?a:(t={value:e,source:t,stack:zS(t)},lL.set(e,t),t)}return{value:e,source:t,stack:zS(t)}}var ei=[],ti=0,Dd=null,Wu=0,ao=[],oo=0,jr=null,sn=1,un="";function zn(e,t){ei[ti++]=Wu,ei[ti++]=Dd,Dd=e,Wu=t}function u0(e,t,a){ao[oo++]=sn,ao[oo++]=un,ao[oo++]=jr,jr=e;var o=sn;e=un;var n=32-Ua(o)-1;o&=~(1<<n),a+=1;var r=32-Ua(t)+n;if(30<r){var l=n-n%5;r=(o&(1<<l)-1).toString(32),o>>=l,n-=l,sn=1<<32-Ua(t)+n|a<<n|o,un=r+e}else sn=1<<r|a<<n|o,un=e}function sp(e){e.return!==null&&(zn(e,1),u0(e,1,0))}function vy(e){for(;e===Dd;)Dd=ei[--ti],ei[ti]=null,Wu=ei[--ti],ei[ti]=null;for(;e===jr;)jr=ao[--oo],ao[oo]=null,un=ao[--oo],ao[oo]=null,sn=ao[--oo],ao[oo]=null}function c0(e,t){ao[oo++]=sn,ao[oo++]=un,ao[oo++]=jr,sn=t.id,un=t.overflow,jr=e}var Tt=null,Ve=null,pe=!1,Pr=null,lo=!1,mg=Error(R(519));function Vr(e){var t=Error(R(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ju(ro(t,e)),mg}function sL(e){var t=e.stateNode,a=e.type,o=e.memoizedProps;switch(t[Bt]=e,t[wa]=o,a){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(a=0;a<oc.length;a++)he(oc[a],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),FC(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),qC(t,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||o.suppressHydrationWarning===!0||$w(t.textContent,a)?(o.popover!=null&&(he("beforetoggle",t),he("toggle",t)),o.onScroll!=null&&he("scroll",t),o.onScrollEnd!=null&&he("scrollend",t),o.onClick!=null&&(t.onclick=ln),t=!0):t=!1,t||Vr(e,!0)}function Md(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:lo=!1;return;case 27:case 3:lo=!0;return;default:Tt=Tt.return}}function Fs(e){if(e!==Tt)return!1;if(!pe)return Md(e),pe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Wg(e.type,e.memoizedProps)),a=!a),a&&Ve&&Vr(e),Md(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));Ve=oC(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));Ve=oC(e)}else t===27?(t=Ve,Qr(e.type)?(e=ay,ay=null,Ve=e):Ve=t):Ve=Tt?so(e.stateNode.nextSibling):null;return!0}function zl(){Ve=Tt=null,pe=!1}function Dh(){var e=Pr;return e!==null&&(ba===null?ba=e:ba.push.apply(ba,e),Pr=null),e}function Ju(e){Pr===null?Pr=[e]:Pr.push(e)}var hg=pn(null),Ql=null,Un=null;function Er(e,t,a){$e(hg,t._currentValue),t._currentValue=a}function Hn(e){e._currentValue=hg.current,Ut(hg)}function fd(e,t,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===a)break;e=e.return}}function gg(e,t,a,o){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var r=n.dependencies;if(r!==null){var l=n.child;r=r.firstContext;e:for(;r!==null;){var s=r;r=n;for(var i=0;i<t.length;i++)if(s.context===t[i]){r.lanes|=a,s=r.alternate,s!==null&&(s.lanes|=a),fd(r.return,a,e),o||(l=null);break e}r=s.next}}else if(n.tag===18){if(l=n.return,l===null)throw Error(R(341));l.lanes|=a,r=l.alternate,r!==null&&(r.lanes|=a),fd(l,a,e),l=null}else n.tag===13&&n.memoizedState!==null&&n.memoizedState.dehydrated===null?(n.lanes|=a,l=n.alternate,l!==null&&(l.lanes|=a),fd(n.return,a,e),l=n.child,l=l!==null?l.sibling:null):l=n.child;if(l!==null)l.return=n;else for(l=n;l!==null;){if(l===e){l=null;break}if(n=l.sibling,n!==null){n.return=l.return,l=n;break}l=l.return}n=l}}function Ul(e,t,a,o){e=null;for(var n=t,r=!1;n!==null;){if(!r){if((n.flags&524288)!==0)r=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var l=n.alternate;if(l===null)throw Error(R(387));if(l=l.memoizedProps,l!==null){var s=n.type;Ha(n.pendingProps.value,l.value)||(e!==null?e.push(s):e=[s])}}else if(n===Id.current){if(l=n.alternate,l===null)throw Error(R(387));l.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Ci):e=[Ci])}n=n.return}return e!==null&&gg(t,e,a,o),t.flags|=262144,e!==null}function Nd(e){for(e=e.firstContext;e!==null;){if(!Ha(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fl(e){Ql=e,Un=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return f0(Ql,e)}function Xf(e,t){return Ql===null&&Fl(e),f0(e,t)}function f0(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Un===null){if(e===null)throw Error(R(308));Un=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Un=Un.next=t;return a}var u2=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},c2=bt.unstable_scheduleCallback,f2=bt.unstable_NormalPriority,pt={$$typeof:rn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sy(){return{controller:new u2,data:new Map,refCount:0}}function gc(e){e.refCount--,e.refCount===0&&c2(f2,function(){e.controller.abort()})}function iL(e,t){if((e.pendingLanes&4194048)!==0){var a=e.transitionTypes;for(a===null&&(a=e.transitionTypes=[]),e=0;e<t.length;e++){var o=t[e];a.indexOf(o)===-1&&a.push(o)}}}var Mu=null;function d2(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var zu=null,yg=0,Hl=0,li=null;function p2(e,t){if(zu===null){var a=zu=[];yg=0,Hl=Yy(),li={status:"pending",value:void 0,then:function(o){a.push(o)}}}return yg++,t.then(uL,uL),t}function uL(){if(--yg===0&&(Mu=null,zu!==null)){li!==null&&(li.status="fulfilled");var e=zu;zu=null,Hl=0,li=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function m2(e,t){var a=[],o={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var n=0;n<a.length;n++)(0,a[n])(t)},function(n){for(o.status="rejected",o.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),o}var cL=ee.S;ee.S=function(e,t){if(Rw=Ba(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&p2(e,t),Mu!==null)for(var a=vi;a!==null;)iL(a,Mu),a=a.next;if(a=e.types,a!==null){for(var o=vi;o!==null;)iL(o,a),o=o.next;if(Hl!==0){o=Mu,o===null&&(o=Mu=[]);for(var n=0;n<a.length;n++){var r=a[n];o.indexOf(r)===-1&&o.push(r)}}}cL!==null&&cL(e,t)};var Pl=pn(null);function Ly(){var e=Pl.current;return e!==null?e:Ue.pooledCache}function dd(e,t){t===null?$e(Pl,Pl.current):$e(Pl,t.pool)}function d0(){var e=Ly();return e===null?null:{parent:pt._currentValue,pool:e}}var ki=Error(R(460)),Cy=Error(R(474)),ip=Error(R(542)),Pd={then:function(){}};function fL(e){return e=e.status,e==="fulfilled"||e==="rejected"}function p0(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ln,ln),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pL(e),e===void 0&&!("reason"in t)?Error(R(600)):e;default:if(typeof t.status=="string")t.then(ln,ln);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(R(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=o}},function(o){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pL(e),e}throw _l=t,ki}}function Rl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_l=a,ki):a}}var _l=null;function dL(){if(_l===null)throw Error(R(459));var e=_l;return _l=null,e}function pL(e){if(e===ki||e===ip)throw Error(R(483))}var si=null,ec=0;function Kf(e){var t=ec;return ec+=1,si===null&&(si=[]),p0(si,e,t)}function Lr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Yf(e,t){throw t.$$typeof===KO?Error(R(525)):(e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function m0(e){function t(y,m){if(e){var h=y.deletions;h===null?(y.deletions=[m],y.flags|=16):h.push(m)}}function a(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function o(y){for(var m=new Map;y!==null;)y.key===null?m.set(y.index,y):m.set(y.key,y),y=y.sibling;return m}function n(y,m){return y=Fn(y,m),y.index=0,y.sibling=null,y}function r(y,m,h){return y.index=h,e?(h=y.alternate,h!==null?(h=h.index,h<m?(y.flags|=2,m):h):(y.flags|=134217730,m)):(y.flags|=1048576,m)}function l(y){return e&&y.alternate===null&&(y.flags|=134217730),y}function s(y,m,h,b){return m===null||m.tag!==6?(m=Eh(h,y.mode,b),m.return=y,m):(m=n(m,h),m.return=y,m)}function i(y,m,h,b){var L=h.type;return L===$s?(y=d(y,m,h.props.children,b,h.key),Lr(y,h),y):m!==null&&(m.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Ir&&Rl(L)===m.type)?(m=n(m,h.props),Lr(m,h),m.return=y,m):(m=cd(h.type,h.key,h.props,null,y.mode,b),Lr(m,h),m.return=y,m)}function u(y,m,h,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=Oh(h,y.mode,b),m.return=y,m):(m=n(m,h.children||[]),m.return=y,m)}function d(y,m,h,b,L){return m===null||m.tag!==7?(m=Nl(h,y.mode,b,L),m.return=y,m):(m=n(m,h),m.return=y,m)}function c(y,m,h){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=Eh(""+m,y.mode,h),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Uf:return h=cd(m.type,m.key,m.props,null,y.mode,h),Lr(h,m),h.return=y,h;case Eu:return m=Oh(m,y.mode,h),m.return=y,m;case Ir:return m=Rl(m),c(y,m,h)}if(Ou(m)||wu(m))return m=Nl(m,y.mode,h,null),m.return=y,m;if(typeof m.then=="function")return c(y,Kf(m),h);if(m.$$typeof===rn)return c(y,Xf(y,m),h);Yf(y,m)}return null}function f(y,m,h,b){var L=m!==null?m.key:null;if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return L!==null?null:s(y,m,""+h,b);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Uf:return h.key===L?i(y,m,h,b):null;case Eu:return h.key===L?u(y,m,h,b):null;case Ir:return h=Rl(h),f(y,m,h,b)}if(Ou(h)||wu(h))return L!==null?null:d(y,m,h,b,null);if(typeof h.then=="function")return f(y,m,Kf(h),b);if(h.$$typeof===rn)return f(y,m,Xf(y,h),b);Yf(y,h)}return null}function p(y,m,h,b,L){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return y=y.get(h)||null,s(m,y,""+b,L);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Uf:return y=y.get(b.key===null?h:b.key)||null,i(m,y,b,L);case Eu:return y=y.get(b.key===null?h:b.key)||null,u(m,y,b,L);case Ir:return b=Rl(b),p(y,m,h,b,L)}if(Ou(b)||wu(b))return y=y.get(h)||null,d(m,y,b,L,null);if(typeof b.then=="function")return p(y,m,h,Kf(b),L);if(b.$$typeof===rn)return p(y,m,h,Xf(m,b),L);Yf(m,b)}return null}function x(y,m,h,b){for(var L=null,C=null,T=m,w=m=0,E=null;T!==null&&w<h.length;w++){T.index>w?(E=T,T=null):E=T.sibling;var A=f(y,T,h[w],b);if(A===null){T===null&&(T=E);break}e&&T&&A.alternate===null&&t(y,T),m=r(A,m,w),C===null?L=A:C.sibling=A,C=A,T=E}if(w===h.length)return a(y,T),pe&&zn(y,w),L;if(T===null){for(;w<h.length;w++)T=c(y,h[w],b),T!==null&&(m=r(T,m,w),C===null?L=T:C.sibling=T,C=T);return pe&&zn(y,w),L}for(T=o(T);w<h.length;w++)E=p(T,y,w,h[w],b),E!==null&&(e&&(A=E.alternate,A!==null&&T.delete(A.key===null?w:A.key)),m=r(E,m,w),C===null?L=E:C.sibling=E,C=E);return e&&T.forEach(function(z){return t(y,z)}),pe&&zn(y,w),L}function g(y,m,h,b){if(h==null)throw Error(R(151));for(var L=null,C=null,T=m,w=m=0,E=null,A=h.next();T!==null&&!A.done;w++,A=h.next()){T.index>w?(E=T,T=null):E=T.sibling;var z=f(y,T,A.value,b);if(z===null){T===null&&(T=E);break}e&&T&&z.alternate===null&&t(y,T),m=r(z,m,w),C===null?L=z:C.sibling=z,C=z,T=E}if(A.done)return a(y,T),pe&&zn(y,w),L;if(T===null){for(;!A.done;w++,A=h.next())A=c(y,A.value,b),A!==null&&(m=r(A,m,w),C===null?L=A:C.sibling=A,C=A);return pe&&zn(y,w),L}for(T=o(T);!A.done;w++,A=h.next())A=p(T,y,w,A.value,b),A!==null&&(e&&(E=A.alternate,E!==null&&T.delete(E.key===null?w:E.key)),m=r(A,m,w),C===null?L=A:C.sibling=A,C=A);return e&&T.forEach(function(B){return t(y,B)}),pe&&zn(y,w),L}function S(y,m,h,b){if(typeof h=="object"&&h!==null&&h.type===$s&&h.key===null&&h.props.ref===void 0&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Uf:e:{for(var L=h.key;m!==null;){if(m.key===L){if(L=h.type,L===$s){if(m.tag===7){a(y,m.sibling),b=n(m,h.props.children),Lr(b,h),b.return=y,y=b;break e}}else if(m.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Ir&&Rl(L)===m.type){a(y,m.sibling),b=n(m,h.props),Lr(b,h),b.return=y,y=b;break e}a(y,m);break}else t(y,m);m=m.sibling}h.type===$s?(b=Nl(h.props.children,y.mode,b,h.key),Lr(b,h),b.return=y,y=b):(b=cd(h.type,h.key,h.props,null,y.mode,b),Lr(b,h),b.return=y,y=b)}return l(y);case Eu:e:{for(L=h.key;m!==null;){if(m.key===L)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){a(y,m.sibling),b=n(m,h.children||[]),b.return=y,y=b;break e}else{a(y,m);break}else t(y,m);m=m.sibling}b=Oh(h,y.mode,b),b.return=y,y=b}return l(y);case Ir:return h=Rl(h),S(y,m,h,b)}if(Ou(h))return x(y,m,h,b);if(wu(h)){if(L=wu(h),typeof L!="function")throw Error(R(150));return h=L.call(h),g(y,m,h,b)}if(typeof h.then=="function")return S(y,m,Kf(h),b);if(h.$$typeof===rn)return S(y,m,Xf(y,h),b);Yf(y,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,m!==null&&m.tag===6?(a(y,m.sibling),b=n(m,h),b.return=y,y=b):(a(y,m),b=Eh(h,y.mode,b),b.return=y,y=b),l(y)):a(y,m)}return function(y,m,h,b){try{ec=0;var L=S(y,m,h,b);return si=null,L}catch(T){if(T===ki||T===ip)throw T;var C=Sa(29,T,null,y.mode);return C.lanes=b,C.return=y,C}}}var ql=m0(!0),h0=m0(!1),Tr=!1;function wy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _r(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Br(e,t,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,t=Od(e),l0(e,null,a),t}return lp(e,o,t,a),Od(e)}function Uu(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,a|=o,t.lanes=a,DC(e,a)}}function Mh(e,t){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var n=null,r=null;if(a=a.firstBaseUpdate,a!==null){do{var l={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};r===null?n=r=l:r=r.next=l,a=a.next}while(a!==null);r===null?n=r=t:r=r.next=t}else n=r=t;a={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:r,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var bg=!1;function Fu(){if(bg){var e=li;if(e!==null)throw e}}function Hu(e,t,a,o){bg=!1;var n=e.updateQueue;Tr=!1;var r=n.firstBaseUpdate,l=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var i=s,u=i.next;i.next=null,l===null?r=u:l.next=u,l=i;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==l&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=i))}if(r!==null){var c=n.baseState;l=0,d=u=i=null,s=r;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(ye&f)===f:(o&f)===f){f!==0&&f===Hl&&(bg=!0),d!==null&&(d=d.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var x=e,g=s;f=t;var S=a;switch(g.tag){case 1:if(x=g.payload,typeof x=="function"){c=x.call(S,c,f);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=g.payload,f=typeof x=="function"?x.call(S,c,f):x,f==null)break e;c=Fe({},c,f);break e;case 2:Tr=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=n.callbacks,p===null?n.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=p,i=c):d=d.next=p,l|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;p=s,s=p.next,p.next=null,n.lastBaseUpdate=p,n.shared.pending=null}}while(!0);d===null&&(i=c),n.baseState=i,n.firstBaseUpdate=u,n.lastBaseUpdate=d,r===null&&(n.shared.lanes=0),Kr|=l,e.lanes=l,e.memoizedState=c}}function g0(e,t){if(typeof e!="function")throw Error(R(191,e));e.call(t)}function y0(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)g0(a[e],t)}var $r=pn(null),_d=pn(0);function mL(e,t){e=Xn,$e(_d,e),$e($r,t),Xn=e|t.baseLanes}function vg(){$e(_d,Xn),$e($r,$r.current)}function Iy(){Xn=_d.current,Ut($r),Ut(_d)}var qt=pn(null),Yt=null;function zr(e){var t=e.alternate;$e(Ft,Ft.current&1),$e(qt,e),Yt===null&&(t===null||$r.current!==null||t.memoizedState!==null)&&(Yt=e)}function Sg(e){$e(Ft,Ft.current),$e(qt,e),Yt===null&&(Yt=e)}function x0(e){e.tag===22?($e(Ft,Ft.current),$e(qt,e),Yt===null&&(Yt=e)):Ur()}function Ur(){$e(Ft,Ft.current),$e(qt,qt.current)}function Na(e){Ut(qt),Yt===e&&(Yt=null),Ut(Ft)}var Ft=pn(0);function tc(e,t){$e(qt,qt.current),$e(Ft,t)}function Ty(e){Ut(Ft),Ut(qt),Yt===e&&(Yt=null)}function Bd(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ty(a)||Jy(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)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 jn=0,ue=null,Pe=null,dt=null,zd=!1,ii=!1,Gl=!1,Ud=0,ac=0,ui=null,h2=0;function nt(){throw Error(R(321))}function Ay(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ha(e[a],t[a]))return!1;return!0}function ky(e,t,a,o,n,r){return jn=r,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ee.H=e===null||e.memoizedState===null?Y0:Q0,Gl=!1,r=a(o,n),Gl=!1,ii&&(r=v0(t,a,o,n)),b0(e),r}function b0(e){ee.H=Fd;var t=Pe!==null&&Pe.next!==null;if(jn=0,dt=Pe=ue=null,zd=!1,ac=0,ui=null,t)throw Error(R(300));e===null||mt||(e=e.dependencies,e!==null&&Nd(e)&&(mt=!0))}function v0(e,t,a,o){ue=e;var n=0;do{if(ii&&(ui=null),ac=0,ii=!1,25<=n)throw Error(R(301));if(n+=1,dt=Pe=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}ee.H=C2,r=t(a,o)}while(ii);return r}function g2(){var e=ee.H,t=e.useState()[0];return t=typeof t.then=="function"?yc(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(ue.flags|=1024),t}function Ry(){var e=Ud!==0;return Ud=0,e}function Ey(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Oy(e){if(zd){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zd=!1}jn=0,dt=Pe=ue=null,ii=!1,ac=Ud=0,ui=null}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?ue.memoizedState=dt=e:dt=dt.next=e,dt}function ft(){if(Pe===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=dt===null?ue.memoizedState:dt.next;if(t!==null)dt=t,Pe=e;else{if(e===null)throw ue.alternate===null?Error(R(467)):Error(R(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},dt===null?ue.memoizedState=dt=e:dt=dt.next=e}return dt}function up(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yc(e){var t=ac;return ac+=1,ui===null&&(ui=[]),e=p0(ui,e,t),t=ue,(dt===null?t.memoizedState:dt.next)===null&&(t=t.alternate,ee.H=t===null||t.memoizedState===null?Y0:Q0),e}function cp(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yc(e);if(e.$$typeof===ZO)return;if(e.$$typeof===rn)return zt(e)}throw Error(R(438,String(e)))}function Dy(e){var t=null,a=ue.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var o=ue.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=up(),ue.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),o=0;o<e;o++)a[o]=QO;return t.index++,a}function Vn(e,t){return typeof t=="function"?t(e):t}function pd(e){var t=ft();return My(t,Pe,e)}function My(e,t,a){var o=e.queue;if(o===null)throw Error(R(311));o.lastRenderedReducer=a;var n=e.baseQueue,r=o.pending;if(r!==null){if(n!==null){var l=n.next;n.next=r.next,r.next=l}t.baseQueue=n=r,o.pending=null}if(r=e.baseState,n===null)e.memoizedState=r;else{t=n.next;var s=l=null,i=null,u=t,d=!1;do{var c=u.lane&-536870913;if(c!==u.lane?(ye&c)===c:(jn&c)===c){var f=u.revertLane;if(f===0)i!==null&&(i=i.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),c===Hl&&(d=!0);else if((jn&f)===f){u=u.next,f===Hl&&(d=!0);continue}else c={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},i===null?(s=i=c,l=r):i=i.next=c,ue.lanes|=f,Kr|=f;c=u.action,Gl&&a(r,c),r=u.hasEagerState?u.eagerState:a(r,c)}else f={lane:c,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},i===null?(s=i=f,l=r):i=i.next=f,ue.lanes|=c,Kr|=c;u=u.next}while(u!==null&&u!==t);if(i===null?l=r:i.next=s,!Ha(r,e.memoizedState)&&(mt=!0,d&&(a=li,a!==null)))throw a;e.memoizedState=r,e.baseState=l,e.baseQueue=i,o.lastRenderedState=r}return n===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Nh(e){var t=ft(),a=t.queue;if(a===null)throw Error(R(311));a.lastRenderedReducer=e;var o=a.dispatch,n=a.pending,r=t.memoizedState;if(n!==null){a.pending=null;var l=n=n.next;do r=e(r,l.action),l=l.next;while(l!==n);Ha(r,t.memoizedState)||(mt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),a.lastRenderedState=r}return[r,o]}function S0(e,t,a){var o=ue,n=ft(),r=pe;if(r){if(a===void 0)throw Error(R(407));a=a()}else a=t();var l=!Ha((Pe||n).memoizedState,a);if(l&&(n.memoizedState=a,mt=!0),n=n.queue,Ny(w0.bind(null,o,n,e),[e]),e=n.getSnapshot!==t||l||dt!==null&&(dt.memoizedState.tag&1)!==0,gi(e?9:8,{destroy:void 0},C0.bind(null,o,n,a,t),null),e){if(o.flags|=2048,Ue===null)throw Error(R(349));r||(jn&127)!==0||L0(o,t,a)}return a}function L0(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ue.updateQueue,t===null?(t=up(),ue.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function C0(e,t,a,o){t.value=a,t.getSnapshot=o,I0(t)&&T0(e)}function w0(e,t,a){return a(function(){I0(t)&&T0(e)})}function I0(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ha(e,a)}catch{return!0}}function T0(e){var t=Yl(e,2);t!==null&&La(t,e,2)}function Lg(e){var t=ua();if(typeof e=="function"){var a=e;if(e=a(),Gl){kr(!0);try{a()}finally{kr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:e},t}function A0(e,t,a,o){return e.baseState=a,My(e,Pe,typeof o=="function"?o:Vn)}function y2(e,t,a,o,n){if(dp(e))throw Error(R(485));if(e=t.action,e!==null){var r={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){r.listeners.push(l)}};ee.T!==null?a(!0):r.isTransition=!1,o(r),a=t.pending,a===null?(r.next=t.pending=r,k0(t,r)):(r.next=a.next,t.pending=a.next=r)}}function k0(e,t){var a=t.action,o=t.payload,n=e.state;if(t.isTransition){var r=ee.T,l={};l.types=r!==null?r.types:null,ee.T=l;try{var s=a(n,o),i=ee.S;i!==null&&i(l,s),hL(e,t,s)}catch(u){Cg(e,t,u)}finally{r!==null&&l.types!==null&&(r.types=l.types),ee.T=r}}else try{r=a(n,o),hL(e,t,r)}catch(u){Cg(e,t,u)}}function hL(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){gL(e,t,o)},function(o){return Cg(e,t,o)}):gL(e,t,a)}function gL(e,t,a){t.status="fulfilled",t.value=a,R0(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,k0(e,a)))}function Cg(e,t,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=a,R0(t),t=t.next;while(t!==o)}e.action=null}function R0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function E0(e,t){return t}function yL(e,t){if(pe){var a=Ue.formState;if(a!==null){e:{var o=ue;if(pe){if(Ve){t:{for(var n=Ve,r=lo;n.nodeType!==8;){if(!r){n=null;break t}if(n=so(n.nextSibling),n===null){n=null;break t}}r=n.data,n=r==="F!"||r==="F"?n:null}if(n){Ve=so(n.nextSibling),o=n.data==="F!";break e}}Vr(o)}o=!1}o&&(t=a[0])}}return a=ua(),a.memoizedState=a.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:E0,lastRenderedState:t},a.queue=o,a=$0.bind(null,ue,o),o.dispatch=a,o=Lg(!1),r=zy.bind(null,ue,!1,o.queue),o=ua(),n={state:t,dispatch:null,action:e,pending:null},o.queue=n,a=y2.bind(null,ue,n,r,a),n.dispatch=a,o.memoizedState=e,[t,a,!1]}function xL(e){var t=ft();return O0(t,Pe,e)}function O0(e,t,a){if(t=My(e,t,E0)[0],e=pd(Vn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=yc(t)}catch(l){throw l===ki?ip:l}else o=t;t=ft();var n=t.queue,r=n.dispatch;return a!==t.memoizedState&&(ue.flags|=2048,gi(9,{destroy:void 0},x2.bind(null,n,a),null)),[o,r,e]}function x2(e,t){e.action=t}function bL(e){var t=ft(),a=Pe;if(a!==null)return O0(t,a,e);ft(),t=t.memoizedState,a=ft();var o=a.queue.dispatch;return a.memoizedState=e,[t,o,!1]}function gi(e,t,a,o){return e={tag:e,create:a,deps:o,inst:t,next:null},t=ue.updateQueue,t===null&&(t=up(),ue.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,t.lastEffect=e),e}function D0(){return ft().memoizedState}function md(e,t,a,o){var n=ua();ue.flags|=e,n.memoizedState=gi(1|t,{destroy:void 0},a,o===void 0?null:o)}function fp(e,t,a,o){var n=ft();o=o===void 0?null:o;var r=n.memoizedState.inst;Pe!==null&&o!==null&&Ay(o,Pe.memoizedState.deps)?n.memoizedState=gi(t,r,a,o):(ue.flags|=e,n.memoizedState=gi(1|t,r,a,o))}function vL(e,t){md(8390656,8,e,t)}function Ny(e,t){fp(2048,8,e,t)}function b2(e){ue.flags|=4;var t=ue.updateQueue;if(t===null)t=up(),ue.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function M0(e){var t=ft().memoizedState;return b2({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(R(440));return t.impl.apply(void 0,arguments)}}function N0(e,t){return fp(4,2,e,t)}function P0(e,t){return fp(4,4,e,t)}function _0(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function B0(e,t,a){a=a!=null?a.concat([e]):null,fp(4,4,_0.bind(null,t,e),a)}function Py(){}function z0(e,t){var a=ft();t=t===void 0?null:t;var o=a.memoizedState;return t!==null&&Ay(t,o[1])?o[0]:(a.memoizedState=[e,t],e)}function U0(e,t){var a=ft();t=t===void 0?null:t;var o=a.memoizedState;if(t!==null&&Ay(t,o[1]))return o[0];if(o=e(),Gl){kr(!0);try{e()}finally{kr(!1)}}return a.memoizedState=[o,t],o}function _y(e,t,a){return a===void 0||(jn&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ow(),ue.lanes|=e,Kr|=e,a)}function F0(e,t,a,o){return Ha(a,t)?a:$r.current!==null?(e=_y(e,a,o),Ha(e,t)||(mt=!0),e):(jn&106)===0||(jn&1073741824)!==0&&(ye&261930)===0?(mt=!0,e.memoizedState=a):(e=Ow(),ue.lanes|=e,Kr|=e,t)}function H0(e,t,a,o,n){var r=ke.p;ke.p=r!==0&&8>r?r:8;var l=ee.T,s={};s.types=l!==null?l.types:null,ee.T=s,zy(e,!1,t,a);try{var i=n(),u=ee.S;if(u!==null&&u(s,i),i!==null&&typeof i=="object"&&typeof i.then=="function"){var d=m2(i,o);qu(e,t,d,Fa(e))}else qu(e,t,o,Fa(e))}catch(c){qu(e,t,{then:function(){},status:"rejected",reason:c},Fa())}finally{ke.p=r,l!==null&&s.types!==null&&(l.types=s.types),ee.T=l}}function v2(){}function wg(e,t,a,o){if(e.tag!==5)throw Error(R(476));var n=q0(e).queue;H0(e,n,t,Ml,a===null?v2:function(){return G0(e),a(o)})}function q0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ml,baseState:Ml,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:Ml},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function G0(e){var t=q0(e);t.next===null&&(t=e.alternate.memoizedState),qu(e,t.next.queue,{},Fa())}function By(){return zt(Ci)}function j0(){return ft().memoizedState}function V0(){return ft().memoizedState}function S2(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Fa();e=_r(a);var o=Br(t,e,a);o!==null&&(La(o,t,a),Uu(o,t,a)),t={cache:Sy()},e.payload=t;return}t=t.return}}function L2(e,t,a){var o=Fa();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},dp(e)?X0(t,a):(a=xy(e,t,a,o),a!==null&&(La(a,e,o),K0(a,t,o)))}function $0(e,t,a){var o=Fa();qu(e,t,a,o)}function qu(e,t,a,o){var n={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(dp(e))X0(t,n);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var l=t.lastRenderedState,s=r(l,a);if(n.hasEagerState=!0,n.eagerState=s,Ha(s,l))return lp(e,t,n,0),Ue===null&&rp(),!1}catch{}if(a=xy(e,t,n,o),a!==null)return La(a,e,o),K0(a,t,o),!0}return!1}function zy(e,t,a,o){if(o={lane:2,revertLane:Yy(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},dp(e)){if(t)throw Error(R(479))}else t=xy(e,a,o,2),t!==null&&La(t,e,2)}function dp(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function X0(e,t){ii=zd=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function K0(e,t,a){if((a&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,a|=o,t.lanes=a,DC(e,a)}}var Fd={readContext:zt,use:cp,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt,useEffectEvent:nt},Y0={readContext:zt,use:cp,useCallback:function(e,t){return ua().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:vL,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,md(4194308,4,_0.bind(null,t,e),a)},useLayoutEffect:function(e,t){return md(4194308,4,e,t)},useInsertionEffect:function(e,t){md(4,2,e,t)},useMemo:function(e,t){var a=ua();t=t===void 0?null:t;var o=e();if(Gl){kr(!0);try{e()}finally{kr(!1)}}return a.memoizedState=[o,t],o},useReducer:function(e,t,a){var o=ua();if(a!==void 0){var n=a(t);if(Gl){kr(!0);try{a(t)}finally{kr(!1)}}}else n=t;return o.memoizedState=o.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=L2.bind(null,ue,e),[o.memoizedState,e]},useRef:function(e){var t=ua();return e={current:e},t.memoizedState=e},useState:function(e){e=Lg(e);var t=e.queue,a=$0.bind(null,ue,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Py,useDeferredValue:function(e,t){var a=ua();return _y(a,e,t)},useTransition:function(){var e=Lg(!1);return e=H0.bind(null,ue,e.queue,!0,!1),ua().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var o=ue,n=ua();if(pe){if(a===void 0)throw Error(R(407));a=a()}else{if(a=t(),Ue===null)throw Error(R(349));(ye&127)!==0||L0(o,t,a)}n.memoizedState=a;var r={value:a,getSnapshot:t};return n.queue=r,vL(w0.bind(null,o,r,e),[e]),o.flags|=2048,gi(9,{destroy:void 0},C0.bind(null,o,r,a,t),null),a},useId:function(){var e=ua(),t=Ue.identifierPrefix;if(pe){var a=un,o=sn;a=(o&~(1<<32-Ua(o)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ud++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=h2++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:By,useFormState:yL,useActionState:yL,useOptimistic:function(e){var t=ua();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=zy.bind(null,ue,!0,a),a.dispatch=t,[e,t]},useMemoCache:Dy,useCacheRefresh:function(){return ua().memoizedState=S2.bind(null,ue)},useEffectEvent:function(e){var t=ua(),a={impl:e};return t.memoizedState=a,function(){if((Ae&2)!==0)throw Error(R(440));return a.impl.apply(void 0,arguments)}}},Q0={readContext:zt,use:cp,useCallback:z0,useContext:zt,useEffect:Ny,useImperativeHandle:B0,useInsertionEffect:N0,useLayoutEffect:P0,useMemo:U0,useReducer:pd,useRef:D0,useState:function(){return pd(Vn)},useDebugValue:Py,useDeferredValue:function(e,t){var a=ft();return F0(a,Pe.memoizedState,e,t)},useTransition:function(){var e=pd(Vn)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:yc(e),t]},useSyncExternalStore:S0,useId:j0,useHostTransitionStatus:By,useFormState:xL,useActionState:xL,useOptimistic:function(e,t){var a=ft();return A0(a,Pe,e,t)},useMemoCache:Dy,useCacheRefresh:V0,useEffectEvent:M0},C2={readContext:zt,use:cp,useCallback:z0,useContext:zt,useEffect:Ny,useImperativeHandle:B0,useInsertionEffect:N0,useLayoutEffect:P0,useMemo:U0,useReducer:Nh,useRef:D0,useState:function(){return Nh(Vn)},useDebugValue:Py,useDeferredValue:function(e,t){var a=ft();return Pe===null?_y(a,e,t):F0(a,Pe.memoizedState,e,t)},useTransition:function(){var e=Nh(Vn)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:yc(e),t]},useSyncExternalStore:S0,useId:j0,useHostTransitionStatus:By,useFormState:bL,useActionState:bL,useOptimistic:function(e,t){var a=ft();return Pe!==null?A0(a,Pe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Dy,useCacheRefresh:V0,useEffectEvent:M0};function Ph(e,t,a,o){t=e.memoizedState,a=a(o,t),a=a==null?t:Fe({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ig={enqueueSetState:function(e,t,a){e=e._reactInternals;var o=Fa(),n=_r(o);n.payload=t,a!=null&&(n.callback=a),t=Br(e,n,o),t!==null&&(La(t,e,o),Uu(t,e,o))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var o=Fa(),n=_r(o);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=Br(e,n,o),t!==null&&(La(t,e,o),Uu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Fa(),o=_r(a);o.tag=2,t!=null&&(o.callback=t),t=Br(e,o,a),t!==null&&(La(t,e,a),Uu(t,e,a))}};function SL(e,t,a,o,n,r,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,r,l):t.prototype&&t.prototype.isPureReactComponent?!Zu(a,o)||!Zu(n,r):!0}function LL(e,t,a,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,o),t.state!==e&&Ig.enqueueReplaceState(t,t.state,null)}function jl(e,t){var a=t;if("ref"in t){a={};for(var o in t)o!=="ref"&&(a[o]=t[o])}if(e=e.defaultProps){a===t&&(a=Fe({},a));for(var n in e)a[n]===void 0&&(a[n]=e[n])}return a}function Z0(e){Ed(e)}function W0(e){console.error(e)}function J0(e){Ed(e)}function Hd(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function CL(e,t,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Tg(e,t,a){return a=_r(a),a.tag=3,a.payload={element:null},a.callback=function(){Hd(e,t)},a}function ew(e){return e=_r(e),e.tag=3,e}function tw(e,t,a,o){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var r=o.value;e.payload=function(){return n(r)},e.callback=function(){CL(t,a,o)}}var l=a.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){CL(t,a,o),typeof n!="function"&&(Fr===null?Fr=new Set([this]):Fr.add(this));var s=o.stack;this.componentDidCatch(o.value,{componentStack:s!==null?s:""})})}function w2(e,t,a,o,n){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=a.alternate,t!==null&&Ul(t,a,n,!0),a=qt.current,a!==null){switch(a.tag){case 31:case 13:case 19:return Yt===null?Yd():a.alternate===null&&rt===0&&(rt=3),a.flags&=-257,a.flags|=65536,a.lanes=n,o===Pd?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([o]):t.add(o),qh(e,o,n)),!1;case 22:return a.flags|=65536,o===Pd?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([o]):a.add(o)),qh(e,o,n)),!1}throw Error(R(435,a.tag))}return qh(e,o,n),Yd(),!1}if(pe)return t=qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,o!==mg&&(e=Error(R(422),{cause:o}),Ju(ro(e,a)))):(o!==mg&&(t=Error(R(423),{cause:o}),Ju(ro(t,a))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,o=ro(o,a),n=Tg(e.stateNode,o,n),Mh(e,n),rt!==4&&(rt=2)),!1;var r=Error(R(520),{cause:o});if(r=ro(r,a),$u===null?$u=[r]:$u.push(r),rt!==4&&(rt=2),t===null)return!0;o=ro(o,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=n&-n,a.lanes|=e,e=Tg(a.stateNode,o,e),Mh(a,e),!1;case 1:if(t=a.type,r=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Fr===null||!Fr.has(r))))return a.flags|=65536,n&=-n,a.lanes|=n,n=ew(n),tw(n,e,a,o),Mh(a,n),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var Uy=Error(R(461)),mt=!1;function yt(e,t,a,o){t.child=e===null?h0(t,null,a,o):ql(t,e.child,a,o)}function wL(e,t,a,o,n){a=a.render;var r=t.ref;if("ref"in o){var l={};for(var s in o)s!=="ref"&&(l[s]=o[s])}else l=o;return Fl(t),o=ky(e,t,a,l,r,n),s=Ry(),e!==null&&!mt?(Ey(e,t,n),$n(e,t,n)):(pe&&s&&sp(t),t.flags|=1,yt(e,t,o,n),t.child)}function IL(e,t,a,o,n){if(e===null){var r=a.type;return typeof r=="function"&&!by(r)&&r.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=r,aw(e,t,r,o,n)):(e=cd(a.type,null,o,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Hy(e,n)){var l=r.memoizedProps;if(a=a.compare,a=a!==null?a:Zu,a(l,o)&&e.ref===t.ref)return $n(e,t,n)}return t.flags|=1,e=Fn(r,o),e.ref=t.ref,e.return=t,t.child=e}function aw(e,t,a,o,n){if(e!==null){var r=e.memoizedProps;if(Zu(r,o)&&e.ref===t.ref)if(mt=!1,t.pendingProps=o=r,Hy(e,n))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,$n(e,t,n)}return Ag(e,t,a,o,n)}function ow(e,t,a,o){var n=o.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|a:a,e!==null){for(o=t.child=e.child,n=0;o!==null;)n=n|o.lanes|o.childLanes,o=o.sibling;o=n&~r}else o=0,t.child=null;return TL(e,t,r,a,o)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&dd(t,r!==null?r.cachePool:null),r!==null?mL(t,r):vg(),x0(t);else return o=t.lanes=536870912,TL(e,t,r!==null?r.baseLanes|a:a,a,o)}else r!==null?(dd(t,r.cachePool),mL(t,r),Ur(),t.memoizedState=null):(e!==null&&dd(t,null),vg(),Ur());return yt(e,t,n,a),t.child}function Gu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function TL(e,t,a,o,n){var r=Ly();return r=r===null?null:{parent:pt._currentValue,pool:r},t.memoizedState={baseLanes:a,cachePool:r},e!==null&&dd(t,null),vg(),x0(t),e!==null&&Ul(e,t,o,!0),t.childLanes=n,null}function hd(e,t){return t=pp({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function AL(e,t,a){return ql(t,e.child,null,a),e=hd(t,t.pendingProps),e.flags|=2,Na(t),t.memoizedState=null,e}function I2(e,t,a){var o=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(pe){if(o.mode==="hidden")return e=hd(t,o),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Gu(null,e);if(Sg(t),(e=Ve)?(e=oI(e,lo),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jr!==null?{id:sn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},a=i0(e),a.return=t,t.child=a,Tt=t,Ve=null)):e=null,e===null)throw Vr(t);return t.lanes=536870912,null}return hd(t,o)}var r=e.memoizedState;if(r!==null){var l=r.dehydrated;if(Sg(t),n)if(t.flags&256)t.flags&=-257,t=AL(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(R(558));else if(mt||Ul(e,t,a,!1),n=(a&e.childLanes)!==0,mt||n){if($r.current===null){if(o=Ue,o!==null&&(l=MC(o,a),l!==0&&l!==r.retryLane))throw r.retryLane=l,Yl(e,l),La(o,e,l),Uy;Yd()}t=AL(e,t,a)}else e=r.treeContext,Ve=so(l.nextSibling),Tt=t,pe=!0,Pr=null,lo=!1,e!==null&&c0(t,e),t=hd(t,o),t.flags|=134221824;return t}return e=Fn(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(R(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Ag(e,t,a,o,n){return Fl(t),a=ky(e,t,a,o,void 0,n),o=Ry(),e!==null&&!mt?(Ey(e,t,n),$n(e,t,n)):(pe&&o&&sp(t),t.flags|=1,yt(e,t,a,n),t.child)}function kL(e,t,a,o,n,r){return Fl(t),t.updateQueue=null,a=v0(t,o,a,n),b0(e),o=Ry(),e!==null&&!mt?(Ey(e,t,r),$n(e,t,r)):(pe&&o&&sp(t),t.flags|=1,yt(e,t,a,r),t.child)}function RL(e,t,a,o,n){if(Fl(t),t.stateNode===null){var r=Js,l=a.contextType;typeof l=="object"&&l!==null&&(r=zt(l)),r=new a(o,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Ig,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=o,r.state=t.memoizedState,r.refs={},wy(t),l=a.contextType,r.context=typeof l=="object"&&l!==null?zt(l):Js,r.state=t.memoizedState,l=a.getDerivedStateFromProps,typeof l=="function"&&(Ph(t,a,l,o),r.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(l=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),l!==r.state&&Ig.enqueueReplaceState(r,r.state,null),Hu(t,o,r,n),Fu(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){r=t.stateNode;var s=t.memoizedProps,i=jl(a,s);r.props=i;var u=r.context,d=a.contextType;l=Js,typeof d=="object"&&d!==null&&(l=zt(d));var c=a.getDerivedStateFromProps;d=typeof c=="function"||typeof r.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,d||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(s||u!==l)&&LL(t,r,o,l),Tr=!1;var f=t.memoizedState;r.state=f,Hu(t,o,r,n),Fu(),u=t.memoizedState,s||f!==u||Tr?(typeof c=="function"&&(Ph(t,a,c,o),u=t.memoizedState),(i=Tr||SL(t,a,i,o,f,u,l))?(d||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),r.props=o,r.state=u,r.context=l,o=i):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{r=t.stateNode,xg(e,t),l=t.memoizedProps,d=jl(a,l),r.props=d,c=t.pendingProps,f=r.context,u=a.contextType,i=Js,typeof u=="object"&&u!==null&&(i=zt(u)),s=a.getDerivedStateFromProps,(u=typeof s=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(l!==c||f!==i)&&LL(t,r,o,i),Tr=!1,f=t.memoizedState,r.state=f,Hu(t,o,r,n),Fu();var p=t.memoizedState;l!==c||f!==p||Tr||e!==null&&e.dependencies!==null&&Nd(e.dependencies)?(typeof s=="function"&&(Ph(t,a,s,o),p=t.memoizedState),(d=Tr||SL(t,a,d,o,f,p,i)||e!==null&&e.dependencies!==null&&Nd(e.dependencies))?(u||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(o,p,i),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(o,p,i)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=p),r.props=o,r.state=p,r.context=i,o=d):(typeof r.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return r=o,qs(e,t),o=(t.flags&128)!==0,r||o?(r=t.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&o?(t.child=ql(t,e.child,null,n),t.child=ql(t,null,a,n)):yt(e,t,a,n),t.memoizedState=r.state,e=t.child):e=$n(e,t,n),e}function EL(e,t,a,o){return zl(),t.flags|=256,yt(e,t,a,o),t.child}var kg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rg(e){return{baseLanes:e,cachePool:d0()}}function Eg(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=_a),e}function nw(e,t,a){var o=t.pendingProps,n=!1,r=(t.flags&128)!==0,l;if((l=r)||(l=e!==null&&e.memoizedState===null?!1:(Ft.current&2)!==0),l&&(n=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(pe){if(n?zr(t):Ur(),(e=Ve)?(e=oI(e,lo),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jr!==null?{id:sn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},a=i0(e),a.return=t,t.child=a,Tt=t,Ve=null)):e=null,e===null)throw Vr(t);return Jy(e)?t.lanes=32:t.lanes=536870912,null}return r=o.children,o=o.fallback,n?(Ur(),n=t.mode,r=pp({mode:"hidden",children:r},n),o=Nl(o,n,a,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=Rg(a),o.childLanes=Eg(e,l,a),t.memoizedState=kg,Gu(null,o)):(zr(t),Fy(t,r))}var s=e.memoizedState;if(s!==null){var i=s.dehydrated;if(i!==null)return T2(e,t,r,l,o,i,s,a)}return n?(Ur(),n=o.fallback,r=t.mode,s=e.child,i=s.sibling,o=Fn(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&1206910976,i!==null?n=Fn(i,n):(n=Nl(n,r,a,null),n.flags|=2),n.return=t,o.return=t,o.sibling=n,t.child=o,Gu(null,o),o=t.child,n=e.child.memoizedState,n===null?n=Rg(a):(r=n.cachePool,r!==null?(s=pt._currentValue,r=r.parent!==s?{parent:s,pool:s}:r):r=d0(),n={baseLanes:n.baseLanes|a,cachePool:r}),o.memoizedState=n,o.childLanes=Eg(e,l,a),t.memoizedState=kg,Gu(e.child,o)):(zr(t),a=e.child,e=a.sibling,a=Fn(a,{mode:"visible",children:o.children}),a.return=t,a.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=a,t.memoizedState=null,a)}function Fy(e,t){return t=pp({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function pp(e,t){return e=Sa(22,e,null,t),e.lanes=0,e}function Qf(e,t,a){return ql(t,e.child,null,a),e=Fy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function T2(e,t,a,o,n,r,l,s){if(a)return t.flags&256?(zr(t),t.flags&=-257,Qf(e,t,s)):t.memoizedState!==null?(Ur(),t.child=e.child,t.flags|=128,null):(Ur(),r=n.fallback,l=t.mode,n=pp({mode:"visible",children:n.children},l),r=Nl(r,l,s,null),r.flags|=2,n.return=t,r.return=t,n.sibling=r,t.child=n,ql(t,e.child,null,s),n=t.child,n.memoizedState=Rg(s),n.childLanes=Eg(e,o,s),t.memoizedState=kg,Gu(null,n));if(zr(t),Jy(r)){if(o=r.nextSibling&&r.nextSibling.dataset,o)var i=o.dgst;return o=i,o!==""&&(n=Error(R(419)),n.stack="",n.digest=o,Ju({value:n,source:null,stack:null})),Qf(e,t,s)}if(mt||Ul(e,t,s,!1),o=(s&e.childLanes)!==0,mt||o){if($r.current!==null)return Qf(e,t,s);if(o=Ue,o!==null&&(n=MC(o,s),n!==0&&n!==l.retryLane))throw l.retryLane=n,Yl(e,n),La(o,e,n),Uy;return ty(r)||Yd(),Qf(e,t,s)}return ty(r)?(t.flags|=192,t.child=e.child,null):(e=l.treeContext,Ve=so(r.nextSibling),Tt=t,pe=!0,Pr=null,lo=!1,e!==null&&c0(t,e),t=Fy(t,n.children),t.flags|=134221824,t)}function OL(e,t,a){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),fd(e.return,t,a)}function DL(e){for(var t=null;e!==null;){var a=e.alternate;a!==null&&Bd(a)===null&&(t=e),e=e.sibling}return t}function Zf(e,t,a,o,n,r){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:n,treeForkCount:r}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=a,l.tailMode=n,l.treeForkCount=r)}function _h(e){var t=e.child;for(e.child=null;t!==null;){var a=t.sibling;t.sibling=e.child,e.child=t,t=a}}function Og(e,t,a){var o=t.pendingProps,n=o.revealOrder,r=o.tail;o=o.children;var l=Ft.current;if(t.flags&128)return tc(t,l),null;var s=(l&2)!==0;if(s?(l=l&1|2,t.flags|=128):l&=1,tc(t,l),n==="backwards"&&e!==null?(_h(e),yt(e,t,o,a),_h(e)):yt(e,t,o,a),o=pe?Wu:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&OL(e,a,t);else if(e.tag===19)OL(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"backwards":a=DL(t.child),a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null,_h(t)),Zf(t,!0,n,null,r,o);break;case"unstable_legacy-backwards":for(a=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Bd(e)===null){t.child=n;break}e=n.sibling,n.sibling=a,a=n,n=e}Zf(t,!0,a,null,r,o);break;case"together":Zf(t,!1,null,null,void 0,o);break;case"independent":t.memoizedState=null;break;default:a=DL(t.child),a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null),Zf(t,!1,n,a,r,o)}return t.child}function ML(e,t,a){var o=t.pendingProps;return Er(t,t.type,o.value),yt(e,t,o.children,a),t.child}function $n(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Kr|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ul(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,a=Fn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Fn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Hy(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Nd(e)))}function A2(e,t,a){switch(t.tag){case 3:Td(t,t.stateNode.containerInfo),Er(t,pt,e.memoizedState.cache),zl();break;case 27:case 5:ng(t);break;case 4:Td(t,t.stateNode.containerInfo);break;case 10:Er(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sg(t),null;break;case 13:var o=t.memoizedState;if(o!==null){if(o.dehydrated!==null)return zr(t),t.flags|=128,null;o=Ul(e,t,a,!1);var n=t.child.childLanes;return o||(a&n)!==0?nw(e,t,a):(zr(t),e=$n(e,t,a),e!==null?e.sibling:null)}zr(t);break;case 19:if(t.flags&128)return Og(e,t,a);if(n=(e.flags&128)!==0,o=(a&t.childLanes)!==0,o||(Ul(e,t,a,!1),o=(a&t.childLanes)!==0),n){if(o)return Og(e,t,a);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),tc(t,Ft.current),o)break;return null;case 22:return t.lanes=0,ow(e,t,a,t.pendingProps);case 24:Er(t,pt,e.memoizedState.cache)}return $n(e,t,a)}function rw(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!Hy(e,a)&&(t.flags&128)===0)return mt=!1,A2(e,t,a);mt=(e.flags&131072)!==0}else mt=!1,pe&&(t.flags&1048576)!==0&&u0(t,Wu,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Rl(t.elementType),t.type=e,typeof e=="function")by(e)?(o=jl(e,o),t.tag=1,t=RL(null,t,e,o,a)):(t.tag=0,t=Ag(null,t,e,o,a));else{if(e!=null){var n=e.$$typeof;if(n===ly){t.tag=11,t=wL(null,t,e,o,a);break e}else if(n===sy){t.tag=14,t=IL(null,t,e,o,a);break e}else if(n===rn){t.tag=10,t.type=e,t=ML(null,t,a);break e}}throw t=ag(e)||e,Error(R(306,t,""))}}return t;case 0:return Ag(e,t,t.type,t.pendingProps,a);case 1:return o=t.type,n=jl(o,t.pendingProps),RL(e,t,o,n,a);case 3:e:{if(Td(t,t.stateNode.containerInfo),e===null)throw Error(R(387));o=t.pendingProps;var r=t.memoizedState;n=r.element,xg(e,t),Hu(t,o,null,a);var l=t.memoizedState;if(o=l.cache,Er(t,pt,o),o!==r.cache&&gg(t,[pt],a,!0),Fu(),o=l.element,r.isDehydrated)if(r={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=EL(e,t,o,a);break e}else if(o!==n){n=ro(Error(R(424)),t),Ju(n),t=EL(e,t,o,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ve=so(e.firstChild),Tt=t,pe=!0,Pr=null,lo=!0,a=h0(t,null,o,a),t.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling;else{if(zl(),o===n){t=$n(e,t,a);break e}yt(e,t,o,a)}t=t.child}return t;case 26:return qs(e,t),e===null?(a=lC(t.type,null,t.pendingProps,null))?t.memoizedState=a:pe||(t.stateNode=Kw(t.type,t.pendingProps,Nr.current,t)):t.memoizedState=lC(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ng(t),e===null&&pe&&(o=t.stateNode=nI(t.type,t.pendingProps,Nr.current),Tt=t,lo=!0,n=Ve,Qr(t.type)?(ay=n,Ve=so(o.firstChild)):Ve=n),yt(e,t,t.pendingProps.children,a),qs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&pe&&((n=o=Ve)&&(o=bM(o,t.type,t.pendingProps,lo),o!==null?(t.stateNode=o,Tt=t,Ve=so(o.firstChild),lo=!1,n=!0):n=!1),n||Vr(t)),ng(t),n=t.type,r=t.pendingProps,l=e!==null?e.memoizedProps:null,o=r.children,Wg(n,r)?o=null:l!==null&&Wg(n,l)&&(t.flags|=32),t.memoizedState!==null&&(n=ky(e,t,g2,null,null,a),Ci._currentValue=n),qs(e,t),yt(e,t,o,a),t.child;case 6:return e===null&&pe&&((e=a=Ve)&&(a=vM(a,t.pendingProps,lo),a!==null?(t.stateNode=a,Tt=t,Ve=null,e=!0):e=!1),e||Vr(t)),null;case 13:return nw(e,t,a);case 4:return Td(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ql(t,null,o,a):yt(e,t,o,a),t.child;case 11:return wL(e,t,t.type,t.pendingProps,a);case 7:return o=t.pendingProps,qs(e,t),yt(e,t,o,a),t.child;case 8:return yt(e,t,t.pendingProps.children,a),t.child;case 12:return yt(e,t,t.pendingProps.children,a),t.child;case 10:return ML(e,t,a);case 9:return n=t.type._context,o=t.pendingProps.children,Fl(t),n=zt(n),o=o(n),t.flags|=1,yt(e,t,o,a),t.child;case 14:return IL(e,t,t.type,t.pendingProps,a);case 15:return aw(e,t,t.type,t.pendingProps,a);case 19:return Og(e,t,a);case 31:return I2(e,t,a);case 22:return ow(e,t,a,t.pendingProps);case 24:return Fl(t),o=zt(pt),e===null?(n=Ly(),n===null&&(n=Ue,r=Sy(),n.pooledCache=r,r.refCount++,r!==null&&(n.pooledCacheLanes|=a),n=r),t.memoizedState={parent:o,cache:n},wy(t),Er(t,pt,n)):((e.lanes&a)!==0&&(xg(e,t),Hu(t,null,null,a),Fu()),n=e.memoizedState,r=t.memoizedState,n.parent!==o?(n={parent:o,cache:o},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Er(t,pt,o)):(o=r.cache,Er(t,pt,o),o!==n.cache&&gg(t,[pt],a,!0))),yt(e,t,t.pendingProps.children,a),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),o=t.pendingProps,o.name!=null&&o.name!=="auto"?t.flags|=e===null?18882560:18874368:pe&&sp(t),e!==null&&e.memoizedProps.name!==o.name?t.flags|=4194816:qs(e,t),yt(e,t,o.children,a),t.child;case 29:throw t.pendingProps}throw Error(R(156,t.tag))}function Bn(e){e.flags|=4}function Bh(e,t,a,o,n){var r;if((r=(e.mode&32)!==0)&&(r=a===null?uC(t,o):uC(t,o)&&(o.src!==a.src||o.srcSet!==a.srcSet)),r){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Nw())e.flags|=8192;else throw _l=Pd,Cy}else e.flags&=-16777217}function NL(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!iI(t))if(Nw())e.flags|=8192;else throw _l=Pd,Cy}function Wf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?EC():536870912,e.lanes|=t,yi|=t)}function Tu(e,t){if(!pe)switch(e.tailMode){case"visible":break;case"collapsed":for(var a=e.tail,o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null;break;default:for(t=e.tail,a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null}}function je(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(t)for(var n=e.child;n!==null;)a|=n.lanes|n.childLanes,o|=n.subtreeFlags&1206910976,o|=n.flags&1206910976,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)a|=n.lanes|n.childLanes,o|=n.subtreeFlags,o|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=o,e.childLanes=a,t}function k2(e,t,a){var o=t.pendingProps;switch(vy(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return je(t),null;case 1:return je(t),null;case 3:return a=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Hn(pt),pi(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Fs(t)?Bn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dh())),je(t),null;case 26:var n=t.type,r=t.memoizedState;return e===null?(Bn(t),r!==null?(je(t),NL(t,r)):(je(t),Bh(t,n,null,o,a))):r?r!==e.memoizedState?(Bn(t),je(t),NL(t,r)):(je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&Bn(t),je(t),Bh(t,n,e,o,a)),null;case 27:if(Ad(t),a=Nr.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Bn(t);else{if(!o){if(t.stateNode===null)throw Error(R(166));return je(t),t.subtreeFlags&=-33554433,null}e=cn.current,Fs(t)?sL(t,e):(e=nI(n,o,a),t.stateNode=e,Bn(t))}return je(t),t.subtreeFlags&=-33554433,null;case 5:if(Ad(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Bn(t);else{if(!o){if(t.stateNode===null)throw Error(R(166));return je(t),t.subtreeFlags&=-33554433,null}if(r=cn.current,Fs(t))sL(t,r);else{var l=rc(Nr.current);switch(r){case 1:r=l.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:r=l.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":r=l.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":r=l.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":r=l.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?r.multiple=!0:o.size&&(r.size=o.size);break;default:r=typeof o.is=="string"?l.createElement(n,{is:o.is}):l.createElement(n)}}r[Bt]=t,r[wa]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)r.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=r;e:switch(Ht(r,n,o),n){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Bn(t)}}return je(t),t.subtreeFlags&=-33554433,Bh(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&Bn(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(R(166));if(e=Nr.current,Fs(t)){if(e=t.stateNode,a=t.memoizedProps,o=null,n=Tt,n!==null)switch(n.tag){case 27:case 5:o=n.memoizedProps}e[Bt]=t,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||$w(e.nodeValue,a)),e||Vr(t,!0)}else e=rc(e).createTextNode(o),e[Bt]=t,t.stateNode=e}return je(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(o=Fs(t),a!==null){if(e===null){if(!o)throw Error(R(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(557));e[Bt]=t}else zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;je(t),e=!1}else a=Dh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Na(t),t):(Na(t),null);if((t.flags&128)!==0)throw Error(R(558))}return je(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Fs(t),o!==null&&o.dehydrated!==null){if(e===null){if(!n)throw Error(R(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(R(317));n[Bt]=t}else zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;je(t),n=!1}else n=Dh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Na(t),t):(Na(t),null)}return Na(t),(t.flags&128)!==0?(t.lanes=a,t):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=t.child,n=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(n=o.alternate.memoizedState.cachePool.pool),r=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(r=o.memoizedState.cachePool.pool),r!==n&&(o.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Wf(t,t.updateQueue),je(t),null);case 4:return pi(),e===null&&Qy(t.stateNode.containerInfo),t.flags|=67108864,je(t),null;case 10:return Hn(t.type),je(t),null;case 19:if(Ty(t),o=t.memoizedState,o===null)return je(t),null;if(n=(t.flags&128)!==0,r=o.rendering,r===null)if(n)Tu(o,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Bd(e),r!==null){for(t.flags|=128,Tu(o,!1),e=r.updateQueue,t.updateQueue=e,Wf(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)s0(a,e),a=a.sibling;return tc(t,Ft.current&1|2),pe&&zn(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Ba()>Xd&&(t.flags|=128,n=!0,Tu(o,!1),t.lanes=4194304)}else{if(!n)if(e=Bd(r),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Wf(t,e),Tu(o,!0),o.tail===null&&o.tailMode!=="collapsed"&&o.tailMode!=="visible"&&!r.alternate&&!pe)return je(t),null}else 2*Ba()-o.renderingStartTime>Xd&&a!==536870912&&(t.flags|=128,n=!0,Tu(o,!1),t.lanes=4194304);o.isBackwards?(r.sibling=t.child,t.child=r):(e=o.last,e!==null?e.sibling=r:t.child=r,o.last=r)}if(o.tail!==null){e=o.tail;e:{for(a=e;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Ba(),e.sibling=null,r=Ft.current,r=n?r&1|2:r&1,o.tailMode==="visible"||o.tailMode==="collapsed"||!a||pe?tc(t,r):(a=r,$e(qt,t),$e(Ft,a),Yt===null&&(Yt=t)),pe&&zn(t,o.treeForkCount),e}return je(t),null;case 22:case 23:return Na(t),Iy(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(a&536870912)!==0&&(t.flags&128)===0&&(je(t),t.subtreeFlags&6&&(t.flags|=8192)):je(t),a=t.updateQueue,a!==null&&Wf(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==a&&(t.flags|=2048),e!==null&&Ut(Pl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Hn(pt),je(t),null;case 25:return null;case 30:return t.flags|=33554432,je(t),null}throw Error(R(156,t.tag))}function R2(e,t){switch(vy(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hn(pt),pi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ad(t),null;case 31:if(t.memoizedState!==null){if(Na(t),t.alternate===null)throw Error(R(340));zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Na(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ty(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return pi(),null;case 10:return Hn(t.type),null;case 22:case 23:return Na(t),Iy(),e!==null&&Ut(Pl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hn(pt),null;case 25:return null;default:return null}}function lw(e,t){switch(vy(t),t.tag){case 3:Hn(pt),pi();break;case 26:case 27:case 5:Ad(t);break;case 4:pi();break;case 31:t.memoizedState!==null&&Na(t);break;case 13:Na(t);break;case 19:Ty(t);break;case 10:Hn(t.type);break;case 22:case 23:Na(t),Iy(),e!==null&&Ut(Pl);break;case 24:Hn(pt)}}function xc(e,t){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var n=o.next;a=n;do{if((a.tag&e)===e){o=void 0;var r=a.create,l=a.inst;o=r(),l.destroy=o}a=a.next}while(a!==n)}}catch(s){Ne(t,t.return,s)}}function Xr(e,t,a){try{var o=t.updateQueue,n=o!==null?o.lastEffect:null;if(n!==null){var r=n.next;o=r;do{if((o.tag&e)===e){var l=o.inst,s=l.destroy;if(s!==void 0){l.destroy=void 0,n=t;var i=a,u=s;try{u()}catch(d){Ne(n,i,d)}}}o=o.next}while(o!==r)}}catch(d){Ne(t,t.return,d)}}function sw(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{y0(t,a)}catch(o){Ne(e,e.return,o)}}}function iw(e,t,a){a.props=jl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){Ne(e,t,o)}}function on(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:var n=e.stateNode,r=Gn(e.memoizedProps,n);(n.ref===null||n.ref.name!==r)&&(n.ref=Ww(r)),o=n.ref;break;case 7:if(e.stateNode===null){var l=new qa(e);Ca(e.child,!1,yM,l,void 0,void 0),e.stateNode=l}o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(s){Ne(e,t,s)}}function _t(e,t){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(n){Ne(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Ne(e,t,n)}else a.current=null}function qd(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var a=0;a<t.length;a++)aI(e.stateNode,t[a])}function PL(e){for(var t=e.return;t!==null&&(Gy(t)&&aI(e.stateNode,t.stateNode),!qy(t));)t=t.return}function ju(e){for(var t=e.return;t!==null&&(Gy(t)&&xM(e.stateNode,t.stateNode),!qy(t));)t=t.return}function qy(e){return e.tag===5||e.tag===3||e.tag===27}function Gy(e){return e&&e.tag===7&&e.stateNode!==null}function Dg(e){var t=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(n){Ne(e,e.return,n)}}function zh(e,t,a){try{var o=e.stateNode;J2(o,e.type,a,t),o[wa]=t}catch(n){Ne(e,e.return,n)}}function uw(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qr(e.type)||e.tag===4}function Uh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mg(e,t,a,o){var n=e.tag;if(n===5||n===6)n=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(n),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ln)),qd(e,o),Le=!0;else if(n!==4&&(n===27&&(qd(e,o),o=null,Qr(e.type)&&(a=e.stateNode,t=null)),e=e.child,e!==null))for(Mg(e,t,a,o),e=e.sibling;e!==null;)Mg(e,t,a,o),e=e.sibling}function Gd(e,t,a,o){var n=e.tag;if(n===5||n===6)n=e.stateNode,t?a.insertBefore(n,t):a.appendChild(n),qd(e,o),Le=!0;else if(n!==4&&(n===27&&(qd(e,o),o=null,Qr(e.type)&&(a=e.stateNode)),e=e.child,e!==null))for(Gd(e,t,a,o),e=e.sibling;e!==null;)Gd(e,t,a,o),e=e.sibling}function cw(e){var t=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ht(t,o,a),t[Bt]=e,t[wa]=a}catch(r){Ne(e,e.return,r)}}var jd=!1,Pa=null;function _L(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(jd=!0)}var nn=null;function BL(){var e=nn;return nn=null,e}var va=0;function Ri(e,t,a,o,n){return va=0,fw(e.child,t,a,o,n)}function fw(e,t,a,o,n){for(var r=!1;e!==null;){if(e.tag===5){var l=e.stateNode;if(o!==null){var s=Jg(l);o.push(s),s.view&&(r=!0)}else r||Jg(l).view&&(r=!0);jd=!0,Yw(l,va===0?t:t+"_"+va,a),va++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&n||fw(e.child,t,a,o,n)&&(r=!0));e=e.sibling}return r}function dn(e,t){for(;e!==null;)e.tag===5?Qw(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||dn(e.child,t)),e=e.sibling}function gd(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(gd(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(R(544));var a=t.name;t=Yn(t.default,t.share),t!=="none"&&(Ri(e,a,t,null,!1)||dn(e.child,!1))}e=e.sibling}}function Ng(e,t){if(e.tag===30){var a=e.stateNode,o=e.memoizedProps,n=Gn(o,a),r=Yn(o.default,a.paired?o.share:o.enter);r!=="none"?Ri(e,n,r,null,!1)?(gd(e),a.paired||t||xi(e,o.onEnter)):dn(e.child,!1):gd(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ng(e,t),e=e.sibling;else gd(e)}function Pg(e){if(Pa!==null&&Pa.size!==0){var t=Pa;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var a=e.memoizedProps,o=a.name;if(o!=null&&o!=="auto"){var n=t.get(o);if(n!==void 0){var r=Yn(a.default,a.share);if(r!=="none"&&(Ri(e,o,r,null,!1)?(r=e.stateNode,n.paired=r,r.paired=n,xi(e,a.onShare)):dn(e.child,!1)),t.delete(o),t.size===0)break}}}Pg(e)}e=e.sibling}}}function _g(e){if(e.tag===30){var t=e.memoizedProps,a=Gn(t,e.stateNode),o=Pa!==null?Pa.get(a):void 0,n=Yn(t.default,o!==void 0?t.share:t.exit);n!=="none"&&(Ri(e,a,n,null,!1)?o!==void 0?(n=e.stateNode,o.paired=n,n.paired=o,Pa.delete(a),xi(e,t.onShare)):xi(e,t.onExit):dn(e.child,!1)),Pa!==null&&Pg(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)_g(e),e=e.sibling;else Pa!==null&&Pg(e)}function dw(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,a=Gn(t,e.stateNode);t=Yn(t.default,t.update),e.flags&=-5,t!=="none"&&Ri(e,a,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&dw(e);e=e.sibling}}function Bg(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,dn(e.child,!1))}Bg(e)}e=e.sibling}}function yd(e){if(e.tag===30)e.stateNode.paired=null,dn(e.child,!1),Bg(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)yd(e),e=e.sibling;else Bg(e)}function pw(e){for(e=e.child;e!==null;)e.tag===30?dn(e.child,!1):(e.subtreeFlags&33554432)!==0&&pw(e),e=e.sibling}function jy(e,t,a,o,n,r,l){for(var s=!1;t!==null;){if(t.tag===5){var i=t.stateNode;if(r!==null&&va<r.length){var u=r[va],d=Jg(i);(u.view||d.view)&&(s=!0);var c;if(c=(e.flags&4)===0)if(d.clip)c=!0;else{c=u.rect;var f=d.rect;c=c.y!==f.y||c.x!==f.x||c.height!==f.height||c.width!==f.width}c&&(e.flags|=4),d.abs?d=!u.abs:(u=u.rect,d=d.rect,d=u.height!==d.height||u.width!==d.width),d&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Yw(i,va===0?a:a+"_"+va,n),s&&(e.flags&4)!==0||(nn===null&&(nn=[]),nn.push(i,va===0?o:o+"_"+va,t.memoizedProps)),va++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&l?e.flags|=t.flags&32:jy(e,t.child,a,o,n,r,l)&&(s=!0));t=t.sibling}return s}function mw(e,t){for(e=e.child;e!==null;){if(e.tag===30){var a=e.memoizedProps,o=e.stateNode,n=Gn(a,o),r=Yn(a.default,a.update);if(t){o=o.clones;var l=o===null?null:o.map(rM)}else l=e.memoizedState,e.memoizedState=null;o=e;var s=e.child;va=0,n=jy(o,s,n,n,r,l,!1),(e.flags&4)!==0&&n&&(t||xi(e,a.onUpdate))}else(e.subtreeFlags&33554432)!==0&&mw(e,t);e=e.sibling}}var Ct=!1,Ee=!1,en=!1,Fh=!1,zL=typeof WeakSet=="function"?WeakSet:Set,wt=null,tn=!1,Nu=!1,Vd=!1,zg=!1;function E2(e,t,a){if(e=e.containerInfo,Qg=wi,e=JC(e),gy(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var n=o.getSelection&&o.getSelection();if(n&&n.rangeCount!==0){o=n.anchorNode;var r=n.anchorOffset,l=n.focusNode;n=n.focusOffset;try{o.nodeType,l.nodeType}catch{o=null;break e}var s=0,i=-1,u=-1,d=0,c=0,f=e,p=null;t:for(;;){for(var x;f!==o||r!==0&&f.nodeType!==3||(i=s+r),f!==l||n!==0&&f.nodeType!==3||(u=s+n),f.nodeType===3&&(s+=f.nodeValue.length),(x=f.firstChild)!==null;)p=f,f=x;for(;;){if(f===e)break t;if(p===o&&++d===r&&(i=s),p===l&&++c===n&&(u=s),(x=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=x}o=i===-1||u===-1?null:{start:i,end:u}}else o=null}o=o||{start:0,end:0}}else o=null;for(Zg={focusedElem:e,selectionRange:o},wi=!1,a=(a&335544064)===a,wt=t,t=a?9270:1024;wt!==null;){if(e=wt,a&&(o=e.deletions,o!==null))for(r=0;r<o.length;r++)a&&_g(o[r]);if(e.alternate===null&&(e.flags&2)!==0)a&&_L(e),Jf(a);else{if(e.tag===22){if(o=e.alternate,e.memoizedState!==null){o!==null&&o.memoizedState===null&&a&&_g(o),Jf(a);continue}else if(o!==null&&o.memoizedState!==null){a&&_L(e),Jf(a);continue}}o=e.child,(e.subtreeFlags&t)!==0&&o!==null?(o.return=e,wt=o):(a&&dw(e),Jf(a))}}Pa=null}function Jf(e){for(;wt!==null;){var t=wt,a=e,o=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((n&1024)!==0&&o!==null){a=void 0,n=o.memoizedProps,o=o.memoizedState;var r=t.stateNode;try{var l=jl(t.type,n);a=r.getSnapshotBeforeUpdate(l,o),r.__reactInternalSnapshotBeforeUpdate=a}catch(s){Ne(t,t.return,s)}}break;case 3:if((n&1024)!==0){if(o=t.stateNode.containerInfo,a=o.nodeType,a===9)ey(o);else if(a===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":ey(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&o!==null&&(a=Gn(o.memoizedProps,o.stateNode),n=t.memoizedProps,n=Yn(n.default,n.update),n!=="none"&&Ri(o,a,n,o.memoizedState=[],!0));break;default:if((n&1024)!==0)throw Error(R(163))}if(o=t.sibling,o!==null){o.return=t.return,wt=o;break}wt=t.return}}function hw(e,t,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:an(e,a),o&4&&xc(5,a);break;case 1:if(an(e,a),o&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(l){Ne(a,a.return,l)}else{var n=jl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Ne(a,a.return,l)}}o&64&&sw(a),o&512&&on(a,a.return);break;case 3:if(an(e,a),o&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{y0(e,t)}catch(l){Ne(a,a.return,l)}}break;case 27:t===null&&o&4&&cw(a);case 26:case 5:an(e,a),t===null&&o&4&&Dg(a),o&512&&on(a,a.return);break;case 12:an(e,a);break;case 31:an(e,a),o&4&&bw(e,a);break;case 13:an(e,a),o&4&&vw(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=q2.bind(null,a),SM(e,a))));break;case 22:if(o=a.memoizedState!==null||Ct,!o){var r=t!==null&&t.memoizedState!==null||Ee;t=Ct,n=Ee,Ct=o,(Ee=r)&&!n?(o=2,(a.subtreeFlags&8772)!==0&&(o|=1),Lo(e,a,o)):an(e,a),Ct=t,Ee=n}break;case 30:an(e,a),o&512&&on(a,a.return);break;case 7:o&512&&on(a,a.return);default:an(e,a)}}function Ug(e,t){for(e=e.child;e!==null;)gw(e,t),e=e.sibling}function gw(e,t){switch(e.tag){case 5:case 26:try{var a=e.stateNode;if(t){var o=a.style;typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"}else{var n=e.stateNode,r=e.memoizedProps.style,l=r!=null&&r.hasOwnProperty("display")?r.display:null;n.style.display=l==null||typeof l=="boolean"?"":(""+l).trim()}}catch(i){Ne(e,e.return,i)}Fg(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Le=!0}catch(i){Ne(e,e.return,i)}break;case 18:try{var s=e.stateNode;t?eC(s,!0):eC(e.stateNode,!1)}catch(i){Ne(e,e.return,i)}break;case 22:case 23:e.memoizedState===null&&Ug(e,t);break;default:Ug(e,t)}}function Fg(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var a=e,o=t;switch(a.tag){case 4:gw(a,o);break e;case 22:a.memoizedState===null&&Fg(a,o);break e;default:Fg(a,o)}}e=e.sibling}}function yw(e){var t=e.alternate;t!==null&&(e.alternate=null,yw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var We=null,xa=!1;function So(e,t,a){for(a=a.child;a!==null;)xw(e,t,a),a=a.sibling}function xw(e,t,a){if(za&&typeof za.onCommitFiberUnmount=="function")try{za.onCommitFiberUnmount(fc,a)}catch{}switch(a.tag){case 26:Ee||_t(a,t),So(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!Ee&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ee||_t(a,t),ju(a);var o=We,n=xa;Qr(a.type)&&(We=a.stateNode,xa=!1),So(e,t,a),rI(a.stateNode,a.type,a.memoizedProps),We=o,xa=n;break;case 5:Ee||_t(a,t),ju(a);case 6:if(a.tag===6&&ju(a),o=We,n=xa,We=null,So(e,t,a),We=o,xa=n,We!==null)if(xa)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(a.stateNode),Le=!0}catch(r){Ne(a,t,r)}else try{We.removeChild(a.stateNode),Le=!0}catch(r){Ne(a,t,r)}break;case 18:We!==null&&(xa?(e=We,JL(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ii(e)):JL(We,a.stateNode));break;case 4:o=We,n=xa,We=a.stateNode.containerInfo,xa=!0,So(e,t,a),We=o,xa=n;break;case 0:case 11:case 14:case 15:Xr(2,a,t),Ee||Xr(4,a,t),So(e,t,a);break;case 1:Ee||(_t(a,t),o=a.stateNode,typeof o.componentWillUnmount=="function"&&iw(a,t,o)),So(e,t,a);break;case 21:So(e,t,a);break;case 22:Ee=(o=Ee)||a.memoizedState!==null,So(e,t,a),Ee=o;break;case 30:_t(a,t),So(e,t,a);break;case 7:Ee||_t(a,t),So(e,t,a);break;default:So(e,t,a)}}function bw(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ii(e)}catch(a){Ne(t,t.return,a)}}}function vw(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ii(e)}catch(a){Ne(t,t.return,a)}}function O2(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zL),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zL),t;default:throw Error(R(435,e.tag))}}function ed(e,t){var a=O2(e);t.forEach(function(o){if(!a.has(o)){a.add(o);var n=G2.bind(null,e,o);o.then(n,n)}})}function sa(e,t,a){var o=t.deletions;if(o!==null)for(var n=0;n<o.length;n++){var r=o[n],l=e,s=t,i=s;e:for(;i!==null;){switch(i.tag){case 27:if(Qr(i.type)){We=i.stateNode,xa=!1;break e}break;case 5:We=i.stateNode,xa=!1;break e;case 3:case 4:We=i.stateNode.containerInfo,xa=!0;break e}i=i.return}if(We===null)throw Error(R(160));xw(l,s,r),We=null,xa=!1,l=r.alternate,l!==null&&(l.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sw(t,e,a),t=t.sibling}var Co=null;function Sw(e,t,a){var o=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(n&4&&(o=e.updateQueue,o=o!==null?o.events:null,o!==null))for(var r=0;r<o.length;r++){var l=o[r];l.ref.impl=l.nextImpl}sa(t,e,a),ia(e),n&4&&(Xr(3,e,e.return),xc(3,e),Xr(5,e,e.return));break;case 1:sa(t,e,a),ia(e),n&512&&(Ee||o===null||_t(o,o.return)),n&64&&Ct&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?t:a.concat(t))));break;case 26:if(r=Co,sa(t,e,a),ia(e),n&512&&(Ee||o===null||_t(o,o.return)),n&4)if(n=o!==null?o.memoizedState:null,a=e.memoizedState,o===null)if(a===null)if(e.stateNode===null)if(Ct)e.stateNode=Kw(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,a=e.memoizedProps,n=r.ownerDocument||r;t:switch(t){case"title":o=n.getElementsByTagName("title")[0],(!o||o[mc]||o[Bt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=n.createElement(t),n.head.insertBefore(o,n.querySelector("head > title"))),Ht(o,t,a),o[Bt]=e,It(o),t=o;break e;case"link":if(r=iC("link","href",n).get(t+(a.href||""))){for(l=0;l<r.length;l++)if(o=r[l],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){r.splice(l,1);break t}}o=n.createElement(t),Ht(o,t,a),n.head.appendChild(o);break;case"meta":if(r=iC("meta","content",n).get(t+(a.content||""))){for(l=0;l<r.length;l++)if(o=r[l],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){r.splice(l,1);break t}}o=n.createElement(t),Ht(o,t,a),n.head.appendChild(o);break;default:throw Error(R(468,t))}o[Bt]=e,It(o),t=o}e.stateNode=t}else Ct||oy(r,e.type,e.stateNode);else e.stateNode=sC(r,a,e.memoizedProps);else n!==a?(n===null?(t=o.stateNode,t===null||Ee||t.parentNode.removeChild(t)):n.count--,a===null?Ct||oy(r,e.type,e.stateNode):sC(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&zh(e,e.memoizedProps,o.memoizedProps);break;case 27:sa(t,e,a),ia(e),n&512&&(Ee||o===null||_t(o,o.return)),o!==null&&n&4&&zh(e,e.memoizedProps,o.memoizedProps);break;case 5:if(r=en,en=!1,sa(t,e,a),en=r,ia(e),n&512&&(Ee||o===null||_t(o,o.return)),e.flags&32){t=e.stateNode;try{hi(t,""),Le=!0}catch(d){Ne(e,e.return,d)}}n&4&&e.stateNode!=null&&(t=e.memoizedProps,zh(e,t,o!==null?o.memoizedProps:t)),n&1024&&(Fh=!0);break;case 6:if(sa(t,e,a),ia(e),n&4){if(e.stateNode===null)throw Error(R(162));t=e.memoizedProps,a=e.stateNode;try{a.nodeValue=t,Le=!0}catch(d){Ne(e,e.return,d)}}break;case 3:if(Le=!1,Sd=null,r=Co,Co=lc(t.containerInfo),sa(t,e,a),Co=r,ia(e),n&4&&o!==null&&o.memoizedState.isDehydrated)try{Ii(t.containerInfo)}catch(d){Ne(e,e.return,d)}Fh&&(Fh=!1,Lw(e)),Le=!1;break;case 4:n=en,en=Ct,o=jS(),r=Co,Co=lc(e.stateNode.containerInfo),sa(t,e,a),ia(e),Co=r,Le&&Nu&&(Vd=!0),Le=o,en=n;break;case 12:sa(t,e,a),ia(e);break;case 31:sa(t,e,a),ia(e),n&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ed(e,t)));break;case 13:sa(t,e,a),ia(e),e.child.flags&8192&&e.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(mp=Ba()),n&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ed(e,t)));break;case 22:r=e.memoizedState!==null,l=o!==null&&o.memoizedState!==null;var s=Ct,i=Ee,u=en;Ct=s||r,en=u||r,Ee=i||l,sa(t,e,a),Ee=i,en=u,Ct=s,ia(e),n&8192&&(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,!r||o===null||l||Ct||Ee||(t=l||Ee,a=Ct,o=Ee,Ct=r||Ct,Ee=t,wr(e,2),Ct=a,Ee=o),!r&&en||Ug(e,r)),n&4&&(t=e.updateQueue,t!==null&&(a=t.retryQueue,a!==null&&(t.retryQueue=null,ed(e,a))));break;case 19:sa(t,e,a),ia(e),n&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ed(e,t)));break;case 30:n&512&&(Ee||o===null||_t(o,o.return)),n=jS(),r=Nu,l=(a&335544064)===a,s=e.memoizedProps,Nu=l&&Yn(s.default,s.update)!=="none",sa(t,e,a),ia(e),l&&o!==null&&Le&&(e.flags|=4),Nu=r,Le=n;break;case 21:break;case 7:n&512&&(Ee||o===null||_t(o,o.return)),o&&o.stateNode!==null&&(o.stateNode._fragmentFiber=e);default:sa(t,e,a),ia(e)}}function ia(e){var t=e.flags;if(t&2){try{for(var a,o=e.return;o!==null;){if(uw(o)){a=o;break}o=o.return}o=null;for(var n=e.return;n!==null;){if(Gy(n)){var r=n.stateNode;o===null?o=[r]:o.push(r)}if(qy(n))break;n=n.return}var l=o;if(a==null)throw Error(R(160));switch(a.tag){case 27:var s=a.stateNode,i=Uh(e);Gd(e,i,s,l);break;case 5:var u=a.stateNode;a.flags&32&&(hi(u,""),a.flags&=-33);var d=Uh(e);Gd(e,d,u,l);break;case 3:case 4:var c=a.stateNode.containerInfo,f=Uh(e);Mg(e,f,c,l);break;default:throw Error(R(161))}}catch(p){Ne(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lw(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Lw(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,wi=!0,t.reset(),wi=!1),e=e.sibling}}function Hs(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Cw(t,e),t=t.sibling;else mw(t,!1)}function Cw(e,t){var a=e.alternate;if(a===null)Ng(e,!1);else switch(e.tag){case 3:if(zg=tn=!1,BL(),Hs(t,e),!tn&&!Vd){if(e=nn,e!==null)for(var o=0;o<e.length;o+=3){a=e[o];var n=e[o+1];Qw(a,e[o+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+n+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),zg=!0}nn=null;break;case 5:Hs(t,e);break;case 4:o=tn,tn=!1,Hs(t,e),tn&&(Vd=!0),tn=o;break;case 22:e.memoizedState===null&&(a.memoizedState!==null?Ng(e,!1):Hs(t,e));break;case 30:o=tn,n=BL(),tn=!1,Hs(t,e),tn&&(e.flags|=4);var r=e.memoizedProps,l=e.stateNode;t=Gn(r,l),l=Gn(a.memoizedProps,l);var s=Yn(r.default,r.update);s==="none"?t=!1:(r=a.memoizedState,a.memoizedState=null,a=e.child,va=0,t=jy(e,a,t,l,s,r,!0),va!==(r===null?0:r.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(xi(e,e.memoizedProps.onUpdate),nn=n):n!==null&&(n.push.apply(n,nn),nn=n),tn=(e.flags&32)!==0?!0:o;break;default:Hs(t,e)}}function an(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hw(e,t.alternate,t),t=t.sibling}function wr(e,t){for(e=e.child;e!==null;){var a=e,o=t;switch(a.tag){case 0:case 11:case 14:case 15:Xr(4,a,a.return),wr(a,o);break;case 1:_t(a,a.return);var n=a.stateNode;typeof n.componentWillUnmount=="function"&&iw(a,a.return,n),wr(a,o);break;case 27:(o&2)!==0&&rI(a.stateNode,a.type,a.memoizedProps);case 5:_t(a,a.return),a.tag!==5&&a.tag!==27||ju(a),wr(a,o);break;case 6:ju(a);break;case 26:_t(a,a.return),n=a.stateNode,a.memoizedState!==null||n===null||Ee||n.parentNode.removeChild(n),wr(a,o);break;case 22:a.memoizedState===null&&wr(a,o);break;case 30:_t(a,a.return),wr(a,o);break;case 7:_t(a,a.return);default:wr(a,o)}e=e.sibling}}function Lo(e,t,a){for(a=(t.subtreeFlags&8772)!==0?a:a&-2,t=t.child;t!==null;){var o=t.alternate,n=e,r=t,l=r.flags,s=(a&1)!==0;switch(r.tag){case 0:case 11:case 15:Lo(n,r,a),xc(4,r);break;case 1:if(Lo(n,r,a),o=r,n=o.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(d){Ne(o,o.return,d)}if(o=r,n=o.updateQueue,n!==null){var i=o.stateNode;try{var u=n.shared.hiddenCallbacks;if(u!==null)for(n.shared.hiddenCallbacks=null,n=0;n<u.length;n++)g0(u[n],i)}catch(d){Ne(o,o.return,d)}}s&&l&64&&sw(r),on(r,r.return);break;case 27:(a&2)!==0&&cw(r);case 5:r.tag!==5&&r.tag!==27||PL(r),Lo(n,r,a),s&&o===null&&l&4&&Dg(r),on(r,r.return);break;case 6:PL(r);break;case 26:i=r.stateNode,r.memoizedState!==null||i===null||Ct||oy(lc(i.ownerDocument),r.type,i),Lo(n,r,a),s&&o===null&&l&4&&Dg(r),on(r,r.return);break;case 12:Lo(n,r,a);break;case 31:Lo(n,r,a),s&&l&4&&bw(n,r);break;case 13:Lo(n,r,a),s&&l&4&&vw(n,r);break;case 22:r.memoizedState===null&&Lo(n,r,a),on(r,r.return);break;case 30:Lo(n,r,a),on(r,r.return);break;case 7:on(r,r.return);default:Lo(n,r,a)}t=t.sibling}}function Vy(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&gc(a))}function $y(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gc(e))}function eo(e,t,a,o){var n=(a&335544064)===a;if(t.subtreeFlags&(n?10262:10256))for(t=t.child;t!==null;)ww(e,t,a,o),t=t.sibling;else n&&pw(t)}function ww(e,t,a,o){var n=(a&335544064)===a;n&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&yd(t);var r=t.flags;switch(t.tag){case 0:case 11:case 15:eo(e,t,a,o),r&2048&&xc(9,t);break;case 1:eo(e,t,a,o);break;case 3:eo(e,t,a,o),n&&zg&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),r&2048&&(r=null,t.alternate!==null&&(r=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==r&&(t.refCount++,r!=null&&gc(r)));break;case 12:if(r&2048){eo(e,t,a,o),r=t.stateNode;try{var l=t.memoizedProps,s=l.id,i=l.onPostCommit;typeof i=="function"&&i(s,t.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(u){Ne(t,t.return,u)}}else eo(e,t,a,o);break;case 31:eo(e,t,a,o);break;case 13:eo(e,t,a,o);break;case 23:break;case 22:l=t.stateNode,s=t.alternate,t.memoizedState!==null?(n&&s!==null&&s.memoizedState===null&&yd(s),l._visibility&2?eo(e,t,a,o):Vu(e,t)):(n&&s!==null&&s.memoizedState!==null&&yd(t),l._visibility&2?eo(e,t,a,o):(l._visibility|=2,Gs(e,t,a,o,(t.subtreeFlags&10256)!==0||!1))),r&2048&&Vy(s,t);break;case 24:eo(e,t,a,o),r&2048&&$y(t.alternate,t);break;case 30:n&&(r=t.alternate,r!==null&&(dn(r.child,!0),dn(t.child,!0))),eo(e,t,a,o);break;default:eo(e,t,a,o)}}function Gs(e,t,a,o,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,l=t,s=a,i=o,u=l.flags;switch(l.tag){case 0:case 11:case 15:Gs(r,l,s,i,n),xc(8,l);break;case 23:break;case 22:var d=l.stateNode;l.memoizedState!==null?d._visibility&2?Gs(r,l,s,i,n):Vu(r,l):(d._visibility|=2,Gs(r,l,s,i,n)),n&&u&2048&&Vy(l.alternate,l);break;case 24:Gs(r,l,s,i,n),n&&u&2048&&$y(l.alternate,l);break;default:Gs(r,l,s,i,n)}t=t.sibling}}function Vu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,o=t,n=o.flags;switch(o.tag){case 22:Vu(a,o),n&2048&&Vy(o.alternate,o);break;case 24:Vu(a,o),n&2048&&$y(o.alternate,o);break;default:Vu(a,o)}t=t.sibling}}var El=8192;function Al(e,t,a){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Iw(e,t,a),e=e.sibling}function Iw(e,t,a){switch(e.tag){case 26:Al(e,t,a),e.flags&El&&(e.memoizedState!==null?PM(a,Co,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&cC(a,e)));break;case 5:Al(e,t,a),e.flags&El&&(e=e.stateNode,(t&335544128)===t&&cC(a,e));break;case 3:case 4:var o=Co;Co=lc(e.stateNode.containerInfo),Al(e,t,a),Co=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=El,El=16777216,Al(e,t,a),El=o):Al(e,t,a));break;case 30:if((e.flags&El)!==0&&(o=e.memoizedProps.name,o!=null&&o!=="auto")){var n=e.stateNode;n.paired=null,Pa===null&&(Pa=new Map),Pa.set(o,n)}Al(e,t,a);break;default:Al(e,t,a)}}function Tw(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Au(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var o=t[a];wt=o,kw(o,e)}Tw(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Aw(e),e=e.sibling}function Aw(e){switch(e.tag){case 0:case 11:case 15:Au(e),e.flags&2048&&Xr(9,e,e.return);break;case 3:Au(e);break;case 12:Au(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xd(e)):Au(e);break;default:Au(e)}}function xd(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var o=t[a];wt=o,kw(o,e)}Tw(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xr(8,t,t.return),xd(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,xd(t));break;default:xd(t)}e=e.sibling}}function kw(e,t){for(;wt!==null;){var a=wt;switch(a.tag){case 0:case 11:case 15:Xr(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:gc(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,wt=o;else e:for(a=e;wt!==null;){o=wt;var n=o.sibling,r=o.return;if(yw(o),o===a){wt=null;break e}if(n!==null){n.return=r,wt=n;break e}wt=r}}}var D2={getCacheForType:function(e){var t=zt(pt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return zt(pt).controller.signal}},M2=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ue=null,ge=null,ye=0,De=0,Da=null,Or=!1,Ei=!1,Xy=!1,Xn=0,rt=0,Kr=0,Bl=0,$d=0,_a=0,yi=0,$u=null,ba=null,Hg=!1,mp=0,Rw=0,Xd=1/0,Kd=null,Fr=null,at=0,Io=null,Vl=null,fn=0,qg=0,Gg=null,Ew=null,ci=null,fi=null,di=null,Xu=0,bd=null;function Fa(){return(Ae&2)!==0&&ye!==0?ye&-ye:ee.T!==null?Yy():NC()}function Ow(){if(_a===0)if((ye&536870912)===0||pe){var e=Hf;Hf<<=1,(Hf&3932160)===0&&(Hf=262144),_a=e}else _a=536870912;return e=qt.current,e!==null&&(e.flags|=32),_a}function xi(e,t){if(t!=null){var a=e.stateNode,o=a.ref;o===null&&(o=a.ref=Ww(Gn(e.memoizedProps,a))),fi===null&&(fi=[]),fi.push(t.bind(null,o))}}function La(e,t,a){(e===Ue&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(bi(e,0),Dr(e,ye,_a,!1)),pc(e,a),((Ae&2)===0||e!==Ue)&&(e===Ue&&((Ae&2)===0&&(Bl|=a),rt===4&&Dr(e,ye,_a,!1)),mn(e))}function Dw(e,t,a){if((Ae&6)!==0)throw Error(R(327));var o=!a&&(t&127)===0&&(t&e.expiredLanes)===0||dc(e,t),n=o?_2(e,t):Hh(e,t,!0),r=o;do{if(n===0){Ei&&!o&&Dr(e,t,0,!1);break}else{if(a=e.current.alternate,r&&!N2(a)){n=Hh(e,t,!1),r=!1;continue}if(n===2){if(r=t,e.errorRecoveryDisabledLanes&r)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var s=e;n=$u;var i=s.current.memoizedState.isDehydrated;if(i&&(bi(s,l).flags|=256),l=Hh(s,l,!1),l!==2&&l!==6){if(Xy&&!i){s.errorRecoveryDisabledLanes|=r,Bl|=r,n=4;break e}r=ba,ba=n,r!==null&&(ba===null?ba=r:ba.push.apply(ba,r))}n=l}if(r=!1,n!==2)continue}}if(n===1){bi(e,0),Dr(e,t,0,!0);break}e:{switch(o=e,r=n,r){case 0:case 1:throw Error(R(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Dr(o,t,_a,!Or);break e;case 2:ba=null;break;case 3:case 5:break;default:throw Error(R(329))}if((t&62914560)===t&&(n=mp+300-Ba(),10<n)){if(Dr(o,t,_a,!Or),ep(o,0,!0)!==0)break e;fn=t,o.timeoutHandle=Zy(UL.bind(null,o,a,ba,Kd,Hg,t,_a,Bl,yi,Or,r,"Throttled",-0,0),n);break e}UL(o,a,ba,Kd,Hg,t,_a,Bl,yi,Or,r,null,-0,0)}}break}while(!0);mn(e)}function UL(e,t,a,o,n,r,l,s,i,u,d,c,f,p){e.timeoutHandle=-1;var x=t.subtreeFlags,g=(r&335544064)===r;if(c=null,(g||x&8192||(x&16785408)===16785408)&&(c={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ln},Pa=null,Iw(t,r,c),g&&(x=c,g=e.containerInfo,g=(g.nodeType===9?g:g.ownerDocument).__reactViewTransition,g!=null&&(x.count++,x.waitingForViewTransition=!0,x=sc.bind(x),g.finished.then(x,x))),x=(r&62914560)===r?mp-Ba():(r&4194048)===r?Rw-Ba():0,x=_M(c,x),x!==null)){fn=r,e.cancelPendingCommit=x(HL.bind(null,e,t,r,a,o,n,l,s,i,u,d,c,null,f,p)),Dr(e,r,l,!u);return}HL(e,t,r,a,o,n,l,s,i,u,d,c)}function N2(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var n=a[o],r=n.getSnapshot;n=n.value;try{if(!Ha(r(),n))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Dr(e,t,a,o){t=RC(e,t),t&=~$d,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var n=t;0<n;){var r=31-Ua(n),l=1<<r;o[r]=-1,n&=~l}a!==0&&OC(e,a,t)}function hp(){return(Ae&6)===0?(bc(0,!1),!1):!0}function Ky(){if(ge!==null){if(De===0)var e=ge.return;else e=ge,Un=Ql=null,Oy(e),si=null,ec=0,e=ge;for(;e!==null;)lw(e.alternate,e),e=e.return;ge=null}}function bi(e,t){var a=e.timeoutHandle;return a!==-1&&(e.timeoutHandle=-1,aM(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),fn=0,Ky(),Ue=e,ge=a=Fn(e.current,null),ye=t,De=0,Da=null,Or=!1,Ei=dc(e,t),Xy=!1,yi=_a=$d=Bl=Kr=rt=0,ba=$u=null,Hg=!1,Xn=RC(e,t),rp(),a}function Mw(e,t){ue=null,ee.H=Fd,t===ki||t===ip?(t=dL(),De=3):t===Cy?(t=dL(),De=4):De=t===Uy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Da=t,ge===null&&(rt=1,Hd(e,ro(t,e.current)))}function Nw(){var e=qt.current;return e===null?!0:(ye&4194048)===ye?Yt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Yt:!1}function Pw(){var e=ee.H;return ee.H=Fd,e===null?Fd:e}function _w(){var e=ee.A;return ee.A=D2,e}function Yd(){rt=4,Or||(ye&4194048)!==ye&&qt.current!==null||(Ei=!0),(Kr&134217727)===0&&(Bl&134217727)===0||Ue===null||Dr(Ue,ye,_a,!1)}function Hh(e,t,a){var o=Ae;Ae|=2;var n=Pw(),r=_w();(Ue!==e||ye!==t)&&(Kd=null,bi(e,t)),t=!1;var l=rt;e:do try{if(De!==0&&ge!==null){var s=ge,i=Da;switch(De){case 8:Ky(),l=6;break e;case 3:case 2:case 9:case 6:qt.current===null&&(t=!0);var u=De;if(De=0,Da=null,ai(e,s,i,u),a&&Ei){l=0;break e}break;default:u=De,De=0,Da=null,ai(e,s,i,u)}}P2(),l=rt;break}catch(d){Mw(e,d)}while(!0);return t&&e.shellSuspendCounter++,Un=Ql=null,Ae=o,ee.H=n,ee.A=r,ge===null&&(Ue=null,ye=0,rp()),l}function P2(){for(;ge!==null;)Bw(ge)}function _2(e,t){var a=Ae;Ae|=2;var o=Pw(),n=_w();Ue!==e||ye!==t?(Kd=null,Xd=Ba()+500,bi(e,t)):Ei=dc(e,t);e:do try{if(De!==0&&ge!==null){t=ge;var r=Da;t:switch(De){case 1:De=0,Da=null,ai(e,t,r,1);break;case 2:case 9:if(fL(r)){De=0,Da=null,FL(t);break}t=function(){De!==2&&De!==9||Ue!==e||(De=7),mn(e)},r.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:fL(r)?(De=0,Da=null,FL(t)):(De=0,Da=null,ai(e,t,r,7));break;case 5:var l=null;switch(ge.tag){case 26:l=ge.memoizedState;case 5:case 27:var s=ge;if(l?iI(l):s.stateNode.complete){De=0,Da=null;var i=s.sibling;if(i!==null)ge=i;else{var u=s.return;u!==null?(ge=u,gp(u)):ge=null}break t}}De=0,Da=null,ai(e,t,r,5);break;case 6:De=0,Da=null,ai(e,t,r,6);break;case 8:Ky(),rt=6;break e;default:throw Error(R(462))}}B2();break}catch(d){Mw(e,d)}while(!0);return Un=Ql=null,ee.H=o,ee.A=n,Ae=a,ge!==null?0:(Ue=null,ye=0,rp(),rt)}function B2(){for(;ge!==null&&!eD();)Bw(ge)}function Bw(e){var t=rw(e.alternate,e,Xn);e.memoizedProps=e.pendingProps,t===null?gp(e):ge=t}function FL(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=kL(a,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=kL(a,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Oy(t);var o=t;o===Tt&&(pe?(Md(o),o.tag===5&&o.stateNode!=null&&(Ve=o.stateNode)):(Md(o),pe=!0));default:lw(a,t),t=ge=s0(t,Xn),t=rw(a,t,Xn)}e.memoizedProps=e.pendingProps,t===null?gp(e):ge=t}function ai(e,t,a,o){Un=Ql=null,Oy(t),si=null,ec=0;var n=t.return;try{if(w2(e,n,t,a,ye)){rt=1,Hd(e,ro(a,e.current)),ge=null;return}}catch(r){if(n!==null)throw ge=n,r;rt=1,Hd(e,ro(a,e.current)),ge=null;return}t.flags&32768?(pe||o===1?e=!0:Ei||(ye&536870912)!==0?e=!1:(Or=e=!0,(o===2||o===9||o===3||o===6)&&(o=qt.current,o!==null&&o.tag===13&&(o.flags|=16384))),zw(t,e)):gp(t)}function gp(e){var t=e;do{if((t.flags&32768)!==0){zw(t,Or);return}e=t.return;var a=k2(t.alternate,t,Xn);if(a!==null){ge=a;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);rt===0&&(rt=5)}function zw(e,t){do{var a=R2(e.alternate,e);if(a!==null){a.flags&=32767,ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=a}while(e!==null);rt=6,ge=null}function HL(e,t,a,o,n,r,l,s,i,u,d,c){e.cancelPendingCommit=null;do yp();while(at!==0);if((Ae&6)!==0)throw Error(R(327));if(t!==null){if(t===e.current)throw Error(R(177));e===Ue&&(ge=Ue=null,ye=0),Vl=t,Io=e,fn=a,Gg=n,Ew=o,z2(e,t,a,l,s,i,c)}}function z2(e,t,a,o,n,r,l){var s=t.lanes|t.childLanes;if(qg=s,s|=yy,cD(e,a,s,o,n,r),fi=null,(a&335544064)===a?(di=d2(e),o=10262):(di=null,o=10256),(t.subtreeFlags&o)!==0||(t.flags&o)!==0?(e.callbackNode=null,e.callbackPriority=0,j2(kd,function(){return Xg(),null})):(e.callbackNode=null,e.callbackPriority=0),jd=!1,o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ee.T,ee.T=null,n=ke.p,ke.p=2,r=Ae,Ae|=4;try{E2(e,t,a)}finally{Ae=r,ke.p=n,ee.T=o}}at=1,jd?ci=iM(l,e.containerInfo,di,jg,Vg,F2,$g,Xg,U2,null,null):(jg(),Vg(),$g())}function U2(e){if(at!==0){var t=Io.onRecoverableError;t(e,{componentStack:null})}}function F2(){at===3&&(at=0,Cw(Vl,Io),at=4)}function jg(){if(at===1){at=0;var e=Io,t=Vl,a=fn,o=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||o){o=ee.T,ee.T=null;var n=ke.p;ke.p=2;var r=Ae;Ae|=4;try{Nu=Vd=!1,Sw(t,e,a),a=Zg;var l=JC(e.containerInfo),s=a.focusedElem,i=a.selectionRange;if(l!==s&&s&&s.ownerDocument&&WC(s.ownerDocument.documentElement,s)){if(i!==null&&gy(s)){var u=i.start,d=i.end;if(d===void 0&&(d=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(d,s.value.length);else{var c=s.ownerDocument||document,f=c&&c.defaultView||window;if(f.getSelection){var p=f.getSelection(),x=s.textContent.length,g=Math.min(i.start,x),S=i.end===void 0?g:Math.min(i.end,x);!p.extend&&g>S&&(l=S,S=g,g=l);var y=oL(s,g),m=oL(s,S);if(y&&m&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==m.node||p.focusOffset!==m.offset)){var h=c.createRange();h.setStart(y.node,y.offset),p.removeAllRanges(),g>S?(p.addRange(h),p.extend(m.node,m.offset)):(h.setEnd(m.node,m.offset),p.addRange(h))}}}}for(c=[],p=s;p=p.parentNode;)p.nodeType===1&&c.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<c.length;s++){var b=c[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}wi=!!Qg,Zg=Qg=null}finally{Ae=r,ke.p=n,ee.T=o}}e.current=t,at=2}}function Vg(){if(at===2){at=0;var e=Io,t=Vl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=ee.T,ee.T=null;var o=ke.p;ke.p=2;var n=Ae;Ae|=4;try{hw(e,t.alternate,t)}finally{Ae=n,ke.p=o,ee.T=a}}at=3}}function $g(){if(at===4||at===3){at=0;var e=ci;ci=null,tD();var t=Io,a=Vl,o=fn,n=Ew,r=(o&335544064)===o?10262:10256;if((a.subtreeFlags&r)!==0||(a.flags&r)!==0?at=5:(at=0,Vl=Io=null,Uw(t,t.pendingLanes)),r=t.pendingLanes,r===0&&(Fr=null),cy(o),a=a.stateNode,za&&typeof za.onCommitFiberRoot=="function")try{za.onCommitFiberRoot(fc,a,void 0,(a.current.flags&128)===128)}catch{}if(n!==null){a=ee.T,r=ke.p,ke.p=2,ee.T=null;try{for(var l=t.onRecoverableError,s=0;s<n.length;s++){var i=n[s];l(i.value,{componentStack:i.stack})}}finally{ee.T=a,ke.p=r}}if(n=fi,l=di,di=null,n!==null&&(fi=null,l===null&&(l=[]),e!==null))for(i=0;i<n.length;i++)a=(0,n[i])(l),a!==void 0&&e.finished.finally(a);(fn&3)!==0&&yp(),mn(t),r=t.pendingLanes,(o&261930)!==0&&(r&42)!==0?t===bd?Xu++:(Xu=0,bd=t):(Xu=0,bd=null),bc(0,!1)}}function Uw(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gc(t)))}function yp(){return ci!==null&&(ci.skipTransition(),ci=null),jg(),Vg(),$g(),Xg()}function Xg(){if(at!==5)return!1;var e=Io,t=qg;qg=0;var a=cy(fn),o=ee.T,n=ke.p;try{ke.p=32>a?32:a,ee.T=null,a=Gg,Gg=null;var r=Io,l=fn;if(at=0,Vl=Io=null,fn=0,(Ae&6)!==0)throw Error(R(331));var s=Ae;if(Ae|=4,Aw(r.current),ww(r,r.current,l,a),Ae=s,bc(0,!1),za&&typeof za.onPostCommitFiberRoot=="function")try{za.onPostCommitFiberRoot(fc,r)}catch{}return!0}finally{ke.p=n,ee.T=o,Uw(e,t)}}function qL(e,t,a){t=ro(a,t),t=Tg(e.stateNode,t,2),e=Br(e,t,2),e!==null&&(pc(e,2),mn(e))}function Ne(e,t,a){if(e.tag===3)qL(e,e,a);else for(;t!==null;){if(t.tag===3){qL(t,e,a);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Fr===null||!Fr.has(o))){e=ro(a,e),a=ew(2),o=Br(t,a,2),o!==null&&(tw(a,o,t,e),pc(o,2),mn(o));break}}t=t.return}}function qh(e,t,a){var o=e.pingCache;if(o===null){o=e.pingCache=new M2;var n=new Set;o.set(t,n)}else n=o.get(t),n===void 0&&(n=new Set,o.set(t,n));n.has(a)||(Xy=!0,n.add(a),e=H2.bind(null,e,t,a),t.then(e,e))}function H2(e,t,a){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ue===e&&(ye&a)===a&&((rt===4||rt===3&&(ye&62914560)===ye&&300>Ba()-mp)&&(Ae&2)===0?bi(e,0):$d|=a,yi===ye&&(yi=0)),mn(e)}function Fw(e,t){t===0&&(t=EC()),e=Yl(e,t),e!==null&&(pc(e,t),mn(e))}function q2(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Fw(e,a)}function G2(e,t){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(R(314))}o!==null&&o.delete(t),Fw(e,a)}function j2(e,t){return iy(e,t)}var vi=null,js=null,Kg=!1,Qd=!1,Gh=!1,Mr=0;function mn(e){e!==js&&e.next===null&&(js===null?vi=js=e:js=js.next=e),Qd=!0,Kg||(Kg=!0,$2())}function bc(e,t){if(!Gh&&Qd){Gh=!0;do for(var a=!1,o=vi;o!==null;){if(!t)if(e!==0){var n=o.pendingLanes;if(n===0)var r=0;else{var l=o.suspendedLanes,s=o.pingedLanes;r=(1<<31-Ua(42|e)+1)-1,r&=n&~(l&~s),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(a=!0,GL(o,r))}else r=ye,r=ep(o,o===Ue?r:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(r&3)===0||dc(o,r)||(a=!0,GL(o,r));o=o.next}while(a);Gh=!1}}function V2(){Hw()}function Hw(){Qd=Kg=!1;var e=0;Mr!==0&&tM()&&(e=Mr);for(var t=Ba(),a=null,o=vi;o!==null;){var n=o.next,r=qw(o,t);r===0?(o.next=null,a===null?vi=n:a.next=n,n===null&&(js=a)):(a=o,(e!==0||(r&3)!==0)&&(Qd=!0)),o=n}at!==0&&at!==5||bc(e,!1),Mr!==0&&(Mr=0)}function qw(e,t){for(var a=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var l=31-Ua(r),s=1<<l,i=n[l];i===-1?((s&a)===0||(s&o)!==0)&&(n[l]=uD(s,t)):i<=t&&(e.expiredLanes|=s),r&=~s}if(t=Ue,a=ye,a=ep(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Sh(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||dc(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(o!==null&&Sh(o),cy(a)){case 2:case 8:a=AC;break;case 32:a=kd;break;case 268435456:a=kC;break;default:a=kd}return o=Gw.bind(null,e),a=iy(a,o),e.callbackPriority=t,e.callbackNode=a,t}return o!==null&&o!==null&&Sh(o),e.callbackPriority=2,e.callbackNode=null,2}function Gw(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(yp()&&e.callbackNode!==a)return null;var o=ye;return o=ep(e,e===Ue?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Dw(e,o,t),qw(e,Ba()),e.callbackNode!=null&&e.callbackNode===a?Gw.bind(null,e):null)}function GL(e,t){if(yp())return null;Dw(e,t,!0)}function $2(){oM(function(){(Ae&6)!==0?iy(TC,V2):Hw()})}function Yy(){if(Mr===0){var e=Hl;e===0&&(e=Ff,Ff<<=1,(Ff&261888)===0&&(Ff=256)),Mr=e}return Mr}function jL(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:sd(e)}function X2(e,t,a,o,n){if(t==="submit"&&a&&a.stateNode===n){var r=jL((n[wa]||null).action),l=o.submitter;l&&(t=(t=l[wa]||null)?jL(t.formAction):l.getAttribute("formAction"),t!==null&&(r=t,l=null));var s=new ap("action","action",null,o,n);e.push({event:s,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Mr!==0){var i=new FormData(n,l);wg(a,{pending:!0,data:i,method:n.method,action:r},null,i)}}else typeof r=="function"&&(s.preventDefault(),i=new FormData(n,l),wg(a,{pending:!0,data:i,method:n.method,action:r},r,i))},currentTarget:n}]})}}for(td=0;td<pg.length;td++)ad=pg[td],VL=ad.toLowerCase(),$L=ad[0].toUpperCase()+ad.slice(1),To(VL,"on"+$L);var ad,VL,$L,td;To(t0,"onAnimationEnd");To(a0,"onAnimationIteration");To(o0,"onAnimationStart");To("dblclick","onDoubleClick");To("focusin","onFocus");To("focusout","onBlur");To(n2,"onTransitionRun");To(r2,"onTransitionStart");To(l2,"onTransitionCancel");To(n0,"onTransitionEnd");mi("onMouseEnter",["mouseout","mouseover"]);mi("onMouseLeave",["mouseout","mouseover"]);mi("onPointerEnter",["pointerout","pointerover"]);mi("onPointerLeave",["pointerout","pointerover"]);Xl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oc="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(" "),K2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(oc));function jw(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],n=o.event;o=o.listeners;e:{var r=void 0;if(t)for(var l=o.length-1;0<=l;l--){var s=o[l],i=s.instance,u=s.currentTarget;if(s=s.listener,i!==r&&n.isPropagationStopped())break e;r=s,n.currentTarget=u;try{r(n)}catch(d){Ed(d)}n.currentTarget=null,r=i}else for(l=0;l<o.length;l++){if(s=o[l],i=s.instance,u=s.currentTarget,s=s.listener,i!==r&&n.isPropagationStopped())break e;r=s,n.currentTarget=u;try{r(n)}catch(d){Ed(d)}n.currentTarget=null,r=i}}}}function he(e,t){var a=t[FS];a===void 0&&(a=t[FS]=new Set);var o=e+"__bubble";a.has(o)||(Vw(t,e,2,!1),a.add(o))}function jh(e,t,a){var o=0;t&&(o|=4),Vw(a,e,o,t)}var od="_reactListening"+Math.random().toString(36).slice(2);function Qy(e){if(!e[od]){e[od]=!0,_C.forEach(function(a){a!=="selectionchange"&&(K2.has(a)||jh(a,!1,e),jh(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[od]||(t[od]=!0,jh("selectionchange",!1,t))}}function Vw(e,t,a,o){switch(hI(t)){case 2:var n=FM;break;case 8:n=HM;break;default:n=ox}a=n.bind(null,t,a,e),n=void 0,!ug||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),o?n!==void 0?e.addEventListener(t,a,{capture:!0,passive:n}):e.addEventListener(t,a,!0):n!==void 0?e.addEventListener(t,a,{passive:n}):e.addEventListener(t,a,!1)}function Vh(e,t,a,o,n){var r=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var s=o.stateNode.containerInfo;if(s===n)break;if(l===4)for(l=o.return;l!==null;){var i=l.tag;if((i===3||i===4)&&l.stateNode.containerInfo===n)return;l=l.return}for(;s!==null;){if(l=Ol(s),l===null)return;if(i=l.tag,i===5||i===6||i===26||i===27){o=r=l;continue e}s=s.parentNode}}o=o.return}jC(function(){var u=r,d=dy(a),c=[];e:{var f=r0.get(e);if(f!==void 0){var p=ap,x=e;switch(e){case"keypress":if(ud(a)===0)break e;case"keydown":case"keyup":p=ND;break;case"focusin":x="focus",p=Ah;break;case"focusout":x="blur",p=Ah;break;case"beforeblur":case"afterblur":p=Ah;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=KS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=LD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=UD;break;case t0:case a0:case o0:p=ID;break;case n0:p=HD;break;case"scroll":case"scrollend":p=vD;break;case"wheel":p=GD;break;case"copy":case"cut":case"paste":p=AD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=QS;break;case"submit":p=BD;break;case"toggle":case"beforetoggle":p=VD}var g=(t&4)!==0,S=!g&&(e==="scroll"||e==="scrollend"),y=g?f!==null?f+"Capture":null:f;g=[];for(var m=u,h;m!==null;){var b=m;if(h=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||h===null||y===null||(b=Yu(m,y),b!=null&&g.push(nc(m,b,h))),S)break;m=m.return}0<g.length&&(f=new p(f,x,null,a,d),c.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&a!==ig&&(x=a.relatedTarget||a.fromElement)&&(Ol(x)||x[Ti]))break e;(f||p)&&(x=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(p=a.relatedTarget||a.toElement,f=u,p=p?Ol(p):null,p!==null&&(S=cc(p),g=p.tag,p!==S||g!==5&&g!==27&&g!==6)&&(p=null)):(f=null,p=u),f!==p&&(g=KS,b="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(g=QS,b="onPointerLeave",y="onPointerEnter",m="pointer"),S=f==null?x:Du(f),h=p==null?x:Du(p),x=new g(b,m+"leave",f,a,d),x.target=S,x.relatedTarget=h,b=null,Ol(d)===u&&(g=new g(y,m+"enter",p,a,d),g.target=h,g.relatedTarget=S,b=g),S=b,g=f&&p?Qh(f,p,Y2):null,f!==null&&XL(c,x,f,g,!1),p!==null&&S!==null&&XL(c,S,p,g,!0)))}e:{if(f=u?Du(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var L=eL;else if(JS(f))if(QC)L=t2;else{L=JD;var C=WD}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&fy(u.elementType)&&(L=eL):L=e2;if(L&&(L=L(e,u))){YC(c,L,a,d);break e}C&&C(e,f,u)}switch(C=u?Du(u):window,e){case"focusin":(JS(C)||C.contentEditable==="true")&&(Qs=C,fg=u,Bu=null);break;case"focusout":Bu=fg=Qs=null;break;case"mousedown":dg=!0;break;case"contextmenu":case"mouseup":case"dragend":dg=!1,nL(c,a,d);break;case"selectionchange":if(o2)break;case"keydown":case"keyup":nL(c,a,d)}var T;if(hy)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Ys?XC(e,a)&&(w="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(w="onCompositionStart");w&&($C&&a.locale!=="ko"&&(Ys||w!=="onCompositionStart"?w==="onCompositionEnd"&&Ys&&(T=VC()):(Rr=d,py="value"in Rr?Rr.value:Rr.textContent,Ys=!0)),C=Zd(u,w),0<C.length&&(w=new YS(w,e,null,a,d),c.push({event:w,listeners:C}),T?w.data=T:(T=KC(a),T!==null&&(w.data=T)))),(T=XD?KD(e,a):YD(e,a))&&(w=Zd(u,"onBeforeInput"),0<w.length&&(C=new YS("onBeforeInput","beforeinput",null,a,d),c.push({event:C,listeners:w}),C.data=T)),X2(c,e,u,a,d)}jw(c,t)})}function nc(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Zd(e,t){for(var a=t+"Capture",o=[];e!==null;){var n=e,r=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||r===null||(n=Yu(e,a),n!=null&&o.unshift(nc(e,n,r)),n=Yu(e,t),n!=null&&o.push(nc(e,n,r))),e.tag===3)return o;e=e.return}return[]}function Y2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function XL(e,t,a,o,n){for(var r=t._reactName,l=[];a!==null&&a!==o;){var s=a,i=s.alternate,u=s.stateNode;if(s=s.tag,i!==null&&i===o)break;s!==5&&s!==26&&s!==27||u===null||(i=u,n?(u=Yu(a,r),u!=null&&l.unshift(nc(a,u,i))):n||(u=Yu(a,r),u!=null&&l.push(nc(a,u,i)))),a=a.return}l.length!==0&&e.push({event:t,listeners:l})}var Q2=/\r\n?/g,Z2=/\u0000|\uFFFD/g;function KL(e){return(typeof e=="string"?e:""+e).replace(Q2,`
10
+ `).replace(Z2,"")}function $w(e,t){return t=KL(t),KL(e)===t}function Me(e,t,a,o,n,r){switch(a){case"children":if(typeof o=="string")t==="body"||t==="textarea"&&o===""||hi(e,o);else if(typeof o=="number"||typeof o=="bigint")t!=="body"&&hi(e,""+o);else return;break;case"className":Gf(e,"class",o);break;case"tabIndex":Gf(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Gf(e,a,o);break;case"style":GC(e,o,r);return;case"data":if(t!=="object"){Gf(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=sd(o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof r=="function"&&(a==="formAction"?(t!=="input"&&Me(e,t,"name",n.name,n,null),Me(e,t,"formEncType",n.formEncType,n,null),Me(e,t,"formMethod",n.formMethod,n,null),Me(e,t,"formTarget",n.formTarget,n,null)):(Me(e,t,"encType",n.encType,n,null),Me(e,t,"method",n.method,n,null),Me(e,t,"target",n.target,n,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=sd(o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=ln);return;case"onScroll":o!=null&&he("scroll",e);return;case"onScrollEnd":o!=null&&he("scrollend",e);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(R(61));if(a=o.__html,a!=null){if(n.children!=null)throw Error(R(60));r?.__html!==a&&(e.innerHTML=a)}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=sd(o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":he("beforetoggle",e),he("toggle",e),ld(e,"popover",o);break;case"xlinkActuate":_n(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":_n(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":_n(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":_n(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":_n(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":_n(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":_n(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":_n(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":_n(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ld(e,"is",o);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=xD.get(a)||a,ld(e,a,o);else return}Le=!0}function Yg(e,t,a,o,n,r){switch(a){case"style":GC(e,o,r);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(R(61));if(a=o.__html,a!=null){if(n.children!=null)throw Error(R(60));r?.__html!==a&&(e.innerHTML=a)}}break;case"children":if(typeof o=="string")hi(e,o);else if(typeof o=="number"||typeof o=="bigint")hi(e,""+o);else return;break;case"onScroll":o!=null&&he("scroll",e);return;case"onScrollEnd":o!=null&&he("scrollend",e);return;case"onClick":o!=null&&(e.onclick=ln);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!BC.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),r=a.slice(2,n?a.length-7:void 0),t=e[wa]||null,t=t!=null?t[a]:null,typeof t=="function"&&e.removeEventListener(r,t,n),typeof o=="function")){typeof t!="function"&&t!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(r,o,n);break e}Le=!0,a in e?e[a]=o:o===!0?e.setAttribute(a,""):ld(e,a,o)}return}Le=!0}function Ht(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var o=!1,n=!1,r;for(r in a)if(a.hasOwnProperty(r)){var l=a[r];if(l!=null)switch(r){case"src":o=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(R(137,t));default:Me(e,t,r,l,a,null)}}n&&Me(e,t,"srcSet",a.srcSet,a,null),o&&Me(e,t,"src",a.src,a,null);return;case"input":he("invalid",e);var s=r=l=n=null,i=null,u=null;for(o in a)if(a.hasOwnProperty(o)){var d=a[o];if(d!=null)switch(o){case"name":n=d;break;case"type":l=d;break;case"checked":i=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(R(137,t));break;default:Me(e,t,o,d,a,null)}}FC(e,r,s,i,u,l,n,!1);return;case"select":he("invalid",e),o=l=r=null;for(n in a)if(a.hasOwnProperty(n)&&(s=a[n],s!=null))switch(n){case"value":r=s;break;case"defaultValue":l=s;break;case"multiple":o=s;default:Me(e,t,n,s,a,null)}t=r,a=l,e.multiple=!!o,t!=null?ni(e,!!o,t,!1):a!=null&&ni(e,!!o,a,!0);return;case"textarea":he("invalid",e),r=n=o=null;for(l in a)if(a.hasOwnProperty(l)&&(s=a[l],s!=null))switch(l){case"value":o=s;break;case"defaultValue":n=s;break;case"children":r=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(R(91));break;default:Me(e,t,l,s,a,null)}qC(e,o,n,r);return;case"option":for(i in a)a.hasOwnProperty(i)&&(o=a[i],o!=null)&&(i==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(e,t,i,o,a,null));return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(o=0;o<oc.length;o++)he(oc[o],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in a)if(a.hasOwnProperty(u)&&(o=a[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(R(137,t));default:Me(e,t,u,o,a,null)}return;default:if(fy(t)){for(d in a)a.hasOwnProperty(d)&&(o=a[d],o!==void 0&&Yg(e,t,d,o,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(o=a[s],o!=null&&Me(e,t,s,o,a,null))}var W2={};function J2(e,t,a,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,r=null,l=null,s=null,i=null,u=null,d=null;for(p in a){var c=a[p];if(a.hasOwnProperty(p)&&c!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":i=c;default:o.hasOwnProperty(p)||Me(e,t,p,null,o,c)}}for(var f in o){var p=o[f];if(c=a[f],o.hasOwnProperty(f)&&(p!=null||c!=null))switch(f){case"type":p!==c&&(Le=!0),r=p;break;case"name":p!==c&&(Le=!0),n=p;break;case"checked":p!==c&&(Le=!0),u=p;break;case"defaultChecked":p!==c&&(Le=!0),d=p;break;case"value":p!==c&&(Le=!0),l=p;break;case"defaultValue":p!==c&&(Le=!0),s=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(R(137,t));break;default:p!==c&&Me(e,t,f,p,o,c)}}sg(e,l,s,i,u,d,r,n);return;case"select":p=l=s=f=null;for(r in a)if(i=a[r],a.hasOwnProperty(r)&&i!=null)switch(r){case"value":break;case"multiple":p=i;default:o.hasOwnProperty(r)||Me(e,t,r,null,o,i)}for(n in o)if(r=o[n],i=a[n],o.hasOwnProperty(n)&&(r!=null||i!=null))switch(n){case"value":r!==i&&(Le=!0),f=r;break;case"defaultValue":r!==i&&(Le=!0),s=r;break;case"multiple":r!==i&&(Le=!0),l=r;default:r!==i&&Me(e,t,n,r,o,i)}t=s,a=l,o=p,f!=null?ni(e,!!a,f,!1):!!o!=!!a&&(t!=null?ni(e,!!a,t,!0):ni(e,!!a,a?[]:"",!1));return;case"textarea":p=f=null;for(s in a)if(n=a[s],a.hasOwnProperty(s)&&n!=null&&!o.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Me(e,t,s,null,o,n)}for(l in o)if(n=o[l],r=a[l],o.hasOwnProperty(l)&&(n!=null||r!=null))switch(l){case"value":n!==r&&(Le=!0),f=n;break;case"defaultValue":n!==r&&(Le=!0),p=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(R(91));break;default:n!==r&&Me(e,t,l,n,o,r)}HC(e,f,p);return;case"option":for(var x in a)f=a[x],a.hasOwnProperty(x)&&f!=null&&!o.hasOwnProperty(x)&&(x==="selected"?e.selected=!1:Me(e,t,x,null,o,f));for(i in o)f=o[i],p=a[i],o.hasOwnProperty(i)&&f!==p&&(f!=null||p!=null)&&(i==="selected"?(f!==p&&(Le=!0),e.selected=f&&typeof f!="function"&&typeof f!="symbol"):Me(e,t,i,f,o,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in a)f=a[g],a.hasOwnProperty(g)&&f!=null&&!o.hasOwnProperty(g)&&Me(e,t,g,null,o,f);for(u in o)if(f=o[u],p=a[u],o.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(R(137,t));break;default:Me(e,t,u,f,o,p)}return;default:if(fy(t)){for(var S in a)f=a[S],a.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&Yg(e,t,S,void 0,o,f);for(d in o)f=o[d],p=a[d],!o.hasOwnProperty(d)||f===p||f===void 0&&p===void 0||Yg(e,t,d,f,o,p);return}}for(var y in a)f=a[y],a.hasOwnProperty(y)&&f!=null&&!o.hasOwnProperty(y)&&Me(e,t,y,null,o,f);for(c in o)f=o[c],p=a[c],!o.hasOwnProperty(c)||f===p||f==null&&p==null||Me(e,t,c,f,o,p)}function YL(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eM(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var n=a[o],r=n.transferSize,l=n.initiatorType,s=n.duration;if(r&&s&&YL(l)){for(l=0,s=n.responseEnd,o+=1;o<a.length;o++){var i=a[o],u=i.startTime;if(u>s)break;var d=i.transferSize,c=i.initiatorType;d&&YL(c)&&(i=i.responseEnd,l+=d*(i<s?1:(s-u)/(i-u)))}if(--o,t+=8*(r+l)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Qg=null,Zg=null;function rc(e){return e.nodeType===9?e:e.ownerDocument}function QL(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Xw(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Kw(e,t,a,o){return a=rc(a).createElement(e),a[Bt]=o,a[wa]=t,Ht(a,e,t),It(a),a}function Wg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $h=null;function tM(){var e=window.event;return e&&e.type==="popstate"?e===$h?!1:($h=e,!0):($h=null,!1)}var Zy=typeof setTimeout=="function"?setTimeout:void 0,aM=typeof clearTimeout=="function"?clearTimeout:void 0,ZL=typeof Promise=="function"?Promise:void 0,WL=typeof requestAnimationFrame=="function"?requestAnimationFrame:Zy,oM=typeof queueMicrotask=="function"?queueMicrotask:typeof ZL<"u"?function(e){return ZL.resolve(null).then(e).catch(nM)}:Zy;function nM(e){setTimeout(function(){throw e})}function Qr(e){return e==="head"}function JL(e,t){var a=t,o=0;do{var n=a.nextSibling;if(e.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(n),Ii(t);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")Kh(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Kh(a);for(var r=a.firstChild;r;){var l=r.nextSibling,s=r.nodeName;r[mc]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&r.rel.toLowerCase()==="stylesheet"||a.removeChild(r),r=l}}else a==="body"&&Kh(e.ownerDocument.body);a=n}while(a);Ii(t)}function eC(e,t){var a=e;e=0;do{var o=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function Yw(e,t,a){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,a!=null&&(e.style.viewTransitionClass=a),a=getComputedStyle(e),a.display==="inline"){if(t=e.getClientRects(),t.length===1)var o=1;else for(var n=o=0;n<t.length;n++){var r=t[n];0<r.width&&0<r.height&&o++}o===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+a.paddingTop,e.marginBottom="-"+a.paddingBottom)}}function Qw(e,t){e=e.style,t=t.style;var a=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(a=t.display,e.display=a==null||typeof a=="boolean"?"":a,a=t.margin,a!=null?e.margin=a:(a=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=a==null||typeof a=="boolean"?"":a,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Zw(e,t,a){return a=a.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=a.innerHeight&&e.left<=a.innerWidth}}function Jg(e){var t=e.getBoundingClientRect(),a=getComputedStyle(e);return Zw(t,a,e)}function rM(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var a=getComputedStyle(e);return Zw(t,a,e)}function lM(e){return e.documentElement.clientHeight}function sM(e){this.addEventListener("load",e),this.addEventListener("error",e)}function iM(e,t,a,o,n,r,l,s,i){var u=t.nodeType===9?t:t.ownerDocument;try{var d=u.startViewTransition({update:function(){var f=u.defaultView,p=f.navigation&&f.navigation.transition,x=u.fonts.status;o();var g=[];if(x==="loaded"&&(lM(u),u.fonts.status==="loading"&&g.push(u.fonts.ready)),x=g.length,e!==null)for(var S=e.suspenseyImages,y=0,m=0;m<S.length;m++){var h=S[m];if(!h.complete){var b=h.getBoundingClientRect();if(0<b.bottom&&0<b.right&&b.top<f.innerHeight&&b.left<f.innerWidth){if(y+=uI(h),y>Ld){g.length=x;break}h=new Promise(sM.bind(h)),g.push(h)}}}if(0<g.length)return f=Promise.race([Promise.all(g),new Promise(function(L){return setTimeout(L,500)})]).then(n,n),(p?Promise.allSettled([p.finished,f]):f).then(r,r);if(n(),p)return p.finished.then(r,r);r()},types:a});u.__reactViewTransition=d;var c=[];return d.ready.then(function(){for(var f=u.documentElement.getAnimations({subtree:!0}),p=0;p<f.length;p++){var x=f[p],g=x.effect,S=g.pseudoElement;if(S!=null&&S.startsWith("::view-transition")){c.push(x),x=g.getKeyframes();for(var y=S=void 0,m=!0,h=0;h<x.length;h++){var b=x[h],L=b.width;if(S===void 0)S=L;else if(S!==L){m=!1;break}if(L=b.height,y===void 0)y=L;else if(y!==L){m=!1;break}delete b.width,delete b.height,b.transform==="none"&&delete b.transform}m&&S!==void 0&&y!==void 0&&(g.setKeyframes(x),m=getComputedStyle(g.target,g.pseudoElement),m.width!==S||m.height!==y)&&(m=x[0],m.width=S,m.height=y,m=x[x.length-1],m.width=S,m.height=y,g.setKeyframes(x))}}l()},function(f){u.__reactViewTransition===d&&(u.__reactViewTransition=null);try{typeof f=="object"&&f!==null&&f.name==="InvalidStateError"&&(f.message==="View transition was skipped because document visibility state is hidden."||f.message==="Skipping view transition because document visibility state has become hidden."||f.message==="Skipping view transition because viewport size changed."||f.message==="Transition was aborted because of invalid state")&&(f=null),f!==null&&i(f)}finally{o(),n(),l()}}),d.finished.finally(function(){for(var f=0;f<c.length;f++)c[f].cancel();u.__reactViewTransition===d&&(u.__reactViewTransition=null),s()}),d}catch{return o(),n(),l(),null}}function Dl(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Dl.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Fe({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Dl.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,a=e.getAnimations({subtree:!0}),o=[],n=0;n<a.length;n++){var r=a[n].effect;r!==null&&r.target===e&&r.pseudoElement===t&&o.push(a[n])}return o};Dl.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ww(e){return{name:e,group:new Dl("group",e),imagePair:new Dl("image-pair",e),old:new Dl("old",e),new:new Dl("new",e)}}function qa(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}qa.prototype.addEventListener=function(e,t,a){var o=null,n=null;if(!(a!=null&&typeof a!="boolean"&&(o=a.signal||null,o!==null&&o.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var r=this._eventListeners;if(Jw(r,e,t,a)===-1){var l=this,s=t;a!=null&&typeof a!="boolean"&&a.once===!0&&(s=function(i){l.removeEventListener(e,t,a),typeof t=="function"?t.call(this,i):t.handleEvent(i)}),o!==null&&(n=l.removeEventListener.bind(l,e,t,a),o.addEventListener("abort",n,{once:!0}),n=o.removeEventListener.bind(o,"abort",n)),o=Si(a),r.push({type:e,listener:t,optionsOrUseCapture:a,attachedListener:s,cleanup:n}),Ca(this._fragmentFiber.child,!1,uM,e,s,o)}this._eventListeners=r}};function uM(e,t,a,o){return xt(e).addEventListener(t,a,o),!1}qa.prototype.removeEventListener=function(e,t,a){var o=this._eventListeners;if(o!==null&&(t=Jw(o,e,t,a),t!==-1)){var n=o[t];a=n.attachedListener;var r=n.cleanup;n=Si(n.optionsOrUseCapture),Ca(this._fragmentFiber.child,!1,cM,e,a,n),o.splice(t,1),r!==null&&r()}};function cM(e,t,a,o){return xt(e).removeEventListener(t,a,o),!1}function Si(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function tC(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Jw(e,t,a,o){if(e.length===0)return-1;o=tC(o);for(var n=0;n<e.length;n++){var r=e[n];if(r.type===t&&r.listener===a&&tC(r.optionsOrUseCapture)===o)return n}return-1}qa.prototype.dispatchEvent=function(e){var t=$l(this._fragmentFiber);if(t===null)return!0;t=xt(t);var a=this._eventListeners;if(a!==null&&0<a.length||!e.bubbles){var o=t.nodeType===9?t.createComment(""):document.createTextNode("");if(a)for(var n=0;n<a.length;n++){var r=a[n];o.addEventListener(r.type,r.attachedListener,Si(r.optionsOrUseCapture))}if(t.appendChild(o),e=o.dispatchEvent(e),a)for(n=0;n<a.length;n++)r=a[n],o.removeEventListener(r.type,r.attachedListener,Si(r.optionsOrUseCapture));return t.removeChild(o),e}return t.dispatchEvent(e)};qa.prototype.focus=function(e){Ca(this._fragmentFiber.child,!0,eI,e,void 0,void 0)};function eI(e,t){return e.tag===6?!1:(e=xt(e),LM(e,t))}qa.prototype.focusLast=function(e){var t=[];Ca(this._fragmentFiber.child,!0,Wy,t,void 0,void 0);for(var a=t.length-1;0<=a&&!eI(t[a],e);a--);};function Wy(e,t){return t.push(e),!1}qa.prototype.blur=function(){var e=$l(this._fragmentFiber);e!==null&&(e=xt(e),e=rc(e).activeElement,e!==null&&Ca(this._fragmentFiber.child,!1,fM,e,void 0,void 0))};function fM(e,t){return e.tag===6?!1:(e=xt(e),e===t||e.contains(t)?(t.blur(),!0):!1)}qa.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Ca(this._fragmentFiber.child,!1,dM,e,void 0,void 0)};function dM(e,t){return e.tag===6||(e=xt(e),t.observe(e)),!1}qa.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Ca(this._fragmentFiber.child,!1,pM,e,void 0,void 0);for(var a=t=0;a<wo.length;a++){var o=wo[a];o.fragmentInstance===this&&o.observer===e?e.unobserve(o.instance):wo[t++]=o}wo.length=t}};function pM(e,t){return e.tag===6||(e=xt(e),t.unobserve(e)),!1}var wo=[],Xh=!1;function mM(e,t,a){wo.push({fragmentInstance:e,observer:t,instance:a}),Xh||(Xh=!0,CM(function(){Xh=!1;var o=wo;wo=[];for(var n=0;n<o.length;n++){var r=o[n];r.observer.unobserve(r.instance)}}))}qa.prototype.getClientRects=function(){var e=[];return Ca(this._fragmentFiber.child,!1,hM,e,void 0,void 0),e};function hM(e,t){if(e.tag===6){e=e.stateNode;var a=e.ownerDocument.createRange();a.selectNodeContents(e),t.push.apply(t,a.getClientRects())}else e=xt(e),t.push.apply(t,e.getClientRects());return!1}qa.prototype.getRootNode=function(e){var t=$l(this._fragmentFiber);return t===null?this:xt(t).getRootNode(e)};qa.prototype.compareDocumentPosition=function(e){var t=$l(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];Ca(this._fragmentFiber.child,!1,Wy,a,void 0,void 0);var o=xt(t);if(a.length===0){if(a=o,NS(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(a=t)}t=this._fragmentFiber;var n=o=a.compareDocumentPosition(e);return a===e?n=Node.DOCUMENT_POSITION_CONTAINS:o&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=LC(t)[1],a===null?n=Node.DOCUMENT_POSITION_PRECEDING:(e=xt(a).compareDocumentPosition(e),n=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),n|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=xt(a[0]),n=xt(a[a.length-1]);var r=NS(this._fragmentFiber)?t.parentElement:o;if(r==null)return Node.DOCUMENT_POSITION_DISCONNECTED;o=r.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,r=r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY;var l=t.compareDocumentPosition(e),s=n.compareDocumentPosition(e),i=l&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=o&&r&&l&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=o&&t===e||r&&n===e||i||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!o&&t===e||!r&&n===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:l,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||gM(t,this._fragmentFiber,a[0],a[a.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function gM(e,t,a,o,n){var r=Ol(n);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!r)e:{for(;r!==null;){if(r.tag===7&&(r===t||r.alternate===t)){a=!0;break e}r=r.return}a=!1}return a}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(r===null)return r=n.ownerDocument,n===r||n===r.documentElement||n===r.body;e:{for(r=t,t=$l(t);r!==null;){if(!(r.tag!==5&&r.tag!==3&&r.tag!==27||r!==t&&r.alternate!==t)){r=!0;break e}r=r.return}r=!1}return r}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!r)&&!(t=r===a)&&(t=Qh(a,r,PS),t===null?t=!1:(Ca(t,!0,$O,r,a),r=Vs,Vs=null,t=r!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!r)&&!(t=r===o)&&(t=Qh(o,r,PS),t===null?t=!1:(Ca(t,!0,XO,r,o),r=Vs,Yh=Vs=null,t=r!==null)),t):!1}function aC(e,t){var a=e.ownerDocument.createRange();a.selectNodeContents(e),e=a.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}qa.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(R(566));var t=[];Ca(this._fragmentFiber.child,!1,Wy,t,void 0,void 0);var a=e!==!1;if(t.length===0){var o=LC(this._fragmentFiber);if(o=a?o[1]||o[0]||$l(this._fragmentFiber):o[0]||o[1],o===null)return;if(o.tag===6){e=xt(o),aC(e,a);return}if(o=xt(o),o.nodeType!==9){if(o.nodeType===11){a="host"in o?o.host:null,a!==null&&a.scrollIntoView(e);return}o.scrollIntoView(e)}}for(o=a?t.length-1:0;o!==(a?-1:t.length);){var n=t[o];n.tag===6?(n=xt(n),aC(n,a)):xt(n).scrollIntoView(e),o+=a?-1:1}};function yM(e,t){return e=xt(e),tI(e,t),!1}function tI(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function aI(e,t){var a=t._eventListeners;if(a!==null)for(var o=0;o<a.length;o++){var n=a[o];e.addEventListener(n.type,n.attachedListener,Si(n.optionsOrUseCapture))}e.nodeType!==3&&(a=t._observers,a!==null&&a.forEach(function(r){for(var l=0,s=0;s<wo.length;s++){var i=wo[s];(i.fragmentInstance!==t||i.observer!==r||i.instance!==e)&&(wo[l++]=i)}wo.length=l,r.observe(e)}),tI(e,t))}function xM(e,t){var a=t._eventListeners;if(a!==null)for(var o=0;o<a.length;o++){var n=a[o];e.removeEventListener(n.type,n.attachedListener,Si(n.optionsOrUseCapture))}e.nodeType!==3&&(a=t._observers,a!==null&&a.forEach(function(r){typeof r.rootMargin=="string"?mM(t,r,e):r.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function ey(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ey(a),tp(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function bM(e,t,a,o){for(;e.nodeType===1;){var n=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[mc])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=so(e.nextSibling),e===null)break}return null}function vM(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=so(e.nextSibling),e===null))return null;return e}function oI(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=so(e.nextSibling),e===null))return null;return e}function ty(e){return e.data==="$?"||e.data==="$~"}function Jy(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function SM(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var o=function(){t(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function so(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ay=null;function oC(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return so(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function nC(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function LM(e,t){function a(){o=!0}if(e.ownerDocument.activeElement===e)return!0;var o=!1;try{e.ownerDocument.addEventListener("focus",a,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",a,!0)}return o}function CM(e){WL(function(){WL(function(t){return e(t)})})}function nI(e,t,a){switch(t=rc(a),e){case"html":if(e=t.documentElement,!e)throw Error(R(452));return e;case"head":if(e=t.head,!e)throw Error(R(453));return e;case"body":if(e=t.body,!e)throw Error(R(454));return e;default:throw Error(R(451))}}function rI(e,t,a){for(var o in a){var n=a[o];a.hasOwnProperty(o)&&n!=null&&Me(e,t,o,null,W2,n)}a.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===ln&&(e.onclick=null),tp(e)}function Kh(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tp(e)}var io=new Map,rC=new Set;function lc(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Qn=ke.d;ke.d={f:wM,r:IM,D:TM,C:AM,L:kM,m:RM,X:OM,S:EM,M:DM};function wM(){var e=Qn.f(),t=hp();return e||t}function IM(e){var t=Ai(e);t!==null&&t.tag===5&&t.type==="form"?G0(t):Qn.r(e)}var Oi=typeof document>"u"?null:document;function lI(e,t,a){var o=Oi;if(o&&typeof t=="string"&&t){var n=no(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),rC.has(n)||(rC.add(n),e={rel:e,crossOrigin:a,href:t},o.querySelector(n)===null&&(t=o.createElement("link"),Ht(t,"link",e),It(t),o.head.appendChild(t)))}}function TM(e){Qn.D(e),lI("dns-prefetch",e,null)}function AM(e,t){Qn.C(e,t),lI("preconnect",e,t)}function kM(e,t,a){Qn.L(e,t,a);var o=Oi;if(o&&e&&t){var n='link[rel="preload"][as="'+no(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+no(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+no(a.imageSizes)+'"]')):n+='[href="'+no(e)+'"]';var r=n;switch(t){case"style":r=Li(e);break;case"script":r=Di(e)}if(!(io.has(r)||(e=Fe({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),io.set(r,e),o.querySelector(n)!==null||t==="style"&&o.querySelector(vc(r))||t==="script"&&o.querySelector(Sc(r))))){var l=o.createElement("link");Ht(l,"link",e),t==="style"&&(l[Rd]=!0,l.onload=l.onerror=function(){PC(l)}),It(l),o.head.appendChild(l)}}}function RM(e,t){Qn.m(e,t);var a=Oi;if(a&&e){var o=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+no(o)+'"][href="'+no(e)+'"]',r=n;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Di(e)}if(!io.has(r)&&(e=Fe({rel:"modulepreload",href:e},t),io.set(r,e),a.querySelector(n)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Sc(r)))return}o=a.createElement("link"),Ht(o,"link",e),It(o),a.head.appendChild(o)}}}function EM(e,t,a){Qn.S(e,t,a);var o=Oi;if(o&&e){var n=oi(o).hoistableStyles,r=Li(e);t=t||"default";var l=n.get(r);if(!l){var s={loading:0,preload:null};if(l=o.querySelector(vc(r)))s.loading=5;else{e=Fe({rel:"stylesheet",href:e,"data-precedence":t},a),(a=io.get(r))&&ex(e,a);var i=l=o.createElement("link");It(i),Ht(i,"link",e),i._p=new Promise(function(u,d){i.onload=u,i.onerror=d}),i.addEventListener("load",function(){s.loading|=1}),i.addEventListener("error",function(){s.loading|=2}),s.loading|=4,vd(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:s},n.set(r,l)}}}function OM(e,t){Qn.X(e,t);var a=Oi;if(a&&e){var o=oi(a).hoistableScripts,n=Di(e),r=o.get(n);r||(r=a.querySelector(Sc(n)),r||(e=Fe({src:e,async:!0},t),(t=io.get(n))&&tx(e,t),r=a.createElement("script"),It(r),Ht(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},o.set(n,r))}}function DM(e,t){Qn.M(e,t);var a=Oi;if(a&&e){var o=oi(a).hoistableScripts,n=Di(e),r=o.get(n);r||(r=a.querySelector(Sc(n)),r||(e=Fe({src:e,async:!0,type:"module"},t),(t=io.get(n))&&tx(e,t),r=a.createElement("script"),It(r),Ht(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},o.set(n,r))}}function lC(e,t,a,o){var n=(n=Nr.current)?lc(n):null;if(!n)throw Error(R(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Li(a.href),t=oi(n).hoistableStyles,o=t.get(a),o||(o={type:"style",instance:null,count:0,state:null},t.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Li(a.href);var r=oi(n).hoistableStyles,l=r.get(e);if(l||(n=n.ownerDocument||n,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,l),(r=n.querySelector(vc(e)))?r._p||(l.instance=r,l.state.loading=5):(r=io.get(e),r||(r={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},io.set(e,r)),MM(n,e,r,l.state))),t&&o===null)throw Error(R(528,""));return l}if(t&&o!==null)throw Error(R(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(a=Di(a),t=oi(n).hoistableScripts,o=t.get(a),o||(o={type:"script",instance:null,count:0,state:null},t.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(R(444,e))}}function Li(e){return'href="'+no(e)+'"'}function vc(e){return'link[rel="stylesheet"]['+e+"]"}function sI(e){return Fe({},e,{"data-precedence":e.precedence,precedence:null})}function MM(e,t,a,o){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Rd]!==!0){o.loading=1;return}}else t=e.createElement("link"),t[Rd]=!0,t.onload=t.onerror=PC.bind(null,t),Ht(t,"link",a),It(t),e.head.appendChild(t);o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2})}function Di(e){return'[src="'+no(e)+'"]'}function Sc(e){return"script[async]"+e}function sC(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+no(a.href)+'"]');if(o)return t.instance=o,It(o),o;var n=Fe({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),It(o),Ht(o,"style",n),vd(o,a.precedence,e),t.instance=o;case"stylesheet":n=Li(a.href);var r=e.querySelector(vc(n));if(r)return t.state.loading|=4,t.instance=r,It(r),r;o=sI(a),(n=io.get(n))&&ex(o,n),r=(e.ownerDocument||e).createElement("link"),It(r);var l=r;return l._p=new Promise(function(s,i){l.onload=s,l.onerror=i}),Ht(r,"link",o),t.state.loading|=4,vd(r,a.precedence,e),t.instance=r;case"script":return r=Di(a.src),(n=e.querySelector(Sc(r)))?(t.instance=n,It(n),n):(o=a,(n=io.get(r))&&(o=Fe({},a),tx(o,n)),e=e.ownerDocument||e,n=e.createElement("script"),It(n),Ht(n,"link",o),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(R(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,vd(o,a.precedence,e));return t.instance}function vd(e,t,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=o.length?o[o.length-1]:null,r=n,l=0;l<o.length;l++){var s=o[l];if(s.dataset.precedence===t)r=s;else if(r!==n)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ex(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tx(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Sd=null;function iC(e,t,a){if(Sd===null){var o=new Map,n=Sd=new Map;n.set(a,o)}else n=Sd,o=n.get(a),o||(o=new Map,n.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),n=0;n<a.length;n++){var r=a[n];if(!(r[mc]||r[Bt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var l=r.getAttribute(t)||"";l=e+l;var s=o.get(l);s?s.push(r):o.set(l,[r])}}return o}function oy(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function NM(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function uC(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function iI(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uI(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function cC(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=uI(t),e.suspenseyImages.push(t)),e=BM.bind(e),t.decode().then(e,e))}function PM(e,t,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Li(o.href),r=t.querySelector(vc(n));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=sc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=r,It(r);return}r=t.ownerDocument||t,o=sI(o),(n=io.get(n))&&ex(o,n),r=r.createElement("link"),It(r);var l=r;l._p=new Promise(function(s,i){l.onload=s,l.onerror=i}),Ht(r,"link",o),a.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=sc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ld=0;function _M(e,t){return e.stylesheets&&e.count===0&&Cd(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&Cd(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&Ld===0&&(Ld=62500*eM());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cd(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Ld?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(n)}}:null}function cI(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Cd(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function sc(){this.count--,cI(this)}function BM(){this.imgCount--,cI(this)}var Wd=null;function Cd(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wd=new Map,t.forEach(zM,e),Wd=null,sc.call(e))}function zM(e,t){if(!(t.state.loading&4)){var a=Wd.get(e);if(a)var o=a.get(null);else{a=new Map,Wd.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<n.length;r++){var l=n[r];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(a.set(l.dataset.precedence,l),o=l)}o&&a.set(null,o)}n=t.instance,l=n.getAttribute("data-precedence"),r=a.get(l)||o,r===o&&a.set(null,n),a.set(l,n),this.count++,o=sc.bind(this),n.addEventListener("load",o),n.addEventListener("error",o),r?r.parentNode.insertBefore(n,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Ci={$$typeof:rn,Provider:null,Consumer:null,_currentValue:Ml,_currentValue2:Ml,_threadCount:0};function UM(e,t,a,o,n,r,l,s,i){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lh(0),this.hiddenUpdates=Lh(null),this.identifierPrefix=o,this.onUncaughtError=n,this.onCaughtError=r,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=i,this.transitionTypes=null,this.incompleteTransitions=new Map}function fI(e,t,a,o,n,r,l,s,i,u,d,c){return e=new UM(e,t,a,l,i,u,d,c,s),t=1,r===!0&&(t|=24),r=Sa(3,null,null,t),e.current=r,r.stateNode=e,t=Sy(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:o,isDehydrated:a,cache:t},wy(r),e}function dI(e){return e?(e=Js,e):Js}function pI(e,t,a,o,n,r){n=dI(n),o.context===null?o.context=n:o.pendingContext=n,o=_r(t),o.payload={element:a},r=r===void 0?null:r,r!==null&&(o.callback=r),a=Br(e,o,t),a!==null&&(La(a,e,t),Uu(a,e,t))}function fC(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ax(e,t){fC(e,t),(e=e.alternate)&&fC(e,t)}function mI(e){if(e.tag===13||e.tag===31){var t=Yl(e,67108864);t!==null&&La(t,e,67108864),ax(e,67108864)}}function dC(e){if(e.tag===13||e.tag===31){var t=Fa();t=uy(t);var a=Yl(e,t);a!==null&&La(a,e,t),ax(e,t)}}var wi=!0;function FM(e,t,a,o){var n=ee.T;ee.T=null;var r=ke.p;try{ke.p=2,ox(e,t,a,o)}finally{ke.p=r,ee.T=n}}function HM(e,t,a,o){var n=ee.T;ee.T=null;var r=ke.p;try{ke.p=8,ox(e,t,a,o)}finally{ke.p=r,ee.T=n}}function ox(e,t,a,o){if(wi){var n=ny(o);if(n===null)Vh(e,t,o,Jd,a),pC(e,o);else if(GM(n,e,t,a,o))o.stopPropagation();else if(pC(e,o),t&4&&-1<qM.indexOf(e)){for(;n!==null;){var r=Ai(n);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var l=kl(r.pendingLanes);if(l!==0){var s=r;for(s.pendingLanes|=2,s.entangledLanes|=2;l;){var i=1<<31-Ua(l);s.entanglements[1]|=i,l&=~i}mn(r),(Ae&6)===0&&(Xd=Ba()+500,bc(0,!1))}}break;case 31:case 13:s=Yl(r,2),s!==null&&La(s,r,2),hp(),ax(r,2)}if(r=ny(o),r===null&&Vh(e,t,o,Jd,a),r===n)break;n=r}n!==null&&o.stopPropagation()}else Vh(e,t,o,null,a)}}function ny(e){return e=dy(e),nx(e)}var Jd=null;function nx(e){if(Jd=null,e=Ol(e),e!==null){var t=cc(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=bC(t),e!==null)return e;e=null}else if(a===31){if(e=vC(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Jd=e,null}function hI(e){switch(e){case"beforetoggle":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"seeked":case"submit":case"toggle":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"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(aD()){case TC:return 2;case AC:return 8;case kd:case oD:return 32;case kC:return 268435456;default:return 32}default:return 32}}var ry=!1,Hr=null,qr=null,Gr=null,ic=new Map,uc=new Map,Ar=[],qM="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".split(" ");function pC(e,t){switch(e){case"focusin":case"focusout":Hr=null;break;case"dragenter":case"dragleave":qr=null;break;case"mouseover":case"mouseout":Gr=null;break;case"pointerover":case"pointerout":ic.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":uc.delete(t.pointerId)}}function ku(e,t,a,o,n,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:a,eventSystemFlags:o,nativeEvent:r,targetContainers:[n]},t!==null&&(t=Ai(t),t!==null&&mI(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function GM(e,t,a,o,n){switch(t){case"focusin":return Hr=ku(Hr,e,t,a,o,n),!0;case"dragenter":return qr=ku(qr,e,t,a,o,n),!0;case"mouseover":return Gr=ku(Gr,e,t,a,o,n),!0;case"pointerover":var r=n.pointerId;return ic.set(r,ku(ic.get(r)||null,e,t,a,o,n)),!0;case"gotpointercapture":return r=n.pointerId,uc.set(r,ku(uc.get(r)||null,e,t,a,o,n)),!0}return!1}function gI(e){var t=Ol(e.target);if(t!==null){var a=cc(t);if(a!==null){if(t=a.tag,t===13){if(t=bC(a),t!==null){e.blockedOn=t,US(e.priority,function(){dC(a)});return}}else if(t===31){if(t=vC(a),t!==null){e.blockedOn=t,US(e.priority,function(){dC(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ny(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);ig=o,a.target.dispatchEvent(o),ig=null}else return t=Ai(a),t!==null&&mI(t),e.blockedOn=a,!1;t.shift()}return!0}function mC(e,t,a){wd(e)&&a.delete(t)}function jM(){ry=!1,Hr!==null&&wd(Hr)&&(Hr=null),qr!==null&&wd(qr)&&(qr=null),Gr!==null&&wd(Gr)&&(Gr=null),ic.forEach(mC),uc.forEach(mC)}function nd(e,t){e.blockedOn===t&&(e.blockedOn=null,ry||(ry=!0,bt.unstable_scheduleCallback(bt.unstable_NormalPriority,jM)))}var rd=null;function hC(e){rd!==e&&(rd=e,bt.unstable_scheduleCallback(bt.unstable_NormalPriority,function(){rd===e&&(rd=null);for(var t=0;t<e.length;t+=3){var a=e[t],o=e[t+1],n=e[t+2];if(typeof o!="function"){if(nx(o||a)===null)continue;break}var r=Ai(a);r!==null&&(e.splice(t,3),t-=3,wg(r,{pending:!0,data:n,method:a.method,action:o},o,n))}}))}function Ii(e){function t(i){return nd(i,e)}Hr!==null&&nd(Hr,e),qr!==null&&nd(qr,e),Gr!==null&&nd(Gr,e),ic.forEach(t),uc.forEach(t);for(var a=0;a<Ar.length;a++){var o=Ar[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ar.length&&(a=Ar[0],a.blockedOn===null);)gI(a),a.blockedOn===null&&Ar.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var n=a[o],r=a[o+1],l=n[wa]||null;if(typeof r=="function")l||hC(a);else if(l){var s=null;if(r&&r.hasAttribute("formAction")){if(n=r,l=r[wa]||null)s=l.formAction;else if(nx(n)!==null)continue}else s=l.action;typeof s=="function"?a[o+1]=s:(a.splice(o,3),o-=3),hC(a)}}}function yI(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(l){return n=l})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function rx(e){this._internalRoot=e}xp.prototype.render=rx.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));var a=t.current,o=Fa();pI(a,o,e,t,null,null)};xp.prototype.unmount=rx.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pI(e.current,2,null,e,null,null),hp(),t[Ti]=null}};function xp(e){this._internalRoot=e}xp.prototype.unstable_scheduleHydration=function(e){if(e){var t=NC();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ar.length&&t!==0&&t<Ar[a].priority;a++);Ar.splice(a,0,e),a===0&&gI(e)}};var gC=yC.version;if(gC!=="19.3.0")throw Error(R(527,gC,"19.3.0"));ke.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=VO(t),e=e!==null?SC(e):null,e=e===null?null:e.stateNode,e};var VM={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ee,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ru=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ru.isDisabled&&Ru.supportsFiber))try{fc=Ru.inject(VM),za=Ru}catch{}var Ru;bp.createRoot=function(e,t){if(!xC(e))throw Error(R(299));var a=!1,o="",n=Z0,r=W0,l=J0;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=fI(e,1,!1,null,null,a,o,null,n,r,l,yI),e[Ti]=t.current,Qy(e),new rx(t)};bp.hydrateRoot=function(e,t,a){if(!xC(e))throw Error(R(299));var o=!1,n="",r=Z0,l=W0,s=J0,i=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(r=a.onUncaughtError),a.onCaughtError!==void 0&&(l=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(i=a.formState)),t=fI(e,1,!0,t,a??null,o,n,i,r,l,s,yI),t.context=dI(null),a=t.current,o=Fa(),o=uy(o),n=_r(o),n.callback=null,Br(a,n,o),a=o,t.current.lanes=a,pc(t,a),mn(t),e[Ti]=t.current,Qy(e),new xp(t)};bp.version="19.3.0"});var SI=Wo((AF,vI)=>{"use strict";function bI(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bI)}catch(e){console.error(e)}}bI(),vI.exports=xI()});var y1=Wo(Kp=>{"use strict";var YP=Symbol.for("react.transitional.element"),QP=Symbol.for("react.fragment");function g1(e,t,a){var o=null;if(a!==void 0&&(o=""+a),t.key!==void 0&&(o=""+t.key),"key"in t){a={};for(var n in t)n!=="key"&&(a[n]=t[n])}else a=t;return t=a.ref,{$$typeof:YP,type:e,key:o,ref:t!==void 0?t:null,props:a}}Kp.Fragment=QP;Kp.jsx=g1;Kp.jsxs=g1});var j=Wo((v8,x1)=>{"use strict";x1.exports=y1()});var WE=k(X(),1),JE=k(SI(),1);var vp=k(X(),1);var LI=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function CI(e,t,a=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:LI(e),size:24,node:t,...a.length>0?{aliases:a}:{}}}var wI=e=>{let t="",a=!1;for(let o of e){if(o==="-"||o==="_"||o<=" "){a=t.length>0;continue}t.length===0?t+=o.toLowerCase():t+=a?o.toUpperCase():o,a=!1}return t};var II=e=>{let t=wI(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Cc=k(X(),1);var Lc=(...e)=>e.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim();var Zr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function lx(e){return e!=null}function TI(e,t={}){let a=t.attributeNames??{},o=f=>a[f]??f,n=e.size??e.width??Zr.width,r=e.size??e.height??Zr.height,l=e.aliases?.filter(f=>typeof f=="string"&&f.trim()!=="").map(f=>`lucide-${f}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...l],i=t.className?.split(" ").filter(Boolean)??[],u=t.includeDefaultClasses===!1?Lc(...i):Lc("lucide",...s,...i),d=t.absoluteStrokeWidth?Number(t.strokeWidth??Zr["stroke-width"])*Number(e.size??e.width??Zr.width)/Number(t.size??t.width??Zr.width):t.strokeWidth??Zr["stroke-width"];return["svg",{...Object.entries(Zr).reduce((f,[p,x])=>(f[o(p)]=x,f),{}),..."color"in t&&t.color&&{[o("stroke")]:t.color},..."size"in t&&lx(t.size)&&{[o("width")]:t.size,[o("height")]:t.size},..."width"in t&&lx(t.width)&&{[o("width")]:t.width},..."height"in t&&lx(t.height)&&{[o("height")]:t.height},[o("stroke-width")]:d,...u&&{[o("class")]:u},[o("viewBox")]:`0 0 ${n} ${r}`,...t.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(f=>{let[p,x,g]=f,S=t.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",...x}:x;return g?[p,S,g]:[p,S]})]}function AI(e,t={}){return TI(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}var kI=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Mi=k(X(),1);var $M=(0,Mi.createContext)({});var RI=()=>(0,Mi.useContext)($M);var EI=(0,Cc.forwardRef)(({color:e,size:t,width:a,height:o,strokeWidth:n,absoluteStrokeWidth:r,nonScalingStroke:l,className:s="",children:i,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...c},f)=>{let{size:p=24,strokeWidth:x=2,absoluteStrokeWidth:g=!1,nonScalingStroke:S=!1,color:y="currentColor",className:m=""}=RI()??{},h=!!i||kI(c),[b,L,C=[]]=AI(d,{color:e??y,width:a??t??p,height:o??t??p,strokeWidth:n??x,absoluteStrokeWidth:r??g,nonScalingStroke:l??S,className:Lc(m,s),hasA11yProp:h,attributes:c});return(0,Cc.createElement)(b,{ref:f,...L},[...C.map(([T,w])=>(0,Cc.createElement)(T,w)),...Array.isArray(i)?i:[i]])});function Q(e,t=[],a=[]){let o=typeof e=="string"?CI(e,t,a):e,n=(0,vp.forwardRef)(({className:r,...l},s)=>(0,vp.createElement)(EI,{ref:s,icon:o,className:r,...l}));return o.name&&(n.displayName=II(o.name)),n}var OI={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};OI.node;var wc=Q(OI);var DI={name:"bold",size:24,node:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]};DI.node;var Ic=Q(DI);var MI={name:"calendar-clock",size:24,node:[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v3",key:"otl347"}],["path",{d:"M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338",key:"7hb8p4"}],["path",{d:"M3 9h5.859",key:"numkqi"}],["path",{d:"M8 2v3",key:"1ioesn"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]};MI.node;var Tc=Q(MI);var NI={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};NI.node;var Zn=Q(NI);var PI={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};PI.node;var Wr=Q(PI);var _I={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};_I.node;var Ao=Q(_I);var BI={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};BI.node;var Ac=Q(BI);var zI={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};zI.node;var kc=Q(zI);var UI={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};UI.node;var Rc=Q(UI);var FI={name:"hard-drive",size:24,node:[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]};FI.node;var Ec=Q(FI);var HI={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};HI.node;var Oc=Q(HI);var qI={name:"italic",size:24,node:[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]};qI.node;var Dc=Q(qI);var GI={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};GI.node;var Mc=Q(GI);var jI={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};jI.node;var Nc=Q(jI);var VI={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};VI.node;var Pc=Q(VI);var $I={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};$I.node;var Wn=Q($I);var XI={name:"paperclip",size:24,node:[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]};XI.node;var hn=Q(XI);var KI={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};KI.node;var _c=Q(KI);var YI={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};YI.node;var ko=Q(YI);var QI={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};QI.node;var Bc=Q(QI);var ZI={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};ZI.node;var Zl=Q(ZI);var WI={name:"rotate-ccw-clock",size:24,node:[["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"}]],aliases:["history"]};WI.node;var Jr=Q(WI);var JI={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};JI.node;var zc=Q(JI);var eT={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};eT.node;var gn=Q(eT);var tT={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};tT.node;var el=Q(tT);var aT={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};aT.node;var tl=Q(aT);var oT={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};oT.node;var fa=Q(oT);var Ie=k(X(),1);var Uc=class extends Error{};function Wl(e){return e.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64).replace(/-+$/,"")}var XM={$:"USD","€":"EUR","£":"GBP","¥":"JPY"};function Sp(e){let t=/^\s*([$€£¥])?\s*(-?[\d,]*\.?\d+)\s*([a-z]{3})?\s*$/i.exec(e);if(!t)return null;let a=Number(t[2].replace(/,/g,""));return Number.isFinite(a)?{value:a,currency:(t[3]??(t[1]?XM[t[1]]:"USD")).toUpperCase()}:null}var U={saved:"Saved.",savedWithFiles:e=>`Saved, with ${e===1?"the file":`${e} files`}.`,edited:"Saved. The earlier version is in History.",deleted:"Gone from your timeline. Git still has it in History.",confirmDeleteTitle:"Delete this event?",confirmDeleteBody:"It disappears from your timeline, but it stays in History and in your Git repository. Nothing is really lost.",confirmDeleteAction:"Delete",confirmDiscardTitle:"Throw this away?",confirmDiscardBody:"You've written something that hasn't been saved yet.",confirmDiscardAction:"Discard",keepWriting:"Keep writing",badAmount:"That amount didn't make sense. Try 1850, $1,850 or 1850 EUR.",stoppedTitle:"GitRoll isn't running",stoppedBody:"It runs on your computer, so nothing works until you start it again.",stoppedHint:"In your terminal:",signedOutTitle:"Open GitRoll from your terminal",signedOutBody:"The link your terminal printed is what signs this browser in. It's how GitRoll keeps your Roll to yourself.",emptyTitle:"Nothing here yet",emptyBody:"Write down what happened. You'll be glad you did when you're trying to remember it in two years.",emptyAction:"Log the first thing",noMatches:"Nothing matches that.",noMatchesHint:"Try fewer filters, or a different word.",clearFilters:"Clear the search",loadMore:"Show older",showingCount:(e,t)=>`Showing ${e} of ${t}`,composerPlaceholder:"What happened?",composerHint:"Markdown works. #tags and amounts like $40 are picked up as you type.",composerOpen:"Log something",saveEntry:"Save",saving:"Saving…",moreOptions:"More",attachHint:"Drop a photo or file here, or paste one.",tooLarge:(e,t)=>`${e} is bigger than ${t} MB, so it stayed out. Everything else is fine.`,topic:"Topic",topics:"Topics",newTopic:"New topic",newTopicTitle:"Name this topic",newTopicBody:"A topic groups related events — a house, a car, a client, a year.",newTopicLabel:"Name",newTopicPlaceholder:"Kitchen, Volvo, Mum's care…",topicsEmpty:"Topics keep related events together — a house, a car, a client. You don't need one to start logging.",notBackedUp:"On this computer only",notBackedUpHint:"Your events are saved here and committed to Git. To copy them somewhere safe, run: gitroll backup",syncedJustNow:"Backed up",backUpWhenReady:"Your events are saved and committed here. Back up when you're ready — GitRoll never uploads on its own.",syncing:"Backing up…",syncFailed:"Couldn't back up",retry:"Try again",pendingChanges:e=>`${e} ${e===1?"change":"changes"} waiting to back up`,askPlaceholder:"Ask your Roll a question, like: when was the boiler last serviced?",askThinking:"Reading your events…",askCaveat:"Answers come from the events below, and they can still be wrong. The events are the record.",askNoSources:"Nothing in your Roll seemed to answer that.",close:"Close",shortcutsTitle:"Keyboard shortcuts"};var Zt=k(X(),1);var Lp=Symbol.for("yaml.alias"),nT=Symbol.for("yaml.document"),yn=Symbol.for("yaml.map"),sx=Symbol.for("yaml.pair"),Ni=Symbol.for("yaml.scalar"),al=Symbol.for("yaml.seq"),Ga=Symbol.for("yaml.node.type"),Ro=e=>!!e&&typeof e=="object"&&e[Ga]===Lp,xn=e=>!!e&&typeof e=="object"&&e[Ga]===nT,Jn=e=>!!e&&typeof e=="object"&&e[Ga]===yn,Ce=e=>!!e&&typeof e=="object"&&e[Ga]===sx,be=e=>!!e&&typeof e=="object"&&e[Ga]===Ni,bn=e=>!!e&&typeof e=="object"&&e[Ga]===al;function ot(e){if(e&&typeof e=="object")switch(e[Ga]){case yn:case al:return!0}return!1}function we(e){if(e&&typeof e=="object")switch(e[Ga]){case Lp:case yn:case Ni:case al:return!0}return!1}var Cp=e=>(be(e)||ot(e))&&!!e.anchor;var Ia=Symbol("break visit"),rT=Symbol("skip children"),vn=Symbol("remove node");function er(e,t){let a=lT(t);xn(e)?Pi(null,e.contents,a,Object.freeze([e]))===vn&&(e.contents=null):Pi(null,e,a,Object.freeze([]))}er.BREAK=Ia;er.SKIP=rT;er.REMOVE=vn;function Pi(e,t,a,o){let n=sT(e,t,a,o);if(we(n)||Ce(n))return iT(e,o,n),Pi(e,n,a,o);if(typeof n!="symbol"){if(ot(t)){o=Object.freeze(o.concat(t));for(let r=0;r<t.items.length;++r){let l=Pi(r,t.items[r],a,o);if(typeof l=="number")r=l-1;else{if(l===Ia)return Ia;l===vn&&(t.items.splice(r,1),r-=1)}}}else if(Ce(t)){o=Object.freeze(o.concat(t));let r=Pi("key",t.key,a,o);if(r===Ia)return Ia;r===vn&&(t.key=null);let l=Pi("value",t.value,a,o);if(l===Ia)return Ia;l===vn&&(t.value=null)}}return n}async function wp(e,t){let a=lT(t);xn(e)?await _i(null,e.contents,a,Object.freeze([e]))===vn&&(e.contents=null):await _i(null,e,a,Object.freeze([]))}wp.BREAK=Ia;wp.SKIP=rT;wp.REMOVE=vn;async function _i(e,t,a,o){let n=await sT(e,t,a,o);if(we(n)||Ce(n))return iT(e,o,n),_i(e,n,a,o);if(typeof n!="symbol"){if(ot(t)){o=Object.freeze(o.concat(t));for(let r=0;r<t.items.length;++r){let l=await _i(r,t.items[r],a,o);if(typeof l=="number")r=l-1;else{if(l===Ia)return Ia;l===vn&&(t.items.splice(r,1),r-=1)}}}else if(Ce(t)){o=Object.freeze(o.concat(t));let r=await _i("key",t.key,a,o);if(r===Ia)return Ia;r===vn&&(t.key=null);let l=await _i("value",t.value,a,o);if(l===Ia)return Ia;l===vn&&(t.value=null)}}return n}function lT(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function sT(e,t,a,o){if(typeof a=="function")return a(e,t,o);if(Jn(t))return a.Map?.(e,t,o);if(bn(t))return a.Seq?.(e,t,o);if(Ce(t))return a.Pair?.(e,t,o);if(be(t))return a.Scalar?.(e,t,o);if(Ro(t))return a.Alias?.(e,t,o)}function iT(e,t,a){let o=t[t.length-1];if(ot(o))o.items[e]=a;else if(Ce(o))e==="key"?o.key=a:o.value=a;else if(xn(o))o.contents=a;else{let n=Ro(o)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}var KM={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},YM=e=>e.replace(/[!,[\]{}]/g,t=>KM[t]),Bi=class e{constructor(t,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,a)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,a){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let o=t.trim().split(/[ \t]+/),n=o.shift();switch(n){case"%TAG":{if(o.length!==2&&(a(0,"%TAG directive should contain exactly two parts"),o.length<2))return!1;let[r,l]=o;return this.tags[r]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,o.length!==1)return a(0,"%YAML directive should contain exactly one part"),!1;let[r]=o;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let l=/^\d+\.\d+$/.test(r);return a(6,`Unsupported YAML version ${r}`,l),!1}}default:return a(0,`Unknown directive ${n}`,!0),!1}}tagName(t,a){if(t==="!")return"!";if(t[0]!=="!")return a(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let l=t.slice(2,-1);return l==="!"||l==="!!"?(a(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&a("Verbatim tags must end with a >"),l)}let[,o,n]=t.match(/^(.*!)([^!]*)$/s);n||a(`The ${t} tag has no suffix`);let r=this.tags[o];if(r)try{return r+decodeURIComponent(n)}catch(l){return a(String(l)),null}return o==="!"?t:(a(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[a,o]of Object.entries(this.tags))if(t.startsWith(o))return a+YM(t.substring(o.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let a=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],o=Object.entries(this.tags),n;if(t&&o.length>0&&we(t.contents)){let r={};er(t.contents,(l,s)=>{we(s)&&s.tag&&(r[s.tag]=!0)}),n=Object.keys(r)}else n=[];for(let[r,l]of o)r==="!!"&&l==="tag:yaml.org,2002:"||(!t||n.some(s=>s.startsWith(l)))&&a.push(`%TAG ${r} ${l}`);return a.join(`
11
+ `)}};Bi.defaultYaml={explicit:!1,version:"1.2"};Bi.defaultTags={"!!":"tag:yaml.org,2002:"};function Ip(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let a=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(a)}return!0}function Jl(e,t,a,o){if(o&&typeof o=="object")if(Array.isArray(o))for(let n=0,r=o.length;n<r;++n){let l=o[n],s=Jl(e,o,String(n),l);s===void 0?delete o[n]:s!==l&&(o[n]=s)}else if(o instanceof Map)for(let n of Array.from(o.keys())){let r=o.get(n),l=Jl(e,o,n,r);l===void 0?o.delete(n):l!==r&&o.set(n,l)}else if(o instanceof Set)for(let n of Array.from(o)){let r=Jl(e,o,n,n);r===void 0?o.delete(n):r!==n&&(o.delete(n),o.add(r))}else for(let[n,r]of Object.entries(o)){let l=Jl(e,o,n,r);l===void 0?delete o[n]:l!==r&&(o[n]=l)}return e.call(t,a,o)}function At(e,t,a){if(Array.isArray(e))return e.map((o,n)=>At(o,String(n),a));if(e&&typeof e.toJSON=="function"){if(!a||!Cp(e))return e.toJSON(t,a);let o={aliasCount:0,count:1,res:void 0};a.anchors.set(e,o),a.onCreate=r=>{o.res=r,delete a.onCreate};let n=e.toJSON(t,a);return a.onCreate&&a.onCreate(n),n}return typeof e=="bigint"&&!a?.keep?Number(e):e}var ol=class{constructor(t){Object.defineProperty(this,Ga,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:a,maxAliasCount:o,onAnchor:n,reviver:r}={}){if(!xn(t))throw new TypeError("A document argument is required");let l={anchors:new Map,doc:t,keep:!0,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},s=At(this,"",l);if(typeof n=="function")for(let{count:i,res:u}of l.anchors.values())n(u,i);return typeof r=="function"?Jl(r,{"":s},"",s):s}};var es=class extends ol{constructor(t){super(Lp),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,a){if(a?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let o;a?.aliasResolveCache?o=a.aliasResolveCache:(o=[],er(t,{Node:(r,l)=>{(Ro(l)||Cp(l))&&o.push(l)}}),a&&(a.aliasResolveCache=o));let n;for(let r of o){if(r===this)break;r.anchor===this.source&&(n=r)}if(n&&a){let{anchors:r,doc:l,maxAliasCount:s}=a,i=r.get(n);if(i||(At(n,null,a),i=r.get(n)),i?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Tp(l,n,r)),i.count*i.aliasCount>s)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}}return n}toJSON(t,a){if(!a)return{source:this.source};let o=this.resolve(a.doc,a);if(!o){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(n)}return a.anchors.get(o).res}toString(t,a,o){let n=`*${this.source}`;if(t){if(Ip(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(t.implicitKey)return`${n} `}return n}};function Tp(e,t,a){if(Ro(t)){let o=t.resolve(e),n=a&&o&&a.get(o);return n?n.count*n.aliasCount:0}else if(ot(t)){let o=0;for(let n of t.items){let r=Tp(e,n,a);r>o&&(o=r)}return o}else if(Ce(t)){let o=Tp(e,t.key,a),n=Tp(e,t.value,a);return Math.max(o,n)}return 1}var Ap=e=>!e||typeof e!="function"&&typeof e!="object",ce=class extends ol{constructor(t){super(Ni),this.value=t}toJSON(t,a){return a?.keep?this.value:At(this.value,t,a)}toString(){return String(this.value)}};ce.BLOCK_FOLDED="BLOCK_FOLDED";ce.BLOCK_LITERAL="BLOCK_LITERAL";ce.PLAIN="PLAIN";ce.QUOTE_DOUBLE="QUOTE_DOUBLE";ce.QUOTE_SINGLE="QUOTE_SINGLE";var QM="tag:yaml.org,2002:";function ZM(e,t,a){if(t){let o=a.filter(r=>r.tag===t),n=o.find(r=>!r.format)??o[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return a.find(o=>o.identify?.(e)&&!o.format)}function nl(e,t,a){if(xn(e)&&(e=e.contents),we(e))return e;if(Ce(e)){let c=a.schema[yn].createNode?.(a.schema,null,a);return c.items.push(e),c}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:o,onAnchor:n,onTagObj:r,schema:l,sourceObjects:s}=a,i;if(o&&e&&typeof e=="object"){if(i=s.get(e),i)return i.anchor??(i.anchor=n(e)),new es(i.anchor);i={anchor:null,node:null},s.set(e,i)}t?.startsWith("!!")&&(t=QM+t.slice(2));let u=ZM(e,t,l.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let c=new ce(e);return i&&(i.node=c),c}u=e instanceof Map?l[yn]:Symbol.iterator in Object(e)?l[al]:l[yn]}r&&(r(u),delete a.onTagObj);let d=u?.createNode?u.createNode(a.schema,e,a):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(a.schema,e,a):new ce(e);return t?d.tag=t:u.default||(d.tag=u.tag),i&&(i.node=d),d}function ix(e,t,a){let o=a;for(let n=t.length-1;n>=0;--n){let r=t[n];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let l=[];l[r]=o,o=l}else o=new Map([[r,o]])}return nl(o,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var uT=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,zi=class extends ol{constructor(t,a){super(t),Object.defineProperty(this,"schema",{value:a,configurable:!0,enumerable:!1,writable:!0})}clone(t){let a=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(a.schema=t),a.items=a.items.map(o=>we(o)||Ce(o)?o.clone(t):o),this.range&&(a.range=this.range.slice()),a}addIn(t,a){if(uT(t))this.add(a);else{let[o,...n]=t,r=this.get(o,!0);if(ot(r))r.addIn(n,a);else if(r===void 0&&this.schema)this.set(o,ix(this.schema,n,a));else throw new Error(`Expected YAML collection at ${o}. Remaining path: ${n}`)}}deleteIn(t){let[a,...o]=t;if(o.length===0)return this.delete(a);let n=this.get(a,!0);if(ot(n))return n.deleteIn(o);throw new Error(`Expected YAML collection at ${a}. Remaining path: ${o}`)}getIn(t,a){let[o,...n]=t,r=this.get(o,!0);return n.length===0?!a&&be(r)?r.value:r:ot(r)?r.getIn(n,a):void 0}hasAllNullValues(t){return this.items.every(a=>{if(!Ce(a))return!1;let o=a.value;return o==null||t&&be(o)&&o.value==null&&!o.commentBefore&&!o.comment&&!o.tag})}hasIn(t){let[a,...o]=t;if(o.length===0)return this.has(a);let n=this.get(a,!0);return ot(n)?n.hasIn(o):!1}setIn(t,a){let[o,...n]=t;if(n.length===0)this.set(o,a);else{let r=this.get(o,!0);if(ot(r))r.setIn(n,a);else if(r===void 0&&this.schema)this.set(o,ix(this.schema,n,a));else throw new Error(`Expected YAML collection at ${o}. Remaining path: ${n}`)}}};var cT=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function rl(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var tr=(e,t,a)=>e.endsWith(`
12
+ `)?rl(a,t):a.includes(`
5
13
  `)?`
6
- `+ie(n,e):(t.endsWith(" ")?"":" ")+n;var St="flow",We="block",Me="quoted";function De(t,e,n="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:c}={}){if(!i||i<0)return t;i<r&&(r=0);let a=Math.max(1+r,1+i-e.length);if(t.length<=a)return t;let l=[],m={},f=i-e.length;typeof s=="number"&&(s>i-Math.max(2,r)?l.push(0):f=i-s);let d,b,T=!1,p=-1,h=-1,N=-1;n===We&&(p=tn(t,p,e.length),p!==-1&&(f=p+a));for(let E;E=t[p+=1];){if(n===Me&&E==="\\"){switch(h=p,t[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}N=p}if(E===`
7
- `)n===We&&(p=tn(t,p,e.length)),f=p+e.length+a,d=void 0;else{if(E===" "&&b&&b!==" "&&b!==`
8
- `&&b!==" "){let A=t[p+1];A&&A!==" "&&A!==`
9
- `&&A!==" "&&(d=p)}if(p>=f)if(d)l.push(d),f=d+a,d=void 0;else if(n===Me){for(;b===" "||b===" ";)b=E,E=t[p+=1],T=!0;let A=p>N+1?p-2:h-1;if(m[A])return t;l.push(A),m[A]=!0,f=A+a,d=void 0}else T=!0}b=E}if(T&&c&&c(),l.length===0)return t;o&&o();let $=t.slice(0,l[0]);for(let E=0;E<l.length;++E){let A=l[E],O=l[E+1]||t.length;A===0?$=`
10
- ${e}${t.slice(0,O)}`:(n===Me&&m[A]&&($+=`${t[A]}\\`),$+=`
11
- ${e}${t.slice(A+1,O)}`)}return $}function tn(t,e,n){let s=e,i=e+1,r=t[i];for(;r===" "||r===" ";)if(e<i+n)r=t[++e];else{do r=t[++e];while(r&&r!==`
12
- `);s=e,i=e+1,r=t[i]}return s}var Qe=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Xe=t=>/^(%|---|\.\.\.)/m.test(t);function Wn(t,e,n){if(!e||e<0)return!1;let s=e-n,i=t.length;if(i<=s)return!1;for(let r=0,o=0;r<i;++r)if(t[r]===`
13
- `){if(r-o>s)return!0;if(o=r+1,i-o<=s)return!1}return!0}function Pe(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:s}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(Xe(t)?" ":""),o="",c=0;for(let a=0,l=n[a];l;l=n[++a])if(l===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(o+=n.slice(c,a)+"\\ ",a+=1,c=a,l="\\"),l==="\\")switch(n[a+1]){case"u":{o+=n.slice(c,a);let m=n.substr(a+2,4);switch(m){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:m.substr(0,2)==="00"?o+="\\x"+m.substr(2):o+=n.substr(a,6)}a+=5,c=a+1}break;case"n":if(s||n[a+2]==='"'||n.length<i)a+=1;else{for(o+=n.slice(c,a)+`
14
-
15
- `;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)o+=`
16
- `,a+=2;o+=r,n[a+2]===" "&&(o+="\\"),a+=1,c=a+1}break;default:a+=1}return o=c?o+n.slice(c):n,s?o:De(o,r,Me,Qe(e,!1))}function kt(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
17
- `)||/[ \t]\n|\n[ \t]/.test(t))return Pe(t,e);let n=e.indent||(Xe(t)?" ":""),s="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
18
- ${n}`)+"'";return e.implicitKey?s:De(s,n,St,Qe(e,!1))}function Ne(t,e){let{singleQuote:n}=e.options,s;if(n===!1)s=Pe;else{let i=t.includes('"'),r=t.includes("'");i&&!r?s=kt:r&&!i?s=Pe:s=n?kt:Pe}return s(t,e)}var vt;try{vt=new RegExp(`(^|(?<!
14
+ `+rl(a,t):(e.endsWith(" ")?"":" ")+a;var ux="flow",kp="block",Fc="quoted";function Hc(e,t,a="flow",{indentAtStart:o,lineWidth:n=80,minContentWidth:r=20,onFold:l,onOverflow:s}={}){if(!n||n<0)return e;n<r&&(r=0);let i=Math.max(1+r,1+n-t.length);if(e.length<=i)return e;let u=[],d={},c=n-t.length;typeof o=="number"&&(o>n-Math.max(2,r)?u.push(0):c=n-o);let f,p,x=!1,g=-1,S=-1,y=-1;a===kp&&(g=fT(e,g,t.length),g!==-1&&(c=g+i));for(let h;h=e[g+=1];){if(a===Fc&&h==="\\"){switch(S=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if(h===`
15
+ `)a===kp&&(g=fT(e,g,t.length)),c=g+t.length+i,f=void 0;else{if(h===" "&&p&&p!==" "&&p!==`
16
+ `&&p!==" "){let b=e[g+1];b&&b!==" "&&b!==`
17
+ `&&b!==" "&&(f=g)}if(g>=c)if(f)u.push(f),c=f+i,f=void 0;else if(a===Fc){for(;p===" "||p===" ";)p=h,h=e[g+=1],x=!0;let b=g>y+1?g-2:S-1;if(d[b])return e;u.push(b),d[b]=!0,c=b+i,f=void 0}else x=!0}p=h}if(x&&s&&s(),u.length===0)return e;l&&l();let m=e.slice(0,u[0]);for(let h=0;h<u.length;++h){let b=u[h],L=u[h+1]||e.length;b===0?m=`
18
+ ${t}${e.slice(0,L)}`:(a===Fc&&d[b]&&(m+=`${e[b]}\\`),m+=`
19
+ ${t}${e.slice(b+1,L)}`)}return m}function fT(e,t,a){let o=t,n=t+1,r=e[n];for(;r===" "||r===" ";)if(t<n+a)r=e[++t];else{do r=e[++t];while(r&&r!==`
20
+ `);o=t,n=t+1,r=e[n]}return o}var Ep=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Op=e=>/^(%|---|\.\.\.)/m.test(e);function WM(e,t,a){if(!t||t<0)return!1;let o=t-a,n=e.length;if(n<=o)return!1;for(let r=0,l=0;r<n;++r)if(e[r]===`
21
+ `){if(r-l>o)return!0;if(l=r+1,n-l<=o)return!1}return!0}function qc(e,t){let a=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return a;let{implicitKey:o}=t,n=t.options.doubleQuotedMinMultiLineLength,r=t.indent||(Op(e)?" ":""),l="",s=0;for(let i=0,u=a[i];u;u=a[++i])if(u===" "&&a[i+1]==="\\"&&a[i+2]==="n"&&(l+=a.slice(s,i)+"\\ ",i+=1,s=i,u="\\"),u==="\\")switch(a[i+1]){case"u":{l+=a.slice(s,i);let d=a.substr(i+2,4);switch(d){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:d.substr(0,2)==="00"?l+="\\x"+d.substr(2):l+=a.substr(i,6)}i+=5,s=i+1}break;case"n":if(o||a[i+2]==='"'||a.length<n)i+=1;else{for(l+=a.slice(s,i)+`
22
+
23
+ `;a[i+2]==="\\"&&a[i+3]==="n"&&a[i+4]!=='"';)l+=`
24
+ `,i+=2;l+=r,a[i+2]===" "&&(l+="\\"),i+=1,s=i+1}break;default:i+=1}return l=s?l+a.slice(s):a,o?l:Hc(l,r,Fc,Ep(t,!1))}function cx(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
25
+ `)||/[ \t]\n|\n[ \t]/.test(e))return qc(e,t);let a=t.indent||(Op(e)?" ":""),o="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
26
+ ${a}`)+"'";return t.implicitKey?o:Hc(o,a,ux,Ep(t,!1))}function Ui(e,t){let{singleQuote:a}=t.options,o;if(a===!1)o=qc;else{let n=e.includes('"'),r=e.includes("'");n&&!r?o=cx:r&&!n?o=qc:o=a?cx:qc}return o(e,t)}var fx;try{fx=new RegExp(`(^|(?<!
19
27
  ))
20
28
  +(?!
21
- |$)`,"g")}catch{vt=/\n+(?!\n|$)/g}function ze({comment:t,type:e,value:n},s,i,r){let{blockQuote:o,commentString:c,lineWidth:a}=s.options;if(!o||/\n[\t ]+$/.test(n))return Ne(n,s);let l=s.indent||(s.forceBlockIndent||Xe(n)?" ":""),m=o==="literal"?!0:o==="folded"||e===w.BLOCK_FOLDED?!1:e===w.BLOCK_LITERAL?!0:!Wn(n,a,l.length);if(!n)return m?`|
29
+ |$)`,"g")}catch{fx=/\n+(?!\n|$)/g}function Rp({comment:e,type:t,value:a},o,n,r){let{blockQuote:l,commentString:s,lineWidth:i}=o.options;if(!l||/\n[\t ]+$/.test(a))return Ui(a,o);let u=o.indent||(o.forceBlockIndent||Op(a)?" ":""),d=l==="literal"?!0:l==="folded"||t===ce.BLOCK_FOLDED?!1:t===ce.BLOCK_LITERAL?!0:!WM(a,i,u.length);if(!a)return d?`|
22
30
  `:`>
23
- `;let f,d;for(d=n.length;d>0;--d){let O=n[d-1];if(O!==`
24
- `&&O!==" "&&O!==" ")break}let b=n.substring(d),T=b.indexOf(`
25
- `);T===-1?f="-":n===b||T!==b.length-1?(f="+",r&&r()):f="",b&&(n=n.slice(0,-b.length),b[b.length-1]===`
26
- `&&(b=b.slice(0,-1)),b=b.replace(vt,`$&${l}`));let p=!1,h,N=-1;for(h=0;h<n.length;++h){let O=n[h];if(O===" ")p=!0;else if(O===`
27
- `)N=h;else break}let $=n.substring(0,N<h?N+1:h);$&&(n=n.substring($.length),$=$.replace(/\n+/g,`$&${l}`));let A=(p?l?"2":"1":"")+f;if(t&&(A+=" "+c(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!m){let O=n.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),F=!1,q=Qe(s,!0);o!=="folded"&&e!==w.BLOCK_FOLDED&&(q.onOverflow=()=>{F=!0});let je=De(`${$}${O}${b}`,l,We,q);if(!F)return`>${A}
29
- ${l}${je}`}return n=n.replace(/\n+/g,`$&${l}`),`|${A}
30
- ${l}${$}${n}${b}`}function zn(t,e,n,s){let{type:i,value:r}=t,{actualString:o,implicitKey:c,indent:a,indentStep:l,inFlow:m}=e;if(c&&r.includes(`
31
- `)||m&&/[[\]{},]/.test(r))return Ne(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return c||m||!r.includes(`
32
- `)?Ne(r,e):ze(t,e,n,s);if(!c&&!m&&i!==w.PLAIN&&r.includes(`
33
- `))return ze(t,e,n,s);if(Xe(r)){if(a==="")return e.forceBlockIndent=!0,ze(t,e,n,s);if(c&&a===l)return Ne(r,e)}let f=r.replace(/\n+/g,`$&
34
- ${a}`);if(o){let d=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(f),{compat:b,tags:T}=e.doc.schema;if(T.some(d)||b?.some(d))return Ne(r,e)}return c?f:De(f,a,St,Qe(e,!1))}function _e(t,e,n,s){let{implicitKey:i,inFlow:r}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:c}=t;c!==w.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(c=w.QUOTE_DOUBLE);let a=m=>{switch(m){case w.BLOCK_FOLDED:case w.BLOCK_LITERAL:return i||r?Ne(o.value,e):ze(o,e,n,s);case w.QUOTE_DOUBLE:return Pe(o.value,e);case w.QUOTE_SINGLE:return kt(o.value,e);case w.PLAIN:return zn(o,e,n,s);default:return null}},l=a(c);if(l===null){let{defaultKeyType:m,defaultStringType:f}=e.options,d=i&&m||f;if(l=a(d),l===null)throw new Error(`Unsupported default string type ${d}`)}return l}function Tt(t,e){let n=Object.assign({blockQuote:!0,commentString:en,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function Qn(t,e){if(e.tag){let i=t.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let n,s;if(S(e)){s=e.value;let i=t.filter(r=>r.identify?.(s));if(i.length>1){let r=i.filter(o=>o.test);r.length>0&&(i=r)}n=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else s=e,n=t.find(i=>i.nodeClass&&s instanceof i.nodeClass);if(!n){let i=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${i} value`)}return n}function Xn(t,e,{anchors:n,doc:s}){if(!s.directives)return"";let i=[],r=(S(t)||L(t))&&t.anchor;r&&Ve(r)&&(n.add(r),i.push(`&${r}`));let o=t.tag??(e.default?null:e.tag);return o&&i.push(s.directives.tagString(o)),i.join(" ")}function de(t,e,n,s){if(k(t))return t.toString(e,n,s);if(K(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,r=v(t)?t:e.doc.createNode(t,{onTagObj:a=>i=a});i??(i=Qn(e.doc.schema.tags,r));let o=Xn(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let c=typeof i.stringify=="function"?i.stringify(r,e,n,s):S(r)?_e(r,e,n,s):r.toString(e,n,s);return o?S(r)||c[0]==="{"||c[0]==="["?`${o} ${c}`:`${o}
35
- ${e.indent}${c}`:c}function nn({key:t,value:e},n,s,i){let{allNullValues:r,doc:o,indent:c,indentStep:a,options:{commentString:l,indentSeq:m,simpleKeys:f}}=n,d=v(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(L(t)||!v(t)&&typeof t=="object"){let q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let b=!f&&(!t||d&&e==null&&!n.inFlow||L(t)||(S(t)?t.type===w.BLOCK_FOLDED||t.type===w.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!b&&(f||!r),indent:c+a});let T=!1,p=!1,h=de(t,n,()=>T=!0,()=>p=!0);if(!b&&!n.inFlow&&h.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=!0}if(n.inFlow){if(r||e==null)return T&&s&&s(),h===""?"?":b?`? ${h}`:h}else if(r&&!f||e==null&&b)return h=`? ${h}`,d&&!T?h+=Q(h,n.indent,l(d)):p&&i&&i(),h;T&&(d=null),b?(d&&(h+=Q(h,n.indent,l(d))),h=`? ${h}
36
- ${c}:`):(h=`${h}:`,d&&(h+=Q(h,n.indent,l(d))));let N,$,E;v(e)?(N=!!e.spaceBefore,$=e.commentBefore,E=e.comment):(N=!1,$=null,E=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!b&&!d&&S(e)&&(n.indentAtStart=h.length+1),p=!1,!m&&a.length>=2&&!n.inFlow&&!b&&V(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let A=!1,O=de(e,n,()=>A=!0,()=>p=!0),F=" ";if(d||N||$){if(F=N?`
37
- `:"",$){let q=l($);F+=`
38
- ${ie(q,n.indent)}`}O===""&&!n.inFlow?F===`
39
- `&&E&&(F=`
40
-
41
- `):F+=`
42
- ${n.indent}`}else if(!b&&L(e)){let q=O[0],je=O.indexOf(`
43
- `),qt=je!==-1,qn=n.inFlow??e.flow??e.items.length===0;if(qt||!qn){let Ht=!1;if(qt&&(q==="&"||q==="!")){let le=O.indexOf(" ");q==="&"&&le!==-1&&le<je&&O[le+1]==="!"&&(le=O.indexOf(" ",le+1)),(le===-1||je<le)&&(Ht=!0)}Ht||(F=`
44
- ${n.indent}`)}}else(O===""||O[0]===`
45
- `)&&(F="");return h+=F+O,n.inFlow?A&&s&&s():E&&!A?h+=Q(h,n.indent,l(E)):p&&i&&i(),h}function $t(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var Ze="<<",Be={identify:t=>t===Ze||typeof t=="symbol"&&t.description===Ze,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new w(Symbol(Ze)),{addToJSMap:Nt}),stringify:()=>Ze},sn=(t,e)=>(Be.identify(e)||S(e)&&(!e.type||e.type===w.PLAIN)&&Be.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===Be.tag&&n.default);function Nt(t,e,n){let s=rn(t,n);if(V(s))for(let i of s.items)Et(t,e,i);else if(Array.isArray(s))for(let i of s)Et(t,e,i);else Et(t,e,s)}function Et(t,e,n){let s=rn(t,n);if(!W(s))throw new Error("Merge sources must be maps or map aliases");let i=s.toJSON(null,t,Map);for(let[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function rn(t,e){return t&&K(e)?e.resolve(t.doc,t):e}function et(t,e,{key:n,value:s}){if(v(n)&&n.addToJSMap)n.addToJSMap(t,e,s);else if(sn(t,n))Nt(t,e,s);else{let i=C(n,"",t);if(e instanceof Map)e.set(i,C(s,i,t));else if(e instanceof Set)e.add(i);else{let r=Zn(n,i,t),o=C(s,r,t);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Zn(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(v(t)&&n?.doc){let s=Tt(n.doc,{});s.anchors=new Set;for(let r of n.anchors.keys())s.anchors.add(r.anchor);s.inFlow=!0,s.inStringifyKey=!0;let i=t.toString(s);if(!n.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),$t(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function Le(t,e,n){let s=se(t,void 0,n),i=se(e,void 0,n);return new M(s,i)}var M=class t{constructor(e,n=null){Object.defineProperty(this,_,{value:bt}),this.key=e,this.value=n}clone(e){let{key:n,value:s}=this;return v(n)&&(n=n.clone(e)),v(s)&&(s=s.clone(e)),new t(n,s)}toJSON(e,n){let s=n?.mapAsMap?new Map:{};return et(n,s,this)}toString(e,n,s){return e?.doc?nn(this,e,n,s):JSON.stringify(this)}};function nt(t,e,n){return(e.inFlow??t.flow?ts:es)(t,e,n)}function es({comment:t,items:e},n,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:c}){let{indent:a,options:{commentString:l}}=n,m=Object.assign({},n,{indent:r,type:null}),f=!1,d=[];for(let T=0;T<e.length;++T){let p=e[T],h=null;if(v(p))!f&&p.spaceBefore&&d.push(""),tt(n,d,p.commentBefore,f),p.comment&&(h=p.comment);else if(k(p)){let $=v(p.key)?p.key:null;$&&(!f&&$.spaceBefore&&d.push(""),tt(n,d,$.commentBefore,f))}f=!1;let N=de(p,m,()=>h=null,()=>f=!0);h&&(N+=Q(N,r,l(h))),f&&h&&(f=!1),d.push(s+N)}let b;if(d.length===0)b=i.start+i.end;else{b=d[0];for(let T=1;T<d.length;++T){let p=d[T];b+=p?`
46
- ${a}${p}`:`
47
- `}}return t?(b+=`
48
- `+ie(l(t),a),c&&c()):f&&o&&o(),b}function ts({items:t},e,{flowChars:n,itemIndent:s}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:c}}=e;s+=r;let a=Object.assign({},e,{indent:s,inFlow:!0,type:null}),l=!1,m=0,f=[];for(let T=0;T<t.length;++T){let p=t[T],h=null;if(v(p))p.spaceBefore&&f.push(""),tt(e,f,p.commentBefore,!1),p.comment&&(h=p.comment);else if(k(p)){let $=v(p.key)?p.key:null;$&&($.spaceBefore&&f.push(""),tt(e,f,$.commentBefore,!1),$.comment&&(l=!0));let E=v(p.value)?p.value:null;E?(E.comment&&(h=E.comment),E.commentBefore&&(l=!0)):p.value==null&&$?.comment&&(h=$.comment)}h&&(l=!0);let N=de(p,a,()=>h=null);l||(l=f.length>m||N.includes(`
49
- `)),T<t.length-1?N+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=f.reduce(($,E)=>$+E.length+2,2)+(N.length+2)>e.options.lineWidth)),l&&(N+=",")),h&&(N+=Q(N,s,c(h))),f.push(N),m=f.length}let{start:d,end:b}=n;if(f.length===0)return d+b;if(!l){let T=f.reduce((p,h)=>p+h.length+2,2);l=e.options.lineWidth>0&&T>e.options.lineWidth}if(l){let T=d;for(let p of f)T+=p?`
50
- ${r}${i}${p}`:`
51
- `;return`${T}
52
- ${i}${b}`}else return`${d}${o}${f.join(" ")}${o}${b}`}function tt({indent:t,options:{commentString:e}},n,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){let r=ie(e(s),t);n.push(r.trimStart())}}function re(t,e){let n=S(e)?e.value:e;for(let s of t)if(k(s)&&(s.key===e||s.key===n||S(s.key)&&s.key.value===n))return s}var j=class extends Ee{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(H,e),this.items=[]}static from(e,n,s){let{keepUndefined:i,replacer:r}=s,o=new this(e),c=(a,l)=>{if(typeof r=="function")l=r.call(n,a,l);else if(Array.isArray(r)&&!r.includes(a))return;(l!==void 0||i)&&o.items.push(Le(a,l,s))};if(n instanceof Map)for(let[a,l]of n)c(a,l);else if(n&&typeof n=="object")for(let a of Object.keys(n))c(a,n[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let s;k(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new M(e,e?.value):s=new M(e.key,e.value);let i=re(this.items,s.key),r=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${s.key} already set`);S(i.value)&&Ge(s.value)?i.value.value=s.value:i.value=s.value}else if(r){let o=this.items.findIndex(c=>r(s,c)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){let n=re(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let i=re(this.items,e)?.value;return(!n&&S(i)?i.value:i)??void 0}has(e){return!!re(this.items,e)}set(e,n){this.add(new M(e,n),!0)}toJSON(e,n,s){let i=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(let r of this.items)et(n,i,r);return i}toString(e,n,s){if(!e)return JSON.stringify(this);for(let i of this.items)if(!k(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),nt(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:n})}};var Ae={collection:"map",default:!0,nodeClass:j,tag:"tag:yaml.org,2002:map",resolve(t,e){return W(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>j.from(t,e,n)};var B=class extends Ee{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(te,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=st(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let s=st(e);if(typeof s!="number")return;let i=this.items[s];return!n&&S(i)?i.value:i}has(e){let n=st(e);return typeof n=="number"&&n<this.items.length}set(e,n){let s=st(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[s];S(i)&&Ge(n)?i.value=n:this.items[s]=n}toJSON(e,n){let s=[];n?.onCreate&&n.onCreate(s);let i=0;for(let r of this.items)s.push(C(r,String(i++),n));return s}toString(e,n,s){return e?nt(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(e,n,s){let{replacer:i}=s,r=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let c of n){if(typeof i=="function"){let a=n instanceof Set?c:String(o++);c=i.call(n,a,c)}r.items.push(se(c,void 0,s))}}return r}};function st(t){let e=S(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var Oe={collection:"seq",default:!0,nodeClass:B,tag:"tag:yaml.org,2002:seq",resolve(t,e){return V(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>B.from(t,e,n)};function an(t){return typeof t=="bigint"||Number.isInteger(t)}var rt=({value:t})=>JSON.stringify(t),cs=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:rt},{identify:t=>t==null,createNode:()=>new w(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:rt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:rt},{identify:an,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>an(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:rt}],fs={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},us=[Ae,Oe].concat(cs,fs);function ln(t,e,n){let{replacer:s}=n,i=new B(t);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(r++),o));let c,a;if(Array.isArray(o))if(o.length===2)c=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let l=Object.keys(o);if(l.length===1)c=l[0],a=o[c];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else c=o;i.items.push(Le(c,a,n))}return i}var At=class t extends B{constructor(){super(),this.add=j.prototype.add.bind(this),this.delete=j.prototype.delete.bind(this),this.get=j.prototype.get.bind(this),this.has=j.prototype.has.bind(this),this.set=j.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let s=new Map;n?.onCreate&&n.onCreate(s);for(let i of this.items){let r,o;if(k(i)?(r=C(i.key,"",n),o=C(i.value,r,n)):r=C(i,"",n),s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}static from(e,n,s){let i=ln(e,n,s),r=new this;return r.items=i.items,r}};At.tag="tag:yaml.org,2002:omap";var Ot=class t extends j{constructor(e){super(e),this.tag=t.tag}add(e){let n;k(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new M(e.key,null):n=new M(e,null),re(this.items,n.key)||this.items.push(n)}get(e,n){let s=re(this.items,e);return!n&&k(s)?S(s.key)?s.key.value:s.key:s}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=re(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new M(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,s);throw new Error("Set items must all have null values")}static from(e,n,s){let{replacer:i}=s,r=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),r.items.push(Le(o,null,s));return r}};Ot.tag="tag:yaml.org,2002:set";function ps(t,e){let n=t[0],s=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),r=s.replace(/_/g,"").split(":").reduce((o,c)=>o*i(60)+i(c),i(0));return n==="-"?i(-1)*r:r}var It={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(It.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,s,i,r,o,c]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(n,s-1,i,r||0,o||0,c||0,a),m=e[8];if(m&&m!=="Z"){let f=ps(m,!1);Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var Mt=Symbol("break visit"),Es=Symbol("skip children"),fn=Symbol("remove item");function me(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),un(Object.freeze([]),t,e)}me.BREAK=Mt;me.SKIP=Es;me.REMOVE=fn;me.itemAtPath=(t,e)=>{let n=t;for(let[s,i]of e){let r=n?.[s];if(r&&"items"in r)n=r.items[i];else return}return n};me.parentCollection=(t,e)=>{let n=me.itemAtPath(t,e.slice(0,-1)),s=e[e.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function un(t,e,n){let s=n(e,t);if(typeof s=="symbol")return s;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let c=un(Object.freeze(t.concat([[i,o]])),r.items[o],n);if(typeof c=="number")o=c-1;else{if(c===Mt)return Mt;c===fn&&(r.items.splice(o,1),o-=1)}}typeof s=="function"&&i==="key"&&(s=s(e,t))}}return typeof s=="function"?s(e,t):s}var zc=new Set("0123456789ABCDEFabcdef"),Qc=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Xc=new Set(",[]{}"),Zc=new Set(` ,[]{}
53
- \r `);var oe="log";function dn(t){return t.trim().replace(/^#+/,"").toLowerCase().replace(/\s+/g,"-").replace(/[^\p{L}\p{N}_-]/gu,"")}var xs={p:"project",project:"project",projects:"project",t:"tag",tag:"tag",tags:"tag",type:"type",author:"author",by:"author",person:"author",who:"author",after:"after",from:"after",since:"after",before:"before",to:"before",until:"before",on:"on",date:"on",amount:"amount",has:"has"},Ms=t=>xs[t.toLowerCase()]??t.toLowerCase();function lt(t){let e=[];for(let n of t.matchAll(/(?:([A-Za-z_][\w-]*):)?(?:"([^"]*)"|(\S+))/g)){let s=n[1],i=(n[2]??n[3]??"").trim();if(s&&i.startsWith("//")){e.push({value:`${s}:${i}`});continue}i&&(!s&&/^#[\p{L}\p{N}]/u.test(i)?e.push({key:"tag",value:i.slice(1)}):e.push(s?{key:Ms(s),value:i}:{value:i}))}return e}function ct(t){return t.map(e=>{let n=/[\s"]/.test(e.value)?`"${e.value.replace(/"/g,"")}"`:e.value;return e.key?`${e.key}:${n}`:n}).join(" ")}function Ds(t){let e={terms:[],projects:[],tags:[],types:[],authors:[],amounts:[],has:[],fields:[]};for(let{key:n,value:s}of lt(t))switch(n){case void 0:e.terms.push(s.toLowerCase());break;case"project":e.projects.push(Yt(s));break;case"tag":e.tags.push(dn(s));break;case"type":e.types.push(s.toLowerCase());break;case"author":e.authors.push(s.toLowerCase());break;case"after":e.after=hn(s)??e.after;break;case"before":e.before=gn(s)??e.before;break;case"on":e.after=hn(s)??e.after,e.before=gn(s)??e.before;break;case"amount":{let i=/^(>=|<=|>|<|=)?\s*[$€£¥]?([\d,]*\.?\d+)$/.exec(s);i&&e.amounts.push({op:i[1]??"=",value:Number(i[2].replace(/,/g,""))});break}case"has":e.has.push(s.toLowerCase());break;default:e.fields.push({key:n,value:s.toLowerCase()})}return e}var mn=t=>t!==null&&typeof t=="object"?JSON.stringify(t):String(t),Ps=new Set(["expense","purchase","payment"]),at=class{entries;#e;#t=new WeakMap;constructor(e,n={}){this.entries=e,this.#e=n}search(e){if(!e.trim())return this.entries;let n=Ds(e);return this.entries.filter(s=>this.matches(s,n))}matches(e,n){if(n.projects.length&&!n.projects.some(r=>e.projects.includes(r))||n.tags.length&&!n.tags.some(r=>e.tags.includes(r))||n.types.length&&!n.types.includes(e.type)||n.authors.length&&!n.authors.some(r=>e.author.toLowerCase().includes(r)))return!1;let s=Date.parse(e.occurred);if(n.after!==void 0&&s<n.after||n.before!==void 0&&s>n.before||n.amounts.length&&!(e.amount&&n.amounts.every(r=>_s(e.amount.value,r)))||!n.has.every(r=>Bs(e,r)))return!1;for(let r of n.fields){let o=e.data[r.key];if(o==null||!mn(o).toLowerCase().includes(r.value))return!1}if(!n.terms.length)return!0;let i=this.#n(e);return n.terms.every(r=>i.includes(r))}#n(e){let n=this.#t.get(e);return n===void 0&&(n=[e.body,e.author,e.type,this.#e.typeLabels?.get(e.type)??"",...e.tags,...e.projects.flatMap(s=>[s,this.#e.projectNames?.get(s)??""]),...e.attachments.map(s=>s.name),e.amount?`${e.amount.value} ${e.amount.currency}`:"",...Object.values(e.data).map(mn),e.source?.adapter??""].join(`
54
- `).toLowerCase(),this.#t.set(e,n)),n}};function _s(t,e){switch(e.op){case">":return t>e.value;case">=":return t>=e.value;case"<":return t<e.value;case"<=":return t<=e.value;default:return t===e.value}}function Bs(t,e){let n=t.attachments;switch(e){case"attachment":case"attachments":case"file":case"files":return n.length>0;case"photo":case"photos":case"image":case"images":return n.some(s=>s.type.startsWith("image/"));case"receipt":case"receipts":return n.some(s=>s.type==="application/pdf"||/receipt/i.test(s.name))||n.length>0&&Ps.has(t.type);case"pdf":case"document":return n.some(s=>s.type==="application/pdf");case"amount":case"money":return!!t.amount;default:{let s=t.data[e];return s!=null&&s!==""&&s!==!1}}}function yn(t){let e=/^(\d{4})(?:-(\d{2}))?(?:-(\d{2}))?$/.exec(t);return e?[Number(e[1]),e[2]?Number(e[2])-1:0,e[3]?Number(e[3]):null]:null}function hn(t){let e=yn(t);return e?new Date(e[0],e[1],e[2]??1).getTime():void 0}function gn(t){let e=yn(t);return e?(/^\d{4}$/.test(t)?new Date(e[0]+1,0,1):e[2]===null?new Date(e[0],e[1]+1,1):new Date(e[0],e[1],e[2]+1)).getTime()-1:void 0}var Ie=(t,e,n,s,i,r)=>({id:t,label:e,icon:n,amount:s,fields:i,description:r,builtin:!0}),ft=(t,e,n={})=>({key:t,label:e,kind:"text",...n}),bn=(t,e)=>({key:t,label:e,kind:"date"}),ut=(t,e,n)=>({key:t,label:e,kind:"select",options:n}),Rs=[Ie(oe,"Log","📝","optional",[],"Something happened."),Ie("expense","Expense","🧾","expected",[ft("vendor","Paid to"),ft("category","Category"),ut("method","Method",["card","cash","check","transfer","other"])],"Money spent, usually with a receipt."),Ie("maintenance","Maintenance","🔧","optional",[ft("asset","Asset"),ft("vendor","Done by"),bn("next_due","Next due"),bn("warranty_until","Warranty until")],"Service, repair or upkeep."),Ie("decision","Decision","⚖️","none",[ut("status","Status",["decided","proposed","reversed"]),{key:"alternatives",label:"Alternatives considered",kind:"longtext"}],"A choice that was made, and why."),Ie("milestone","Milestone","🏁","none",[],"A notable moment."),Ie("issue","Issue","⚠️","optional",[ut("severity","Severity",["low","medium","high"]),ut("status","Status",["open","resolved"])],"A problem that was noticed.")];function Dt(t=[]){let e=new Map(Rs.map(n=>[n.id,n]));for(let n of t)e.set(n.id,n);return e}function he(t,e){return t.get(e)??{...t.get(oe),id:e,label:e,icon:"",builtin:!1}}function wn(t,e){let n={};for(let[s,i]of Object.entries(e)){let r=t.fields.find(o=>o.key===s);if(!(i===""||i==null)){if(!r){n[s]=i;continue}switch(r.kind){case"number":{let o=typeof i=="number"?i:Number(String(i).replace(/,/g,""));n[s]=Number.isFinite(o)?o:i;break}case"boolean":n[s]=i===!0||i==="true"||i==="on"||i==="yes";break;default:n[s]=typeof i=="string"?i.trim():i}}}return n}var x={saved:"Saved.",edited:"Changes saved. Earlier versions are in History.",deleted:"Deleted. It's still in History.",confirmDelete:"Delete this event? It won't show in your timeline, but it stays in History.",confirmDiscard:"Discard what you wrote?",badAmount:"That amount doesn't look right. Try 1850 or $1,850.",stopped:"GitRoll has stopped. Start it again from your terminal with: gitroll",signedOut:"For your privacy, open GitRoll from the link shown in your terminal.",empty:"Nothing logged yet.",noMatches:"Nothing found.",notBackedUp:"Not backed up yet",newProject:"Project name",askPlaceholder:"Ask a question, like: When was the AC last serviced?"},Fs=1e4,y=(t,e=document)=>e.querySelector(t),we=y("#view"),ye=y("#composer"),P=null,Pt=null,Sn="",G=Dt(),U=null,ae=null,R=null,be=null,ge="ok",I=()=>{if(!P)throw new Error(x.stopped);return P};function u(t){return String(t??"").replace(/[&<>"']/g,e=>`&#${e.charCodeAt(0)};`)}var Se=t=>t instanceof Error?t.message:String(t),Ce=(t,e,n)=>`${t} ${t===1?e:n}`,Ks=t=>typeof t=="string"&&/^https?:\/\//i.test(t);function Re(t,e){let n=t;return!n||n._html===e?!1:(n.innerHTML=e,n._html=e,gt(n),!0)}var kn=0;function X(t,e=!1){let n=y("#toast");n.textContent=t,n.className=`show${e?" error":""}`,clearTimeout(kn),kn=window.setTimeout(()=>n.className="",e?8e3:3e3)}var Us=t=>new Date(t).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});function Nn(t){let e=new Date,n=new Date;return n.setDate(e.getDate()-1),t.toDateString()===e.toDateString()?"Today":t.toDateString()===n.toDateString()?"Yesterday":t.toLocaleDateString([],{weekday:"long",month:"long",day:"numeric",year:t.getFullYear()===e.getFullYear()?void 0:"numeric"})}function Ln(t){try{return new Intl.NumberFormat([],{style:"currency",currency:t.currency}).format(t.value)}catch{return`${t.value} ${t.currency}`}}function An(t){return t?t<1024?`${t} B`:t<1048576?`${Math.round(t/1024)} KB`:`${(t/1048576).toFixed(1)} MB`:""}var Fe=t=>t.type.startsWith("image/")&&!t.type.includes("svg")&&!t.type.includes("heic"),On=t=>Fe(t)?"Photo":t.type==="application/pdf"?"PDF":"File",Rt=t=>I().projects().find(e=>e.slug===t)?.name??t,Ft=t=>`#/?q=${encodeURIComponent(ct(t))}`;function qs(t){let e=new Date(t),n=s=>String(s).padStart(2,"0");return`${e.getFullYear()}-${n(e.getMonth()+1)}-${n(e.getDate())}T${n(e.getHours())}:${n(e.getMinutes())}`}function In(t){return t.trim()?t.trim().split(/\n{2,}/).map(e=>`<p>${Hs(u(e)).replace(/\n/g,"<br>")}</p>`).join(""):""}function Hs(t){return t.replace(/https?:\/\/[^\s<]+[^\s<.,;:!?)]/g,e=>`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`).replace(/(^|[\s(>])#(\p{L}[\p{L}\p{N}_-]*)/gu,(e,n,s)=>`${n}<a class="tag" href="${Ft([{key:"tag",value:s.toLowerCase()}])}" data-filter-key="tag" data-filter-value="${u(s.toLowerCase())}">#${s}</a>`)}function pt(t,e,n,s=""){return`<a class="${s}" href="${Ft([{key:t,value:e}])}" data-filter-key="${u(t)}" data-filter-value="${u(e)}">${n}</a>`}function gt(t){if(!P)return;let e=new Map(P.entries().flatMap(n=>n.attachments.map(s=>[s.hash,s])));for(let n of t.querySelectorAll("[data-att]")){let s=e.get(n.dataset.att);if(delete n.dataset.att,!s)continue;let i=P.attachmentUrl(s);n instanceof HTMLImageElement?(n.src=i,n.addEventListener("error",()=>n.classList.add("broken"),{once:!0})):n instanceof HTMLAnchorElement&&(n.href=i)}}function Cn(){let t=I();return(!Pt||Sn!==t.version())&&(G=Dt(t.types()),Pt=new at(t.entries(),{projectNames:new Map(t.projects().map(e=>[e.slug,e.name])),typeLabels:new Map([...G.values()].map(e=>[e.id,e.label]))}),Sn=t.version()),Pt}var jn=()=>new Set(I().entries().map(t=>t.author)).size>1;function xn(t){document.body.classList.remove("connected"),we.innerHTML=`
55
- <section class="notice">
56
- <h1>GitRoll</h1>
57
- <p>${t==="signed-out"?u(x.signedOut):"GitRoll isn't running."}</p>
58
- ${t==="stopped"?'<p class="muted">Start it from your terminal:</p><pre class="cmd">gitroll</pre>':""}
59
- </section>`}function Mn(t,e={}){if(window.top!==window.self){document.body.textContent="For your security, GitRoll can't be shown inside another page.";return}ai(),P=t;let n=y("#sync").childNodes[0];e.syncLabel&&n&&(n.textContent=e.syncLabel),document.body.classList.add("connected"),Ke(),Kt()}function Ke(){let t=I().info(),e=t.sync;y("#roll-name").textContent=t.name,document.title=`${t.name} · GitRoll`;let n=y("#sync-count");n.hidden=!e.ahead,n.textContent=String(e.ahead),y("#sync").title=e.remote?e.ahead?`${Ce(e.ahead,"change","changes")} to sync`:"Everything is synced":`${x.notBackedUp}. Your events are saved on this computer.`}function Kt(){if(!P)return;U=null,ae=null,R=null;let t=location.hash||"#/";for(let e of document.querySelectorAll("[data-nav]"))e.dataset.nav===(t.startsWith("#/projects")?"projects":"timeline")?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current");try{Cn();let e;(e=t.match(/^#\/?(?:\?q=(.*))?$/))?Vs(decodeURIComponent(e[1]??"")):t==="#/projects"?Xs():(e=t.match(/^#\/entry\/([^/?]+)$/))?Zs(decodeURIComponent(e[1])):location.replace("#/")}catch(e){we.innerHTML=`<p class="banner error">${u(Se(e))}</p>`}}function Ys(){let t=I().info(),e=[];ge!=="ok"&&e.push(`<p class="banner error">${u(ge==="signed-out"?x.signedOut:x.stopped)}</p>`);for(let n of t.warnings)e.push(`<p class="banner">${u(n)}</p>`);return be&&!be.ok&&be.code!=="no-remote"&&e.push(`<p class="banner">${u(be.message)} <button class="link" data-action="sync">Try again</button></p>`),t.problems.length&&e.push(`<details class="banner"><summary>${Ce(t.problems.length,"file","files")} in this Roll couldn't be read</summary>
60
- <ul>${t.problems.map(n=>`<li><code>${u(n.path)}</code>: ${u(n.error)}</li>`).join("")}</ul></details>`),e.join("")}function Vs(t){let e=lt(t),n=e.filter(l=>l.key),s=I().info().ai.enabled;we.innerHTML=`
61
- <section class="find" role="search">
62
- <div class="searchbox">
63
- <input id="q" type="search" placeholder="Search" autocomplete="off" spellcheck="false" enterkeyhint="search" aria-label="Search">
64
- ${s?`<button type="button" class="secondary" data-action="ask" title="${u(x.askPlaceholder)}">Ask</button>`:""}
65
- </div>
66
- <div class="chips" id="quick"></div>
67
- </section>
68
- <div id="answer"></div>
69
- <div id="banners"></div>
70
- <div id="summary"></div>
71
- <div id="list"></div>`;let i=y("#q");i.value=ct(e.filter(l=>!l.key));let r=(l,m,f)=>l.key===m&&l.value.toLowerCase()===f.toLowerCase(),o=()=>[ct(n),i.value.trim()].filter(Boolean).join(" "),c=()=>{let l=o();history.replaceState(null,"",l?`#/?q=${encodeURIComponent(l)}`:"#/"),U?.()};ae={toggle(l,m){let f=n.findIndex(d=>r(d,l,m));f>=0?n.splice(f,1):n.push({key:l,value:m}),c()},dates(l){let m=n.find(f=>f.key==="after")?.value;n=n.filter(f=>!["after","before","on"].includes(f.key)),l&&l!==m&&n.push({key:"after",value:l}),c()},clear(){n=[],i.value="",c()},query:()=>i.value.trim()},U=()=>{let l=o(),m=Cn().search(l);Re(y("#banners"),Ys()),Re(y("#quick"),Js(n)),Re(y("#summary"),Gs(m,!!l)),Re(y("#list"),m.length||l?Dn(m,`<p>${x.noMatches}</p>${l?'<button class="link" data-action="clear-filters">Show everything</button>':""}`):`<div class="empty"><p class="big">What happened?</p><p class="muted">${x.empty}</p><button class="primary" data-action="new">Log something</button></div>`)};let a=0;i.addEventListener("input",()=>{clearTimeout(a),a=window.setTimeout(c,80)}),i.addEventListener("keydown",l=>{l.key==="Escape"&&i.value&&(i.value="",c())}),U()}function Js(t){let e=new Date,n=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-01`,s=`${e.getFullYear()}-01-01`,i=t.find(a=>a.key==="after")?.value,r=(a,l,m)=>`<button type="button" class="chip${l?" on":""}" aria-pressed="${l}" ${m}>${a}</button>`,o=[r("This month",i===n,`data-date-after="${n}"`),r("This year",i===s,`data-date-after="${s}"`),r("With files",t.some(a=>a.key==="has"&&a.value==="attachment"),'data-filter-key="has" data-filter-value="attachment"')],c=t.filter(a=>!(a.key==="has"&&a.value==="attachment")&&!(a.key==="after"&&(a.value===n||a.value===s))).map(a=>`<button type="button" class="chip on" data-filter-key="${u(a.key)}" data-filter-value="${u(a.value)}" aria-label="Remove ${u(vn(a))}">${u(vn(a))} <span aria-hidden="true">×</span></button>`);return[...o,...c].join("")}function vn(t){switch(t.key){case"project":return Rt(t.value);case"tag":return`#${t.value}`;case"type":return he(G,t.value).label;case"author":return t.value;case"after":return`Since ${t.value}`;case"before":return`Until ${t.value}`;case"on":return t.value;case"has":return`With ${t.value}`;default:return`${t.key}: ${t.value}`}}function Gs(t,e){if(!e)return"";let n=new Map;for(let i of t)i.amount&&n.set(i.amount.currency,(n.get(i.amount.currency)??0)+i.amount.value);let s=[Ce(t.length,"event","events")];for(let[i,r]of n)s.push(`${Ln({value:r,currency:i})} total`);return`<p class="summary">${s.map(u).join(" · ")}</p>`}function Dn(t,e){if(!t.length)return`<div class="empty">${e}</div>`;let n=jn(),s="",i="";for(let r of t){let o=new Date(r.occurred);o.toDateString()!==i&&(s+=`${i?"</section>":""}<section class="day"><h2>${u(Nn(o))}</h2>`,i=o.toDateString()),s+=zs(r,n)}return`${s}</section>`}function Pn(t,e){let n=[];for(let s of e.fields){let i=t.data[s.key];i!=null&&i!==""&&i!==!1&&n.push([u(s.label),Ws(s,i)])}for(let[s,i]of Object.entries(t.data))e.fields.some(r=>r.key===s)||i==null||i===""||n.push([u(s.replace(/_/g," ")),u(typeof i=="object"?JSON.stringify(i):String(i))]);return n}function Ws(t,e){if(t.kind==="boolean")return e===!0?"Yes":"No";if(t.kind==="date"){let n=new Date(`${String(e).slice(0,10)}T12:00:00`);return u(Number.isNaN(n.getTime())?String(e):n.toLocaleDateString([],{dateStyle:"medium"}))}return t.kind==="url"&&Ks(e)?`<a href="${u(e)}" target="_blank" rel="noopener noreferrer">${u(e)}</a>`:u(typeof e=="object"?JSON.stringify(e):String(e))}function _n(t,e){let n=[];for(let s of t.projects)n.push(pt("project",s,u(Rt(s)),"project"));return t.type!==oe&&n.push(pt("type",t.type,u(e.label),"kind")),t.amount&&n.push(`<span class="amount">${u(Ln(t.amount))}</span>`),n.length?`<div class="labels">${n.join("")}</div>`:""}function Bn(t,e,n=!0){let s=[];n&&t.attachments.length&&s.push(`<span>${Ce(t.attachments.length,"file","files")}</span>`);for(let i of t.tags)s.push(pt("tag",i,`#${u(i)}`,"tag"));return e&&t.author&&s.push(pt("author",t.author,u(t.author),"author")),s.length?`<div class="foot">${s.join("")}</div>`:""}function zs(t,e){let n=he(G,t.type),s=t.attachments.filter(Fe),i=Pn(t,n).slice(0,2);return`
72
- <article class="entry" data-id="${u(t.id)}" tabindex="0">
73
- <time class="when" datetime="${u(t.occurred)}">${Us(t.occurred)}</time>
74
- <div class="content">
75
- ${_n(t,n)}
76
- <div class="body">${In(t.body)}</div>
77
- ${i.length?`<div class="fields">${i.map(([r,o])=>`<span><small>${r}</small> ${o}</span>`).join("")}</div>`:""}
78
- ${s.length?`<div class="thumbs">${s.slice(0,4).map(r=>`<img data-att="${u(r.hash)}" alt="${u(r.name)}" loading="lazy">`).join("")}${s.length>4?`<span class="more">+${s.length-4}</span>`:""}</div>`:""}
79
- ${Bn(t,e)}
80
- </div>
81
- </article>`}async function Qs(){let t=ae?.query()??"",e=y("#answer");if(!t){y("#q").placeholder=x.askPlaceholder,y("#q").focus();return}e.innerHTML='<div class="answer muted">Thinking…</div>';try{let{answer:n,sources:s}=await I().ask(t),i=new Map(s.map(c=>[c.short,c.id])),r=u(n).replace(/\[([0-9a-f]{8})\]/g,(c,a)=>i.has(a)?`<a href="#/entry/${encodeURIComponent(i.get(a))}" class="cite">view</a>`:""),o=I().entries().filter(c=>s.some(a=>a.id===c.id));e.innerHTML=`
82
- <div class="answer">
83
- <p>${r.replace(/\n/g,"<br>")}</p>
84
- ${o.length?`<p class="muted small">Based on ${Ce(o.length,"event","events")} below. Answers can be wrong; check the events.</p>${Dn(o,"")}`:'<p class="muted small">No events were cited. Answers can be wrong.</p>'}
85
- <button class="link" data-action="close-answer">Close</button>
86
- </div>`,gt(e)}catch(n){e.innerHTML=`<p class="banner error">${u(Se(n))}</p>`}}function Xs(){we.innerHTML='<div class="page-head"><h1>Projects</h1><button class="secondary" data-action="new-project">New project</button></div><div id="list"></div>',U=()=>{let t=I().entries(),e=I().projects(),n=[...new Set(t.flatMap(i=>i.projects))].filter(i=>!e.some(r=>r.slug===i)).map(i=>({slug:i,name:i})),s=[...e,...n].map(i=>{let r=t.filter(o=>o.projects.includes(i.slug));return{...i,count:r.length,last:r[0]?.occurred}});Re(y("#list"),s.length?`<ul class="list">${s.map(i=>`<li><a class="row" href="${Ft([{key:"project",value:i.slug}])}"><strong>${u(i.name)}</strong><span>${Ce(i.count,"event","events")}${i.last?` · ${u(Nn(new Date(i.last)))}`:""}</span></a></li>`).join("")}</ul>`:'<div class="empty"><p class="muted">Projects group related events, like House or Car.</p><button class="primary" data-action="new-project">New project</button></div>')},U()}function Zs(t){U=()=>{let e=I().entries().find(i=>i.id===t);if(!e){R=null,we.innerHTML=`<button class="link back" data-action="back">← Back</button><div class="empty"><p class="muted">This event was deleted. It's still in History.</p></div>`;return}if(R&&JSON.stringify(R)===JSON.stringify(e))return;R=e;let n=he(G,e.type),s=Pn(e,n);we.innerHTML=`
87
- <button class="link back" data-action="back">← Back</button>
88
- <article class="detail">
89
- <time datetime="${u(e.occurred)}">${u(new Date(e.occurred).toLocaleString([],{dateStyle:"full",timeStyle:"short"}))}</time>
90
- ${_n(e,n)}
91
- <div class="body large">${In(e.body)}</div>
92
- ${s.length?`<dl class="facts">${s.map(([i,r])=>`<dt>${i}</dt><dd>${r}</dd>`).join("")}</dl>`:""}
93
- ${e.attachments.length?`<div class="attachments">${e.attachments.map(ei).join("")}</div>`:""}
94
- ${Bn(e,jn(),!1)}
95
- <div class="actions">
96
- <button class="secondary" data-action="edit">Edit</button>
97
- <button class="secondary" data-action="history">History</button>
98
- <button class="secondary danger" data-action="delete">Delete</button>
99
- </div>
100
- <details class="more-info">
101
- <summary>Details</summary>
102
- <dl class="facts">
103
- <dt>Logged by</dt><dd>${u(e.author||"Unknown")}</dd>
104
- <dt>Logged on</dt><dd>${u(new Date(e.created).toLocaleString())}</dd>
105
- ${e.source?`<dt>Imported from</dt><dd>${u(e.source.adapter)}</dd>`:""}
106
- <dt>File</dt><dd><code>${u(e.path)}</code></dd>
107
- </dl>
108
- </details>
109
- <section id="history" class="history"></section>
110
- </article>`,gt(we)},U()}function ei(t){if(Fe(t))return`<a class="att img" data-att="${u(t.hash)}" target="_blank" rel="noopener noreferrer"><img data-att="${u(t.hash)}" alt="${u(t.name)}"></a>`;let e=t.type==="application/pdf"||/^(image|video|audio)\//.test(t.type)||t.type==="text/plain";return`<a class="att file" data-att="${u(t.hash)}" ${e?'target="_blank" rel="noopener noreferrer"':`download="${u(t.name)}"`}>
111
- <span class="kind">${On(t)}</span><span class="fname">${u(t.name)}</span><small>${u(An(t.size))}</small></a>`}async function ti(t){let e=y("#history");e.innerHTML='<p class="muted">Loading…</p>';try{let n=await I().history(t.id);e.innerHTML=`<h2>History</h2><ol class="revs">${n.map((s,i)=>{let r=i===n.length-1;return`<li><div class="rev-head"><strong>${r?"Logged":"Edited"}</strong> ${u(new Date(s.date).toLocaleString([],{dateStyle:"medium",timeStyle:"short"}))} · ${u(s.author)}</div>
112
- ${r?"":`<pre class="diff">${ni(s.patch)}</pre>`}</li>`}).join("")}</ol>`}catch(n){e.innerHTML=`<p class="banner error">${u(Se(n))}</p>`}}function ni(t){return t.split(`
113
- `).filter(e=>!/^(diff --git|index |--- |\+\+\+ |\\ No newline|new file mode|deleted file mode|similarity index|rename (from|to) |@@)/.test(e)).filter(e=>/^[+-]/.test(e)).map(e=>`<span class="${e.startsWith("+")?"add":"del"}">${u(e.slice(1))||"&nbsp;"}</span>`).join(`
114
- `)}var g={editing:null,type:oe,data:{},files:[],removed:new Set,projects:new Set,initialWhen:""},dt=new Map;function Tn(){let t=(location.hash||"").match(/^#\/?\?q=(.*)$/);if(!t)return;let e=lt(decodeURIComponent(t[1])).filter(n=>n.key==="project");return e.length===1?e[0].value:void 0}function _t(t={}){let e=t.entry??null;g.editing=e,g.type=e?.type??oe,g.data={...e?.data??{}},g.files=[],g.removed=new Set,g.projects=new Set(e?e.projects:t.project?[t.project]:[]),g.initialWhen=e?qs(e.occurred):"",y("#c-title").textContent=e?"Edit":"What happened?",y("#c-text").value=e?.body??"",y("#c-tags").value=e?e.tags.join(", "):"",y("#c-amount").value=e?.amount?`${e.amount.value}${e.amount.currency!=="USD"?` ${e.amount.currency}`:""}`:"",y("#c-when").value=g.initialWhen,y("#c-more").open=!!e&&(e.type!==oe||e.projects.length>0||!!e.amount||e.tags.length>0),Fn(),Kn(),mt(),ht(),ye.showModal(),y("#c-text").focus()}function Rn(){for(let t of dt.values())URL.revokeObjectURL(t);dt.clear(),ye.close()}var $n=()=>!g.editing&&(y("#c-text").value.trim()!==""||g.files.length>0);function Fn(){y("#c-types").innerHTML=[...G.values()].map(t=>`<button type="button" class="chip${g.type===t.id?" on":""}" data-type-pick="${u(t.id)}" aria-pressed="${g.type===t.id}">${u(t.label)}</button>`).join("")}function Kn(){let t=he(G,g.type);y("#c-fields").innerHTML=t.fields.map(e=>si(e,g.data[e.key])).join("")}function si(t,e){let n=e==null?"":String(e),s=`data-field="${u(t.key)}"${t.required?" required":""}`,i=u(t.label);switch(t.kind){case"longtext":return`<label class="wide">${i}<textarea ${s} rows="2">${u(n)}</textarea></label>`;case"select":return`<label>${i}<select ${s}><option value=""></option>${(t.options??[]).map(r=>`<option${r===n?" selected":""}>${u(r)}</option>`).join("")}</select></label>`;case"boolean":return`<label class="check"><input type="checkbox" ${s}${e===!0?" checked":""}> ${i}</label>`;case"date":return`<label>${i}<input type="date" ${s} value="${u(n.slice(0,10))}"></label>`;case"number":return`<label>${i}<input type="number" step="any" ${s} value="${u(n)}"></label>`;case"url":return`<label>${i}<input type="url" ${s} value="${u(n)}" placeholder="https://"></label>`;default:return`<label>${i}<input ${s} value="${u(n)}"></label>`}}function ii(t){let e=t.defaults;if(!e||g.editing)return;let n=y("#c-text");e.text&&!n.value.trim()&&(n.value=e.text);let s=y("#c-tags");e.tags?.length&&!s.value.trim()&&(s.value=e.tags.join(", "));let i=y("#c-amount");e.amount&&!i.value.trim()&&(i.value=String(e.amount.value));for(let r of e.projects??[])g.projects.add(r);for(let[r,o]of Object.entries(e.data??{}))(g.data[r]==null||g.data[r]==="")&&(g.data[r]=o);mt()}function Un(){for(let t of document.querySelectorAll("#c-fields [data-field]"))g.data[t.dataset.field]=t.type==="checkbox"?t.checked?!0:void 0:t.value}function mt(){let t=new Set([...I().projects().map(e=>e.slug),...g.projects]);y("#c-projects").innerHTML=[...t].map(e=>`<button type="button" class="chip${g.projects.has(e)?" on":""}" data-project-toggle="${u(e)}" aria-pressed="${g.projects.has(e)}">${u(Rt(e))}</button>`).join("")+'<button type="button" class="chip add" data-action="composer-new-project">New project</button>'}function Bt(t){let e=I().info().maxAttachmentBytes;for(let n of t)n.size>e?X(`${n.name} is too large. Files can be up to ${Math.round(e/1048576)} MB.`,!0):g.files.push(n);ht()}function ht(){let t=(g.editing?.attachments??[]).map(s=>{let i=g.removed.has(s.hash);return`<div class="file${i?" removed":""}">${Fe(s)?`<img data-att="${u(s.hash)}" alt="">`:`<span class="kind">${On(s)}</span>`}
115
- <span class="fname">${u(s.name)}</span>
116
- <button type="button" class="link" data-remove-existing="${u(s.hash)}">${i?"Keep":"Remove"}</button></div>`}),e=g.files.map((s,i)=>{let r="";return Fe(s)&&(r=dt.get(s)??URL.createObjectURL(s),dt.set(s,r)),`<div class="file">${r?`<img src="${r}" alt="">`:'<span class="kind">File</span>'}
117
- <span class="fname">${u(s.name||"Pasted file")}</span><small>${u(An(s.size))}</small>
118
- <button type="button" class="link" data-remove-new="${i}">Remove</button></div>`}),n=y("#c-files");n.innerHTML=[...t,...e].join(""),gt(n)}async function ri(t){t.preventDefault();let e=y("#c-submit");if(e.disabled)return;Un();let n=he(G,g.type),s=y("#c-text").value,i=y("#c-tags").value.split(/[,\s]+/).map(f=>f.replace(/^#/,"")).filter(Boolean),r=y("#c-amount").value.trim(),o=r?Vt(r):null;if(r&&!o){y("#c-more").open=!0,X(x.badAmount,!0);return}let c=new Set([...G.values()].flatMap(f=>f.fields.map(d=>d.key))),a=wn(n,Object.fromEntries(Object.entries(g.data).filter(([f])=>n.fields.some(d=>d.key===f)||!c.has(f)))),l=y("#c-when").value,m=g.editing;e.disabled=!0,e.textContent="Saving…";try{let f;if(m){let d={text:s,type:g.type,data:a,tags:i,projects:[...g.projects],amount:o,removeAttachments:[...g.removed]};l!==g.initialWhen&&(d.occurred=l?yt(new Date(l)):""),{notices:f}=await I().updateEntry(m.id,d,g.files,m)}else({notices:f}=await I().addEntry({text:s,type:g.type,data:a,tags:i,projects:[...g.projects],amount:o??void 0,occurred:l?yt(new Date(l)):void 0},g.files));Rn(),X([m?x.edited:x.saved,...f].join(" ")),Ke(),Kt()}catch(f){X(Se(f),!0)}finally{e.disabled=!1,e.textContent="Save"}}async function oi(){let t=y("#sync");if(!t.disabled){t.disabled=!0,t.classList.add("busy");try{be=await I().sync(),X(be.message,!be.ok)}catch(e){X(Se(e),!0)}finally{t.disabled=!1,t.classList.remove("busy"),P&&(Ke(),U?.())}}}async function En(){if(!P||document.visibilityState!=="visible"||ye.open)return;let t=P.version(),e=ge;try{await P.refresh(),ge="ok"}catch(n){ge=n instanceof ee?"signed-out":n instanceof Z?"stopped":ge}(P.version()!==t||e!==ge)&&(Ke(),U?.())}function ai(){window.addEventListener("hashchange",Kt),y("#c-form").addEventListener("submit",t=>{ri(t)}),ye.addEventListener("cancel",t=>{$n()&&!confirm(x.confirmDiscard)&&t.preventDefault()}),y("#c-file").addEventListener("change",t=>{let e=t.target;Bt(e.files??[]),e.value=""}),y("#c-text").addEventListener("paste",t=>{let e=[...t.clipboardData?.files??[]];e.length&&(t.preventDefault(),Bt(e))}),ye.addEventListener("dragover",t=>t.preventDefault()),ye.addEventListener("drop",t=>{t.preventDefault(),Bt(t.dataTransfer?.files??[])}),document.addEventListener("click",async t=>{let e=t.target,n=e.closest("[data-action],[data-filter-key],[data-date-after],[data-type-pick],[data-project-toggle],[data-remove-existing],[data-remove-new],.entry");if(!n)return;let s=n.dataset;if(s.filterKey!==void 0){ae&&(t.preventDefault(),ae.toggle(s.filterKey,s.filterValue??""));return}if(s.dateAfter!==void 0)return ae?.dates(s.dateAfter);if(s.typePick){Un(),g.type=s.typePick,ii(he(G,s.typePick)),Fn(),Kn();return}if(s.projectToggle){g.projects.has(s.projectToggle)?g.projects.delete(s.projectToggle):g.projects.add(s.projectToggle),mt();return}if(s.removeExisting){g.removed.has(s.removeExisting)?g.removed.delete(s.removeExisting):g.removed.add(s.removeExisting),ht();return}if(s.removeNew!==void 0){g.files.splice(Number(s.removeNew),1),ht();return}if(n.classList.contains("entry")){e.closest("a,button")||(location.hash=`#/entry/${encodeURIComponent(s.id)}`);return}switch(s.action){case"new":P&&_t({project:Tn()});break;case"close":(!$n()||confirm(x.confirmDiscard))&&Rn();break;case"new-project":case"composer-new-project":{let i=prompt(x.newProject)?.trim();if(!i)return;try{let r=await I().createProject(i);s.action==="composer-new-project"?(g.projects.add(r.slug),mt()):U?.()}catch(r){X(Se(r),!0)}break}case"clear-filters":ae?.clear();break;case"ask":Qs();break;case"close-answer":y("#answer").innerHTML="";break;case"edit":R&&_t({entry:R});break;case"history":R&&ti(R);break;case"delete":if(R&&confirm(x.confirmDelete))try{await I().deleteEntry(R.id,R),X(x.deleted),Ke(),location.hash="#/"}catch(i){X(Se(i),!0)}break;case"back":history.length>1?history.back():location.hash="#/";break;case"sync":oi();break}}),document.addEventListener("keydown",t=>{let e=t.target;if(ye.open){t.key==="Enter"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),y("#c-form").requestSubmit());return}!P||t.metaKey||t.ctrlKey||t.altKey||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)||(t.key==="n"?(t.preventDefault(),_t({project:Tn()})):t.key==="/"?(t.preventDefault(),ae||(location.hash="#/"),setTimeout(()=>y("#q")?.focus(),0)):t.key==="Enter"&&e.classList.contains("entry")&&(location.hash=`#/entry/${encodeURIComponent(e.dataset.id)}`))}),setInterval(()=>{En()},Fs),document.addEventListener("visibilitychange",()=>{En()})}var Ut=await Ue.connect();"error"in Ut?xn(Ut.error):Mn(Ut.store);
31
+ `;let c,f;for(f=a.length;f>0;--f){let L=a[f-1];if(L!==`
32
+ `&&L!==" "&&L!==" ")break}let p=a.substring(f),x=p.indexOf(`
33
+ `);x===-1?c="-":a===p||x!==p.length-1?(c="+",r&&r()):c="",p&&(a=a.slice(0,-p.length),p[p.length-1]===`
34
+ `&&(p=p.slice(0,-1)),p=p.replace(fx,`$&${u}`));let g=!1,S,y=-1;for(S=0;S<a.length;++S){let L=a[S];if(L===" ")g=!0;else if(L===`
35
+ `)y=S;else break}let m=a.substring(0,y<S?y+1:S);m&&(a=a.substring(m.length),m=m.replace(/\n+/g,`$&${u}`));let b=(g?u?"2":"1":"")+c;if(e&&(b+=" "+s(e.replace(/ ?[\r\n]+/g," ")),n&&n()),!d){let L=a.replace(/\n+/g,`
36
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),C=!1,T=Ep(o,!0);l!=="folded"&&t!==ce.BLOCK_FOLDED&&(T.onOverflow=()=>{C=!0});let w=Hc(`${m}${L}${p}`,u,kp,T);if(!C)return`>${b}
37
+ ${u}${w}`}return a=a.replace(/\n+/g,`$&${u}`),`|${b}
38
+ ${u}${m}${a}${p}`}function JM(e,t,a,o){let{type:n,value:r}=e,{actualString:l,implicitKey:s,indent:i,indentStep:u,inFlow:d}=t;if(s&&r.includes(`
39
+ `)||d&&/[[\]{},]/.test(r))return Ui(r,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return s||d||!r.includes(`
40
+ `)?Ui(r,t):Rp(e,t,a,o);if(!s&&!d&&n!==ce.PLAIN&&r.includes(`
41
+ `))return Rp(e,t,a,o);if(Op(r)){if(i==="")return t.forceBlockIndent=!0,Rp(e,t,a,o);if(s&&i===u)return Ui(r,t)}let c=r.replace(/\n+/g,`$&
42
+ ${i}`);if(l){let f=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(c),{compat:p,tags:x}=t.doc.schema;if(x.some(f)||p?.some(f))return Ui(r,t)}return s?c:Hc(c,i,ux,Ep(t,!1))}function Gc(e,t,a,o){let{implicitKey:n,inFlow:r}=t,l=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==ce.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value)&&(s=ce.QUOTE_DOUBLE);let i=d=>{switch(d){case ce.BLOCK_FOLDED:case ce.BLOCK_LITERAL:return n||r?Ui(l.value,t):Rp(l,t,a,o);case ce.QUOTE_DOUBLE:return qc(l.value,t);case ce.QUOTE_SINGLE:return cx(l.value,t);case ce.PLAIN:return JM(l,t,a,o);default:return null}},u=i(s);if(u===null){let{defaultKeyType:d,defaultStringType:c}=t.options,f=n&&d||c;if(u=i(f),u===null)throw new Error(`Unsupported default string type ${f}`)}return u}function dx(e,t){let a=Object.assign({blockQuote:!0,commentString:cT,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),o;switch(a.collectionStyle){case"block":o=!1;break;case"flow":o=!0;break;default:o=null}return{anchors:new Set,doc:e,flowCollectionPadding:a.flowCollectionPadding?" ":"",indent:"",indentStep:typeof a.indent=="number"?" ".repeat(a.indent):" ",inFlow:o,options:a}}function eN(e,t){if(t.tag){let n=e.filter(r=>r.tag===t.tag);if(n.length>0)return n.find(r=>r.format===t.format)??n[0]}let a,o;if(be(t)){o=t.value;let n=e.filter(r=>r.identify?.(o));if(n.length>1){let r=n.filter(l=>l.test);r.length>0&&(n=r)}a=n.find(r=>r.format===t.format)??n.find(r=>!r.format)}else o=t,a=e.find(n=>n.nodeClass&&o instanceof n.nodeClass);if(!a){let n=o?.constructor?.name??(o===null?"null":typeof o);throw new Error(`Tag not resolved for ${n} value`)}return a}function tN(e,t,{anchors:a,doc:o}){if(!o.directives)return"";let n=[],r=(be(e)||ot(e))&&e.anchor;r&&Ip(r)&&(a.add(r),n.push(`&${r}`));let l=e.tag??(t.default?null:t.tag);return l&&n.push(o.directives.tagString(l)),n.join(" ")}function ts(e,t,a,o){if(Ce(e))return e.toString(t,a,o);if(Ro(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let n,r=we(e)?e:t.doc.createNode(e,{onTagObj:i=>n=i});n??(n=eN(t.doc.schema.tags,r));let l=tN(r,n,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);let s=typeof n.stringify=="function"?n.stringify(r,t,a,o):be(r)?Gc(r,t,a,o):r.toString(t,a,o);return l?be(r)||s[0]==="{"||s[0]==="["?`${l} ${s}`:`${l}
43
+ ${t.indent}${s}`:s}function dT({key:e,value:t},a,o,n){let{allNullValues:r,doc:l,indent:s,indentStep:i,options:{commentString:u,indentSeq:d,simpleKeys:c}}=a,f=we(e)&&e.comment||null;if(c){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(ot(e)||!we(e)&&typeof e=="object"){let T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let p=!c&&(!e||f&&t==null&&!a.inFlow||ot(e)||(be(e)?e.type===ce.BLOCK_FOLDED||e.type===ce.BLOCK_LITERAL:typeof e=="object"));a=Object.assign({},a,{allNullValues:!1,implicitKey:!p&&(c||!r),indent:s+i});let x=!1,g=!1,S=ts(e,a,()=>x=!0,()=>g=!0);if(!p&&!a.inFlow&&S.length>1024){if(c)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(a.inFlow){if(r||t==null)return x&&o&&o(),S===""?"?":p?`? ${S}`:S}else if(r&&!c||t==null&&p)return S=`? ${S}`,f&&!x?S+=tr(S,a.indent,u(f)):g&&n&&n(),S;x&&(f=null),p?(f&&(S+=tr(S,a.indent,u(f))),S=`? ${S}
44
+ ${s}:`):(S=`${S}:`,f&&(S+=tr(S,a.indent,u(f))));let y,m,h;we(t)?(y=!!t.spaceBefore,m=t.commentBefore,h=t.comment):(y=!1,m=null,h=null,t&&typeof t=="object"&&(t=l.createNode(t))),a.implicitKey=!1,!p&&!f&&be(t)&&(a.indentAtStart=S.length+1),g=!1,!d&&i.length>=2&&!a.inFlow&&!p&&bn(t)&&!t.flow&&!t.tag&&!t.anchor&&(a.indent=a.indent.substring(2));let b=!1,L=ts(t,a,()=>b=!0,()=>g=!0),C=" ";if(f||y||m){if(C=y?`
45
+ `:"",m){let T=u(m);C+=`
46
+ ${rl(T,a.indent)}`}L===""&&!a.inFlow?C===`
47
+ `&&h&&(C=`
48
+
49
+ `):C+=`
50
+ ${a.indent}`}else if(!p&&ot(t)){let T=L[0],w=L.indexOf(`
51
+ `),E=w!==-1,A=a.inFlow??t.flow??t.items.length===0;if(E||!A){let z=!1;if(E&&(T==="&"||T==="!")){let B=L.indexOf(" ");T==="&"&&B!==-1&&B<w&&L[B+1]==="!"&&(B=L.indexOf(" ",B+1)),(B===-1||w<B)&&(z=!0)}z||(C=`
52
+ ${a.indent}`)}}else(L===""||L[0]===`
53
+ `)&&(C="");return S+=C+L,a.inFlow?b&&o&&o():h&&!b?S+=tr(S,a.indent,u(h)):g&&n&&n(),S}function px(e,t){(e==="debug"||e==="warn")&&console.warn(t)}var Dp="<<",jc={identify:e=>e===Dp||typeof e=="symbol"&&e.description===Dp,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ce(Symbol(Dp)),{addToJSMap:hx}),stringify:()=>Dp},pT=(e,t)=>(jc.identify(t)||be(t)&&(!t.type||t.type===ce.PLAIN)&&jc.identify(t.value))&&e?.doc.schema.tags.some(a=>a.tag===jc.tag&&a.default);function hx(e,t,a){let o=mT(e,a);if(bn(o))for(let n of o.items)mx(e,t,n);else if(Array.isArray(o))for(let n of o)mx(e,t,n);else mx(e,t,o)}function mx(e,t,a){let o=mT(e,a);if(!Jn(o))throw new Error("Merge sources must be maps or map aliases");let n=o.toJSON(null,e,Map);for(let[r,l]of n)t instanceof Map?t.has(r)||t.set(r,l):t instanceof Set?t.add(r):Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{value:l,writable:!0,enumerable:!0,configurable:!0});return t}function mT(e,t){return e&&Ro(t)?t.resolve(e.doc,e):t}function Mp(e,t,{key:a,value:o}){if(we(a)&&a.addToJSMap)a.addToJSMap(e,t,o);else if(pT(e,a))hx(e,t,o);else{let n=At(a,"",e);if(t instanceof Map)t.set(n,At(o,n,e));else if(t instanceof Set)t.add(n);else{let r=aN(a,n,e),l=At(o,r,e);r in t?Object.defineProperty(t,r,{value:l,writable:!0,enumerable:!0,configurable:!0}):t[r]=l}}return t}function aN(e,t,a){if(t===null)return"";if(typeof t!="object")return String(t);if(we(e)&&a?.doc){let o=dx(a.doc,{});o.anchors=new Set;for(let r of a.anchors.keys())o.anchors.add(r.anchor);o.inFlow=!0,o.inStringifyKey=!0;let n=e.toString(o);if(!a.mapKeyWarned){let r=JSON.stringify(n);r.length>40&&(r=r.substring(0,36)+'..."'),px(a.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),a.mapKeyWarned=!0}return n}return JSON.stringify(t)}function Fi(e,t,a){let o=nl(e,void 0,a),n=nl(t,void 0,a);return new Qt(o,n)}var Qt=class e{constructor(t,a=null){Object.defineProperty(this,Ga,{value:sx}),this.key=t,this.value=a}clone(t){let{key:a,value:o}=this;return we(a)&&(a=a.clone(t)),we(o)&&(o=o.clone(t)),new e(a,o)}toJSON(t,a){let o=a?.mapAsMap?new Map:{};return Mp(a,o,this)}toString(t,a,o){return t?.doc?dT(this,t,a,o):JSON.stringify(this)}};function Pp(e,t,a){return(t.inFlow??e.flow?nN:oN)(e,t,a)}function oN({comment:e,items:t},a,{blockItemPrefix:o,flowChars:n,itemIndent:r,onChompKeep:l,onComment:s}){let{indent:i,options:{commentString:u}}=a,d=Object.assign({},a,{indent:r,type:null}),c=!1,f=[];for(let x=0;x<t.length;++x){let g=t[x],S=null;if(we(g))!c&&g.spaceBefore&&f.push(""),Np(a,f,g.commentBefore,c),g.comment&&(S=g.comment);else if(Ce(g)){let m=we(g.key)?g.key:null;m&&(!c&&m.spaceBefore&&f.push(""),Np(a,f,m.commentBefore,c))}c=!1;let y=ts(g,d,()=>S=null,()=>c=!0);S&&(y+=tr(y,r,u(S))),c&&S&&(c=!1),f.push(o+y)}let p;if(f.length===0)p=n.start+n.end;else{p=f[0];for(let x=1;x<f.length;++x){let g=f[x];p+=g?`
54
+ ${i}${g}`:`
55
+ `}}return e?(p+=`
56
+ `+rl(u(e),i),s&&s()):c&&l&&l(),p}function nN({items:e},t,{flowChars:a,itemIndent:o}){let{indent:n,indentStep:r,flowCollectionPadding:l,options:{commentString:s}}=t;o+=r;let i=Object.assign({},t,{indent:o,inFlow:!0,type:null}),u=!1,d=0,c=[];for(let x=0;x<e.length;++x){let g=e[x],S=null;if(we(g))g.spaceBefore&&c.push(""),Np(t,c,g.commentBefore,!1),g.comment&&(S=g.comment);else if(Ce(g)){let m=we(g.key)?g.key:null;m&&(m.spaceBefore&&c.push(""),Np(t,c,m.commentBefore,!1),m.comment&&(u=!0));let h=we(g.value)?g.value:null;h?(h.comment&&(S=h.comment),h.commentBefore&&(u=!0)):g.value==null&&m?.comment&&(S=m.comment)}S&&(u=!0);let y=ts(g,i,()=>S=null);u||(u=c.length>d||y.includes(`
57
+ `)),x<e.length-1?y+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(u||(u=c.reduce((m,h)=>m+h.length+2,2)+(y.length+2)>t.options.lineWidth)),u&&(y+=",")),S&&(y+=tr(y,o,s(S))),c.push(y),d=c.length}let{start:f,end:p}=a;if(c.length===0)return f+p;if(!u){let x=c.reduce((g,S)=>g+S.length+2,2);u=t.options.lineWidth>0&&x>t.options.lineWidth}if(u){let x=f;for(let g of c)x+=g?`
58
+ ${r}${n}${g}`:`
59
+ `;return`${x}
60
+ ${n}${p}`}else return`${f}${l}${c.join(" ")}${l}${p}`}function Np({indent:e,options:{commentString:t}},a,o,n){if(o&&n&&(o=o.replace(/^\n+/,"")),o){let r=rl(t(o),e);a.push(r.trimStart())}}function ll(e,t){let a=be(t)?t.value:t;for(let o of e)if(Ce(o)&&(o.key===t||o.key===a||be(o.key)&&o.key.value===a))return o}var Gt=class extends zi{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(yn,t),this.items=[]}static from(t,a,o){let{keepUndefined:n,replacer:r}=o,l=new this(t),s=(i,u)=>{if(typeof r=="function")u=r.call(a,i,u);else if(Array.isArray(r)&&!r.includes(i))return;(u!==void 0||n)&&l.items.push(Fi(i,u,o))};if(a instanceof Map)for(let[i,u]of a)s(i,u);else if(a&&typeof a=="object")for(let i of Object.keys(a))s(i,a[i]);return typeof t.sortMapEntries=="function"&&l.items.sort(t.sortMapEntries),l}add(t,a){let o;Ce(t)?o=t:!t||typeof t!="object"||!("key"in t)?o=new Qt(t,t?.value):o=new Qt(t.key,t.value);let n=ll(this.items,o.key),r=this.schema?.sortMapEntries;if(n){if(!a)throw new Error(`Key ${o.key} already set`);be(n.value)&&Ap(o.value)?n.value.value=o.value:n.value=o.value}else if(r){let l=this.items.findIndex(s=>r(o,s)<0);l===-1?this.items.push(o):this.items.splice(l,0,o)}else this.items.push(o)}delete(t){let a=ll(this.items,t);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(t,a){let n=ll(this.items,t)?.value;return(!a&&be(n)?n.value:n)??void 0}has(t){return!!ll(this.items,t)}set(t,a){this.add(new Qt(t,a),!0)}toJSON(t,a,o){let n=o?new o:a?.mapAsMap?new Map:{};a?.onCreate&&a.onCreate(n);for(let r of this.items)Mp(a,n,r);return n}toString(t,a,o){if(!t)return JSON.stringify(this);for(let n of this.items)if(!Ce(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Pp(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:o,onComment:a})}};var Hi={collection:"map",default:!0,nodeClass:Gt,tag:"tag:yaml.org,2002:map",resolve(e,t){return Jn(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,a)=>Gt.from(e,t,a)};var ja=class extends zi{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(al,t),this.items=[]}add(t){this.items.push(t)}delete(t){let a=_p(t);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(t,a){let o=_p(t);if(typeof o!="number")return;let n=this.items[o];return!a&&be(n)?n.value:n}has(t){let a=_p(t);return typeof a=="number"&&a<this.items.length}set(t,a){let o=_p(t);if(typeof o!="number")throw new Error(`Expected a valid index, not ${t}.`);let n=this.items[o];be(n)&&Ap(a)?n.value=a:this.items[o]=a}toJSON(t,a){let o=[];a?.onCreate&&a.onCreate(o);let n=0;for(let r of this.items)o.push(At(r,String(n++),a));return o}toString(t,a,o){return t?Pp(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:o,onComment:a}):JSON.stringify(this)}static from(t,a,o){let{replacer:n}=o,r=new this(t);if(a&&Symbol.iterator in Object(a)){let l=0;for(let s of a){if(typeof n=="function"){let i=a instanceof Set?s:String(l++);s=n.call(a,i,s)}r.items.push(nl(s,void 0,o))}}return r}};function _p(e){let t=be(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}var qi={collection:"seq",default:!0,nodeClass:ja,tag:"tag:yaml.org,2002:seq",resolve(e,t){return bn(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,a)=>ja.from(e,t,a)};function gT(e){return typeof e=="bigint"||Number.isInteger(e)}var zp=({value:e})=>JSON.stringify(e),dN=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:zp},{identify:e=>e==null,createNode:()=>new ce(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:zp},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:zp},{identify:gT,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:a})=>a?BigInt(e):parseInt(e,10),stringify:({value:e})=>gT(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:zp}],pN={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},mN=[Hi,qi].concat(dN,pN);function yT(e,t,a){let{replacer:o}=a,n=new ja(e);n.tag="tag:yaml.org,2002:pairs";let r=0;if(t&&Symbol.iterator in Object(t))for(let l of t){typeof o=="function"&&(l=o.call(t,String(r++),l));let s,i;if(Array.isArray(l))if(l.length===2)s=l[0],i=l[1];else throw new TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){let u=Object.keys(l);if(u.length===1)s=u[0],i=l[s];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else s=l;n.items.push(Fi(s,i,a))}return n}var yx=class e extends ja{constructor(){super(),this.add=Gt.prototype.add.bind(this),this.delete=Gt.prototype.delete.bind(this),this.get=Gt.prototype.get.bind(this),this.has=Gt.prototype.has.bind(this),this.set=Gt.prototype.set.bind(this),this.tag=e.tag}toJSON(t,a){if(!a)return super.toJSON(t);let o=new Map;a?.onCreate&&a.onCreate(o);for(let n of this.items){let r,l;if(Ce(n)?(r=At(n.key,"",a),l=At(n.value,r,a)):r=At(n,"",a),o.has(r))throw new Error("Ordered maps must not include duplicate keys");o.set(r,l)}return o}static from(t,a,o){let n=yT(t,a,o),r=new this;return r.items=n.items,r}};yx.tag="tag:yaml.org,2002:omap";var xx=class e extends Gt{constructor(t){super(t),this.tag=e.tag}add(t){let a;Ce(t)?a=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?a=new Qt(t.key,null):a=new Qt(t,null),ll(this.items,a.key)||this.items.push(a)}get(t,a){let o=ll(this.items,t);return!a&&Ce(o)?be(o.key)?o.key.value:o.key:o}set(t,a){if(typeof a!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof a}`);let o=ll(this.items,t);o&&!a?this.items.splice(this.items.indexOf(o),1):!o&&a&&this.items.push(new Qt(t))}toJSON(t,a){return super.toJSON(t,a,Set)}toString(t,a,o){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),a,o);throw new Error("Set items must all have null values")}static from(t,a,o){let{replacer:n}=o,r=new this(t);if(a&&Symbol.iterator in Object(a))for(let l of a)typeof n=="function"&&(l=n.call(a,l,l)),r.items.push(Fi(l,null,o));return r}};xx.tag="tag:yaml.org,2002:set";function hN(e,t){let a=e[0],o=a==="-"||a==="+"?e.substring(1):e,n=l=>t?BigInt(l):Number(l),r=o.replace(/_/g,"").split(":").reduce((l,s)=>l*n(60)+n(s),n(0));return a==="-"?n(-1)*r:r}var bx={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(bx.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,a,o,n,r,l,s]=t.map(Number),i=t[7]?Number((t[7]+"00").substr(1,3)):0,u=Date.UTC(a,o-1,n,r||0,l||0,s||0,i),d=t[8];if(d&&d!=="Z"){let c=hN(d,!1);Math.abs(c)<30&&(c*=60),u-=6e4*c}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var Cx=Symbol("break visit"),kN=Symbol("skip children"),bT=Symbol("remove item");function as(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),vT(Object.freeze([]),e,t)}as.BREAK=Cx;as.SKIP=kN;as.REMOVE=bT;as.itemAtPath=(e,t)=>{let a=e;for(let[o,n]of t){let r=a?.[o];if(r&&"items"in r)a=r.items[n];else return}return a};as.parentCollection=(e,t)=>{let a=as.itemAtPath(e,t.slice(0,-1)),o=t[t.length-1][0],n=a?.[o];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function vT(e,t,a){let o=a(t,e);if(typeof o=="symbol")return o;for(let n of["key","value"]){let r=t[n];if(r&&"items"in r){for(let l=0;l<r.items.length;++l){let s=vT(Object.freeze(e.concat([[n,l]])),r.items[l],a);if(typeof s=="number")l=s-1;else{if(s===Cx)return Cx;s===bT&&(r.items.splice(l,1),l-=1)}}typeof o=="function"&&n==="key"&&(o=o(t,e))}}return typeof o=="function"?o(t,e):o}var iV=new Set("0123456789ABCDEFabcdef"),uV=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),cV=new Set(",[]{}"),fV=new Set(` ,[]{}
61
+ \r `);function ST(e){return e.trim().replace(/^#+/,"").toLowerCase().replace(/\s+/g,"-").replace(/[^\p{L}\p{N}_-]/gu,"")}function _N(e){return e.replace(/```[\s\S]*?```/g,`
62
+ `).replace(/`[^`\n]*`/g," ").replace(/<!--[\s\S]*?-->/g," ")}var BN=e=>e.split("/").pop()??"";var zN=/(!)?\[([^\][]*)\]\(\s*<?([^)(\s>]+)>?\s*(?:"[^"]*"\s*)?\)/g,UN=e=>e.includes("/")?e.slice(0,e.lastIndexOf("/")):"";function wx(e,t){let a=t.trim().split("#")[0].split("?")[0];if(!a||/^[a-z][a-z0-9+.-]*:/i.test(a)||a.startsWith("//")||a.startsWith("/")||a.includes("\\"))return null;let o=a;try{o=decodeURIComponent(a)}catch{}if(o.includes("\0"))return null;let n=UN(e).split("/").filter(Boolean);for(let r of o.split("/"))if(!(r===""||r==="."))if(r===".."){if(!n.length)return null;n.pop()}else n.push(r);return n.length?n.join("/"):null}var FN={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",heic:"image/heic",pdf:"application/pdf",txt:"text/plain",md:"text/markdown",csv:"text/csv"};function HN(e){let t=/\.([A-Za-z0-9]+)$/.exec(e)?.[1].toLowerCase()??"";return FN[t]??"application/octet-stream"}function LT(e,t){let a=[],o=new Set;for(let n of _N(t).matchAll(zN)){let r=wx(e,n[3]);if(!r||r.toLowerCase().endsWith(".md"))continue;let l=`${n[1]?"!":""}${r}`;o.has(l)||(o.add(l),a.push({path:r,name:n[2].trim()||BN(r),type:HN(r),image:!!n[1]}))}return a}var qN={p:"project",project:"project",projects:"project",topic:"project",topics:"project",t:"tag",tag:"tag",tags:"tag",after:"after",from:"after",since:"after",before:"before",to:"before",until:"before",on:"on",date:"on",amount:"amount",has:"has"},Gi=e=>qN[e.toLowerCase()]??e.toLowerCase();function ar(e){let t=[];for(let a of e.matchAll(/(?:([A-Za-z_][\w-]*):)?(?:"([^"]*)"|(\S+))/g)){let o=a[1],n=(a[2]??a[3]??"").trim();if(o&&n.startsWith("//")){t.push({value:`${o}:${n}`});continue}n&&(!o&&/^#[\p{L}\p{N}]/u.test(n)?t.push({key:"tag",value:n.slice(1)}):t.push(o?{key:Gi(o),value:n}:{value:n}))}return t}function os(e){return e.map(t=>{let a=/[\s"]/.test(t.value)?`"${t.value.replace(/"/g,"")}"`:t.value;return t.key?`${t.key}:${a}`:a}).join(" ")}function GN(e){let t={terms:[],projects:[],tags:[],amounts:[],has:[],fields:[]};for(let{key:a,value:o}of ar(e))switch(a){case void 0:t.terms.push(o.toLowerCase());break;case"project":t.projects.push(Wl(o));break;case"tag":t.tags.push(ST(o));break;case"after":t.after=wT(o)??t.after;break;case"before":t.before=IT(o)??t.before;break;case"on":t.after=wT(o)??t.after,t.before=IT(o)??t.before;break;case"amount":{let n=/^(>=|<=|>|<|=)?\s*[$€£¥]?([\d,]*\.?\d+)$/.exec(o);n&&t.amounts.push({op:n[1]??"=",value:Number(n[2].replace(/,/g,""))});break}case"has":t.has.push(o.toLowerCase());break;default:t.fields.push({key:a,value:o.toLowerCase()})}return t}var CT=e=>e!==null&&typeof e=="object"?JSON.stringify(e):String(e);function jN(e){return e.date?e.date.slice(0,10):null}var Fp=class{entries;#e;#t=new WeakMap;constructor(t,a={}){this.entries=t,this.#e=a}search(t){if(!t.trim())return this.entries;let a=GN(t);return this.entries.filter(o=>this.matches(o,a))}matches(t,a){if(a.projects.length&&!a.projects.some(n=>t.projects.includes(n))||a.tags.length&&!a.tags.some(n=>t.tags.includes(n)))return!1;if(a.after!==void 0||a.before!==void 0){let n=jN(t);if(n===null||a.after!==void 0&&n<a.after||a.before!==void 0&&n>a.before)return!1}if(a.amounts.length&&!(t.amount&&a.amounts.every(n=>VN(t.amount.value,n)))||!a.has.every(n=>$N(t,n)))return!1;for(let n of a.fields){let r=t.meta[n.key];if(r==null||!CT(r).toLowerCase().includes(n.value))return!1}if(!a.terms.length)return!0;let o=this.#a(t);return a.terms.every(n=>o.includes(n))}#a(t){let a=this.#t.get(t);return a===void 0&&(a=[t.title,t.body,t.path,...t.tags,...t.projects.flatMap(o=>[o,this.#e.projectNames?.get(o)??""]),...t.attachments.map(o=>`${o.name} ${o.path}`),t.amount?`${t.amount.value} ${t.amount.currency}`:"",...Object.entries(t.meta).map(([o,n])=>`${o} ${CT(n)}`)].join(`
63
+ `).toLowerCase(),this.#t.set(t,a)),a}};function VN(e,t){switch(t.op){case">":return e>t.value;case">=":return e>=t.value;case"<":return e<t.value;case"<=":return e<=t.value;default:return e===t.value}}function $N(e,t){let a=e.attachments;switch(t){case"attachment":case"attachments":case"file":case"files":return a.length>0;case"photo":case"photos":case"image":case"images":return a.some(o=>o.type.startsWith("image/"));case"receipt":case"receipts":return a.some(o=>o.type==="application/pdf"||/receipt|invoice/i.test(`${o.name} ${o.path}`));case"pdf":case"document":return a.some(o=>o.type==="application/pdf");case"amount":case"money":return!!e.amount;case"date":return!!e.date;default:{let o=e.meta[t];return o!=null&&o!==""&&o!==!1}}}var XN=e=>String(e).padStart(2,"0");function wT(e){let t=/^(\d{4})(?:-(\d{2}))?(?:-(\d{2}))?$/.exec(e.trim());return t?`${t[1]}-${t[2]??"01"}-${t[3]??"01"}`:void 0}function IT(e){let t=/^(\d{4})(?:-(\d{2}))?(?:-(\d{2}))?$/.exec(e.trim());if(t)return t[3]?`${t[1]}-${t[2]}-${t[3]}`:t[2]?`${t[1]}-${t[2]}-${XN(new Date(Number(t[1]),Number(t[2]),0).getDate())}`:`${t[1]}-12-31`}var sl=class extends Error{},il=class extends Error{};var KN=1e4;function kT(e,t){let a=(0,Zt.useRef)(new Set),o=(0,Zt.useRef)("ok"),n=(0,Zt.useCallback)(l=>(a.current.add(l),()=>a.current.delete(l)),[]),r=(0,Zt.useCallback)(()=>{for(let l of a.current)l()},[]);return(0,Zt.useEffect)(()=>{let l=!1,s=async()=>{if(l||document.visibilityState!=="visible")return;let d=e.version(),c="ok";try{await e.refresh()}catch(f){c=f instanceof il?"signed-out":f instanceof sl?"stopped":o.current}l||(c!==o.current&&(o.current=c,t(c)),e.version()!==d&&r())},i=setInterval(()=>{s()},KN),u=()=>{s()};return document.addEventListener("visibilitychange",u),window.addEventListener("focus",u),()=>{l=!0,clearInterval(i),document.removeEventListener("visibilitychange",u),window.removeEventListener("focus",u)}},[e,r,t]),(0,Zt.useEffect)(()=>{let l=()=>r();return window.addEventListener("gitroll:changed",l),()=>window.removeEventListener("gitroll:changed",l)},[r]),(0,Zt.useSyncExternalStore)(n,()=>e.version())}var ji=()=>window.dispatchEvent(new Event("gitroll:changed"));function RT(e,t){return(0,Zt.useMemo)(()=>{let a=e.entries(),o=new Fp(a);return{entries:a,index:o,projects:e.projects()}},[e,t])}function TT(e){let t=e||"#/",a;return(a=t.match(/^#\/?(?:\?q=(.*))?$/))?{name:"timeline",query:AT(a[1]??"")}:t==="#/topics"||t==="#/projects"?{name:"topics"}:t==="#/conflicts"?{name:"conflicts"}:(a=t.match(/^#\/entry\/([^/?]+)$/))?{name:"entry",id:AT(a[1])}:{name:"timeline",query:""}}var AT=e=>{try{return decodeURIComponent(e)}catch{return e}};function ET(){let[e,t]=(0,Zt.useState)(()=>TT(location.hash));return(0,Zt.useEffect)(()=>{let a=()=>t(TT(location.hash));return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]),e}var ns=e=>e.trim()?`#/?q=${encodeURIComponent(e)}`:"#/";function Ix(e){history.replaceState(null,"",ns(e)),window.dispatchEvent(new HashChangeEvent("hashchange"))}function Sn(e){location.hash=e.startsWith("#")?e.slice(1):e}var Ln=(e,t,a)=>`${e} ${e===1?t:a}`;function Hp(e){let t=new Date,a=new Date;return a.setDate(t.getDate()-1),e.toDateString()===t.toDateString()?"Today":e.toDateString()===a.toDateString()?"Yesterday":e.toLocaleDateString([],{weekday:"long",month:"long",day:"numeric",year:e.getFullYear()===t.getFullYear()?void 0:"numeric"})}function OT(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let a=Math.round((Date.now()-t)/1e3);if(a<45)return"just now";let o=new Intl.RelativeTimeFormat([],{numeric:"auto"}),n=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]];for(let[r,l]of n)if(a>=l)return o.format(-Math.round(a/l),r);return o.format(-Math.round(a/60),"minute")}function Eo(e){try{return new Intl.NumberFormat([],{style:"currency",currency:e.currency}).format(e.value)}catch{return`${e.value} ${e.currency}`}}function DT(e){return e?e<1024?`${e} B`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1048576).toFixed(1)} MB`:""}var ul=e=>e.type.startsWith("image/")&&!e.type.includes("svg")&&!e.type.includes("heic"),MT=e=>ul(e)?"Photo":e.type==="application/pdf"?"PDF":"File",Tx=e=>e?e.slice(0,10):"";function Vc(e){if(!e)return null;let t=new Date(e.length===10?`${e}T12:00:00`:e);return Number.isNaN(t.getTime())?null:t}function Oo(e){let t=a=>String(a).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}var Ta=e=>e instanceof Error?e.message:String(e);var Ax=[{key:"topic",hint:"Events in a topic",example:"topic:house"},{key:"tag",hint:"Events with a tag",example:"tag:plumbing"},{key:"has",hint:"Events with a photo, file or amount",example:"has:photo"},{key:"after",hint:"On or after a date",example:"after:2026-01-01"},{key:"before",hint:"On or before a date",example:"before:2026-06-30"},{key:"on",hint:"A single day, month or year",example:"on:2026-09"},{key:"amount",hint:"More or less than an amount",example:"amount:>500"}],YN=[{value:"photo",hint:"A picture"},{value:"file",hint:"Any attachment"},{value:"receipt",hint:"A receipt or a paid expense"},{value:"pdf",hint:"A PDF"},{value:"amount",hint:"Money attached"}];function kx(e,t){let a=t;for(;a>0&&!/\s/.test(e[a-1]);)a--;let o=t;for(;o<e.length&&!/\s/.test(e[o]);)o++;return{start:a,end:o,text:e.slice(a,o)}}function PT(e,t,a){let{start:o,end:n}=kx(e,t),r=e.slice(0,o),l=e.slice(n),s=l.length>0&&!l.startsWith(" ");return{value:`${r}${a}${s?" ":""}${l}`,caret:r.length+a.length+(s?1:0)}}var NT=e=>/[\s"]/.test(e)?`"${e.replace(/"/g,"")}"`:e;function _T(e,t){let a=e.trim(),o=a.indexOf(":");if(o<0){let i=a.toLowerCase(),u=Ax.filter(c=>!i||c.key.startsWith(i)).map(c=>({insert:`${c.key}:`,label:`${c.key}:`,hint:c.hint,group:"Filter by"})),d=i?[]:QN().map(c=>({insert:c.insert,label:c.label,hint:c.hint,group:"When"}));return[...u,...d]}let n=Gi(a.slice(0,o)),r=a.slice(o+1).toLowerCase().replace(/^"|"$/g,""),l=i=>!r||i.toLowerCase().includes(r),s=a.slice(0,o);switch(n){case"project":return t.projects.filter(i=>l(i.name)||l(i.slug)).map(i=>({insert:`${s}:${NT(i.slug)}`,label:i.name,hint:i.slug,group:"Topic"}));case"tag":return t.tags.filter(l).map(i=>({insert:`${s}:${NT(i)}`,label:`#${i}`,group:"Tag"}));case"has":return YN.filter(i=>l(i.value)).map(i=>({insert:`${s}:${i.value}`,label:`has:${i.value}`,hint:i.hint,group:"Has"}));case"after":case"before":case"on":return ZN(s,n).filter(i=>l(i.label));case"amount":return[{insert:`${s}:>100`,label:"more than 100",group:"Amount"},{insert:`${s}:<100`,label:"less than 100",group:"Amount"},{insert:`${s}:=100`,label:"exactly 100",group:"Amount"}];default:return[]}}function QN(){let e=new Date,t=e.getFullYear(),a=n=>String(n).padStart(2,"0"),o=new Date(e);return o.setDate(e.getDate()-7),[{insert:`on:${Oo(e)}`,label:"Today",hint:`on:${Oo(e)}`},{insert:`after:${Oo(o)}`,label:"Past 7 days",hint:`after:${Oo(o)}`},{insert:`on:${t}-${a(e.getMonth()+1)}`,label:"This month",hint:`on:${t}-${a(e.getMonth()+1)}`},{insert:`on:${t}`,label:"This year",hint:`on:${t}`}]}function ZN(e,t){let a=new Date,o=a.getFullYear(),n=s=>String(s).padStart(2,"0"),r=[],l=(s,i)=>r.push({insert:`${e}:${s}`,label:i,hint:s,group:"When"});if(t==="on")l(Oo(a),"Today"),l(`${o}-${n(a.getMonth()+1)}`,"This month"),l(String(o),"This year"),l(String(o-1),"Last year");else{let s=new Date(a);s.setDate(a.getDate()-7);let i=`${o}-${n(a.getMonth()+1)}-01`;l(Oo(a),"Today"),l(Oo(s),"A week ago"),l(i,"Start of this month"),l(`${o}-01-01`,"Start of this year")}return r}var WN=(e,t,a)=>e.key===Gi(t)&&e.value.toLowerCase()===a.toLowerCase();function qp(e,t,a){let o=ar(e),n=o.findIndex(r=>r.key&&WN(r,t,a));return n>=0?o.splice(n,1):o.push({key:Gi(t),value:a}),os(o)}function BT(e,t){let a=new Set(t.map(Gi));return os(ar(e).filter(o=>!o.key||!a.has(o.key)))}function zT(e,t){let a=ar(e),o=a.findIndex(n=>n.key===t.key&&n.value===t.value);return o>=0&&a.splice(o,1),os(a)}var pl=k(X(),1);function UT(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(a=UT(e[t]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function Gp(){for(var e,t,a=0,o="",n=arguments.length;a<n;a++)(e=arguments[a])&&(t=UT(e))&&(o&&(o+=" "),o+=t);return o}var JN=(e,t)=>{let a=new Array(e.length+t.length);for(let o=0;o<e.length;o++)a[o]=e[o];for(let o=0;o<t.length;o++)a[e.length+o]=t[o];return a},eP=(e,t)=>({classGroupId:e,validator:t}),VT=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a});var FT=[],tP="arbitrary..",aP=e=>{let t=nP(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return oP(l);let s=l.split("-"),i=s[0]===""&&s.length>1?1:0;return $T(s,i,t)},getConflictingClassGroupIds:(l,s)=>{if(s){let i=o[l],u=a[l];return i?u?JN(u,i):i:u||FT}return a[l]||FT}}},$T=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;let n=e[t],r=a.nextPart.get(n);if(r){let u=$T(e,t+1,r);if(u)return u}let l=a.validators;if(l===null)return;let s=t===0?e.join("-"):e.slice(t).join("-"),i=l.length;for(let u=0;u<i;u++){let d=l[u];if(d.validator(s))return d.classGroupId}},oP=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),a=t.indexOf(":"),o=t.slice(0,a);return o?tP+o:void 0})(),nP=e=>{let{theme:t,classGroups:a}=e;return rP(a,t)},rP=(e,t)=>{let a=VT();for(let o in e){let n=e[o];Ex(n,a,o,t)}return a},Ex=(e,t,a,o)=>{let n=e.length;for(let r=0;r<n;r++){let l=e[r];lP(l,t,a,o)}},lP=(e,t,a,o)=>{if(typeof e=="string"){sP(e,t,a);return}if(typeof e=="function"){iP(e,t,a,o);return}uP(e,t,a,o)},sP=(e,t,a)=>{let o=e===""?t:XT(t,e);o.classGroupId=a},iP=(e,t,a,o)=>{if(cP(e)){Ex(e(o),t,a,o);return}t.validators===null&&(t.validators=[]),t.validators.push(eP(a,e))},uP=(e,t,a,o)=>{let n=Object.entries(e),r=n.length;for(let l=0;l<r;l++){let[s,i]=n[l];Ex(i,XT(t,s),a,o)}},XT=(e,t)=>{let a=e,o=t.split("-"),n=o.length;for(let r=0;r<n;r++){let l=o[r],s=a.nextPart.get(l);s||(s=VT(),a.nextPart.set(l,s)),a=s}return a},cP=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,fP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),o=Object.create(null),n=(r,l)=>{a[r]=l,t++,t>e&&(t=0,o=a,a=Object.create(null))};return{get(r){let l=a[r];if(l!==void 0)return l;if((l=o[r])!==void 0)return n(r,l),l},set(r,l){r in a?a[r]=l:n(r,l)}}};var dP=[],HT=(e,t,a,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:o,isExternal:n}),pP=e=>{let{prefix:t,experimentalParseClassName:a}=e,o=n=>{let r=[],l=0,s=0,i=0,u,d=n.length;for(let g=0;g<d;g++){let S=n[g];if(l===0&&s===0){if(S===":"){r.push(n.slice(i,g)),i=g+1;continue}if(S==="/"){u=g;continue}}S==="["?l++:S==="]"?l--:S==="("?s++:S===")"&&s--}let c=r.length===0?n:n.slice(i),f=c,p=!1;c.endsWith("!")?(f=c.slice(0,-1),p=!0):c.startsWith("!")&&(f=c.slice(1),p=!0);let x=u&&u>i?u-i:void 0;return HT(r,p,f,x)};if(t){let n=t+":",r=o;o=l=>l.startsWith(n)?r(l.slice(n.length)):HT(dP,!1,l,void 0,!0)}if(a){let n=o;o=r=>a({className:r,parseClassName:n})}return o},mP=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((a,o)=>{t.set(a,1e6+o)}),a=>{let o=[],n=[];for(let r=0;r<a.length;r++){let l=a[r],s=l[0]==="[",i=t.has(l);s||i?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(l)):n.push(l)}return n.length>0&&(n.sort(),o.push(...n)),o}},hP=e=>({cache:fP(e.cacheSize),parseClassName:pP(e),sortModifiers:mP(e),postfixLookupClassGroupIds:gP(e),...aP(e)}),gP=e=>{let t=Object.create(null),a=e.postfixLookupClassGroups;if(a)for(let o=0;o<a.length;o++)t[a[o]]=!0;return t},yP=/\s+/,xP=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:r,postfixLookupClassGroupIds:l}=t,s=[],i=e.trim().split(yP),u="";for(let d=i.length-1;d>=0;d-=1){let c=i[d],{isExternal:f,modifiers:p,hasImportantModifier:x,baseClassName:g,maybePostfixModifierPosition:S}=a(c);if(f){u=c+(u.length>0?" "+u:u);continue}let y=!!S,m;if(y){let T=g.substring(0,S);m=o(T);let w=m&&l[m]?o(g):void 0;w&&w!==m&&(m=w,y=!1)}else m=o(g);if(!m){if(!y){u=c+(u.length>0?" "+u:u);continue}if(m=o(g),!m){u=c+(u.length>0?" "+u:u);continue}y=!1}let h=p.length===0?"":p.length===1?p[0]:r(p).join(":"),b=x?h+"!":h,L=b+m;if(s.indexOf(L)>-1)continue;s.push(L);let C=n(m,y);for(let T=0;T<C.length;++T){let w=C[T];s.push(b+w)}u=c+(u.length>0?" "+u:u)}return u},bP=(...e)=>{let t=0,a,o,n="";for(;t<e.length;)(a=e[t++])&&(o=KT(a))&&(n&&(n+=" "),n+=o);return n},KT=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=KT(e[o]))&&(a&&(a+=" "),a+=t);return a},vP=(e,...t)=>{let a,o,n,r,l=i=>{let u=t.reduce((d,c)=>c(d),e());return a=hP(u),o=a.cache.get,n=a.cache.set,r=s,s(i)},s=i=>{let u=o(i);if(u)return u;let d=xP(i,a);return n(i,d),d};return r=l,(...i)=>r(bP(...i))},SP=[],vt=e=>{let t=a=>a[e]||SP;return t.isThemeGetter=!0,t.themeKey=e,t},YT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,QT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,LP=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,CP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wP=/\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$/,IP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,TP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cl=e=>LP.test(e),me=e=>!!e&&!Number.isNaN(Number(e)),Cn=e=>!!e&&Number.isInteger(Number(e)),Rx=e=>e.endsWith("%")&&me(e.slice(0,-1)),or=e=>CP.test(e),ZT=()=>!0,kP=e=>wP.test(e)&&!IP.test(e),Ox=()=>!1,RP=e=>TP.test(e),EP=e=>AP.test(e),OP=e=>!q(e)&&!G(e),DP=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),MP=e=>fl(e,e1,Ox),q=e=>YT.test(e),rs=e=>fl(e,t1,kP),qT=e=>fl(e,HP,me),NP=e=>fl(e,o1,ZT),PP=e=>fl(e,a1,Ox),GT=e=>fl(e,WT,Ox),_P=e=>fl(e,JT,EP),jp=e=>fl(e,n1,RP),G=e=>QT.test(e),$c=e=>ls(e,t1),BP=e=>ls(e,a1),jT=e=>ls(e,WT),zP=e=>ls(e,e1),UP=e=>ls(e,JT),Vp=e=>ls(e,n1,!0),FP=e=>ls(e,o1,!0),fl=(e,t,a)=>{let o=YT.exec(e);return o?o[1]?t(o[1]):a(o[2]):!1},ls=(e,t,a=!1)=>{let o=QT.exec(e);return o?o[1]?t(o[1]):a:!1},WT=e=>e==="position"||e==="percentage",JT=e=>e==="image"||e==="url",e1=e=>e==="length"||e==="size"||e==="bg-size",t1=e=>e==="length",HP=e=>e==="number",a1=e=>e==="family-name",o1=e=>e==="number"||e==="weight",n1=e=>e==="shadow";var qP=()=>{let e=vt("color"),t=vt("font"),a=vt("text"),o=vt("font-weight"),n=vt("tracking"),r=vt("leading"),l=vt("breakpoint"),s=vt("container"),i=vt("spacing"),u=vt("radius"),d=vt("shadow"),c=vt("inset-shadow"),f=vt("text-shadow"),p=vt("drop-shadow"),x=vt("blur"),g=vt("perspective"),S=vt("aspect"),y=vt("ease"),m=vt("animate"),h=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...b(),G,q],C=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],w=()=>[G,q,i],E=()=>[cl,"full","auto",...w()],A=()=>[Cn,"none","subgrid",G,q],z=()=>["auto",{span:["full",Cn,G,q]},Cn,G,q],B=()=>[Cn,"auto",G,q],oe=()=>["auto","min","max","fr",G,q],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...w()],Z=()=>[cl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],ie=()=>[s,cl,"screen","full","dvw","lvw","svw","min","max","fit",...w()],Te=()=>[cl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],F=()=>[e,G,q],Wa=()=>[...b(),jT,GT,{position:[G,q]}],vo=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$o=()=>["auto","cover","contain",zP,MP,{size:[G,q]}],Mn=()=>[Rx,$c,rs],se=()=>["","none","full",u,G,q],ut=()=>["",me,$c,rs],Xo=()=>["solid","dashed","dotted","double"],na=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[me,Rx,jT,GT],re=()=>["","none",x,G,q],et=()=>["none",me,G,q],Lt=()=>["none",me,G,q],Ko=()=>[me,G,q],Nn=()=>[cl,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[or],breakpoint:[or],color:[ZT],container:[or],"drop-shadow":[or],ease:["in","out","in-out"],font:[OP],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[or],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[or],shadow:[or],spacing:["px",me],text:[or],"text-shadow":[or],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cl,q,G,S]}],container:["container"],"container-type":[{"@container":["","normal","size",G,q]}],"container-named":[DP],columns:[{columns:[me,"auto",q,G,s]}],"break-after":[{"break-after":h()}],"break-before":[{"break-before":h()}],"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"],sr:["sr-only","not-sr-only"],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:L()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[Cn,"auto",G,q]}],basis:[{basis:[cl,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[me,cl,"auto","initial","none",q]}],grow:[{grow:["",me,G,q]}],shrink:[{shrink:["",me,G,q]}],order:[{order:[Cn,"first","last","none",G,q]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mbs:[{mbs:$()}],mbe:[{mbe:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...Te()]}],"min-block-size":[{"min-block":["auto",...Te()]}],"max-block-size":[{"max-block":["none",...Te()]}],w:[{w:[s,"screen",...Z()]}],"min-w":[{"min-w":[s,"screen","none",...Z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh","none",...Z()]}],"font-size":[{text:["base",a,$c,rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,FP,NP]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rx,q]}],"font-family":[{font:[BP,PP,t]}],"font-features":[{"font-features":[q]}],"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-fractions"],tracking:[{tracking:[n,G,q]}],"line-clamp":[{"line-clamp":[me,"none",G,qT]}],leading:[{leading:["none",r,...w()]}],"list-image":[{"list-image":["none",G,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Xo(),"wavy"]}],"text-decoration-thickness":[{decoration:[me,"from-font","auto",G,rs]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[me,"auto",G,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"tab-size":[{tab:[Cn,G,q]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Wa()}],"bg-repeat":[{bg:vo()}],"bg-size":[{bg:$o()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cn,G,q],radial:["",G,q],conic:["",Cn,G,q]},UP,_P]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:Mn()}],"gradient-via-pos":[{via:Mn()}],"gradient-to-pos":[{to:Mn()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ut()}],"border-w-x":[{"border-x":ut()}],"border-w-y":[{"border-y":ut()}],"border-w-s":[{"border-s":ut()}],"border-w-e":[{"border-e":ut()}],"border-w-bs":[{"border-bs":ut()}],"border-w-be":[{"border-be":ut()}],"border-w-t":[{"border-t":ut()}],"border-w-r":[{"border-r":ut()}],"border-w-b":[{"border-b":ut()}],"border-w-l":[{"border-l":ut()}],"divide-x":[{"divide-x":ut()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ut()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Xo(),"hidden","none"]}],"divide-style":[{divide:[...Xo(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...Xo(),"none","hidden"]}],"outline-offset":[{"outline-offset":[me,G,q]}],"outline-w":[{outline:["",me,$c,rs]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","inner","none",d,Vp,jp]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",c,Vp,jp]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ut()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[me,rs]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ut()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",f,Vp,jp]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[me,G,q]}],"mix-blend":[{"mix-blend":[...na(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":na()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[me]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[G,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[me]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Wa()}],"mask-repeat":[{mask:vo()}],"mask-size":[{mask:$o()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,q]}],filter:[{filter:["","none",G,q]}],blur:[{blur:re()}],brightness:[{brightness:[me,G,q]}],contrast:[{contrast:[me,G,q]}],"drop-shadow":[{"drop-shadow":["","none",p,Vp,jp]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",me,G,q]}],"hue-rotate":[{"hue-rotate":[me,G,q]}],invert:[{invert:["",me,G,q]}],saturate:[{saturate:[me,G,q]}],sepia:[{sepia:["",me,G,q]}],"backdrop-filter":[{"backdrop-filter":["","none",G,q]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[me,G,q]}],"backdrop-contrast":[{"backdrop-contrast":[me,G,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",me,G,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[me,G,q]}],"backdrop-invert":[{"backdrop-invert":["",me,G,q]}],"backdrop-opacity":[{"backdrop-opacity":[me,G,q]}],"backdrop-saturate":[{"backdrop-saturate":[me,G,q]}],"backdrop-sepia":[{"backdrop-sepia":["",me,G,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[me,"initial",G,q]}],ease:[{ease:["linear","initial",y,G,q]}],delay:[{delay:[me,G,q]}],animate:[{animate:["none",m,G,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,G,q]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:et()}],"rotate-x":[{"rotate-x":et()}],"rotate-y":[{"rotate-y":et()}],"rotate-z":[{"rotate-z":et()}],scale:[{scale:Lt()}],"scale-x":[{"scale-x":Lt()}],"scale-y":[{"scale-y":Lt()}],"scale-z":[{"scale-z":Lt()}],"scale-3d":["scale-3d"],skew:[{skew:Ko()}],"skew-x":[{"skew-x":Ko()}],"skew-y":[{"skew-y":Ko()}],transform:[{transform:[G,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Nn()}],"translate-x":[{"translate-x":Nn()}],"translate-y":[{"translate-y":Nn()}],"translate-z":[{"translate-z":Nn()}],"translate-none":["translate-none"],zoom:[{zoom:[Cn,G,q]}],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",G,q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",G,q]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[me,$c,rs,qT]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var r1=vP(qP);function W(...e){return r1(Gp(e))}var jt=k(X(),1);var l1=k(X(),1),GP=Object.defineProperty,Mx=(e,t)=>GP(e,"name",{value:t,configurable:!0});function Dx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Mx(Dx,"setRef");function s1(...e){return t=>{let a=!1,o=e.map(n=>{let r=Dx(n,t);return!a&&typeof r=="function"&&(a=!0),r});if(a)return()=>{for(let n=0;n<o.length;n++){let r=o[n];typeof r=="function"?r():Dx(e[n],null)}}}}Mx(s1,"composeRefs");function _e(...e){return l1.useCallback(s1(...e),e)}Mx(_e,"useComposedRefs");var jP=Object.defineProperty,Do=(e,t)=>jP(e,"name",{value:t,configurable:!0});function Aa(e){let t=jt.forwardRef((a,o)=>{let{children:n,...r}=a,l=null,s=!1,i=[];Nx(n)&&typeof $p=="function"&&(n=$p(n._payload)),jt.Children.forEach(n,f=>{if(d1(f)){s=!0;let p=f,x="child"in p.props?p.props.child:p.props.children;Nx(x)&&typeof $p=="function"&&(x=$p(x._payload)),l=VP(p,x),i.push(l?.props?.children)}else i.push(f)}),l?l=jt.cloneElement(l,void 0,i):!s&&jt.Children.count(n)===1&&jt.isValidElement(n)&&(l=n);let u=l?f1(l):void 0,d=_e(o,u);if(!l){if(n||n===0)throw new Error(s?KP(e):XP(e));return n}let c=c1(r,l.props??{});return l.type!==jt.Fragment&&(c.ref=o?d:u),jt.cloneElement(l,c)});return t.displayName=`${e}.Slot`,t}Do(Aa,"createSlot");var i1=Aa("Slot"),u1=Symbol.for("radix.slottable");function Px(e){let t=Do(a=>"child"in a?a.children(a.child):a.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=u1,t}Do(Px,"createSlottable");var VP=Do((e,t)=>{if("child"in e.props){let a=e.props.child;return jt.isValidElement(a)?jt.cloneElement(a,void 0,e.props.children(a.props.children)):null}return jt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function c1(e,t){let a={...t};for(let o in t){let n=e[o],r=t[o];/^on[A-Z]/.test(o)?n&&r?a[o]=(...s)=>{let i=r(...s);return n(...s),i}:n&&(a[o]=n):o==="style"?a[o]={...n,...r}:o==="className"&&(a[o]=[n,r].filter(Boolean).join(" "))}return{...e,...a}}Do(c1,"mergeProps");function f1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}Do(f1,"getElementRef");function d1(e){return jt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===u1}Do(d1,"isSlottable");var $P=Symbol.for("react.lazy");function Nx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$P&&"_payload"in e&&p1(e._payload)}Do(Nx,"isLazyComponent");function p1(e){return typeof e=="object"&&e!==null&&"then"in e}Do(p1,"isPromiseLike");var XP=Do(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),KP=Do(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),$p=jt[" use ".trim().toString()];var m1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,h1=Gp,Xp=(e,t)=>a=>{var o;if(t?.variants==null)return h1(e,a?.class,a?.className);let{variants:n,defaultVariants:r}=t,l=Object.keys(n).map(u=>{let d=a?.[u],c=r?.[u];if(d===null)return null;let f=m1(d)||m1(c);return n[u][f]}),s=a&&Object.entries(a).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),i=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,d)=>{let{class:c,className:f,...p}=d;return Object.entries(p).every(x=>{let[g,S]=x;return Array.isArray(S)?S.includes({...r,...s}[g]):{...r,...s}[g]===S})?[...u,c,f]:u},[]);return h1(e,l,i,a?.class,a?.className)};var b1=k(j(),1),ZP=Xp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:opacity-90",secondary:"bg-card text-foreground border border-border hover:bg-accent",ghost:"text-foreground hover:bg-accent",link:"text-link underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:opacity-90",outlineDestructive:"border border-destructive/40 text-destructive hover:bg-destructive-bg"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-[0.8125rem]",lg:"h-11 rounded-lg px-6 text-base",icon:"size-9 tap-target",iconSm:"size-8 rounded-md tap-target"}},defaultVariants:{variant:"default",size:"default"}});function te({className:e,variant:t,size:a,asChild:o=!1,type:n,...r}){return(0,b1.jsx)(o?i1:"button",{className:W(ZP({variant:t,size:a,className:e})),type:o?void 0:n??"button",...r})}var Ye=k(X(),1);var WP=Object.defineProperty,Vi=(e,t)=>WP(e,"name",{value:t,configurable:!0}),v1=!!(typeof window<"u"&&window.document&&window.document.createElement);function ve(e,t,{checkForDefaultPrevented:a=!0}={}){return Vi(function(n){if(e?.(n),a===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}Vi(ve,"composeEventHandlers");function JP(e){if(!v1)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Vi(JP,"getOwnerWindow");function _x(e){if(!v1)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Vi(_x,"getOwnerDocument");function S1(e,t=!1){let{activeElement:a}=_x(e);if(!a?.nodeName)return null;if(L1(a)&&a.contentDocument)return S1(a.contentDocument.body,t);if(t){let o=a.getAttribute("aria-activedescendant");if(o){let n=_x(a).getElementById(o);if(n)return n}}return a}Vi(S1,"getActiveElement");function L1(e){return e.tagName==="IFRAME"}Vi(L1,"isFrame");var co=k(X(),1),Bx=k(j(),1),e_=Object.defineProperty,uo=(e,t)=>e_(e,"name",{value:t,configurable:!0});function t_(e,t){let a=co.createContext(t);a.displayName=e+"Context";let o=uo(r=>{let{children:l,...s}=r,i=co.useMemo(()=>s,Object.values(s));return(0,Bx.jsx)(a.Provider,{value:i,children:l})},"Provider");o.displayName=e+"Provider";function n(r,l={}){let{optional:s=!1}=l,i=co.useContext(a);if(i)return i;if(t!==void 0)return t;if(!s)throw new Error(`\`${r}\` must be used within \`${e}\``)}return uo(n,"useContext"),[o,n]}uo(t_,"createContext");function Vt(e,t=[]){let a=[];function o(r,l){let s=co.createContext(l);s.displayName=r+"Context";let i=a.length;a=[...a,l];let u=uo(c=>{let{scope:f,children:p,...x}=c,g=f?.[e]?.[i]||s,S=co.useMemo(()=>x,Object.values(x));return(0,Bx.jsx)(g.Provider,{value:S,children:p})},"Provider");u.displayName=r+"Provider";function d(c,f,p={}){let{optional:x=!1}=p,g=f?.[e]?.[i]||s,S=co.useContext(g);if(S)return S;if(l!==void 0)return l;if(!x)throw new Error(`\`${c}\` must be used within \`${r}\``)}return uo(d,"useContext"),[u,d]}uo(o,"createContext");let n=uo(()=>{let r=a.map(l=>co.createContext(l));return uo(function(s){let i=s?.[e]||r;return co.useMemo(()=>({[`__scope${e}`]:{...s,[e]:i}}),[s,i])},"useScope")},"createScope");return n.scopeName=e,[o,C1(n,...t)]}uo(Vt,"createContextScope");function C1(...e){let t=e[0];if(e.length===1)return t;let a=uo(()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return uo(function(r){let l=o.reduce((s,{useScope:i,scopeName:u})=>{let c=i(r)[`__scope${u}`];return{...s,...c}},{});return co.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])},"useComposedScopes")},"createScope");return a.scopeName=t.scopeName,a}uo(C1,"composeContextScopes");var zx=k(X(),1);var w1=k(X(),1),Je=globalThis?.document?w1.useLayoutEffect:()=>{};var a_=Object.defineProperty,o_=(e,t)=>a_(e,"name",{value:t,configurable:!0}),n_=zx[" useId ".trim().toString()]||(()=>{}),r_=0;function Va(e){let[t,a]=zx.useState(n_());return Je(()=>{e||a(o=>o??String(r_++))},[e]),e||(t?`radix-${t}`:"")}o_(Va,"useId");var fo=k(X(),1);var Yp=!1;var Mo=k(X(),1);var $i=k(X(),1),l_=Object.defineProperty,s_=(e,t)=>l_(e,"name",{value:t,configurable:!0}),I1=$i[" useEffectEvent ".trim().toString()],T1=$i[" useInsertionEffect ".trim().toString()];function Ux(e){if(typeof I1=="function")return I1(e);let t=$i.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof T1=="function"?T1(()=>{t.current=e}):Je(()=>{t.current=e}),$i.useMemo(()=>((...a)=>t.current?.(...a)),[])}s_(Ux,"useEffectEvent");var i_=Object.defineProperty,Xc=(e,t)=>i_(e,"name",{value:t,configurable:!0}),u_=fo[" useInsertionEffect ".trim().toString()]||Je;function No({prop:e,defaultProp:t,onChange:a=Xc(()=>{},"onChange"),caller:o}){let[n,r,l]=k1({defaultProp:t,onChange:a}),s=e!==void 0,i=s?e:n;if(Yp){let d=fo.useRef(e!==void 0);fo.useEffect(()=>{let c=d.current;c!==s&&console.warn(`${o} is changing from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,o])}let u=fo.useCallback(d=>{if(s){let c=R1(d)?d(e):d;c!==e&&l.current?.(c)}else r(d)},[s,e,r,l]);return[i,u]}Xc(No,"useControllableState");function k1({defaultProp:e,onChange:t}){let[a,o]=fo.useState(e),n=fo.useRef(a),r=fo.useRef(t);return u_(()=>{r.current=t},[t]),fo.useEffect(()=>{n.current!==a&&(r.current?.(a),n.current=a)},[a,n]),[a,o,r]}Xc(k1,"useUncontrolledState");function R1(e){return typeof e=="function"}Xc(R1,"isFunction");var A1=Symbol("RADIX:SYNC_STATE");function c_(e,t,a,o){let{prop:n,defaultProp:r,onChange:l,caller:s}=t,i=n!==void 0,u=Ux(l);if(Yp){let S=Mo.useRef(n!==void 0);Mo.useEffect(()=>{let y=S.current;y!==i&&console.warn(`${s} is changing from ${y?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),S.current=i},[i,s])}let d=[{...a,state:r}];o&&d.push(o);let[c,f]=Mo.useReducer((S,y)=>{if(y.type===A1)return{...S,state:y.state};let m=e(S,y);return i&&!Object.is(m.state,S.state)&&u(m.state),m},...d),p=c.state,x=Mo.useRef(p);Mo.useEffect(()=>{x.current!==p&&(x.current=p,i||u(p))},[p,x,i]);let g=Mo.useMemo(()=>n!==void 0?{...c,state:n}:c,[c,n]);return Mo.useEffect(()=>{i&&!Object.is(n,c.state)&&f({type:A1,state:n})},[n,c.state,i]),[g,f]}Xc(c_,"useControllableStateReducer");var ze=k(X(),1);var E1=k(X(),1),O1=k(Cu(),1);var D1=k(j(),1),f_=Object.defineProperty,d_=(e,t)=>f_(e,"name",{value:t,configurable:!0}),p_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=p_.reduce((e,t)=>{let a=Aa(`Primitive.${t}`),o=E1.forwardRef((n,r)=>{let{asChild:l,...s}=n,i=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,D1.jsx)(i,{...s,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Fx(e,t){e&&O1.flushSync(()=>e.dispatchEvent(t))}d_(Fx,"dispatchDiscreteCustomEvent");var Xi=k(X(),1),m_=Object.defineProperty,h_=(e,t)=>m_(e,"name",{value:t,configurable:!0});function po(e){let t=Xi.useRef(e);return Xi.useEffect(()=>{t.current=e}),Xi.useMemo(()=>((...a)=>t.current?.(...a)),[])}h_(po,"useCallbackRef");var N1=k(j(),1),g_=Object.defineProperty,kt=(e,t)=>g_(e,"name",{value:t,configurable:!0}),Hx="dismissableLayer.update",y_="dismissableLayer.pointerDownOutside",x_="dismissableLayer.focusOutside",M1,P1=ze.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ki=ze.forwardRef(kt(function(t,a){let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:r,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:i,onDismiss:u,...d}=t,c=ze.useContext(P1),[f,p]=ze.useState(null),x=f?.ownerDocument??globalThis?.document,[,g]=ze.useState({}),S=_e(a,p),y=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),h=m?y.indexOf(m):-1,b=f?y.indexOf(f):-1,L=c.layersWithOutsidePointerEventsDisabled.size>0,C=b>=h,T=ze.useRef(!1),w=_1(B=>{l?.(B),i?.(B),B.defaultPrevented||u?.()},{ownerDocument:x,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:ze.useCallback(B=>{if(!(B instanceof Node))return!1;let oe=[...c.branches].some(N=>N.contains(B));return C&&!oe},[c.branches,C])}),E=B1(B=>{if(n&&T.current)return;let oe=B.target;[...c.branches].some(J=>J.contains(oe))||(s?.(B),i?.(B),B.defaultPrevented||u?.())},x),A=f?b===y.length-1:!1,z=po(B=>{B.key==="Escape"&&(r?.(B),!B.defaultPrevented&&u&&(B.preventDefault(),u()))});return ze.useEffect(()=>{if(A)return x.addEventListener("keydown",z,{capture:!0}),()=>x.removeEventListener("keydown",z,{capture:!0})},[x,A,z]),ze.useEffect(()=>{if(f)return o&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(M1=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),qx(),()=>{o&&(c.layersWithOutsidePointerEventsDisabled.delete(f),c.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=M1))}},[f,x,o,c]),ze.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),qx())},[f,c]),ze.useEffect(()=>{let B=kt(()=>g({}),"handleUpdate");return document.addEventListener(Hx,B),()=>document.removeEventListener(Hx,B)},[]),(0,N1.jsx)(Be.div,{...d,ref:S,style:{pointerEvents:L?C?"auto":"none":void 0,...t.style},onFocusCapture:ve(t.onFocusCapture,E.onFocusCapture),onBlurCapture:ve(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ve(t.onPointerDownCapture,w.onPointerDownCapture)})},"DismissableLayer"));function Gx(){let e=ze.useContext(P1),[t,a]=ze.useState(null);return ze.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),a}kt(Gx,"useDismissableLayerSurface");var b_=kt(()=>!0,"IS_TRUE");function _1(e,t){let{ownerDocument:a=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:n,dismissableSurfaces:r,shouldHandlePointerDownOutside:l=b_}=t,s=po(e),i=ze.useRef(!1),u=ze.useRef(!1),d=ze.useRef(new Map),c=ze.useRef(()=>{});return ze.useEffect(()=>{function f(){u.current=!1,n.current=!1,d.current.clear()}kt(f,"resetOutsideInteraction");function p(){return Array.from(d.current.values()).some(Boolean)}kt(p,"isOutsideInteractionIntercepted");function x(h){if(!u.current)return;let b=h.target;b instanceof Node&&[...r].some(C=>C.contains(b))||d.current.set(h.type,!0),h.type==="click"&&window.setTimeout(()=>{u.current&&c.current()},0)}kt(x,"handleInteractionCapture");function g(h){u.current&&d.current.set(h.type,!1)}kt(g,"handleInteractionBubble");let S=kt(h=>{if(h.target&&!i.current){let L=function(){a.removeEventListener("click",c.current);let T=p();f(),T||jx(y_,s,C,{discrete:!0})};var b=L;if(kt(L,"handleAndDispatchPointerDownOutsideEvent"),!l(h.target)){a.removeEventListener("click",c.current),f(),i.current=!1;return}let C={originalEvent:h};u.current=!0,n.current=o&&h.button===0,d.current.clear(),!o||h.button!==0?L():(a.removeEventListener("click",c.current),c.current=L,a.addEventListener("click",c.current,{once:!0}))}else a.removeEventListener("click",c.current),f();i.current=!1},"handlePointerDown"),y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let h of y)a.addEventListener(h,x,!0),a.addEventListener(h,g);let m=window.setTimeout(()=>{a.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(m),a.removeEventListener("pointerdown",S),a.removeEventListener("click",c.current);for(let h of y)a.removeEventListener(h,x,!0),a.removeEventListener(h,g)}},[a,s,o,n,r,l]),{onPointerDownCapture:kt(()=>i.current=!0,"onPointerDownCapture")}}kt(_1,"usePointerDownOutside");function B1(e,t=globalThis?.document){let a=po(e),o=ze.useRef(!1);return ze.useEffect(()=>{let n=kt(r=>{r.target&&!o.current&&jx(x_,a,{originalEvent:r},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,a]),{onFocusCapture:kt(()=>o.current=!0,"onFocusCapture"),onBlurCapture:kt(()=>o.current=!1,"onBlurCapture")}}kt(B1,"useFocusOutside");function qx(){let e=new CustomEvent(Hx);document.dispatchEvent(e)}kt(qx,"dispatchUpdate");function jx(e,t,a,{discrete:o}){let n=a.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&n.addEventListener(e,t,{once:!0}),o?Fx(n,r):n.dispatchEvent(r)}kt(jx,"handleAndDispatchCustomEvent");var mo=k(X(),1);var F1=k(j(),1),v_=Object.defineProperty,da=(e,t)=>v_(e,"name",{value:t,configurable:!0}),Vx="focusScope.autoFocusOnMount",$x="focusScope.autoFocusOnUnmount",z1={bubbles:!1,cancelable:!0},Qp=mo.forwardRef(da(function(t,a){let{loop:o=!1,trapped:n=!1,onMountAutoFocus:r,onUnmountAutoFocus:l,...s}=t,[i,u]=mo.useState(null),d=po(r),c=po(l),f=mo.useRef(null),p=_e(a,u),x=mo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;mo.useEffect(()=>{if(n){let h=function(T){if(x.paused||!i)return;let w=T.target;i.contains(w)?f.current=w:nr(f.current,{select:!0})},b=function(T){if(x.paused||!i)return;let w=T.relatedTarget;w!==null&&(i.contains(w)||nr(f.current,{select:!0}))},L=function(T){if(document.activeElement===document.body)for(let E of T)E.removedNodes.length>0&&nr(i)};var S=h,y=b,m=L;da(h,"handleFocusIn"),da(b,"handleFocusOut"),da(L,"handleMutations"),document.addEventListener("focusin",h),document.addEventListener("focusout",b);let C=new MutationObserver(L);return i&&C.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),C.disconnect()}}},[n,i,x.paused]),mo.useEffect(()=>{if(i){U1.add(x);let S=document.activeElement;if(!i.contains(S)){let m=new CustomEvent(Vx,z1);i.addEventListener(Vx,d),i.dispatchEvent(m),m.defaultPrevented||(H1($1(Yx(i)),{select:!0}),document.activeElement===S&&nr(i))}return()=>{i.removeEventListener(Vx,d),setTimeout(()=>{let m=new CustomEvent($x,z1);i.addEventListener($x,c),i.dispatchEvent(m),m.defaultPrevented||nr(S??document.body,{select:!0}),i.removeEventListener($x,c),U1.remove(x)},0)}}},[i,d,c,x]);let g=mo.useCallback(S=>{if(!o&&!n||x.paused)return;let y=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,m=document.activeElement;if(y&&m){let h=S.currentTarget,[b,L]=q1(h);b&&L?!S.shiftKey&&m===L?(S.preventDefault(),o&&nr(b,{select:!0})):S.shiftKey&&m===b&&(S.preventDefault(),o&&nr(L,{select:!0})):m===h&&S.preventDefault()}},[o,n,x.paused]);return(0,F1.jsx)(Be.div,{tabIndex:-1,...s,ref:p,onKeyDown:g})},"FocusScope"));function H1(e,{select:t=!1}={}){let a=document.activeElement;for(let o of e)if(nr(o,{select:t}),document.activeElement!==a)return}da(H1,"focusFirst");function q1(e){let t=Yx(e),a=Xx(t,e),o=Xx(t.reverse(),e);return[a,o]}da(q1,"getTabbableEdges");function Yx(e){let t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:da(o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;a.nextNode();)t.push(a.currentNode);return t}da(Yx,"getTabbableCandidates");function Xx(e,t){let a=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(let o of e)if(!(a?!o.checkVisibility({checkVisibilityCSS:!0}):G1(o,{upTo:t})))return o}da(Xx,"findVisible");function G1(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}da(G1,"isHidden");function j1(e){return e instanceof HTMLInputElement&&"select"in e}da(j1,"isSelectableInput");function nr(e,{select:t=!1}={}){if(e&&e.focus){let a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&j1(e)&&t&&e.select()}}da(nr,"focus");var U1=V1();function V1(){let e=[];return{add(t){let a=e[0];t!==a&&a?.pause(),e=Kx(e,t),e.unshift(t)},remove(t){e=Kx(e,t),e[0]?.resume()}}}da(V1,"createFocusScopesStack");function Kx(e,t){let a=[...e],o=a.indexOf(t);return o!==-1&&a.splice(o,1),a}da(Kx,"arrayRemove");function $1(e){return e.filter(t=>t.tagName!=="A")}da($1,"removeLinks");var Zp=k(X(),1),X1=k(Cu(),1);var K1=k(j(),1),S_=Object.defineProperty,L_=(e,t)=>S_(e,"name",{value:t,configurable:!0}),Yi=Zp.forwardRef(L_(function(t,a){let{container:o,...n}=t,[r,l]=Zp.useState(!1);Je(()=>l(!0),[]);let s=o||r&&globalThis?.document?.body;return s?X1.createPortal((0,K1.jsx)(Be.div,{...n,ref:a}),s):null},"Portal"));var $t=k(X(),1);var Y1=k(X(),1),C_=Object.defineProperty,rr=(e,t)=>C_(e,"name",{value:t,configurable:!0});function Q1(e,t){return Y1.useReducer((a,o)=>t[a][o]??a,e)}rr(Q1,"useStateMachine");var ho=rr(e=>{let{present:t,children:a}=e,o=Z1(t),n=typeof a=="function"?a({present:o.isPresent}):$t.Children.only(a),r=W1(o.ref,J1(n));return typeof a=="function"||o.isPresent?$t.cloneElement(n,{ref:r}):null},"Presence");function Z1(e){let[t,a]=$t.useState(),o=$t.useRef(null),n=$t.useRef(e),r=$t.useRef("none"),l=$t.useRef(void 0),s=e?"mounted":"unmounted",[i,u]=Q1(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $t.useEffect(()=>{i==="mounted"?(r.current=l.current??Qi(o.current),l.current=void 0):r.current="none"},[i]),Je(()=>{let d=o.current,c=n.current;if(c!==e){let p=r.current,x=Qi(d);e?(l.current=x,u("MOUNT")):x==="none"||d?.display==="none"?u("UNMOUNT"):u(c&&p!==x?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,u]),Je(()=>{if(t){let d,c=t.ownerDocument.defaultView??window,f=rr(x=>{let S=Qi(o.current).includes(CSS.escape(x.animationName));if(x.target===t&&S&&(u("ANIMATION_END"),!n.current)){let y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},"handleAnimationEnd"),p=rr(x=>{x.target===t&&(r.current=Qi(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:$t.useCallback(d=>{if(d){let c=getComputedStyle(d);o.current=c,l.current=Qi(c)}else o.current=null;a(d)},[])}}rr(Z1,"usePresence");function Qx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}rr(Qx,"setRef");function W1(...e){let t=$t.useRef(e);return t.current=e,$t.useCallback(a=>{let o=t.current,n=!1,r=o.map(l=>{let s=Qx(l,a);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let l=0;l<r.length;l++){let s=r[l];typeof s=="function"?s():Qx(o[l],null)}}},[])}rr(W1,"useStableComposedRefs");function Qi(e){return e?.animationName||"none"}rr(Qi,"getAnimationName");function J1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}rr(J1,"getElementRef");var eA=k(X(),1),w_=Object.defineProperty,Wx=(e,t)=>w_(e,"name",{value:t,configurable:!0}),Wp=0,Zi=null;function I_(e){return Wi(),e.children}Wx(I_,"FocusGuards");function Wi(){eA.useEffect(()=>{Zi||(Zi={start:Zx(),end:Zx()});let{start:e,end:t}=Zi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Wp++,()=>{Wp===1&&(Zi?.start.remove(),Zi?.end.remove(),Zi=null),Wp=Math.max(0,Wp-1)}},[])}Wx(Wi,"useFocusGuards");function Zx(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Wx(Zx,"createFocusGuard");var ka=function(){return ka=Object.assign||function(t){for(var a,o=1,n=arguments.length;o<n;o++){a=arguments[o];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},ka.apply(this,arguments)};function Jp(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]]);return a}function tA(e,t,a){if(a||arguments.length===2)for(var o=0,n=t.length,r;o<n;o++)(r||!(o in t))&&(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var nm=k(X());var Wt=k(X());var ss="right-scroll-bar-position",is="width-before-scroll-bar",Jx="with-scroll-bars-hidden",eb="--removed-body-scroll-bar-size";function em(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var aA=k(X());function oA(e,t){var a=(0,aA.useState)(function(){return{value:e,callback:t,facade:{get current(){return a.value},set current(o){var n=a.value;n!==o&&(a.value=o,a.callback(o,n))}}}})[0];return a.callback=t,a.facade}var tm=k(X());var T_=typeof window<"u"?tm.useLayoutEffect:tm.useEffect,nA=new WeakMap;function tb(e,t){var a=oA(t||null,function(o){return e.forEach(function(n){return em(n,o)})});return T_(function(){var o=nA.get(a);if(o){var n=new Set(o),r=new Set(e),l=a.current;n.forEach(function(s){r.has(s)||em(s,null)}),r.forEach(function(s){n.has(s)||em(s,l)})}nA.set(a,e)},[e]),a}function A_(e){return e}function k_(e,t){t===void 0&&(t=A_);var a=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(r){var l=t(r,o);return a.push(l),function(){a=a.filter(function(s){return s!==l})}},assignSyncMedium:function(r){for(o=!0;a.length;){var l=a;a=[],l.forEach(r)}a={push:function(s){return r(s)},filter:function(){return a}}},assignMedium:function(r){o=!0;var l=[];if(a.length){var s=a;a=[],s.forEach(r),l=a}var i=function(){var d=l;l=[],d.forEach(r)},u=function(){return Promise.resolve().then(i)};u(),a={push:function(d){l.push(d),u()},filter:function(d){return l=l.filter(d),a}}}};return n}function ab(e){e===void 0&&(e={});var t=k_(null);return t.options=ka({async:!0,ssr:!1},e),t}var rA=k(X()),lA=function(e){var t=e.sideCar,a=Jp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return rA.createElement(o,ka({},a))};lA.isSideCarExport=!0;function ob(e,t){return e.useMedium(t),lA}var am=ab();var nb=function(){},Kc=Wt.forwardRef(function(e,t){var a=Wt.useRef(null),o=Wt.useState({onScrollCapture:nb,onWheelCapture:nb,onTouchMoveCapture:nb}),n=o[0],r=o[1],l=e.forwardProps,s=e.children,i=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,p=e.noRelative,x=e.noIsolation,g=e.inert,S=e.allowPinchZoom,y=e.as,m=y===void 0?"div":y,h=e.gapMode,b=Jp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=f,C=tb([a,t]),T=ka(ka({},b),n);return Wt.createElement(Wt.Fragment,null,d&&Wt.createElement(L,{sideCar:am,removeScrollBar:u,shards:c,noRelative:p,noIsolation:x,inert:g,setCallbacks:r,allowPinchZoom:!!S,lockRef:a,gapMode:h}),l?Wt.cloneElement(Wt.Children.only(s),ka(ka({},T),{ref:C})):Wt.createElement(m,ka({},T,{className:i,ref:C}),s))});Kc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kc.classNames={fullWidth:is,zeroRight:ss};var Ke=k(X());var eu=k(X());var uA=k(X());var sA;var iA=function(){if(sA)return sA;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function R_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iA();return t&&e.setAttribute("nonce",t),e}function E_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function O_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rb=function(){var e=0,t=null;return{add:function(a){e==0&&(t=R_())&&(E_(t,a),O_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var lb=function(){var e=rb();return function(t,a){uA.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&a])}};var Yc=function(){var e=lb(),t=function(a){var o=a.styles,n=a.dynamic;return e(o,n),null};return t};var D_={left:0,top:0,right:0,gap:0},sb=function(e){return parseInt(e||"",10)||0},M_=function(e){var t=window.getComputedStyle(document.body),a=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[sb(a),sb(o),sb(n)]},ib=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return D_;var t=M_(e),a=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-a+t[2]-t[0])}};var N_=Yc(),Ji="data-scroll-locked",P_=function(e,t,a,o){var n=e.left,r=e.top,l=e.right,s=e.gap;return a===void 0&&(a="margin"),`
64
+ .`.concat(Jx,` {
65
+ overflow: hidden `).concat(o,`;
66
+ padding-right: `).concat(s,"px ").concat(o,`;
67
+ }
68
+ body[`).concat(Ji,`] {
69
+ overflow: hidden `).concat(o,`;
70
+ overscroll-behavior: contain;
71
+ `).concat([t&&"position: relative ".concat(o,";"),a==="margin"&&`
72
+ padding-left: `.concat(n,`px;
73
+ padding-top: `).concat(r,`px;
74
+ padding-right: `).concat(l,`px;
75
+ margin-left:0;
76
+ margin-top:0;
77
+ margin-right: `).concat(s,"px ").concat(o,`;
78
+ `),a==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
79
+ }
80
+
81
+ .`).concat(ss,` {
82
+ right: `).concat(s,"px ").concat(o,`;
83
+ }
84
+
85
+ .`).concat(is,` {
86
+ margin-right: `).concat(s,"px ").concat(o,`;
87
+ }
88
+
89
+ .`).concat(ss," .").concat(ss,` {
90
+ right: 0 `).concat(o,`;
91
+ }
92
+
93
+ .`).concat(is," .").concat(is,` {
94
+ margin-right: 0 `).concat(o,`;
95
+ }
96
+
97
+ body[`).concat(Ji,`] {
98
+ `).concat(eb,": ").concat(s,`px;
99
+ }
100
+ `)},cA=function(){var e=parseInt(document.body.getAttribute(Ji)||"0",10);return isFinite(e)?e:0},__=function(){eu.useEffect(function(){return document.body.setAttribute(Ji,(cA()+1).toString()),function(){var e=cA()-1;e<=0?document.body.removeAttribute(Ji):document.body.setAttribute(Ji,e.toString())}},[])},ub=function(e){var t=e.noRelative,a=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;__();var r=eu.useMemo(function(){return ib(n)},[n]);return eu.createElement(N_,{styles:P_(r,!t,n,a?"":"!important")})};var cb=!1;if(typeof window<"u")try{Qc=Object.defineProperty({},"passive",{get:function(){return cb=!0,!0}}),window.addEventListener("test",Qc,Qc),window.removeEventListener("test",Qc,Qc)}catch{cb=!1}var Qc,us=cb?{passive:!1}:!1;var B_=function(e){return e.tagName==="TEXTAREA"},fA=function(e,t){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[t]!=="hidden"&&!(a.overflowY===a.overflowX&&!B_(e)&&a[t]==="visible")},z_=function(e){return fA(e,"overflowY")},U_=function(e){return fA(e,"overflowX")},fb=function(e,t){var a=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=dA(e,o);if(n){var r=pA(e,o),l=r[1],s=r[2];if(l>s)return!0}o=o.parentNode}while(o&&o!==a.body);return!1},F_=function(e){var t=e.scrollTop,a=e.scrollHeight,o=e.clientHeight;return[t,a,o]},H_=function(e){var t=e.scrollLeft,a=e.scrollWidth,o=e.clientWidth;return[t,a,o]},dA=function(e,t){return e==="v"?z_(t):U_(t)},pA=function(e,t){return e==="v"?F_(t):H_(t)},q_=function(e,t){return e==="h"&&t==="rtl"?-1:1},mA=function(e,t,a,o,n){var r=q_(e,window.getComputedStyle(t).direction),l=r*o,s=a.target,i=t.contains(s),u=!1,d=l>0,c=0,f=0;do{if(!s)break;var p=pA(e,s),x=p[0],g=p[1],S=p[2],y=g-S-r*x;(x||y)&&dA(e,s)&&(c+=y,f+=x);var m=s.parentNode;s=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!i&&s!==document.body||i&&(t.contains(s)||t===s));return(d&&(n&&Math.abs(c)<1||!n&&l>c)||!d&&(n&&Math.abs(f)<1||!n&&-l>f))&&(u=!0),u};var om=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hA=function(e){return[e.deltaX,e.deltaY]},gA=function(e){return e&&"current"in e?e.current:e},G_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},j_=function(e){return`
101
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
102
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
103
+ `)},V_=0,tu=[];function yA(e){var t=Ke.useRef([]),a=Ke.useRef([0,0]),o=Ke.useRef(),n=Ke.useState(V_++)[0],r=Ke.useState(Yc)[0],l=Ke.useRef(e);Ke.useEffect(function(){l.current=e},[e]),Ke.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=tA([e.lockRef.current],(e.shards||[]).map(gA),!0).filter(Boolean);return g.forEach(function(S){return S.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Ke.useCallback(function(g,S){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!l.current.allowPinchZoom;var y=om(g),m=a.current,h="deltaX"in g?g.deltaX:m[0]-y[0],b="deltaY"in g?g.deltaY:m[1]-y[1],L,C=g.target,T=Math.abs(h)>Math.abs(b)?"h":"v";if("touches"in g&&T==="h"&&C.type==="range")return!1;var w=window.getSelection(),E=w&&w.anchorNode,A=E?E===C||E.contains(C):!1;if(A)return!1;var z=fb(T,C);if(!z)return!0;if(z?L=T:(L=T==="v"?"h":"v",z=fb(T,C)),!z)return!1;if(!o.current&&"changedTouches"in g&&(h||b)&&(o.current=L),!L)return!0;var B=o.current||L;return mA(B,S,g,B==="h"?h:b,!0)},[]),i=Ke.useCallback(function(g){var S=g;if(!(!tu.length||tu[tu.length-1]!==r)){var y="deltaY"in S?hA(S):om(S),m=t.current.filter(function(L){return L.name===S.type&&(L.target===S.target||S.target===L.shadowParent)&&G_(L.delta,y)})[0];if(m&&m.should){S.cancelable&&S.preventDefault();return}if(!m){var h=(l.current.shards||[]).map(gA).filter(Boolean).filter(function(L){return L.contains(S.target)}),b=h.length>0?s(S,h[0]):!l.current.noIsolation;b&&S.cancelable&&S.preventDefault()}}},[]),u=Ke.useCallback(function(g,S,y,m){var h={name:g,delta:S,target:y,should:m,shadowParent:$_(y)};t.current.push(h),setTimeout(function(){t.current=t.current.filter(function(b){return b!==h})},1)},[]),d=Ke.useCallback(function(g){a.current=om(g),o.current=void 0},[]),c=Ke.useCallback(function(g){u(g.type,hA(g),g.target,s(g,e.lockRef.current))},[]),f=Ke.useCallback(function(g){u(g.type,om(g),g.target,s(g,e.lockRef.current))},[]);Ke.useEffect(function(){return tu.push(r),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",i,us),document.addEventListener("touchmove",i,us),document.addEventListener("touchstart",d,us),function(){tu=tu.filter(function(g){return g!==r}),document.removeEventListener("wheel",i,us),document.removeEventListener("touchmove",i,us),document.removeEventListener("touchstart",d,us)}},[]);var p=e.removeScrollBar,x=e.inert;return Ke.createElement(Ke.Fragment,null,x?Ke.createElement(r,{styles:j_(n)}):null,p?Ke.createElement(ub,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var xA=ob(am,yA);var bA=nm.forwardRef(function(e,t){return nm.createElement(Kc,ka({},e,{ref:t,sideCar:xA}))});bA.classNames=Kc.classNames;var Zc=bA;var X_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},au=new WeakMap,rm=new WeakMap,lm={},db=0,vA=function(e){return e&&(e.host||vA(e.parentNode))},K_=function(e,t){return t.map(function(a){if(e.contains(a))return a;var o=vA(a);return o&&e.contains(o)?o:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},Y_=function(e,t,a,o){var n=K_(t,Array.isArray(e)?e:[e]);lm[a]||(lm[a]=new WeakMap);var r=lm[a],l=[],s=new Set,i=new Set(n),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};n.forEach(u);var d=function(c){!c||i.has(c)||Array.prototype.forEach.call(c.children,function(f){if(s.has(f))d(f);else try{var p=f.getAttribute(o),x=p!==null&&p!=="false",g=(au.get(f)||0)+1,S=(r.get(f)||0)+1;au.set(f,g),r.set(f,S),l.push(f),g===1&&x&&rm.set(f,!0),S===1&&f.setAttribute(a,"true"),x||f.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return d(t),s.clear(),db++,function(){l.forEach(function(c){var f=au.get(c)-1,p=r.get(c)-1;au.set(c,f),r.set(c,p),f||(rm.has(c)||c.removeAttribute(o),rm.delete(c)),p||c.removeAttribute(a)}),db--,db||(au=new WeakMap,au=new WeakMap,rm=new WeakMap,lm={})}},sm=function(e,t,a){a===void 0&&(a="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||X_(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),Y_(o,n,a,"aria-hidden")):function(){return null}};var lt=k(j(),1),Q_=Object.defineProperty,go=(e,t)=>Q_(e,"name",{value:t,configurable:!0}),mb="Dialog",[SA,T$]=Vt(mb),[Z_,wn]=SA(mb),LA=go(e=>{let{__scopeDialog:t,children:a,open:o,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,s=Ye.useRef(null),i=Ye.useRef(null),[u,d]=No({prop:o,defaultProp:n??!1,onChange:r,caller:mb}),[c,f]=Ye.useState(0),[p,x]=Ye.useState(0);return(0,lt.jsx)(Z_,{scope:t,triggerRef:s,contentRef:i,contentId:Va(),titleId:Va(),descriptionId:Va(),titlePresent:c>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:x,open:u,onOpenChange:d,onOpenToggle:Ye.useCallback(()=>d(g=>!g),[d]),modal:l,children:a})},"Dialog");var CA="DialogPortal",[W_,wA]=SA(CA,{forceMount:void 0}),IA=go(e=>{let{__scopeDialog:t,forceMount:a,children:o,container:n}=e,r=wn(CA,t);return(0,lt.jsx)(W_,{scope:t,forceMount:a,children:Ye.Children.map(o,l=>(0,lt.jsx)(ho,{present:a||r.open,children:(0,lt.jsx)(Yi,{asChild:!0,container:n,children:l})}))})},"DialogPortal"),pb="DialogOverlay",TA=Ye.forwardRef(go(function(t,a){let o=wA(pb,t.__scopeDialog),{forceMount:n=o.forceMount,...r}=t,l=wn(pb,t.__scopeDialog);return l.modal?(0,lt.jsx)(ho,{present:n||l.open,children:(0,lt.jsx)(eB,{...r,ref:a})}):null},"DialogOverlay")),J_=Aa("DialogOverlay.RemoveScroll"),eB=Ye.forwardRef(go(function(t,a){let{__scopeDialog:o,...n}=t,r=wn(pb,o),l=Gx(),s=_e(a,l);return(0,lt.jsx)(Zc,{as:J_,allowPinchZoom:!0,shards:[r.contentRef],children:(0,lt.jsx)(Be.div,{"data-state":hb(r.open),...n,ref:s,style:{pointerEvents:"auto",...n.style}})})},"DialogOverlayImpl")),Wc="DialogContent",AA=Ye.forwardRef(go(function(t,a){let o=wA(Wc,t.__scopeDialog),{forceMount:n=o.forceMount,...r}=t,l=wn(Wc,t.__scopeDialog);return(0,lt.jsx)(ho,{present:n||l.open,children:l.modal?(0,lt.jsx)(tB,{...r,ref:a}):(0,lt.jsx)(aB,{...r,ref:a})})},"DialogContent")),tB=Ye.forwardRef(go(function(t,a){let o=wn(Wc,t.__scopeDialog),n=Ye.useRef(null),r=_e(a,o.contentRef,n);return Ye.useEffect(()=>{let l=n.current;if(l)return sm(l)},[]),(0,lt.jsx)(kA,{...t,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:ve(t.onCloseAutoFocus,l=>{l.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:ve(t.onPointerDownOutside,l=>{let s=l.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&l.preventDefault()}),onFocusOutside:ve(t.onFocusOutside,l=>l.preventDefault())})},"DialogContentModal")),aB=Ye.forwardRef(go(function(t,a){let o=wn(Wc,t.__scopeDialog),n=Ye.useRef(!1),r=Ye.useRef(!1);return(0,lt.jsx)(kA,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{t.onCloseAutoFocus?.(l),l.defaultPrevented||(n.current||o.triggerRef.current?.focus(),l.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:l=>{t.onInteractOutside?.(l),l.defaultPrevented||(n.current=!0,l.detail.originalEvent.type==="pointerdown"&&(r.current=!0));let s=l.target;o.triggerRef.current?.contains(s)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&r.current&&l.preventDefault()}})},"DialogContentNonModal")),kA=Ye.forwardRef(go(function(t,a){let{__scopeDialog:o,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:l,...s}=t,i=wn(Wc,o);return Wi(),(0,lt.jsx)(lt.Fragment,{children:(0,lt.jsx)(Qp,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:l,children:(0,lt.jsx)(Ki,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionPresent?i.descriptionId:void 0,"aria-labelledby":i.titlePresent?i.titleId:void 0,"data-state":hb(i.open),...s,ref:a,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})},"DialogContentImpl")),oB="DialogTitle",RA=Ye.forwardRef(go(function(t,a){let{__scopeDialog:o,...n}=t,r=wn(oB,o),{setTitleCount:l}=r;return Je(()=>(l(s=>s+1),()=>l(s=>s-1)),[l]),(0,lt.jsx)(Be.h2,{id:r.titleId,...n,ref:a})},"DialogTitle")),nB="DialogDescription",EA=Ye.forwardRef(go(function(t,a){let{__scopeDialog:o,...n}=t,r=wn(nB,o),{setDescriptionCount:l}=r;return Je(()=>(l(s=>s+1),()=>l(s=>s-1)),[l]),(0,lt.jsx)(Be.p,{id:r.descriptionId,...n,ref:a})},"DialogDescription")),rB="DialogClose",OA=Ye.forwardRef(go(function(t,a){let{__scopeDialog:o,...n}=t,r=wn(rB,o);return(0,lt.jsx)(Be.button,{type:"button",...n,ref:a,onClick:ve(t.onClick,()=>r.onOpenChange(!1))})},"DialogClose"));function hb(e){return e?"open":"closed"}go(hb,"getState");var $a=k(j(),1),Po=LA;var sB=IA;function iB({className:e,...t}){return(0,$a.jsx)(TA,{className:W("fixed inset-0 z-50 bg-black/40 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",e),...t})}function _o({className:e,children:t,showClose:a=!0,...o}){return(0,$a.jsxs)(sB,{children:[(0,$a.jsx)(iB,{}),(0,$a.jsxs)(AA,{className:W("fixed z-50 flex flex-col gap-4 bg-card text-card-foreground shadow-lg","inset-x-0 bottom-0 max-h-[92dvh] rounded-t-xl border-t border-border p-4","sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[85dvh] sm:w-full sm:max-w-xl","sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-xl sm:border sm:p-6","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",e),...o,children:[t,a&&(0,$a.jsxs)(OA,{className:W("absolute right-3 top-3 tap-target rounded-md p-1.5 text-muted-foreground transition-colors","hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),children:[(0,$a.jsx)(fa,{className:"size-4","aria-hidden":"true"}),(0,$a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function Bo({className:e,...t}){return(0,$a.jsx)("div",{className:W("flex flex-col gap-1 pr-10",e),...t})}function DA({className:e,...t}){return(0,$a.jsx)("div",{className:W("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function zo({className:e,...t}){return(0,$a.jsx)(RA,{className:W("text-base font-semibold",e),...t})}function dl({className:e,...t}){return(0,$a.jsx)(EA,{className:W("text-sm text-muted-foreground",e),...t})}var cs=k(j(),1);function lr({className:e,type:t,...a}){return(0,cs.jsx)("input",{type:t,className:W("flex h-9 w-full rounded-md border border-input bg-card px-3 py-1 text-sm shadow-sm transition-colors","placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring","disabled:cursor-not-allowed disabled:opacity-50","max-sm:text-base",e),...a})}function uB({className:e,...t}){return(0,cs.jsx)("label",{className:W("text-sm font-medium text-foreground",e),...t})}function sr({label:e,hint:t,hideLabel:a,children:o,className:n,htmlFor:r}){return(0,cs.jsxs)("div",{className:W("flex flex-col gap-1.5",n),children:[(0,cs.jsx)(uB,{htmlFor:r,className:a?"sr-only":void 0,children:e}),o,t&&(0,cs.jsx)("p",{className:"text-xs text-muted-foreground",children:t})]})}var ae=k(j(),1);function MA({store:e,open:t,onOpenChange:a,onSaved:o}){let[n,r]=(0,pl.useState)(null),[l,s]=(0,pl.useState)({endpoint:"",model:""}),[i,u]=(0,pl.useState)(null),[d,c]=(0,pl.useState)(""),[f,p]=(0,pl.useState)("");if((0,pl.useEffect)(()=>{t&&(p(""),u(null),e.aiSettings().then(b=>{r(b);let L=b.providers.find(C=>C.local);s(b.settings?{...b.settings}:{provider:L?.id,endpoint:L?.endpoint??"",model:L?.model??""})}).catch(b=>p(Ta(b))))},[t,e]),!n)return(0,ae.jsx)(Po,{open:t,onOpenChange:a,children:(0,ae.jsxs)(_o,{children:[(0,ae.jsx)(Bo,{children:(0,ae.jsx)(zo,{children:"Ask your Roll"})}),(0,ae.jsx)("p",{className:"text-sm text-muted-foreground",children:f||"Loading…"})]})});let x=cB(l.endpoint),g=!!n.settings,S=b=>s({provider:b.id,endpoint:b.endpoint,model:b.model,apiKeyEnv:b.apiKeyEnv,allowRemote:!b.local,enabled:!0}),y=!x&&!l.allowRemote,m=async b=>{c(b),p("");try{if(b==="testing")u(await e.testAi({...l}));else{let L=await e.saveAiSettings({...l,enabled:!0});r(L),o(),a(!1)}}catch(L){p(Ta(L))}finally{c("")}},h=async b=>{c("saving");try{r(await e.saveAiSettings({...n.settings??l,enabled:b})),o()}catch(L){p(Ta(L))}finally{c("")}};return(0,ae.jsx)(Po,{open:t,onOpenChange:a,children:(0,ae.jsxs)(_o,{className:"sm:max-w-xl",children:[(0,ae.jsxs)(Bo,{children:[(0,ae.jsx)(zo,{children:"Ask your Roll"}),(0,ae.jsx)(dl,{children:"Answers questions from your own events, using a model you choose. Every answer links to the events it came from."})]}),(0,ae.jsxs)("div",{className:"flex max-h-[70vh] flex-col gap-4 overflow-y-auto",children:[!n.state.allowedHere&&(0,ae.jsxs)("p",{className:"rounded-md border border-border bg-muted p-3 text-sm",children:["This Roll has Ask turned off for everyone (",(0,ae.jsx)("code",{className:"font-mono text-xs",children:"ai: false"})," in"," ",(0,ae.jsx)("code",{className:"font-mono text-xs",children:".gitroll/config.yaml"}),"). You can set a model up here, but Ask stays unavailable in this Roll until that line is removed."]}),(0,ae.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,ae.jsx)("legend",{className:"text-sm font-medium",children:"Where the model runs"}),(0,ae.jsx)("p",{className:"text-xs text-muted-foreground",children:"On this computer, nothing you log ever leaves it. That is the recommended choice."}),(0,ae.jsx)("ul",{className:"grid gap-1.5 sm:grid-cols-2",children:n.providers.map(b=>(0,ae.jsx)("li",{children:(0,ae.jsxs)("button",{type:"button",onClick:()=>S(b),"aria-pressed":l.provider===b.id,className:W("w-full rounded-md border p-2 text-left text-sm transition-colors","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",l.provider===b.id?"border-ring bg-accent":"border-border hover:bg-accent"),children:[(0,ae.jsxs)("span",{className:"flex items-center justify-between gap-2 font-medium",children:[b.label,(0,ae.jsx)("span",{className:W("rounded-full px-1.5 py-0.5 text-[10px]",b.local?"bg-muted text-muted-foreground":"bg-del-bg text-del"),children:b.local?"on this computer":"over the internet"})]}),(0,ae.jsx)("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:b.hint})]})},b.id))})]}),(0,ae.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,ae.jsx)(sr,{label:"Address",htmlFor:"ai-endpoint",hint:"An OpenAI-compatible API. It usually ends in /v1.",children:(0,ae.jsx)(lr,{id:"ai-endpoint",value:l.endpoint,onChange:b=>s({...l,endpoint:b.target.value,provider:void 0})})}),(0,ae.jsx)(sr,{label:"Model",htmlFor:"ai-model",hint:i?.models?.length?`Available: ${i.models.slice(0,4).join(", ")}`:"The model's name, exactly as the server knows it.",children:(0,ae.jsx)(lr,{id:"ai-model",value:l.model,onChange:b=>s({...l,model:b.target.value})})})]}),(0,ae.jsx)(sr,{label:"API key environment variable",htmlFor:"ai-key",hint:"GitRoll reads the key from this variable when it asks a question. The key itself is never stored, and never goes in a Roll.",children:(0,ae.jsx)(lr,{id:"ai-key",placeholder:"OPENAI_API_KEY",value:l.apiKeyEnv??"",onChange:b=>s({...l,apiKeyEnv:b.target.value||void 0})})}),(0,ae.jsxs)("div",{className:W("flex flex-col gap-2 rounded-md p-3 text-sm",x?"bg-muted text-muted-foreground":"bg-del-bg text-del"),children:[(0,ae.jsx)("p",{children:x?"Your question and the matching events stay on this computer.":`Your question and the full text of the matching events are sent to ${gb(l.endpoint)} over the internet. Attachments themselves are never sent.`}),!x&&(0,ae.jsxs)("label",{className:"flex items-start gap-2",children:[(0,ae.jsx)("input",{type:"checkbox",className:"mt-0.5 size-4 rounded border-input",checked:l.allowRemote===!0,onChange:b=>s({...l,allowRemote:b.target.checked})}),(0,ae.jsxs)("span",{children:["Send my question and the matching events to ",gb(l.endpoint),"."]})]})]}),i&&(0,ae.jsxs)("p",{className:W("flex items-start gap-2 text-sm",i.ok?"text-add":"text-destructive"),children:[i.ok?(0,ae.jsx)(Zn,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}):(0,ae.jsx)(fa,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),(0,ae.jsx)("span",{role:"status",children:i.message})]}),f&&(0,ae.jsx)("p",{className:"text-sm text-destructive",children:f})]}),(0,ae.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-border pt-3",children:[g&&(0,ae.jsx)(te,{variant:"ghost",className:"mr-auto",disabled:!!d,onClick:()=>{h(!n.state.on)},children:n.state.on?"Turn Ask off":"Turn Ask on"}),(0,ae.jsxs)(te,{variant:"secondary",disabled:!!d||!l.endpoint||!l.model||y,onClick:()=>{m("testing")},children:[d==="testing"?(0,ae.jsx)(Wn,{className:"animate-spin","aria-hidden":"true"}):null,"Test it"]}),(0,ae.jsxs)(te,{disabled:!!d||!l.endpoint||!l.model||y,onClick:()=>{m("saving")},children:[d==="saving"?(0,ae.jsx)(Wn,{className:"animate-spin","aria-hidden":"true"}):null,"Save"]})]})]})})}var gb=e=>{try{return new URL(e).host}catch{return e||"that address"}},cB=e=>["localhost","127.0.0.1","::1","[::1]"].includes(gb(e).replace(/:\d+$/,""));var ur=k(X(),1);var Et=k(X(),1);var Uo=k(X(),1);var im=k(j(),1),Ra=k(X(),1);var fs=k(j(),1),fB=Object.defineProperty,Rt=(e,t)=>fB(e,"name",{value:t,configurable:!0});function bb(e){let t=e+"CollectionProvider",[a,o]=Vt(t),[n,r]=a(t,{collectionRef:{current:null},itemMap:new Map}),l=Rt(g=>{let{scope:S,children:y}=g,m=Uo.useRef(null),h=Uo.useRef(new Map).current;return(0,im.jsx)(n,{scope:S,itemMap:h,collectionRef:m,children:y})},"CollectionProvider");l.displayName=t;let s=e+"CollectionSlot",i=Aa(s),u=Uo.forwardRef((g,S)=>{let{scope:y,children:m}=g,h=r(s,y),b=_e(S,h.collectionRef);return(0,im.jsx)(i,{ref:b,children:m})});u.displayName=s;let d=e+"CollectionItemSlot",c="data-radix-collection-item",f=Aa(d),p=Uo.forwardRef((g,S)=>{let{scope:y,children:m,...h}=g,b=Uo.useRef(null),L=_e(S,b),C=r(d,y);return Uo.useEffect(()=>(C.itemMap.set(b,{ref:b,...h}),()=>{C.itemMap.delete(b)})),(0,im.jsx)(f,{[c]:"",ref:L,children:m})});p.displayName=d;function x(g){let S=r(e+"CollectionConsumer",g);return Uo.useCallback(()=>{let m=S.collectionRef.current;if(!m)return[];let h=Array.from(m.querySelectorAll(`[${c}]`));return Array.from(S.itemMap.values()).sort((C,T)=>h.indexOf(C.ref.current)-h.indexOf(T.ref.current))},[S.collectionRef,S.itemMap])}return Rt(x,"useCollection"),[{Provider:l,Slot:u,ItemSlot:p},x,o]}Rt(bb,"createCollection");var NA=new WeakMap,yb=class ml extends Map{static{Rt(this,"OrderedDict")}#e;constructor(t){super(t),this.#e=[...super.keys()],NA.set(this,!0)}set(t,a){return NA.get(this)&&(this.has(t)?this.#e[this.#e.indexOf(t)]=t:this.#e.push(t)),super.set(t,a),this}insert(t,a,o){let n=this.has(a),r=this.#e.length,l=vb(t),s=l>=0?l:r+l,i=s<0||s>=r?-1:s;if(i===this.size||n&&i===this.size-1||i===-1)return this.set(a,o),this;let u=this.size+(n?0:1);l<0&&s++;let d=[...this.#e],c,f=!1;for(let p=s;p<u;p++)if(s===p){let x=d[p];d[p]===a&&(x=d[p+1]),n&&this.delete(a),c=this.get(x),this.set(a,o)}else{!f&&d[p-1]===a&&(f=!0);let x=d[f?p:p-1],g=c;c=this.get(x),this.delete(x),this.set(x,g)}return this}with(t,a,o){let n=new ml(this);return n.insert(t,a,o),n}before(t){let a=this.#e.indexOf(t)-1;if(!(a<0))return this.entryAt(a)}setBefore(t,a,o){let n=this.#e.indexOf(t);return n===-1?this:this.insert(n,a,o)}after(t){let a=this.#e.indexOf(t);if(a=a===-1||a===this.size-1?-1:a+1,a!==-1)return this.entryAt(a)}setAfter(t,a,o){let n=this.#e.indexOf(t);return n===-1?this:this.insert(n+1,a,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(t){let a=super.delete(t);return a&&this.#e.splice(this.#e.indexOf(t),1),a}deleteAt(t){let a=this.keyAt(t);return a!==void 0?this.delete(a):!1}at(t){let a=um(this.#e,t);if(a!==void 0)return this.get(a)}entryAt(t){let a=um(this.#e,t);if(a!==void 0)return[a,this.get(a)]}indexOf(t){return this.#e.indexOf(t)}keyAt(t){return um(this.#e,t)}from(t,a){let o=this.indexOf(t);if(o===-1)return;let n=o+a;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(t,a){let o=this.indexOf(t);if(o===-1)return;let n=o+a;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(t,a){let o=0;for(let n of this){if(Reflect.apply(t,a,[n,o,this]))return n;o++}}findIndex(t,a){let o=0;for(let n of this){if(Reflect.apply(t,a,[n,o,this]))return o;o++}return-1}filter(t,a){let o=[],n=0;for(let r of this)Reflect.apply(t,a,[r,n,this])&&o.push(r),n++;return new ml(o)}map(t,a){let o=[],n=0;for(let r of this)o.push([r[0],Reflect.apply(t,a,[r,n,this])]),n++;return new ml(o)}reduce(...t){let[a,o]=t,n=0,r=o??this.at(0);for(let l of this)n===0&&t.length===1?r=l:r=Reflect.apply(a,this,[r,l,n,this]),n++;return r}reduceRight(...t){let[a,o]=t,n=o??this.at(-1);for(let r=this.size-1;r>=0;r--){let l=this.at(r);r===this.size-1&&t.length===1?n=l:n=Reflect.apply(a,this,[n,l,r,this])}return n}toSorted(t){let a=[...this.entries()].sort(t);return new ml(a)}toReversed(){let t=new ml;for(let a=this.size-1;a>=0;a--){let o=this.keyAt(a),n=this.get(o);t.set(o,n)}return t}toSpliced(...t){let a=[...this.entries()];return a.splice(...t),new ml(a)}slice(t,a){let o=new ml,n=this.size-1;if(t===void 0)return o;t<0&&(t=t+this.size),a!==void 0&&a>0&&(n=a-1);for(let r=t;r<=n;r++){let l=this.keyAt(r),s=this.get(l);o.set(l,s)}return o}every(t,a){let o=0;for(let n of this){if(!Reflect.apply(t,a,[n,o,this]))return!1;o++}return!0}some(t,a){let o=0;for(let n of this){if(Reflect.apply(t,a,[n,o,this]))return!0;o++}return!1}};function um(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=PA(e,t);return a===-1?void 0:e[a]}Rt(um,"at");function PA(e,t){let a=e.length,o=vb(t),n=o>=0?o:a+o;return n<0||n>=a?-1:n}Rt(PA,"toSafeIndex");function vb(e){return e!==e||e===0?0:Math.trunc(e)}Rt(vb,"toSafeInteger");function dB(e){let t=e+"CollectionProvider",[a,o]=Vt(t),[n,r]=a(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new yb,setItemMap:Rt(()=>{},"setItemMap")}),l=Rt(({state:h,...b})=>h?(0,fs.jsx)(i,{...b,state:h}):(0,fs.jsx)(s,{...b}),"CollectionProvider");l.displayName=t;let s=Rt(h=>{let b=S();return(0,fs.jsx)(i,{...h,state:b})},"CollectionInit");s.displayName=t+"Init";let i=Rt(h=>{let{scope:b,children:L,state:C}=h,T=Ra.useRef(null),[w,E]=Ra.useState(null),A=_e(T,E),[z,B]=C;return Ra.useEffect(()=>{if(!w)return;let oe=zA(()=>{});return oe.observe(w,{childList:!0,subtree:!0}),()=>{oe.disconnect()}},[w]),(0,fs.jsx)(n,{scope:b,itemMap:z,setItemMap:B,collectionRef:A,collectionRefObject:T,collectionElement:w,children:L})},"CollectionProviderImpl");i.displayName=t+"Impl";let u=e+"CollectionSlot",d=Aa(u),c=Ra.forwardRef((h,b)=>{let{scope:L,children:C}=h,T=r(u,L),w=_e(b,T.collectionRef);return(0,fs.jsx)(d,{ref:w,children:C})});c.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",x=Aa(f),g=Ra.forwardRef((h,b)=>{let{scope:L,children:C,...T}=h,w=Ra.useRef(null),[E,A]=Ra.useState(null),z=_e(b,w,A),B=r(f,L),{setItemMap:oe}=B,N=Ra.useRef(T);_A(N.current,T)||(N.current=T);let J=N.current;return Ra.useEffect(()=>{let $=J;return oe(Z=>E?Z.has(E)?Z.set(E,{...$,element:E}).toSorted(xb):(Z.set(E,{...$,element:E}),Z.toSorted(xb)):Z),()=>{oe(Z=>!E||!Z.has(E)?Z:(Z.delete(E),new yb(Z)))}},[E,J,oe]),(0,fs.jsx)(x,{[p]:"",ref:z,children:C})});g.displayName=f;function S(){return Ra.useState(new yb)}Rt(S,"useInitCollection");function y(h){let{itemMap:b}=r(e+"CollectionConsumer",h);return b}return Rt(y,"useCollection"),[{Provider:l,Slot:c,ItemSlot:g},{createCollectionScope:o,useCollection:y,useInitCollection:S}]}Rt(dB,"createCollection");function _A(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let n of a)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}Rt(_A,"shallowEqual");function BA(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Rt(BA,"isElementPreceding");function xb(e,t){return!e[1].element||!t[1].element?0:BA(e[1].element,t[1].element)?-1:1}Rt(xb,"sortByDocumentPosition");function zA(e){return new MutationObserver(a=>{for(let o of a)if(o.type==="childList"){e();return}})}Rt(zA,"getChildListObserver");var cm=k(X(),1),hB=k(j(),1),pB=Object.defineProperty,mB=(e,t)=>pB(e,"name",{value:t,configurable:!0}),gB=cm.createContext(void 0);function Jc(e){let t=cm.useContext(gB);return e||t||"ltr"}mB(Jc,"useDirection");var xB=k(X(),1),fm=k(X(),1),yB=Object.defineProperty,Lb=(e,t)=>yB(e,"name",{value:t,configurable:!0}),Sb=!1;function UA(){let[e,t]=fm.useState(Sb);return fm.useEffect(()=>{Sb||(Sb=!0,t(!0))},[]),e}Lb(UA,"useIsHydrated");var FA=xB[" useSyncExternalStore ".trim().toString()];function HA(){return()=>{}}Lb(HA,"subscribe");function qA(){return FA(HA,()=>!0,()=>!1)}Lb(qA,"useIsHydratedModern");var GA=typeof FA=="function"?qA:UA;var hl=k(j(),1),bB=Object.defineProperty,ds=(e,t)=>bB(e,"name",{value:t,configurable:!0}),Cb="rovingFocusGroup.onEntryFocus",vB={bubbles:!1,cancelable:!0},dm="RovingFocusGroup",[wb,jA,SB]=bb(dm),[LB,Ib]=Vt(dm,[SB]),[CB,wB]=LB(dm),IB=Et.forwardRef(ds(function(t,a){return(0,hl.jsx)(wb.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,hl.jsx)(wb.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,hl.jsx)(TB,{...t,ref:a})})})},"RovingFocusGroup")),TB=Et.forwardRef(ds(function(t,a){let{__scopeRovingFocusGroup:o,orientation:n,loop:r=!1,dir:l,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:c=!1,...f}=t,p=Et.useRef(null),x=_e(a,p),g=Jc(l),[S,y]=No({prop:s,defaultProp:i??null,onChange:u,caller:dm}),[m,h]=Et.useState(!1),b=po(d),L=jA(o),C=Et.useRef(!1),[T,w]=Et.useState(0);return Et.useEffect(()=>{let E=p.current;if(E)return E.addEventListener(Cb,b),()=>E.removeEventListener(Cb,b)},[b]),(0,hl.jsx)(CB,{scope:o,orientation:n,dir:g,loop:r,currentTabStopId:S,onItemFocus:Et.useCallback(E=>y(E),[y]),onItemShiftTab:Et.useCallback(()=>h(!0),[]),onFocusableItemAdd:Et.useCallback(()=>w(E=>E+1),[]),onFocusableItemRemove:Et.useCallback(()=>w(E=>E-1),[]),children:(0,hl.jsx)(Be.div,{tabIndex:m||T===0?-1:0,"data-orientation":n,...f,ref:x,style:{outline:"none",...t.style},onMouseDown:ve(t.onMouseDown,()=>{C.current=!0}),onFocus:ve(t.onFocus,E=>{let A=!C.current;if(E.target===E.currentTarget&&A&&!m){let z=new CustomEvent(Cb,vB);if(E.currentTarget.dispatchEvent(z),!z.defaultPrevented){let B=L().filter(Z=>Z.focusable),oe=B.find(Z=>Z.active),N=B.find(Z=>Z.id===S),$=[oe,N,...B].filter(Boolean).map(Z=>Z.ref.current);Tb($,c)}}C.current=!1}),onBlur:ve(t.onBlur,()=>h(!1))})})},"RovingFocusGroupImpl")),AB="RovingFocusGroupItem",kB=Et.forwardRef(ds(function(t,a){let{__scopeRovingFocusGroup:o,focusable:n=!0,active:r=!1,tabStopId:l,children:s,...i}=t,u=Va(),d=l||u,c=wB(AB,o),f=c.currentTabStopId===d,p=jA(o),{onFocusableItemAdd:x,onFocusableItemRemove:g,currentTabStopId:S}=c,y=GA();return Je(()=>{if(!(!y||!n))return x(),()=>g()},[y,n,x,g]),Et.useEffect(()=>{if(!(y||!n))return x(),()=>g()},[y,n,x,g]),(0,hl.jsx)(wb.ItemSlot,{scope:o,id:d,focusable:n,active:r,children:(0,hl.jsx)(Be.span,{tabIndex:f?0:-1,"data-orientation":c.orientation,...i,ref:a,onMouseDown:ve(t.onMouseDown,m=>{n?c.onItemFocus(d):m.preventDefault()}),onFocus:ve(t.onFocus,()=>c.onItemFocus(d)),onKeyDown:ve(t.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;let h=$A(m,c.orientation,c.dir);if(h!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let L=p().filter(C=>C.focusable).map(C=>C.ref.current);if(h==="last")L.reverse();else if(h==="prev"||h==="next"){h==="prev"&&L.reverse();let C=L.indexOf(m.currentTarget);L=c.loop?XA(L,C+1):L.slice(C+1)}setTimeout(()=>Tb(L))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:S!=null}):s})})},"RovingFocusGroupItem")),RB={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VA(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}ds(VA,"getDirectionAwareKey");function $A(e,t,a){let o=VA(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return RB[o]}ds($A,"getFocusIntent");function Tb(e,t=!1){let a=document.activeElement;for(let o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}ds(Tb,"focusFirst");function XA(e,t){return e.map((a,o)=>e[(t+o)%e.length])}ds(XA,"wrapArray");var KA=IB,YA=kB;var ir=k(j(),1),OB=Object.defineProperty,ou=(e,t)=>OB(e,"name",{value:t,configurable:!0}),Ab="Tabs",[DB,m7]=Vt(Ab,[Ib]),QA=Ib(),[MB,kb]=DB(Ab),NB=ur.forwardRef(ou(function(t,a){let{__scopeTabs:o,value:n,onValueChange:r,defaultValue:l,orientation:s="horizontal",dir:i,activationMode:u="automatic",...d}=t,c=Jc(i),[f,p]=No({prop:n,onChange:r,defaultProp:l??"",caller:Ab});return(0,ir.jsx)(MB,{scope:o,baseId:Va(),value:f,onValueChange:p,orientation:s,dir:c,activationMode:u,children:(0,ir.jsx)(Be.div,{dir:c,"data-orientation":s,...d,ref:a})})},"Tabs")),PB="TabsList",_B=ur.forwardRef(ou(function(t,a){let{__scopeTabs:o,loop:n=!0,...r}=t,l=kb(PB,o),s=QA(o);return(0,ir.jsx)(KA,{asChild:!0,...s,orientation:l.orientation,dir:l.dir,loop:n,children:(0,ir.jsx)(Be.div,{role:"tablist","aria-orientation":l.orientation,...r,ref:a})})},"TabsList")),BB="TabsTrigger",zB=ur.forwardRef(ou(function(t,a){let{__scopeTabs:o,value:n,disabled:r=!1,...l}=t,s=kb(BB,o),i=QA(o),u=Rb(s.baseId,n),d=Eb(s.baseId,n),c=n===s.value;return(0,ir.jsx)(YA,{asChild:!0,...i,focusable:!r,active:c,children:(0,ir.jsx)(Be.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":d,"data-state":c?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:u,...l,ref:a,onMouseDown:ve(t.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?s.onValueChange(n):f.preventDefault()}),onKeyDown:ve(t.onKeyDown,f=>{r||f.target!==f.currentTarget||[" ","Enter"].includes(f.key)&&s.onValueChange(n)}),onFocus:ve(t.onFocus,()=>{let f=s.activationMode!=="manual";!c&&!r&&f&&s.onValueChange(n)})})})},"TabsTrigger")),UB="TabsContent",FB=ur.forwardRef(ou(function(t,a){let{__scopeTabs:o,value:n,forceMount:r,children:l,...s}=t,i=kb(UB,o),u=Rb(i.baseId,n),d=Eb(i.baseId,n),c=n===i.value,f=ur.useRef(c);return ur.useEffect(()=>{let p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),(0,ir.jsx)(ho,{present:r||c,children:({present:p})=>(0,ir.jsx)(Be.div,{"data-state":c?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:d,tabIndex:0,...s,ref:a,style:{...t.style,animationDuration:f.current?"0s":void 0},children:p&&l})})},"TabsContent"));function Rb(e,t){return`${e}-trigger-${t}`}ou(Rb,"makeTriggerId");function Eb(e,t){return`${e}-content-${t}`}ou(Eb,"makeContentId");var ZA=NB,WA=_B,JA=zB,ek=FB;var fe=k(X(),1);var Jt=k(X(),1);var ok=["top","right","bottom","left"];var In=Math.min,Fo=Math.max,tf=Math.round,af=Math.floor,Tn=e=>({x:e,y:e}),qB={left:"right",right:"left",bottom:"top",top:"bottom"};function Ob(e,t,a){return Fo(e,In(t,a))}function An(e,t){return typeof e=="function"?e(t):e}function cr(e){return e.split("-")[0]}function ps(e){return e.split("-")[1]}function mm(e){return e==="x"?"y":"x"}function hm(e){return e==="y"?"height":"width"}function Ho(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function gm(e){return mm(Ho(e))}function nk(e,t,a){a===void 0&&(a=!1);let o=ps(e),n=gm(e),r=hm(n),l=n==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=ef(l)),[l,ef(l)]}function rk(e){let t=ef(e);return[pm(e),t,pm(t)]}function pm(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var tk=["left","right"],ak=["right","left"],GB=["top","bottom"],jB=["bottom","top"];function VB(e,t,a){switch(e){case"top":case"bottom":return a?t?ak:tk:t?tk:ak;case"left":case"right":return t?GB:jB;default:return[]}}function lk(e,t,a,o){let n=ps(e),r=VB(cr(e),a==="start",o);return n&&(r=r.map(l=>l+"-"+n),t&&(r=r.concat(r.map(pm)))),r}function ef(e){let t=cr(e);return qB[t]+e.slice(t.length)}function $B(e){var t,a,o,n;return{top:(t=e.top)!=null?t:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(n=e.left)!=null?n:0}}function Db(e){return typeof e!="number"?$B(e):{top:e,right:e,bottom:e,left:e}}function ms(e){let{x:t,y:a,width:o,height:n}=e;return{width:o,height:n,top:a,left:t,right:t+o,bottom:a+n,x:t,y:a}}function sk(e,t,a){let{reference:o,floating:n}=e,r=Ho(t),l=gm(t),s=hm(l),i=cr(t),u=r==="y",d=o.x+o.width/2-n.width/2,c=o.y+o.height/2-n.height/2,f=o[s]/2-n[s]/2,p;switch(i){case"top":p={x:d,y:o.y-n.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:c};break;case"left":p={x:o.x-n.width,y:c};break;default:p={x:o.x,y:o.y}}let x=ps(t);return x&&(p[l]+=f*(x==="end"?1:-1)*(a&&u?-1:1)),p}async function ck(e,t){var a;t===void 0&&(t={});let{x:o,y:n,platform:r,rects:l,elements:s,strategy:i}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:f=!1,padding:p=0}=An(t,e),x=Db(p),S=s[f?c==="floating"?"reference":"floating":c],y=ms(await r.getClippingRect({element:(a=await(r.isElement==null?void 0:r.isElement(S)))==null||a?S:S.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:i})),m=c==="floating"?{x:o,y:n,width:l.floating.width,height:l.floating.height}:l.reference,h=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),b=await(r.isElement==null?void 0:r.isElement(h))&&await(r.getScale==null?void 0:r.getScale(h))||{x:1,y:1},L=ms(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:h,strategy:i}):m);return{top:(y.top-L.top+x.top)/b.y,bottom:(L.bottom-y.bottom+x.bottom)/b.y,left:(y.left-L.left+x.left)/b.x,right:(L.right-y.right+x.right)/b.x}}var XB=50,fk=async(e,t,a)=>{let{placement:o="bottom",strategy:n="absolute",middleware:r=[],platform:l}=a,s=l.detectOverflow?l:{...l,detectOverflow:ck},i=await(l.isRTL==null?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:c}=sk(u,o,i),f=o,p=0,x={};for(let g=0;g<r.length;g++){let S=r[g];if(!S)continue;let{name:y,fn:m}=S,{x:h,y:b,data:L,reset:C}=await m({x:d,y:c,initialPlacement:o,placement:f,strategy:n,middlewareData:x,rects:u,platform:s,elements:{reference:e,floating:t}});d=h??d,c=b??c,x[y]={...x[y],...L},C&&p<XB&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:d,y:c}=sk(u,f,i)),g=-1)}return{x:d,y:c,placement:f,strategy:n,middlewareData:x}},dk=e=>({name:"arrow",options:e,async fn(t){let{x:a,y:o,placement:n,rects:r,platform:l,elements:s,middlewareData:i}=t,{element:u,padding:d=0}=An(e,t)||{};if(u==null)return{};let c=Db(d),f={x:a,y:o},p=gm(n),x=hm(p),g=await l.getDimensions(u),S=p==="y",y=S?"top":"left",m=S?"bottom":"right",h=S?"clientHeight":"clientWidth",b=r.reference[x]+r.reference[p]-f[p]-r.floating[x],L=f[p]-r.reference[p],C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u)),T=C?C[h]:0;(!T||!await(l.isElement==null?void 0:l.isElement(C)))&&(T=s.floating[h]||r.floating[x]);let w=b/2-L/2,E=T/2-g[x]/2-1,A=In(c[y],E),z=In(c[m],E),B=T-g[x]-z,oe=T/2-g[x]/2+w,N=Ob(A,oe,B),J=!i.arrow&&ps(n)!=null&&oe!==N&&r.reference[x]/2-(oe<A?A:z)-g[x]/2<0,$=J?oe<A?oe-A:oe-B:0;return{[p]:f[p]+$,data:{[p]:N,centerOffset:oe-N-$,...J&&{alignmentOffset:$}},reset:J}}});var pk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,o;let{placement:n,middlewareData:r,rects:l,initialPlacement:s,platform:i,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:g=!0,...S}=An(e,t);if((a=r.arrow)!=null&&a.alignmentOffset)return{};let y=cr(n),m=Ho(s),h=cr(s)===s,b=await(i.isRTL==null?void 0:i.isRTL(u.floating)),L=f||(h||!g?[ef(s)]:rk(s)),C=x!=="none";!f&&C&&L.push(...lk(s,g,x,b));let T=[s,...L],w=await i.detectOverflow(t,S),E=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&E.push(w[y]),c){let N=nk(n,l,b);E.push(w[N[0]],w[N[1]])}if(A=[...A,{placement:n,overflows:E}],!E.every(N=>N<=0)){var z,B;let N=(((z=r.flip)==null?void 0:z.index)||0)+1,J=T[N];if(J&&(!(c==="alignment"?m!==Ho(J):!1)||A.every(ie=>Ho(ie.placement)===m?ie.overflows[0]>0:!0)))return{data:{index:N,overflows:A},reset:{placement:J}};let $=(B=A.filter(Z=>Z.overflows[0]<=0).sort((Z,ie)=>Z.overflows[1]-ie.overflows[1])[0])==null?void 0:B.placement;if(!$)switch(p){case"bestFit":{var oe;let Z=(oe=A.filter(ie=>{if(C){let Te=Ho(ie.placement);return Te===m||Te==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(Te=>Te>0).reduce((Te,F)=>Te+F,0)]).sort((ie,Te)=>ie[1]-Te[1])[0])==null?void 0:oe[0];Z&&($=Z);break}case"initialPlacement":$=s;break}if(n!==$)return{reset:{placement:$}}}return{}}}};function ik(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uk(e){return ok.some(t=>e[t]>=0)}var mk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:a,platform:o}=t,{strategy:n="referenceHidden",...r}=An(e,t);switch(n){case"referenceHidden":{let l=await o.detectOverflow(t,{...r,elementContext:"reference"}),s=ik(l,a.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:uk(s)}}}case"escaped":{let l=await o.detectOverflow(t,{...r,altBoundary:!0}),s=ik(l,a.floating);return{data:{escapedOffsets:s,escaped:uk(s)}}}default:return{}}}}};var hk=new Set(["left","top"]);async function KB(e,t){let{placement:a,platform:o,elements:n}=e,r=await(o.isRTL==null?void 0:o.isRTL(n.floating)),l=cr(a),s=ps(a),i=Ho(a)==="y",u=hk.has(l)?-1:1,d=r&&i?-1:1,c=An(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:x}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&typeof x=="number"&&(p=s==="end"?x*-1:x),i?{x:p*d,y:f*u}:{x:f*u,y:p*d}}var gk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,o;let{x:n,y:r,placement:l,middlewareData:s}=t,i=await KB(t,e);return l===((a=s.offset)==null?void 0:a.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:n+i.x,y:r+i.y,data:{...i,placement:l}}}}},yk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:a,y:o,placement:n,platform:r}=t,{mainAxis:l=!0,crossAxis:s=!1,limiter:i={fn:m=>{let{x:h,y:b}=m;return{x:h,y:b}}},...u}=An(e,t),d={x:a,y:o},c=await r.detectOverflow(t,u),f=Ho(n),p=mm(f),x=d[p],g=d[f],S=(m,h)=>Ob(h+c[m==="y"?"top":"left"],h,h-c[m==="y"?"bottom":"right"]);l&&(x=S(p,x)),s&&(g=S(f,g));let y=i.fn({...t,[p]:x,[f]:g});return{...y,data:{x:y.x-a,y:y.y-o,enabled:{[p]:l,[f]:s}}}}}},xk=function(e){return e===void 0&&(e={}),{options:e,fn(t){var a,o;let{x:n,y:r,placement:l,rects:s,middlewareData:i}=t,{offset:u=0,mainAxis:d=!0,crossAxis:c=!0}=An(e,t),f={x:n,y:r},p=Ho(l),x=mm(p),g=f[x],S=f[p],y=An(u,t),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(a=y.mainAxis)!=null?a:0,crossAxis:(o=y.crossAxis)!=null?o:0};if(d){let L=x==="y"?"height":"width",C=s.reference[x]-s.floating[L]+m.mainAxis,T=s.reference[x]+s.reference[L]-m.mainAxis;g<C?g=C:g>T&&(g=T)}if(c){var h,b;let L=x==="y"?"width":"height",C=hk.has(cr(l)),T=s.reference[p]-s.floating[L]+(C&&((h=i.offset)==null?void 0:h[p])||0)+(C?0:m.crossAxis),w=s.reference[p]+s.reference[L]+(C?0:((b=i.offset)==null?void 0:b[p])||0)-(C?m.crossAxis:0);S<T?S=T:S>w&&(S=w)}return{[x]:g,[p]:S}}}},bk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:a,rects:o,platform:n,elements:r}=t,{apply:l=()=>{},...s}=An(e,t),i=await n.detectOverflow(t,s),u=cr(a),d=ps(a),c=Ho(a)==="y",{width:f,height:p}=o.floating,x,g;u==="top"||u==="bottom"?(x=u,g=d===(await(n.isRTL==null?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(g=u,x=d==="end"?"top":"bottom");let S=p-i.top-i.bottom,y=f-i.left-i.right,m=In(p-i[x],S),h=In(f-i[g],y),b=t.middlewareData.shift,L=!b,C=m,T=h;b!=null&&b.enabled.x&&(T=y),b!=null&&b.enabled.y&&(C=S),L&&!d&&(c?T=f-2*Fo(i.left,i.right):C=p-2*Fo(i.top,i.bottom)),await l({...t,availableWidth:T,availableHeight:C});let w=await n.getDimensions(r.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function ym(){return typeof window<"u"}function ys(e){return Sk(e)?(e.nodeName||"").toLowerCase():"#document"}function pa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kn(e){var t;return(t=(Sk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sk(e){return ym()?e instanceof Node||e instanceof pa(e).Node:!1}function qo(e){return ym()?e instanceof Element||e instanceof pa(e).Element:!1}function fr(e){return ym()?e instanceof HTMLElement||e instanceof pa(e).HTMLElement:!1}function vk(e){return!ym()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pa(e).ShadowRoot}function of(e){let{overflow:t,overflowX:a,overflowY:o,display:n}=Go(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+a)&&n!=="inline"&&n!=="contents"}function Lk(e){return/^(table|td|th)$/.test(ys(e))}function nf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var YB=/transform|translate|scale|rotate|perspective|filter/,QB=/paint|layout|strict|content/,hs=e=>!!e&&e!=="none",Mb;function xm(e){let t=qo(e)?Go(e):e;return hs(t.transform)||hs(t.translate)||hs(t.scale)||hs(t.rotate)||hs(t.perspective)||!bm()&&(hs(t.backdropFilter)||hs(t.filter))||YB.test(t.willChange||"")||QB.test(t.contain||"")}function Ck(e){let t=gl(e);for(;fr(t)&&!nu(t);){if(xm(t))return t;if(nf(t))return null;t=gl(t)}return null}function bm(){return Mb==null&&(Mb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Mb}function nu(e){return/^(html|body|#document)$/.test(ys(e))}function Go(e){return pa(e).getComputedStyle(e)}function rf(e){return qo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gl(e){if(ys(e)==="html")return e;let t=e.assignedSlot||e.parentNode||vk(e)&&e.host||kn(e);return vk(t)?t.host:t}function wk(e){let t=gl(e);return nu(t)?(e.ownerDocument||e).body:fr(t)&&of(t)?t:wk(t)}function gs(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);let n=wk(e),r=n===((o=e.ownerDocument)==null?void 0:o.body),l=pa(n);if(r){let s=vm(l);return t.concat(l,l.visualViewport||[],of(n)?n:[],s&&a?gs(s):[])}else return t.concat(n,gs(n,[],a))}function vm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ak(e){let t=Go(e),a=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=fr(e),r=n?e.offsetWidth:a,l=n?e.offsetHeight:o,s=tf(a)!==r||tf(o)!==l;return s&&(a=r,o=l),{width:a,height:o,$:s}}function Pb(e){return qo(e)?e:e.contextElement}function ru(e){let t=Pb(e);if(!fr(t))return Tn(1);let a=t.getBoundingClientRect(),{width:o,height:n,$:r}=Ak(t),l=(r?tf(a.width):a.width)/o,s=(r?tf(a.height):a.height)/n;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}var ZB=Tn(0);function kk(e){let t=pa(e);return!bm()||!t.visualViewport?ZB:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WB(e,t,a){return t===void 0&&(t=!1),!!a&&t&&a===pa(e)}function xs(e,t,a,o){t===void 0&&(t=!1),a===void 0&&(a=!1);let n=e.getBoundingClientRect(),r=Pb(e),l=Tn(1);t&&(o?qo(o)&&(l=ru(o)):l=ru(e));let s=WB(r,a,o)?kk(r):Tn(0),i=(n.left+s.x)/l.x,u=(n.top+s.y)/l.y,d=n.width/l.x,c=n.height/l.y;if(r&&o){let f=pa(r),p=qo(o)?pa(o):o,x=f,g=vm(x);for(;g&&p!==x;){let S=ru(g),y=g.getBoundingClientRect(),m=Go(g),h=y.left+(g.clientLeft+parseFloat(m.paddingLeft))*S.x,b=y.top+(g.clientTop+parseFloat(m.paddingTop))*S.y;i*=S.x,u*=S.y,d*=S.x,c*=S.y,i+=h,u+=b,x=pa(g),g=vm(x)}}return ms({width:d,height:c,x:i,y:u})}function Sm(e,t){let a=rf(e).scrollLeft;return t?t.left+a:xs(kn(e)).left+a}function Rk(e,t){let a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-Sm(e,a),n=a.top+t.scrollTop;return{x:o,y:n}}function JB(e){let{elements:t,rect:a,offsetParent:o,strategy:n}=e,r=n==="fixed",l=kn(o),s=t?nf(t.floating):!1;if(o===l||s&&r)return a;let i={scrollLeft:0,scrollTop:0},u=Tn(1),d=Tn(0),c=fr(o);if((c||!r)&&((ys(o)!=="body"||of(l))&&(i=rf(o)),c)){let p=xs(o);u=ru(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}let f=l&&!c&&!r?Rk(l,i):Tn(0);return{width:a.width*u.x,height:a.height*u.y,x:a.x*u.x-i.scrollLeft*u.x+d.x+f.x,y:a.y*u.y-i.scrollTop*u.y+d.y+f.y}}function ez(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function tz(e){let t=rf(e),a=e.ownerDocument.body,o=Fo(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),n=Fo(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight),r=-t.scrollLeft+Sm(e),l=-t.scrollTop;return Go(a).direction==="rtl"&&(r+=Fo(e.clientWidth,a.clientWidth)-o),{width:o,height:n,x:r,y:l}}var az=25;function oz(e,t,a){a===void 0&&(a="viewport");let o=a==="layoutViewport",n=pa(e),r=kn(e),l=n.visualViewport,s=r.clientWidth,i=r.clientHeight,u=0,d=0;if(l){let f=!bm()||t==="fixed";o?f||(u=-l.offsetLeft,d=-l.offsetTop):(s=l.width,i=l.height,f&&(u=l.offsetLeft,d=l.offsetTop))}if(Sm(r)<=0){let f=r.ownerDocument,p=f.body,x=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,S=Math.abs(r.clientWidth-p.clientWidth-g),y=getComputedStyle(r).scrollbarGutter==="stable both-edges"?S/2:S;y<=az&&(s-=y)}return{width:s,height:i,x:u,y:d}}function nz(e,t){let a=xs(e,!0,t==="fixed"),o=a.top+e.clientTop,n=a.left+e.clientLeft,r=ru(e),l=e.clientWidth*r.x,s=e.clientHeight*r.y,i=n*r.x,u=o*r.y;return{width:l,height:s,x:i,y:u}}function Ik(e,t,a){let o;if(t==="viewport"||t==="layoutViewport")o=oz(e,a,t);else if(t==="document")o=tz(kn(e));else if(qo(t))o=nz(t,a);else{let n=kk(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ms(o)}function rz(e,t){let a=t.get(e);if(a)return a;let o=gs(e,[],!1).filter(s=>qo(s)&&ys(s)!=="body"),n=null,r=Go(e).position==="fixed",l=r?gl(e):e;for(;qo(l)&&!nu(l);){let s=Go(l),i=xm(l),u=n?n.position:r?"fixed":"";!i&&(u==="fixed"||u==="absolute"&&s.position==="static")?o=o.filter(c=>c!==l):n=s,l=gl(l)}return t.set(e,o),o}function lz(e){let{element:t,boundary:a,rootBoundary:o,strategy:n}=e,l=[...a==="clippingAncestors"?nf(t)?[]:rz(t,this._c):[].concat(a),o],s=Ik(t,l[0],n),i=s.top,u=s.right,d=s.bottom,c=s.left;for(let f=1;f<l.length;f++){let p=Ik(t,l[f],n);i=Fo(p.top,i),u=In(p.right,u),d=In(p.bottom,d),c=Fo(p.left,c)}return{width:u-c,height:d-i,x:c,y:i}}function sz(e){let{width:t,height:a}=Ak(e);return{width:t,height:a}}function iz(e,t,a){let o=fr(t),n=kn(t),r=a==="fixed",l=xs(e,!0,r,t),s={scrollLeft:0,scrollTop:0},i=Tn(0);if((o||!r)&&((ys(t)!=="body"||of(n))&&(s=rf(t)),o)){let f=xs(t,!0,r,t);i.x=f.x+t.clientLeft,i.y=f.y+t.clientTop}!o&&n&&(i.x=Sm(n));let u=n&&!o&&!r?Rk(n,s):Tn(0),d=l.left+s.scrollLeft-i.x-u.x,c=l.top+s.scrollTop-i.y-u.y;return{x:d,y:c,width:l.width,height:l.height}}function Nb(e){return Go(e).position==="static"}function Tk(e,t){if(!fr(e)||Go(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return kn(e)===a&&(a=a.ownerDocument.body),a}function Ek(e,t){let a=pa(e);if(nf(e))return a;if(!fr(e)){let n=gl(e);for(;n&&!nu(n);){if(qo(n)&&!Nb(n))return n;n=gl(n)}return a}let o=Tk(e,t);for(;o&&Lk(o)&&Nb(o);)o=Tk(o,t);return o&&nu(o)&&Nb(o)&&!xm(o)?a:o||Ck(e)||a}var uz=async function(e){let t=this.getOffsetParent||Ek,a=this.getDimensions,o=await a(e.floating);return{reference:iz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function cz(e){return Go(e).direction==="rtl"}var Ok={convertOffsetParentRelativeRectToViewportRelativeRect:JB,getDocumentElement:kn,getClippingRect:lz,getOffsetParent:Ek,getElementRects:uz,getClientRects:ez,getDimensions:sz,getScale:ru,isElement:qo,isRTL:cz};function Dk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fz(e,t,a){let o=null,n,r=kn(e);function l(){var d;clearTimeout(n),(d=o)==null||d.disconnect(),o=null}function s(d,c){d===void 0&&(d=!1),c===void 0&&(c=1),l();let f=e.getBoundingClientRect(),{left:p,top:x,width:g,height:S}=f;if(d||t(),!g||!S)return;let y=af(x),m=af(r.clientWidth-(p+g)),h=af(r.clientHeight-(x+S)),b=af(p),C={rootMargin:-y+"px "+-m+"px "+-h+"px "+-b+"px",threshold:Fo(0,In(1,c))||1},T=!0;function w(E){let A=E[0].intersectionRatio;if(!Dk(f,e.getBoundingClientRect()))return s();if(A!==c){if(!T)return s();A?s(!1,A):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T=!1}try{o=new IntersectionObserver(w,{...C,root:r.ownerDocument})}catch{o=new IntersectionObserver(w,C)}o.observe(e)}let i=pa(e),u=()=>s(a);return i.addEventListener("resize",u),s(!0),()=>{i.removeEventListener("resize",u),l()}}function _b(e,t,a,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:i=!1}=o,u=Pb(e),d=n||r?[...u?gs(u):[],...t?gs(t):[]]:[];d.forEach(y=>{n&&y.addEventListener("scroll",a),r&&y.addEventListener("resize",a)});let c=u&&s?fz(u,a,r):null,f=-1,p=null;l&&(p=new ResizeObserver(y=>{let[m]=y;m&&m.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=p)==null||h.observe(t)})),a()}),u&&!i&&p.observe(u),t&&p.observe(t));let x,g=i?xs(e):null;i&&S();function S(){let y=xs(e);g&&!Dk(g,y)&&a(),g=y,x=requestAnimationFrame(S)}return a(),()=>{var y;d.forEach(m=>{n&&m.removeEventListener("scroll",a),r&&m.removeEventListener("resize",a)}),c?.(),(y=p)==null||y.disconnect(),p=null,i&&cancelAnimationFrame(x)}}var Mk=gk;var Nk=yk,Pk=pk,_k=bk,Bk=mk,Bb=dk;var zk=xk,zb=(e,t,a)=>{let o=new Map,n=a??{},r={...Ok,...n.platform,_c:o};return fk(e,t,{...n,platform:r})};var ht=k(X(),1),Fk=k(X(),1),Hk=k(Cu(),1),dz=typeof document<"u",pz=function(){},Lm=dz?Fk.useLayoutEffect:pz;function Cm(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 a,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(o=a;o--!==0;)if(!Cm(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),a=n.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=a;o--!==0;){let r=n[o];if(!(r==="_owner"&&e.$$typeof)&&!Cm(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function qk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uk(e,t){let a=qk(e);return Math.round(t*a)/a}function Ub(e){let t=ht.useRef(e);return Lm(()=>{t.current=e}),t}function Gk(e){e===void 0&&(e={});let{placement:t="bottom",strategy:a="absolute",middleware:o=[],platform:n,elements:{reference:r,floating:l}={},transform:s=!0,whileElementsMounted:i,open:u}=e,[d,c]=ht.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=ht.useState(o);Cm(f,o)||p(o);let[x,g]=ht.useState(null),[S,y]=ht.useState(null),m=ht.useCallback(ie=>{ie!==C.current&&(C.current=ie,g(ie))},[]),h=ht.useCallback(ie=>{ie!==T.current&&(T.current=ie,y(ie))},[]),b=r||x,L=l||S,C=ht.useRef(null),T=ht.useRef(null),w=ht.useRef(d),E=i!=null,A=Ub(i),z=Ub(n),B=Ub(u),oe=ht.useCallback(()=>{if(!C.current||!T.current)return;let ie={placement:t,strategy:a,middleware:f};z.current&&(ie.platform=z.current),zb(C.current,T.current,ie).then(Te=>{let F={...Te,isPositioned:B.current!==!1};N.current&&!Cm(w.current,F)&&(w.current=F,Hk.flushSync(()=>{c(F)}))})},[f,t,a,z,B]);Lm(()=>{u===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,c(ie=>({...ie,isPositioned:!1})))},[u]);let N=ht.useRef(!1);Lm(()=>(N.current=!0,()=>{N.current=!1}),[]),Lm(()=>{if(b&&(C.current=b),L&&(T.current=L),b&&L){if(A.current)return A.current(b,L,oe);oe()}},[b,L,oe,A,E]);let J=ht.useMemo(()=>({reference:C,floating:T,setReference:m,setFloating:h}),[m,h]),$=ht.useMemo(()=>({reference:b,floating:L}),[b,L]),Z=ht.useMemo(()=>{let ie={position:a,left:0,top:0};if(!$.floating)return ie;let Te=Uk($.floating,d.x),F=Uk($.floating,d.y);return s?{...ie,transform:"translate("+Te+"px, "+F+"px)",...qk($.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Te,top:F}},[a,s,$.floating,d.x,d.y]);return ht.useMemo(()=>({...d,update:oe,refs:J,elements:$,floatingStyles:Z}),[d,oe,J,$,Z])}var mz=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){let{element:o,padding:n}=typeof e=="function"?e(a):e;return o&&t(o)?o.current!=null?Bb({element:o.current,padding:n}).fn(a):{}:o?Bb({element:o,padding:n}).fn(a):{}}}},jk=(e,t)=>{let a=Mk(e);return{name:a.name,fn:a.fn,options:[e,t]}},Vk=(e,t)=>{let a=Nk(e);return{name:a.name,fn:a.fn,options:[e,t]}},$k=(e,t)=>({fn:zk(e).fn,options:[e,t]}),Xk=(e,t)=>{let a=Pk(e);return{name:a.name,fn:a.fn,options:[e,t]}},Kk=(e,t)=>{let a=_k(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Yk=(e,t)=>{let a=Bk(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Qk=(e,t)=>{let a=mz(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Zk=k(X(),1);var hz=Object.defineProperty,gz=(e,t)=>hz(e,"name",{value:t,configurable:!0});function Fb(e){let[t,a]=Zk.useState(void 0);return Je(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let r=n[0],l,s;if("borderBoxSize"in r){let i=r.borderBoxSize,u=Array.isArray(i)?i[0]:i;l=u.inlineSize,s=u.blockSize}else l=e.offsetWidth,s=e.offsetHeight;a({width:l,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else a(void 0)},[e]),t}gz(Fb,"useSize");var lu=k(j(),1),yz=Object.defineProperty,yl=(e,t)=>yz(e,"name",{value:t,configurable:!0});var Wk="Popper",[Jk,su]=Vt(Wk),[xz,eR]=Jk(Wk),bz=yl(e=>{let{__scopePopper:t,children:a}=e,[o,n]=Jt.useState(null),[r,l]=Jt.useState(void 0);return(0,lu.jsx)(xz,{scope:t,anchor:o,onAnchorChange:n,placementState:r,setPlacementState:l,children:a})},"Popper"),vz="PopperAnchor",Sz=Jt.forwardRef(yl(function(t,a){let{__scopePopper:o,virtualRef:n,...r}=t,l=eR(vz,o),s=Jt.useRef(null),i=l.onAnchorChange,u=Jt.useCallback(g=>{s.current=g,g&&i(g)},[i]),d=_e(a,u),c=Jt.useRef(null);Jt.useEffect(()=>{if(!n)return;let g=c.current;c.current=n.current,g!==c.current&&i(c.current)});let f=l.placementState&&wm(l.placementState),p=f?.[0],x=f?.[1];return n?null:(0,lu.jsx)(Be.div,{"data-radix-popper-side":p,"data-radix-popper-align":x,...r,ref:d})},"PopperAnchor")),tR="PopperContent",[Lz,q7]=Jk(tR),Cz=Jt.forwardRef(yl(function(t,a){let{__scopePopper:o,side:n="bottom",sideOffset:r=0,align:l="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:x="optimized",onPlaced:g,...S}=t,y=eR(tR,o),[m,h]=Jt.useState(null),b=_e(a,h),[L,C]=Jt.useState(null),T=Fb(L),w=T?.width??0,E=T?.height??0,A=n+(l!=="center"?"-"+l:""),z=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},B=Array.isArray(d)?d:[d],oe=B.length>0,N={padding:z,boundary:B.filter(aR),altBoundary:oe},{refs:J,floatingStyles:$,placement:Z,isPositioned:ie,middlewareData:Te}=Gk({strategy:"fixed",placement:A,whileElementsMounted:yl((..._)=>_b(..._,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[jk({mainAxis:r+E,alignmentAxis:s}),u&&Vk({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?$k():void 0,...N}),u&&Xk({...N}),Kk({...N,apply:yl(({elements:_,rects:re,availableWidth:et,availableHeight:Lt})=>{let{width:Ko,height:Nn}=re.reference,Oe=_.floating.style;Oe.setProperty("--radix-popper-available-width",`${et}px`),Oe.setProperty("--radix-popper-available-height",`${Lt}px`),Oe.setProperty("--radix-popper-anchor-width",`${Ko}px`),Oe.setProperty("--radix-popper-anchor-height",`${Nn}px`)},"apply")}),L&&Qk({element:L,padding:i}),wz({arrowWidth:w,arrowHeight:E}),p&&Yk({strategy:"referenceHidden",...N,boundary:oe?N.boundary:void 0})]}),F=y.setPlacementState;Je(()=>(F(Z),()=>{F(void 0)}),[Z,F]);let[Wa,vo]=wm(Z),$o=po(g);Je(()=>{ie&&$o?.()},[ie,$o]);let Mn=Te.arrow?.x,se=Te.arrow?.y,ut=Te.arrow?.centerOffset!==0,[Xo,na]=Jt.useState();return Je(()=>{m&&na(window.getComputedStyle(m).zIndex)},[m]),(0,lu.jsx)("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:ie?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Xo,"--radix-popper-transform-origin":[Te.transformOrigin?.x,Te.transformOrigin?.y].join(" "),...Te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,lu.jsx)(Lz,{scope:o,placedSide:Wa,placedAlign:vo,onArrowChange:C,arrowX:Mn,arrowY:se,shouldHideArrow:ut,children:(0,lu.jsx)(Be.div,{"data-side":Wa,"data-align":vo,...S,ref:b,style:{...S.style,animation:ie?S.style?.animation:"none"}})})})},"PopperContent"));function aR(e){return e!==null}yl(aR,"isNotNull");var wz=yl(e=>({name:"transformOrigin",options:e,fn(t){let{placement:a,rects:o,middlewareData:n}=t,l=n.arrow?.centerOffset!==0,s=l?0:e.arrowWidth,i=l?0:e.arrowHeight,[u,d]=wm(a),c={start:"0%",center:"50%",end:"100%"}[d],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+i/2,x="",g="";return u==="bottom"?(x=l?c:`${f}px`,g=`${-i}px`):u==="top"?(x=l?c:`${f}px`,g=`${o.floating.height+i}px`):u==="right"?(x=`${-i}px`,g=l?c:`${p}px`):u==="left"&&(x=`${o.floating.width+i}px`,g=l?c:`${p}px`),{data:{x,y:g}}}}),"transformOrigin");function wm(e){let[t,a="center"]=e.split("-");return[t,a]}yl(wm,"getSideAndAlignFromPlacement");var Im=bz,lf=Sz,Tm=Cz;var nR=k(X(),1);var rR=k(j(),1),Iz=Object.defineProperty,Tz=(e,t)=>Iz(e,"name",{value:t,configurable:!0}),Az=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),kz=nR.forwardRef(Tz(function(t,a){return(0,rR.jsx)(Be.span,{...t,ref:a,style:{...Az,...t.style}})},"VisuallyHidden")),lR=kz;var Dt=k(j(),1),Oz=Object.defineProperty,Ot=(e,t)=>Oz(e,"name",{value:t,configurable:!0}),[Gb,aX]=Vt("Tooltip",[su]),jb=su(),Dz="TooltipProvider",Mz=700,Hb="tooltip.open",[Nz,Vb]=Gb(Dz),Pz=Ot(e=>{let{__scopeTooltip:t,delayDuration:a=Mz,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:r}=e,l=fe.useRef(!0),s=fe.useRef(!1),i=fe.useRef(0);return fe.useEffect(()=>{let u=i.current;return()=>window.clearTimeout(u)},[]),(0,Dt.jsx)(Nz,{scope:t,isOpenDelayedRef:l,delayDuration:a,onOpen:fe.useCallback(()=>{o<=0||(window.clearTimeout(i.current),l.current=!1)},[o]),onClose:fe.useCallback(()=>{o<=0||(window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,o))},[o]),isPointerInTransitRef:s,onPointerInTransitChange:fe.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:r})},"TooltipProvider"),qb="Tooltip",[_z,uf]=Gb(qb),Bz=Ot(e=>{let{__scopeTooltip:t,children:a,open:o,defaultOpen:n,onOpenChange:r,disableHoverableContent:l,delayDuration:s}=e,i=Vb(qb,e.__scopeTooltip),u=jb(t),[d,c]=fe.useState(null),[f,p]=fe.useState(void 0),x=Va(),g=fe.useRef(0),S=l??i.disableHoverableContent,y=s??i.delayDuration,m=fe.useRef(!1),[h,b]=No({prop:o,defaultProp:n??!1,onChange:Ot(A=>{A?(i.onOpen(),document.dispatchEvent(new CustomEvent(Hb))):i.onClose(),r?.(A)},"onChange"),caller:qb}),L=fe.useMemo(()=>h?m.current?"delayed-open":"instant-open":"closed",[h]),C=fe.useCallback(()=>{window.clearTimeout(g.current),g.current=0,m.current=!1,b(!0)},[b]),T=fe.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b(!1)},[b]),w=fe.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{m.current=!0,b(!0),g.current=0},y)},[y,b]);return fe.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),(0,Dt.jsx)(Im,{...u,children:(0,Dt.jsx)(_z,{scope:t,contentId:f??x,setContentId:p,open:h,stateAttribute:L,trigger:d,onTriggerChange:c,onTriggerEnter:fe.useCallback(()=>{i.isOpenDelayedRef.current?w():C()},[i.isOpenDelayedRef,w,C]),onTriggerLeave:fe.useCallback(()=>{S?T():(window.clearTimeout(g.current),g.current=0)},[T,S]),onOpen:C,onClose:T,disableHoverableContent:S,children:a})})},"Tooltip"),sR="TooltipTrigger",zz=fe.forwardRef(Ot(function(t,a){let{__scopeTooltip:o,...n}=t,r=uf(sR,o),l=Vb(sR,o),s=jb(o),i=fe.useRef(null),u=_e(a,i,r.onTriggerChange),d=fe.useRef(!1),c=fe.useRef(!1),f=fe.useCallback(()=>d.current=!1,[]);return fe.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),(0,Dt.jsx)(lf,{asChild:!0,...s,children:(0,Dt.jsx)(Be.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:u,onPointerMove:ve(t.onPointerMove,p=>{p.pointerType!=="touch"&&!c.current&&!l.isPointerInTransitRef.current&&(r.onTriggerEnter(),c.current=!0)}),onPointerLeave:ve(t.onPointerLeave,()=>{r.onTriggerLeave(),c.current=!1}),onPointerDown:ve(t.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ve(t.onFocus,()=>{d.current||r.onOpen()}),onBlur:ve(t.onBlur,r.onClose),onClick:ve(t.onClick,r.onClose)})})},"TooltipTrigger")),iR="TooltipPortal",[Uz,Fz]=Gb(iR,{forceMount:void 0}),Hz=Ot(e=>{let{__scopeTooltip:t,forceMount:a,children:o,container:n}=e,r=uf(iR,t);return(0,Dt.jsx)(Uz,{scope:t,forceMount:a,children:(0,Dt.jsx)(ho,{present:a||r.open,children:(0,Dt.jsx)(Yi,{asChild:!0,container:n,children:o})})})},"TooltipPortal"),sf="TooltipContent",qz=fe.forwardRef(Ot(function(t,a){let o=Fz(sf,t.__scopeTooltip),{forceMount:n=o.forceMount,side:r="top",...l}=t,s=uf(sf,t.__scopeTooltip);return(0,Dt.jsx)(ho,{present:n||s.open,children:s.disableHoverableContent?(0,Dt.jsx)(uR,{side:r,...l,ref:a}):(0,Dt.jsx)(Gz,{side:r,...l,ref:a})})},"TooltipContent")),Gz=fe.forwardRef(Ot(function(t,a){let o=uf(sf,t.__scopeTooltip),n=Vb(sf,t.__scopeTooltip),r=fe.useRef(null),l=_e(a,r),[s,i]=fe.useState(null),{trigger:u,onClose:d}=o,c=r.current,{onPointerInTransitChange:f}=n,p=fe.useCallback(()=>{i(null),f(!1)},[f]),x=fe.useCallback((g,S)=>{let y=g.currentTarget,m={x:g.clientX,y:g.clientY},h=cR(m,y.getBoundingClientRect()),b=fR(m,h),L=dR(S.getBoundingClientRect()),C=mR([...b,...L]);i(C),f(!0)},[f]);return fe.useEffect(()=>()=>p(),[p]),fe.useEffect(()=>{if(u&&c){let g=Ot(y=>x(y,c),"handleTriggerLeave"),S=Ot(y=>x(y,u),"handleContentLeave");return u.addEventListener("pointerleave",g),c.addEventListener("pointerleave",S),()=>{u.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",S)}}},[u,c,x,p]),fe.useEffect(()=>{if(s){let g=Ot(S=>{let y=S.target,m={x:S.clientX,y:S.clientY},h=u?.contains(y)||c?.contains(y),b=!pR(m,s);h?p():b&&(p(),d())},"handleTrackPointerGrace");return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,c,s,d,p]),(0,Dt.jsx)(uR,{...t,ref:l})},"TooltipContentHoverable")),jz=Px("TooltipContent"),uR=fe.forwardRef(Ot(function(t,a){let{__scopeTooltip:o,children:n,"aria-label":r,id:l,onEscapeKeyDown:s,onPointerDownOutside:i,...u}=t,d=uf(sf,o),c=jb(o),{onClose:f}=d;fe.useEffect(()=>(document.addEventListener(Hb,f),()=>document.removeEventListener(Hb,f)),[f]),fe.useEffect(()=>{if(d.trigger){let x=Ot(g=>{g.target instanceof Node&&g.target.contains(d.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[d.trigger,f]);let{setContentId:p}=d;return Je(()=>(p(l),()=>{p(void 0)}),[l,p]),(0,Dt.jsx)(Ki,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:x=>x.preventDefault(),onDismiss:f,children:(0,Dt.jsxs)(Tm,{"data-state":d.stateAttribute,role:r?void 0:"tooltip",id:r?void 0:d.contentId,...c,...u,ref:a,style:{...u.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:[(0,Dt.jsx)(jz,{children:n}),r?(0,Dt.jsx)(lR,{id:d.contentId,role:"tooltip",children:r}):null]})})},"TooltipContentImpl"));function cR(e,t){let a=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(a,o,n,r)){case r:return"left";case n:return"right";case a:return"top";case o:return"bottom";default:throw new Error("unreachable")}}Ot(cR,"getExitSideFromRect");function fR(e,t,a=5){let o=[];switch(t){case"top":o.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":o.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":o.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":o.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return o}Ot(fR,"getPaddedExitPoints");function dR(e){let{top:t,right:a,bottom:o,left:n}=e;return[{x:n,y:t},{x:a,y:t},{x:a,y:o},{x:n,y:o}]}Ot(dR,"getPointsFromRect");function pR(e,t){let{x:a,y:o}=e,n=!1;for(let r=0,l=t.length-1;r<t.length;l=r++){let s=t[r],i=t[l],u=s.x,d=s.y,c=i.x,f=i.y;d>o!=f>o&&a<(c-u)*(o-d)/(f-d)+u&&(n=!n)}return n}Ot(pR,"isPointInPolygon");function mR(e){let t=e.slice();return t.sort((a,o)=>a.x<o.x?-1:a.x>o.x?1:a.y<o.y?-1:a.y>o.y?1:0),hR(t)}Ot(mR,"getHull");function hR(e){if(e.length<=1)return e.slice();let t=[];for(let o=0;o<e.length;o++){let n=e[o];for(;t.length>=2;){let r=t[t.length-1],l=t[t.length-2];if((r.x-l.x)*(n.y-l.y)>=(r.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}t.pop();let a=[];for(let o=e.length-1;o>=0;o--){let n=e[o];for(;a.length>=2;){let r=a[a.length-1],l=a[a.length-2];if((r.x-l.x)*(n.y-l.y)>=(r.y-l.y)*(n.x-l.x))a.pop();else break}a.push(n)}return a.pop(),t.length===1&&a.length===1&&t[0].x===a[0].x&&t[0].y===a[0].y?t:t.concat(a)}Ot(hR,"getHullPresorted");var gR=Pz,yR=Bz,xR=zz,bR=Hz,vR=qz;var Rn=k(j(),1),SR=gR;function $b({label:e,children:t,side:a="bottom"}){return(0,Rn.jsxs)(yR,{children:[(0,Rn.jsx)(xR,{asChild:!0,children:t}),(0,Rn.jsx)(bR,{children:(0,Rn.jsx)(vR,{side:a,sideOffset:6,className:W("z-50 rounded-md border border-border bg-popover px-2 py-1 text-xs text-popover-foreground shadow-md","data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95"),children:e})})]})}var LR=ZA;function CR({className:e,...t}){return(0,Rn.jsx)(WA,{className:W("inline-flex items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground",e),...t})}function Xb({className:e,...t}){return(0,Rn.jsx)(JA,{className:W("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-sm font-medium transition-colors","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring","data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t})}function Kb({className:e,...t}){return(0,Rn.jsx)(ek,{className:W("outline-none",e),...t})}function iu({className:e,...t}){return(0,Rn.jsx)("div",{"aria-hidden":"true",className:W("animate-pulse rounded-md bg-muted",e),...t})}var gr=k(X(),1);function wR(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,o=Array(t);a<t;a++)o[a]=e[a];return o}function $z(e){if(Array.isArray(e))return e}function Xz(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var o,n,r,l,s=[],i=!0,u=!1;try{if(r=(a=a.call(e)).next,t!==0)for(;!(i=(o=r.call(a)).done)&&(s.push(o.value),s.length!==t);i=!0);}catch(d){u=!0,n=d}finally{try{if(!i&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(u)throw n}}return s}}function Kz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
104
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yz(e,t){return $z(e)||Xz(e,t)||Qz(e,t)||Kz()}function Qz(e,t){if(e){if(typeof e=="string")return wR(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?wR(e,t):void 0}}var UR=Object.entries,IR=Object.setPrototypeOf,Zz=Object.isFrozen,Wz=Object.getPrototypeOf,Jz=Object.getOwnPropertyDescriptor,St=Object.freeze,Mt=Object.seal,uu=Object.create,FR=typeof Reflect<"u"&&Reflect,tv=FR.apply,av=FR.construct;St||(St=function(t){return t});Mt||(Mt=function(t){return t});tv||(tv=function(t,a){for(var o=arguments.length,n=new Array(o>2?o-2:0),r=2;r<o;r++)n[r-2]=arguments[r];return t.apply(a,n)});av||(av=function(t){for(var a=arguments.length,o=new Array(a>1?a-1:0),n=1;n<a;n++)o[n-1]=arguments[n];return new t(...o)});var vs=gt(Array.prototype.forEach),eU=gt(Array.prototype.lastIndexOf),TR=gt(Array.prototype.pop),cf=gt(Array.prototype.push),tU=gt(Array.prototype.splice),cu=Array.isArray,pf=gt(String.prototype.toLowerCase),Yb=gt(String.prototype.toString),AR=gt(String.prototype.match),ff=gt(String.prototype.replace),kR=gt(String.prototype.indexOf),aU=gt(String.prototype.trim),oU=gt(Number.prototype.toString),nU=gt(Boolean.prototype.toString),RR=typeof BigInt>"u"?null:gt(BigInt.prototype.toString),ER=typeof Symbol>"u"?null:gt(Symbol.prototype.toString),Ea=gt(Object.prototype.hasOwnProperty),df=gt(Object.prototype.toString),ea=gt(RegExp.prototype.test),bs=rU(TypeError);function gt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,o=new Array(a>1?a-1:0),n=1;n<a;n++)o[n-1]=arguments[n];return tv(e,t,o)}}function rU(e){return function(){for(var t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];return av(e,a)}}function Se(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pf;if(IR&&IR(e,null),!cu(t))return e;let o=t.length;for(;o--;){let n=t[o];if(typeof n=="string"){let r=a(n);r!==n&&(Zz(t)||(t[o]=r),n=r)}e[n]=!0}return e}function lU(e){for(let t=0;t<e.length;t++)Ea(e,t)||(e[t]=null);return e}function Ka(e){let t=uu(null);for(let o of UR(e)){var a=Yz(o,2);let n=a[0],r=a[1];Ea(e,n)&&(cu(r)?t[n]=lU(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Ka(r):t[n]=r)}return t}function sU(e){switch(typeof e){case"string":return e;case"number":return oU(e);case"boolean":return nU(e);case"bigint":return RR?RR(e):"0";case"symbol":return ER?ER(e):"Symbol()";case"undefined":return df(e);case"function":case"object":{if(e===null)return df(e);let t=e,a=yo(t,"toString");if(typeof a=="function"){let o=a(t);return typeof o=="string"?o:df(o)}return df(e)}default:return df(e)}}function yo(e,t){for(;e!==null;){let o=Jz(e,t);if(o){if(o.get)return gt(o.get);if(typeof o.value=="function")return gt(o.value)}e=Wz(e)}function a(){return null}return a}function iU(e){try{return ea(e,""),!0}catch{return!1}}var OR=St(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qb=St(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Zb=St(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uU=St(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wb=St(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),cU=St(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),DR=St(["#text"]),MR=St(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Jb=St(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),NR=St(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Am=St(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fU=Mt(/{{[\w\W]*|^[\w\W]*}}/g),dU=Mt(/<%[\w\W]*|^[\w\W]*%>/g),pU=Mt(/\${[\w\W]*/g),mU=Mt(/^data-[\-\w.\u00B7-\uFFFF]+$/),hU=Mt(/^aria-[\-\w]+$/),PR=Mt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gU=Mt(/^(?:\w+script|data):/i),yU=Mt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xU=Mt(/^html$/i),bU=Mt(/^[a-z][.\w]*(-[.\w]+)+$/i),_R=Mt(/<[/\w!]/g),BR=Mt(/<[/\w]/g),vU=Mt(/<\/no(script|embed|frames)/i),SU=Mt(/\/>/i),Xa={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},HR=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],LU=St(Se({},HR)),CU=(function(){let e={};return vs(HR,t=>{e[t]=Mt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),St(e)})(),wU=function(){return typeof window>"u"?null:window},IU=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,n="data-tt-policy-suffix";a&&a.hasAttribute(n)&&(o=a.getAttribute(n));let r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},zR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},xl=function(t,a,o,n){return Ea(t,a)&&cu(t[a])?Se(n.base?Ka(n.base):{},t[a],n.transform):o},ev=function(t,a,o){let n=Ea(t,a)?t[a]:void 0;return n&&typeof n=="object"?Ka(n):o()};function qR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wU(),t=M=>qR(M);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==Xa.document||!e.Element)return t.isSupported=!1,t;let a=e.document,o=a,n=o.currentScript;e.DocumentFragment;let r=e.HTMLTemplateElement,l=e.Node,s=e.Element,i=e.NodeFilter,u=e.NamedNodeMap;u===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let d=e.DOMParser,c=e.trustedTypes,f=s.prototype,p=yo(f,"cloneNode"),x=yo(f,"remove"),g=yo(f,"removeAttributeNode"),S=yo(f,"nextSibling"),y=yo(f,"childNodes"),m=yo(f,"parentNode"),h=yo(f,"shadowRoot"),b=yo(f,"attributes"),L=l&&l.prototype?yo(l.prototype,"nodeType"):null,C=l&&l.prototype?yo(l.prototype,"nodeName"):null,T=l&&l.prototype?yo(l.prototype,"ownerDocument"):null,w=function(v){return L?L(v):v.nodeType},E=function(v){return C?C(v):v.nodeName};if(typeof r=="function"){let M=a.createElement("template");M.content&&M.content.ownerDocument&&(a=M.content.ownerDocument)}let A,z="",B,oe=!1,N=0,J=function(){if(N>0)throw bs('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},$=function(v){J(),N++;try{return A.createHTML(v)}finally{N--}},Z=function(v){J(),N++;try{return A.createScriptURL(v)}finally{N--}},ie=function(){return oe||(B=IU(c,n),oe=!0),B},Te=a,F=Te.implementation,Wa=Te.createNodeIterator,vo=Te.createDocumentFragment,$o=Te.getElementsByTagName,Mn=o.importNode,se=zR();t.isSupported=typeof UR=="function"&&typeof m=="function"&&F&&F.createHTMLDocument!==void 0;let ut=fU,Xo=dU,na=pU,_=mU,re=hU,et=gU,Lt=yU,Ko=bU,Nn=PR,Oe=null,qm=Se({},[...OR,...Qb,...Zb,...Wb,...DR]),Qe=null,Gm=Se({},[...MR,...Jb,...NR,...Am]),Yo=Object.seal(uu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),gu=null,Av=null,yr=Object.seal(uu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),kv=!0,jm=!0,Rv=!1,Ev=!0,xr=!1,Cl=!0,wl=!1,Vm=!1,Lf=null,Cf=null,$m=!1,Rs=!1,wf=!1,If=!1,Ov=!0,Dv=!1,Mv="user-content-",Xm=!0,Km=!1,Es={},Os=null,Nv=Se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Pv=null,_v=Se({},["audio","video","img","source","image","track"]),Bv=null,zv=Se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Tf="http://www.w3.org/1998/Math/MathML",Af="http://www.w3.org/2000/svg",Qo="http://www.w3.org/1999/xhtml",Ds=Qo,Ym=!1,Qm=null,eO=Se({},[Tf,Af,Qo],Yb),Uv=St(["mi","mo","mn","ms","mtext"]),Zm=Se({},Uv),Fv=St(["annotation-xml"]),Wm=Se({},Fv),tO=Se({},["title","style","font","a","script"]),yu=null,aO=["application/xhtml+xml","text/html"],oO="text/html",ct=null,Ms=null,nO=a.createElement("form"),Hv=function(v){return v instanceof RegExp||v instanceof Function},Jm=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ms&&Ms===v)return;(!v||typeof v!="object")&&(v={}),v=Ka(v),yu=aO.indexOf(v.PARSER_MEDIA_TYPE)===-1?oO:v.PARSER_MEDIA_TYPE,ct=yu==="application/xhtml+xml"?Yb:pf,Oe=xl(v,"ALLOWED_TAGS",qm,{transform:ct}),Qe=xl(v,"ALLOWED_ATTR",Gm,{transform:ct}),Qm=xl(v,"ALLOWED_NAMESPACES",eO,{transform:Yb}),Bv=xl(v,"ADD_URI_SAFE_ATTR",zv,{transform:ct,base:zv}),Pv=xl(v,"ADD_DATA_URI_TAGS",_v,{transform:ct,base:_v}),Os=xl(v,"FORBID_CONTENTS",Nv,{transform:ct}),gu=xl(v,"FORBID_TAGS",Ka({}),{transform:ct}),Av=xl(v,"FORBID_ATTR",Ka({}),{transform:ct}),Es=Ea(v,"USE_PROFILES")?v.USE_PROFILES&&typeof v.USE_PROFILES=="object"?Ka(v.USE_PROFILES):v.USE_PROFILES:!1,kv=v.ALLOW_ARIA_ATTR!==!1,jm=v.ALLOW_DATA_ATTR!==!1,Rv=v.ALLOW_UNKNOWN_PROTOCOLS||!1,Ev=v.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xr=v.SAFE_FOR_TEMPLATES||!1,Cl=v.SAFE_FOR_XML!==!1,wl=v.WHOLE_DOCUMENT||!1,Rs=v.RETURN_DOM||!1,wf=v.RETURN_DOM_FRAGMENT||!1,If=v.RETURN_TRUSTED_TYPE||!1,$m=v.FORCE_BODY||!1,Ov=v.SANITIZE_DOM!==!1,Dv=v.SANITIZE_NAMED_PROPS||!1,Xm=v.KEEP_CONTENT!==!1,Km=v.IN_PLACE||!1,Nn=iU(v.ALLOWED_URI_REGEXP)?v.ALLOWED_URI_REGEXP:PR,Ds=typeof v.NAMESPACE=="string"?v.NAMESPACE:Qo,Zm=ev(v,"MATHML_TEXT_INTEGRATION_POINTS",()=>Se({},Uv)),Wm=ev(v,"HTML_INTEGRATION_POINTS",()=>Se({},Fv));let I=ev(v,"CUSTOM_ELEMENT_HANDLING",()=>uu(null));if(Yo=uu(null),Ea(I,"tagNameCheck")&&Hv(I.tagNameCheck)&&(Yo.tagNameCheck=I.tagNameCheck),Ea(I,"attributeNameCheck")&&Hv(I.attributeNameCheck)&&(Yo.attributeNameCheck=I.attributeNameCheck),Ea(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(Yo.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),Mt(Yo),xr&&(jm=!1),wf&&(Rs=!0),Es&&(Oe=Se({},DR),Qe=uu(null),Es.html===!0&&(Se(Oe,OR),Se(Qe,MR)),Es.svg===!0&&(Se(Oe,Qb),Se(Qe,Jb),Se(Qe,Am)),Es.svgFilters===!0&&(Se(Oe,Zb),Se(Qe,Jb),Se(Qe,Am)),Es.mathMl===!0&&(Se(Oe,Wb),Se(Qe,NR),Se(Qe,Am))),yr.tagCheck=null,yr.attributeCheck=null,Ea(v,"ADD_TAGS")&&(typeof v.ADD_TAGS=="function"?yr.tagCheck=v.ADD_TAGS:cu(v.ADD_TAGS)&&(Oe===qm&&(Oe=Ka(Oe)),Se(Oe,v.ADD_TAGS,ct))),Ea(v,"ADD_ATTR")&&(typeof v.ADD_ATTR=="function"?yr.attributeCheck=v.ADD_ATTR:cu(v.ADD_ATTR)&&(Qe===Gm&&(Qe=Ka(Qe)),Se(Qe,v.ADD_ATTR,ct))),Ea(v,"ADD_FORBID_CONTENTS")&&cu(v.ADD_FORBID_CONTENTS)&&(Os===Nv&&(Os=Ka(Os)),Se(Os,v.ADD_FORBID_CONTENTS,ct)),Xm&&(Oe["#text"]=!0),wl&&Se(Oe,["html","head","body"]),Oe.table&&(Se(Oe,["tbody"]),delete gu.tbody),v.TRUSTED_TYPES_POLICY){if(typeof v.TRUSTED_TYPES_POLICY.createHTML!="function")throw bs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof v.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let O=A;A=v.TRUSTED_TYPES_POLICY;try{z=$("")}catch(H){throw A=O,H}}else v.TRUSTED_TYPES_POLICY===null?(A=void 0,z=""):(A===void 0&&(A=ie()),A&&typeof z=="string"&&(z=$("")));St&&St(v),Ms=v},qv=Se({},[...Qb,...Zb,...uU]),Gv=Se({},[...Wb,...cU]),rO=function(v,I,O){return I.namespaceURI===Qo?v==="svg":I.namespaceURI===Tf?v==="svg"&&(O==="annotation-xml"||Zm[O]):!!qv[v]},lO=function(v,I,O){return I.namespaceURI===Qo?v==="math":I.namespaceURI===Af?v==="math"&&Wm[O]:!!Gv[v]},sO=function(v,I,O){return I.namespaceURI===Af&&!Wm[O]||I.namespaceURI===Tf&&!Zm[O]?!1:!Gv[v]&&(tO[v]||!qv[v])},iO=function(v){let I=m(v);(!I||!I.tagName)&&(I={namespaceURI:Ds,tagName:"template"});let O=pf(v.tagName),H=pf(I.tagName);return Qm[v.namespaceURI]?v.namespaceURI===Af?rO(O,I,H):v.namespaceURI===Tf?lO(O,I,H):v.namespaceURI===Qo?sO(O,I,H):!!(yu==="application/xhtml+xml"&&Qm[v.namespaceURI]):!1},br=function(v){cf(t.removed,{element:v});try{m(v).removeChild(v)}catch{if(x(v),!m(v))throw bs("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},jv=function(v,I,O){try{g(v,I)}catch{try{v.removeAttribute(O)}catch{}}},kf=function(v){Rf(v);let I=y(v);if(I){let H=[];vs(I,K=>{cf(H,K)}),vs(H,K=>{try{x(K)}catch{}})}let O=b(v);if(O)for(let H=O.length-1;H>=0;--H){let K=O[H],ne=K&&K.name;typeof ne=="string"&&jv(v,K,ne)}},Il=function(v,I,O){if(!O)try{O=I.getAttributeNode(v)}catch{O=null}cf(t.removed,{attribute:O||null,from:I});try{O?g(I,O):I.removeAttribute(v)}catch{try{I.removeAttribute(v)}catch{}}if(v==="is")if(Rs||wf)try{br(I)}catch{}else try{I.setAttribute(v,"")}catch{}},uO=function(v){let I=b(v);if(I)for(let O=I.length-1;O>=0;--O){let H=I[O],K=H&&H.name;typeof K!="string"||Qe[ct(K)]||jv(v,H,K)}},Rf=function(v){let I=[v];for(;I.length>0;){let O=I.pop();w(O)===Xa.element&&uO(O);let K=y(O);if(K)for(let ne=K.length-1;ne>=0;--ne)I.push(K[ne])}},Vv=function(v,I){return Cl?v==="patchsrc"?!0:v==="for"&&I!=="label"&&I!=="output":!1},cO=function(v){if(!Cl)return;let I=[v];for(;I.length>0;){let O=I.pop(),H=w(O);if(H===Xa.processingInstruction||H===Xa.comment&&ea(BR,O.data)){try{x(O)}catch{}continue}if(H===Xa.element){let ne=O,qe=ct(E(O));try{ne.hasAttribute&&ne.hasAttribute("patchsrc")&&ne.removeAttribute("patchsrc"),ne.hasAttribute&&ne.hasAttribute("for")&&Vv("for",qe)&&ne.removeAttribute("for")}catch{}}let K=y(O);if(K)for(let ne=K.length-1;ne>=0;--ne)I.push(K[ne])}},$v=function(v){let I=null,O=null;if($m)v="<remove></remove>"+v;else{let ne=AR(v,/^[\r\n\t ]+/);O=ne&&ne[0]}yu==="application/xhtml+xml"&&Ds===Qo&&(v='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+v+"</body></html>");let H=A?$(v):v;if(Ds===Qo)try{I=new d().parseFromString(H,yu)}catch{}if(!I||!I.documentElement){I=F.createDocument(Ds,"template",null);try{I.documentElement.innerHTML=Ym?z:H}catch{}}let K=I.body||I.documentElement;return v&&O&&K.insertBefore(a.createTextNode(O),K.childNodes[0]||null),Ds===Qo?$o.call(I,wl?"html":"body")[0]:wl?I.documentElement:K},Xv=function(v){let I=T?T(v):v.ownerDocument;return Wa.call(I||v,v,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},Ef=function(v){return v=ff(v,ut," "),v=ff(v,Xo," "),v=ff(v,na," "),v},eh=function(v){var I;v.normalize();let O=T?T(v):v.ownerDocument,H=Wa.call(O||v,v,i.SHOW_TEXT|i.SHOW_COMMENT|i.SHOW_CDATA_SECTION|i.SHOW_PROCESSING_INSTRUCTION,null),K=H.nextNode();for(;K;)K.data=Ef(K.data),K=H.nextNode();let ne=(I=v.querySelectorAll)===null||I===void 0?void 0:I.call(v,"template");ne&&vs(ne,qe=>{Ns(qe.content)&&eh(qe.content)})},Of=function(v){let I=C?C(v):null;return typeof I!="string"||ct(I)!=="form"?!1:typeof v.nodeName!="string"||typeof v.textContent!="string"||typeof v.removeChild!="function"||v.attributes!==b(v)||typeof v.removeAttribute!="function"||typeof v.removeAttributeNode!="function"||typeof v.getAttributeNode!="function"||typeof v.setAttribute!="function"||typeof v.namespaceURI!="string"||typeof v.insertBefore!="function"||typeof v.hasChildNodes!="function"||v.nodeType!==L(v)||v.childNodes!==y(v)},Ns=function(v){if(!L||typeof v!="object"||v===null)return!1;try{return L(v)===Xa.documentFragment}catch{return!1}},xu=function(v){if(!L||typeof v!="object"||v===null)return!1;try{return typeof L(v)=="number"}catch{return!1}};function Zo(M,v,I){M.length!==0&&vs(M,O=>{O.call(t,v,I,Ms)})}let fO=function(v,I){return!!(Cl&&v.hasChildNodes()&&!xu(v.firstElementChild)&&ea(_R,v.textContent)&&ea(_R,v.innerHTML)||Cl&&v.namespaceURI===Qo&&LU[I]&&(xu(v.firstElementChild)||typeof v.textContent=="string"&&ea(CU[I],v.textContent))||v.nodeType===Xa.processingInstruction||Cl&&v.nodeType===Xa.comment&&ea(BR,v.data))},Df=function(v,I){if(v instanceof RegExp)return ea(v,I);if(v instanceof Function){for(var O=arguments.length,H=new Array(O>2?O-2:0),K=2;K<O;K++)H[K-2]=arguments[K];return!!v(I,...H)}return!1},dO=function(v,I,O){if(!gu[I]&&Wv(I)&&Df(Yo.tagNameCheck,I))return!1;if(Xm&&!Os[I]){let H=m(v),K=y(v);if(K&&H){let ne=K.length;for(let qe=ne-1;qe>=0;--qe){let tt=v===O?p(K[qe],!0):K[qe];H.insertBefore(tt,S(v))}}}return br(v),!0},Kv=function(v,I,O,H){return v.length===0?I:I===O||I===H?Ka(I):I},Yv=function(v,I){return v===I||m(v)!==null?!1:(Km&&Rf(v),!0)},Qv=function(v,I){if(Zo(se.beforeSanitizeElements,v,null),Yv(v,I))return!0;if(Of(v))return br(v),!0;let O=ct(E(v));if(Oe=Kv(se.uponSanitizeElement,Oe,qm,Lf),Zo(se.uponSanitizeElement,v,{tagName:O,allowedTags:Oe}),Yv(v,I))return!0;if(fO(v,O))return br(v),!0;if(gu[O]||!(yr.tagCheck instanceof Function&&yr.tagCheck(O))&&!Oe[O]){let K=dO(v,O,I);return K===!1&&Zo(se.afterSanitizeElements,v,null),K}if(w(v)===Xa.element&&!iO(v)||(O==="noscript"||O==="noembed"||O==="noframes")&&ea(vU,v.innerHTML))return br(v),!0;if(xr&&v.nodeType===Xa.text){let K=Ef(v.textContent);v.textContent!==K&&(cf(t.removed,{element:v.cloneNode()}),v.textContent=K)}return Zo(se.afterSanitizeElements,v,null),!1},Zv=function(v,I,O){if(Av[I]||Vv(I,v)||Ov&&(I==="id"||I==="name")&&(O in a||O in nO))return!1;let H=Qe[I]||yr.attributeCheck instanceof Function&&yr.attributeCheck(I,v);return jm&&ea(_,I)||kv&&ea(re,I)?!0:H?Bv[I]||ea(Nn,ff(O,Lt,""))||(I==="src"||I==="xlink:href"||I==="href")&&v!=="script"&&kR(O,"data:")===0&&Pv[v]||Rv&&!ea(et,ff(O,Lt,""))?!0:!O:Wv(v)&&Df(Yo.tagNameCheck,v)&&Df(Yo.attributeNameCheck,I,v)||I==="is"&&Yo.allowCustomizedBuiltInElements&&Df(Yo.tagNameCheck,O)},pO=Se({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Wv=function(v){return!pO[pf(v)]&&ea(Ko,v)},mO=function(v,I,O,H){if(A&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!O)switch(c.getAttributeType(v,I)){case"TrustedHTML":return $(H);case"TrustedScriptURL":return Z(H)}return H},hO=function(v,I,O,H){try{return O?v.setAttributeNS(O,I,H):v.setAttribute(I,H),Of(v)?(br(v),!1):!0}catch{return Il(I,v),!1}},Jv=function(v){Zo(se.beforeSanitizeAttributes,v,null);let I=v.attributes;if(!I||Of(v))return;Qe=Kv(se.uponSanitizeAttribute,Qe,Gm,Cf);let O={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Qe,forceKeepAttr:void 0},H=I.length,K=ct(v.nodeName);for(;H--;){let ne=I[H],qe=ne.name,tt=ne.namespaceURI,ga=ne.value,ya=ct(qe),ah=ga,ra=qe==="value"?ah:aU(ah),eS=!1;if(O.attrName=ya,O.attrValue=ra,O.keepAttr=!0,O.forceKeepAttr=void 0,Zo(se.uponSanitizeAttribute,v,O),ra=O.attrValue,Dv&&(ya==="id"||ya==="name")&&kR(ra,Mv)!==0&&(Il(qe,v,ne),ra=Mv+ra,eS=!0),Cl&&ea(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ra)){Il(qe,v,ne);continue}if(ya==="attributename"&&AR(ra,"href")){Il(qe,v,ne);continue}if(!O.forceKeepAttr){if(!O.keepAttr){Il(qe,v,ne);continue}if(!Ev&&ea(SU,ra)){Il(qe,v,ne);continue}if(xr&&(ra=Ef(ra)),!Zv(K,ya,ra)){Il(qe,v,ne);continue}ra=mO(K,ya,tt,ra),ra!==ah&&hO(v,qe,tt,ra)&&eS&&TR(t.removed)}}Zo(se.afterSanitizeAttributes,v,null)},Mf=function(v){let I=null,O=Xv(v);for(Zo(se.beforeSanitizeShadowDOM,v,null);I=O.nextNode();)if(Zo(se.uponSanitizeShadowNode,I,null),Qv(I,v),Jv(I),Ns(I.content)&&Mf(I.content),w(I)===Xa.element){let H=h(I);Ns(H)&&(th(H),Mf(H))}Zo(se.afterSanitizeShadowDOM,v,null)},th=function(v){let I=[{node:v,shadow:null}];for(;I.length>0;){let O=I.pop();if(O.shadow){Mf(O.shadow);continue}let H=O.node,ne=w(H)===Xa.element,qe=y(H);if(qe)for(let tt=qe.length-1;tt>=0;--tt)I.push({node:qe[tt],shadow:null});if(ne){let tt=C?C(H):null;if(typeof tt=="string"&&ct(tt)==="template"){let ga=H.content;Ns(ga)&&I.push({node:ga,shadow:null})}}if(ne){let tt=h(H);Ns(tt)&&I.push({node:null,shadow:tt},{node:tt,shadow:null})}}};return t.sanitize=function(M){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,O=null,H=null,K=null;if(Ym=!M,Ym&&(M="<!-->"),typeof M!="string"&&!xu(M)&&(M=sU(M),typeof M!="string"))throw bs("dirty is not a string, aborting");if(!t.isSupported)return M;Vm?(Oe=Lf,Qe=Cf):Jm(v),(se.uponSanitizeElement.length>0||se.uponSanitizeAttribute.length>0)&&(Oe=Ka(Oe)),se.uponSanitizeAttribute.length>0&&(Qe=Ka(Qe)),t.removed=[];let ne=Km&&typeof M!="string"&&xu(M);if(ne){cO(M);let ga=E(M);if(typeof ga=="string"){let ya=ct(ga);if(!Oe[ya]||gu[ya])throw kf(M),bs("root node is forbidden and cannot be sanitized in-place")}if(Of(M))throw kf(M),bs("root node is clobbered and cannot be sanitized in-place");try{th(M)}catch(ya){throw kf(M),ya}}else if(xu(M))I=$v("<!---->"),O=I.ownerDocument.importNode(M,!0),O.nodeType===Xa.element&&O.nodeName==="BODY"||O.nodeName==="HTML"?I=O:I.appendChild(O),th(I);else{if(!Rs&&!xr&&!wl&&M.indexOf("<")===-1)return A&&If?$(M):M;if(I=$v(M),!I)return Rs?null:If?z:""}I&&$m&&br(I.firstChild);let qe=ne?M:I;try{let ga=Xv(qe);for(;H=ga.nextNode();)Qv(H,qe),Jv(H),Ns(H.content)&&Mf(H.content)}catch(ga){throw ne&&(kf(M),vs(t.removed,ya=>{ya.element&&Rf(ya.element)})),ga}if(ne)return vs(t.removed,ga=>{ga.element&&Rf(ga.element)}),xr&&eh(M),M;if(Rs){if(xr&&eh(I),wf)for(K=vo.call(I.ownerDocument);I.firstChild;)K.appendChild(I.firstChild);else K=I;return(Qe.shadowroot||Qe.shadowrootmode)&&(K=Mn.call(o,K,!0)),K}let tt=wl?I.outerHTML:I.innerHTML;return wl&&Oe["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&ea(xU,I.ownerDocument.doctype.name)&&(tt="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
105
+ `+tt),xr&&(tt=Ef(tt)),A&&If?$(tt):tt},t.setConfig=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jm(M),Vm=!0,Lf=Oe,Cf=Qe},t.clearConfig=function(){Ms=null,Vm=!1,Lf=null,Cf=null,A=B,z=""},t.isValidAttribute=function(M,v,I){Ms||Jm({});let O=ct(M),H=ct(v);return Zv(O,H,I)},t.addHook=function(M,v){typeof v=="function"&&Ea(se,M)&&cf(se[M],v)},t.removeHook=function(M,v){if(Ea(se,M)){if(v!==void 0){let I=eU(se[M],v);return I===-1?void 0:tU(se[M],I,1)[0]}return TR(se[M])}},t.removeHooks=function(M){Ea(se,M)&&(se[M]=[])},t.removeAllHooks=function(){se=zR()},t}var GR=qR();function lv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cs=lv();function JR(e){Cs=e}var Ss={exec:()=>null};function fu(e){let t=[];return a=>{let o=Math.max(0,Math.min(3,a-1)),n=t[o];return n||(n=e(o),t[o]=n),n}}function de(e,t=""){let a=typeof e=="string"?e:e.source,o={replace:(n,r)=>{let l=typeof r=="string"?r:r.source;return l=l.replace(ta.caret,"$1"),a=a.replace(n,l),o},getRegex:()=>new RegExp(a,t)};return o}var TU=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),ta={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:fu(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:fu(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:fu(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:fu(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:fu(e=>new RegExp(`^ {0,${e}}(?:</?(?:${yf})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:fu(e=>new RegExp(`^ {0,${e}}>`))},AU=/^(?:[ \t]*(?:\n|$))+/,kU=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,RU=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,gf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,EU=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,sv=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,eE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tE=de(eE).replace(/bull/g,sv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),OU=de(eE).replace(/bull/g,sv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),iv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,DU=/^[^\n]+/,uv=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,MU=de(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",uv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),NU=de(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,sv).getRegex(),yf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",cv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,PU=de("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",cv).replace("tag",yf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),aE=e=>de(iv).replace("hr",gf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yf).getRegex(),_U=aE(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),BU=aE(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),zU=de(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",BU).getRegex(),fv={blockquote:zU,code:kU,def:MU,fences:RU,heading:EU,hr:gf,html:PU,lheading:tE,list:NU,newline:AU,paragraph:_U,table:Ss,text:DU},jR=de("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yf).getRegex(),UU={...fv,lheading:OU,table:jR,paragraph:de(iv).replace("hr",gf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jR).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yf).getRegex()},FU={...fv,html:de(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",cv).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ss,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:de(iv).replace("hr",gf).replace("heading",` *#{1,6} *[^
106
+ ]`).replace("lheading",tE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},HU=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qU=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oE=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,GU=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dr=/[\p{P}\p{S}]/u,du=/[\s\p{P}\p{S}]/u,xf=/[^\s\p{P}\p{S}]/u,jU=de(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,du).getRegex(),VU=/[\p{Pi}\p{Ps}"']/u,nE=/(?!~)[\p{P}\p{S}]/u,$U=/(?!~)[\s\p{P}\p{S}]/u,XU=/(?:[^\s\p{P}\p{S}]|~)/u,KU=de(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",TU?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rE=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,YU=de(rE,"u").replace(/punct/g,dr).getRegex(),QU=de(rE,"u").replace(/punct/g,nE).getRegex(),ZU=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,WU=de(ZU,"u").replace(/openQuote/g,VU).replace(/punct/g,dr).getRegex(),lE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",JU=de(lE,"gu").replace(/notPunctSpace/g,xf).replace(/punctSpace/g,du).replace(/punct/g,dr).getRegex(),e3=de(lE,"gu").replace(/notPunctSpace/g,XU).replace(/punctSpace/g,$U).replace(/punct/g,nE).getRegex(),t3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",a3=de(t3,"gu").replace(/notPunctSpace/g,xf).replace(/punctSpace/g,du).replace(/punct/g,dr).getRegex(),o3=de("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xf).replace(/punctSpace/g,du).replace(/punct/g,dr).getRegex(),n3="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",r3=de(n3,"gu").replace(/notPunctSpace/g,xf).replace(/punctSpace/g,du).replace(/punct/g,dr).getRegex(),l3=de(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,dr).getRegex(),s3="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",i3=de(s3,"gu").replace(/notPunctSpace/g,xf).replace(/punctSpace/g,du).replace(/punct/g,dr).getRegex(),u3=de(/\\(punct)/,"gu").replace(/punct/g,dr).getRegex(),c3=de(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),f3=de(cv).replace("(?:-->|$)","-->").getRegex(),d3=de("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",f3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sE=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Rm=de(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",sE).getRegex(),p3=de(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Rm).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),m3=de(/^!?\[(label)\]\[(ref)\]/).replace("label",Rm).replace("ref",uv).getRegex(),h3=de(/^!?\[(ref)\](?:\[\])?/).replace("ref",uv).getRegex(),VR=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,g3=de(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",sE).getRegex(),y3=de("reflink|nolink(?!\\()","g").replace("reflink",de(/^!?\[(label)\]\[(ref)\]/).replace("label",g3).replace("ref",VR).getRegex()).replace("nolink",de(/^!?\[(ref)\](?:\[\])?/).replace("ref",VR).getRegex()).getRegex(),$R=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,dv={_backpedal:Ss,anyPunctuation:u3,autolink:c3,blockSkip:KU,br:oE,code:qU,del:Ss,delLDelim:Ss,delRDelim:Ss,emStrongLDelim:YU,emStrongRDelimAst:JU,emStrongRDelimUnd:o3,escape:HU,link:p3,nolink:h3,punctuation:jU,reflink:m3,reflinkSearch:y3,tag:d3,text:GU,url:Ss},x3={...dv,emStrongLDelim:WU,emStrongRDelimAst:a3,emStrongRDelimUnd:r3,link:de(/^!?\[(label)\]\((.*?)\)/).replace("label",Rm).getRegex(),reflink:de(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Rm).getRegex()},ov={...dv,emStrongRDelimAst:e3,emStrongLDelim:QU,delLDelim:l3,delRDelim:i3,url:de(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",$R).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:de(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",$R).getRegex()},b3={...ov,br:de(oE).replace("{2,}","*").getRegex(),text:de(ov.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},km={normal:fv,gfm:UU,pedantic:FU},mf={normal:dv,gfm:ov,breaks:b3,pedantic:x3},v3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},XR=e=>v3[e];function Ya(e,t){if(t){if(ta.escapeTest.test(e))return e.replace(ta.escapeReplace,XR)}else if(ta.escapeTestNoEncode.test(e))return e.replace(ta.escapeReplaceNoEncode,XR);return e}function KR(e){try{e=encodeURI(e).replace(ta.percentDecode,"%")}catch{return null}return e}function YR(e,t){let a=e.replace(ta.findPipe,(r,l,s)=>{let i=!1,u=l;for(;--u>=0&&s[u]==="\\";)i=!i;return i?"|":" |"}),o=a.split(ta.splitPipe),n=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;n<o.length;n++)o[n]=o[n].trim().replace(ta.slashPipe,"|");return o}function bl(e,t,a){let o=e.length;if(o===0)return"";let n=0;for(;n<o;){let r=e.charAt(o-n-1);if(r===t&&!a)n++;else if(r!==t&&a)n++;else break}return e.slice(0,o-n)}function QR(e){let t=e.split(`
107
+ `),a=t.length-1;for(;a>=0&&ta.blankLine.test(t[a]);)a--;return t.length-a<=2?e:t.slice(0,a+1).join(`
108
+ `)}function Em(e){return e.toLowerCase().toUpperCase().toLowerCase()}function S3(e,t){if(e.indexOf(t[1])===-1)return-1;let a=0;for(let o=0;o<e.length;o++)if(e[o]==="\\")o++;else if(e[o]===t[0])a++;else if(e[o]===t[1]&&(a--,a<0))return o;return a>0?-2:-1}function L3(e,t=0){let a=t,o="";for(let n of e)if(n===" "){let r=4-a%4;o+=" ".repeat(r),a+=r}else o+=n,a++;return o}function ZR(e,t,a,o,n){let r=t.href,l=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1"),i=e[0].charAt(0)==="!";o.state.inLink=!0;let u=o.state.linkEmitted,d=o.state.inRawBlock;o.state.linkEmitted=!1;let c=o.inlineTokens(s),f=o.state.linkEmitted;if(o.state.linkEmitted=u,o.state.inLink=!1,!i){if(f){o.state.inRawBlock=d;return}o.state.linkEmitted=!0}return{type:i?"image":"link",raw:a,href:r,title:l,text:s,tokens:c}}function C3(e,t,a){let o=e.match(a.other.indentCodeCompensation);if(o===null)return t;let n=o[1];return t.split(`
109
+ `).map(r=>{let l=r.match(a.other.beginningSpace);if(l===null)return r;let[s]=l;return r.slice(Math.min(s.length,n.length))}).join(`
110
+ `)}function WR(e,t,a,o){if(!t.includes("<"))return!1;for(let n=0;n<t.length;n++){if(t[n]==="\\"){n++;continue}if(t[n]==="`"){let s=o.inline.code.exec(t.slice(n));if(s){n+=s[0].length-1;continue}}if(t[n]!=="<")continue;let r=e.slice(a+n),l=o.inline.tag.exec(r)||o.inline.autolink.exec(r);if(l){if(l[0].length>t.length-n)return!0;n+=l[0].length-1}}return!1}var Om=class{options;rules;lexer;constructor(e){this.options=e||Cs}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let a=this.options.pedantic?t[0]:QR(t[0]),o=a.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:a,codeBlockStyle:"indented",text:o}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let a=t[0],o=C3(a,t[3]||"",this.rules);return{type:"code",raw:a,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:o}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let a=t[2].trim();if(this.rules.other.endingHash.test(a)){let o=bl(a,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceTabChar.test(o))&&(a=o.trim())}return{type:"heading",raw:bl(t[0],`
111
+ `),depth:t[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bl(t[0],`
112
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let a=bl(t[0],`
113
+ `).split(`
114
+ `),o="",n="",r=[];for(;a.length>0;){let l=!1,s=[],i;for(i=0;i<a.length;i++)if(this.rules.other.blockquoteStart.test(a[i]))s.push(a[i]),l=!0;else if(!l)s.push(a[i]);else break;a=a.slice(i);let u=s.join(`
115
+ `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
116
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
117
+ ${u}`:u,n=n?`${n}
118
+ ${d}`:d;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,r,!0),this.lexer.state.top=c,a.length===0)break;let f=r.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,x=a.join(`
119
+ `),g=p.raw+`
120
+ `+x.replace(this.rules.other.blockquoteSetextReplace2,""),S=this.blockquote(g);r[r.length-1]=S,o=`${o}
121
+ ${x}`,n=n.substring(0,n.length-p.text.length)+S.text;break}else if(f?.type==="list"){let p=f,x=p.raw+`
122
+ `+a.join(`
123
+ `),g=this.list(x);r[r.length-1]=g,o=o.substring(0,o.length-f.raw.length)+g.raw,n=n.substring(0,n.length-p.raw.length)+g.raw,a=x.substring(r.at(-1).raw.length).split(`
124
+ `);continue}}return{type:"blockquote",raw:o,tokens:r,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let a=t[1].trim(),o=a.length>1,n={type:"list",raw:"",ordered:o,start:o?+a.slice(0,-1):"",loose:!1,items:[]};a=o?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=o?a:"[*+-]");let r=this.rules.other.listItemRegex(a),l=!1;for(;e;){let i=!1,u="",d="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let c=L3(t[2].split(`
125
+ `,1)[0],t[1].length),f=e.split(`
126
+ `,1)[0],p=!c.trim(),x=0;if(this.options.pedantic?(x=2,d=c.trimStart()):p?x=t[1].length+1:(x=c.search(this.rules.other.nonSpaceChar),x=x>4?1:x,d=c.slice(x),x+=t[1].length),p&&this.rules.other.blankLine.test(f)&&(u+=f+`
127
+ `,e=e.substring(f.length+1),i=!0),!i){let g=this.rules.other.nextBulletRegex(x),S=this.rules.other.hrRegex(x),y=this.rules.other.fencesBeginRegex(x),m=this.rules.other.headingBeginRegex(x),h=this.rules.other.htmlBeginRegex(x),b=this.rules.other.blockquoteBeginRegex(x);for(;e;){let L=e.split(`
128
+ `,1)[0],C;if(f=L,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),C=f):C=f.replace(this.rules.other.tabCharGlobal," "),y.test(f)||m.test(f)||h.test(f)||b.test(f)||g.test(f)||S.test(f))break;if(C.search(this.rules.other.nonSpaceChar)>=x||!f.trim())d+=`
129
+ `+C.slice(x);else{if(p||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(c)||m.test(c)||S.test(c))break;d+=`
130
+ `+f}p=!f.trim(),u+=L+`
131
+ `,e=e.substring(L.length+1),c=C.slice(x)}}n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(l=!0)),n.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),n.raw+=u}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let i of n.items)if(this.lexer.state.top=!1,i.tokens=this.lexer.blockTokens(i.text,[]),!n.loose){let u=i.tokens.filter(c=>c.type==="space"),d=u.length>0&&u.some(c=>this.rules.other.anyLine.test(c.raw));n.loose=d}for(let i of n.items){let u=i.tokens[0];if(i.task&&(u?.type==="text"||u?.type==="paragraph")){i.text=i.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(i.raw);if(d){let c={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};i.checked=c.checked,n.loose?i.tokens[0]&&["paragraph","text"].includes(i.tokens[0].type)&&"tokens"in i.tokens[0]&&i.tokens[0].tokens?(i.tokens[0].raw=c.raw+i.tokens[0].raw,i.tokens[0].text=c.raw+i.tokens[0].text,i.tokens[0].tokens.unshift(c)):i.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):i.tokens.unshift(c)}}else i.task&&(i.task=!1)}if(n.loose)for(let i of n.items){i.loose=!0;for(let u of i.tokens)u.type==="text"&&(u.type="paragraph")}return n}}html(e){let t=this.rules.block.html.exec(e);if(t){let a=QR(t[0]);return{type:"html",block:!0,raw:a,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:a}}}def(e){let t=this.rules.block.def.exec(e);if(t){let a=Em(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:a,raw:bl(t[0],`
132
+ `),href:o,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let a=YR(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
133
+ `):[],r={type:"table",raw:bl(t[0],`
134
+ `),header:[],align:[],rows:[]};if(a.length===o.length){for(let l of o)this.rules.other.tableAlignRight.test(l)?r.align.push("right"):this.rules.other.tableAlignCenter.test(l)?r.align.push("center"):this.rules.other.tableAlignLeft.test(l)?r.align.push("left"):r.align.push(null);for(let l=0;l<a.length;l++)r.header.push({text:a[l],tokens:this.lexer.inline(a[l]),header:!0,align:r.align[l]});for(let l of n)r.rows.push(YR(l,r.header.length).map((s,i)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:r.align[i]})));return r}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let a=t[1].trim();return{type:"heading",raw:bl(t[0],`
135
+ `),depth:t[2].charAt(0)==="="?1:2,text:a,tokens:this.lexer.inline(a)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let a=t[1].charAt(t[1].length-1)===`
136
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:a,tokens:this.lexer.inline(a)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let a=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&WR(e,t[1],a,this.rules))return;let o=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let l=bl(o.slice(0,-1),"\\");if((o.length-l.length)%2===0)return}else{let l=S3(t[2],"()");if(l===-2)return;if(l>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+l;t[2]=t[2].substring(0,l),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(n);l&&(n=l[1],r=l[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?n=n.slice(1):n=n.slice(1,-1)),ZR(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let a;if((a=this.rules.inline.reflink.exec(e))||(a=this.rules.inline.nolink.exec(e))){let o=a[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&WR(e,a[1],o,this.rules))return;let n=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[Em(n)];if(!r){let l=a[0].charAt(0);return{type:"text",raw:l,text:l}}return ZR(a,r,a[0],this.lexer,this.rules)}}emStrong(e,t,a=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||!o[1]&&!o[2]&&!o[3]&&!o[4]||o[4]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[3])||!a||this.rules.inline.punctuation.exec(a))){let n=[...o[0]].length-1,r,l,s=n,i=0,u=o[0][0],d=a===u,c=u==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(o=c.exec(t))!==null;){if(r=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!r)continue;if(l=[...r].length,o[3]||o[4]){s+=l;continue}else if(o[5]||o[6]){if(n%3&&!((n+l)%3)){i+=l;continue}if(d)break}if(s-=l,s>0)continue;l=Math.min(l,l+s+i);let f=[...o[0]][0].length,p=e.slice(0,n+o.index+f+l);if(Math.min(n,l)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let x=p.slice(2,-2);return{type:"strong",raw:p,text:x,tokens:this.lexer.inlineTokens(x)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let a=t[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(a),n=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return o&&n&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:t[0],text:a}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,a=""){let o=this.rules.inline.delLDelim.exec(e);if(o&&(!o[1]||!a||this.rules.inline.punctuation.exec(a))){let n=[...o[0]].length-1,r,l,s=n,i=this.rules.inline.delRDelim;for(i.lastIndex=0,t=t.slice(-1*e.length+n);(o=i.exec(t))!==null;){if(r=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!r||(l=[...r].length,l!==n))continue;if(o[3]||o[4]){s+=l;continue}if(s-=l,s>0)continue;l=Math.min(l,l+s);let u=[...o[0]][0].length,d=e.slice(0,n+o.index+u+l),c=d.slice(n,-n);return{type:"del",raw:d,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let a,o;return t[2]==="@"?(a=t[1],o="mailto:"+a):(a=t[1],o=a),{type:"link",raw:t[0],text:a,href:o,autolink:!0,tokens:[{type:"text",raw:a,text:a}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let a,o;if(t[2]==="@")a=t[0],o="mailto:"+a;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);a=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:a,href:o,autolink:!0,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let a=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:a}}}},jo=class nv{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Cs,this.options.tokenizer=this.options.tokenizer||new Om,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let a={other:ta,block:km.normal,inline:mf.normal};this.options.pedantic?(a.block=km.pedantic,a.inline=mf.pedantic):this.options.gfm&&(a.block=km.gfm,this.options.breaks?a.inline=mf.breaks:a.inline=mf.gfm),this.tokenizer.rules=a}static get rules(){return{block:km,inline:mf}}static lex(t,a){return new nv(a).lex(t)}static lexInline(t,a){return new nv(a).inlineTokens(t)}lex(t){t=t.replace(ta.carriageReturn,`
137
+ `),this.blockTokens(t,this.tokens);for(let a=0;a<this.inlineQueue.length;a++){let o=this.inlineQueue[a];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,a=[],o=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(ta.tabCharGlobal," ").replace(ta.spaceLine,""));let n=1/0;for(;t;){if(t.length<n)n=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let r;if(this.options.extensions?.block?.some(s=>(r=s.call({lexer:this},t,a))?(t=t.substring(r.raw.length),a.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let s=a.at(-1);r.raw.length===1&&s!==void 0?s.raw+=`
138
+ `:a.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let s=a.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
139
+ `)?"":`
140
+ `)+r.raw,s.text+=`
141
+ `+r.text,this.inlineQueue.at(-1).src=s.text):a.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),a.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),a.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),a.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),a.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),a.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),a.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let s=a.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
142
+ `)?"":`
143
+ `)+r.raw,s.text+=`
144
+ `+r.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},a.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),a.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),a.push(r);continue}let l=t;if(this.options.extensions?.startBlock){let s=1/0,i=t.slice(1),u;this.options.extensions.startBlock.forEach(d=>{u=d.call({lexer:this},i),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(l=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(l))){let s=a.at(-1);o&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
145
+ `)?"":`
146
+ `)+r.raw,s.text+=`
147
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):a.push(r),o=l.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let s=a.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
148
+ `)?"":`
149
+ `)+r.raw,s.text+=`
150
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):a.push(r);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,a}inline(t,a=[]){return this.inlineQueue.push({src:t,tokens:a}),a}linkInText(t){if(!t.includes("["))return!1;let a=this.tokenizer.rules.inline.link;for(let o of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(a.test(o[0])&&t.charAt(o.index-1)!=="!")return!0;for(let o of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let n=o[0],r=n.lastIndexOf("[");if(!(n.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Em(n.slice(r+1,-1))))&&!(r>1&&this.linkInText(n.slice(1,r-1))))return!0}return!1}inlineTokens(t,a=[]){this.tokenizer.lexer=this;let o=t;if(this.tokens.links&&t.includes("[")){let s=this.tokenizer.rules.inline.reflinkSearch,i=u=>{let d=u.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Em(u.slice(d+1,-1))))return u;if(d>1&&u.charAt(0)!=="!"){let c=u.slice(1,d-1);if(this.linkInText(c))return"["+c.replace(s,i)+"]["+"a".repeat(u.length-d-2)+"]"}return"["+"a".repeat(u.length-2)+"]"};o=o.replace(s,i)}o=o.replace(this.tokenizer.rules.inline.anyPunctuation,s=>"+".repeat(s.length)),o=o.replace(this.tokenizer.rules.inline.blockSkip,(s,i,u)=>{let d=u?u.length:0;return s.slice(0,d)+"["+"a".repeat(s.length-d-2)+"]"}),o=this.options.hooks?.emStrongMask?.call({lexer:this},o)??o;let n=!1,r="",l=1/0;for(;t;){if(t.length<l)l=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}n||(r=""),n=!1;let s;if(this.options.extensions?.inline?.some(u=>(s=u.call({lexer:this},t,a))?(t=t.substring(s.raw.length),a.push(s),!0):!1))continue;if(s=this.tokenizer.escape(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.tag(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.link(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(s.raw.length);let u=a.at(-1);s.type==="text"&&u?.type==="text"?(u.raw+=s.raw,u.text+=s.text):a.push(s);continue}if(s=this.tokenizer.emStrong(t,o,r)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.codespan(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.br(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.del(t,o,r)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.autolink(t)){t=t.substring(s.raw.length),a.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(t))){t=t.substring(s.raw.length),a.push(s);continue}let i=t;if(this.options.extensions?.startInline){let u=1/0,d=t.slice(1),c;this.options.extensions.startInline.forEach(f=>{c=f.call({lexer:this},d),typeof c=="number"&&c>=0&&(u=Math.min(u,c))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(s=this.tokenizer.inlineText(i)){t=t.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(r=s.raw.slice(-1)),n=!0;let u=a.at(-1);u?.type==="text"?(u.raw+=s.raw,u.text+=s.text):a.push(s);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return a}infiniteLoopError(t){let a="Infinite loop on byte: "+t;if(this.options.silent)console.error(a);else throw new Error(a)}},Dm=class{options;parser;constructor(e){this.options=e||Cs}space(e){return""}code({text:e,lang:t,escaped:a}){let o=(t||"").match(ta.notSpaceStart)?.[0],n=e?e.replace(ta.endingNewline,"")+`
151
+ `:"";return o?'<pre><code class="language-'+Ya(o)+'">'+(a?n:Ya(n,!0))+`</code></pre>
152
+ `:"<pre><code>"+(a?n:Ya(n,!0))+`</code></pre>
153
+ `}blockquote({tokens:e}){return`<blockquote>
154
+ ${this.parser.parse(e)}</blockquote>
155
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
156
+ `}hr(e){return`<hr>
157
+ `}list(e){let t=e.ordered,a=e.start,o="";for(let l=0;l<e.items.length;l++){let s=e.items[l];o+=this.listitem(s)}let n=t?"ol":"ul",r=t&&a!==1?' start="'+a+'"':"";return"<"+n+r+`>
158
+ `+o+"</"+n+`>
159
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
160
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
161
+ `}table(e){let t="",a="";for(let n=0;n<e.header.length;n++)a+=this.tablecell(e.header[n]);t+=this.tablerow({text:a});let o="";for(let n=0;n<e.rows.length;n++){let r=e.rows[n];a="";for(let l=0;l<r.length;l++)a+=this.tablecell(r[l]);o+=this.tablerow({text:a})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
162
+ <thead>
163
+ `+t+`</thead>
164
+ `+o+`</table>
165
+ `}tablerow({text:e}){return`<tr>
166
+ ${e}</tr>
167
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),a=e.header?"th":"td";return(e.align?`<${a} align="${e.align}">`:`<${a}>`)+t+`</${a}>
168
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ya(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:a,tokens:o,autolink:n}){let r=n?Ya(a,!0):this.parser.parseInline(o),l=KR(e);if(l===null)return r;e=Ya(l,n);let s='<a href="'+e+'"';return t&&(s+=' title="'+Ya(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:a,tokens:o}){o&&(a=this.parser.parseInline(o,this.parser.textRenderer));let n=KR(e);if(n===null)return Ya(a);e=n;let r=`<img src="${Ya(e)}" alt="${Ya(a)}"`;return t&&(r+=` title="${Ya(t)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ya(e.text)}},pv=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Vo=class rv{options;renderer;textRenderer;constructor(t){this.options=t||Cs,this.options.renderer=this.options.renderer||new Dm,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pv}static parse(t,a){return new rv(a).parse(t)}static parseInline(t,a){return new rv(a).parseInline(t)}parse(t){this.renderer.parser=this;let a="";for(let o=0;o<t.length;o++){let n=t[o];if(this.options.extensions?.renderers?.[n.type]){let l=n,s=this.options.extensions.renderers[l.type].call({parser:this},l);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(l.type)){a+=s||"";continue}}let r=n;switch(r.type){case"space":{a+=this.renderer.space(r);break}case"hr":{a+=this.renderer.hr(r);break}case"heading":{a+=this.renderer.heading(r);break}case"code":{a+=this.renderer.code(r);break}case"table":{a+=this.renderer.table(r);break}case"blockquote":{a+=this.renderer.blockquote(r);break}case"list":{a+=this.renderer.list(r);break}case"checkbox":{a+=this.renderer.checkbox(r);break}case"html":{a+=this.renderer.html(r);break}case"def":{a+=this.renderer.def(r);break}case"paragraph":{a+=this.renderer.paragraph(r);break}case"text":{a+=this.renderer.text(r);break}default:{let l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return a}parseInline(t,a=this.renderer){this.renderer.parser=this;let o="";for(let n=0;n<t.length;n++){let r=t[n];if(this.options.extensions?.renderers?.[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(r.type)){o+=s||"";continue}}let l=r;switch(l.type){case"escape":{o+=a.text(l);break}case"html":{o+=a.html(l);break}case"link":{o+=a.link(l);break}case"image":{o+=a.image(l);break}case"checkbox":{o+=a.checkbox(l);break}case"strong":{o+=a.strong(l);break}case"em":{o+=a.em(l);break}case"codespan":{o+=a.codespan(l);break}case"br":{o+=a.br(l);break}case"del":{o+=a.del(l);break}case"text":{o+=a.text(l);break}default:{let s='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return o}},hf=class{options;block;constructor(e){this.options=e||Cs}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?jo.lex:jo.lexInline}provideParser(e=this.block){return e?Vo.parse:Vo.parseInline}},mv=class{defaults=lv();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Vo;Renderer=Dm;TextRenderer=pv;Lexer=jo;Tokenizer=Om;Hooks=hf;constructor(...e){this.use(...e)}walkTokens(e,t){let a=[];for(let o of e)switch(a=a.concat(t.call(this,o)),o.type){case"table":{let n=o;for(let r of n.header)a=a.concat(this.walkTokens(r.tokens,t));for(let r of n.rows)for(let l of r)a=a.concat(this.walkTokens(l.tokens,t));break}case"list":{let n=o;a=a.concat(this.walkTokens(n.items,t));break}default:{let n=o;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(r=>{let l=n[r].flat(1/0);a=a.concat(this.walkTokens(l,t))}):n.tokens&&(a=a.concat(this.walkTokens(n.tokens,t)))}}return a}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{let o={...a};if(o.async=this.defaults.async||o.async||!1,a.extensions&&(a.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=t.renderers[n.name];r?t.renderers[n.name]=function(...l){let s=n.renderer.apply(this,l);return s===!1&&(s=r.apply(this,l)),s}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=t[n.level];r?r.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),o.extensions=t),a.renderer){let n=this.defaults.renderer||new Dm(this.defaults);for(let r in a.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let l=r,s=a.renderer[l],i=n[l];n[l]=(...u)=>{let d=s.apply(n,u);return d===!1&&(d=i.apply(n,u)),d||""}}o.renderer=n}if(a.tokenizer){let n=this.defaults.tokenizer||new Om(this.defaults);for(let r in a.tokenizer){if(!(r in n))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let l=r,s=a.tokenizer[l],i=n[l];n[l]=(...u)=>{let d=s.apply(n,u);return d===!1&&(d=i.apply(n,u)),d}}o.tokenizer=n}if(a.hooks){let n=this.defaults.hooks||new hf;for(let r in a.hooks){if(!(r in n))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let l=r,s=a.hooks[l],i=n[l];hf.passThroughHooks.has(r)?n[l]=u=>{if(this.defaults.async&&hf.passThroughHooksRespectAsync.has(r))return(async()=>{let c=await s.call(n,u);return i.call(n,c)})();let d=s.call(n,u);return i.call(n,d)}:n[l]=(...u)=>{if(this.defaults.async)return(async()=>{let c=await s.apply(n,u);return c===!1&&(c=await i.apply(n,u)),c})();let d=s.apply(n,u);return d===!1&&(d=i.apply(n,u)),d}}o.hooks=n}if(a.walkTokens){let n=this.defaults.walkTokens,r=a.walkTokens;o.walkTokens=function(l){let s=[];return s.push(r.call(this,l)),n&&(s=s.concat(n.call(this,l))),s}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return jo.lex(e,t??this.defaults)}parser(e,t){return Vo.parse(e,t??this.defaults)}parseMarkdown(e){return(t,a)=>{let o={...a},n={...this.defaults,...o},r=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&o.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let l=n.hooks?await n.hooks.preprocess(t):t,s=await(n.hooks?await n.hooks.provideLexer(e):e?jo.lex:jo.lexInline)(l,n),i=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(i,n.walkTokens));let u=await(n.hooks?await n.hooks.provideParser(e):e?Vo.parse:Vo.parseInline)(i,n);return n.hooks?await n.hooks.postprocess(u):u})().catch(r);try{n.hooks&&(t=n.hooks.preprocess(t));let l=(n.hooks?n.hooks.provideLexer(e):e?jo.lex:jo.lexInline)(t,n);n.hooks&&(l=n.hooks.processAllTokens(l)),n.walkTokens&&this.walkTokens(l,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(e):e?Vo.parse:Vo.parseInline)(l,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(l){return r(l)}}}onError(e,t){return a=>{if(a.message+=`
169
+ Please report this to https://github.com/markedjs/marked.`,e){let o="<p>An error occurred:</p><pre>"+Ya(a.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(a);throw a}}},Ls=new mv;function He(e,t){return Ls.parse(e,t)}He.options=He.setOptions=function(e){return Ls.setOptions(e),He.defaults=Ls.defaults,JR(He.defaults),He};He.getDefaults=lv;He.defaults=Cs;function w3(...e){return Ls.use(...e),He.defaults=Ls.defaults,JR(He.defaults),He}He.use=w3;He.walkTokens=function(e,t){return Ls.walkTokens(e,t)};He.parseInline=Ls.parseInline;He.Parser=Vo;He.parser=Vo.parse;He.Renderer=Dm;He.TextRenderer=pv;He.Lexer=jo;He.lexer=jo.lex;He.Tokenizer=Om;He.Hooks=hf;He.parse=He;var lX=He.options,sX=He.setOptions,iX=He.walkTokens,uX=He.parseInline;var cX=Vo.parse,fX=jo.lex;var Mm=null,iE=new mv({gfm:!0,breaks:!0});iE.use({renderer:{image({href:e,title:t,text:a}){let o=Mm,n=o?o.resolve(e):null,r=n&&o?o.attachmentUrl(n):null;if(n){if(!r)return`<p class="text-sm text-muted-foreground">Missing file: ${aa(a||n)}</p>`;let l=a||o?.nameFor(n)||"";return`<img src="${aa(r)}" alt="${aa(l)}" loading="lazy"${t?` title="${aa(t)}"`:""}>`}return/^https?:/i.test(e)?`<a href="${aa(e)}" target="_blank" rel="noopener noreferrer">${aa(a||e)}</a>`:!1},link({href:e,title:t,text:a}){let o=Mm,n=o?o.resolve(e):null;if(n&&o){let l=o.attachmentUrl(n);if(!l)return`<span class="text-muted-foreground">${aa(a)}</span>`;let s=o.nameFor(n)??a;return`<a href="${aa(l)}" download="${aa(s)}">${aa(a||s)}</a>`}if(!/^https?:|^#/i.test(e))return aa(a);let r=/^https?:/i.test(e);return`<a href="${aa(e)}"${r?' target="_blank" rel="noopener noreferrer"':""}${t?` title="${aa(t)}"`:""}>${aa(a)}</a>`}}});function aa(e){return String(e??"").replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`)}function I3(e){return e.replace(/(^|[\s(>])#(\p{L}[\p{L}\p{N}_-]*)/gu,(t,a,o)=>`${a}<a class="tag" href="#/?q=${encodeURIComponent(`tag:${o.toLowerCase()}`)}" data-tag="${aa(o.toLowerCase())}">#${aa(o)}</a>`)}var T3=["p","br","hr","strong","em","del","s","code","pre","blockquote","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","table","thead","tbody","tr","th","td","input","span","sup","sub"];function pu(e,t){if(!e.trim())return"";Mm=t;let a;try{a=iE.parse(e.trim(),{async:!1})}finally{Mm=null}return GR.sanitize(I3(a),{ALLOWED_TAGS:T3,ALLOWED_ATTR:["href","src","alt","title","class","loading","download","target","rel","type","checked","disabled","data-tag","colspan","rowspan"],FORBID_TAGS:["style","script","iframe","form","object","embed"],FORBID_ATTR:["style","srcset","formaction","onerror","onload"],ALLOW_DATA_ATTR:!1})}function uE(e){return e.replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/[*_`>]/g,"").replace(/\s+/g," ").trim()}function mu(e,t){return new Set(LT(t,e).map(a=>a.path))}function hu(e,t){let a=new Map(e.attachments.map(o=>[o.path,o]));return{resolve:o=>wx(e.path,o),attachmentUrl:o=>t(o),nameFor:o=>a.get(o)?.name??o.split("/").pop()??null}}var ma=k(X(),1);var bf=(e,t,a,o,n)=>({id:e,label:t,description:a,tags:o,body:n.trim()}),hv=[bf("debugging","Debugging session","What broke, what you tried, and what it turned out to be.",["debugging"],`
170
+ # {{title}}
171
+
172
+ ## Symptom
173
+
174
+ <!-- What you saw. Paste the error, the failing request, the wrong number. -->
175
+
176
+ ## What I tried
177
+
178
+ <!-- One line each, including the things that didn't work: they're why the next
179
+ person stops trying them. -->
180
+
181
+ -
182
+
183
+ ## Cause
184
+
185
+ <!-- What it actually was. -->
186
+
187
+ ## Fix
188
+
189
+ <!-- The change, and a reference to it: a commit SHA, #412, or owner/repo#412. -->
190
+ `),bf("incident","Incident","What happened, how long it lasted, what fixed it, and what to change.",["incident"],`
191
+ # {{title}}
192
+
193
+ ## Impact
194
+
195
+ <!-- Who or what was affected, and for how long. Times in UTC or with an offset. -->
196
+
197
+ - Detected:
198
+ - Mitigated:
199
+ - Resolved:
200
+
201
+ ## What happened
202
+
203
+ ## Why it happened
204
+
205
+ ## What we did
206
+
207
+ ## Follow-up
208
+
209
+ <!-- Each item worth doing, with an owner. Link the issues you filed: #412 -->
210
+
211
+ -
212
+ `),bf("deployment","Deployment","What went out, where, and how it went.",["deployment"],`
213
+ # {{title}}
214
+
215
+ - Environment:
216
+ - Version or tag:
217
+ - Commit:
218
+
219
+ ## What changed
220
+
221
+ <!-- The user-visible part, not the diff: Git already has the diff. -->
222
+
223
+ ## How it went
224
+
225
+ <!-- Smooth, rolled back, needed a fix forward — and anything to watch. -->
226
+ `),bf("experiment","Experiment","The question, what you did, and what it showed.",["experiment"],`
227
+ # {{title}}
228
+
229
+ ## Question
230
+
231
+ <!-- What you wanted to find out, and what you expected. -->
232
+
233
+ ## Setup
234
+
235
+ <!-- Enough that you could run it again: versions, data, machine, commands. -->
236
+
237
+ ## Result
238
+
239
+ <!-- Numbers, output, or a screenshot in ../files/. -->
240
+
241
+ ## What it means
242
+
243
+ <!-- Including "nothing yet" — a result you can't explain is worth recording. -->
244
+ `),bf("decision","Architecture decision","The decision, the alternatives, and why. An ADR in the log.",["decision","adr"],`
245
+ # {{title}}
246
+
247
+ - Status: proposed
248
+ - Deciders:
249
+
250
+ ## Context
251
+
252
+ <!-- The forces at play: the constraint, the deadline, the thing that broke. -->
253
+
254
+ ## Decision
255
+
256
+ <!-- What we are doing, in one or two sentences, in the present tense. -->
257
+
258
+ ## Alternatives
259
+
260
+ <!-- What else was on the table, and why it lost. The value of an ADR is here. -->
261
+
262
+ -
263
+
264
+ ## Consequences
265
+
266
+ <!-- What this makes easy, and what it makes hard or expensive to change later. -->
267
+ `)];function cE(e,t){let a=t.trim()||e.label;return`${e.body.replace(/\{\{title\}\}/g,a)}
268
+ `}var vf=k(X(),1);var st=k(j(),1);function fE({value:e,onChange:t,onFiles:a,attachments:o,path:n="events/new.md",attachmentUrl:r,placeholder:l,rows:s=4,label:i,describedBy:u,handle:d,autoFocus:c,onSubmit:f}){let p=(0,vf.useRef)(null),x=(0,vf.useRef)(null);(0,vf.useImperativeHandle)(d,()=>({insert:m=>g("","",m),focus:()=>p.current?.focus()}));function g(m,h,b){let L=p.current;if(!L)return;let C=L.selectionStart,T=L.selectionEnd,w=e.slice(C,T),E=b??w,A=`${e.slice(0,C)}${m}${E}${h}${e.slice(T)}`;t(A);let z=C+m.length+E.length+h.length;requestAnimationFrame(()=>{L.focus(),!w&&!b?L.setSelectionRange(C+m.length,C+m.length):L.setSelectionRange(z,z)})}function S(m){let h=p.current;if(!h)return;let b=e.lastIndexOf(`
269
+ `,h.selectionStart-1)+1,L=e.indexOf(`
270
+ `,h.selectionEnd),C=L===-1?e.length:L,T=e.slice(b,C),w=T.split(`
271
+ `).every(A=>A.startsWith(m)),E=T.split(`
272
+ `).map(A=>w?A.slice(m.length):`${m}${A}`).join(`
273
+ `);t(`${e.slice(0,b)}${E}${e.slice(C)}`),requestAnimationFrame(()=>{h.focus(),h.setSelectionRange(b,b+E.length)})}return(0,st.jsxs)(LR,{defaultValue:"write",className:"flex flex-col gap-2",children:[(0,st.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[[{icon:Ic,label:"Bold",keys:"Ctrl+B",run:()=>g("**","**")},{icon:Dc,label:"Italic",keys:"Ctrl+I",run:()=>g("_","_")},{icon:Mc,label:"Link",keys:"Ctrl+K",run:()=>g("[","](https://)")},{icon:Pc,label:"Bulleted list",run:()=>S("- ")},{icon:Nc,label:"Checklist",run:()=>S("- [ ] ")},{icon:Bc,label:"Quote",run:()=>S("> ")}].map(m=>(0,st.jsx)($b,{label:m.keys?`${m.label} (${m.keys})`:m.label,children:(0,st.jsxs)(te,{variant:"ghost",size:"iconSm",onClick:m.run,tabIndex:-1,children:[(0,st.jsx)(m.icon,{"aria-hidden":"true"}),(0,st.jsx)("span",{className:"sr-only",children:m.label})]})},m.label)),(0,st.jsx)($b,{label:"Add a photo or file",children:(0,st.jsxs)(te,{variant:"ghost",size:"iconSm",onClick:()=>x.current?.click(),tabIndex:-1,children:[(0,st.jsx)(Oc,{"aria-hidden":"true"}),(0,st.jsx)("span",{className:"sr-only",children:"Add a photo or file"})]})}),(0,st.jsxs)(CR,{className:"ml-auto",children:[(0,st.jsx)(Xb,{value:"write",children:"Write"}),(0,st.jsx)(Xb,{value:"preview",children:"Preview"})]})]}),(0,st.jsx)("input",{ref:x,type:"file",multiple:!0,className:"sr-only","aria-label":"Add photos or files",onChange:m=>{a([...m.target.files??[]]),m.target.value=""}}),(0,st.jsx)(Kb,{value:"write",children:(0,st.jsx)("textarea",{ref:p,rows:s,value:e,autoFocus:c,"aria-label":i,"aria-describedby":u,placeholder:l,onChange:m=>t(m.target.value),onPaste:m=>{let h=[...m.clipboardData?.files??[]];h.length&&(m.preventDefault(),a(h))},onDragOver:m=>m.preventDefault(),onDrop:m=>{let h=[...m.dataTransfer?.files??[]];h.length&&(m.preventDefault(),a(h))},onKeyDown:m=>{if(!(m.metaKey||m.ctrlKey))return;let b=m.key.toLowerCase();b==="b"?(m.preventDefault(),g("**","**")):b==="i"?(m.preventDefault(),g("_","_")):b==="k"?(m.preventDefault(),g("[","](https://)")):m.key==="Enter"&&f&&(m.preventDefault(),f())},className:W("w-full resize-y rounded-md border border-input bg-card px-3 py-2 text-sm shadow-sm","placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring","max-sm:text-base")})}),(0,st.jsx)(Kb,{value:"preview",children:(0,st.jsx)("div",{className:"min-h-24 rounded-md border border-border bg-card px-3 py-2",children:e.trim()?(0,st.jsx)("div",{className:"prose-roll",dangerouslySetInnerHTML:{__html:pu(e,hu({path:n,attachments:o},m=>r({path:m,name:m,type:"",image:!1})))}}):(0,st.jsx)("p",{className:"text-sm text-muted-foreground",children:"Nothing to preview yet."})})})]})}var dE=k(j(),1),A3=Xp("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",{variants:{variant:{default:"border-border bg-muted text-muted-foreground",outline:"border-border text-foreground",solid:"border-transparent bg-primary text-primary-foreground",amount:"border-transparent bg-add-bg text-add tabular-nums"},interactive:{true:"hover:bg-accent hover:text-accent-foreground cursor-pointer",false:""}},defaultVariants:{variant:"default",interactive:!1}});function ws({className:e,variant:t,interactive:a,...o}){return(0,dE.jsx)("span",{className:W(A3({variant:t,interactive:a,className:e})),...o})}var it=k(X(),1);var Nt=k(j(),1),k3=Object.defineProperty,pr=(e,t)=>k3(e,"name",{value:t,configurable:!0}),gv="Popover",[pE,KX]=Vt(gv,[su]),Nm=su(),[R3,Is]=pE(gv),E3=pr(e=>{let{__scopePopover:t,children:a,open:o,defaultOpen:n,onOpenChange:r,modal:l=!1}=e,s=Nm(t),i=it.useRef(null),[u,d]=it.useState(!1),[c,f]=No({prop:o,defaultProp:n??!1,onChange:r,caller:gv});return(0,Nt.jsx)(Im,{...s,children:(0,Nt.jsx)(R3,{scope:t,contentId:Va(),triggerRef:i,open:c,onOpenChange:f,onOpenToggle:it.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:it.useCallback(()=>d(!0),[]),onCustomAnchorRemove:it.useCallback(()=>d(!1),[]),modal:l,children:a})})},"Popover"),O3="PopoverAnchor",D3=it.forwardRef(pr(function(t,a){let{__scopePopover:o,...n}=t,r=Is(O3,o),l=Nm(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=r;return it.useEffect(()=>(s(),()=>i()),[s,i]),(0,Nt.jsx)(lf,{...l,...n,ref:a})},"PopoverAnchor")),M3="PopoverTrigger",N3=it.forwardRef(pr(function(t,a){let{__scopePopover:o,...n}=t,r=Is(M3,o),l=Nm(o),s=_e(a,r.triggerRef),i=(0,Nt.jsx)(Be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":yv(r.open),...n,ref:s,onClick:ve(t.onClick,r.onOpenToggle)});return r.hasCustomAnchor?i:(0,Nt.jsx)(lf,{asChild:!0,...l,children:i})},"PopoverTrigger")),mE="PopoverPortal",[P3,_3]=pE(mE,{forceMount:void 0}),B3=pr(e=>{let{__scopePopover:t,forceMount:a,children:o,container:n}=e,r=Is(mE,t);return(0,Nt.jsx)(P3,{scope:t,forceMount:a,children:(0,Nt.jsx)(ho,{present:a||r.open,children:(0,Nt.jsx)(Yi,{asChild:!0,container:n,children:o})})})},"PopoverPortal"),Sf="PopoverContent",z3=it.forwardRef(pr(function(t,a){let o=_3(Sf,t.__scopePopover),{forceMount:n=o.forceMount,...r}=t,l=Is(Sf,t.__scopePopover);return(0,Nt.jsx)(ho,{present:n||l.open,children:l.modal?(0,Nt.jsx)(F3,{...r,ref:a}):(0,Nt.jsx)(H3,{...r,ref:a})})},"PopoverContent")),U3=Aa("PopoverContent.RemoveScroll"),F3=it.forwardRef(pr(function(t,a){let o=Is(Sf,t.__scopePopover),n=it.useRef(null),r=_e(a,n),l=it.useRef(!1);return it.useEffect(()=>{let s=n.current;if(s)return sm(s)},[]),(0,Nt.jsx)(Zc,{as:U3,allowPinchZoom:!0,children:(0,Nt.jsx)(hE,{...t,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(t.onCloseAutoFocus,s=>{s.preventDefault(),l.current||o.triggerRef.current?.focus()}),onPointerDownOutside:ve(t.onPointerDownOutside,s=>{let i=s.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,d=i.button===2||u;l.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:ve(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),H3=it.forwardRef(pr(function(t,a){let o=Is(Sf,t.__scopePopover),n=it.useRef(!1),r=it.useRef(!1);return(0,Nt.jsx)(hE,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{t.onCloseAutoFocus?.(l),l.defaultPrevented||(n.current||o.triggerRef.current?.focus(),l.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:l=>{t.onInteractOutside?.(l),l.defaultPrevented||(n.current=!0,l.detail.originalEvent.type==="pointerdown"&&(r.current=!0));let s=l.target;o.triggerRef.current?.contains(s)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&r.current&&l.preventDefault()}})},"PopoverContentNonModal")),hE=it.forwardRef(pr(function(t,a){let{__scopePopover:o,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:l,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:c,...f}=t,p=Is(Sf,o),x=Nm(o);return Wi(),(0,Nt.jsx)(Qp,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:l,children:(0,Nt.jsx)(Ki,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,Nt.jsx)(Tm,{"data-state":yv(p.open),role:"dialog",id:p.contentId,...x,...f,ref:a,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function yv(e){return e?"open":"closed"}pr(yv,"getState");var gE=E3,yE=D3,xE=N3,bE=B3,vE=z3;var xv=k(j(),1),mr=gE,Ts=xE,SE=yE;function hr({className:e,align:t="start",sideOffset:a=6,...o}){return(0,xv.jsx)(bE,{children:(0,xv.jsx)(vE,{align:t,sideOffset:a,className:W("z-50 w-72 rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...o})})}var Qa=k(X(),1);var Oa=k(j(),1),LE=(0,Qa.createContext)(null);function Pm(){let e=(0,Qa.useContext)(LE);if(!e)throw new Error("useAsk must be used inside <AskProvider>");return e}function CE({children:e}){let[t,a]=(0,Qa.useState)(null),[o,n]=(0,Qa.useState)(""),r=(0,Qa.useRef)(!1),l=(0,Qa.useCallback)(d=>{!t||r.current||(r.current=!0,t.kind==="confirm"?t.resolve(d===!0):t.resolve(typeof d=="string"?d:null),a(null))},[t]),s=(0,Qa.useMemo)(()=>({confirm:d=>new Promise(c=>{r.current=!1,n(""),a({kind:"confirm",options:d,resolve:c})}),prompt:d=>new Promise(c=>{r.current=!1,n(d.initialValue??""),a({kind:"prompt",options:d,resolve:c})})}),[]),i=t?.kind==="prompt",u=o.trim();return(0,Oa.jsxs)(LE.Provider,{value:s,children:[e,(0,Oa.jsx)(Po,{open:t!==null,onOpenChange:d=>{d||l(i?null:!1)},children:t&&(0,Oa.jsx)(_o,{className:"sm:max-w-md",children:(0,Oa.jsxs)("form",{onSubmit:d=>{d.preventDefault(),!(i&&!u)&&l(i?u:!0)},className:"flex flex-col gap-4",children:[(0,Oa.jsxs)(Bo,{children:[(0,Oa.jsx)(zo,{children:t.options.title}),t.options.description&&(0,Oa.jsx)(dl,{children:t.options.description})]}),t.kind==="prompt"&&(0,Oa.jsx)(sr,{label:t.options.label,htmlFor:"ask-input",children:(0,Oa.jsx)(lr,{id:"ask-input",autoFocus:!0,value:o,placeholder:t.options.placeholder,onChange:d=>n(d.target.value)})}),(0,Oa.jsxs)(DA,{children:[(0,Oa.jsx)(te,{variant:"secondary",onClick:()=>l(i?null:!1),children:!i&&t.options.cancelLabel||"Cancel"}),(0,Oa.jsx)(te,{type:"submit",variant:!i&&t.options.destructive?"destructive":"default",disabled:i&&!u,children:t.options.confirmLabel??(i?"Save":"OK")})]})]})})})]})}var xo=k(X(),1);var En=k(j(),1),wE=(0,xo.createContext)(null);function _m(){let e=(0,xo.useContext)(wE);if(!e)throw new Error("useToast must be used inside <ToastProvider>");return e}function IE({children:e}){let[t,a]=(0,xo.useState)([]),o=(0,xo.useRef)(1),n=(0,xo.useCallback)(l=>a(s=>s.filter(i=>i.id!==l)),[]),r=(0,xo.useMemo)(()=>{let l=(s,i={})=>{let u=o.current++,d=i.duration??(i.tone==="error"?9e3:4e3);a(c=>[...c,{...i,id:u,text:s}]),d>0&&!i.action?setTimeout(()=>n(u),d):d>0&&setTimeout(()=>n(u),Math.max(d,12e3))};return{toast:l,error:(s,i)=>l(s,{...i,tone:"error"})}},[n]);return(0,En.jsxs)(wE.Provider,{value:r,children:[e,(0,En.jsx)("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-[100] flex flex-col items-center gap-2 p-4 sm:items-end",children:t.map(l=>(0,En.jsxs)("div",{role:l.tone==="error"?"alert":"status","aria-live":l.tone==="error"?"assertive":"polite",className:W("pointer-events-auto flex w-full max-w-md items-start gap-3 rounded-lg border p-3 shadow-lg","animate-in slide-in-from-bottom-2 fade-in-0",l.tone==="error"?"border-destructive/40 bg-destructive-bg text-destructive":"border-border bg-card text-card-foreground"),children:[(0,En.jsx)("p",{className:"flex-1 text-sm",children:l.text}),l.action&&(0,En.jsx)(te,{variant:l.tone==="error"?"outlineDestructive":"secondary",size:"sm",onClick:()=>{l.action?.onClick(),n(l.id)},children:l.action.label}),(0,En.jsxs)("button",{type:"button",onClick:()=>n(l.id),className:"tap-target rounded p-0.5 text-current opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,En.jsx)("span",{"aria-hidden":"true",children:"×"}),(0,En.jsx)("span",{className:"sr-only",children:"Dismiss"})]})]},l.id))})]})}var P=k(j(),1),vl=()=>({text:"",projects:[],amount:"",when:"",files:[],extraTags:[]});function TE(e){return{text:e.body,projects:[...e.projects],amount:e.amount?`${e.amount.value}${e.amount.currency!=="USD"?` ${e.amount.currency}`:""}`:"",when:Tx(e.date),files:[],extraTags:e.tags.filter(t=>!zm(e.body).includes(t))}}function bv({value:e,onChange:t,projects:a,editing:o,maxAttachmentBytes:n,attachmentUrl:r,onSubmit:l,saving:s,collapsible:i=!1,expanded:u,onExpandedChange:d,onCancel:c,autoFocus:f}){let[p,x]=(0,ma.useState)(!i),g=u??p,S=A=>{x(A),d?.(A)},y=(0,ma.useRef)(null),m=_m(),h=Pm(),b=A=>t({...e,...A}),L=(0,ma.useMemo)(()=>zm(e.text),[e.text]),C=(0,ma.useMemo)(()=>e.amount.trim()?null:AE(e.text),[e.text,e.amount]),T=o?.attachments??[],w=e.text.trim().length>0||e.files.length>0,E=A=>{let z=[];for(let B of A)B.size>n?m.error(U.tooLarge(B.name,Math.round(n/1048576))):z.push(B);z.length&&b({files:[...e.files,...z]})};return i&&!g?(0,P.jsxs)("button",{type:"button",onClick:()=>{S(!0),requestAnimationFrame(()=>y.current?.focus())},className:W("flex w-full items-center gap-3 rounded-lg border border-input bg-card px-3 py-3 text-left text-sm text-muted-foreground shadow-sm","transition-colors hover:border-ring/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),children:[(0,P.jsx)(ko,{className:"size-4 shrink-0","aria-hidden":"true"}),U.composerPlaceholder]}):(0,P.jsxs)("form",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-3 shadow-sm",onSubmit:A=>{A.preventDefault(),l()},children:[(0,P.jsx)(fE,{handle:y,label:U.composerPlaceholder,describedBy:"composer-hint",placeholder:U.composerPlaceholder,value:e.text,onChange:A=>b({text:A}),onFiles:E,attachments:T,attachmentUrl:r,rows:i?3:6,autoFocus:f,onSubmit:l}),(0,P.jsx)("p",{id:"composer-hint",className:"text-xs text-muted-foreground",children:U.composerHint}),(L.length>0||C||e.extraTags.length>0)&&(0,P.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[L.map(A=>(0,P.jsxs)(ws,{variant:"default",children:["#",A]},A)),C&&(0,P.jsx)(ws,{variant:"amount",children:Eo(C)}),(L.length>0||C)&&(0,P.jsx)("span",{className:"text-xs text-muted-foreground",children:"picked up from what you wrote"}),e.extraTags.map(A=>(0,P.jsxs)("button",{type:"button",onClick:()=>b({extraTags:e.extraTags.filter(z=>z!==A)}),className:"tap-target inline-flex items-center gap-1 rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:["#",A,(0,P.jsx)(fa,{className:"size-3 opacity-60","aria-hidden":"true"}),(0,P.jsx)("span",{className:"sr-only",children:"Remove this tag"})]},A))]}),(0,P.jsx)(X3,{files:e.files,existing:T,body:e.text,at:o?.path??"",attachmentUrl:r,onRemoveNew:A=>b({files:e.files.filter((z,B)=>B!==A)})}),(0,P.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,P.jsx)(G3,{projects:a,selected:e.projects,onToggle:A=>b({projects:e.projects.includes(A)?e.projects.filter(z=>z!==A):[...e.projects,A]}),onCreate:async()=>{let A=await h.prompt({title:U.newTopicTitle,description:U.newTopicBody,label:U.newTopicLabel,placeholder:U.newTopicPlaceholder,confirmLabel:"Add"}),z=Wl(A??"");z&&b({projects:[...e.projects,z]})}}),(0,P.jsx)(j3,{value:e.when,onChange:A=>b({when:A})}),(0,P.jsx)($3,{value:e.amount,onChange:A=>b({amount:A})}),!o&&(0,P.jsx)(V3,{onPick:A=>{let z=hv.find(N=>N.id===A),B=e.text.trim(),oe=cE(z,B.split(`
274
+ `)[0].replace(/^#+\s*/,""));b({text:B.includes(`
275
+ `)?`${oe}
276
+ ${B.split(`
277
+ `).slice(1).join(`
278
+ `).trim()}
279
+ `:oe,extraTags:[...new Set([...e.extraTags,...z.tags])]}),requestAnimationFrame(()=>y.current?.focus())}})]}),(0,P.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(c||i)&&(0,P.jsx)(te,{variant:"ghost",onClick:()=>{c?c():S(!1)},children:"Cancel"}),(0,P.jsx)(te,{type:"submit",disabled:s||!w&&!o,children:s?U.saving:o?"Save changes":U.saveEntry})]})]})}function Bm({active:e,children:t,...a}){return(0,P.jsx)("button",{type:"button",className:W("tap-target inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",e?"border-transparent bg-primary text-primary-foreground":"border-border bg-card text-muted-foreground hover:bg-accent hover:text-foreground"),...a,children:t})}function G3({projects:e,selected:t,onToggle:a,onCreate:o}){let[n,r]=(0,ma.useState)(!1),l=t,s=l.length===0?U.topic:l.length===1?l[0]:`${l.length} topics`;return(0,P.jsxs)(mr,{open:n,onOpenChange:r,children:[(0,P.jsx)(Ts,{asChild:!0,children:(0,P.jsxs)(Bm,{active:t.length>0,"aria-label":`Topic: ${l.join(", ")||"none"}`,children:[s,(0,P.jsx)(Wr,{className:"size-3 opacity-60","aria-hidden":"true"})]})}),(0,P.jsxs)(hr,{className:"w-64 p-1",children:[(0,P.jsxs)("ul",{className:"max-h-64 overflow-y-auto",children:[e.map(i=>(0,P.jsx)("li",{children:(0,P.jsxs)("button",{type:"button","aria-pressed":t.includes(i),onClick:()=>a(i),className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,P.jsx)("span",{className:"flex-1 truncate",children:i}),t.includes(i)&&(0,P.jsx)(Zn,{className:"size-4 shrink-0","aria-hidden":"true"})]})},i)),e.length===0&&(0,P.jsx)("li",{className:"px-2 py-3 text-xs text-muted-foreground",children:U.topicsEmpty})]}),(0,P.jsxs)(te,{variant:"ghost",className:"mt-1 w-full justify-start",size:"sm",onClick:()=>{r(!1),o()},children:[(0,P.jsx)(ko,{"aria-hidden":"true"}),U.newTopic]})]})]})}function j3({value:e,onChange:t}){let[a,o]=(0,ma.useState)(!1),n=e?new Date(`${e}T12:00:00`).toLocaleDateString([],{dateStyle:"medium"}):"Today",r=l=>{let s=new Date;s.setDate(s.getDate()-l);let i=u=>String(u).padStart(2,"0");return`${s.getFullYear()}-${i(s.getMonth()+1)}-${i(s.getDate())}`};return(0,P.jsxs)(mr,{open:a,onOpenChange:o,children:[(0,P.jsx)(Ts,{asChild:!0,children:(0,P.jsxs)(Bm,{active:!!e,"aria-label":`Date: ${n}`,children:[(0,P.jsx)(Tc,{className:"size-3","aria-hidden":"true"}),n,(0,P.jsx)(Wr,{className:"size-3 opacity-60","aria-hidden":"true"})]})}),(0,P.jsx)(hr,{className:"w-72",children:(0,P.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,P.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,P.jsx)(te,{variant:"secondary",size:"sm",onClick:()=>{t(""),o(!1)},children:"Today"}),(0,P.jsx)(te,{variant:"secondary",size:"sm",onClick:()=>{t(r(1)),o(!1)},children:"Yesterday"}),(0,P.jsx)(te,{variant:"secondary",size:"sm",onClick:()=>{t(r(7)),o(!1)},children:"A week ago"})]}),(0,P.jsx)(sr,{label:"Or pick a date",htmlFor:"composer-when",children:(0,P.jsx)(lr,{id:"composer-when",type:"date",value:e,max:r(0),onChange:l=>t(l.target.value)})}),(0,P.jsx)("p",{className:"text-xs text-muted-foreground",children:"The date goes in the file name, so the folder reads like a timeline."})]})})]})}function V3({onPick:e}){let[t,a]=(0,ma.useState)(!1);return(0,P.jsxs)(mr,{open:t,onOpenChange:a,children:[(0,P.jsx)(Ts,{asChild:!0,children:(0,P.jsxs)(Bm,{"aria-label":"Start from a template",children:["Template",(0,P.jsx)(Wr,{className:"size-3 opacity-60","aria-hidden":"true"})]})}),(0,P.jsx)(hr,{className:"w-72 p-1",children:(0,P.jsx)("ul",{children:hv.map(o=>(0,P.jsx)("li",{children:(0,P.jsxs)("button",{type:"button",onClick:()=>{e(o.id),a(!1)},className:"w-full rounded-md px-2 py-2 text-left text-sm transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,P.jsx)("span",{className:"block font-medium",children:o.label}),(0,P.jsx)("span",{className:"block text-xs text-muted-foreground",children:o.description})]})},o.id))})})]})}function $3({value:e,onChange:t}){let[a,o]=(0,ma.useState)(!1),n=e.trim()?Sp(e):null;return(0,P.jsxs)(mr,{open:a,onOpenChange:o,children:[(0,P.jsx)(Ts,{asChild:!0,children:(0,P.jsxs)(Bm,{active:!!n,"aria-label":`Amount: ${n?Eo(n):"none"}`,children:[n?Eo(n):"Amount",(0,P.jsx)(Wr,{className:"size-3 opacity-60","aria-hidden":"true"})]})}),(0,P.jsx)(hr,{className:"w-60",children:(0,P.jsx)(sr,{label:"Amount",htmlFor:"composer-amount",hint:"Like 1850, $1,850 or 1850 EUR.",children:(0,P.jsx)(lr,{id:"composer-amount",inputMode:"decimal",autoComplete:"off",value:e,placeholder:"$0.00",onChange:r=>t(r.target.value),"aria-invalid":e.trim()!==""&&!n})})})]})}function X3({files:e,existing:t,body:a,at:o,attachmentUrl:n,onRemoveNew:r}){let l=K3(e),s=(0,ma.useMemo)(()=>mu(a,o),[a,o]);return!e.length&&!t.length?null:(0,P.jsxs)("ul",{className:"flex flex-col gap-1.5",children:[t.map(i=>(0,P.jsxs)("li",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5 text-sm",children:[ul(i)?(0,P.jsx)("img",{src:n(i),alt:"",className:"size-8 rounded object-cover"}):(0,P.jsx)(hn,{className:"size-4 text-muted-foreground","aria-hidden":"true"}),(0,P.jsx)("span",{className:"min-w-0 flex-1 truncate",children:i.name}),(0,P.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.has(i.path)?"linked in the text":"no longer linked"})]},i.path)),e.map((i,u)=>(0,P.jsxs)("li",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5 text-sm",children:[l[u]?(0,P.jsx)("img",{src:l[u],alt:"",className:"size-8 rounded object-cover"}):(0,P.jsx)(hn,{className:"size-4 text-muted-foreground","aria-hidden":"true"}),(0,P.jsx)("span",{className:"min-w-0 flex-1 truncate",children:i.name||"Pasted file"}),(0,P.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:DT(i.size)}),(0,P.jsxs)(te,{variant:"ghost",size:"iconSm",onClick:()=>r(u),children:[(0,P.jsx)(fa,{"aria-hidden":"true"}),(0,P.jsxs)("span",{className:"sr-only",children:["Remove ",i.name||"this file"]})]})]},`${i.name}-${u}`))]})}function K3(e){let[t,a]=(0,ma.useState)([]);return(0,ma.useEffect)(()=>{let o=e.map(n=>ul(n)?URL.createObjectURL(n):null);return a(o),()=>{for(let n of o)n&&URL.revokeObjectURL(n)}},[e]),t}function zm(e){let t=new Set;for(let a of e.matchAll(/(^|[\s(])#(\p{L}[\p{L}\p{N}_-]*)/gu))t.add(a[2].toLowerCase());return[...t]}function AE(e){let t=/(^|\s)([$€£¥])\s?(\d[\d,]*(?:\.\d{1,2})?)/.exec(e);return t?Sp(`${t[2]}${t[3]}`):null}function vv(e){let t=e.amount.trim(),a=t?Sp(t):AE(e.text);return t&&!a?{input:{text:""},error:U.badAmount}:{input:{text:e.text,projects:e.projects,tags:e.extraTags,amount:a??void 0,date:e.when||void 0}}}function kE(e,t){let{input:a,error:o}=vv(e);if(o)return{changes:{},error:o};let n={text:a.text,projects:a.projects,tags:e.extraTags,amount:a.amount??null};return e.when!==Tx(t.date)&&(n.date=e.when||""),{changes:n}}var xe=k(j(),1),Um=40;function RE({entries:e,projectName:t,attachmentUrl:a,onFilter:o,emptyState:n}){let[r,l]=(0,gr.useState)(Um),s=(0,gr.useRef)(null),i=(0,gr.useMemo)(()=>e.map(f=>f.id).join("|").slice(0,2048)+e.length,[e]);(0,gr.useEffect)(()=>l(Um),[i]);let u=e.slice(0,r),d=e.length-u.length;if((0,gr.useEffect)(()=>{let f=s.current;if(!f||d<=0)return;let p=new IntersectionObserver(x=>{x.some(g=>g.isIntersecting)&&l(g=>g+Um)},{rootMargin:"600px"});return p.observe(f),()=>p.disconnect()},[d]),!e.length)return(0,xe.jsx)(xe.Fragment,{children:n});let c=[];for(let f of u){let p=Vc(f.date),x=p?Hp(p):"Undated",g=c[c.length-1];g?.label===x?g.entries.push(f):c.push({label:x,iso:p?p.toISOString():`undated-${f.path}`,entries:[f]})}return(0,xe.jsxs)("div",{className:"flex flex-col gap-7",children:[c.map(f=>(0,xe.jsxs)("section",{"aria-labelledby":`day-${f.iso}`,children:[(0,xe.jsx)("h2",{id:`day-${f.iso}`,className:"sticky top-14 z-10 -mx-1 mb-2 bg-background/90 px-1 py-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground backdrop-blur",children:f.label}),(0,xe.jsx)("ul",{className:"flex flex-col",children:f.entries.map(p=>(0,xe.jsx)("li",{children:(0,xe.jsx)(Sv,{entry:p,projectName:t,attachmentUrl:a,onFilter:o})},p.id))})]},f.iso)),d>0&&(0,xe.jsxs)("div",{ref:s,className:"flex flex-col items-center gap-2 py-4",children:[(0,xe.jsx)(te,{variant:"secondary",onClick:()=>l(f=>f+Um),children:U.loadMore}),(0,xe.jsx)("p",{className:"text-xs text-muted-foreground",role:"status","aria-live":"polite",children:U.showingCount(u.length,e.length)})]})]})}function Sv({entry:e,projectName:t,attachmentUrl:a,onFilter:o}){let n=mu(e.body,e.path),r=e.attachments.filter(u=>ul(u)&&!u.image&&!n.has(u.path)),l=Lv(e).slice(0,2),s=new Set(zm(e.body)),i=e.tags.filter(u=>!s.has(u));return(0,xe.jsxs)("article",{className:"group relative flex gap-3 rounded-lg px-2 py-3 transition-colors hover:bg-hover focus-within:bg-hover",children:[(0,xe.jsxs)("a",{href:`#/entry/${encodeURIComponent(e.id)}`,className:"w-14 shrink-0 rounded pt-0.5 text-xs tabular-nums text-muted-foreground after:absolute after:inset-0 after:content-[''] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,xe.jsx)("time",{dateTime:e.date??void 0,children:e.date?e.date.length>10?e.date.slice(11,16):"":"—"}),(0,xe.jsxs)("span",{className:"sr-only",children:[". ",Y3(e)]})]}),(0,xe.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,xe.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 empty:hidden",children:[e.projects.map(u=>(0,xe.jsxs)("button",{type:"button",onClick:()=>o("topic",u),className:"relative z-10 rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[t(u),(0,xe.jsx)("span",{className:"sr-only",children:" — show only this topic"})]},u)),e.amount&&(0,xe.jsx)(ws,{variant:"amount",className:"relative z-10",children:Eo(e.amount)})]}),e.body.trim()&&(0,xe.jsx)("div",{className:"prose-roll mt-1 [&_a]:relative [&_a]:z-10 [&_img]:relative [&_img]:z-10",dangerouslySetInnerHTML:{__html:pu(Q3(e.body),hu(e,u=>a({path:u,name:u,type:"",image:!1})))}}),l.length>0&&(0,xe.jsx)("dl",{className:"mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-xs",children:l.map(([u,d])=>(0,xe.jsxs)("div",{className:"flex gap-1",children:[(0,xe.jsx)("dt",{className:"text-muted-foreground",children:u}),(0,xe.jsx)("dd",{className:"text-foreground",children:d})]},u))}),r.length>0&&(0,xe.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[r.slice(0,4).map(u=>(0,xe.jsx)("img",{src:a(u),alt:u.name,loading:"lazy",className:"size-20 rounded-md border border-border object-cover"},u.path)),r.length>4&&(0,xe.jsxs)("span",{className:"flex size-20 items-center justify-center rounded-md border border-border bg-muted text-xs text-muted-foreground",children:["+",r.length-4]})]}),(i.length>0||e.attachments.length>0)&&(0,xe.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.attachments.length>0&&(0,xe.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,xe.jsx)(hn,{className:"size-3","aria-hidden":"true"}),Ln(e.attachments.length,"file","files")]}),i.map(u=>(0,xe.jsxs)("button",{type:"button",onClick:()=>o("tag",u),className:"relative z-10 rounded transition-colors hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:["#",u,(0,xe.jsx)("span",{className:"sr-only",children:" — show only this tag"})]},u))]})]})]})}function Y3(e){let a=[uE(e.body).slice(0,120)||e.title];return e.amount&&a.push(Eo(e.amount)),a.join(", ")}function Q3(e,t=600){if(e.length<=t)return e;let a=e.slice(0,t),o=Math.max(a.lastIndexOf(`
280
+
281
+ `),a.lastIndexOf(". "));return`${a.slice(0,o>t/2?o:t)}…`}function Lv(e){let t=new Set(["date","projects","project","tags","tag","amount","currency","title","source"]),a=[];for(let[o,n]of Object.entries(e.meta))t.has(o)||n==null||n===""||a.push([o.replace(/_/g," "),typeof n=="object"?JSON.stringify(n):String(n)]);return a}var Xe=k(j(),1);function EE({state:e,entries:t,projectName:a,attachmentUrl:o,onFilter:n,onClose:r,onDraft:l}){let s=t.filter(i=>e.sources.some(u=>u.id===i.id));return(0,Xe.jsxs)("section",{"aria-label":"Answer","aria-busy":e.loading,className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,Xe.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,Xe.jsx)("p",{className:"text-sm font-medium",children:e.question}),(0,Xe.jsxs)(te,{variant:"ghost",size:"iconSm",onClick:r,children:[(0,Xe.jsx)(fa,{"aria-hidden":"true"}),(0,Xe.jsx)("span",{className:"sr-only",children:U.close})]})]}),(0,Xe.jsx)("div",{role:"status","aria-live":"polite",children:e.loading?(0,Xe.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Xe.jsx)("p",{className:"text-sm text-muted-foreground",children:U.askThinking}),(0,Xe.jsx)(iu,{className:"h-4 w-full"}),(0,Xe.jsx)(iu,{className:"h-4 w-4/5"})]}):e.error?(0,Xe.jsx)("p",{className:"text-sm text-destructive",children:e.error}):(0,Xe.jsx)(Z3,{text:e.answer,sources:e.sources})}),!e.loading&&!e.error&&(0,Xe.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,Xe.jsx)("p",{className:"text-xs text-muted-foreground",children:s.length?U.askCaveat:U.askNoSources}),e.answer.trim()&&(0,Xe.jsx)(te,{variant:"ghost",size:"sm",onClick:()=>l(`${e.answer.trim()}
282
+
283
+ ${s.map(i=>`- [${i.title}](${i.path.split("/").pop()})`).join(`
284
+ `)}`.trim()),children:"Start an event from this"})]}),s.length>0&&(0,Xe.jsxs)("div",{className:"border-t border-border pt-2",children:[(0,Xe.jsxs)("h3",{className:"mb-1 text-xs font-medium text-muted-foreground",children:[Ln(s.length,"event","events")," this came from"]}),(0,Xe.jsx)("ul",{children:s.map(i=>(0,Xe.jsx)("li",{children:(0,Xe.jsx)(Sv,{entry:i,projectName:a,attachmentUrl:o,onFilter:n})},i.id))})]})]})}function Z3({text:e,sources:t}){let a=new Map(t.map(n=>[n.short,n.id])),o=e.split(/(\[[^\]\s][^\]]{0,200}\])/g);return(0,Xe.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:o.map((n,r)=>{let l=/^\[([^\]]+)\]$/.exec(n),s=l?a.get(l[1]):void 0;return l?s?(0,Xe.jsx)("a",{href:`#/entry/${encodeURIComponent(s)}`,className:"mx-0.5 rounded text-link underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:l[1]},r):null:(0,Xe.jsx)("span",{children:n},r)})})}var Sl=k(X(),1);var Re=k(j(),1);function DE({store:e,onResolved:t}){let[a,o]=(0,Sl.useState)(null),[n,r]=(0,Sl.useState)(""),l=()=>e.conflicts().then(o).catch(s=>r(Ta(s)));return(0,Sl.useEffect)(()=>{l()},[e]),n?(0,Re.jsx)("p",{className:"text-sm text-destructive",children:n}):a?a.length?(0,Re.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,Re.jsxs)("div",{children:[(0,Re.jsx)("h1",{className:"text-xl font-semibold",children:"Changed in two places"}),(0,Re.jsx)("p",{className:"text-sm text-muted-foreground",children:"Both versions are here. Pick one, or write the version you want. Whichever you choose is saved as a new commit, and the other stays in the event's history."})]}),a.map(s=>(0,Re.jsx)(W3,{pair:s,store:e,onResolved:()=>{l(),t()}},s.entry.path))]}):(0,Re.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-dashed border-border p-6",children:[(0,Re.jsx)("p",{className:"text-sm",children:"Nothing to settle."}),(0,Re.jsx)("p",{className:"text-sm text-muted-foreground",children:"When an event is changed in two places at once, both versions are kept and they show up here."})]}):null}function W3({pair:e,store:t,onResolved:a}){let[o,n]=(0,Sl.useState)(null),[r,l]=(0,Sl.useState)(!1),[s,i]=(0,Sl.useState)(""),u=async d=>{l(!0),i("");try{await t.resolveConflict(e.entry.path,d),a()}catch(c){i(Ta(c))}finally{l(!1)}};return(0,Re.jsxs)("section",{className:"flex flex-col gap-3 rounded-lg border border-border p-3","aria-label":e.entry.title,children:[(0,Re.jsxs)("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,Re.jsx)("h2",{className:"text-sm font-medium",children:e.entry.title}),(0,Re.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:e.entry.path})]}),o===null?(0,Re.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,Re.jsx)(OE,{label:"This computer",text:e.mine,onKeep:()=>{u({keep:"mine"})},busy:r}),(0,Re.jsx)(OE,{label:`From elsewhere (${e.noted})`,text:e.theirs,onKeep:()=>{u({keep:"theirs"})},busy:r})]}):(0,Re.jsx)("textarea",{"aria-label":"The version to keep",rows:12,value:o,onChange:d=>n(d.target.value),className:"w-full rounded-md border border-input bg-card px-3 py-2 font-mono text-xs shadow-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"}),s&&(0,Re.jsx)("p",{className:"text-sm text-destructive",children:s}),(0,Re.jsx)("div",{className:"flex flex-wrap justify-end gap-2",children:o===null?(0,Re.jsx)(te,{variant:"secondary",size:"sm",disabled:r,onClick:()=>n(`${e.mine}
285
+
286
+ ${e.theirs}`),children:"Write one out of both"}):(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(te,{variant:"ghost",size:"sm",disabled:r,onClick:()=>n(null),children:"Back to the two versions"}),(0,Re.jsx)(te,{size:"sm",disabled:r||!o.trim(),onClick:()=>{u({text:o})},children:"Save this version"})]})})]})}function OE({label:e,text:t,onKeep:a,busy:o}){return(0,Re.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Re.jsx)("h3",{className:"text-xs font-medium text-muted-foreground",children:e}),(0,Re.jsx)("pre",{className:W("max-h-64 overflow-auto rounded-md bg-muted p-2 font-mono text-xs whitespace-pre-wrap"),children:t}),(0,Re.jsx)(te,{variant:"secondary",size:"sm",disabled:o,onClick:a,children:"Keep this one"})]})}var Ll=k(j(),1);function ME({status:e,className:t}){let a=e.repo??e.remoteUrl,o=e.blocker==="detached",n=o?`detached at ${e.head??"HEAD"}`:e.hasCommits?e.branch:`${e.branch} · no commits yet`,r=o?`HEAD isn't on a branch, so there's nothing to sync with and nothing tracks what you log here. Run git switch -c <branch> to start one. (${e.head})`:e.hasCommits?`The log's own repository is on ${e.branch}${e.head?` at ${e.head}`:""}${a?`, backed up to ${a}`:", with no backup yet"}.`:`This repository is on ${e.branch} and has no commits yet. The first event you log makes one.`;return(0,Ll.jsxs)("span",{title:r,className:W("inline-flex min-w-0 items-center gap-1 rounded px-1 text-xs text-muted-foreground",(o||!e.hasCommits)&&"text-del",t),children:[(0,Ll.jsx)(Rc,{className:"size-3 shrink-0","aria-hidden":"true"}),(0,Ll.jsx)("span",{className:"sr-only",children:"This log's branch: "}),a&&(0,Ll.jsx)("span",{className:"max-w-[12rem] truncate",children:a}),a&&(0,Ll.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,Ll.jsx)("span",{className:"max-w-[10rem] truncate font-medium",children:n})]})}var As=k(X(),1);var PE=/^[A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._-]*$/,J3=/^[0-9a-f]{7,40}$/i,Fm=e=>e==null||typeof e=="object"?"":String(e).trim();function Cv(e){let t=e.trim().replace(/\.git\/?$/,"");if(!t)return null;if(PE.test(t))return`https://github.com/${t}`;let a=/^[^@/]+@([^:/]+):(.+)$/.exec(t);return a?`https://${a[1]}/${a[2]}`:/^https?:\/\//i.test(t)?t.replace(/\/$/,""):/^ssh:\/\//i.test(t)?t.replace(/^ssh:\/\/(?:[^@/]+@)?/i,"https://"):null}function _E(e){let t=Cv(e);if(!t)return null;let o=/^https?:\/\/[^/]+\/(.+)$/.exec(t)?.[1]?.replace(/\/$/,"");return o&&PE.test(o)?o:null}function wv(e){let t=e.meta.source;if(!t||typeof t!="object"||Array.isArray(t))return null;let a=t,o=Fm(a.repo),n=Fm(a.branch),r=Fm(a.commit),l=Fm(a.url)||(o?Cv(o)??"":"");if(!o&&!n&&!r)return null;let s={};return o&&(s.repo=_E(o)??o),n&&(s.branch=n),r&&J3.test(r)&&(s.commit=r.toLowerCase()),l&&(s.url=l),s}var eF=/(?:^|[^\w/-])(?:(?<repo>[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*)#(?<num>\d+)|#(?<bare>\d+)|(?<url>https?:\/\/[^\s)<>]+\/(?:pull|issues|commit)\/[\w-]+(?:\.[\w-]+)*)|(?<=^|[\s(])(?<sha>[0-9a-f]{7,40})(?=$|[\s).,;]))/g,tF=e=>e.replace(/```[\s\S]*?```/g,`
287
+ `).replace(/`[^`\n]*`/g," ").replace(/<!--[\s\S]*?-->/g," ");function BE(e){let t=wv(e),a=[],o=n=>{let r=a.find(l=>l.kind===n.kind&&(l.repo??"")===(n.repo??"")&&(l.id===n.id||n.kind==="commit"&&(l.id.startsWith(n.id)||n.id.startsWith(l.id))));if(r){n.kind==="commit"&&n.id.length>r.id.length&&Object.assign(r,n);return}a.push(n)};t?.commit&&o({kind:"commit",id:t.commit,repo:t.repo,text:t.commit.slice(0,12),url:NE(t)??void 0});for(let n of tF(e.body).matchAll(eF)){let r=n.groups??{};if(r.url){let l=aF(r.url);l&&o(l)}else if(r.num&&r.repo)o({kind:"ref",id:r.num,repo:_E(r.repo)??r.repo,text:`${r.repo}#${r.num}`,url:`https://github.com/${r.repo}/issues/${r.num}`});else if(r.bare){let l=t?.repo;o({kind:"ref",id:r.bare,repo:l,text:`#${r.bare}`,url:l?`https://github.com/${l}/issues/${r.bare}`:void 0})}else if(r.sha){let l=t?NE({...t,commit:r.sha.toLowerCase()}):null;o({kind:"commit",id:r.sha.toLowerCase(),repo:t?.repo,text:r.sha.slice(0,12),url:l??void 0})}}return a}function aF(e){let t=e.replace(/[.,;:)\]]+$/,""),a=/^(https?:\/\/[^/]+\/([\w.-]+\/[\w.-]+))\/(pull|issues|commit)\/([\w.-]+)/.exec(t);if(!a)return null;let o=a[3]==="commit"?"commit":a[3]==="pull"?"pr":"issue",n=a[4];return{kind:o,id:o==="commit"?n.toLowerCase():n,repo:a[2],text:`${a[2]}${o==="commit"?`@${n.slice(0,12)}`:`#${n}`}`,url:t}}var zE=e=>e==="commit"?"commit":e==="pr"?"pull request":e==="issue"?"issue":"pull request or issue";function NE(e){let t=e.url??(e.repo?Cv(e.repo):null);return t&&e.commit?`${t}/commit/${e.commit}`:null}function UE(e,t){let a=new Map(t.map(l=>[l.path,l])),o=[],n=[];for(let l of e.links){let s=a.get(l);s?o.push(s):n.push(l)}let r=t.filter(l=>l.path!==e.path&&l.links.includes(e.path));return{links:o,backlinks:r,missing:n}}var D=k(j(),1);function HE({entry:e,entries:t,projectName:a,attachmentUrl:o,onFilter:n,onEdit:r,onDelete:l,loadHistory:s,onRestore:i}){let[u,d]=(0,As.useState)(null),[c,f]=(0,As.useState)(""),[p,x]=(0,As.useState)(!1);if((0,As.useEffect)(()=>{d(null),f("")},[e?.id]),!e)return(0,D.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,D.jsx)(FE,{}),(0,D.jsx)("p",{className:"text-sm text-muted-foreground",children:"This event isn't in your timeline any more. If you deleted it, it's still in your Git history."})]});let g=Lv(e),S=mu(e.body,e.path),y=e.attachments.filter(h=>!h.image||!S.has(h.path)),m=async()=>{x(!0),f("");try{d(await s(e.path))}catch(h){f(Ta(h))}finally{x(!1)}};return(0,D.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,D.jsx)(FE,{}),(0,D.jsxs)("article",{className:"flex flex-col gap-4",children:[(0,D.jsxs)("header",{className:"flex flex-col gap-2",children:[(0,D.jsx)("time",{dateTime:e.date??void 0,className:"text-sm text-muted-foreground",children:e.date?new Date(e.date.length===10?`${e.date}T12:00:00`:e.date).toLocaleDateString([],{dateStyle:"full"}):"Undated — name the file 2026-09-15-… or add a date"}),(0,D.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.projects.map(h=>(0,D.jsx)("button",{type:"button",onClick:()=>n("topic",h),className:"rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:a(h)},h)),e.amount&&(0,D.jsx)(ws,{variant:"amount",children:Eo(e.amount)})]})]}),e.body.trim()&&(0,D.jsx)("div",{className:"prose-roll",dangerouslySetInnerHTML:{__html:pu(e.body,hu(e,h=>o({path:h,name:h,type:"",image:!1})))}}),g.length>0&&(0,D.jsx)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 rounded-lg border border-border p-3 text-sm",children:g.map(([h,b])=>(0,D.jsxs)("div",{className:"contents",children:[(0,D.jsx)("dt",{className:"text-muted-foreground",children:h}),(0,D.jsx)("dd",{children:b})]},h))}),y.length>0&&(0,D.jsx)("ul",{className:"flex flex-wrap gap-2",children:y.map(h=>(0,D.jsx)("li",{children:(0,D.jsx)(rF,{attachment:h,url:o(h)})},h.path))}),(0,D.jsx)(oF,{entry:e}),(0,D.jsx)(nF,{entry:e,entries:t}),e.tags.length>0&&(0,D.jsx)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:e.tags.map(h=>(0,D.jsxs)("button",{type:"button",onClick:()=>n("tag",h),className:"rounded transition-colors hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:["#",h]},h))}),(0,D.jsxs)("div",{className:"flex flex-wrap gap-2 border-t border-border pt-4",children:[(0,D.jsxs)(te,{variant:"secondary",onClick:r,children:[(0,D.jsx)(_c,{"aria-hidden":"true"}),"Edit"]}),(0,D.jsxs)(te,{variant:"secondary",onClick:()=>{m()},"aria-expanded":u!==null,children:[(0,D.jsx)(Jr,{"aria-hidden":"true"}),"History"]}),(0,D.jsxs)(te,{variant:"outlineDestructive",onClick:l,children:[(0,D.jsx)(el,{"aria-hidden":"true"}),"Delete"]})]}),(0,D.jsxs)("details",{className:"rounded-lg border border-border",children:[(0,D.jsx)("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium",children:"Details"}),(0,D.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 px-3 pb-3 text-sm",children:[(0,D.jsx)("dt",{className:"text-muted-foreground",children:"Date from"}),(0,D.jsx)("dd",{children:e.dateFrom==="metadata"?"the front matter":e.dateFrom==="filename"?"the file name":"nothing — this event is undated"}),e.source&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("dt",{className:"text-muted-foreground",children:"Imported from"}),(0,D.jsx)("dd",{children:e.source.adapter})]}),(0,D.jsx)("dt",{className:"text-muted-foreground",children:"File"}),(0,D.jsx)("dd",{children:(0,D.jsx)("code",{className:"font-mono text-xs",children:e.path})})]})]}),p&&(0,D.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,D.jsx)(iu,{className:"h-4 w-40"}),(0,D.jsx)(iu,{className:"h-16 w-full"})]}),c&&(0,D.jsx)("p",{className:"text-sm text-destructive",children:c}),u&&(0,D.jsx)(lF,{items:u,onRestore:i})]})]})}function oF({entry:e}){let t=wv(e),a=BE(e);return!t&&!a.length?null:(0,D.jsxs)("section",{"aria-label":"Code",className:"flex flex-col gap-1.5 rounded-lg border border-border p-3 text-sm",children:[t&&(0,D.jsxs)("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,D.jsx)("span",{className:"text-muted-foreground",children:"Code"}),t.repo&&(0,D.jsx)("span",{className:"font-mono text-xs",children:t.repo}),t.branch&&(0,D.jsx)("span",{className:"rounded-full border border-border px-2 py-0.5 text-xs",title:"The branch this event's work happened on",children:t.branch})]}),a.length>0&&(0,D.jsx)("ul",{className:"flex flex-wrap gap-1.5",children:a.map(o=>(0,D.jsx)("li",{children:o.url?(0,D.jsx)("a",{href:o.url,target:"_blank",rel:"noopener noreferrer",title:zE(o.kind),className:"rounded-full border border-border px-2 py-0.5 font-mono text-xs text-link hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:o.text}):(0,D.jsx)("span",{className:"rounded-full border border-border px-2 py-0.5 font-mono text-xs text-muted-foreground",title:"No repository is recorded on this event, so this isn't a link",children:o.text})},`${o.kind}-${o.repo??""}-${o.id}`))})]})}function nF({entry:e,entries:t}){let{links:a,backlinks:o,missing:n}=UE(e,t);if(!a.length&&!o.length&&!n.length)return null;let r=l=>(0,D.jsx)("li",{children:(0,D.jsxs)("a",{href:`#/entry/${encodeURIComponent(l.path)}`,className:"flex items-baseline gap-2 rounded px-1 py-0.5 text-sm hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,D.jsx)("span",{className:"truncate",children:l.title}),(0,D.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:l.date??"undated"})]})},l.path);return(0,D.jsxs)("section",{"aria-label":"Related events",className:"flex flex-col gap-2 rounded-lg border border-border p-3",children:[a.length>0&&(0,D.jsxs)("div",{children:[(0,D.jsx)("h2",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"This links to"}),(0,D.jsx)("ul",{children:a.map(r)})]}),o.length>0&&(0,D.jsxs)("div",{children:[(0,D.jsx)("h2",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Linked from"}),(0,D.jsx)("ul",{children:o.map(r)})]}),n.map(l=>(0,D.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Links to ",(0,D.jsx)("code",{className:"font-mono",children:l}),", which isn't in this Roll."]},l))]})}function FE(){return(0,D.jsxs)("a",{href:"#/",onClick:e=>{history.length>1&&(e.preventDefault(),history.back())},className:"inline-flex items-center gap-1.5 self-start rounded text-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,D.jsx)(wc,{className:"size-4","aria-hidden":"true"}),"Back"]})}function rF({attachment:e,url:t}){let a=e.type==="application/pdf"||/^(image|video|audio)\//.test(e.type)||e.type==="text/plain";return ul(e)?(0,D.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"block rounded-lg border border-border focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:(0,D.jsx)("img",{src:t,alt:e.name,loading:"lazy",className:"size-32 rounded-lg object-cover"})}):(0,D.jsxs)("a",{href:t,...a?{target:"_blank",rel:"noopener noreferrer"}:{download:e.name},className:W("flex w-52 items-center gap-2 rounded-lg border border-border p-2 text-sm transition-colors","hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),children:[a?(0,D.jsx)(hn,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):(0,D.jsx)(kc,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,D.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,D.jsx)("span",{className:"block truncate",children:e.name}),(0,D.jsx)("span",{className:"block text-xs text-muted-foreground",children:MT(e)})]})]})}function lF({items:e,onRestore:t}){let[a,o]=(0,As.useState)("");return(0,D.jsxs)("section",{className:"flex flex-col gap-3","aria-labelledby":"history-heading",children:[(0,D.jsx)("h2",{id:"history-heading",className:"text-sm font-semibold",children:"History"}),(0,D.jsxs)("p",{className:"text-xs text-muted-foreground",children:[Ln(e.length,"version","versions"),", kept by Git. Nothing here is ever rewritten: putting an earlier version back is a new commit, so this list only ever grows."]}),(0,D.jsx)("ol",{className:"flex flex-col gap-3",children:e.map((n,r)=>{let l=r===e.length-1;return(0,D.jsxs)("li",{className:"rounded-lg border border-border p-3",children:[(0,D.jsxs)("p",{className:"text-sm",children:[(0,D.jsx)("strong",{className:"font-medium",children:l?"Written down":"Edited"})," ",(0,D.jsxs)("span",{className:"text-muted-foreground",children:[new Date(n.date).toLocaleString([],{dateStyle:"medium",timeStyle:"short"})," · ",n.author]})]}),!l&&(0,D.jsx)(sF,{patch:n.patch}),r>0&&(0,D.jsx)(te,{variant:"secondary",size:"sm",className:"mt-2",disabled:a===n.commit,onClick:()=>{o(n.commit),t(n.commit).finally(()=>o(""))},children:"Put this version back"})]},`${n.date}-${r}`)})})]})}function sF({patch:e}){let t=e.split(`
288
+ `).filter(a=>!/^(diff --git|index |--- |\+\+\+ |\\ No newline|new file mode|deleted file mode|similarity index|rename (from|to) |@@)/.test(a)).filter(a=>/^[+-]/.test(a));return t.length?(0,D.jsx)("pre",{className:"mt-2 overflow-x-auto rounded-md bg-muted p-2 font-mono text-xs",children:t.map((a,o)=>(0,D.jsxs)("span",{className:W("block px-1",a.startsWith("+")?"bg-add-bg text-add":"bg-del-bg text-del"),children:[(0,D.jsx)("span",{className:"sr-only",children:a.startsWith("+")?"Added: ":"Removed: "}),a.slice(1)||" "]},o))}):null}var ha=k(X(),1);var V=k(j(),1);function qE({query:e,onQueryChange:t,suggestCtx:a,projectName:o,resultCount:n,totals:r,askEnabled:l,onAsk:s,inputRef:i}){let u=(0,ha.useRef)(null),d=i??u,[c,f]=(0,ha.useState)(!1),[p,x]=(0,ha.useState)(0),[g,S]=(0,ha.useState)(!1),y=(0,ha.useId)(),m=(0,ha.useMemo)(()=>kx(e,p).text,[e,p]),h=(0,ha.useMemo)(()=>c?_T(m,a).slice(0,12):[],[c,m,a]),[b,L]=(0,ha.useState)(0);(0,ha.useEffect)(()=>L(0),[m,c]);let C=h.length?Math.min(b,h.length-1):-1,T=N=>`${y}-option-${N}`,w=(0,ha.useMemo)(()=>ar(e),[e]),E=w.filter(N=>N.key),A=w.filter(N=>!N.key),z=N=>{let J=PT(e,p,N);t(J.value),f(N.endsWith(":")),requestAnimationFrame(()=>{d.current?.focus(),d.current?.setSelectionRange(J.caret,J.caret),x(J.caret)})},B=()=>x(d.current?.selectionStart??0),oe=N=>{let J=c&&h.length>0;N.key==="ArrowDown"&&J?(N.preventDefault(),L($=>($+1)%h.length)):N.key==="ArrowUp"&&J?(N.preventDefault(),L($=>($-1+h.length)%h.length)):N.key==="Enter"?(N.preventDefault(),J&&C>=0?z(h[C].insert):f(!1)):N.key==="Tab"&&J&&C>=0?(N.preventDefault(),z(h[C].insert)):N.key==="Escape"?(N.stopPropagation(),c?f(!1):e&&t("")):(N.key==="Home"||N.key==="End")&&requestAnimationFrame(B)};return(0,V.jsxs)("div",{role:"search",className:"flex flex-col gap-2",children:[(0,V.jsxs)("div",{className:"flex gap-2",children:[(0,V.jsxs)(mr,{open:c&&h.length>0,onOpenChange:f,children:[(0,V.jsx)(SE,{asChild:!0,children:(0,V.jsxs)("div",{className:W("flex min-w-0 flex-1 items-center gap-2 rounded-lg border border-input bg-card px-3 shadow-sm","focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring"),children:[(0,V.jsx)(zc,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,V.jsx)("input",{ref:d,id:"q",type:"text",role:"combobox","aria-expanded":c&&h.length>0,"aria-controls":y,"aria-activedescendant":c&&C>=0?T(C):void 0,"aria-autocomplete":"list","aria-label":"Search your Roll","aria-describedby":`${y}-help`,autoComplete:"off",spellCheck:!1,enterKeyHint:"search",placeholder:"Search, or type a filter like has:photo",className:"h-11 w-full min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground max-sm:text-base",value:e,onChange:N=>{t(N.target.value),x(N.target.selectionStart??0),f(!0)},onKeyUp:B,onClick:B,onFocus:()=>f(!0),onKeyDown:oe}),e&&(0,V.jsxs)(te,{variant:"ghost",size:"iconSm",onClick:()=>{t(""),d.current?.focus()},children:[(0,V.jsx)(fa,{"aria-hidden":"true"}),(0,V.jsx)("span",{className:"sr-only",children:"Clear the search"})]}),(0,V.jsxs)(te,{variant:"ghost",size:"iconSm",onClick:()=>S(!0),children:[(0,V.jsx)(Ao,{"aria-hidden":"true"}),(0,V.jsx)("span",{className:"sr-only",children:"How search works"})]})]})}),(0,V.jsx)(hr,{className:"w-[min(30rem,calc(100vw-2rem))] p-1",onOpenAutoFocus:N=>N.preventDefault(),children:(0,V.jsx)("ul",{id:y,role:"listbox","aria-label":"Search suggestions",children:iF(h).map(([N,J])=>(0,V.jsxs)("li",{role:"presentation",children:[(0,V.jsx)("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",id:`${y}-${N}`,children:N}),(0,V.jsx)("ul",{role:"group","aria-labelledby":`${y}-${N}`,children:J.map($=>{let Z=h.indexOf($);return(0,V.jsxs)("li",{id:T(Z),role:"option","aria-selected":Z===C,onMouseDown:ie=>{ie.preventDefault(),z($.insert)},onMouseEnter:()=>L(Z),className:W("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 text-sm",Z===C&&"bg-accent text-accent-foreground"),children:[(0,V.jsx)("span",{className:"truncate",children:$.label}),$.hint&&(0,V.jsx)("span",{className:"ml-auto truncate pl-3 font-mono text-xs text-muted-foreground",children:$.hint})]},$.insert)})})]},N))})})]}),l&&(0,V.jsxs)(te,{variant:"secondary",className:"h-11 shrink-0",onClick:()=>s(os(A)),children:[(0,V.jsx)(gn,{"aria-hidden":"true"}),(0,V.jsx)("span",{className:"max-sm:sr-only",children:"Ask"})]})]}),(0,V.jsx)("p",{id:`${y}-help`,className:"sr-only",children:"Type words to search. Type a filter such as topic, tag, type, has, after, before or amount, followed by a colon, to narrow the results. Suggestions appear as you type; use the arrow keys to choose one. Search reads what you wrote — an entry's words, its topics, tags, amount, front matter and the names of the files attached to it — and not what is inside those files. It covers this Roll as it is now, not other Rolls, deleted entries or older versions."}),(0,V.jsx)(uF,{query:e,onQueryChange:t}),E.length>0&&(0,V.jsx)("ul",{className:"flex flex-wrap items-center gap-1.5","aria-label":"Filters you've applied",children:E.map((N,J)=>(0,V.jsx)("li",{children:(0,V.jsxs)("button",{type:"button",onClick:()=>t(zT(e,N)),className:W("tap-target inline-flex items-center gap-1 rounded-full border border-border bg-muted px-2.5 py-1 text-xs","text-foreground transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),children:[cF(N,o),(0,V.jsx)(fa,{className:"size-3 opacity-60","aria-hidden":"true"}),(0,V.jsx)("span",{className:"sr-only",children:"Remove this filter"})]})},`${N.key}:${N.value}:${J}`))}),(0,V.jsx)("p",{role:"status","aria-live":"polite",className:"min-h-5 text-xs text-muted-foreground",children:e.trim()?(0,V.jsxs)(V.Fragment,{children:[n," ",n===1?"event":"events",[...r].map(([N,J])=>(0,V.jsxs)("span",{children:[" · ",Eo({value:J,currency:N})," in total"]},N))]}):null}),(0,V.jsx)(fF,{open:g,onOpenChange:S})]})}function iF(e){let t=new Map;for(let a of e){let o=t.get(a.group)??[];o.push(a),t.set(a.group,o)}return[...t]}function uF({query:e,onQueryChange:t}){let a=new Date,o=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`,n=String(a.getFullYear()),r=ar(e),l=r.find(u=>u.key==="on")?.value,s=u=>{let d=BT(e,["on","after","before"]);t(l===u?d:os([...ar(d),{key:"on",value:u}]))},i=[{label:"Today",on:l===Oo(a),toggle:()=>s(Oo(a))},{label:"This month",on:l===o,toggle:()=>s(o)},{label:"This year",on:l===n,toggle:()=>s(n)},{label:"With a photo",on:r.some(u=>u.key==="has"&&u.value==="photo"),toggle:()=>t(qp(e,"has","photo"))}];return(0,V.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.map(u=>(0,V.jsx)("button",{type:"button","aria-pressed":u.on,onClick:u.toggle,className:W("tap-target rounded-full border px-2.5 py-1 text-xs font-medium transition-colors","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",u.on?"border-transparent bg-primary text-primary-foreground":"border-border bg-card text-muted-foreground hover:bg-accent hover:text-foreground"),children:u.label},u.label))})}function cF(e,t){switch(e.key){case"project":return t(e.value);case"tag":return`#${e.value}`;case"author":return`By ${e.value}`;case"after":return`After ${e.value}`;case"before":return`Before ${e.value}`;case"on":return e.value;case"has":return`With ${e.value}`;case"amount":return`Amount ${e.value}`;default:return`${e.key}: ${e.value}`}}function fF({open:e,onOpenChange:t}){return(0,V.jsx)(Po,{open:e,onOpenChange:t,children:(0,V.jsxs)(_o,{className:"sm:max-w-lg",children:[(0,V.jsxs)(Bo,{children:[(0,V.jsx)(zo,{children:"Searching your Roll"}),(0,V.jsx)(dl,{children:"Type words to find them anywhere in an event. Add a filter to narrow things down — they stack, and suggestions appear as you type."})]}),(0,V.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[Ax.map(a=>(0,V.jsxs)("div",{className:"contents",children:[(0,V.jsx)("dt",{className:"font-mono text-xs text-foreground",children:a.example}),(0,V.jsx)("dd",{className:"text-muted-foreground",children:a.hint})]},a.key)),(0,V.jsxs)("div",{className:"contents",children:[(0,V.jsx)("dt",{className:"font-mono text-xs text-foreground",children:"#plumbing"}),(0,V.jsx)("dd",{className:"text-muted-foreground",children:"Short for tag:plumbing"})]}),(0,V.jsxs)("div",{className:"contents",children:[(0,V.jsx)("dt",{className:"font-mono text-xs text-foreground",children:"vendor:carlos"}),(0,V.jsx)("dd",{className:"text-muted-foreground",children:"Any field a type defines"})]}),(0,V.jsxs)("div",{className:"contents",children:[(0,V.jsx)("dt",{className:"font-mono text-xs text-foreground",children:'"two words"'}),(0,V.jsx)("dd",{className:"text-muted-foreground",children:"An exact phrase"})]})]}),(0,V.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Same filters the ",(0,V.jsx)("code",{className:"font-mono",children:"gitroll find"})," command uses, so a search that works here works in your terminal."]})]})})}var bo=k(j(),1),dF=[["N","Log something"],["/","Search"],["G then I","Go to the timeline"],["G then T","Go to topics"],["Ctrl or ⌘ + Enter","Save what you're writing"],["Ctrl or ⌘ + B","Bold"],["Ctrl or ⌘ + I","Italic"],["Ctrl or ⌘ + K","Link"],["Esc","Close, or clear the search"],["?","Show this list"]];function GE({open:e,onOpenChange:t}){return(0,bo.jsx)(Po,{open:e,onOpenChange:t,children:(0,bo.jsxs)(_o,{className:"sm:max-w-md",children:[(0,bo.jsxs)(Bo,{children:[(0,bo.jsx)(zo,{children:U.shortcutsTitle}),(0,bo.jsx)(dl,{children:"Everything here can also be done with the mouse."})]}),(0,bo.jsx)("dl",{className:"grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-2 text-sm",children:dF.map(([a,o])=>(0,bo.jsxs)("div",{className:"contents",children:[(0,bo.jsx)("dt",{children:(0,bo.jsx)("kbd",{className:"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-xs",children:a})}),(0,bo.jsx)("dd",{className:"text-muted-foreground",children:o})]},a))})]})})}var On=k(X(),1);var Pt=k(j(),1),pF=400,jE={checking:"Checking it's private…",downloading:"Downloading changes…",combining:"Combining changes…",uploading:"Uploading…"},mF=new Set(["public","auth","conflict","unverified"]);function VE({store:e,enabled:t,onFinished:a}){let[o,n]=(0,On.useState)(null),[r,l]=(0,On.useState)(!1),[s,i]=(0,On.useState)(null),[u,d]=(0,On.useState)(null),c=(0,On.useRef)(!1),f=!!s&&!s.ok&&mF.has(s.code),p=(0,On.useCallback)(()=>{if(c.current||!t)return;c.current=!0,l(!0),n("checking");let x=setInterval(()=>{e.syncProgress().then(g=>n(g.stage)).catch(()=>{})},pF);e.sync().then(g=>{i(g),d(Date.now()),a(g)}).catch(()=>{}).finally(()=>{clearInterval(x),c.current=!1,l(!1),n(null)})},[e,t,a]);return{stage:o,running:r,lastResult:s,lastAt:u,blocked:f,sync:p}}function $E({state:e,status:t}){let[a,o]=(0,On.useState)(!1),n=!!t.remote,r=e.lastResult&&!e.lastResult.ok&&e.lastResult.code!=="no-remote",{icon:l,text:s,tone:i}=gF(e,t,n,!!r);return(0,Pt.jsxs)(mr,{open:a,onOpenChange:o,children:[(0,Pt.jsx)(Ts,{asChild:!0,children:(0,Pt.jsxs)("button",{type:"button",className:W("tap-target inline-flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-medium transition-colors","hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",i==="error"?"text-destructive":"text-muted-foreground"),children:[(0,Pt.jsx)(l,{className:W("size-3.5",e.running&&"animate-spin"),"aria-hidden":"true"}),(0,Pt.jsx)("span",{className:"max-sm:sr-only",children:s}),t.ahead>0&&!e.running&&(0,Pt.jsx)("span",{className:"rounded-full bg-muted px-1.5 py-px tabular-nums",children:t.ahead})]})}),(0,Pt.jsx)(hr,{className:"w-80",children:(0,Pt.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,Pt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Pt.jsx)("p",{className:"text-sm font-medium",children:n?"Backing up":U.notBackedUp}),(0,Pt.jsx)("p",{className:"text-xs text-muted-foreground",children:n?e.running?e.stage?jE[e.stage]:U.syncing:e.lastResult&&!e.lastResult.ok?e.lastResult.message:e.lastAt?`Last backed up ${OT(new Date(e.lastAt).toISOString())}.`:U.backUpWhenReady:U.notBackedUpHint})]}),n&&t.remote&&(0,Pt.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Goes to ",(0,Pt.jsx)("span",{className:"font-mono break-all",children:t.remoteUrl??t.remote}),hF(t.remoteUrl??t.remote)?", a folder on this computer.":", which GitRoll checks is private before it uploads anything."]}),t.ahead>0&&(0,Pt.jsx)("p",{className:"text-xs text-muted-foreground",children:U.pendingChanges(t.ahead)}),n&&(0,Pt.jsxs)(te,{variant:"secondary",size:"sm",disabled:e.running,onClick:()=>{e.sync(),o(!1)},children:[(0,Pt.jsx)(Zl,{className:W(e.running&&"animate-spin"),"aria-hidden":"true"}),e.running?U.syncing:r?U.retry:"Back up now"]})]})})]})}var hF=e=>/^([/~.]|[A-Za-z]:[\\/]|file:)/.test(e);function gF(e,t,a,o){return a?e.running?{icon:Zl,text:e.stage?jE[e.stage]:U.syncing,tone:"muted"}:o?{icon:e.blocked?tl:Ac,text:U.syncFailed,tone:"error"}:t.ahead>0?{icon:Zl,text:Ln(t.ahead,"change","changes"),tone:"muted"}:{icon:Zn,text:U.syncedJustNow,tone:"muted"}:{icon:Ec,text:U.notBackedUp,tone:"muted"}}var XE=k(X(),1);var oa=k(j(),1);function KE({entries:e,projects:t,onCreate:a}){let o=(0,XE.useMemo)(()=>[...new Set([...t,...e.flatMap(r=>r.projects)])].map(r=>{let l=e.filter(s=>s.projects.includes(r));return{slug:r,name:r,count:l.length,last:l[0]?.date??null}}).sort((r,l)=>l.count-r.count||r.name.localeCompare(l.name)),[e,t]);return(0,oa.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,oa.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,oa.jsx)("h1",{className:"text-xl font-semibold",children:U.topics}),(0,oa.jsxs)(te,{variant:"secondary",onClick:a,children:[(0,oa.jsx)(ko,{"aria-hidden":"true"}),U.newTopic]})]}),o.length===0?(0,oa.jsxs)("div",{className:"flex flex-col items-start gap-3 rounded-lg border border-dashed border-border p-6",children:[(0,oa.jsx)("p",{className:"text-sm text-muted-foreground",children:U.topicsEmpty}),(0,oa.jsxs)(te,{onClick:a,children:[(0,oa.jsx)(ko,{"aria-hidden":"true"}),U.newTopic]})]}):(0,oa.jsx)("ul",{className:"flex flex-col gap-1",children:o.map(n=>(0,oa.jsx)("li",{children:(0,oa.jsxs)("a",{href:ns(`topic:${n.slug}`),className:"flex items-center justify-between gap-3 rounded-lg border border-border px-3 py-2.5 transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,oa.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:n.name}),(0,oa.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:[Ln(n.count,"event","events"),n.last&&Vc(n.last)?` · ${Hp(Vc(n.last))}`:""]})]})},n.slug))})]})}var Y=k(j(),1);function YE({store:e}){let[t,a]=(0,Ie.useState)("ok"),o=(0,Ie.useCallback)(_=>a(_),[]),n=kT(e,o),{entries:r,index:l,projects:s}=RT(e,n),i=ET(),u=_m(),d=Pm(),c=e.info(),f=(0,Ie.useCallback)(_=>_,[]),p=(0,Ie.useCallback)(_=>e.attachmentUrl(_),[e]),x=(0,Ie.useMemo)(()=>r.filter(_=>_.tags.includes("conflict")).length,[r]),g=i.name==="timeline"?i.query:"",S=(0,Ie.useMemo)(()=>l.search(g),[l,g]),y=(0,Ie.useMemo)(()=>{let _=new Map;for(let re of S)re.amount&&_.set(re.amount.currency,(_.get(re.amount.currency)??0)+re.amount.value);return _},[S]),[m,h]=(0,Ie.useState)(null),[b,L]=(0,Ie.useState)(vl),[C,T]=(0,Ie.useState)(!1),[w,E]=(0,Ie.useState)(null),[A,z]=(0,Ie.useState)(!1),[B,oe]=(0,Ie.useState)(!1),[N,J]=(0,Ie.useState)(!1),$=(0,Ie.useRef)(null),Z=(0,Ie.useRef)(null),ie=(0,Ie.useCallback)(_=>{!_.ok&&_.code!=="no-remote"?u.error(_.message):_.merged?.length&&u.toast(_.message)},[u]),Te=VE({store:e,enabled:t==="ok"&&!!c.sync.remote,onFinished:ie}),F=(0,Ie.useCallback)(_=>{i.name==="timeline"?Ix(_):Sn(ns(_))},[i.name]),Wa=(0,Ie.useCallback)((_,re)=>{let et=i.name==="timeline"?i.query:"",Lt=qp(et,_,re);i.name==="timeline"?Ix(Lt):Sn(ns(Lt))},[i]),vo=(0,Ie.useCallback)(()=>{h(null),L(vl()),J(!0),i.name!=="timeline"&&Sn("#/"),requestAnimationFrame(()=>requestAnimationFrame(()=>{Z.current?.querySelector("textarea")?.focus(),Z.current?.scrollIntoView({block:"nearest"})}))},[i.name]),$o=(0,Ie.useCallback)(async()=>{if(!C){T(!0);try{if(m){let{changes:_,error:re}=kE(b,m);if(re){u.error(re);return}let{notices:et}=await e.updateEntry(m.path,_,b.files,m);u.toast([U.edited,...et].join(" ")),h(null),L(vl()),Sn(`#/entry/${encodeURIComponent(m.path)}`)}else{let{input:_,error:re}=vv(b);if(re){u.error(re);return}let{notices:et}=await e.addEntry(_,b.files);u.toast([b.files.length?U.savedWithFiles(b.files.length):U.saved,...et].join(" ")),L(vl()),J(!1)}}catch(_){u.error(Ta(_))}finally{ji(),T(!1)}}},[C,m,b,e,u]),Mn=(0,Ie.useCallback)(async _=>{if(!c.ai.enabled)return!c.ai.configured||!c.ai.on?oe(!0):u.error("Ask is turned off for this Roll (ai: false in .gitroll/config.yaml).");let re=_.trim();if(!re){$.current?.focus(),u.toast(U.askPlaceholder);return}E({question:re,loading:!0,answer:"",sources:[],error:""});try{let{answer:et,sources:Lt}=await e.ask(re);E({question:re,loading:!1,answer:et,sources:Lt,error:""})}catch(et){E({question:re,loading:!1,answer:"",sources:[],error:Ta(et)})}},[e,u]),se=(0,Ie.useCallback)(async _=>{if(await d.confirm({title:U.confirmDeleteTitle,description:U.confirmDeleteBody,confirmLabel:U.confirmDeleteAction,destructive:!0}))try{await e.deleteEntry(_.path,_),ji(),u.toast(U.deleted),Sn("#/")}catch(et){u.error(Ta(et))}},[d,e,u]),ut=(0,Ie.useCallback)(async()=>{let _=await d.prompt({title:U.newTopicTitle,description:U.newTopicBody,label:U.newTopicLabel,placeholder:U.newTopicPlaceholder,confirmLabel:"Show"}),re=Wl(_??"");re&&Sn(ns(`topic:${re}`))},[d]);(0,Ie.useEffect)(()=>{let _=re=>{let et=re.target;if(!(re.metaKey||re.ctrlKey||re.altKey)&&!(/^(INPUT|TEXTAREA|SELECT)$/.test(et.tagName)||et.isContentEditable)){if(re.key==="n")re.preventDefault(),vo();else if(re.key==="/")re.preventDefault(),i.name!=="timeline"&&Sn("#/"),requestAnimationFrame(()=>$.current?.focus());else if(re.key==="?")re.preventDefault(),z(!0);else if(re.key==="g"){let Lt=Ko=>{Ko.key==="t"&&Sn("#/topics"),Ko.key==="i"&&Sn("#/"),window.removeEventListener("keydown",Lt)};window.addEventListener("keydown",Lt),setTimeout(()=>window.removeEventListener("keydown",Lt),1200)}}};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[vo,i.name]);let Xo=(0,Ie.useMemo)(()=>({projects:s.map(_=>({slug:_,name:_})),tags:[...new Set(r.flatMap(_=>_.tags))].sort()}),[s,r]);(0,Ie.useEffect)(()=>{document.title=`${c.name} · GitRoll`},[c.name]);let na=i.name==="entry"?r.find(_=>_.path===i.id)??null:null;return(0,Y.jsxs)("div",{className:"min-h-dvh",children:[(0,Y.jsx)("a",{href:"#main",className:"sr-only-focusable absolute left-3 top-3 z-[60] rounded-md bg-primary px-3 py-2 text-sm text-primary-foreground",children:"Skip to the main content"}),(0,Y.jsx)("header",{className:"sticky top-0 z-30 border-b border-border bg-background/95 backdrop-blur",children:(0,Y.jsxs)("div",{className:"mx-auto flex h-14 max-w-3xl items-center gap-2 px-4",children:[(0,Y.jsx)("a",{href:"#/",className:"mr-auto min-w-0 truncate rounded text-sm font-semibold focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:c.name}),(0,Y.jsx)(ME,{status:c.sync,className:"mr-1 max-sm:hidden"}),(0,Y.jsxs)("nav",{"aria-label":"Sections",className:"flex items-center gap-1",children:[(0,Y.jsx)(Iv,{href:"#/",current:i.name==="timeline",children:"Timeline"}),(0,Y.jsx)(Iv,{href:"#/topics",current:i.name==="topics",children:U.topics}),x>0&&(0,Y.jsxs)(Iv,{href:"#/conflicts",current:i.name==="conflicts",children:["Conflicts",(0,Y.jsx)("span",{className:"ml-1 rounded-full bg-del-bg px-1.5 text-xs text-del",children:x})]})]}),(0,Y.jsxs)(te,{variant:"ghost",size:"iconSm",title:c.ai.enabled?`Ask uses ${c.ai.model}`:"Set up Ask",onClick:()=>oe(!0),children:[(0,Y.jsx)(gn,{"aria-hidden":"true"}),(0,Y.jsx)("span",{className:"sr-only",children:"Ask settings"})]}),(0,Y.jsx)($E,{state:Te,status:c.sync}),(0,Y.jsxs)(te,{size:"sm",onClick:vo,className:"max-sm:size-9 max-sm:rounded-full max-sm:p-0",children:[(0,Y.jsx)(ko,{"aria-hidden":"true"}),(0,Y.jsx)("span",{className:"max-sm:sr-only",children:U.composerOpen})]})]})}),(0,Y.jsxs)("main",{id:"main",tabIndex:-1,className:"mx-auto flex max-w-3xl flex-col gap-4 px-4 py-4 outline-none",children:[(0,Y.jsx)(yF,{connection:t,warnings:c.warnings,problems:c.problems}),i.name==="timeline"&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{ref:Z,children:(0,Y.jsx)(bv,{value:b,onChange:L,projects:s,editing:null,maxAttachmentBytes:c.maxAttachmentBytes,attachmentUrl:p,onSubmit:()=>{$o()},saving:C,collapsible:!0,expanded:N,onExpandedChange:J})}),(0,Y.jsx)(qE,{query:g,onQueryChange:F,suggestCtx:Xo,projectName:f,resultCount:S.length,totals:y,askEnabled:c.ai.enabled,onAsk:_=>{Mn(_)},inputRef:$}),w&&(0,Y.jsx)(EE,{state:w,entries:r,projectName:f,attachmentUrl:p,onFilter:Wa,onClose:()=>E(null),onDraft:_=>{L({...vl(),text:_}),J(!0),E(null),u.toast("Drafted from the answer. Read it, change what's wrong, then Save."),Z.current?.scrollIntoView({behavior:"smooth",block:"start"})}}),(0,Y.jsx)(RE,{entries:S,projectName:f,attachmentUrl:p,onFilter:Wa,emptyState:g.trim()?(0,Y.jsxs)("div",{className:"flex flex-col items-start gap-2 py-10",children:[(0,Y.jsx)("p",{className:"text-sm",children:U.noMatches}),(0,Y.jsx)("p",{className:"text-sm text-muted-foreground",children:U.noMatchesHint}),(0,Y.jsx)(te,{variant:"secondary",size:"sm",onClick:()=>F(""),children:U.clearFilters})]}):(0,Y.jsxs)("div",{className:"flex flex-col items-start gap-2 py-10",children:[(0,Y.jsx)("p",{className:"text-base font-medium",children:U.emptyTitle}),(0,Y.jsx)("p",{className:"max-w-prose text-sm text-muted-foreground",children:U.emptyBody})]})})]}),i.name==="topics"&&(0,Y.jsx)(KE,{entries:r,projects:s,onCreate:()=>{ut()}}),i.name==="conflicts"&&(0,Y.jsx)(DE,{store:e,onResolved:ji}),i.name==="entry"&&(0,Y.jsx)(HE,{entry:na,entries:r,projectName:f,attachmentUrl:p,onFilter:Wa,onEdit:()=>{na&&(h(na),L(TE(na)))},onDelete:()=>na&&void se(na),loadHistory:_=>e.history(_),onRestore:async _=>{if(na)try{await e.restoreVersion(na.path,_),ji(),u.toast("That version is back, saved as a new commit. The others are still in History.")}catch(re){u.error(Ta(re))}}})]}),(0,Y.jsx)(Po,{open:m!==null,onOpenChange:_=>{_||(async()=>m&&(b.text!==m.body||b.files.length>0)&&!await d.confirm({title:U.confirmDiscardTitle,description:U.confirmDiscardBody,confirmLabel:U.confirmDiscardAction,cancelLabel:U.keepWriting,destructive:!0})||(h(null),L(vl())))()},children:(0,Y.jsxs)(_o,{className:"sm:max-w-2xl",children:[(0,Y.jsx)(Bo,{children:(0,Y.jsx)(zo,{children:"Edit this event"})}),m&&(0,Y.jsx)("div",{className:"overflow-y-auto",children:(0,Y.jsx)(bv,{value:b,onChange:L,projects:s,editing:m,maxAttachmentBytes:c.maxAttachmentBytes,attachmentUrl:p,onSubmit:()=>{$o()},saving:C,autoFocus:!0,onCancel:()=>{h(null),L(vl())}})})]})}),(0,Y.jsx)(GE,{open:A,onOpenChange:z}),(0,Y.jsx)(MA,{store:e,open:B,onOpenChange:oe,onSaved:ji})]})}function Iv({href:e,current:t,children:a}){return(0,Y.jsx)("a",{href:e,"aria-current":t?"page":void 0,className:t?"rounded-md bg-muted px-2.5 py-1.5 text-sm font-medium text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring":"rounded-md px-2.5 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:a})}function yF({connection:e,warnings:t,problems:a}){return e==="ok"&&!t.length&&!a.length?null:(0,Y.jsxs)("div",{className:"flex flex-col gap-2",children:[e!=="ok"&&(0,Y.jsx)("p",{role:"alert",className:"rounded-lg border border-destructive/40 bg-destructive-bg px-3 py-2 text-sm text-destructive",children:e==="signed-out"?U.signedOutBody:U.stoppedBody}),t.map(o=>(0,Y.jsx)("p",{className:"rounded-lg border border-border bg-muted px-3 py-2 text-sm",children:o},o)),a.length>0&&(0,Y.jsxs)("details",{className:"rounded-lg border border-border bg-muted px-3 py-2 text-sm",children:[(0,Y.jsx)("summary",{className:"cursor-pointer",children:a.length===1?"A file in this Roll couldn't be read":`${a.length} files in this Roll couldn't be read`}),(0,Y.jsx)("ul",{className:"mt-2 flex flex-col gap-1 text-xs",children:a.map(o=>(0,Y.jsxs)("li",{children:[(0,Y.jsx)("code",{className:"font-mono",children:o.path}),": ",o.error]},o.path))})]})]})}var Dn=k(j(),1);function QE({kind:e}){let t=e==="signed-out";return(0,Dn.jsxs)("main",{className:"mx-auto flex min-h-dvh max-w-md flex-col justify-center gap-3 px-6",children:[(0,Dn.jsx)("h1",{className:"text-lg font-semibold",children:t?U.signedOutTitle:U.stoppedTitle}),(0,Dn.jsx)("p",{className:"text-sm text-muted-foreground",children:t?U.signedOutBody:U.stoppedBody}),!t&&(0,Dn.jsxs)(Dn.Fragment,{children:[(0,Dn.jsx)("p",{className:"text-sm text-muted-foreground",children:U.stoppedHint}),(0,Dn.jsx)("pre",{className:"rounded-md border border-border bg-muted px-3 py-2 font-mono text-sm",children:"gitroll"})]})]})}function ZE(e){let t="";for(let a=0;a<e.length;a+=32768)t+=String.fromCharCode(...e.subarray(a,a+32768));return btoa(t)}async function Za(e,t,a){let o;try{o=await fetch(`api/${t}`,{method:e,headers:{"Content-Type":"application/json"},body:a===void 0?void 0:JSON.stringify(a),cache:"no-store"})}catch{throw new sl("GitRoll has stopped. Start it again from your terminal with: gitroll")}let n=await o.json().catch(()=>null);if(o.status===401)throw new il(n?.error??"Open GitRoll from the link shown in your terminal.");if(!o.ok||n===null)throw new Uc(n?.error??`Something went wrong (${o.status}).`);return n}var Hm=class e{#e;#t="";static async connect(){let t=new e;try{return await t.refresh(),{store:t}}catch(a){return{error:a instanceof il?"signed-out":"stopped"}}}info=()=>this.#e.info;version=()=>this.#t;entries=()=>this.#e.entries;projects=()=>this.#e.projects;async refresh(){let t;try{t=await fetch("api/state",{cache:"no-store"})}catch{throw new sl("GitRoll has stopped.")}if(t.status===401)throw new il("Open GitRoll from the link shown in your terminal.");if(!t.ok||!(t.headers.get("content-type")??"").includes("application/json"))throw new sl("GitRoll has stopped.");let a=await t.text();a!==this.#t&&(this.#e=JSON.parse(a),this.#t=a)}async#a(t){let a=this.#e.info.maxAttachmentBytes,o=t.find(n=>n.size>a);if(o)throw new Uc(`${o.name} is too large. Files can be up to ${Math.round(a/1048576)} MB.`);return Promise.all(t.map(async n=>({name:n.name,type:n.type,data:ZE(new Uint8Array(await n.arrayBuffer()))})))}async addEntry(t,a){let o=await Za("POST","entries",{...t,files:await this.#a(a)});return await this.refresh(),o}async updateEntry(t,a,o){let n=await Za("PATCH",`entries/${encodeURIComponent(t)}`,{...a,files:await this.#a(o)});return await this.refresh(),n}async deleteEntry(t){await Za("DELETE",`entries/${encodeURIComponent(t)}`),await this.refresh()}async history(t){return(await Za("GET",`entries/${encodeURIComponent(t)}/history`)).history}attachmentUrl(t){return`attachments/${t.path.split("/").map(encodeURIComponent).join("/")}`}async sync(){let t=await Za("POST","sync",{});return await this.refresh(),t}syncProgress(){return Za("GET","sync")}ask(t){return Za("POST","ask",{question:t})}aiSettings(){return Za("GET","ai")}async saveAiSettings(t){let a=await Za("PUT","ai",t);return await this.refresh(),a}testAi(t){return Za("POST","ai/test",t??{})}async restoreVersion(t,a){let{entry:o}=await Za("POST",`entries/${encodeURIComponent(t)}/restore`,{commit:a});return await this.refresh(),o}async conflicts(){return(await Za("GET","conflicts")).conflicts}async resolveConflict(t,a){let{entry:o}=await Za("POST",`entries/${encodeURIComponent(t)}/resolve`,a);return await this.refresh(),o}};var ks=k(j(),1),Tv=document.getElementById("root");if(!Tv)throw new Error("GitRoll couldn't find the page to draw on.");if(window.top!==window.self)Tv.textContent="For your security, GitRoll can't be shown inside another page.";else{let e=await Hm.connect();(0,JE.createRoot)(Tv).render((0,ks.jsx)(WE.StrictMode,{children:(0,ks.jsx)(SR,{delayDuration:400,children:(0,ks.jsx)(IE,{children:(0,ks.jsx)(CE,{children:"error"in e?(0,ks.jsx)(QE,{kind:e.error}):(0,ks.jsx)(YE,{store:e.store})})})})}))}
289
+ /*! Bundled license information:
290
+
291
+ react/cjs/react.production.js:
292
+ (**
293
+ * @license React
294
+ * react.production.js
295
+ *
296
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
297
+ *
298
+ * This source code is licensed under the MIT license found in the
299
+ * LICENSE file in the root directory of this source tree.
300
+ *)
301
+
302
+ scheduler/cjs/scheduler.production.js:
303
+ (**
304
+ * @license React
305
+ * scheduler.production.js
306
+ *
307
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
308
+ *
309
+ * This source code is licensed under the MIT license found in the
310
+ * LICENSE file in the root directory of this source tree.
311
+ *)
312
+
313
+ react-dom/cjs/react-dom.production.js:
314
+ (**
315
+ * @license React
316
+ * react-dom.production.js
317
+ *
318
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
319
+ *
320
+ * This source code is licensed under the MIT license found in the
321
+ * LICENSE file in the root directory of this source tree.
322
+ *)
323
+
324
+ react-dom/cjs/react-dom-client.production.js:
325
+ (**
326
+ * @license React
327
+ * react-dom-client.production.js
328
+ *
329
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
330
+ *
331
+ * This source code is licensed under the MIT license found in the
332
+ * LICENSE file in the root directory of this source tree.
333
+ *)
334
+
335
+ react/cjs/react-jsx-runtime.production.js:
336
+ (**
337
+ * @license React
338
+ * react-jsx-runtime.production.js
339
+ *
340
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
341
+ *
342
+ * This source code is licensed under the MIT license found in the
343
+ * LICENSE file in the root directory of this source tree.
344
+ *)
345
+
346
+ lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs:
347
+ lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs:
348
+ lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs:
349
+ lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs:
350
+ lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs:
351
+ lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs:
352
+ lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs:
353
+ lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs:
354
+ lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs:
355
+ lucide-react/dist/esm/context.mjs:
356
+ lucide-react/dist/esm/Icon.mjs:
357
+ lucide-react/dist/esm/createLucideIcon.mjs:
358
+ lucide-react/dist/esm/icons/arrow-left.mjs:
359
+ lucide-react/dist/esm/icons/bold.mjs:
360
+ lucide-react/dist/esm/icons/calendar-clock.mjs:
361
+ lucide-react/dist/esm/icons/check.mjs:
362
+ lucide-react/dist/esm/icons/chevron-down.mjs:
363
+ lucide-react/dist/esm/icons/circle-question-mark.mjs:
364
+ lucide-react/dist/esm/icons/cloud-off.mjs:
365
+ lucide-react/dist/esm/icons/download.mjs:
366
+ lucide-react/dist/esm/icons/git-branch.mjs:
367
+ lucide-react/dist/esm/icons/hard-drive.mjs:
368
+ lucide-react/dist/esm/icons/image.mjs:
369
+ lucide-react/dist/esm/icons/italic.mjs:
370
+ lucide-react/dist/esm/icons/link-2.mjs:
371
+ lucide-react/dist/esm/icons/list-checks.mjs:
372
+ lucide-react/dist/esm/icons/list.mjs:
373
+ lucide-react/dist/esm/icons/loader-circle.mjs:
374
+ lucide-react/dist/esm/icons/paperclip.mjs:
375
+ lucide-react/dist/esm/icons/pencil.mjs:
376
+ lucide-react/dist/esm/icons/plus.mjs:
377
+ lucide-react/dist/esm/icons/quote.mjs:
378
+ lucide-react/dist/esm/icons/refresh-cw.mjs:
379
+ lucide-react/dist/esm/icons/rotate-ccw-clock.mjs:
380
+ lucide-react/dist/esm/icons/search.mjs:
381
+ lucide-react/dist/esm/icons/sparkles.mjs:
382
+ lucide-react/dist/esm/icons/trash.mjs:
383
+ lucide-react/dist/esm/icons/triangle-alert.mjs:
384
+ lucide-react/dist/esm/icons/x.mjs:
385
+ lucide-react/dist/esm/lucide-react.mjs:
386
+ (**
387
+ * @license lucide-react v1.46.0 - ISC
388
+ *
389
+ * This source code is licensed under the ISC license.
390
+ * See the LICENSE file in the root directory of this source tree.
391
+ *)
392
+
393
+ dompurify/dist/purify.es.mjs:
394
+ (*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE *)
395
+ */